From cfaa0078629e8ae731338795c5100eb2bb874729 Mon Sep 17 00:00:00 2001 From: kissshot <4530897+kkkgo@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:30:27 +0800 Subject: [PATCH] ycad sync --- .../assets/BaseModal-29d7cf7b.js | 1 - .../assets/BaseModal-ef61154c.css | 1 - .../assets/Config-35023b66.css | 1 - .../clash-dashboard/assets/Config-8af30e1b.js | 1 + .../assets/Config-db1f64eb.css | 1 + .../clash-dashboard/assets/Config-f50e8a52.js | 1 - .../assets/Connections-92103147.js | 1 - .../assets/Connections-adb3a6d0.js | 22 +++ .../assets/Connections-ddae4f70.css | 1 + .../assets/Connections-f01328e8.css | 1 - .../clash-dashboard/assets/Fab-a0a7e573.css | 1 - .../clash-dashboard/assets/Fab-a434d836.css | 1 + .../{Fab-8003d842.js => Fab-aebb033d.js} | 2 +- .../clash-dashboard/assets/Logs-4b8e75d1.css | 1 - .../clash-dashboard/assets/Logs-5e5ee0ad.css | 1 + .../clash-dashboard/assets/Logs-9c71a415.js | 1 + .../clash-dashboard/assets/Logs-c88cdced.js | 1 - .../assets/Proxies-1a2faf73.js | 1 - .../assets/Proxies-40f80166.css | 1 + .../assets/Proxies-b68bae25.css | 1 - .../assets/Proxies-ffaa28cd.js | 1 + .../clash-dashboard/assets/Rules-9573ff0c.js | 1 - .../clash-dashboard/assets/Rules-d0c6e66d.js | 1 + ...{Select-29e929fc.js => Select-54a41ffb.js} | 2 +- .../assets/TextFilter-5cf71eda.js | 1 - .../assets/TextFilter-b21c0577.css | 1 - .../assets/TextFilter-c83c25f0.js | 1 + .../assets/TextFilter-ced87fc6.css | 1 + .../assets/TwemojiCountryFlags-9f04f144.woff2 | Bin 78292 -> 0 bytes .../assets/chart-lib-236f0953.js | 16 --- .../assets/chart-lib-da3c73a9.js | 16 +++ .../assets/chevron-down-4da23e9b.js | 1 + .../assets/{en-b261f0f9.js => en-4e6aa22d.js} | 2 +- .../clash-dashboard/assets/index-0d511031.js | 9 ++ .../clash-dashboard/assets/index-17fa2fa5.js | 127 +++++++++++++++++ .../clash-dashboard/assets/index-346cd228.js | 9 -- .../clash-dashboard/assets/index-4697f19f.css | 1 - .../{index-759f7e71.js => index-b2af8b42.js} | 2 +- .../clash-dashboard/assets/index-b6d3babf.css | 1 + .../clash-dashboard/assets/index-dcea5d2f.js | 130 ------------------ ....esm-fff1f13f.js => index.esm-cd2d54ba.js} | 2 +- .../clash-dashboard/assets/logs-367bea05.js | 2 + .../clash-dashboard/assets/logs-9e380b83.js | 2 - .../{play-263403e0.js => play-3d48a080.js} | 2 +- ...=> useRemainingViewPortHeight-0cb185fe.js} | 2 +- .../assets/{zh-98a29f34.js => zh-715caed0.js} | 2 +- .../clash/clash-dashboard/index_base.html | 4 +- FILES/etc/config/clash/clash-dashboard/sw.js | 2 +- 48 files changed, 200 insertions(+), 183 deletions(-) delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/BaseModal-29d7cf7b.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/BaseModal-ef61154c.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Config-35023b66.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Config-8af30e1b.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Config-db1f64eb.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Config-f50e8a52.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Connections-92103147.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Connections-adb3a6d0.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Connections-ddae4f70.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Connections-f01328e8.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Fab-a0a7e573.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Fab-a434d836.css rename FILES/etc/config/clash/clash-dashboard/assets/{Fab-8003d842.js => Fab-aebb033d.js} (96%) delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Logs-4b8e75d1.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Logs-5e5ee0ad.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Logs-9c71a415.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Logs-c88cdced.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Proxies-1a2faf73.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Proxies-40f80166.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Proxies-b68bae25.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffaa28cd.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rules-9573ff0c.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/Rules-d0c6e66d.js rename FILES/etc/config/clash/clash-dashboard/assets/{Select-29e929fc.js => Select-54a41ffb.js} (76%) delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/TextFilter-5cf71eda.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/TextFilter-b21c0577.css create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/TextFilter-c83c25f0.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/TextFilter-ced87fc6.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/TwemojiCountryFlags-9f04f144.woff2 delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/chart-lib-236f0953.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/chart-lib-da3c73a9.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/chevron-down-4da23e9b.js rename FILES/etc/config/clash/clash-dashboard/assets/{en-b261f0f9.js => en-4e6aa22d.js} (75%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-0d511031.js create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-17fa2fa5.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-346cd228.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-4697f19f.css rename FILES/etc/config/clash/clash-dashboard/assets/{index-759f7e71.js => index-b2af8b42.js} (99%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-b6d3babf.css delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/index-dcea5d2f.js rename FILES/etc/config/clash/clash-dashboard/assets/{index.esm-fff1f13f.js => index.esm-cd2d54ba.js} (94%) create mode 100644 FILES/etc/config/clash/clash-dashboard/assets/logs-367bea05.js delete mode 100644 FILES/etc/config/clash/clash-dashboard/assets/logs-9e380b83.js rename FILES/etc/config/clash/clash-dashboard/assets/{play-263403e0.js => play-3d48a080.js} (97%) rename FILES/etc/config/clash/clash-dashboard/assets/{useRemainingViewPortHeight-054801fd.js => useRemainingViewPortHeight-0cb185fe.js} (81%) rename FILES/etc/config/clash/clash-dashboard/assets/{zh-98a29f34.js => zh-715caed0.js} (79%) diff --git a/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-29d7cf7b.js b/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-29d7cf7b.js deleted file mode 100644 index d7e3955..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-29d7cf7b.js +++ /dev/null @@ -1 +0,0 @@ -import{r as y,R as p,P as s,c as f,m as u,j as m,b,h as O}from"./index-dcea5d2f.js";function l(){return l=Object.assign||function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function h(e,n){if(e==null)return{};var r={},t=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}var c=y.forwardRef(function(e,n){var r=e.color,t=r===void 0?"currentColor":r,o=e.size,a=o===void 0?24:o,v=g(e,["color","size"]);return p.createElement("svg",l({ref:n,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},v),p.createElement("polyline",{points:"6 9 12 15 18 9"}))});c.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};c.displayName="ChevronDown";const k=c,w="_overlay_uuk3b_1",d="_cnt_uuk3b_5",j="_afterOpen_uuk3b_16",i={overlay:w,cnt:d,afterOpen:j},{useMemo:_}=O;function C({isOpen:e,onRequestClose:n,children:r}){const t=_(()=>({base:f(u.content,i.cnt),afterOpen:i.afterOpen,beforeClose:""}),[]);return m.jsx(b,{isOpen:e,onRequestClose:n,className:t,overlayClassName:f(u.overlay,i.overlay),children:r})}export{C as B,k as C}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-ef61154c.css b/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-ef61154c.css deleted file mode 100644 index f728a44..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/BaseModal-ef61154c.css +++ /dev/null @@ -1 +0,0 @@ -._overlay_uuk3b_1{background-color:#0009}._cnt_uuk3b_5{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);box-shadow:#0000001f 0 4px 4px,#0000003d 0 16px 32px}._afterOpen_uuk3b_16{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-35023b66.css b/FILES/etc/config/clash/clash-dashboard/assets/Config-35023b66.css deleted file mode 100644 index 0be95e7..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Config-35023b66.css +++ /dev/null @@ -1 +0,0 @@ -._root_165du_1,._section_165du_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_165du_1,._section_165du_2{gap:15px}}._root_165du_1,._section_165du_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_165du_1,._section_165du_2{padding:10px 40px 15px}}._wrapSwitch_165du_26{height:40px;display:flex;align-items:center}._sep_165du_32{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_165du_32{padding:0 40px}}._sep_165du_32>div{border-top:1px dashed #373737}._label_165du_45{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9{border-color:#387cec}._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-8af30e1b.js b/FILES/etc/config/clash/clash-dashboard/assets/Config-8af30e1b.js new file mode 100644 index 0000000..0a4962a --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Config-8af30e1b.js @@ -0,0 +1 @@ +import{r as j,j as e,s as _,e as P,h as k,c as U,i as V,k as I,l as R,n as z,b as E,o as G,g as L,q,t as F,v,w as H,x as J,u as W,C as K,y as Q,z as X,A as Y,D as Z}from"./index-17fa2fa5.js";import{r as ee}from"./logs-367bea05.js";import{S as b}from"./Select-54a41ffb.js";function te({id:t,label:a,checked:n,disabled:l,onChange:c}){const[o,i]=j.useState(!!n),u=j.useRef(!!n);j.useEffect(()=>{u.current!==n&&i(!!n),u.current=!!n},[n]);const h=j.useCallback(f=>{l||(i(f.target.checked),c&&c(f))},[l,c]);return e.jsxs("label",{htmlFor:t,className:_.toggle,children:[e.jsx("input",{className:_.input,id:t,type:"checkbox",onChange:h,checked:o,disabled:l}),e.jsx("span",{className:_.track}),a]})}const{useState:se,useRef:ne,useEffect:ae,useCallback:ce}=k;function le({value:t,...a}){const[n,l]=se(t),c=ne(t);ae(()=>{c.current!==t&&l(t),c.current=t},[t]);const o=ce(i=>l(i.target.value),[l]);return e.jsx("input",{className:P.input,value:n,onChange:o,...a})}const oe="_root_9c0c8_1",re="_section_9c0c8_2",ie="_item_9c0c8_14",de="_wrapSwitch_9c0c8_30",ue="_sep_9c0c8_36",pe="_label_9c0c8_49",d={root:oe,section:re,item:ie,wrapSwitch:de,sep:ue,label:pe},ge="_fieldset_1ghjp_1",he="_input_1ghjp_9",me="_cnt_1ghjp_9",S={fieldset:ge,input:he,cnt:me};function fe({OptionComponent:t,optionPropsList:a,selectedIndex:n,onChange:l}){const c=U("visually-hidden",S.input),o=i=>{l(i.target.value)};return e.jsx("fieldset",{className:S.fieldset,children:a.map((i,u)=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:n===u,name:"selection",value:u,"aria-labelledby":"traffic chart type "+u,onChange:o,className:c}),e.jsx("div",{className:S.cnt,children:e.jsx(t,{...i})})]},u))})}const{useMemo:xe}=k,je={plugins:{legend:{display:!1}},scales:{x:{display:!1,type:"category"},y:{display:!1,type:"linear"}}},$=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],Ce=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],_e=$;function ve({id:t}){const a=V.read(),n=xe(()=>({labels:_e,datasets:[{...I,...R[t].up,data:$},{...I,...R[t].down,data:Ce}]}),[t]),l="chart-"+t;return z(a.Chart,l,n,null,je),e.jsx("div",{style:{width:100,padding:5},children:e.jsx("canvas",{id:l})})}const{useEffect:T,useState:be,useCallback:m,useRef:Se,useMemo:ke}=k,ye=[{id:0},{id:1},{id:2},{id:3}],we=[["debug","Debug"],["info","Info"],["warning","Warning"],["error","Error"],["silent","Silent"]],Ne=[["zh","中文"],["en","English"]],Ie=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],Re=t=>({configs:G(t),apiConfig:L(t)}),Ee=t=>({selectedChartStyleIndex:Y(t),latencyTestUrl:Z(t),apiConfig:L(t)}),Le=E(Ee)(Te),De=E(Re)($e);function $e({dispatch:t,configs:a,apiConfig:n}){return T(()=>{t(q(n))},[t,n]),e.jsx(Le,{configs:a})}function Te({dispatch:t,configs:a,selectedChartStyleIndex:n,latencyTestUrl:l,apiConfig:c}){const[o,i]=be(a),u=Se(a);T(()=>{u.current!==a&&i(a),u.current=a},[a]),m(()=>{t(F("apiConfig"))},[t]);const h=m((s,r)=>{i({...o,[s]:r})},[o]),f=m(s=>{const r="allow-lan",p=s;h(r,p),t(v(c,{"allow-lan":p}))},[c,t,h]),x=m(({name:s,value:r})=>{switch(s){case"mode":case"log-level":h(s,r),t(v(c,{[s]:r})),s==="log-level"&&ee({...c,logLevel:r});break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(r!==""){const p=parseInt(r,10);if(p<0||p>65535)return}h(s,r);break;default:return}},[c,t,h]);m(s=>x(s.target),[x]);const{selectChartStyleIndex:M,updateAppConfig:y}=H(),A=m(s=>{const r=s.target,{name:p,value:N}=r;switch(p){case"port":case"socks-port":case"mixed-port":case"redir-port":{const C=parseInt(N,10);if(C<0||C>65535)return;t(v(c,{[p]:C}));break}case"latencyTestUrl":{y(p,N);break}default:throw new Error(`unknown input name ${p}`)}},[c,t,y]),B=ke(()=>{const s=o.mode;return typeof s=="string"&&s[0].toUpperCase()+s.slice(1)},[o.mode]),[D,O]=J(X),{t:g,i18n:w}=W();return e.jsxs("div",{children:[e.jsx(K,{title:g("Config")}),e.jsxs("div",{className:d.root,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("Mode")}),e.jsx(b,{options:Ie,selected:B,onChange:s=>x({name:"mode",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("LogLevel")}),e.jsx(b,{options:we,selected:o["log-level"],onChange:s=>x({name:"log-level",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("allow_lan_mixed")}),e.jsx("div",{className:d.wrapSwitch,children:e.jsx(Q,{name:"allow-lan",checked:o["allow-lan"],onChange:f})})]})]}),e.jsx("div",{className:d.sep,children:e.jsx("div",{})}),e.jsxs("div",{className:d.section,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("latency_test_url")}),e.jsx(le,{name:"latencyTestUrl",type:"text",value:l,onBlur:A})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("lang")}),e.jsx("div",{children:e.jsx(b,{options:Ne,selected:w.language,onChange:s=>w.changeLanguage(s.target.value)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:g("chart_style")}),e.jsx(fe,{OptionComponent:ve,optionPropsList:ye,selectedIndex:n,onChange:M})]}),e.jsx("div",{className:d.item,children:e.jsx(te,{label:g("dark_mode_pure_black_toggle_label"),id:"dark-mode-pure-black-toggle",checked:D,onChange:s=>O(s.target.checked)})})]})]})}export{De as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-db1f64eb.css b/FILES/etc/config/clash/clash-dashboard/assets/Config-db1f64eb.css new file mode 100644 index 0000000..afa3681 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Config-db1f64eb.css @@ -0,0 +1 @@ +._root_9c0c8_1,._section_9c0c8_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_9c0c8_1,._section_9c0c8_2{gap:15px}}._root_9c0c8_1 ._item_9c0c8_14,._section_9c0c8_2 ._item_9c0c8_14{margin-top:11px}._root_9c0c8_1,._section_9c0c8_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_9c0c8_1,._section_9c0c8_2{padding:10px 40px 15px}}._wrapSwitch_9c0c8_30{height:40px;display:flex;align-items:center}._sep_9c0c8_36{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_9c0c8_36{padding:0 40px}}._sep_9c0c8_36>div{border-top:1px dashed #373737}._label_9c0c8_49{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9{border-color:#387cec}._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Config-f50e8a52.js b/FILES/etc/config/clash/clash-dashboard/assets/Config-f50e8a52.js deleted file mode 100644 index 360a612..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Config-f50e8a52.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,s as T,h as _,c as U,i as D,k as w,l as I,n as V,d as N,o as A,g as k,q as P,t as z,v as j,w as B,u as G,C as q,x as H,y as J,z as W}from"./index-dcea5d2f.js";import{r as F}from"./logs-9e380b83.js";import{S as C}from"./Select-29e929fc.js";const{useState:K,useRef:Q,useEffect:X,useCallback:Y}=_;function Z({value:t,...n}){const[o,c]=K(t),a=Q(t);X(()=>{a.current!==t&&c(t),a.current=t},[t]);const r=Y(u=>c(u.target.value),[c]);return e.jsx("input",{className:T.input,value:o,onChange:r,...n})}const ee="_root_165du_1",te="_section_165du_2",se="_wrapSwitch_165du_26",ne="_sep_165du_32",ae="_label_165du_45",d={root:ee,section:te,wrapSwitch:se,sep:ne,label:ae},le="_fieldset_1ghjp_1",oe="_input_1ghjp_9",ce="_cnt_1ghjp_9",v={fieldset:le,input:oe,cnt:ce};function re({OptionComponent:t,optionPropsList:n,selectedIndex:o,onChange:c}){const a=U("visually-hidden",v.input),r=u=>{c(u.target.value)};return e.jsx("fieldset",{className:v.fieldset,children:n.map((u,p)=>e.jsxs("label",{children:[e.jsx("input",{type:"radio",checked:o===p,name:"selection",value:p,"aria-labelledby":"traffic chart type "+p,onChange:r,className:a}),e.jsx("div",{className:v.cnt,children:e.jsx(t,{...u})})]},p))})}const{useMemo:ie}=_,de={plugins:{legend:{display:!1}},scales:{x:{display:!1,type:"category"},y:{display:!1,type:"linear"}}},L=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],ue=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],pe=L;function he({id:t}){const n=D.read(),o=ie(()=>({labels:pe,datasets:[{...w,...I[t].up,data:L},{...w,...I[t].down,data:ue}]}),[t]),c="chart-"+t;return V(n.Chart,c,o,null,de),e.jsx("div",{style:{width:100,padding:5},children:e.jsx("canvas",{id:c})})}const{useEffect:R,useState:ge,useCallback:h,useRef:fe,useMemo:xe}=_,me=[{id:0},{id:1},{id:2},{id:3}],je=[["debug","Debug"],["info","Info"],["warning","Warning"],["error","Error"],["silent","Silent"]],Ce=[["zh","中文"],["en","English"]],ve=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],_e=t=>({configs:A(t),apiConfig:k(t)}),Se=t=>({selectedChartStyleIndex:J(t),latencyTestUrl:W(t),apiConfig:k(t)}),ye=N(Se)(we),Le=N(_e)(be);function be({dispatch:t,configs:n,apiConfig:o}){return R(()=>{t(P(o))},[t,o]),e.jsx(ye,{configs:n})}function we({dispatch:t,configs:n,selectedChartStyleIndex:o,latencyTestUrl:c,apiConfig:a}){const[r,u]=ge(n),p=fe(n);R(()=>{p.current!==n&&u(n),p.current=n},[n]),h(()=>{t(z("apiConfig"))},[t]);const g=h((s,l)=>{u({...r,[s]:l})},[r]),$=h(s=>{const l="allow-lan",i=s;g(l,i),t(j(a,{"allow-lan":i}))},[a,t,g]),x=h(({name:s,value:l})=>{switch(s){case"mode":case"log-level":g(s,l),t(j(a,{[s]:l})),s==="log-level"&&F({...a,logLevel:l});break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(l!==""){const i=parseInt(l,10);if(i<0||i>65535)return}g(s,l);break;default:return}},[a,t,g]);h(s=>x(s.target),[x]);const{selectChartStyleIndex:E,updateAppConfig:S}=B(),O=h(s=>{const l=s.target,{name:i,value:b}=l;switch(i){case"port":case"socks-port":case"mixed-port":case"redir-port":{const m=parseInt(b,10);if(m<0||m>65535)return;t(j(a,{[i]:m}));break}case"latencyTestUrl":{S(i,b);break}default:throw new Error(`unknown input name ${i}`)}},[a,t,S]),M=xe(()=>{const s=r.mode;return typeof s=="string"&&s[0].toUpperCase()+s.slice(1)},[r.mode]),{t:f,i18n:y}=G();return e.jsxs("div",{children:[e.jsx(q,{title:f("Config")}),e.jsxs("div",{className:d.root,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:"Mode"}),e.jsx(C,{options:ve,selected:M,onChange:s=>x({name:"mode",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:"Log Level"}),e.jsx(C,{options:je,selected:r["log-level"],onChange:s=>x({name:"log-level",value:s.target.value})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:f("allow_lan_mixed")}),e.jsx("div",{className:d.wrapSwitch,children:e.jsx(H,{name:"allow-lan",checked:r["allow-lan"],onChange:$})})]})]}),e.jsx("div",{className:d.sep,children:e.jsx("div",{})}),e.jsxs("div",{className:d.section,children:[e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:f("latency_test_url")}),e.jsx(Z,{name:"latencyTestUrl",type:"text",value:c,onBlur:O})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:f("lang")}),e.jsx("div",{children:e.jsx(C,{options:Ce,selected:y.language,onChange:s=>y.changeLanguage(s.target.value)})})]}),e.jsxs("div",{children:[e.jsx("div",{className:d.label,children:f("chart_style")}),e.jsx(re,{OptionComponent:he,optionPropsList:me,selectedIndex:o,onChange:E})]})]})]})}export{Le as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-92103147.js b/FILES/etc/config/clash/clash-dashboard/assets/Connections-92103147.js deleted file mode 100644 index 4806620..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Connections-92103147.js +++ /dev/null @@ -1 +0,0 @@ -import{r as ce,R as be,c as Ge,a as oo,M as Bn,j,p as yn,m as wn,b as so,B as qe,u as En,d as io,e as uo,f as ao,C as lo,I as co,g as fo,S as po}from"./index-dcea5d2f.js";import{C as go,B as mo}from"./BaseModal-29d7cf7b.js";import{u as vo}from"./useRemainingViewPortHeight-054801fd.js";import{f as ho}from"./index-759f7e71.js";import{F as yo,p as wo,A as Ro}from"./Fab-8003d842.js";import{P as bo,a as Co}from"./play-263403e0.js";function xt(y){return E=>!!E.type&&E.type.tabsRole===y}const lt=xt("Tab"),Pt=xt("TabList"),It=xt("TabPanel");function So(y){return lt(y)||Pt(y)||It(y)}function Ct(y,E){return ce.Children.map(y,g=>g===null?null:So(g)?E(g):g.props&&g.props.children&&typeof g.props.children=="object"?ce.cloneElement(g,{...g.props,children:Ct(g.props.children,E)}):g)}function Tn(y,E){return ce.Children.forEach(y,g=>{g!==null&&(lt(g)||It(g)?E(g):g.props&&g.props.children&&typeof g.props.children=="object"&&(Pt(g)&&E(g),Tn(g.props.children,E)))})}function Fn(y){let E=0;return Tn(y,g=>{lt(g)&&E++}),E}function An(y){return y&&"getAttribute"in y}function Rn(y){return An(y)&&y.getAttribute("data-rttab")}function Fe(y){return An(y)&&y.getAttribute("aria-disabled")==="true"}let it;function xo(y){const E=y||(typeof window<"u"?window:void 0);try{it=!!(typeof E<"u"&&E.document&&E.document.activeElement)}catch{it=!1}}const Po={className:"react-tabs",focus:!1},kn=y=>{let E=ce.useRef([]),g=ce.useRef([]);const p=ce.useRef();function M(S,A){if(S<0||S>=u())return;const{onSelect:J,selectedIndex:we}=y;J(S,we,A)}function K(S){const A=u();for(let J=S+1;JS;)if(!Fe(X(A)))return A;return S}function oe(){const S=u();for(let A=0;A{let Ne=xe;if(Pt(xe)){let Re=0,Ke=!1;it==null&&xo(Be);const Ue=Be||(typeof window<"u"?window:void 0);it&&Ue&&(Ke=be.Children.toArray(xe.props.children).filter(lt).some((Xe,Me)=>Ue.document.activeElement===X(Me))),Ne=ce.cloneElement(xe,{children:Ct(xe.props.children,Xe=>{const Me=`tabs-${Re}`,Qe=ae===Re,Le={tabRef:Je=>{E.current[Me]=Je},id:g.current[Re],selected:Qe,focus:Qe&&(we||Ke)};return se&&(Le.selectedClassName=se),J&&(Le.disabledClassName=J),Re++,ce.cloneElement(Xe,Le)})})}else if(It(xe)){const Re={id:g.current[S],selected:ae===S};Y&&(Re.forceRender=Y),Ie&&(Re.selectedClassName=Ie),S++,Ne=ce.cloneElement(xe,Re)}return Ne})}function fe(S){const{direction:A,disableUpDownKeys:J,disableLeftRightKeys:we}=y;if(L(S.target)){let{selectedIndex:Y}=y,ae=!1,se=!1;(S.code==="Space"||S.keyCode===32||S.code==="Enter"||S.keyCode===13)&&(ae=!0,se=!1,ne(S)),!we&&(S.keyCode===37||S.code==="ArrowLeft")||!J&&(S.keyCode===38||S.code==="ArrowUp")?(A==="rtl"?Y=K(Y):Y=c(Y),ae=!0,se=!0):!we&&(S.keyCode===39||S.code==="ArrowRight")||!J&&(S.keyCode===40||S.code==="ArrowDown")?(A==="rtl"?Y=c(Y):Y=K(Y),ae=!0,se=!0):S.keyCode===35||S.code==="End"?(Y=U(),ae=!0,se=!0):(S.keyCode===36||S.code==="Home")&&(Y=oe(),ae=!0,se=!0),ae&&S.preventDefault(),se&&M(Y,S)}}function ne(S){let A=S.target;do if(L(A)){if(Fe(A))return;const J=[].slice.call(A.parentNode.children).filter(Rn).indexOf(A);M(J,S);return}while((A=A.parentNode)!=null)}function L(S){if(!Rn(S))return!1;let A=S.parentElement;do{if(A===p.current)return!0;if(A.getAttribute("data-rttabs"))break;A=A.parentElement}while(A);return!1}const{children:re,className:me,disabledTabClassName:ve,domRef:de,focus:$,forceRenderTabPanel:Ce,onSelect:ee,selectedIndex:ye,selectedTabClassName:We,selectedTabPanelClassName:ze,environment:_e,disableUpDownKeys:Se,disableLeftRightKeys:He,...je}={...Po,...y};return be.createElement("div",Object.assign({},je,{className:Ge(me),onClick:ne,onKeyDown:fe,ref:S=>{p.current=S,de&&de(S)},"data-rttabs":!0}),Q())};kn.propTypes={};const Io=0,st=1,Bo={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},Eo=y=>y.selectedIndex===null?st:Io,Bt=y=>{const{children:E,defaultFocus:g,defaultIndex:p,focusTabOnClick:M,onSelect:K,...c}={...Bo,...y},[oe,U]=ce.useState(g),[u]=ce.useState(Eo(c)),[X,Q]=ce.useState(u===st?p||0:null);if(ce.useEffect(()=>{U(!1)},[]),u===st){const L=Fn(E);ce.useEffect(()=>{if(X!=null){const re=Math.max(0,L-1);Q(Math.min(X,re))}},[L])}const fe=(L,re,me)=>{typeof K=="function"&&K(L,re,me)===!1||(M&&U(!0),u===st&&Q(L))};let ne={...y,...c};return ne.focus=oe,ne.onSelect=fe,X!=null&&(ne.selectedIndex=X),delete ne.defaultFocus,delete ne.defaultIndex,delete ne.focusTabOnClick,be.createElement(kn,ne,E)};Bt.propTypes={};Bt.tabsRole="Tabs";const To={className:"react-tabs__tab-list"},Et=y=>{const{children:E,className:g,...p}={...To,...y};return be.createElement("ul",Object.assign({},p,{className:Ge(g),role:"tablist"}),E)};Et.tabsRole="TabList";Et.propTypes={};const bt="react-tabs__tab",Fo={className:bt,disabledClassName:`${bt}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${bt}--selected`},ut=y=>{let E=ce.useRef();const{children:g,className:p,disabled:M,disabledClassName:K,focus:c,id:oe,selected:U,selectedClassName:u,tabIndex:X,tabRef:Q,...fe}={...Fo,...y};return ce.useEffect(()=>{U&&c&&E.current.focus()},[U,c]),be.createElement("li",Object.assign({},fe,{className:Ge(p,{[u]:U,[K]:M}),ref:ne=>{E.current=ne,Q&&Q(ne)},role:"tab",id:`tab${oe}`,"aria-selected":U?"true":"false","aria-disabled":M?"true":"false","aria-controls":`panel${oe}`,tabIndex:X||(U?"0":null),"data-rttab":!0}),g)};ut.propTypes={};ut.tabsRole="Tab";const bn="react-tabs__tab-panel",Ao={className:bn,forceRender:!1,selectedClassName:`${bn}--selected`},at=y=>{const{children:E,className:g,forceRender:p,id:M,selected:K,selectedClassName:c,...oe}={...Ao,...y};return be.createElement("div",Object.assign({},oe,{className:Ge(g,{[c]:K}),role:"tabpanel",id:`panel${M}`,"aria-labelledby":`tab${M}`}),p||K?E:null)};at.tabsRole="TabPanel";at.propTypes={};const ko="_placeHolder_mnszs_1",Go="_connQty_mnszs_10",Ho="_filterWrapper_mnszs_22",jo="_input_mnszs_27",Oo="_button_mnszs_43",Oe={placeHolder:ko,connQty:Go,filterWrapper:Ho,input:jo,button:Oo};var Gn={exports:{}},St={exports:{}};(function(y,E){(function(g,p){p(E,ce)})(oo,function(g,p){function M(e,t,n,r,s,o,i){try{var a=e[o](i),l=a.value}catch(d){return void n(d)}a.done?t(l):Promise.resolve(l).then(r,s)}function K(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var o=e.apply(t,n);function i(l){M(o,r,s,i,a,"next",l)}function a(l){M(o,r,s,i,a,"throw",l)}i(void 0)})}}function c(){return(c=Object.assign||function(e){for(var t=1;t=0||(s[n]=e[n]);return s}function U(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,r||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var u={init:"init"},X=function(e){var t=e.value;return t===void 0?"":t},Q=function(){return p.createElement(p.Fragment,null," ")},fe={Cell:X,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function ne(){for(var e=arguments.length,t=new Array(e),n=0;n(o=typeof o=="number"?o:1/0)){var i=s;s=o,o=i}return e.filter(function(a){return t.some(function(l){var d=a.values[l];return d>=s&&d<=o})})};Mt.autoRemove=function(e){return!e||typeof e[0]!="number"&&typeof e[1]!="number"};var De=Object.freeze({__proto__:null,text:kt,exactText:Gt,exactTextCase:Ht,includes:jt,includesAll:Ot,includesSome:Wt,includesValue:zt,exact:_t,equals:Nt,between:Mt});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Lt=function(e){e.stateReducers.push(Yn),e.useInstance.push(Zn)};function Yn(e,t,n,r){if(t.type===u.init)return c({filters:[]},e);if(t.type===u.resetFilters)return c({},e,{filters:r.initialState.filters||[]});if(t.type===u.setFilter){var s=t.columnId,o=t.filterValue,i=r.allColumns,a=r.filterTypes,l=i.find(function(b){return b.id===s});if(!l)throw new Error("React-Table: Could not find a column with id: "+s);var d=ae(l.filter,a||{},De),w=e.filters.find(function(b){return b.id===s}),m=de(o,w&&w.value);return se(d.autoRemove,m,l)?c({},e,{filters:e.filters.filter(function(b){return b.id!==s})}):c({},e,w?{filters:e.filters.map(function(b){return b.id===s?{id:s,value:m}:b})}:{filters:[].concat(e.filters,[{id:s,value:m}])})}if(t.type===u.setAllFilters){var v=t.filters,f=r.allColumns,h=r.filterTypes;return c({},e,{filters:de(v,e.filters).filter(function(b){var C=f.find(function(I){return I.id===b.id});return!se(ae(C.filter,h||{},De).autoRemove,b.value,C)})})}}function Zn(e){var t=e.data,n=e.rows,r=e.flatRows,s=e.rowsById,o=e.allColumns,i=e.filterTypes,a=e.manualFilters,l=e.defaultCanFilter,d=l!==void 0&&l,w=e.disableFilters,m=e.state.filters,v=e.dispatch,f=e.autoResetFilters,h=f===void 0||f,b=p.useCallback(function(x,G){v({type:u.setFilter,columnId:x,filterValue:G})},[v]),C=p.useCallback(function(x){v({type:u.setAllFilters,filters:x})},[v]);o.forEach(function(x){var G=x.id,z=x.accessor,T=x.defaultCanFilter,k=x.disableFilters;x.canFilter=z?A(k!==!0&&void 0,w!==!0&&void 0,!0):A(T,d,!1),x.setFilter=function(H){return b(x.id,H)};var V=m.find(function(H){return H.id===G});x.filterValue=V&&V.value});var I=p.useMemo(function(){if(a||!m.length)return[n,r,s];var x=[],G={};return[function z(T,k){k===void 0&&(k=0);var V=T;return(V=m.reduce(function(H,D){var N=D.id,q=D.value,B=o.find(function(te){return te.id===N});if(!B)return H;k===0&&(B.preFilteredRows=H);var _=ae(B.filter,i||{},De);return _?(B.filteredRows=_(H,[N],q),B.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+B.id+"."),H)},T)).forEach(function(H){x.push(H),G[H.id]=H,H.subRows&&(H.subRows=H.subRows&&H.subRows.length>0?z(H.subRows,k+1):H.subRows)}),V}(n),x,G]},[a,m,n,r,s,o,i]),W=I[0],P=I[1],R=I[2];p.useMemo(function(){o.filter(function(x){return!m.find(function(G){return G.id===x.id})}).forEach(function(x){x.preFilteredRows=W,x.filteredRows=W})},[W,m,o]);var O=$(h);ee(function(){O()&&v({type:u.resetFilters})},[v,a?null:t]),Object.assign(e,{preFilteredRows:n,preFilteredFlatRows:r,preFilteredRowsById:s,filteredRows:W,filteredFlatRows:P,filteredRowsById:R,rows:W,flatRows:P,rowsById:R,setFilter:b,setAllFilters:C})}Lt.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var Dt=function(e){e.stateReducers.push(er),e.useInstance.push(tr)};function er(e,t,n,r){if(t.type===u.resetGlobalFilter)return c({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===u.setGlobalFilter){var s=t.filterValue,o=r.userFilterTypes,i=ae(r.globalFilter,o||{},De),a=de(s,e.globalFilter);return se(i.autoRemove,a)?(e.globalFilter,oe(e,["globalFilter"])):c({},e,{globalFilter:a})}}function tr(e){var t=e.data,n=e.rows,r=e.flatRows,s=e.rowsById,o=e.allColumns,i=e.filterTypes,a=e.globalFilter,l=e.manualGlobalFilter,d=e.state.globalFilter,w=e.dispatch,m=e.autoResetGlobalFilter,v=m===void 0||m,f=e.disableGlobalFilter,h=p.useCallback(function(R){w({type:u.setGlobalFilter,filterValue:R})},[w]),b=p.useMemo(function(){if(l||d===void 0)return[n,r,s];var R=[],O={},x=ae(a,i||{},De);if(!x)return console.warn("Could not find a valid 'globalFilter' option."),n;o.forEach(function(z){var T=z.disableGlobalFilter;z.canFilter=A(T!==!0&&void 0,f!==!0&&void 0,!0)});var G=o.filter(function(z){return z.canFilter===!0});return[function z(T){return(T=x(T,G.map(function(k){return k.id}),d)).forEach(function(k){R.push(k),O[k.id]=k,k.subRows=k.subRows&&k.subRows.length?z(k.subRows):k.subRows}),T}(n),R,O]},[l,d,a,i,o,n,r,s,f]),C=b[0],I=b[1],W=b[2],P=$(v);ee(function(){P()&&w({type:u.resetGlobalFilter})},[w,l?null:t]),Object.assign(e,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:s,globalFilteredRows:C,globalFilteredFlatRows:I,globalFilteredRowsById:W,rows:C,flatRows:I,rowsById:W,setGlobalFilter:h,disableGlobalFilter:f})}function Vt(e,t){return t.reduce(function(n,r){return n+(typeof r=="number"?r:0)},0)}Dt.pluginName="useGlobalFilter";var $t=Object.freeze({__proto__:null,sum:Vt,min:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.min(t,n))}),t},max:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.max(t,n))}),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach(function(r){typeof r=="number"&&(t=Math.min(t,r),n=Math.max(n,r))}),t+".."+n},average:function(e){return Vt(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort(function(r,s){return r-s});return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),nr=[],rr={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var qt=function(e){e.getGroupByToggleProps=[or],e.stateReducers.push(sr),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.groupBy])}),e.visibleColumns.push(ir),e.useInstance.push(ar),e.prepareRow.push(lr)};qt.pluginName="useGroupBy";var or=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(r){r.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function sr(e,t,n,r){if(t.type===u.init)return c({groupBy:[]},e);if(t.type===u.resetGroupBy)return c({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===u.setGroupBy)return c({},e,{groupBy:t.value});if(t.type===u.toggleGroupBy){var s=t.columnId,o=t.value,i=o!==void 0?o:!e.groupBy.includes(s);return c({},e,i?{groupBy:[].concat(e.groupBy,[s])}:{groupBy:e.groupBy.filter(function(a){return a!==s})})}}function ir(e,t){var n=t.instance.state.groupBy,r=n.map(function(o){return e.find(function(i){return i.id===o})}).filter(Boolean),s=e.filter(function(o){return!n.includes(o.id)});return(e=[].concat(r,s)).forEach(function(o){o.isGrouped=n.includes(o.id),o.groupedIndex=n.indexOf(o.id)}),e}var ur={};function ar(e){var t=e.data,n=e.rows,r=e.flatRows,s=e.rowsById,o=e.allColumns,i=e.flatHeaders,a=e.groupByFn,l=a===void 0?Kt:a,d=e.manualGroupBy,w=e.aggregations,m=w===void 0?ur:w,v=e.plugins,f=e.state.groupBy,h=e.dispatch,b=e.autoResetGroupBy,C=b===void 0||b,I=e.disableGroupBy,W=e.defaultCanGroupBy,P=e.getHooks;ve(v,["useColumnOrder","useFilters"],"useGroupBy");var R=$(e);o.forEach(function(B){var _=B.accessor,te=B.defaultGroupBy,pe=B.disableGroupBy;B.canGroupBy=_?A(B.canGroupBy,pe!==!0&&void 0,I!==!0&&void 0,!0):A(B.canGroupBy,te,W,!1),B.canGroupBy&&(B.toggleGroupBy=function(){return e.toggleGroupBy(B.id)}),B.Aggregated=B.Aggregated||B.Cell});var O=p.useCallback(function(B,_){h({type:u.toggleGroupBy,columnId:B,value:_})},[h]),x=p.useCallback(function(B){h({type:u.setGroupBy,value:B})},[h]);i.forEach(function(B){B.getGroupByToggleProps=L(P().getGroupByToggleProps,{instance:R(),header:B})});var G=p.useMemo(function(){if(d||!f.length)return[n,r,s,nr,rr,r,s];var B=f.filter(function(le){return o.find(function(Ee){return Ee.id===le})}),_=[],te={},pe=[],F={},Z=[],ie={},ge=function le(Ee,Pe,fn){if(Pe===void 0&&(Pe=0),Pe===B.length)return Ee.map(function(Ze){return c({},Ze,{depth:Pe})});var yt=B[Pe],Jr=l(Ee,yt);return Object.entries(Jr).map(function(Ze,Yr){var pn=Ze[0],et=Ze[1],tt=yt+":"+pn,gn=le(et,Pe+1,tt=fn?fn+">"+tt:tt),mn=Pe?we(et,"leafRows"):et,Zr=function(he,wt,to){var nt={};return o.forEach(function(ue){if(B.includes(ue.id))nt[ue.id]=wt[0]?wt[0].values[ue.id]:null;else{var vn=typeof ue.aggregate=="function"?ue.aggregate:m[ue.aggregate]||$t[ue.aggregate];if(vn){var no=wt.map(function(rt){return rt.values[ue.id]}),ro=he.map(function(rt){var Rt=rt.values[ue.id];if(!to&&ue.aggregateValue){var hn=typeof ue.aggregateValue=="function"?ue.aggregateValue:m[ue.aggregateValue]||$t[ue.aggregateValue];if(!hn)throw console.info({column:ue}),new Error("React Table: Invalid column.aggregateValue option for column listed above");Rt=hn(Rt,rt,ue)}return Rt});nt[ue.id]=vn(ro,no)}else{if(ue.aggregate)throw console.info({column:ue}),new Error("React Table: Invalid column.aggregate option for column listed above");nt[ue.id]=null}}}),nt}(mn,et,Pe),eo={id:tt,isGrouped:!0,groupByID:yt,groupByVal:pn,values:Zr,subRows:gn,leafRows:mn,depth:Pe,index:Yr};return gn.forEach(function(he){_.push(he),te[he.id]=he,he.isGrouped?(pe.push(he),F[he.id]=he):(Z.push(he),ie[he.id]=he)}),eo})}(n);return ge.forEach(function(le){_.push(le),te[le.id]=le,le.isGrouped?(pe.push(le),F[le.id]=le):(Z.push(le),ie[le.id]=le)}),[ge,_,te,pe,F,Z,ie]},[d,f,n,r,s,o,m,l]),z=G[0],T=G[1],k=G[2],V=G[3],H=G[4],D=G[5],N=G[6],q=$(C);ee(function(){q()&&h({type:u.resetGroupBy})},[h,d?null:t]),Object.assign(e,{preGroupedRows:n,preGroupedFlatRow:r,preGroupedRowsById:s,groupedRows:z,groupedFlatRows:T,groupedRowsById:k,onlyGroupedFlatRows:V,onlyGroupedRowsById:H,nonGroupedFlatRows:D,nonGroupedRowsById:N,rows:z,flatRows:T,rowsById:k,toggleGroupBy:O,setGroupBy:x})}function lr(e){e.allCells.forEach(function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&((n=e.subRows)==null?void 0:n.length)})}function Kt(e,t){return e.reduce(function(n,r,s){var o=""+r.values[t];return n[o]=Array.isArray(n[o])?n[o]:[],n[o].push(r),n},{})}var Ut=/([0-9]+)/gm;function ft(e,t){return e===t?0:e>t?1:-1}function Ve(e,t,n){return[e.values[n],t.values[n]]}function Xt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}var cr=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=Ve(e,t,n),s=r[0],o=r[1];for(s=Xt(s),o=Xt(o),s=s.split(Ut).filter(Boolean),o=o.split(Ut).filter(Boolean);s.length&&o.length;){var i=s.shift(),a=o.shift(),l=parseInt(i,10),d=parseInt(a,10),w=[l,d].sort();if(isNaN(w[0])){if(i>a)return 1;if(a>i)return-1}else{if(isNaN(w[1]))return isNaN(l)?-1:1;if(l>d)return 1;if(d>l)return-1}}return s.length-o.length},datetime:function(e,t,n){var r=Ve(e,t,n),s=r[0],o=r[1];return ft(s=s.getTime(),o=o.getTime())},basic:function(e,t,n){var r=Ve(e,t,n);return ft(r[0],r[1])},string:function(e,t,n){var r=Ve(e,t,n),s=r[0],o=r[1];for(s=s.split("").filter(Boolean),o=o.split("").filter(Boolean);s.length&&o.length;){var i=s.shift(),a=o.shift(),l=i.toLowerCase(),d=a.toLowerCase();if(l>d)return 1;if(d>l)return-1;if(i>a)return 1;if(a>i)return-1}return s.length-o.length},number:function(e,t,n){var r=Ve(e,t,n),s=r[0],o=r[1],i=/[^0-9.]/gi;return ft(s=Number(String(s).replace(i,"")),o=Number(String(o).replace(i,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",fe.sortType="alphanumeric",fe.sortDescFirst=!1;var Qt=function(e){e.getSortByToggleProps=[dr],e.stateReducers.push(fr),e.useInstance.push(pr)};Qt.pluginName="useSortBy";var dr=function(e,t){var n=t.instance,r=t.column,s=n.isMultiSortEvent,o=s===void 0?function(i){return i.shiftKey}:s;return[e,{onClick:r.canSort?function(i){i.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(i))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function fr(e,t,n,r){if(t.type===u.init)return c({sortBy:[]},e);if(t.type===u.resetSortBy)return c({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===u.clearSortBy)return c({},e,{sortBy:e.sortBy.filter(function(R){return R.id!==t.columnId})});if(t.type===u.setSortBy)return c({},e,{sortBy:t.sortBy});if(t.type===u.toggleSortBy){var s,o=t.columnId,i=t.desc,a=t.multi,l=r.allColumns,d=r.disableMultiSort,w=r.disableSortRemove,m=r.disableMultiRemove,v=r.maxMultiSortColCount,f=v===void 0?Number.MAX_SAFE_INTEGER:v,h=e.sortBy,b=l.find(function(R){return R.id===o}).sortDescFirst,C=h.find(function(R){return R.id===o}),I=h.findIndex(function(R){return R.id===o}),W=i!=null,P=[];return(s=!d&&a?C?"toggle":"add":I!==h.length-1||h.length!==1?"replace":C?"toggle":"replace")!="toggle"||w||W||a&&m||!(C&&C.desc&&!b||!C.desc&&b)||(s="remove"),s==="replace"?P=[{id:o,desc:W?i:b}]:s==="add"?(P=[].concat(h,[{id:o,desc:W?i:b}])).splice(0,P.length-f):s==="toggle"?P=h.map(function(R){return R.id===o?c({},R,{desc:W?i:!C.desc}):R}):s==="remove"&&(P=h.filter(function(R){return R.id!==o})),c({},e,{sortBy:P})}}function pr(e){var t=e.data,n=e.rows,r=e.flatRows,s=e.allColumns,o=e.orderByFn,i=o===void 0?Jt:o,a=e.sortTypes,l=e.manualSortBy,d=e.defaultCanSort,w=e.disableSortBy,m=e.flatHeaders,v=e.state.sortBy,f=e.dispatch,h=e.plugins,b=e.getHooks,C=e.autoResetSortBy,I=C===void 0||C;ve(h,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var W=p.useCallback(function(T){f({type:u.setSortBy,sortBy:T})},[f]),P=p.useCallback(function(T,k,V){f({type:u.toggleSortBy,columnId:T,desc:k,multi:V})},[f]),R=$(e);m.forEach(function(T){var k=T.accessor,V=T.canSort,H=T.disableSortBy,D=T.id,N=k?A(H!==!0&&void 0,w!==!0&&void 0,!0):A(d,V,!1);T.canSort=N,T.canSort&&(T.toggleSortBy=function(B,_){return P(T.id,B,_)},T.clearSortBy=function(){f({type:u.clearSortBy,columnId:T.id})}),T.getSortByToggleProps=L(b().getSortByToggleProps,{instance:R(),column:T});var q=v.find(function(B){return B.id===D});T.isSorted=!!q,T.sortedIndex=v.findIndex(function(B){return B.id===D}),T.isSortedDesc=T.isSorted?q.desc:void 0});var O=p.useMemo(function(){if(l||!v.length)return[n,r];var T=[],k=v.filter(function(V){return s.find(function(H){return H.id===V.id})});return[function V(H){var D=i(H,k.map(function(N){var q=s.find(function(te){return te.id===N.id});if(!q)throw new Error("React-Table: Could not find a column with id: "+N.id+" while sorting");var B=q.sortType,_=J(B)||(a||{})[B]||cr[B];if(!_)throw new Error("React-Table: Could not find a valid sortType of '"+B+"' for column '"+N.id+"'.");return function(te,pe){return _(te,pe,N.id,N.desc)}}),k.map(function(N){var q=s.find(function(B){return B.id===N.id});return q&&q.sortInverted?N.desc:!N.desc}));return D.forEach(function(N){T.push(N),N.subRows&&N.subRows.length!==0&&(N.subRows=V(N.subRows))}),D}(n),T]},[l,v,n,r,s,i,a]),x=O[0],G=O[1],z=$(I);ee(function(){z()&&f({type:u.resetSortBy})},[l?null:t]),Object.assign(e,{preSortedRows:n,preSortedFlatRows:r,sortedRows:x,sortedFlatRows:G,rows:x,flatRows:G,setSortBy:W,toggleSortBy:P})}function Jt(e,t,n){return[].concat(e).sort(function(r,s){for(var o=0;oe.pageIndex?a=s===-1?o.length>=e.pageSize:i-1),a?c({},e,{pageIndex:i}):e}if(t.type===u.setPageSize){var l=t.pageSize,d=e.pageSize*e.pageIndex;return c({},e,{pageIndex:Math.floor(d/l),pageSize:l})}}function mr(e){var t=e.rows,n=e.autoResetPage,r=n===void 0||n,s=e.manualExpandedKey,o=s===void 0?"expanded":s,i=e.plugins,a=e.pageCount,l=e.paginateExpandedRows,d=l===void 0||l,w=e.expandSubRows,m=w===void 0||w,v=e.state,f=v.pageSize,h=v.pageIndex,b=v.expanded,C=v.globalFilter,I=v.filters,W=v.groupBy,P=v.sortBy,R=e.dispatch,O=e.data,x=e.manualPagination;ve(i,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var G=$(r);ee(function(){G()&&R({type:u.resetPage})},[R,x?null:O,C,I,W,P]);var z=x?a:Math.ceil(t.length/f),T=p.useMemo(function(){return z>0?[].concat(new Array(z)).fill(null).map(function(_,te){return te}):[]},[z]),k=p.useMemo(function(){var _;if(x)_=t;else{var te=f*h,pe=te+f;_=t.slice(te,pe)}return d?_:Y(_,{manualExpandedKey:o,expanded:b,expandSubRows:m})},[m,b,o,x,h,f,d,t]),V=h>0,H=z===-1?k.length>=f:h-1&&o.push(s.splice(l,1)[0])};s.length&&r.length;)i();return[].concat(o,s)}function zr(e){var t=e.dispatch;e.setColumnOrder=p.useCallback(function(n){return t({type:u.setColumnOrder,columnOrder:n})},[t])}sn.pluginName="useColumnOrder",fe.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var un=function(e){e.getResizerProps=[_r],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(Nr),e.useInstance.push(Lr),e.useInstanceBeforeDimensions.push(Mr)},_r=function(e,t){var n=t.instance,r=t.header,s=n.dispatch,o=function(i,a){var l=!1;if(i.type==="touchstart"){if(i.touches&&i.touches.length>1)return;l=!0}var d,w,m=function(P){var R=[];return function O(x){x.columns&&x.columns.length&&x.columns.map(O),R.push(x)}(P),R}(a).map(function(P){return[P.id,P.totalWidth]}),v=l?Math.round(i.touches[0].clientX):i.clientX,f=function(){window.cancelAnimationFrame(d),d=null,s({type:u.columnDoneResizing})},h=function(){window.cancelAnimationFrame(d),d=null,s({type:u.columnResizing,clientX:w})},b=function(P){w=P,d||(d=window.requestAnimationFrame(h))},C={mouse:{moveEvent:"mousemove",moveHandler:function(P){return b(P.clientX)},upEvent:"mouseup",upHandler:function(P){document.removeEventListener("mousemove",C.mouse.moveHandler),document.removeEventListener("mouseup",C.mouse.upHandler),f()}},touch:{moveEvent:"touchmove",moveHandler:function(P){return P.cancelable&&(P.preventDefault(),P.stopPropagation()),b(P.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(P){document.removeEventListener(C.touch.moveEvent,C.touch.moveHandler),document.removeEventListener(C.touch.upEvent,C.touch.moveHandler),f()}}},I=l?C.touch:C.mouse,W=!!function(){if(typeof Be=="boolean")return Be;var P=!1;try{var R={get passive(){return P=!0,!1}};window.addEventListener("test",null,R),window.removeEventListener("test",null,R)}catch{P=!1}return Be=P}()&&{passive:!1};document.addEventListener(I.moveEvent,I.moveHandler,W),document.addEventListener(I.upEvent,I.upHandler,W),s({type:u.columnStartResizing,columnId:a.id,columnWidth:a.totalWidth,headerIdWidths:m,clientX:v})};return[e,{onMouseDown:function(i){return i.persist()||o(i,r)},onTouchStart:function(i){return i.persist()||o(i,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Nr(e,t){if(t.type===u.init)return c({columnResizing:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{columnResizing:{columnWidths:{}}});if(t.type===u.columnStartResizing){var n=t.clientX,r=t.columnId,s=t.columnWidth,o=t.headerIdWidths;return c({},e,{columnResizing:c({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:s,isResizingColumn:r})})}if(t.type===u.columnResizing){var i=t.clientX,a=e.columnResizing,l=a.startX,d=a.columnWidth,w=a.headerIdWidths,m=(i-l)/d,v={};return(w===void 0?[]:w).forEach(function(f){var h=f[0],b=f[1];v[h]=Math.max(b+b*m,0)}),c({},e,{columnResizing:c({},e.columnResizing,{columnWidths:c({},e.columnResizing.columnWidths,{},v)})})}return t.type===u.columnDoneResizing?c({},e,{columnResizing:c({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}un.pluginName="useResizeColumns";var Mr=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,s=e.state.columnResizing,o=$(e);t.forEach(function(i){var a=A(i.disableResizing!==!0&&void 0,n!==!0&&void 0,!0);i.canResize=a,i.width=s.columnWidths[i.id]||i.originalWidth||i.width,i.isResizing=s.isResizingColumn===i.id,a&&(i.getResizerProps=L(r().getResizerProps,{instance:o(),header:i}))})};function Lr(e){var t=e.plugins,n=e.dispatch,r=e.autoResetResize,s=r===void 0||r,o=e.columns;ve(t,["useAbsoluteLayout"],"useResizeColumns");var i=$(s);ee(function(){i()&&n({type:u.resetResize})},[o]);var a=p.useCallback(function(){return n({type:u.resetResize})},[n]);Object.assign(e,{resetResizing:a})}var pt={position:"absolute",top:0},an=function(e){e.getTableBodyProps.push(Ye),e.getRowProps.push(Ye),e.getHeaderGroupProps.push(Ye),e.getFooterGroupProps.push(Ye),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},pt,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},pt,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},pt,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})};an.pluginName="useAbsoluteLayout";var Ye=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},gt={display:"inline-block",boxSizing:"border-box"},mt=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},ln=function(e){e.getRowProps.push(mt),e.getHeaderGroupProps.push(mt),e.getFooterGroupProps.push(mt),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:c({},gt,{width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:c({},gt,{width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:c({},gt,{width:r.totalWidth+"px"})}]})};function cn(e){e.getTableProps.push(Dr),e.getRowProps.push(vt),e.getHeaderGroupProps.push(vt),e.getFooterGroupProps.push(vt),e.getHeaderProps.push(Vr),e.getCellProps.push($r),e.getFooterProps.push(qr)}ln.pluginName="useBlockLayout",cn.pluginName="useFlexLayout";var Dr=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},vt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Vr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},$r=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},qr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function dn(e){e.stateReducers.push(Qr),e.getTableProps.push(Kr),e.getHeaderProps.push(Ur),e.getRowProps.push(Xr)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",dn.pluginName="useGridLayout";var Kr=function(e,t){var n=t.instance;return[e,{style:{display:"grid",gridTemplateColumns:n.visibleColumns.map(function(r){var s;return n.state.gridLayout.columnWidths[r.id]?n.state.gridLayout.columnWidths[r.id]+"px":(s=n.state.columnResizing)!=null&&s.isResizingColumn?n.state.gridLayout.startWidths[r.id]+"px":typeof r.width=="number"?r.width+"px":r.width}).join(" ")}}]},Ur=function(e,t){var n=t.column;return[e,{id:"header-cell-"+n.id,style:{position:"sticky",gridColumn:"span "+n.totalVisibleHeaderCount}}]},Xr=function(e,t){var n=t.row;return n.isExpanded?[e,{style:{gridColumn:"1 / "+(n.cells.length+1)}}]:[e,{}]};function Qr(e,t,n,r){if(t.type===u.init)return c({gridLayout:{columnWidths:{}}},e);if(t.type===u.resetResize)return c({},e,{gridLayout:{columnWidths:{}}});if(t.type===u.columnStartResizing){var s=t.columnId,o=t.headerIdWidths,i=ht(s);if(i!==void 0){var a=r.visibleColumns.reduce(function(R,O){var x;return c({},R,((x={})[O.id]=ht(O.id),x))},{}),l=r.visibleColumns.reduce(function(R,O){var x;return c({},R,((x={})[O.id]=O.minWidth,x))},{}),d=r.visibleColumns.reduce(function(R,O){var x;return c({},R,((x={})[O.id]=O.maxWidth,x))},{}),w=o.map(function(R){var O=R[0];return[O,ht(O)]});return c({},e,{gridLayout:c({},e.gridLayout,{startWidths:a,minWidths:l,maxWidths:d,headerIdGridWidths:w,columnWidth:i})})}return e}if(t.type===u.columnResizing){var m=t.clientX,v=e.columnResizing.startX,f=e.gridLayout,h=f.columnWidth,b=f.minWidths,C=f.maxWidths,I=f.headerIdGridWidths,W=(m-v)/h,P={};return(I===void 0?[]:I).forEach(function(R){var O=R[0],x=R[1];P[O]=Math.min(Math.max(b[O],x+x*W),C[O])}),c({},e,{gridLayout:c({},e.gridLayout,{columnWidths:c({},e.gridLayout.columnWidths,{},P)})})}return t.type===u.columnDoneResizing?c({},e,{gridLayout:c({},e.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function ht(e){var t,n=(t=document.getElementById("header-cell-"+e))==null?void 0:t.offsetWidth;if(n!==void 0)return n}g._UNSTABLE_usePivotColumns=Zt,g.actions=u,g.defaultColumn=fe,g.defaultGroupByFn=Kt,g.defaultOrderByFn=Jt,g.defaultRenderer=X,g.emptyRenderer=Q,g.ensurePluginOrder=ve,g.flexRender=We,g.functionalUpdate=de,g.loopHooks=me,g.makePropGetter=L,g.makeRenderer=ye,g.reduceHooks=re,g.safeUseLayoutEffect=Ce,g.useAbsoluteLayout=an,g.useAsyncDebounce=function(e,t){t===void 0&&(t=0);var n=p.useRef({}),r=$(e),s=$(t);return p.useCallback(function(){var o=K(regeneratorRuntime.mark(function i(){var a,l,d,w=arguments;return regeneratorRuntime.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(a=w.length,l=new Array(a),d=0;d1?t-1:0),r=1;ry.accessor!=="process");function Ko(y){switch(y.column.id){case"start":return ho(y.value,0);case"download":case"upload":return yn(y.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return yn(y.value)+"/s";default:return y.value}}const Uo={id:"id",desc:!0},Xo={sortBy:[Uo],hiddenColumns:["id"]};function Qo({data:y}){const E=be.useContext(Bn),{getTableProps:g,headerGroups:p,rows:M,prepareRow:K}=Cn.useTable({columns:E.hasProcessPath?$o:qo,data:y,initialState:Xo,autoResetSortBy:!1},Cn.useSortBy);return j.jsx("div",{...g(),style:{"--col-count":E.hasProcessPath?"12":"11"},children:p.map((c,oe)=>j.jsxs("div",{...c.getHeaderGroupProps(),className:Te.tr,children:[c.headers.map((U,u)=>j.jsxs("div",{...U.getHeaderProps(U.getSortByToggleProps()),className:Te.th,children:[j.jsx("span",{children:U.render("Header")}),j.jsx("span",{className:Te.sortIconContainer,children:U.isSorted?j.jsx("span",{className:U.isSortedDesc?"":Te.rotate180,children:j.jsx(go,{size:16})}):null})]},u)),M.map((U,u)=>(K(U),U.cells.map((X,Q)=>j.jsx("div",{...X.getCellProps(),className:Ge(Te.td,u%2===0?Te.odd:!1,E.hasProcessPath?Q>=2&&Q<=5?Te.du:!1:Q>=1&&Q<=4?Te.du:!1),children:Ko(X)},Q))))]},oe))})}const Jo="_overlay_148w6_1",Yo="_cnt_148w6_5",Zo="_afterOpen_148w6_15",es="_btngrp_148w6_20",ot={overlay:Jo,cnt:Yo,afterOpen:Zo,btngrp:es},{useRef:ts,useCallback:ns,useMemo:rs}=be;function os({isOpen:y,onRequestClose:E,primaryButtonOnTap:g}){const p=ts(null),M=ns(()=>{p.current.focus()},[]),K=rs(()=>({base:Ge(wn.content,ot.cnt),afterOpen:ot.afterOpen,beforeClose:""}),[]);return j.jsxs(so,{isOpen:y,onRequestClose:E,onAfterOpen:M,className:K,overlayClassName:Ge(wn.overlay,ot.overlay),children:[j.jsx("p",{children:"Are you sure you want to close all connections?"}),j.jsxs("div",{className:ot.btngrp,children:[j.jsx(qe,{onClick:g,ref:p,children:"I'm sure"}),j.jsx("div",{style:{width:20}}),j.jsx(qe,{onClick:E,children:"No"})]})]})}function ss({setFilterIpStr:y,connIPset:E}){const{t:g}=En();return j.jsxs("div",{className:"src-ips",children:[j.jsx(qe,{onClick:()=>y(""),kind:"minimal",children:g("All")}),E.map((p,M)=>j.jsx(qe,{onClick:()=>y(p),kind:"minimal",children:p},M))]})}const{useEffect:is,useState:Ae,useRef:us,useCallback:ke}=be,Sn=30;function as(y){const E={};for(let g=0;gg.sourceIP===E)}function xn(y,E,g){let p=y;return E!==""&&(p=y.filter(M=>[M.host,M.sourceIP,M.sourcePort,M.destinationIP,M.chains,M.rule,M.type,M.network,M.processPath].some(K=>cs(K,E)))),g!==""&&(p=ds(p,g)),p}function fs(y){return Array.from(new Set(y.map(E=>E.sourceIP))).sort()}function ps(y,E,g,p){const{id:M,metadata:K,upload:c,download:oe,start:U,chains:u,rule:X,rulePayload:Q}=y,{host:fe,destinationPort:ne,destinationIP:L,network:re,type:me,sourceIP:ve,sourcePort:de}=K,$=K.processPath;p.hasProcessPath===!1&&typeof $<"u"&&(p.hasProcessPath=!0);let Ce=fe;Ce===""&&(Ce=L);const ee=E[M];return{id:M,upload:c,download:oe,start:g-new Date(U).valueOf(),chains:u.reverse().join(" / "),rule:Q?`${X}(${Q})`:X,...K,host:`${Ce}:${ne}`,type:`${me}(${re})`,source:`${ve}:${de}`,downloadSpeedCurr:oe-(ee?ee.download:0),uploadSpeedCurr:c-(ee?ee.upload:0),process:ls($)}}function Pn(y){return y.length>0?j.jsx(Qo,{data:y}):j.jsx("div",{className:Oe.placeHolder,children:j.jsx(po,{width:200,height:200,c1:"var(--color-text)"})})}function In({qty:y}){return y<100?""+y:"99+"}function gs({apiConfig:y}){const[E,g]=vo(),[p,M]=Ae(!1),[K,c]=Ae([]),[oe,U]=Ae([]),[u,X]=Ae(""),[Q,fe]=Ae(""),ne=xn(K,u,Q),L=xn(oe,u,Q),re=fs(K),[me,ve]=Ae(!1),de=ke(()=>{M(!0)},[]),$=ke(()=>{M(!1)},[]),Ce=ke(()=>ve(!0),[]),ee=ke(()=>ve(!1),[]),[ye,We]=Ae(!1),ze=ke(()=>We(A=>!A),[]),_e=ke(()=>{uo(y),ee()},[y,ee]),Se=us(K),He=be.useContext(Bn),je=ke(({connections:A})=>{const J=as(Se.current),we=Date.now(),Y=A.map(se=>ps(se,J,we,He)),ae=[];for(const se of Se.current)Y.findIndex(Be=>Be.id===se.id)<0&&ae.push(se);U(se=>[...ae,...se].slice(0,101)),Y&&(Y.length!==0||Se.current.length!==0)&&!ye?(Se.current=Y,c(Y)):Se.current=Y},[ye,He]);is(()=>ao(y,je),[y,je]);const{t:S}=En();return j.jsxs("div",{children:[j.jsx(lo,{title:`${S("Connections")} : ${Q}`}),j.jsxs(mo,{isOpen:p,onRequestClose:$,children:[j.jsx("span",{children:S("pleaseSelectSourceIP")}),j.jsx("hr",{}),j.jsx(ss,{connIPset:re,setFilterIpStr:fe})]}),j.jsxs(Bt,{children:[j.jsxs("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[j.jsxs(Et,{children:[j.jsxs(ut,{children:[j.jsx("span",{children:S("Active")}),j.jsx("span",{className:Oe.connQty,children:In({qty:ne.length})})]}),j.jsxs(ut,{children:[j.jsx("span",{children:S("Closed")}),j.jsx("span",{className:Oe.connQty,children:In({qty:L.length})})]})]}),j.jsxs("div",{className:Oe.filterWrapper,children:[j.jsx("input",{type:"text",name:"filter",autoComplete:"off",className:Oe.input,placeholder:"Filter By Keyword",onChange:A=>X(A.target.value)}),j.jsx(qe,{className:Oe.button,onClick:de,children:S("filterByIP")})]})]}),j.jsx("div",{ref:E,style:{padding:30,paddingBottom:Sn,paddingTop:0},children:j.jsxs("div",{style:{height:g-Sn,overflow:"auto"},children:[j.jsxs(at,{children:[Pn(ne),j.jsx(yo,{icon:ye?j.jsx(bo,{size:16}):j.jsx(Co,{size:16}),mainButtonStyles:ye?{background:"#e74c3c"}:{},style:wo,text:S(ye?"Resume Refresh":"Pause Refresh"),onClick:ze,children:j.jsx(Ro,{text:"Close All Connections",onClick:Ce,children:j.jsx(co,{size:10})})})]}),j.jsx(at,{children:Pn(L)})]})}),j.jsx(os,{isOpen:me,primaryButtonOnTap:_e,onRequestClose:ee})]})]})}const ms=y=>({apiConfig:fo(y)}),Cs=io(ms)(gs);export{Cs as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-adb3a6d0.js b/FILES/etc/config/clash/clash-dashboard/assets/Connections-adb3a6d0.js new file mode 100644 index 0000000..a406c2b --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Connections-adb3a6d0.js @@ -0,0 +1,22 @@ +import{r as y,R as b,c as z,p as J,M as et,j as S,m as je,a as vt,B as Ne,b as ht,d as Rt,f as wt,u as _t,C as $t,I as yt,g as xt,S as Ft}from"./index-17fa2fa5.js";import{u as Pt}from"./useRemainingViewPortHeight-0cb185fe.js";import{f as At}from"./index-b2af8b42.js";import{C as Mt}from"./chevron-down-4da23e9b.js";import{F as It,p as Vt,A as bt}from"./Fab-aebb033d.js";import{P as Et,a as Dt}from"./play-3d48a080.js";function Pe(e){return n=>!!n.type&&n.type.tabsRole===e}const ue=Pe("Tab"),Ae=Pe("TabList"),Me=Pe("TabPanel");function Ht(e){return ue(e)||Ae(e)||Me(e)}function we(e,n){return y.Children.map(e,t=>t===null?null:Ht(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"?y.cloneElement(t,{...t.props,children:we(t.props.children,n)}):t)}function tt(e,n){return y.Children.forEach(e,t=>{t!==null&&(ue(t)||Me(t)?n(t):t.props&&t.props.children&&typeof t.props.children=="object"&&(Ae(t)&&n(t),tt(t.props.children,n)))})}function nt(e){let n=0;return tt(e,t=>{ue(t)&&n++}),n}function ot(e){return e&&"getAttribute"in e}function Be(e){return ot(e)&&e.getAttribute("data-rttab")}function q(e){return ot(e)&&e.getAttribute("aria-disabled")==="true"}let re;function Lt(e){const n=e||(typeof window<"u"?window:void 0);try{re=!!(typeof n<"u"&&n.document&&n.document.activeElement)}catch{re=!1}}const Gt={className:"react-tabs",focus:!1},rt=e=>{let n=y.useRef([]),t=y.useRef([]);const o=y.useRef();function r(C,R){if(C<0||C>=d())return;const{onSelect:F,selectedIndex:U}=e;F(C,U,R)}function l(C){const R=d();for(let F=C+1;FC;)if(!q(s(R)))return R;return C}function u(){const C=d();for(let R=0;R{let de=B;if(Ae(B)){let O=0,Oe=!1;re==null&&Lt(Ge);const Te=Ge||(typeof window<"u"?window:void 0);re&&Te&&(Oe=b.Children.toArray(B.props.children).filter(ue).some((ke,ge)=>Te.document.activeElement===s(ge))),de=y.cloneElement(B,{children:we(B.props.children,ke=>{const ge=`tabs-${O}`,ze=E===O,ce={tabRef:St=>{n.current[ge]=St},id:t.current[O],selected:ze,focus:ze&&(U||Oe)};return D&&(ce.selectedClassName=D),F&&(ce.disabledClassName=F),O++,y.cloneElement(ke,ce)})})}else if(Me(B)){const O={id:t.current[C],selected:E===C};A&&(O.forceRender=A),Le&&(O.selectedClassName=Le),C++,de=y.cloneElement(B,O)}return de})}function f(C){const{direction:R,disableUpDownKeys:F,disableLeftRightKeys:U}=e;if(m(C.target)){let{selectedIndex:A}=e,E=!1,D=!1;(C.code==="Space"||C.keyCode===32||C.code==="Enter"||C.keyCode===13)&&(E=!0,D=!1,c(C)),!U&&(C.keyCode===37||C.code==="ArrowLeft")||!F&&(C.keyCode===38||C.code==="ArrowUp")?(R==="rtl"?A=l(A):A=i(A),E=!0,D=!0):!U&&(C.keyCode===39||C.code==="ArrowRight")||!F&&(C.keyCode===40||C.code==="ArrowDown")?(R==="rtl"?A=i(A):A=l(A),E=!0,D=!0):C.keyCode===35||C.code==="End"?(A=a(),E=!0,D=!0):(C.keyCode===36||C.code==="Home")&&(A=u(),E=!0,D=!0),E&&C.preventDefault(),D&&r(A,C)}}function c(C){let R=C.target;do if(m(R)){if(q(R))return;const F=[].slice.call(R.parentNode.children).filter(Be).indexOf(R);r(F,C);return}while((R=R.parentNode)!=null)}function m(C){if(!Be(C))return!1;let R=C.parentElement;do{if(R===o.current)return!0;if(R.getAttribute("data-rttabs"))break;R=R.parentElement}while(R);return!1}const{children:p,className:h,disabledTabClassName:w,domRef:P,focus:_,forceRenderTabPanel:$,onSelect:x,selectedIndex:I,selectedTabClassName:L,selectedTabPanelClassName:K,environment:He,disableUpDownKeys:N,disableLeftRightKeys:ae,...G}={...Gt,...e};return b.createElement("div",Object.assign({},G,{className:z(h),onClick:c,onKeyDown:f,ref:C=>{o.current=C,P&&P(C)},"data-rttabs":!0}),g())};rt.propTypes={};const Ot=0,oe=1,Tt={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},kt=e=>e.selectedIndex===null?oe:Ot,Ie=e=>{const{children:n,defaultFocus:t,defaultIndex:o,focusTabOnClick:r,onSelect:l,...i}={...Tt,...e},[u,a]=y.useState(t),[d]=y.useState(kt(i)),[s,g]=y.useState(d===oe?o||0:null);if(y.useEffect(()=>{a(!1)},[]),d===oe){const m=nt(n);y.useEffect(()=>{if(s!=null){const p=Math.max(0,m-1);g(Math.min(s,p))}},[m])}const f=(m,p,h)=>{typeof l=="function"&&l(m,p,h)===!1||(r&&a(!0),d===oe&&g(m))};let c={...e,...i};return c.focus=u,c.onSelect=f,s!=null&&(c.selectedIndex=s),delete c.defaultFocus,delete c.defaultIndex,delete c.focusTabOnClick,b.createElement(rt,c,n)};Ie.propTypes={};Ie.tabsRole="Tabs";const zt={className:"react-tabs__tab-list"},Ve=e=>{const{children:n,className:t,...o}={...zt,...e};return b.createElement("ul",Object.assign({},o,{className:z(t),role:"tablist"}),n)};Ve.tabsRole="TabList";Ve.propTypes={};const fe="react-tabs__tab",jt={className:fe,disabledClassName:`${fe}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${fe}--selected`},le=e=>{let n=y.useRef();const{children:t,className:o,disabled:r,disabledClassName:l,focus:i,id:u,selected:a,selectedClassName:d,tabIndex:s,tabRef:g,...f}={...jt,...e};return y.useEffect(()=>{a&&i&&n.current.focus()},[a,i]),b.createElement("li",Object.assign({},f,{className:z(o,{[d]:a,[l]:r}),ref:c=>{n.current=c,g&&g(c)},role:"tab",id:`tab${u}`,"aria-selected":a?"true":"false","aria-disabled":r?"true":"false","aria-controls":`panel${u}`,tabIndex:s||(a?"0":null),"data-rttab":!0}),t)};le.propTypes={};le.tabsRole="Tab";const qe="react-tabs__tab-panel",Nt={className:qe,forceRender:!1,selectedClassName:`${qe}--selected`},ie=e=>{const{children:n,className:t,forceRender:o,id:r,selected:l,selectedClassName:i,...u}={...Nt,...e};return b.createElement("div",Object.assign({},u,{className:z(t,{[i]:l}),role:"tabpanel",id:`panel${r}`,"aria-labelledby":`tab${r}`}),o||l?n:null)};ie.tabsRole="TabPanel";ie.propTypes={};const Bt="_placeHolder_1mf9d_1",qt="_connQty_1mf9d_10",Ut="_inputWrapper_1mf9d_22",Kt="_input_1mf9d_22",Y={placeHolder:Bt,connQty:qt,inputWrapper:Ut,input:Kt};/** + * table-core + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function k(e,n){return typeof e=="function"?e(n):e}function M(e,n){return t=>{n.setState(o=>({...o,[e]:k(t,o[e])}))}}function se(e){return e instanceof Function}function Wt(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Xt(e,n){const t=[],o=r=>{r.forEach(l=>{t.push(l);const i=n(l);i!=null&&i.length&&o(i)})};return o(e),t}function v(e,n,t){let o=[],r;return()=>{let l;t.key&&t.debug&&(l=Date.now());const i=e();if(!(i.length!==o.length||i.some((d,s)=>o[s]!==d)))return r;o=i;let a;if(t.key&&t.debug&&(a=Date.now()),r=n(...i),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-l)*100)/100,s=Math.round((Date.now()-a)*100)/100,g=s/16,f=(c,m)=>{for(c=String(c);c.length{let c=f;for(const p of a.split(".")){var m;c=(m=c)==null?void 0:m[p]}return c}:s=f=>f[u.accessorKey]),!d)throw new Error;let g={id:`${String(d)}`,accessorFn:s,parent:o,depth:t,columnDef:u,columns:[],getFlatColumns:v(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(c=>c.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}}),getLeafColumns:v(()=>[e._getOrderColumnsFn()],f=>{var c;if((c=g.columns)!=null&&c.length){let m=g.columns.flatMap(p=>p.getLeafColumns());return f(m)}return[g]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}})};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}function Ue(e,n,t){var o;let l={id:(o=t.id)!=null?o:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],u=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(u),i.push(a)};return u(l),i},getContext:()=>({table:e,header:l,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(l,e)}),l}const Yt={createTable:e=>{e.getHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>{var l,i;const u=(l=o==null?void 0:o.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?l:[],a=(i=r==null?void 0:r.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?i:[],d=t.filter(g=>!(o!=null&&o.includes(g.id))&&!(r!=null&&r.includes(g.id)));return Z(n,[...u,...d,...a],e)},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>(t=t.filter(l=>!(o!=null&&o.includes(l.id))&&!(r!=null&&r.includes(l.id))),Z(n,t,e,"center")),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(u=>u.id===i)).filter(Boolean))!=null?r:[];return Z(n,l,e,"left")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,o)=>{var r;const l=(r=o==null?void 0:o.map(i=>t.find(u=>u.id===i)).filter(Boolean))!=null?r:[];return Z(n,l,e,"right")},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFooterGroups=v(()=>[e.getHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFooterGroups=v(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFooterGroups=v(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFooterGroups=v(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getFlatHeaders=v(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftFlatHeaders=v(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterFlatHeaders=v(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightFlatHeaders=v(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getCenterLeafHeaders=v(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeftLeafHeaders=v(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getRightLeafHeaders=v(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}}),e.getLeafHeaders=v(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,o)=>{var r,l,i,u,a,d;return[...(r=(l=n[0])==null?void 0:l.headers)!=null?r:[],...(i=(u=t[0])==null?void 0:u.headers)!=null?i:[],...(a=(d=o[0])==null?void 0:d.headers)!=null?a:[]].map(s=>s.getLeafHeaders()).flat()},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugHeaders}})}};function Z(e,n,t,o){var r,l;let i=0;const u=function(f,c){c===void 0&&(c=1),i=Math.max(i,c),f.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&u(m.columns,c+1)},0)};u(e);let a=[];const d=(f,c)=>{const m={depth:c,id:[o,`${c}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(h=>{const w=[...p].reverse()[0],P=h.column.depth===m.depth;let _,$=!1;if(P&&h.column.parent?_=h.column.parent:(_=h.column,$=!0),w&&(w==null?void 0:w.column)===_)w.subHeaders.push(h);else{const x=Ue(t,_,{id:[o,c,_.id,h==null?void 0:h.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${p.filter(I=>I.column===_).length}`:void 0,depth:c,index:p.length});x.subHeaders.push(h),p.push(x)}m.headers.push(h),h.headerGroup=m}),a.push(m),c>0&&d(p,c-1)},s=n.map((f,c)=>Ue(t,f,{depth:i,index:c}));d(s,i-1),a.reverse();const g=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,h=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],g(m.subHeaders).forEach(_=>{let{colSpan:$,rowSpan:x}=_;p+=$,w.push(x)})):p=1;const P=Math.min(...w);return h=h+P,m.colSpan=p,m.rowSpan=h,{colSpan:p,rowSpan:h}});return g((r=(l=a[0])==null?void 0:l.headers)!=null?r:[]),a}const ee={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pe=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Jt={getDefaultColumnDef:()=>ee,getInitialState:e=>({columnSizing:{},columnSizingInfo:pe(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:M("columnSizing",e),onColumnSizingInfoChange:M("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,o,r;const l=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:ee.minSize,(o=l??e.columnDef.size)!=null?o:ee.size),(r=e.columnDef.maxSize)!=null?r:ee.maxSize)},e.getStart=t=>{const o=t?t==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns(),r=o.findIndex(l=>l.id===e.id);if(r>0){const l=o[r-1];return l.getStart(t)+l.getSize()}return 0},e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:o,...r}=t;return r})},e.getCanResize=()=>{var t,o;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((o=n.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const o=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var l;t+=(l=r.column.getSize())!=null?l:0}};return o(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=()=>{const t=n.getColumn(e.column.id),o=t==null?void 0:t.getCanResize();return r=>{if(!t||!o||(r.persist==null||r.persist(),me(r)&&r.touches&&r.touches.length>1))return;const l=e.getSize(),i=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[t.id,t.getSize()]],u=me(r)?Math.round(r.touches[0].clientX):r.clientX,a={},d=(p,h)=>{typeof h=="number"&&(n.setColumnSizingInfo(w=>{var P,_;const $=h-((P=w==null?void 0:w.startOffset)!=null?P:0),x=Math.max($/((_=w==null?void 0:w.startSize)!=null?_:0),-.999999);return w.columnSizingStart.forEach(I=>{let[L,K]=I;a[L]=Math.round(Math.max(K+K*x,0)*100)/100}),{...w,deltaOffset:$,deltaPercentage:x}}),(n.options.columnResizeMode==="onChange"||p==="end")&&n.setColumnSizing(w=>({...w,...a})))},s=p=>d("move",p),g=p=>{d("end",p),n.setColumnSizingInfo(h=>({...h,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:p=>s(p.clientX),upHandler:p=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),g(p.clientX)}},c={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),s(p.touches[0].clientX),!1),upHandler:p=>{var h;document.removeEventListener("touchmove",c.moveHandler),document.removeEventListener("touchend",c.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),g((h=p.touches[0])==null?void 0:h.clientX)}},m=Zt()?{passive:!1}:!1;me(r)?(document.addEventListener("touchmove",c.moveHandler,m),document.addEventListener("touchend",c.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),n.setColumnSizingInfo(p=>({...p,startOffset:u,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:t.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?pe():(t=e.initialState.columnSizingInfo)!=null?t:pe())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0}}};let te=null;function Zt(){if(typeof te=="boolean")return te;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return te=e,te}function me(e){return e.type==="touchstart"}const en={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:M("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var r,l;e.setExpanded(o?{}:(r=(l=e.initialState)==null?void 0:l.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(l=>{const i=l.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(o=>{var r;const l=o===!0?!0:!!(o!=null&&o[e.id]);let i={};if(o===!0?Object.keys(n.getRowModel().rowsById).forEach(u=>{i[u]=!0}):i=o,t=(r=t)!=null?r:!l,!l&&t)return{...i,[e.id]:!0};if(l&&!t){const{[e.id]:u,...a}=i;return a}return o})},e.getIsExpanded=()=>{var t;const o=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:o===!0||o!=null&&o[e.id])},e.getCanExpand=()=>{var t,o,r;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((o=n.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,o=e;for(;t&&o.parentId;)o=n.getRow(o.parentId,!0),t=o.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},lt=(e,n,t)=>{var o;const r=t.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(r))};lt.autoRemove=e=>V(e);const it=(e,n,t)=>{var o;return!!(!((o=e.getValue(n))==null||(o=o.toString())==null)&&o.includes(t))};it.autoRemove=e=>V(e);const st=(e,n,t)=>{var o;return((o=e.getValue(n))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(t==null?void 0:t.toLowerCase())};st.autoRemove=e=>V(e);const ut=(e,n,t)=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(t)};ut.autoRemove=e=>V(e)||!(e!=null&&e.length);const at=(e,n,t)=>!t.some(o=>{var r;return!((r=e.getValue(n))!=null&&r.includes(o))});at.autoRemove=e=>V(e)||!(e!=null&&e.length);const dt=(e,n,t)=>t.some(o=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(o)});dt.autoRemove=e=>V(e)||!(e!=null&&e.length);const gt=(e,n,t)=>e.getValue(n)===t;gt.autoRemove=e=>V(e);const ct=(e,n,t)=>e.getValue(n)==t;ct.autoRemove=e=>V(e);const be=(e,n,t)=>{let[o,r]=t;const l=e.getValue(n);return l>=o&&l<=r};be.resolveFilterValue=e=>{let[n,t]=e,o=typeof n!="number"?parseFloat(n):n,r=typeof t!="number"?parseFloat(t):t,l=n===null||Number.isNaN(o)?-1/0:o,i=t===null||Number.isNaN(r)?1/0:r;if(l>i){const u=l;l=i,i=u}return[l,i]};be.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const H={includesString:lt,includesStringSensitive:it,equalsString:st,arrIncludes:ut,arrIncludesAll:at,arrIncludesSome:dt,equals:gt,weakEquals:ct,inNumberRange:be};function V(e){return e==null||e===""}const tn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:M("columnFilters",e),onGlobalFilterChange:M("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const o=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);return typeof o=="string"?H.includesString:typeof o=="number"?H.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?H.equals:Array.isArray(o)?H.arrIncludes:H.weakEquals},e.getFilterFn=()=>{var t,o;return se(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(o=n.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?t:H[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,o,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((o=n.options.enableColumnFilters)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var t,o,r,l;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((o=n.options.enableGlobalFilter)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&((l=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?l:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(o=>o.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,o;return(t=(o=n.getState().columnFilters)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(o=>{const r=e.getFilterFn(),l=o==null?void 0:o.find(s=>s.id===e.id),i=k(t,l?l.value:void 0);if(Ke(r,i,e)){var u;return(u=o==null?void 0:o.filter(s=>s.id!==e.id))!=null?u:[]}const a={id:e.id,value:i};if(l){var d;return(d=o==null?void 0:o.map(s=>s.id===e.id?a:s))!=null?d:[]}return o!=null&&o.length?[...o,a]:[a]})},e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>H.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:o}=e.options;return se(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[o])!=null?n:H[o]},e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),o=r=>{var l;return(l=k(n,r))==null?void 0:l.filter(i=>{const u=t.find(a=>a.id===i.id);if(u){const a=u.getFilterFn();if(Ke(a,i.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)},e.resetColumnFilters=n=>{var t,o;e.setColumnFilters(n?[]:(t=(o=e.initialState)==null?void 0:o.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function Ke(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const nn=(e,n,t)=>t.reduce((o,r)=>{const l=r.getValue(e);return o+(typeof l=="number"?l:0)},0),on=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o>l||o===void 0&&l>=l)&&(o=l)}),o},rn=(e,n,t)=>{let o;return t.forEach(r=>{const l=r.getValue(e);l!=null&&(o=l)&&(o=l)}),o},ln=(e,n,t)=>{let o,r;return t.forEach(l=>{const i=l.getValue(e);i!=null&&(o===void 0?i>=i&&(o=r=i):(o>i&&(o=i),r{let t=0,o=0;if(n.forEach(r=>{let l=r.getValue(e);l!=null&&(l=+l)>=l&&(++t,o+=l)}),t)return o/t},un=(e,n)=>{if(!n.length)return;const t=n.map(l=>l.getValue(e));if(!Wt(t))return;if(t.length===1)return t[0];const o=Math.floor(t.length/2),r=t.sort((l,i)=>l-i);return t.length%2!==0?r[o]:(r[o-1]+r[o])/2},an=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),dn=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,gn=(e,n)=>n.length,Ce={sum:nn,min:on,max:rn,extent:ln,mean:sn,median:un,unique:an,uniqueCount:dn,count:gn},cn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:M("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(o=>o!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,o,r,l;return(t=(o=(r=(l=e.columnDef.enableGrouping)!=null?l:!0)!=null?r:n.options.enableGrouping)!=null?o:!0)!=null?t:!!e.accessorFn},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);if(typeof o=="number")return Ce.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ce.extent},e.getAggregationFn=()=>{var t,o;if(!e)throw new Error;return se(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(o=n.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?t:Ce[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,o;e.setGrouping(n?[]:(t=(o=e.initialState)==null?void 0:o.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const o=n.getColumn(t);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[t]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,o)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function fn(e,n,t){if(!(n!=null&&n.length)||!t)return e;const o=e.filter(l=>!n.includes(l.id));return t==="remove"?o:[...n.map(l=>e.find(i=>i.id===l)).filter(Boolean),...o]}const pn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:M("columnOrder",e)}),createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=v(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,o)=>r=>{let l=[];if(!(n!=null&&n.length))l=r;else{const i=[...n],u=[...r];for(;u.length&&i.length;){const a=i.shift(),d=u.findIndex(s=>s.id===a);d>-1&&l.push(u.splice(d,1)[0])}l=[...l,...u]}return fn(l,t,o)},{key:!1})}},_e=0,$e=10,Se=()=>({pageIndex:_e,pageSize:$e}),mn={getInitialState:e=>({...e,pagination:{...Se(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:M("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=o=>{const r=l=>k(o,l);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?Se():(r=e.initialState.pagination)!=null?r:Se())},e.setPageIndex=o=>{e.setPagination(r=>{let l=k(o,r.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return l=Math.max(0,Math.min(l,i)),{...r,pageIndex:l}})},e.resetPageIndex=o=>{var r,l;e.setPageIndex(o?_e:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageIndex)!=null?r:_e)},e.resetPageSize=o=>{var r,l;e.setPageSize(o?$e:(r=(l=e.initialState)==null||(l=l.pagination)==null?void 0:l.pageSize)!=null?r:$e)},e.setPageSize=o=>{e.setPagination(r=>{const l=Math.max(1,k(o,r.pageSize)),i=r.pageSize*r.pageIndex,u=Math.floor(i/l);return{...r,pageIndex:u,pageSize:l}})},e.setPageCount=o=>e.setPagination(r=>{var l;let i=k(o,(l=e.options.pageCount)!=null?l:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...r,pageCount:i}}),e.getPageOptions=v(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((l,i)=>i)),r},{key:!1,debug:()=>{var o;return(o=e.options.debugAll)!=null?o:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:oe.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},ve=()=>({left:[],right:[]}),he=()=>({top:[],bottom:[]}),Cn={getInitialState:e=>({columnPinning:ve(),rowPinning:he(),...e}),getDefaultOptions:e=>({onColumnPinningChange:M("columnPinning",e),onRowPinningChange:M("rowPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);n.setColumnPinning(r=>{var l,i;if(t==="right"){var u,a;return{left:((u=r==null?void 0:r.left)!=null?u:[]).filter(g=>!(o!=null&&o.includes(g))),right:[...((a=r==null?void 0:r.right)!=null?a:[]).filter(g=>!(o!=null&&o.includes(g))),...o]}}if(t==="left"){var d,s;return{left:[...((d=r==null?void 0:r.left)!=null?d:[]).filter(g=>!(o!=null&&o.includes(g))),...o],right:((s=r==null?void 0:r.right)!=null?s:[]).filter(g=>!(o!=null&&o.includes(g)))}}return{left:((l=r==null?void 0:r.left)!=null?l:[]).filter(g=>!(o!=null&&o.includes(g))),right:((i=r==null?void 0:r.right)!=null?i:[]).filter(g=>!(o!=null&&o.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,l,i;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((l=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?l:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(u=>u.id),{left:o,right:r}=n.getState().columnPinning,l=t.some(u=>o==null?void 0:o.includes(u)),i=t.some(u=>r==null?void 0:r.includes(u));return l?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();return r?(t=(o=n.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.pin=(t,o,r)=>{const l=o?e.getLeafRows().map(a=>{let{id:d}=a;return d}):[],i=r?e.getParentRows().map(a=>{let{id:d}=a;return d}):[],u=new Set([...i,e.id,...l]);n.setRowPinning(a=>{var d,s;if(t==="bottom"){var g,f;return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(p=>!(u!=null&&u.has(p))),bottom:[...((f=a==null?void 0:a.bottom)!=null?f:[]).filter(p=>!(u!=null&&u.has(p))),...u]}}if(t==="top"){var c,m;return{top:[...((c=a==null?void 0:a.top)!=null?c:[]).filter(p=>!(u!=null&&u.has(p))),...u],bottom:((m=a==null?void 0:a.bottom)!=null?m:[]).filter(p=>!(u!=null&&u.has(p)))}}return{top:((d=a==null?void 0:a.top)!=null?d:[]).filter(p=>!(u!=null&&u.has(p))),bottom:((s=a==null?void 0:a.bottom)!=null?s:[]).filter(p=>!(u!=null&&u.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:o,enablePinning:r}=n.options;return typeof o=="function"?o(e):(t=o??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:o,bottom:r}=n.getState().rowPinning,l=t.some(u=>o==null?void 0:o.includes(u)),i=t.some(u=>r==null?void 0:r.includes(u));return l?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();if(!r)return-1;const l=(t=n._getPinnedRows(r))==null?void 0:t.map(i=>{let{id:u}=i;return u});return(o=l==null?void 0:l.indexOf(e.id))!=null?o:-1},e.getCenterVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,o,r)=>{const l=[...o??[],...r??[]];return t.filter(i=>!l.includes(i.column.id))},{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getLeftVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,,],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"left"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getRightVisibleCells=v(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,o)=>(o??[]).map(l=>t.find(i=>i.column.id===l)).filter(Boolean).map(l=>({...l,position:"right"})),{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,o;return e.setColumnPinning(n?ve():(t=(o=e.initialState)==null?void 0:o.columnPinning)!=null?t:ve())},e.getIsSomeColumnsPinned=n=>{var t;const o=e.getState().columnPinning;if(!n){var r,l;return!!((r=o.left)!=null&&r.length||(l=o.right)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e.getLeftLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getRightLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.getCenterLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o)=>{const r=[...t??[],...o??[]];return n.filter(l=>!r.includes(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugColumns}}),e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,o;return e.setRowPinning(n?he():(t=(o=e.initialState)==null?void 0:o.rowPinning)!=null?t:he())},e.getIsSomeRowsPinned=n=>{var t;const o=e.getState().rowPinning;if(!n){var r,l;return!!((r=o.top)!=null&&r.length||(l=o.bottom)!=null&&l.length)}return!!((t=o[n])!=null&&t.length)},e._getPinnedRows=n=>v(()=>[e.getRowModel().rows,e.getState().rowPinning[n]],(t,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(o??[]).map(i=>{const u=e.getRow(i,!0);return u.getIsAllParentsExpanded()?u:null}):(o??[]).map(i=>t.find(u=>u.id===i))).filter(Boolean).map(i=>({...i,position:n}))},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,o)=>{const r=new Set([...t??[],...o??[]]);return n.filter(l=>!r.has(l.id))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}},Sn={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:M("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const o={...t},r=e.getPreGroupedRowModel().flatRows;return n?r.forEach(l=>{l.getCanSelect()&&(o[l.id]=!0)}):r.forEach(l=>{delete o[l.id]}),o})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const o=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(l=>{ye(r,l.id,o,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=v(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getFilteredSelectedRowModel=v(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getGroupedSelectedRowModel=v(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Re(e,t):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let o=!!(n.length&&Object.keys(t).length);return o&&n.some(r=>r.getCanSelect()&&!t[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let o=!!n.length;return o&&n.some(r=>!t[r.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=t=>{const o=e.getIsSelected();n.setRowSelection(r=>{if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return r;const l={...r};return ye(l,e.id,t,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return Ee(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return xe(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return xe(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return o=>{var r;t&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},ye=(e,n,t,o)=>{var r;const l=o.getRow(n);t?(l.getCanMultiSelect()||Object.keys(e).forEach(i=>delete e[i]),l.getCanSelect()&&(e[n]=!0)):delete e[n],(r=l.subRows)!=null&&r.length&&l.getCanSelectSubRows()&&l.subRows.forEach(i=>ye(e,i.id,t,o))};function Re(e,n){const t=e.getState().rowSelection,o=[],r={},l=function(i,u){return i.map(a=>{var d;const s=Ee(a,t);if(s&&(o.push(a),r[a.id]=a),(d=a.subRows)!=null&&d.length&&(a={...a,subRows:l(a.subRows)}),s)return a}).filter(Boolean)};return{rows:l(n.rows),flatRows:o,rowsById:r}}function Ee(e,n){var t;return(t=n[e.id])!=null?t:!1}function xe(e,n,t){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,l=!1;return e.subRows.forEach(i=>{if(!(l&&!r)&&(i.getCanSelect()&&(Ee(i,n)?l=!0:r=!1),i.subRows&&i.subRows.length)){const u=xe(i,n);u==="all"?l=!0:(u==="some"&&(l=!0),r=!1)}}),r?"all":l?"some":!1}const Fe=/([0-9]+)/gm,vn=(e,n,t)=>ft(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),hn=(e,n,t)=>ft(j(e.getValue(t)),j(n.getValue(t))),Rn=(e,n,t)=>De(j(e.getValue(t)).toLowerCase(),j(n.getValue(t)).toLowerCase()),wn=(e,n,t)=>De(j(e.getValue(t)),j(n.getValue(t))),_n=(e,n,t)=>{const o=e.getValue(t),r=n.getValue(t);return o>r?1:oDe(e.getValue(t),n.getValue(t));function De(e,n){return e===n?0:e>n?1:-1}function j(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ft(e,n){const t=e.split(Fe).filter(Boolean),o=n.split(Fe).filter(Boolean);for(;t.length&&o.length;){const r=t.shift(),l=o.shift(),i=parseInt(r,10),u=parseInt(l,10),a=[i,u].sort();if(isNaN(a[0])){if(r>l)return 1;if(l>r)return-1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>u)return 1;if(u>i)return-1}return t.length-o.length}const W={alphanumeric:vn,alphanumericCaseSensitive:hn,text:Rn,textCaseSensitive:wn,datetime:_n,basic:$n},yn={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:M("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of t){const l=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(l)==="[object Date]")return W.datetime;if(typeof l=="string"&&(o=!0,l.split(Fe).length>1))return W.alphanumeric}return o?W.text:W.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,o;if(!e)throw new Error;return se(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(o=n.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?t:W[e.columnDef.sortingFn]},e.toggleSorting=(t,o)=>{const r=e.getNextSortingOrder(),l=typeof t<"u"&&t!==null;n.setSorting(i=>{const u=i==null?void 0:i.find(c=>c.id===e.id),a=i==null?void 0:i.findIndex(c=>c.id===e.id);let d=[],s,g=l?t:r==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?u?s="toggle":s="add":i!=null&&i.length&&a!==i.length-1?s="replace":u?s="toggle":s="replace",s==="toggle"&&(l||r||(s="remove")),s==="add"){var f;d=[...i,{id:e.id,desc:g}],d.splice(0,d.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else s==="toggle"?d=i.map(c=>c.id===e.id?{...c,desc:g}:c):s==="remove"?d=i.filter(c=>c.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var t,o;return((t=(o=e.columnDef.sortDescFirst)!=null?o:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var o,r;const l=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==l&&((o=n.options.enableSortingRemoval)==null||o)&&(!(t&&(r=n.options.enableMultiRemove)!=null)||r)?!1:i==="desc"?"asc":"desc":l},e.getCanSort=()=>{var t,o;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((o=n.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,o;return(t=(o=e.columnDef.enableMultiSort)!=null?o:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const o=(t=n.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,o;return(t=(o=n.getState().sorting)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return o=>{t&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,o;e.setSorting(n?[]:(t=(o=e.initialState)==null?void 0:o.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},xn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:M("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(o=>({...o,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,o;return(t=(o=n.getState().columnVisibility)==null?void 0:o[e.id])!=null?t:!0},e.getCanHide=()=>{var t,o;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((o=n.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=v(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(o=>o.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}}),e.getVisibleCells=v(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,o,r)=>[...t,...o,...r],{key:!1,debug:()=>{var t;return(t=n.options.debugAll)!=null?t:n.options.debugRows}})},createTable:e=>{const n=(t,o)=>v(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(l=>l.getIsVisible==null?void 0:l.getIsVisible()),{key:t,debug:()=>{var r;return(r=e.options.debugAll)!=null?r:e.options.debugColumns}});e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var o;e.setColumnVisibility(t?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=t=>{var o;t=(o=t)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,l)=>({...r,[l.id]:t||!(l.getCanHide!=null&&l.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var o;e.toggleAllColumnsVisible((o=t.target)==null?void 0:o.checked)}}},We=[Yt,xn,pn,Cn,tn,yn,cn,en,mn,Sn,Jt];function Fn(e){var n;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let t={_features:We};const o=t._features.reduce((s,g)=>Object.assign(s,g.getDefaultOptions==null?void 0:g.getDefaultOptions(t)),{}),r=s=>t.options.mergeOptions?t.options.mergeOptions(o,s):{...o,...s};let i={...{},...(n=e.initialState)!=null?n:{}};t._features.forEach(s=>{var g;i=(g=s.getInitialState==null?void 0:s.getInitialState(i))!=null?g:i});const u=[];let a=!1;const d={_features:We,options:{...o,...e},initialState:i,_queue:s=>{u.push(s),a||(a=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();a=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{t.setState(t.initialState)},setOptions:s=>{const g=k(s,t.options);t.options=r(g)},getState:()=>t.options.state,setState:s=>{t.options.onStateChange==null||t.options.onStateChange(s)},_getRowId:(s,g,f)=>{var c;return(c=t.options.getRowId==null?void 0:t.options.getRowId(s,g,f))!=null?c:`${f?[f.id,g].join("."):g}`},getCoreRowModel:()=>(t._getCoreRowModel||(t._getCoreRowModel=t.options.getCoreRowModel(t)),t._getCoreRowModel()),getRowModel:()=>t.getPaginationRowModel(),getRow:(s,g)=>{const f=(g?t.getCoreRowModel():t.getRowModel()).rowsById[s];if(!f)throw new Error;return f},_getDefaultColumnDef:v(()=>[t.options.defaultColumn],s=>{var g;return s=(g=s)!=null?g:{},{header:f=>{const c=f.header.column.columnDef;return c.accessorKey?c.accessorKey:c.accessorFn?c.id:null},cell:f=>{var c,m;return(c=(m=f.renderValue())==null||m.toString==null?void 0:m.toString())!=null?c:null},...t._features.reduce((f,c)=>Object.assign(f,c.getDefaultColumnDef==null?void 0:c.getDefaultColumnDef()),{}),...s}},{debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns},key:!1}),_getColumnDefs:()=>t.options.columns,getAllColumns:v(()=>[t._getColumnDefs()],s=>{const g=function(f,c,m){return m===void 0&&(m=0),f.map(p=>{const h=Qt(t,p,m,c),w=p;return h.columns=w.columns?g(w.columns,h,m+1):[],h})};return g(s)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getAllFlatColumns:v(()=>[t.getAllColumns()],s=>s.flatMap(g=>g.getFlatColumns()),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),_getAllFlatColumnsById:v(()=>[t.getAllFlatColumns()],s=>s.reduce((g,f)=>(g[f.id]=f,g),{}),{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getAllLeafColumns:v(()=>[t.getAllColumns(),t._getOrderColumnsFn()],(s,g)=>{let f=s.flatMap(c=>c.getLeafColumns());return g(f)},{key:!1,debug:()=>{var s;return(s=t.options.debugAll)!=null?s:t.options.debugColumns}}),getColumn:s=>t._getAllFlatColumnsById()[s]};Object.assign(t,d);for(let s=0;s{var i;return(i=l.getValue())!=null?i:e.options.renderFallbackValue},l={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(o),renderValue:r,getContext:v(()=>[e,t,n,l],(i,u,a,d)=>({table:i,column:u,row:a,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach(i=>{i.createCell==null||i.createCell(l,t,n,e)},{}),l}const An=(e,n,t,o,r,l,i)=>{let u={id:n,index:o,original:t,depth:r,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(u._valuesCache.hasOwnProperty(a))return u._valuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return u._valuesCache[a]=d.accessorFn(u.original,o),u._valuesCache[a]},getUniqueValues:a=>{if(u._uniqueValuesCache.hasOwnProperty(a))return u._uniqueValuesCache[a];const d=e.getColumn(a);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(u._uniqueValuesCache[a]=d.columnDef.getUniqueValues(u.original,o),u._uniqueValuesCache[a]):(u._uniqueValuesCache[a]=[u.getValue(a)],u._uniqueValuesCache[a])},renderValue:a=>{var d;return(d=u.getValue(a))!=null?d:e.options.renderFallbackValue},subRows:l??[],getLeafRows:()=>Xt(u.subRows,a=>a.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId):void 0,getParentRows:()=>{let a=[],d=u;for(;;){const s=d.getParentRow();if(!s)break;a.push(s),d=s}return a.reverse()},getAllCells:v(()=>[e.getAllLeafColumns()],a=>a.map(d=>Pn(e,u,d,d.id)),{key:!1,debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}}),_getAllCellsByColumnId:v(()=>[u.getAllCells()],a=>a.reduce((d,s)=>(d[s.column.id]=s,d),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var a;return(a=e.options.debugAll)!=null?a:e.options.debugRows}})};for(let a=0;av(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},o=function(r,l,i){l===void 0&&(l=0);const u=[];for(let d=0;d{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function In(){return e=>v(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const o=e.getState().sorting,r=[],l=o.filter(a=>{var d;return(d=e.getColumn(a.id))==null?void 0:d.getCanSort()}),i={};l.forEach(a=>{const d=e.getColumn(a.id);d&&(i[a.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const u=a=>{const d=[...a];return d.sort((s,g)=>{for(let c=0;c{var g;r.push(s),(g=s.subRows)!=null&&g.length&&(s.subRows=u(s.subRows))}),d};return{rows:u(t.rows),flatRows:r,rowsById:t.rowsById}},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Xe(e,n){return e?Vn(e)?y.createElement(e,n):e:null}function Vn(e){return bn(e)||typeof e=="function"||En(e)}function bn(e){return typeof e=="function"&&(()=>{const n=Object.getPrototypeOf(e);return n.prototype&&n.prototype.isReactComponent})()}function En(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Dn(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=y.useState(()=>({current:Fn(n)})),[o,r]=y.useState(()=>t.current.initialState);return t.current.setOptions(l=>({...l,...e,state:{...o,...e.state},onStateChange:i=>{r(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}const Hn="_tr_ludqf_1",Ln="_pointer_ludqf_6",Gn="_table_ludqf_10",On="_thWrap_ludqf_38",Tn="_sortIconContainer_ludqf_48",kn="_rotate180_ludqf_55",T={tr:Hn,pointer:Ln,table:Gn,thWrap:On,sortIconContainer:Tn,rotate180:kn},pt=[{header:"Id",accessorKey:"id"},{header:"Host",accessorKey:"host"},{header:"Process",accessorKey:"process"},{header:"DL",accessorKey:"download",cell:e=>J(e.getValue())},{header:"UL",accessorKey:"upload",cell:e=>J(e.getValue())},{header:"DL Speed",accessorKey:"downloadSpeedCurr",cell:e=>J(e.getValue())+"/s"},{header:"UL Speed",accessorKey:"uploadSpeedCurr",cell:e=>J(e.getValue())+"/s"},{header:"Chains",accessorKey:"chains"},{header:"Rule",accessorKey:"rule"},{header:"Time",accessorKey:"start",cell:e=>At(e.getValue(),0)},{header:"Source",accessorKey:"source"},{header:"Destination IP",accessorKey:"destinationIP"},{header:"Type",accessorKey:"type"}],zn=[{id:"id",desc:!0}],jn=pt,Nn=pt.filter(e=>e.accessorKey!=="process");function Bn({data:e}){const n=b.useContext(et),[t,o]=b.useState(zn),r=Dn({columns:n.hasProcessPath?jn:Nn,data:e,state:{sorting:t,columnVisibility:{id:!1}},onSortingChange:o,getCoreRowModel:Mn(),getSortedRowModel:In()});return S.jsxs("table",{className:T.table,children:[S.jsx("thead",{children:r.getHeaderGroups().map(l=>S.jsx("tr",{children:l.headers.map(i=>S.jsx("th",{className:i.column.getCanSort()?z(T.th,T.pointer):T.th,onClick:i.column.getToggleSortingHandler(),children:S.jsxs("span",{className:T.thWrap,children:[S.jsx("span",{children:Xe(i.column.columnDef.header,i.getContext())}),i.column.getIsSorted()?S.jsx("span",{className:i.column.getIsSorted()==="desc"?T.sortIconContainer:z(T.rotate180,T.sortIconContainer),children:S.jsx(Mt,{size:16})}):null]})},i.id))},l.id))}),S.jsx("tbody",{children:r.getRowModel().rows.map(l=>S.jsx("tr",{children:l.getVisibleCells().map(i=>S.jsx("td",{children:Xe(i.column.columnDef.cell,i.getContext())},i.id))},l.id))})]})}const qn="_overlay_148w6_1",Un="_cnt_148w6_5",Kn="_afterOpen_148w6_15",Wn="_btngrp_148w6_20",ne={overlay:qn,cnt:Un,afterOpen:Kn,btngrp:Wn},{useRef:Xn,useCallback:Qn,useMemo:Yn}=b;function Jn({isOpen:e,onRequestClose:n,primaryButtonOnTap:t}){const o=Xn(null),r=Qn(()=>{o.current.focus()},[]),l=Yn(()=>({base:z(je.content,ne.cnt),afterOpen:ne.afterOpen,beforeClose:""}),[]);return S.jsxs(vt,{isOpen:e,onRequestClose:n,onAfterOpen:r,className:l,overlayClassName:z(je.overlay,ne.overlay),children:[S.jsx("p",{children:"Are you sure you want to close all connections?"}),S.jsxs("div",{className:ne.btngrp,children:[S.jsx(Ne,{onClick:t,ref:o,children:"I'm sure"}),S.jsx("div",{style:{width:20}}),S.jsx(Ne,{onClick:n,children:"No"})]})]})}const{useEffect:Zn,useState:X,useRef:eo,useCallback:Q}=b,Qe=30;function to(e){const n={};for(let t=0;t[t.host,t.sourceIP,t.sourcePort,t.destinationIP,t.chains,t.rule,t.type,t.network,t.processPath].some(o=>oo(o,n))):e}function ro(e,n,t,o){const{id:r,metadata:l,upload:i,download:u,start:a,chains:d,rule:s,rulePayload:g}=e,{host:f,destinationPort:c,destinationIP:m,network:p,type:h,sourceIP:w,sourcePort:P}=l,_=l.processPath;o.hasProcessPath===!1&&typeof _<"u"&&(o.hasProcessPath=!0);let $=f;$===""&&($=m);const x=n[r];return{id:r,upload:i,download:u,start:t-new Date(a).valueOf(),chains:d.reverse().join(" / "),rule:g?`${s}(${g})`:s,...l,host:`${$}:${c}`,type:`${h}(${p})`,source:`${w}:${P}`,downloadSpeedCurr:u-(x?x.download:0),uploadSpeedCurr:i-(x?x.upload:0),process:no(_)}}function Je(e){return e.length>0?S.jsx(Bn,{data:e}):S.jsx("div",{className:Y.placeHolder,children:S.jsx(Ft,{width:200,height:200,c1:"var(--color-text)"})})}function Ze({qty:e}){return e<100?""+e:"99+"}function lo({apiConfig:e}){const[n,t]=Pt(),[o,r]=X([]),[l,i]=X([]),[u,a]=X(""),d=Ye(o,u),s=Ye(l,u),[g,f]=X(!1),c=Q(()=>f(!0),[]),m=Q(()=>f(!1),[]),[p,h]=X(!1),w=Q(()=>h(L=>!L),[]),P=Q(()=>{Rt(e),m()},[e,m]),_=eo(o),$=b.useContext(et),x=Q(({connections:L})=>{const K=to(_.current),He=Date.now(),N=L.map(G=>ro(G,K,He,$)),ae=[];for(const G of _.current)N.findIndex(R=>R.id===G.id)<0&&ae.push(G);i(G=>[...ae,...G].slice(0,101)),N&&(N.length!==0||_.current.length!==0)&&!p?(_.current=N,r(N)):_.current=N},[r,p,$]);Zn(()=>wt(e,x),[e,x]);const{t:I}=_t();return S.jsxs("div",{children:[S.jsx($t,{title:I("Connections")}),S.jsxs(Ie,{children:[S.jsxs("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"},children:[S.jsxs(Ve,{children:[S.jsxs(le,{children:[S.jsx("span",{children:I("Active")}),S.jsx("span",{className:Y.connQty,children:Ze({qty:d.length})})]}),S.jsxs(le,{children:[S.jsx("span",{children:I("Closed")}),S.jsx("span",{className:Y.connQty,children:Ze({qty:s.length})})]})]}),S.jsx("div",{className:Y.inputWrapper,children:S.jsx("input",{type:"text",name:"filter",autoComplete:"off",className:Y.input,placeholder:"Filter",onChange:L=>a(L.target.value)})})]}),S.jsx("div",{ref:n,style:{padding:30,paddingBottom:Qe,paddingTop:0},children:S.jsxs("div",{style:{height:t-Qe,overflow:"auto"},children:[S.jsxs(ie,{children:[S.jsx(S.Fragment,{children:Je(d)}),S.jsx(It,{icon:p?S.jsx(Et,{size:16}):S.jsx(Dt,{size:16}),mainButtonStyles:p?{background:"#e74c3c"}:{},style:Vt,text:I(p?"Resume Refresh":"Pause Refresh"),onClick:w,children:S.jsx(bt,{text:"Close All Connections",onClick:c,children:S.jsx(yt,{size:10})})})]}),S.jsx(ie,{children:Je(s)})]})}),S.jsx(Jn,{isOpen:g,primaryButtonOnTap:P,onRequestClose:m})]})]})}const io=e=>({apiConfig:xt(e)}),po=ht(io)(lo);export{po as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-ddae4f70.css b/FILES/etc/config/clash/clash-dashboard/assets/Connections-ddae4f70.css new file mode 100644 index 0000000..7d308e2 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Connections-ddae4f70.css @@ -0,0 +1 @@ +.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._placeHolder_1mf9d_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_1mf9d_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._inputWrapper_1mf9d_22{margin:0 30px;width:100%;max-width:350px;justify-self:flex-end}._input_1mf9d_22{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_ludqf_1{display:grid;grid-template-columns:repeat(var(--col-count, 11),minmax(-webkit-max-content,auto));grid-template-columns:repeat(var(--col-count, 11),minmax(max-content,auto))}._pointer_ludqf_6{cursor:pointer}._table_ludqf_10{border:none;border-collapse:collapse}._table_ludqf_10 thead tr{position:-webkit-sticky;position:sticky;top:0;background:var(--color-background)}._table_ludqf_10 th{padding:8px 13px;height:50px;font-weight:initial;font-size:.8em;text-align:left;white-space:nowrap}._table_ludqf_10 td{border:none;white-space:nowrap;padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._table_ludqf_10>tbody>tr:nth-of-type(odd)>*{background:var(--color-row-odd)}._thWrap_ludqf_38{-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:space-between}._thWrap_ludqf_38:hover{color:var(--color-text-highlight)}._sortIconContainer_ludqf_48{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_ludqf_55{transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Connections-f01328e8.css b/FILES/etc/config/clash/clash-dashboard/assets/Connections-f01328e8.css deleted file mode 100644 index e05bc2f..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Connections-f01328e8.css +++ /dev/null @@ -1 +0,0 @@ -.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._btn_lzu00_1{margin-right:10px}._placeHolder_mnszs_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_mnszs_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._filterWrapper_mnszs_22{display:flex;flex-wrap:nowrap}._input_mnszs_27{background-color:var(--color-input-bg);background-image:none;border-radius:18px 0 0 18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._button_mnszs_43{background-color:var(--color-input-bg);background-image:none;border-radius:0 18px 18px 0;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_daq0k_1{display:grid;grid-template-columns:repeat(var(--col-count, 11),minmax(-webkit-max-content,auto));grid-template-columns:repeat(var(--col-count, 11),minmax(max-content,auto))}._th_daq0k_6{padding:8px 10px;height:50px;background:var(--color-background);position:-webkit-sticky;position:sticky;top:0;font-size:.8em;text-align:center;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between}._th_daq0k_6:hover{color:var(--color-text-highlight)}._td_daq0k_23{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._td_daq0k_23._odd_daq0k_29{background:var(--color-row-odd)}._du_daq0k_34{text-align:right}._sortIconContainer_daq0k_38{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_daq0k_45{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px}.src-ips{display:flex;flex-wrap:wrap;max-width:70vw;overflow:hidden} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Fab-a0a7e573.css b/FILES/etc/config/clash/clash-dashboard/assets/Fab-a0a7e573.css deleted file mode 100644 index 673a61d..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Fab-a0a7e573.css +++ /dev/null @@ -1 +0,0 @@ -.rtf{box-sizing:border-box;margin:25px;position:fixed;white-space:nowrap;z-index:9998;padding-left:0;list-style:none}.rtf.open .rtf--mb{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c:nth-child(1){-webkit-transform:translateY(-60px) scale(1);transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:nth-child(1).top{-webkit-transform:translateY(60px) scale(1);transform:translateY(60px) scale(1)}.rtf.open .rtf--ab__c:nth-child(2){-webkit-transform:translateY(-120px) scale(1);transform:translateY(-120px) scale(1);transition-delay:.09s}.rtf.open .rtf--ab__c:nth-child(2).top{-webkit-transform:translateY(120px) scale(1);transform:translateY(120px) scale(1)}.rtf.open .rtf--ab__c:nth-child(3){-webkit-transform:translateY(-180px) scale(1);transform:translateY(-180px) scale(1);transition-delay:.12s}.rtf.open .rtf--ab__c:nth-child(3).top{-webkit-transform:translateY(180px) scale(1);transform:translateY(180px) scale(1)}.rtf.open .rtf--ab__c:nth-child(4){-webkit-transform:translateY(-240px) scale(1);transform:translateY(-240px) scale(1);transition-delay:.15s}.rtf.open .rtf--ab__c:nth-child(4).top{-webkit-transform:translateY(240px) scale(1);transform:translateY(240px) scale(1)}.rtf.open .rtf--ab__c:nth-child(5){-webkit-transform:translateY(-300px) scale(1);transform:translateY(-300px) scale(1);transition-delay:.18s}.rtf.open .rtf--ab__c:nth-child(5).top{-webkit-transform:translateY(300px) scale(1);transform:translateY(300px) scale(1)}.rtf.open .rtf--ab__c:nth-child(6){-webkit-transform:translateY(-360px) scale(1);transform:translateY(-360px) scale(1);transition-delay:.21s}.rtf.open .rtf--ab__c:nth-child(6).top{-webkit-transform:translateY(360px) scale(1);transform:translateY(360px) scale(1)}.rtf--mb__c{padding:25px;margin:-25px}.rtf--mb__c *:last-child{margin-bottom:0}.rtf--mb__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin-right:6px;margin-left:4px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--mb__c>span.right{right:100%}.rtf--mb{width:48px;height:48px;background:var(--btn-bg);z-index:9999;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--mb>*{transition:ease-in-out transform .2s}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0;transition:ease-in-out transform .2s}.rtf--ab__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin-right:6px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:nth-child(1){-webkit-transform:translateY(-60px) scale(0);transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:nth-child(1).top{-webkit-transform:translateY(60px) scale(0);transform:translateY(60px) scale(0)}.rtf--ab__c:nth-child(2){-webkit-transform:translateY(-120px) scale(0);transform:translateY(-120px) scale(0);transition-delay:.18s}.rtf--ab__c:nth-child(2).top{-webkit-transform:translateY(120px) scale(0);transform:translateY(120px) scale(0)}.rtf--ab__c:nth-child(3){-webkit-transform:translateY(-180px) scale(0);transform:translateY(-180px) scale(0);transition-delay:.15s}.rtf--ab__c:nth-child(3).top{-webkit-transform:translateY(180px) scale(0);transform:translateY(180px) scale(0)}.rtf--ab__c:nth-child(4){-webkit-transform:translateY(-240px) scale(0);transform:translateY(-240px) scale(0);transition-delay:.12s}.rtf--ab__c:nth-child(4).top{-webkit-transform:translateY(240px) scale(0);transform:translateY(240px) scale(0)}.rtf--ab__c:nth-child(5){-webkit-transform:translateY(-300px) scale(0);transform:translateY(-300px) scale(0);transition-delay:.09s}.rtf--ab__c:nth-child(5).top{-webkit-transform:translateY(300px) scale(0);transform:translateY(300px) scale(0)}.rtf--ab__c:nth-child(6){-webkit-transform:translateY(-360px) scale(0);transform:translateY(-360px) scale(0);transition-delay:.03s}.rtf--ab__c:nth-child(6).top{-webkit-transform:translateY(360px) scale(0);transform:translateY(360px) scale(0)}.rtf--ab{height:40px;width:40px;margin-right:4px;background-color:#aaa;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:16px;z-index:10000}.rtf--ab:hover{background:#387cec;border:1px solid #387cec;color:#fff}.rtf--ab:focus{border-color:var(--color-focus-blue)}._spining_4i8sg_1{position:relative;border-radius:50%;background:linear-gradient(60deg,#e66465,#9198e5);width:48px;height:48px;display:flex;justify-content:center;align-items:center}._spining_4i8sg_1:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;-webkit-animation:_spining_keyframes_4i8sg_1 1s linear infinite;animation:_spining_keyframes_4i8sg_1 1s linear infinite}@-webkit-keyframes _spining_keyframes_4i8sg_1{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _spining_keyframes_4i8sg_1{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Fab-a434d836.css b/FILES/etc/config/clash/clash-dashboard/assets/Fab-a434d836.css new file mode 100644 index 0000000..05590d1 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Fab-a434d836.css @@ -0,0 +1 @@ +.rtf{box-sizing:border-box;margin:25px;position:fixed;white-space:nowrap;z-index:9998;padding-left:0;list-style:none}.rtf.open .rtf--mb{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.rtf.open .rtf--mb>ul{list-style:none;margin:0;padding:0}.rtf.open .rtf--ab__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf.open .rtf--ab__c:nth-child(1){transform:translateY(-60px) scale(1);transition-delay:.03s}.rtf.open .rtf--ab__c:nth-child(1).top{transform:translateY(60px) scale(1)}.rtf.open .rtf--ab__c:nth-child(2){transform:translateY(-120px) scale(1);transition-delay:.09s}.rtf.open .rtf--ab__c:nth-child(2).top{transform:translateY(120px) scale(1)}.rtf.open .rtf--ab__c:nth-child(3){transform:translateY(-180px) scale(1);transition-delay:.12s}.rtf.open .rtf--ab__c:nth-child(3).top{transform:translateY(180px) scale(1)}.rtf.open .rtf--ab__c:nth-child(4){transform:translateY(-240px) scale(1);transition-delay:.15s}.rtf.open .rtf--ab__c:nth-child(4).top{transform:translateY(240px) scale(1)}.rtf.open .rtf--ab__c:nth-child(5){transform:translateY(-300px) scale(1);transition-delay:.18s}.rtf.open .rtf--ab__c:nth-child(5).top{transform:translateY(300px) scale(1)}.rtf.open .rtf--ab__c:nth-child(6){transform:translateY(-360px) scale(1);transition-delay:.21s}.rtf.open .rtf--ab__c:nth-child(6).top{transform:translateY(360px) scale(1)}.rtf--mb__c{padding:25px;margin:-25px}.rtf--mb__c *:last-child{margin-bottom:0}.rtf--mb__c:hover>span{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span.always-show{transition:ease-in-out opacity .2s;opacity:.9}.rtf--mb__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;transform:translateY(-50%);margin-right:6px;margin-left:4px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--mb__c>span.right{right:100%}.rtf--mb{width:48px;height:48px;background:var(--btn-bg);z-index:9999;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:18px}.rtf--mb>*{transition:ease-in-out transform .2s}.rtf--ab__c{display:block;position:absolute;top:0;right:1px;padding:10px 0;margin:-10px 0;transition:ease-in-out transform .2s}.rtf--ab__c>span{opacity:0;transition:ease-in-out opacity .2s;position:absolute;top:50%;transform:translateY(-50%);margin-right:6px;background:rgba(0,0,0,.75);padding:2px 4px;border-radius:2px;color:#fff;font-size:13px;box-shadow:0 0 4px #00000024,0 4px 8px #00000047}.rtf--ab__c>span.right{right:100%}.rtf--ab__c:nth-child(1){transform:translateY(-60px) scale(0);transition-delay:.21s}.rtf--ab__c:nth-child(1).top{transform:translateY(60px) scale(0)}.rtf--ab__c:nth-child(2){transform:translateY(-120px) scale(0);transition-delay:.18s}.rtf--ab__c:nth-child(2).top{transform:translateY(120px) scale(0)}.rtf--ab__c:nth-child(3){transform:translateY(-180px) scale(0);transition-delay:.15s}.rtf--ab__c:nth-child(3).top{transform:translateY(180px) scale(0)}.rtf--ab__c:nth-child(4){transform:translateY(-240px) scale(0);transition-delay:.12s}.rtf--ab__c:nth-child(4).top{transform:translateY(240px) scale(0)}.rtf--ab__c:nth-child(5){transform:translateY(-300px) scale(0);transition-delay:.09s}.rtf--ab__c:nth-child(5).top{transform:translateY(300px) scale(0)}.rtf--ab__c:nth-child(6){transform:translateY(-360px) scale(0);transition-delay:.03s}.rtf--ab__c:nth-child(6).top{transform:translateY(360px) scale(0)}.rtf--ab{height:40px;width:40px;margin-right:4px;background-color:#aaa;display:inline-flex;justify-content:center;align-items:center;position:relative;border:none;border-radius:50%;box-shadow:0 0 4px #00000024,0 4px 8px #00000047;cursor:pointer;outline:none;padding:0;-webkit-user-drag:none;font-weight:700;color:#f1f1f1;font-size:16px;z-index:10000}.rtf--ab:hover{background:#387cec;border:1px solid #387cec;color:#fff}.rtf--ab:focus{border-color:var(--color-focus-blue)}._spining_4i8sg_1{position:relative;border-radius:50%;background:linear-gradient(60deg,#e66465,#9198e5);width:48px;height:48px;display:flex;justify-content:center;align-items:center}._spining_4i8sg_1:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;border:2px solid transparent;border-top-color:currentColor;border-radius:50%;animation:_spining_keyframes_4i8sg_1 1s linear infinite}@keyframes _spining_keyframes_4i8sg_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Fab-8003d842.js b/FILES/etc/config/clash/clash-dashboard/assets/Fab-aebb033d.js similarity index 96% rename from FILES/etc/config/clash/clash-dashboard/assets/Fab-8003d842.js rename to FILES/etc/config/clash/clash-dashboard/assets/Fab-aebb033d.js index 096f468..5943002 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Fab-8003d842.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Fab-aebb033d.js @@ -1 +1 @@ -import{j as t,h as C,r as l}from"./index-dcea5d2f.js";const E="_spining_4i8sg_1",I="_spining_keyframes_4i8sg_1",y={spining:E,spining_keyframes:I},{useState:F}=C;function A({children:n}){return t.jsx("span",{className:y.spining,children:n})}const B={right:10,bottom:10},R=({children:n,...e})=>t.jsx("button",{type:"button",...e,className:"rtf--ab",children:n}),M=({children:n,...e})=>t.jsx("button",{type:"button",className:"rtf--mb",...e,children:n}),v={bottom:24,right:24},H=({event:n="hover",style:e=v,alwaysShowTitle:o=!1,children:b,icon:f,mainButtonStyles:g,onClick:p,text:u,...x})=>{const[a,r]=F(!1),c=o||!a,d=()=>r(!0),m=()=>r(!1),h=()=>n==="hover"&&d(),_=()=>n==="hover"&&m(),j=s=>p?p(s):(s.persist(),n==="click"?a?m():d():null),k=(s,i)=>{s.persist(),r(!1),setTimeout(()=>{i(s)},1)},N=()=>l.Children.map(b,(s,i)=>l.isValidElement(s)?t.jsxs("li",{className:`rtf--ab__c ${"top"in e?"top":""}`,children:[l.cloneElement(s,{"data-testid":`action-button-${i}`,"aria-label":s.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...s.props,onClick:$=>{s.props.onClick&&k($,s.props.onClick)}}),s.props.text&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:s.props.text})]}):null);return t.jsx("ul",{onMouseEnter:h,onMouseLeave:_,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:e,...x,children:t.jsxs("li",{className:"rtf--mb__c",children:[t.jsx(M,{onClick:j,style:g,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:f}),u&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:u}),t.jsx("ul",{children:N()})]})})};export{R as A,H as F,A as I,B as p}; +import{j as t,h as C,r as l}from"./index-17fa2fa5.js";const E="_spining_4i8sg_1",I="_spining_keyframes_4i8sg_1",y={spining:E,spining_keyframes:I},{useState:F}=C;function A({children:n}){return t.jsx("span",{className:y.spining,children:n})}const B={right:10,bottom:10},R=({children:n,...e})=>t.jsx("button",{type:"button",...e,className:"rtf--ab",children:n}),M=({children:n,...e})=>t.jsx("button",{type:"button",className:"rtf--mb",...e,children:n}),v={bottom:24,right:24},H=({event:n="hover",style:e=v,alwaysShowTitle:o=!1,children:b,icon:f,mainButtonStyles:g,onClick:p,text:u,...x})=>{const[a,r]=F(!1),c=o||!a,d=()=>r(!0),m=()=>r(!1),h=()=>n==="hover"&&d(),_=()=>n==="hover"&&m(),j=s=>p?p(s):(s.persist(),n==="click"?a?m():d():null),k=(s,i)=>{s.persist(),r(!1),setTimeout(()=>{i(s)},1)},N=()=>l.Children.map(b,(s,i)=>l.isValidElement(s)?t.jsxs("li",{className:`rtf--ab__c ${"top"in e?"top":""}`,children:[l.cloneElement(s,{"data-testid":`action-button-${i}`,"aria-label":s.props.text||`Menu button ${i+1}`,"aria-hidden":c,tabIndex:a?0:-1,...s.props,onClick:$=>{s.props.onClick&&k($,s.props.onClick)}}),s.props.text&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:s.props.text})]}):null);return t.jsx("ul",{onMouseEnter:h,onMouseLeave:_,className:`rtf ${a?"open":"closed"}`,"data-testid":"fab",style:e,...x,children:t.jsxs("li",{className:"rtf--mb__c",children:[t.jsx(M,{onClick:j,style:g,"data-testid":"main-button",role:"button","aria-label":"Floating menu",tabIndex:0,children:f}),u&&t.jsx("span",{className:`${"right"in e?"right":""} ${o?"always-show":""}`,"aria-hidden":c,children:u}),t.jsx("ul",{children:N()})]})})};export{R as A,H as F,A as I,B as p}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Logs-4b8e75d1.css b/FILES/etc/config/clash/clash-dashboard/assets/Logs-4b8e75d1.css deleted file mode 100644 index 821aba4..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Logs-4b8e75d1.css +++ /dev/null @@ -1 +0,0 @@ -._RuleSearch_1oz2t_1{padding:0 40px 5px}._RuleSearchContainer_1oz2t_5{position:relative;height:40px}._inputWrapper_1oz2t_10{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:0;width:100%}._input_1oz2t_10{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._iconWrapper_1oz2t_35{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);left:10px;display:flex;justify-content:center;align-items:center}._logMeta_7a1x3_1{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em}._logType_7a1x3_8{color:#eee;flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_7a1x3_18{flex-shrink:0;color:#999;font-size:14px}._logText_7a1x3_24{flex-shrink:0;display:flex;font-family:Roboto Mono,Menlo,monospace;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._logsWrapper_7a1x3_37{margin:0;padding:0;color:var(--color-text)}._logsWrapper_7a1x3_37 .log{padding:10px 40px;background:var(--color-background)}._logsWrapper_7a1x3_37 .log.even{background:var(--color-background)}._logPlaceholder_7a1x3_51{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_7a1x3_51 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_7a1x3_64{opacity:.3}._search_7a1x3_68{max-width:1000px} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Logs-5e5ee0ad.css b/FILES/etc/config/clash/clash-dashboard/assets/Logs-5e5ee0ad.css new file mode 100644 index 0000000..5fb020e --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Logs-5e5ee0ad.css @@ -0,0 +1 @@ +._RuleSearch_bd30s_1{padding:0 40px 5px}._RuleSearchContainer_bd30s_5{position:relative;height:40px}._inputWrapper_bd30s_10{position:absolute;top:50%;transform:translateY(-50%);left:0;width:100%}._input_bd30s_10{-moz-appearance:none;appearance:none;-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 15px 0 35px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._iconWrapper_bd30s_36{position:absolute;top:50%;transform:translateY(-50%);left:10px;display:flex;justify-content:center;align-items:center}._logMeta_7a1x3_1{display:flex;align-items:center;flex-wrap:wrap;font-size:.9em}._logType_7a1x3_8{color:#eee;flex-shrink:0;text-align:center;width:66px;border-radius:100px;padding:3px 5px;margin:0 8px}._logTime_7a1x3_18{flex-shrink:0;color:#999;font-size:14px}._logText_7a1x3_24{flex-shrink:0;display:flex;font-family:Roboto Mono,Menlo,monospace;align-items:center;padding:8px 0;width:100%;white-space:pre;overflow:auto}._logsWrapper_7a1x3_37{margin:0;padding:0;color:var(--color-text)}._logsWrapper_7a1x3_37 .log{padding:10px 40px;background:var(--color-background)}._logsWrapper_7a1x3_37 .log.even{background:var(--color-background)}._logPlaceholder_7a1x3_51{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#2d2d30}._logPlaceholder_7a1x3_51 div:nth-child(2){color:var(--color-text-secondary);font-size:1.4em;opacity:.6}._logPlaceholderIcon_7a1x3_64{opacity:.3}._search_7a1x3_68{max-width:1000px} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Logs-9c71a415.js b/FILES/etc/config/clash/clash-dashboard/assets/Logs-9c71a415.js new file mode 100644 index 0000000..9cbe927 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Logs-9c71a415.js @@ -0,0 +1 @@ +import{r as u,R as x,P as d,j as t,b as y,E as R,F as T,w as P,G as w,u as L,C as N,S as C,H as W,J as O,g as k,K as z,h as I,c as E}from"./index-17fa2fa5.js";import{a as F,F as M}from"./index.esm-cd2d54ba.js";import{r as $,s as H,f as A}from"./logs-367bea05.js";import{d as B}from"./debounce-c1ba2006.js";import{u as D}from"./useRemainingViewPortHeight-0cb185fe.js";import{F as K,p as q}from"./Fab-aebb033d.js";import{P as G,a as J}from"./play-3d48a080.js";function f(){return f=Object.assign||function(e){for(var r=1;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function Y(e,r){if(e==null)return{};var s={},o=Object.keys(e),a,n;for(n=0;n=0)&&(s[a]=e[a]);return s}var _=u.forwardRef(function(e,r){var s=e.color,o=s===void 0?"currentColor":s,a=e.size,n=a===void 0?24:a,l=V(e,["color","size"]);return x.createElement("svg",f({ref:r,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),x.createElement("circle",{cx:"11",cy:"11",r:"8"}),x.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});_.propTypes={color:d.string,size:d.oneOfType([d.string,d.number])};_.displayName="Search";const Q=_,U="_RuleSearch_bd30s_1",X="_RuleSearchContainer_bd30s_5",Z="_inputWrapper_bd30s_10",ee="_input_bd30s_10",te="_iconWrapper_bd30s_36",p={RuleSearch:U,RuleSearchContainer:X,inputWrapper:Z,input:ee,iconWrapper:te};function se({dispatch:e,searchText:r,updateSearchText:s}){const[o,a]=u.useState(r),n=u.useCallback(i=>{e(s(i))},[e,s]),l=u.useMemo(()=>B(n,300),[n]),g=i=>{a(i.target.value),l(i.target.value)};return t.jsx("div",{className:p.RuleSearch,children:t.jsxs("div",{className:p.RuleSearchContainer,children:[t.jsx("div",{className:p.inputWrapper,children:t.jsx("input",{type:"text",value:o,onChange:g,className:p.input})}),t.jsx("div",{className:p.iconWrapper,children:t.jsx(Q,{size:20})})]})})}const oe=e=>({searchText:R(e),updateSearchText:T}),re=y(oe)(se),ae="_logMeta_7a1x3_1",ne="_logType_7a1x3_8",ce="_logTime_7a1x3_18",ie="_logText_7a1x3_24",le="_logsWrapper_7a1x3_37",pe="_logPlaceholder_7a1x3_51",ge="_logPlaceholderIcon_7a1x3_64",he="_search_7a1x3_68",c={logMeta:ae,logType:ne,logTime:ce,logText:ie,logsWrapper:le,logPlaceholder:pe,logPlaceholderIcon:ge,search:he},{useCallback:v,memo:de,useEffect:ue}=I,m=30,xe={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function me({time:e,even:r,payload:s,type:o}){const a=E({even:r},"log");return t.jsx("div",{className:a,children:t.jsxs("div",{className:c.logMeta,children:[t.jsx("div",{className:c.logTime,children:e}),t.jsx("div",{className:c.logType,style:{backgroundColor:xe[o]},children:o}),t.jsx("div",{className:c.logText,children:s})]})})}function fe(e,r){return r[e].id}const b=de(({index:e,style:r,data:s})=>{const o=s[e];return t.jsx("div",{style:r,children:t.jsx(me,{...o})})},F);b.displayName="MemoRow";function _e({dispatch:e,logLevel:r,apiConfig:s,logs:o,logStreamingPaused:a}){const n=P(),l=v(()=>{a?$({...s,logLevel:r}):H(),n.app.updateAppConfig("logStreamingPaused",!a)},[s,r,a,n.app]),g=v(S=>e(w(S)),[e]);ue(()=>{A({...s,logLevel:r},g)},[s,r,g]);const[i,j]=D(),{t:h}=L();return t.jsxs("div",{children:[t.jsx(N,{title:h("Logs")}),t.jsx("div",{className:c.search,children:t.jsx(re,{})}),t.jsx("div",{ref:i,style:{paddingBottom:m},children:o.length===0?t.jsxs("div",{className:c.logPlaceholder,style:{height:j-m},children:[t.jsx("div",{className:c.logPlaceholderIcon,children:t.jsx(C,{width:200,height:200})}),t.jsx("div",{children:h("no_logs")})]}):t.jsxs("div",{className:c.logsWrapper,children:[t.jsx(M,{height:j-m,width:"100%",itemCount:o.length,itemSize:80,itemData:o,itemKey:fe,children:b}),t.jsx(K,{icon:a?t.jsx(G,{size:16}):t.jsx(J,{size:16}),mainButtonStyles:a?{background:"#e74c3c"}:{},style:q,text:h(a?"Resume Refresh":"Pause Refresh"),onClick:l})]})})]})}const je=e=>({logs:W(e),logLevel:O(e),apiConfig:k(e),logStreamingPaused:z(e)}),we=y(je)(_e);export{we as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Logs-c88cdced.js b/FILES/etc/config/clash/clash-dashboard/assets/Logs-c88cdced.js deleted file mode 100644 index a864daf..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Logs-c88cdced.js +++ /dev/null @@ -1 +0,0 @@ -import{r as d,R as x,P as u,j as t,d as y,A as R,D as T,w as P,E as w,u as L,C as N,S as z,F as C,G as W,g as O,H as k,h as I,c as E}from"./index-dcea5d2f.js";import{a as F,F as M}from"./index.esm-fff1f13f.js";import{r as $,s as A,f as D}from"./logs-9e380b83.js";import{d as H}from"./debounce-c1ba2006.js";import{u as B}from"./useRemainingViewPortHeight-054801fd.js";import{F as q,p as G}from"./Fab-8003d842.js";import{P as K,a as V}from"./play-263403e0.js";function f(){return f=Object.assign||function(e){for(var r=1;r=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(o[s]=e[s])}return o}function J(e,r){if(e==null)return{};var o={},s=Object.keys(e),a,n;for(n=0;n=0)&&(o[a]=e[a]);return o}var _=d.forwardRef(function(e,r){var o=e.color,s=o===void 0?"currentColor":o,a=e.size,n=a===void 0?24:a,l=Y(e,["color","size"]);return x.createElement("svg",f({ref:r,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),x.createElement("circle",{cx:"11",cy:"11",r:"8"}),x.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}))});_.propTypes={color:u.string,size:u.oneOfType([u.string,u.number])};_.displayName="Search";const Q=_,U="_RuleSearch_1oz2t_1",X="_RuleSearchContainer_1oz2t_5",Z="_inputWrapper_1oz2t_10",ee="_input_1oz2t_10",te="_iconWrapper_1oz2t_35",p={RuleSearch:U,RuleSearchContainer:X,inputWrapper:Z,input:ee,iconWrapper:te};function oe({dispatch:e,searchText:r,updateSearchText:o}){const[s,a]=d.useState(r),n=d.useCallback(i=>{e(o(i))},[e,o]),l=d.useMemo(()=>H(n,300),[n]),g=i=>{a(i.target.value),l(i.target.value)};return t.jsx("div",{className:p.RuleSearch,children:t.jsxs("div",{className:p.RuleSearchContainer,children:[t.jsx("div",{className:p.inputWrapper,children:t.jsx("input",{type:"text",value:s,onChange:g,className:p.input})}),t.jsx("div",{className:p.iconWrapper,children:t.jsx(Q,{size:20})})]})})}const se=e=>({searchText:R(e),updateSearchText:T}),re=y(se)(oe),ae="_logMeta_7a1x3_1",ne="_logType_7a1x3_8",ce="_logTime_7a1x3_18",ie="_logText_7a1x3_24",le="_logsWrapper_7a1x3_37",pe="_logPlaceholder_7a1x3_51",ge="_logPlaceholderIcon_7a1x3_64",he="_search_7a1x3_68",c={logMeta:ae,logType:ne,logTime:ce,logText:ie,logsWrapper:le,logPlaceholder:pe,logPlaceholderIcon:ge,search:he},{useCallback:v,memo:ue,useEffect:de}=I,m=30,xe={debug:"#28792c",info:"var(--bg-log-info-tag)",warning:"#b99105",error:"#c11c1c"};function me({time:e,even:r,payload:o,type:s}){const a=E({even:r},"log");return t.jsx("div",{className:a,children:t.jsxs("div",{className:c.logMeta,children:[t.jsx("div",{className:c.logTime,children:e}),t.jsx("div",{className:c.logType,style:{backgroundColor:xe[s]},children:s}),t.jsx("div",{className:c.logText,children:o})]})})}function fe(e,r){return r[e].id}const S=ue(({index:e,style:r,data:o})=>{const s=o[e];return t.jsx("div",{style:r,children:t.jsx(me,{...s})})},F);S.displayName="MemoRow";function _e({dispatch:e,logLevel:r,apiConfig:o,logs:s,logStreamingPaused:a}){const n=P(),l=v(()=>{a?$({...o,logLevel:r}):A(),n.app.updateAppConfig("logStreamingPaused",!a)},[o,r,a,n.app]),g=v(b=>e(w(b)),[e]);de(()=>{D({...o,logLevel:r},g)},[o,r,g]);const[i,j]=B(),{t:h}=L();return t.jsxs("div",{children:[t.jsx(N,{title:h("Logs")}),t.jsx("div",{className:c.search,children:t.jsx(re,{})}),t.jsx("div",{ref:i,style:{paddingBottom:m},children:s.length===0?t.jsxs("div",{className:c.logPlaceholder,style:{height:j-m},children:[t.jsx("div",{className:c.logPlaceholderIcon,children:t.jsx(z,{width:200,height:200})}),t.jsx("div",{children:h("no_logs")})]}):t.jsxs("div",{className:c.logsWrapper,children:[t.jsx(M,{height:j-m,width:"100%",itemCount:s.length,itemSize:80,itemData:s,itemKey:fe,children:S}),t.jsx(q,{icon:a?t.jsx(K,{size:16}):t.jsx(V,{size:16}),mainButtonStyles:a?{background:"#e74c3c"}:{},style:G,text:h(a?"Resume Refresh":"Pause Refresh"),onClick:l})]})})]})}const je=e=>({logs:C(e),logLevel:W(e),apiConfig:O(e),logStreamingPaused:k(e)}),we=y(je)(_e);export{we as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-1a2faf73.js b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-1a2faf73.js deleted file mode 100644 index 527d970..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-1a2faf73.js +++ /dev/null @@ -1 +0,0 @@ -import{r as _,R as z,P as k,c as L,N as ye,j as s,B as v,h as y,O as me,Q as fe,T as Q,U as J,d as b,V as je,W as _e,X as ee,Y as R,w as $,Z as ve,_ as te,$ as A,a0 as se,a1 as E,a2 as H,a3 as ge,a4 as be,u as U,a5 as we,a6 as Ce,a7 as Pe,g as ne,C as re,x as K,a8 as ke,a9 as Se,aa as Ne,ab as Ae,ac as Le}from"./index-dcea5d2f.js";import{C as $e,B as V}from"./BaseModal-29d7cf7b.js";import{F as Oe,p as Te,A as Be,I as De}from"./Fab-8003d842.js";import{R as Fe,a as Ie,T as Re}from"./TextFilter-5cf71eda.js";import{f as Ee}from"./index-759f7e71.js";import{S as He}from"./Select-29e929fc.js";import"./debounce-c1ba2006.js";function I(){return I=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var q=_.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,c=Ue(e,["color","size"]);return z.createElement("svg",I({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),z.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))});q.propTypes={color:k.string,size:k.oneOfType([k.string,k.number])};q.displayName="Zap";const W=q;function oe(e){const t=e.size||24,n=L({[ye.animate]:e.animate});return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Me="_FlexCenter_1380a_1",ze={FlexCenter:Me};function Ke({children:e}){return s.jsx("div",{className:ze.FlexCenter,children:e})}const{useRef:Z,useEffect:Ve}=y;function We({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=Z(null),r=Z(null);Ve(()=>{n.current.focus()},[]);const o=a=>{a.code==="ArrowRight"?r.current.focus():a.code==="ArrowLeft"&&n.current.focus()};return s.jsxs("div",{onKeyDown:o,children:[s.jsx("h2",{children:"Close Connections?"}),s.jsx("p",{children:"Click [Yes] to close those connections that are still using the old selected proxy in this group"}),s.jsx("div",{style:{height:30}}),s.jsxs(Ke,{children:[s.jsx(v,{onClick:e,ref:n,children:"Yes"}),s.jsx("div",{style:{width:20}}),s.jsx(v,{onClick:t,ref:r,children:"No"})]})]})}const Ze="_header_1y9js_1",Ge="_arrow_1y9js_8",Ye="_isOpen_1y9js_13",Xe="_btn_1y9js_20",Qe="_qty_1y9js_25",w={header:Ze,arrow:Ge,isOpen:Ye,btn:Xe,qty:Qe};function ae({name:e,type:t,toggle:n,isOpen:r,qty:o}){const a=_.useCallback(c=>{c.preventDefault(),(c.key==="Enter"||c.key===" ")&&n()},[n]);return s.jsxs("div",{className:w.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[s.jsx("div",{children:s.jsx(me,{name:e,type:t})}),typeof o=="number"?s.jsx("span",{className:w.qty,children:o}):null,s.jsx(v,{kind:"minimal",onClick:n,className:w.btn,title:"Toggle collapsible section",children:s.jsx("span",{className:L(w.arrow,{[w.isOpen]:r}),children:s.jsx($e,{size:20})})})]})}const{useMemo:Je}=y;function et(e,t){return e.filter(n=>{const r=t[n];return r===void 0?!0:r.number!==0})}const S=(e,t)=>{if(e&&typeof e.number=="number"&&e.number>0)return e.number;const n=t&&t.type;return n&&J.indexOf(n)>-1?-1:999999},tt={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((r,o)=>{const a=S(t[r],n&&n[r]),c=S(t[o],n&&n[o]);return a-c}),LatencyDesc:(e,t,n)=>e.sort((r,o)=>{const a=S(t[r],n&&n[r]);return S(t[o],n&&n[o])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:tr.trim()).filter(r=>!!r);return n.length===0?e:e.filter(r=>{let o=0;for(;o-1)return!0}return!1})}function nt(e,t,n,r,o,a){let c=[...e];return n&&(c=et(e,t)),typeof r=="string"&&r!==""&&(c=st(c,r)),tt[o](c,t,a)}function ce(e,t,n,r,o){const[a]=fe(Q);return Je(()=>nt(e,t,n,a,r,o),[e,t,n,a,r,o])}const rt="_header_5pmv2_1",ot="_groupHead_5pmv2_5",at="_action_5pmv2_11",B={header:rt,groupHead:ot,action:at},ct="_proxy_ryc3j_1",it="_now_ryc3j_25",lt="_error_ryc3j_29",ut="_selectable_ryc3j_32",dt="_proxyType_ryc3j_40",xt="_row_ryc3j_51",pt="_proxyName_ryc3j_57",ht="_proxySmall_ryc3j_66",h={proxy:ct,now:it,error:lt,selectable:ut,proxyType:dt,row:xt,proxyName:pt,proxySmall:ht},yt="_proxyLatency_pw0sa_1",mt={proxyLatency:yt};function ft({latency:e,color:t}){let n=" ";if(e)switch(e.kind){case"Error":case"Testing":n="- ms";break;case"Result":n=(e.number!==0?e.number:"-")+" ms";break}return s.jsx("span",{className:mt.proxyLatency,style:{color:t},children:n})}const{useMemo:P}=y,g={good:"#67c23a",normal:"#d4b75c",bad:"#e67f3c",na:"#909399"};function ie(e){if(!e||e.kind!=="Result")return g.na;const t=e.number;return t===0?g.na:t<200?g.good:t<400?g.normal:typeof t=="number"?g.bad:g.na}function jt(e,t){return J.indexOf(t)>-1?{border:"1px dotted #777"}:{background:ie(e)}}function _t({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const c=P(()=>jt(r,n.type),[r,n]),i=P(()=>{let u=t;return r&&r.kind==="Result"&&typeof r.number=="number"&&(u+=" "+r.number+" ms"),u},[t,r]),l=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),d=P(()=>L(h.proxySmall,{[h.now]:e,[h.selectable]:o}),[o,e]),x=_.useCallback(u=>{u.key==="Enter"&&l()},[l]);return s.jsx("div",{title:i,className:d,style:c,onClick:l,onKeyDown:x,role:o?"menuitem":""})}function vt(e){return e==="Shadowsocks"?"SS":e}const gt=e=>({left:e.left+window.scrollX-5,top:e.top+window.scrollY-38});function bt({children:e,label:t,"aria-label":n}){const[r,o]=je();return s.jsxs(s.Fragment,{children:[_.cloneElement(e,r),s.jsx(_e,{...o,label:t,"aria-label":n,position:gt})]})}function wt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const c=P(()=>ie(r),[r]),i=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),l=_.useCallback(x=>{x.key==="Enter"&&i()},[i]),d=P(()=>L(h.proxy,{[h.now]:e,[h.selectable]:o}),[o,e]);return s.jsxs("div",{tabIndex:0,className:d,onClick:i,onKeyDown:l,role:o?"menuitem":"",children:[s.jsx("div",{className:h.proxyName,children:s.jsx(bt,{label:t,"aria-label":"proxy name: "+t,children:s.jsx("span",{children:t})})}),s.jsxs("div",{className:h.row,children:[s.jsx("span",{className:h.proxyType,style:{opacity:e?.6:.2},children:vt(n.type)}),s.jsx(ft,{latency:r,color:c})]})]})}const le=(e,{name:t})=>{const n=ee(e),r=R(e);return{proxy:n[t]||{name:t,type:"Unknown",history:[]},latency:r[t]}},Ct=b(le)(wt),Pt=b(le)(_t),kt="_list_1oy7w_1",St="_listSummaryView_1oy7w_8",ue={list:kt,listSummaryView:St};function de({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){const o=e;return s.jsx("div",{className:ue.list,children:o.map(a=>s.jsx(Ct,{onClick:r,isSelectable:n,name:a,now:a===t},a))})}function xe({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){return s.jsx("div",{className:ue.listSummaryView,children:e.map(o=>s.jsx(Pt,{onClick:r,isSelectable:n,name:o,now:o===t},o))})}const{createElement:Nt,useCallback:D,useMemo:At}=y;function Lt({name:e,all:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,proxies:a,type:c,now:i,isOpen:l,apiConfig:d,dispatch:x}){const u=ce(t,n,r,o,a),f=At(()=>c==="Selector",[c]),{app:{updateCollapsibleIsOpen:j},proxies:{requestDelayForProxies:p}}=$(),O=D(()=>{j("proxyGroup",e,!l)},[l,j,e]),T=D(M=>{f&&x(ve(d,e,M))},[d,x,e,f]),m=te(!1),he=D(async()=>{if(!m.value){m.set(!0);try{await p(d,u)}catch{}m.set(!1)}},[u,d,p,m]);return s.jsxs("div",{className:B.group,children:[s.jsxs("div",{className:B.groupHead,children:[s.jsx(ae,{name:e,type:c,toggle:O,qty:u.length,isOpen:l}),s.jsx("div",{className:B.action,children:s.jsx(A,{label:"Test latency",children:s.jsx(v,{kind:"circular",onClick:he,children:s.jsx(oe,{animate:m.value,size:16})})})})]}),Nt(l?de:xe,{all:u,now:i,isSelectable:f,itemOnTapCallback:T})]})}const $t=b((e,{name:t,delay:n})=>{const r=ee(e),o=se(e),a=E(e),c=H(e),i=r[t],{all:l,type:d,now:x}=i;return{all:l,delay:n,hideUnavailableProxies:c,proxySortBy:a,proxies:r,type:d,now:x,isOpen:o[`proxyGroup:${t}`]}})(Lt),{useCallback:pe,useState:Ot}=y;function Tt({dispatch:e,apiConfig:t,name:n}){return pe(()=>e(ge(t,n)),[t,e,n])}function Bt({dispatch:e,apiConfig:t,names:n}){const[r,o]=Ot(!1);return[pe(async()=>{if(!r){o(!0);try{await e(be(t,n))}catch{}o(!1)}},[t,e,n,r]),r]}const{useState:Dt,useCallback:Ft}=y;function It({isLoading:e}){return e?s.jsx(De,{children:s.jsx(W,{width:16,height:16})}):s.jsx(W,{width:16,height:16})}function Rt({dispatch:e,apiConfig:t}){const[n,r]=Dt(!1);return[Ft(()=>{n||(r(!0),e(we(t)).then(()=>r(!1),()=>r(!1)))},[t,e,n]),n]}function Et({dispatch:e,apiConfig:t,proxyProviders:n}){const{t:r}=U(),[o,a]=Rt({dispatch:e,apiConfig:t}),[c,i]=Bt({apiConfig:t,dispatch:e,names:n.map(l=>l.name)});return s.jsx(Oe,{icon:s.jsx(It,{isLoading:a}),onClick:o,text:r("Test Latency"),style:Te,children:n.length>0?s.jsx(Be,{text:r("update_all_proxy_provider"),onClick:c,children:s.jsx(Fe,{isRotating:i})}):null})}const Ht="_updatedAt_919yi_1",Ut="_main_919yi_8",qt="_head_919yi_17",Mt="_action_919yi_23",zt="_refresh_919yi_31",C={updatedAt:Ht,main:Ut,head:qt,action:Mt,refresh:zt},{useCallback:G}=y;function Kt({name:e,proxies:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,vehicleType:a,updatedAt:c,isOpen:i,dispatch:l,apiConfig:d}){const x=ce(t,n,r,o),u=te(!1),f=Tt({dispatch:l,apiConfig:d,name:e}),j=G(()=>{if(u.value)return;u.set(!0);const m=()=>u.set(!1);l(Ce(d,e)).then(m,m)},[d,l,e,u]),{app:{updateCollapsibleIsOpen:p}}=$(),O=G(()=>{p("proxyProvider",e,!i)},[i,p,e]),T=Ee(new Date(c),new Date);return s.jsxs("div",{className:C.main,children:[s.jsxs("div",{className:C.head,children:[s.jsx(ae,{name:e,toggle:O,type:a,isOpen:i,qty:x.length}),s.jsxs("div",{className:C.action,children:[s.jsx(A,{label:"Update",children:s.jsx(v,{kind:"circular",onClick:f,children:s.jsx(Zt,{})})}),s.jsx(A,{label:"Health Check",children:s.jsx(v,{kind:"circular",onClick:j,children:s.jsx(oe,{animate:u.value,size:16})})})]})]}),s.jsx("div",{className:C.updatedAt,children:s.jsxs("small",{children:["Updated ",T," ago"]})}),i?s.jsx(de,{all:x}):s.jsx(xe,{all:x})]})}const Vt={rest:{scale:1},pressed:{scale:.95}},Wt={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function Zt(){const t=Pe.read().motion;return s.jsx(t.div,{className:C.refresh,variants:Vt,initial:"rest",whileHover:"hover",whileTap:"pressed",children:s.jsx(t.div,{className:"flexCenter",variants:Wt,children:s.jsx(Ie,{size:16})})})}const Gt=(e,{proxies:t,name:n})=>{const r=H(e),o=R(e),a=se(e),c=ne(e),i=E(e);return{apiConfig:c,proxies:t,delay:o,hideUnavailableProxies:r,proxySortBy:i,isOpen:a[`proxyProvider:${n}`]}},Yt=b(Gt)(Kt);function Xt({items:e}){return e.length===0?null:s.jsxs(s.Fragment,{children:[s.jsx(re,{title:"Proxy Provider"}),s.jsx("div",{children:e.map(t=>s.jsx(Yt,{name:t.name,proxies:t.proxies,type:t.type,vehicleType:t.vehicleType,updatedAt:t.updatedAt},t.name))})]})}const Qt="_labeledInput_cmki0_1",F={labeledInput:Qt},Jt=[["Natural","order_natural"],["LatencyAsc","order_latency_asc"],["LatencyDesc","order_latency_desc"],["NameAsc","order_name_asc"],["NameDesc","order_name_desc"]],{useCallback:Y}=y;function es({appConfig:e}){const{app:{updateAppConfig:t}}=$(),n=Y(a=>{t("proxySortBy",a.target.value)},[t]),r=Y(a=>{t("hideUnavailableProxies",a)},[t]),{t:o}=U();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("sort_in_grp")}),s.jsx("div",{children:s.jsx(He,{options:Jt.map(a=>[a[0],o(a[1])]),selected:e.proxySortBy,onChange:n})})]}),s.jsx("hr",{}),s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("hide_unavail_proxies")}),s.jsx("div",{children:s.jsx(K,{name:"hideUnavailableProxies",checked:e.hideUnavailableProxies,onChange:r})})]}),s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("auto_close_conns")}),s.jsx("div",{children:s.jsx(K,{name:"autoCloseOldConns",checked:e.autoCloseOldConns,onChange:a=>t("autoCloseOldConns",a)})})]})]})}const ts=e=>{const t=E(e),n=H(e),r=ke(e);return{appConfig:{proxySortBy:t,hideUnavailableProxies:n,autoCloseOldConns:r}}},ss=b(ts)(es);function ns({color:e="currentColor",size:t=24}){return s.jsxs("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M2 6h9M18.5 6H22"}),s.jsx("circle",{cx:"16",cy:"6",r:"2"}),s.jsx("path",{d:"M22 18h-9M6 18H2"}),s.jsx("circle",{r:"2",transform:"matrix(-1 0 0 1 8 18)"})]})}const rs="_topBar_16fpp_1",os="_topBarRight_16fpp_13",as="_textFilterContainer_16fpp_22",cs="_group_16fpp_29",N={topBar:rs,topBarRight:os,textFilterContainer:as,group:cs},{useState:is,useEffect:ls,useCallback:X,useRef:us}=y;function ds({dispatch:e,groupNames:t,delay:n,proxyProviders:r,apiConfig:o,showModalClosePrevConns:a}){const c=us({}),i=X(()=>{c.current.startAt=Date.now(),e(Se(o)).then(()=>{c.current.completeAt=Date.now()})},[o,e]);ls(()=>{i();const p=()=>{c.current.startAt&&Date.now()-c.current.startAt>3e4&&i()};return window.addEventListener("focus",p,!1),()=>window.removeEventListener("focus",p,!1)},[i]);const[l,d]=is(!1),x=X(()=>{d(!1)},[]),{proxies:{closeModalClosePrevConns:u,closePrevConnsAndTheModal:f}}=$(),{t:j}=U();return s.jsxs(s.Fragment,{children:[s.jsx(V,{isOpen:l,onRequestClose:x,children:s.jsx(ss,{})}),s.jsxs("div",{className:N.topBar,children:[s.jsx(re,{title:j("Proxies")}),s.jsxs("div",{className:N.topBarRight,children:[s.jsx("div",{className:N.textFilterContainer,children:s.jsx(Re,{textAtom:Q})}),s.jsx(A,{label:j("settings"),children:s.jsx(v,{kind:"minimal",onClick:()=>d(!0),children:s.jsx(ns,{size:16})})})]})]}),s.jsx("div",{children:t.map(p=>s.jsx("div",{className:N.group,children:s.jsx($t,{name:p,delay:n,apiConfig:o,dispatch:e})},p))}),s.jsx(Xt,{items:r}),s.jsx("div",{style:{height:60}}),s.jsx(Et,{dispatch:e,apiConfig:o,proxyProviders:r}),s.jsx(V,{isOpen:a,onRequestClose:u,children:s.jsx(We,{onClickPrimaryButton:()=>f(o),onClickSecondaryButton:u})})]})}const xs=e=>({apiConfig:ne(e),groupNames:Ne(e),proxyProviders:Ae(e),delay:R(e),showModalClosePrevConns:Le(e)}),vs=b(xs)(ds);export{vs as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-40f80166.css b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-40f80166.css new file mode 100644 index 0000000..c032dbb --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-40f80166.css @@ -0,0 +1 @@ +._FlexCenter_1380a_1{display:flex;justify-content:center;align-items:center}._header_1y9js_1{display:flex;align-items:center}._header_1y9js_1:focus{outline:none}._header_1y9js_1 ._arrow_1y9js_8{display:inline-flex;transform:rotate(0);transition:transform .3s}._header_1y9js_1 ._arrow_1y9js_8._isOpen_1y9js_13{transform:rotate(180deg)}._header_1y9js_1 ._arrow_1y9js_8:focus{outline:var(--color-focus-blue) solid 1px}._btn_1y9js_20{margin-left:5px}._qty_1y9js_25{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._header_5pmv2_1{margin-bottom:12px}._groupHead_5pmv2_5{display:flex;flex-wrap:wrap;align-items:center}._action_5pmv2_11{margin:0 5px}._proxy_5mgcm_1{margin:3px;padding:5px;position:relative;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;outline:none;border:1px solid transparent;max-width:200px;background-color:var(--color-bg-proxy)}._proxy_5mgcm_1:focus{border:1px solid var(--color-focus-blue)}@media screen and (min-width: 30em){._proxy_5mgcm_1{min-width:200px;border-radius:10px;padding:10px}}._proxy_5mgcm_1._now_5mgcm_25{background-color:var(--color-focus-blue);color:#ddd}._proxy_5mgcm_1._error_5mgcm_29{opacity:.5}._proxy_5mgcm_1._selectable_5mgcm_32{transition:transform .2s ease-in-out;cursor:pointer}._proxy_5mgcm_1._selectable_5mgcm_32:hover{border-color:hsl(0deg,0%,var(--card-hover-border-lightness))}._proxyType_5mgcm_40{font-family:var(--font-mono);font-size:.6em;margin-right:3px}@media screen and (min-width: 30em){._proxyType_5mgcm_40{font-size:.85em}}._row_5mgcm_51{display:flex;align-items:center;justify-content:space-between}._proxyName_5mgcm_57{width:100%;margin-bottom:5px;font-size:.8em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._proxySmall_5mgcm_66{--size: 13px;width:var(--size);height:var(--size);border-radius:50%;position:relative}._proxySmall_5mgcm_66._now_5mgcm_25{--size: 15px}._proxySmall_5mgcm_66._now_5mgcm_25:before{--size-dot: 7px;content:"";position:absolute;width:var(--size-dot);height:var(--size-dot);background-color:#fff;border:1px solid var(--color-proxy-dot-selected-ind-bo);border-radius:4px;top:50%;left:50%;transform:translate(-50%,-50%)}._proxySmall_5mgcm_66._selectable_5mgcm_32{transition:transform .1s ease-in-out;cursor:pointer}._proxySmall_5mgcm_66._selectable_5mgcm_32:hover{transform:scale(1.2)}._proxyLatency_pw0sa_1{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width: 30em){._proxyLatency_pw0sa_1{font-size:.85em}}._list_1oy7w_1{display:flex;flex-wrap:wrap;margin:8px 0 8px -3px}._listSummaryView_1oy7w_8{margin:14px 0;display:grid;grid-template-columns:repeat(auto-fill,13px);grid-gap:10px;place-items:center;max-width:900px}._updatedAt_919yi_1{margin-bottom:12px}._updatedAt_919yi_1 small{color:#777}._main_919yi_8{padding:10px 15px}@media screen and (min-width: 30em){._main_919yi_8{padding:10px 40px}}._head_919yi_17{display:flex;align-items:center;flex-wrap:wrap}._action_919yi_23{margin:0 5px;display:grid;grid-template-columns:auto auto;gap:10px;place-items:center}._refresh_919yi_31{display:flex;justify-content:center;align-items:center;cursor:pointer}._labeledInput_cmki0_1{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0px}._overlay_uuk3b_1{background-color:#0009}._cnt_uuk3b_5{position:absolute;background-color:var(--bg-modal);color:var(--color-text);line-height:1.4;opacity:.6;transition:all .3s ease;transform:translate(-50%,-50%) scale(1.2);box-shadow:#0000001f 0 4px 4px,#0000003d 0 16px 32px}._afterOpen_uuk3b_16{opacity:1;transform:translate(-50%,-50%) scale(1)}._topBar_16fpp_1{position:-webkit-sticky;position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;z-index:1;background-color:var(--color-background2);-webkit-backdrop-filter:blur(36px);backdrop-filter:blur(36px)}._topBarRight_16fpp_13{display:flex;align-items:center;flex-wrap:wrap;flex:1;justify-content:flex-end;margin-right:20px}._textFilterContainer_16fpp_22{max-width:350px;min-width:150px;flex:1;margin-right:8px}._group_16fpp_29{padding:10px 15px}@media screen and (min-width: 30em){._group_16fpp_29{padding:10px 40px}} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-b68bae25.css b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-b68bae25.css deleted file mode 100644 index d779858..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-b68bae25.css +++ /dev/null @@ -1 +0,0 @@ -._FlexCenter_1380a_1{display:flex;justify-content:center;align-items:center}._header_1y9js_1{display:flex;align-items:center}._header_1y9js_1:focus{outline:none}._header_1y9js_1 ._arrow_1y9js_8{display:inline-flex;-webkit-transform:rotate(0deg);transform:rotate(0);transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}._header_1y9js_1 ._arrow_1y9js_8._isOpen_1y9js_13{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._header_1y9js_1 ._arrow_1y9js_8:focus{outline:var(--color-focus-blue) solid 1px}._btn_1y9js_20{margin-left:5px}._qty_1y9js_25{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._header_5pmv2_1{margin-bottom:12px}._groupHead_5pmv2_5{display:flex;flex-wrap:wrap;align-items:center}._action_5pmv2_11{margin:0 5px}._proxy_ryc3j_1{margin:3px;padding:5px;position:relative;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;outline:none;border:1px solid transparent;max-width:200px;background-color:var(--color-bg-proxy)}._proxy_ryc3j_1:focus{border:1px solid var(--color-focus-blue)}@media screen and (min-width: 30em){._proxy_ryc3j_1{min-width:200px;border-radius:10px;padding:10px}}._proxy_ryc3j_1._now_ryc3j_25{background-color:var(--color-focus-blue);color:#ddd}._proxy_ryc3j_1._error_ryc3j_29{opacity:.5}._proxy_ryc3j_1._selectable_ryc3j_32{transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;cursor:pointer}._proxy_ryc3j_1._selectable_ryc3j_32:hover{border-color:hsl(0deg,0%,var(--card-hover-border-lightness))}._proxyType_ryc3j_40{font-family:var(--font-mono);font-size:.6em;margin-right:3px}@media screen and (min-width: 30em){._proxyType_ryc3j_40{font-size:.85em}}._row_ryc3j_51{display:flex;align-items:center;justify-content:space-between}._proxyName_ryc3j_57{width:100%;margin-bottom:5px;font-size:.85em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._proxySmall_ryc3j_66{--size: 13px;width:var(--size);height:var(--size);border-radius:50%;position:relative}._proxySmall_ryc3j_66._now_ryc3j_25{--size: 15px}._proxySmall_ryc3j_66._now_ryc3j_25:before{--size-dot: 7px;content:"";position:absolute;width:var(--size-dot);height:var(--size-dot);background-color:#fff;border:1px solid var(--color-proxy-dot-selected-ind-bo);border-radius:4px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}._proxySmall_ryc3j_66._selectable_ryc3j_32{transition:-webkit-transform .1s ease-in-out;transition:transform .1s ease-in-out;transition:transform .1s ease-in-out,-webkit-transform .1s ease-in-out;cursor:pointer}._proxySmall_ryc3j_66._selectable_ryc3j_32:hover{-webkit-transform:scale(1.2);transform:scale(1.2)}._proxyLatency_pw0sa_1{border-radius:20px;color:#eee;font-size:.6em}@media screen and (min-width: 30em){._proxyLatency_pw0sa_1{font-size:.85em}}._list_1oy7w_1{display:flex;flex-wrap:wrap;margin:8px 0 8px -3px}._listSummaryView_1oy7w_8{margin:14px 0;display:grid;grid-template-columns:repeat(auto-fill,13px);grid-gap:10px;place-items:center;max-width:900px}._updatedAt_919yi_1{margin-bottom:12px}._updatedAt_919yi_1 small{color:#777}._main_919yi_8{padding:10px 15px}@media screen and (min-width: 30em){._main_919yi_8{padding:10px 40px}}._head_919yi_17{display:flex;align-items:center;flex-wrap:wrap}._action_919yi_23{margin:0 5px;display:grid;grid-template-columns:auto auto;gap:10px;place-items:center}._refresh_919yi_31{display:flex;justify-content:center;align-items:center;cursor:pointer}._labeledInput_cmki0_1{max-width:85vw;width:400px;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:13px 0}hr{height:1px;background-color:var(--color-separator);border:none;outline:none;margin:1rem 0px}._topBar_16fpp_1{position:-webkit-sticky;position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;z-index:1;background-color:var(--color-background2);-webkit-backdrop-filter:blur(36px);backdrop-filter:blur(36px)}._topBarRight_16fpp_13{display:flex;align-items:center;flex-wrap:wrap;flex:1;justify-content:flex-end;margin-right:20px}._textFilterContainer_16fpp_22{max-width:350px;min-width:150px;flex:1;margin-right:8px}._group_16fpp_29{padding:10px 15px}@media screen and (min-width: 30em){._group_16fpp_29{padding:10px 40px}} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffaa28cd.js b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffaa28cd.js new file mode 100644 index 0000000..7208604 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Proxies-ffaa28cd.js @@ -0,0 +1 @@ +import{r as _,R as K,P as S,c as b,Q as fe,j as s,B as v,h as m,T as je,x as _e,U as ee,V as te,b as w,W as ve,X as ge,Y as se,Z as E,w as $,_ as be,$ as ne,a0 as O,a1 as re,a2 as M,a3 as H,a4 as we,a5 as Ce,u as U,a6 as ke,a7 as Pe,a8 as Se,g as oe,C as ae,y as V,a9 as Ne,m as W,a as Ae,aa as Oe,ab as $e,ac as Le,ad as Te}from"./index-17fa2fa5.js";import{C as De}from"./chevron-down-4da23e9b.js";import{F as Be,p as Fe,A as Ie,I as Re}from"./Fab-aebb033d.js";import{R as Ee,a as Me,T as He}from"./TextFilter-c83c25f0.js";import{f as Ue}from"./index-b2af8b42.js";import{S as qe}from"./Select-54a41ffb.js";import"./debounce-c1ba2006.js";function R(){return R=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ke(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a=0)&&(n[o]=e[o]);return n}var q=_.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,c=ze(e,["color","size"]);return K.createElement("svg",R({ref:t,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),K.createElement("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"}))});q.propTypes={color:S.string,size:S.oneOfType([S.string,S.number])};q.displayName="Zap";const Z=q;function ce(e){const t=e.size||24,n=b({[fe.animate]:e.animate});return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}const Ve="_FlexCenter_1380a_1",We={FlexCenter:Ve};function Ze({children:e}){return s.jsx("div",{className:We.FlexCenter,children:e})}const{useRef:G,useEffect:Ge}=m;function Ye({onClickPrimaryButton:e,onClickSecondaryButton:t}){const n=G(null),r=G(null);Ge(()=>{n.current.focus()},[]);const o=a=>{a.code==="ArrowRight"?r.current.focus():a.code==="ArrowLeft"&&n.current.focus()};return s.jsxs("div",{onKeyDown:o,children:[s.jsx("h2",{children:"Close Connections?"}),s.jsx("p",{children:"Click [Yes] to close those connections that are still using the old selected proxy in this group"}),s.jsx("div",{style:{height:30}}),s.jsxs(Ze,{children:[s.jsx(v,{onClick:e,ref:n,children:"Yes"}),s.jsx("div",{style:{width:20}}),s.jsx(v,{onClick:t,ref:r,children:"No"})]})]})}const Xe="_header_1y9js_1",Qe="_arrow_1y9js_8",Je="_isOpen_1y9js_13",et="_btn_1y9js_20",tt="_qty_1y9js_25",C={header:Xe,arrow:Qe,isOpen:Je,btn:et,qty:tt};function le({name:e,type:t,toggle:n,isOpen:r,qty:o}){const a=_.useCallback(c=>{c.preventDefault(),(c.key==="Enter"||c.key===" ")&&n()},[n]);return s.jsxs("div",{className:C.header,onClick:n,style:{cursor:"pointer"},tabIndex:0,onKeyDown:a,role:"button",children:[s.jsx("div",{children:s.jsx(je,{name:e,type:t})}),typeof o=="number"?s.jsx("span",{className:C.qty,children:o}):null,s.jsx(v,{kind:"minimal",onClick:n,className:C.btn,title:"Toggle collapsible section",children:s.jsx("span",{className:b(C.arrow,{[C.isOpen]:r}),children:s.jsx(De,{size:20})})})]})}const{useMemo:st}=m;function nt(e,t){return e.filter(n=>{const r=t[n];return r===void 0?!0:!("number"in r&&r.number===0)})}const N=(e,t)=>{if(e&&"number"in e&&e.number>0)return e.number;const n=t&&t.type;return n&&te.indexOf(n)>-1?-1:999999},rt={Natural:e=>e,LatencyAsc:(e,t,n)=>e.sort((r,o)=>{const a=N(t[r],n&&n[r]),c=N(t[o],n&&n[o]);return a-c}),LatencyDesc:(e,t,n)=>e.sort((r,o)=>{const a=N(t[r],n&&n[r]);return N(t[o],n&&n[o])-a}),NameAsc:e=>e.sort(),NameDesc:e=>e.sort((t,n)=>t>n?-1:tr.trim()).filter(r=>!!r);return n.length===0?e:e.filter(r=>{let o=0;for(;o-1)return!0}return!1})}function at(e,t,n,r,o,a){let c=[...e];return n&&(c=nt(e,t)),typeof r=="string"&&r!==""&&(c=ot(c,r)),rt[o](c,t,a)}function ie(e,t,n,r,o){const[a]=_e(ee);return st(()=>at(e,t,n,a,r,o),[e,t,n,a,r,o])}const ct="_header_5pmv2_1",lt="_groupHead_5pmv2_5",it="_action_5pmv2_11",D={header:ct,groupHead:lt,action:it},ut="_proxy_5mgcm_1",dt="_now_5mgcm_25",xt="_error_5mgcm_29",pt="_selectable_5mgcm_32",mt="_proxyType_5mgcm_40",ht="_row_5mgcm_51",yt="_proxyName_5mgcm_57",ft="_proxySmall_5mgcm_66",h={proxy:ut,now:dt,error:xt,selectable:pt,proxyType:mt,row:ht,proxyName:yt,proxySmall:ft},jt="_proxyLatency_pw0sa_1",_t={proxyLatency:jt};function vt({latency:e,color:t}){let n=" ";if(e)switch(e.kind){case"Error":case"Testing":n="- ms";break;case"Result":n=(e.number!==0?e.number:"-")+" ms";break}return s.jsx("span",{className:_t.proxyLatency,style:{color:t},children:n})}const{useMemo:P}=m,g={good:"#67c23a",normal:"#d4b75c",bad:"#e67f3c",na:"#909399"};function ue(e){if(!e||e.kind!=="Result")return g.na;const t=e.number;return t===0?g.na:t<200?g.good:t<400?g.normal:typeof t=="number"?g.bad:g.na}function gt(e,t){return te.indexOf(t)>-1?{border:"1px dotted #777"}:{background:ue(e)}}function bt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const c=P(()=>gt(r,n.type),[r,n]),l=P(()=>{let u=t;return r&&r.kind==="Result"&&typeof r.number=="number"&&(u+=" "+r.number+" ms"),u},[t,r]),i=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),d=P(()=>b(h.proxySmall,{[h.now]:e,[h.selectable]:o}),[o,e]),x=_.useCallback(u=>{u.key==="Enter"&&i()},[i]);return s.jsx("div",{title:l,className:d,style:c,onClick:i,onKeyDown:x,role:o?"menuitem":""})}function wt(e){return e==="Shadowsocks"?"SS":e}const Ct=e=>({left:e.left+window.scrollX-5,top:e.top+window.scrollY-38});function kt({children:e,label:t,"aria-label":n}){const[r,o]=ve();return s.jsxs(s.Fragment,{children:[_.cloneElement(e,r),s.jsx(ge,{...o,label:t,"aria-label":n,position:Ct})]})}function Pt({now:e,name:t,proxy:n,latency:r,isSelectable:o,onClick:a}){const c=P(()=>ue(r),[r]),l=_.useCallback(()=>{o&&a&&a(t)},[t,a,o]),i=_.useCallback(x=>{x.key==="Enter"&&l()},[l]),d=P(()=>b(h.proxy,{[h.now]:e,[h.selectable]:o}),[o,e]);return s.jsxs("div",{tabIndex:0,className:d,onClick:l,onKeyDown:i,role:o?"menuitem":"",children:[s.jsx("div",{className:h.proxyName,children:s.jsx(kt,{label:t,"aria-label":"proxy name: "+t,children:s.jsx("span",{children:t})})}),s.jsxs("div",{className:h.row,children:[s.jsx("span",{className:h.proxyType,style:{opacity:e?.6:.2},children:wt(n.type)}),s.jsx(vt,{latency:r,color:c})]})]})}const de=(e,{name:t})=>{const n=se(e),r=E(e);return{proxy:n[t]||{name:t,type:"Unknown",history:[]},latency:r[t]}},St=w(de)(Pt),Nt=w(de)(bt),At="_list_1oy7w_1",Ot="_listSummaryView_1oy7w_8",xe={list:At,listSummaryView:Ot};function pe({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){const o=e;return s.jsx("div",{className:xe.list,children:o.map(a=>s.jsx(St,{onClick:r,isSelectable:n,name:a,now:a===t},a))})}function me({all:e,now:t,isSelectable:n,itemOnTapCallback:r}){return s.jsx("div",{className:xe.listSummaryView,children:e.map(o=>s.jsx(Nt,{onClick:r,isSelectable:n,name:o,now:o===t},o))})}const{createElement:$t,useCallback:B,useMemo:Lt}=m;function Tt({name:e,all:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,proxies:a,type:c,now:l,isOpen:i,apiConfig:d,dispatch:x}){const u=ie(t,n,r,o,a),f=Lt(()=>c==="Selector",[c]),{app:{updateCollapsibleIsOpen:j},proxies:{requestDelayForProxies:p}}=$(),L=B(()=>{j("proxyGroup",e,!i)},[i,j,e]),T=B(z=>{f&&x(be(d,e,z))},[d,x,e,f]),y=ne(!1),ye=B(async()=>{if(!y.value){y.set(!0);try{await p(d,u)}catch{}y.set(!1)}},[u,d,p,y]);return s.jsxs("div",{className:D.group,children:[s.jsxs("div",{className:D.groupHead,children:[s.jsx(le,{name:e,type:c,toggle:L,qty:u.length,isOpen:i}),s.jsx("div",{className:D.action,children:s.jsx(O,{label:"Test latency",children:s.jsx(v,{kind:"circular",onClick:ye,children:s.jsx(ce,{animate:y.value,size:16})})})})]}),$t(i?pe:me,{all:u,now:l,isSelectable:f,itemOnTapCallback:T})]})}const Dt=w((e,{name:t,delay:n})=>{const r=se(e),o=re(e),a=M(e),c=H(e),l=r[t],{all:i,type:d,now:x}=l;return{all:i,delay:n,hideUnavailableProxies:c,proxySortBy:a,proxies:r,type:d,now:x,isOpen:o[`proxyGroup:${t}`]}})(Tt),{useCallback:he,useState:Bt}=m;function Ft({dispatch:e,apiConfig:t,name:n}){return he(()=>e(we(t,n)),[t,e,n])}function It({dispatch:e,apiConfig:t,names:n}){const[r,o]=Bt(!1);return[he(async()=>{if(!r){o(!0);try{await e(Ce(t,n))}catch{}o(!1)}},[t,e,n,r]),r]}const{useState:Rt,useCallback:Et}=m;function Mt({isLoading:e}){return e?s.jsx(Re,{children:s.jsx(Z,{width:16,height:16})}):s.jsx(Z,{width:16,height:16})}function Ht({dispatch:e,apiConfig:t}){const[n,r]=Rt(!1);return[Et(()=>{n||(r(!0),e(ke(t)).then(()=>r(!1),()=>r(!1)))},[t,e,n]),n]}function Ut({dispatch:e,apiConfig:t,proxyProviders:n}){const{t:r}=U(),[o,a]=Ht({dispatch:e,apiConfig:t}),[c,l]=It({apiConfig:t,dispatch:e,names:n.map(i=>i.name)});return s.jsx(Be,{icon:s.jsx(Mt,{isLoading:a}),onClick:o,text:r("Test Latency"),style:Fe,children:n.length>0?s.jsx(Ie,{text:r("update_all_proxy_provider"),onClick:c,children:s.jsx(Ee,{isRotating:l})}):null})}const qt="_updatedAt_919yi_1",zt="_main_919yi_8",Kt="_head_919yi_17",Vt="_action_919yi_23",Wt="_refresh_919yi_31",k={updatedAt:qt,main:zt,head:Kt,action:Vt,refresh:Wt},{useCallback:Y}=m;function Zt({name:e,proxies:t,delay:n,hideUnavailableProxies:r,proxySortBy:o,vehicleType:a,updatedAt:c,isOpen:l,dispatch:i,apiConfig:d}){const x=ie(t,n,r,o),u=ne(!1),f=Ft({dispatch:i,apiConfig:d,name:e}),j=Y(()=>{if(u.value)return;u.set(!0);const y=()=>u.set(!1);i(Pe(d,e)).then(y,y)},[d,i,e,u]),{app:{updateCollapsibleIsOpen:p}}=$(),L=Y(()=>{p("proxyProvider",e,!l)},[l,p,e]),T=Ue(new Date(c),new Date);return s.jsxs("div",{className:k.main,children:[s.jsxs("div",{className:k.head,children:[s.jsx(le,{name:e,toggle:L,type:a,isOpen:l,qty:x.length}),s.jsxs("div",{className:k.action,children:[s.jsx(O,{label:"Update",children:s.jsx(v,{kind:"circular",onClick:f,children:s.jsx(Xt,{})})}),s.jsx(O,{label:"Health Check",children:s.jsx(v,{kind:"circular",onClick:j,children:s.jsx(ce,{animate:u.value,size:16})})})]})]}),s.jsx("div",{className:k.updatedAt,children:s.jsxs("small",{children:["Updated ",T," ago"]})}),l?s.jsx(pe,{all:x}):s.jsx(me,{all:x})]})}const Gt={rest:{scale:1},pressed:{scale:.95}},Yt={rest:{rotate:0},hover:{rotate:360,transition:{duration:.3}}};function Xt(){const t=Se.read().motion;return s.jsx(t.div,{className:k.refresh,variants:Gt,initial:"rest",whileHover:"hover",whileTap:"pressed",children:s.jsx(t.div,{className:"flexCenter",variants:Yt,children:s.jsx(Me,{size:16})})})}const Qt=(e,{proxies:t,name:n})=>{const r=H(e),o=E(e),a=re(e),c=oe(e),l=M(e);return{apiConfig:c,proxies:t,delay:o,hideUnavailableProxies:r,proxySortBy:l,isOpen:a[`proxyProvider:${n}`]}},Jt=w(Qt)(Zt);function es({items:e}){return e.length===0?null:s.jsxs(s.Fragment,{children:[s.jsx(ae,{title:"Proxy Provider"}),s.jsx("div",{children:e.map(t=>s.jsx(Jt,{name:t.name,proxies:t.proxies,type:t.type,vehicleType:t.vehicleType,updatedAt:t.updatedAt},t.name))})]})}const ts="_labeledInput_cmki0_1",F={labeledInput:ts},ss=[["Natural","order_natural"],["LatencyAsc","order_latency_asc"],["LatencyDesc","order_latency_desc"],["NameAsc","order_name_asc"],["NameDesc","order_name_desc"]],{useCallback:X}=m;function ns({appConfig:e}){const{app:{updateAppConfig:t}}=$(),n=X(a=>{t("proxySortBy",a.target.value)},[t]),r=X(a=>{t("hideUnavailableProxies",a)},[t]),{t:o}=U();return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("sort_in_grp")}),s.jsx("div",{children:s.jsx(qe,{options:ss.map(a=>[a[0],o(a[1])]),selected:e.proxySortBy,onChange:n})})]}),s.jsx("hr",{}),s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("hide_unavail_proxies")}),s.jsx("div",{children:s.jsx(V,{name:"hideUnavailableProxies",checked:e.hideUnavailableProxies,onChange:r})})]}),s.jsxs("div",{className:F.labeledInput,children:[s.jsx("span",{children:o("auto_close_conns")}),s.jsx("div",{children:s.jsx(V,{name:"autoCloseOldConns",checked:e.autoCloseOldConns,onChange:a=>t("autoCloseOldConns",a)})})]})]})}const rs=e=>{const t=M(e),n=H(e),r=Ne(e);return{appConfig:{proxySortBy:t,hideUnavailableProxies:n,autoCloseOldConns:r}}},os=w(rs)(ns),as="_overlay_uuk3b_1",cs="_cnt_uuk3b_5",ls="_afterOpen_uuk3b_16",I={overlay:as,cnt:cs,afterOpen:ls},{useMemo:is}=m;function Q({isOpen:e,onRequestClose:t,children:n}){const r=is(()=>({base:b(W.content,I.cnt),afterOpen:I.afterOpen,beforeClose:""}),[]);return s.jsx(Ae,{isOpen:e,onRequestClose:t,className:r,overlayClassName:b(W.overlay,I.overlay),children:n})}function us({color:e="currentColor",size:t=24}){return s.jsxs("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M2 6h9M18.5 6H22"}),s.jsx("circle",{cx:"16",cy:"6",r:"2"}),s.jsx("path",{d:"M22 18h-9M6 18H2"}),s.jsx("circle",{r:"2",transform:"matrix(-1 0 0 1 8 18)"})]})}const ds="_topBar_16fpp_1",xs="_topBarRight_16fpp_13",ps="_textFilterContainer_16fpp_22",ms="_group_16fpp_29",A={topBar:ds,topBarRight:xs,textFilterContainer:ps,group:ms},{useState:hs,useEffect:ys,useCallback:J,useRef:fs}=m;function js({dispatch:e,groupNames:t,delay:n,proxyProviders:r,apiConfig:o,showModalClosePrevConns:a}){const c=fs({}),l=J(()=>{c.current.startAt=Date.now(),e(Oe(o)).then(()=>{c.current.completeAt=Date.now()})},[o,e]);ys(()=>{l();const p=()=>{c.current.startAt&&Date.now()-c.current.startAt>3e4&&l()};return window.addEventListener("focus",p,!1),()=>window.removeEventListener("focus",p,!1)},[l]);const[i,d]=hs(!1),x=J(()=>{d(!1)},[]),{proxies:{closeModalClosePrevConns:u,closePrevConnsAndTheModal:f}}=$(),{t:j}=U();return s.jsxs(s.Fragment,{children:[s.jsx(Q,{isOpen:i,onRequestClose:x,children:s.jsx(os,{})}),s.jsxs("div",{className:A.topBar,children:[s.jsx(ae,{title:j("Proxies")}),s.jsxs("div",{className:A.topBarRight,children:[s.jsx("div",{className:A.textFilterContainer,children:s.jsx(He,{textAtom:ee})}),s.jsx(O,{label:j("settings"),children:s.jsx(v,{kind:"minimal",onClick:()=>d(!0),children:s.jsx(us,{size:16})})})]})]}),s.jsx("div",{children:t.map(p=>s.jsx("div",{className:A.group,children:s.jsx(Dt,{name:p,delay:n,apiConfig:o,dispatch:e})},p))}),s.jsx(es,{items:r}),s.jsx("div",{style:{height:60}}),s.jsx(Ut,{dispatch:e,apiConfig:o,proxyProviders:r}),s.jsx(Q,{isOpen:a,onRequestClose:u,children:s.jsx(Ye,{onClickPrimaryButton:()=>f(o),onClickSecondaryButton:u})})]})}const _s=e=>({apiConfig:oe(e),groupNames:$e(e),proxyProviders:Le(e),delay:E(e),showModalClosePrevConns:Te(e)}),Ss=w(_s)(js);export{Ss as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rules-9573ff0c.js b/FILES/etc/config/clash/clash-dashboard/assets/Rules-9573ff0c.js deleted file mode 100644 index a5f2213..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/Rules-9573ff0c.js +++ /dev/null @@ -1 +0,0 @@ -import{ad as N,ae as S,af as k,ag as x,ah as E,ai as p,r as f,aj as O,ak as B,K as R,al as T,am as A,an as y,Q as F,j as o,O as L,B as D,u as b,d as Q,g as U,C as z,h as q}from"./index-dcea5d2f.js";import{a as V,V as W}from"./index.esm-fff1f13f.js";import{R as _,T as H}from"./TextFilter-5cf71eda.js";import{f as K}from"./index-759f7e71.js";import{F as G,p as J}from"./Fab-8003d842.js";import{u as X}from"./useRemainingViewPortHeight-054801fd.js";import"./debounce-c1ba2006.js";class Y extends N{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=this.client.defaultMutationOptions(e),S(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:k(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){x.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,r,n,i;(t=(r=this.mutateOptions).onSuccess)==null||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,u,l,c;(a=(u=this.mutateOptions).onError)==null||a.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:m})=>{m(this.currentResult)})})}}function j(s,e,t){const r=E(s,e,t),n=p({context:r.context}),[i]=f.useState(()=>new Y(n,r));f.useEffect(()=>{i.setOptions(r)},[i,r]);const a=O(f.useCallback(l=>i.subscribe(x.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=f.useCallback((l,c)=>{i.mutate(l,c).catch(Z)},[i]);if(a.error&&B(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}function Z(){}function $(s){const e=s.providers,t=Object.keys(e),r={};for(let n=0;n=0,"there is no valid rules list in the rules API response"),s.rules.map((e,t)=>({...e,id:t}))}async function oe(s,e){let t={rules:[]};try{const{url:r,init:n}=R(e),i=await fetch(r+s,n);i.ok&&(t=await i.json())}catch(r){console.log("failed to fetch rules",r)}return ie(t)}const C=A({key:"ruleFilterText",default:""});function ae(s,e){const t=p(),{mutate:r,isLoading:n}=j(P,{onSuccess:()=>{t.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({name:s,apiConfig:e})},n]}function le(s){const e=p(),{data:t}=w(s),{mutate:r,isLoading:n}=j(te,{onSuccess:()=>{e.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({names:t.names,apiConfig:s})},n]}function w(s){return y(["/providers/rules",s],()=>ee("/providers/rules",s))}function ue(s){const{data:e,isFetching:t}=y(["/rules",s],()=>oe("/rules",s)),{data:r}=w(s),[n]=F(C);if(n==="")return{rules:e,provider:r,isFetching:t};{const i=n.toLowerCase();return{rules:e.filter(a=>a.payload.toLowerCase().indexOf(i)>=0),isFetching:t,provider:{byName:r.byName,names:r.names.filter(a=>a.toLowerCase().indexOf(i)>=0)}}}}const ce="_RuleProviderItem_12aid_1",de="_left_12aid_7",he="_middle_12aid_14",fe="_gray_12aid_21",me="_action_12aid_25",ve="_refreshBtn_12aid_32",d={RuleProviderItem:ce,left:de,middle:he,gray:fe,action:me,refreshBtn:ve};function pe({idx:s,name:e,vehicleType:t,behavior:r,updatedAt:n,ruleCount:i,apiConfig:a}){const[u,l]=ae(e,a),c=K(new Date(n),new Date);return o.jsxs("div",{className:d.RuleProviderItem,children:[o.jsx("span",{className:d.left,children:s}),o.jsxs("div",{className:d.middle,children:[o.jsx(L,{name:e,type:`${t} / ${r}`}),o.jsx("div",{className:d.gray,children:i<2?`${i} rule`:`${i} rules`}),o.jsxs("div",{className:d.action,children:[o.jsxs(D,{onClick:u,disabled:l,className:d.refreshBtn,children:[o.jsx(_,{isRotating:l,size:13}),o.jsx("span",{className:"visually-hidden",children:"Refresh"})]}),o.jsxs("small",{className:d.gray,children:["Updated ",c," ago"]})]})]})]})}function Re({apiConfig:s}){const[e,t]=le(s),{t:r}=b();return o.jsx(G,{icon:o.jsx(_,{isRotating:t}),text:r("update_all_rule_provider"),style:J,onClick:e})}const ge="_rule_1kxgd_1",xe="_left_1kxgd_12",ye="_a_1kxgd_19",be="_b_1kxgd_26",_e="_type_1kxgd_37",h={rule:ge,left:xe,a:ye,b:be,type:_e},v={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function je({proxy:s}){let e=v._default;return v[s]&&(e=v[s]),{color:e}}function Pe({type:s,payload:e,proxy:t,id:r}){const n=je({proxy:t});return o.jsxs("div",{className:h.rule,children:[o.jsx("div",{className:h.left,children:r}),o.jsxs("div",{children:[o.jsx("div",{className:h.b,children:e}),o.jsxs("div",{className:h.a,children:[o.jsx("div",{className:h.type,children:s}),o.jsx("div",{style:n,children:t})]})]})]})}const Ce="_header_n1m95_1",we="_RuleProviderItemWrapper_n1m95_17",M={header:Ce,RuleProviderItemWrapper:we},{memo:Me}=q,g=30;function Ie(s,{rules:e,provider:t}){const r=t.names.length;return s{const{rules:r,provider:n,apiConfig:i}=t,a=n.names.length;if(s({apiConfig:U(s)}),De=Q(Se)(ke);function ke({apiConfig:s}){const[e,t]=X(),{rules:r,provider:n}=ue(s),i=Ne({provider:n}),{t:a}=b();return o.jsxs("div",{children:[o.jsxs("div",{className:M.header,children:[o.jsx(z,{title:a("Rules")}),o.jsx(H,{placeholder:"Filter",textAtom:C})]}),o.jsx("div",{ref:e,style:{paddingBottom:g},children:o.jsx(W,{height:t-g,width:"100%",itemCount:r.length+n.names.length,itemSize:i,itemData:{rules:r,provider:n,apiConfig:s},itemKey:Ie,children:I})}),n&&n.names&&n.names.length>0?o.jsx(Re,{apiConfig:s}):null]})}export{De as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Rules-d0c6e66d.js b/FILES/etc/config/clash/clash-dashboard/assets/Rules-d0c6e66d.js new file mode 100644 index 0000000..a498bcc --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/Rules-d0c6e66d.js @@ -0,0 +1 @@ +import{ae as N,af as S,ag as E,ah as x,ai as k,aj as p,r as f,ak as B,al as O,N as R,am as T,an as A,ao as y,x as L,j as o,T as F,B as D,u as b,b as U,g as z,C as Q,h as q}from"./index-17fa2fa5.js";import{a as V,V as W}from"./index.esm-cd2d54ba.js";import{R as j,T as H}from"./TextFilter-c83c25f0.js";import{f as G}from"./index-b2af8b42.js";import{F as J,p as K}from"./Fab-aebb033d.js";import{u as X}from"./useRemainingViewPortHeight-0cb185fe.js";import"./debounce-c1ba2006.js";class Y extends N{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const r=this.options;this.options=this.client.defaultMutationOptions(e),S(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:E(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){x.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,r,n,i;(t=(r=this.mutateOptions).onSuccess)==null||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(n=(i=this.mutateOptions).onSettled)==null||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,l,u,c;(a=(l=this.mutateOptions).onError)==null||a.call(l,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(c=this.mutateOptions).onSettled)==null||u.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:m})=>{m(this.currentResult)})})}}function _(s,e,t){const r=k(s,e,t),n=p({context:r.context}),[i]=f.useState(()=>new Y(n,r));f.useEffect(()=>{i.setOptions(r)},[i,r]);const a=B(f.useCallback(u=>i.subscribe(x.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=f.useCallback((u,c)=>{i.mutate(u,c).catch(Z)},[i]);if(a.error&&O(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function Z(){}function $(s){const e=s.providers,t=Object.keys(e),r={};for(let n=0;n=0,"there is no valid rules list in the rules API response"),s.rules.map((e,t)=>({...e,id:t}))}async function oe(s,e){let t={rules:[]};try{const{url:r,init:n}=R(e),i=await fetch(r+s,n);i.ok&&(t=await i.json())}catch(r){console.log("failed to fetch rules",r)}return ie(t)}const C=A("");function ae(s,e){const t=p(),{mutate:r,isLoading:n}=_(P,{onSuccess:()=>{t.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({name:s,apiConfig:e})},n]}function ue(s){const e=p(),{data:t}=w(s),{mutate:r,isLoading:n}=_(te,{onSuccess:()=>{e.invalidateQueries(["/providers/rules"])}});return[a=>{a.preventDefault(),r({names:t.names,apiConfig:s})},n]}function w(s){return y(["/providers/rules",s],()=>ee("/providers/rules",s))}function le(s){const{data:e,isFetching:t}=y(["/rules",s],()=>oe("/rules",s)),{data:r}=w(s),[n]=L(C);if(n==="")return{rules:e,provider:r,isFetching:t};{const i=n.toLowerCase();return{rules:e.filter(a=>a.payload.toLowerCase().indexOf(i)>=0),isFetching:t,provider:{byName:r.byName,names:r.names.filter(a=>a.toLowerCase().indexOf(i)>=0)}}}}const ce="_RuleProviderItem_12aid_1",de="_left_12aid_7",he="_middle_12aid_14",fe="_gray_12aid_21",me="_action_12aid_25",ve="_refreshBtn_12aid_32",d={RuleProviderItem:ce,left:de,middle:he,gray:fe,action:me,refreshBtn:ve};function pe({idx:s,name:e,vehicleType:t,behavior:r,updatedAt:n,ruleCount:i,apiConfig:a}){const[l,u]=ae(e,a),c=G(new Date(n),new Date);return o.jsxs("div",{className:d.RuleProviderItem,children:[o.jsx("span",{className:d.left,children:s}),o.jsxs("div",{className:d.middle,children:[o.jsx(F,{name:e,type:`${t} / ${r}`}),o.jsx("div",{className:d.gray,children:i<2?`${i} rule`:`${i} rules`}),o.jsxs("div",{className:d.action,children:[o.jsxs(D,{onClick:l,disabled:u,className:d.refreshBtn,children:[o.jsx(j,{isRotating:u,size:13}),o.jsx("span",{className:"visually-hidden",children:"Refresh"})]}),o.jsxs("small",{className:d.gray,children:["Updated ",c," ago"]})]})]})]})}function Re({apiConfig:s}){const[e,t]=ue(s),{t:r}=b();return o.jsx(J,{icon:o.jsx(j,{isRotating:t}),text:r("update_all_rule_provider"),style:K,onClick:e})}const ge="_rule_1kxgd_1",xe="_left_1kxgd_12",ye="_a_1kxgd_19",be="_b_1kxgd_26",je="_type_1kxgd_37",h={rule:ge,left:xe,a:ye,b:be,type:je},v={_default:"#59caf9",DIRECT:"#f5bc41",REJECT:"#cb3166"};function _e({proxy:s}){let e=v._default;return v[s]&&(e=v[s]),{color:e}}function Pe({type:s,payload:e,proxy:t,id:r}){const n=_e({proxy:t});return o.jsxs("div",{className:h.rule,children:[o.jsx("div",{className:h.left,children:r}),o.jsxs("div",{children:[o.jsx("div",{className:h.b,children:e}),o.jsxs("div",{className:h.a,children:[o.jsx("div",{className:h.type,children:s}),o.jsx("div",{style:n,children:t})]})]})]})}const Ce="_header_n1m95_1",we="_RuleProviderItemWrapper_n1m95_17",M={header:Ce,RuleProviderItemWrapper:we},{memo:Me}=q,g=30;function Ie(s,{rules:e,provider:t}){const r=t.names.length;return s{const{rules:r,provider:n,apiConfig:i}=t,a=n.names.length;if(s({apiConfig:z(s)}),De=U(Se)(Ee);function Ee({apiConfig:s}){const[e,t]=X(),{rules:r,provider:n}=le(s),i=Ne({provider:n}),{t:a}=b();return o.jsxs("div",{children:[o.jsxs("div",{className:M.header,children:[o.jsx(Q,{title:a("Rules")}),o.jsx(H,{placeholder:"Filter",textAtom:C})]}),o.jsx("div",{ref:e,style:{paddingBottom:g},children:o.jsx(W,{height:t-g,width:"100%",itemCount:r.length+n.names.length,itemSize:i,itemData:{rules:r,provider:n,apiConfig:s},itemKey:Ie,children:I})}),n&&n.names&&n.names.length>0?o.jsx(Re,{apiConfig:s}):null]})}export{De as default}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/Select-29e929fc.js b/FILES/etc/config/clash/clash-dashboard/assets/Select-54a41ffb.js similarity index 76% rename from FILES/etc/config/clash/clash-dashboard/assets/Select-29e929fc.js rename to FILES/etc/config/clash/clash-dashboard/assets/Select-54a41ffb.js index 23bc591..ddcda7f 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/Select-29e929fc.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/Select-54a41ffb.js @@ -1 +1 @@ -import{j as s}from"./index-dcea5d2f.js";const o="_select_13zm8_1",r={select:o};function m({options:t,selected:c,onChange:l}){return s.jsx("select",{className:r.select,value:c,onChange:l,children:t.map(([e,n])=>s.jsx("option",{value:e,children:n},e))})}export{m as S}; +import{j as s}from"./index-17fa2fa5.js";const o="_select_13zm8_1",r={select:o};function m({options:t,selected:c,onChange:l}){return s.jsx("select",{className:r.select,value:c,onChange:l,children:t.map(([e,n])=>s.jsx("option",{value:e,children:n},e))})}export{m as S}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-5cf71eda.js b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-5cf71eda.js deleted file mode 100644 index 7508c4f..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-5cf71eda.js +++ /dev/null @@ -1 +0,0 @@ -import{r as g,R as c,P as i,c as x,j as l,Q as d,h}from"./index-dcea5d2f.js";import{d as m}from"./debounce-c1ba2006.js";function u(){return u=Object.assign||function(t){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function _(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,s;for(s=0;s=0)&&(e[r]=t[r]);return e}var p=g.forwardRef(function(t,n){var e=t.color,o=e===void 0?"currentColor":e,r=t.size,s=r===void 0?24:r,a=v(t,["color","size"]);return c.createElement("svg",u({ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),c.createElement("polyline",{points:"23 4 23 10 17 10"}),c.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))});p.propTypes={color:i.string,size:i.oneOfType([i.string,i.number])};p.displayName="RotateCw";const R=p,b="_rotate_1dspl_1",y="_isRotating_1dspl_5",j="_rotating_1dspl_1",f={rotate:b,isRotating:y,rotating:j};function $(t){const n=t.size||16,e=x(f.rotate,{[f.isRotating]:t.isRotating});return l.jsx("span",{className:e,children:l.jsx(R,{size:n})})}const{useCallback:w,useState:O,useMemo:T}=h;function C(t){const[,n]=d(t),[e,o]=O(""),r=T(()=>m(n,300),[n]);return[w(a=>{o(a.target.value),r(a.target.value)},[r]),e]}const z="_input_16a1f_1",P={input:z};function L(t){const[n,e]=C(t.textAtom);return l.jsx("input",{className:P.input,type:"text",value:e,onChange:n,placeholder:t.placeholder})}export{$ as R,L as T,R as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-b21c0577.css b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-b21c0577.css deleted file mode 100644 index bbdf014..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-b21c0577.css +++ /dev/null @@ -1 +0,0 @@ -._rotate_1dspl_1{display:inline-flex}._isRotating_1dspl_5{-webkit-animation:_rotating_1dspl_1 3s infinite linear;animation:_rotating_1dspl_1 3s infinite linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes _rotating_1dspl_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _rotating_1dspl_1{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}._input_16a1f_1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;outline:none;padding:8px 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._input_16a1f_1:focus{border:1px solid var(--color-focus-blue)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-c83c25f0.js b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-c83c25f0.js new file mode 100644 index 0000000..3b8ed25 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-c83c25f0.js @@ -0,0 +1 @@ +import{r as g,R as c,P as i,c as x,j as l,x as m,h}from"./index-17fa2fa5.js";import{d}from"./debounce-c1ba2006.js";function u(){return u=Object.assign||function(t){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(e[o]=t[o])}return e}function b(t,n){if(t==null)return{};var e={},o=Object.keys(t),r,s;for(s=0;s=0)&&(e[r]=t[r]);return e}var p=g.forwardRef(function(t,n){var e=t.color,o=e===void 0?"currentColor":e,r=t.size,s=r===void 0?24:r,a=v(t,["color","size"]);return c.createElement("svg",u({ref:n,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),c.createElement("polyline",{points:"23 4 23 10 17 10"}),c.createElement("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"}))});p.propTypes={color:i.string,size:i.oneOfType([i.string,i.number])};p.displayName="RotateCw";const y=p,R="_rotate_1dspl_1",_="_isRotating_1dspl_5",j="_rotating_1dspl_1",f={rotate:R,isRotating:_,rotating:j};function $(t){const n=t.size||16,e=x(f.rotate,{[f.isRotating]:t.isRotating});return l.jsx("span",{className:e,children:l.jsx(y,{size:n})})}const{useCallback:w,useState:O,useMemo:T}=h;function C(t){const[,n]=m(t),[e,o]=O(""),r=T(()=>d(n,300),[n]);return[w(a=>{o(a.target.value),r(a.target.value)},[r]),e]}const z="_input_16a1f_1",P={input:z};function L(t){const[n,e]=C(t.textAtom);return l.jsx("input",{className:P.input,type:"text",value:e,onChange:n,placeholder:t.placeholder})}export{$ as R,L as T,y as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-ced87fc6.css b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-ced87fc6.css new file mode 100644 index 0000000..c06c7e6 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/TextFilter-ced87fc6.css @@ -0,0 +1 @@ +._rotate_1dspl_1{display:inline-flex}._isRotating_1dspl_5{animation:_rotating_1dspl_1 3s infinite linear;animation-fill-mode:forwards}@keyframes _rotating_1dspl_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._input_16a1f_1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:20px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;outline:none;padding:8px 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._input_16a1f_1:focus{border:1px solid var(--color-focus-blue)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/TwemojiCountryFlags-9f04f144.woff2 b/FILES/etc/config/clash/clash-dashboard/assets/TwemojiCountryFlags-9f04f144.woff2 deleted file mode 100644 index b9d6ea84b392bd43479c556d264fff6e5e57940e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78292 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 K1)JR*5&!^7A{=4> diff --git a/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-236f0953.js b/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-236f0953.js deleted file mode 100644 index 92036df..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-236f0953.js +++ /dev/null @@ -1,16 +0,0 @@ -var bn=Object.defineProperty;var _n=(i,t,e)=>t in i?bn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var w=(i,t,e)=>(_n(i,typeof t!="symbol"?t+"":t,e),e);/*! - * @kurkle/color v0.3.2 - * https://github.com/kurkle/color#readme - * (c) 2023 Jukka Kurkela - * Released under the MIT License - */function Jt(i){return i+.5|0}const ot=(i,t,e)=>Math.max(Math.min(i,e),t);function Wt(i){return ot(Jt(i*2.55),0,255)}function ht(i){return ot(Jt(i*255),0,255)}function it(i){return ot(Jt(i/2.55)/100,0,1)}function gi(i){return ot(Jt(i*100),0,100)}const q={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ue=[..."0123456789ABCDEF"],xn=i=>Ue[i&15],yn=i=>Ue[(i&240)>>4]+Ue[i&15],ne=i=>(i&240)>>4===(i&15),vn=i=>ne(i.r)&&ne(i.g)&&ne(i.b)&&ne(i.a);function kn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&q[i[1]]*17,g:255&q[i[2]]*17,b:255&q[i[3]]*17,a:t===5?q[i[4]]*17:255}:(t===7||t===9)&&(e={r:q[i[1]]<<4|q[i[2]],g:q[i[3]]<<4|q[i[4]],b:q[i[5]]<<4|q[i[6]],a:t===9?q[i[7]]<<4|q[i[8]]:255})),e}const wn=(i,t)=>i<255?t(i):"";function Mn(i){var t=vn(i)?xn:yn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+wn(i.a,t):void 0}const Sn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Cs(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Pn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function Dn(i,t,e){const s=Cs(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function On(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-r):h/(o+r),l=On(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function ei(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(ht)}function ii(i,t,e){return ei(Cs,i,t,e)}function Ln(i,t,e){return ei(Dn,i,t,e)}function Cn(i,t,e){return ei(Pn,i,t,e)}function Ts(i){return(i%360+360)%360}function Tn(i){const t=Sn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Wt(+t[5]):ht(+t[5]));const n=Ts(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=Ln(n,o,r):t[1]==="hsv"?s=Cn(n,o,r):s=ii(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function In(i,t){var e=ti(i);e[0]=Ts(e[0]+t),e=ii(e),i.r=e[0],i.g=e[1],i.b=e[2]}function An(i){if(!i)return;const t=ti(i),e=t[0],s=gi(t[1]),n=gi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${it(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const pi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},mi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Fn(){const i={},t=Object.keys(mi),e=Object.keys(pi);let s,n,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return i}let oe;function zn(i){oe||(oe=Fn(),oe.transparent=[0,0,0,0]);const t=oe[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const En=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Rn(i){const t=En.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];e=t[8]?Wt(r):ot(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?Wt(s):ot(s,0,255)),n=255&(t[4]?Wt(n):ot(n,0,255)),o=255&(t[6]?Wt(o):ot(o,0,255)),{r:s,g:n,b:o,a:e}}}function Bn(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${it(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const ze=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Pt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Hn(i,t,e){const s=Pt(it(i.r)),n=Pt(it(i.g)),o=Pt(it(i.b));return{r:ht(ze(s+e*(Pt(it(t.r))-s))),g:ht(ze(n+e*(Pt(it(t.g))-n))),b:ht(ze(o+e*(Pt(it(t.b))-o))),a:i.a+e*(t.a-i.a)}}function re(i,t,e){if(i){let s=ti(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=ii(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function Is(i,t){return i&&Object.assign(t||{},i)}function bi(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ht(i[3]))):(t=Is(i,{r:0,g:0,b:0,a:1}),t.a=ht(t.a)),t}function Nn(i){return i.charAt(0)==="r"?Rn(i):Tn(i)}class Kt{constructor(t){if(t instanceof Kt)return t;const e=typeof t;let s;e==="object"?s=bi(t):e==="string"&&(s=kn(t)||zn(t)||Nn(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=Is(this._rgb);return t&&(t.a=it(t.a)),t}set rgb(t){this._rgb=bi(t)}rgbString(){return this._valid?Bn(this._rgb):void 0}hexString(){return this._valid?Mn(this._rgb):void 0}hslString(){return this._valid?An(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=Hn(this._rgb,t._rgb,e)),this}clone(){return new Kt(this.rgb)}alpha(t){return this._rgb.a=ht(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Jt(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return re(this._rgb,2,t),this}darken(t){return re(this._rgb,2,-t),this}saturate(t){return re(this._rgb,1,t),this}desaturate(t){return re(this._rgb,1,-t),this}rotate(t){return In(this._rgb,t),this}}/*! - * Chart.js v4.3.2 - * https://www.chartjs.org - * (c) 2023 Chart.js Contributors - * Released under the MIT License - */const Wn=(()=>{let i=0;return()=>i++})();function A(i){return i===null||typeof i>"u"}function F(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function L(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function z(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function U(i,t){return z(i)?i:t}function D(i,t){return typeof i>"u"?t:i}const Vn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function N(i,t,e,s){let n,o,r;if(F(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function Un(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Yn(i){const t=Un(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function ke(i,t){return(xi[t]||(xi[t]=Yn(t)))(i)}function si(i){return i.charAt(0).toUpperCase()+i.slice(1)}const we=i=>typeof i<"u",ft=i=>typeof i=="function",yi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Xn(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const H=Math.PI,X=2*H,Kn=X+H,Me=Number.POSITIVE_INFINITY,qn=H/180,j=H/2,dt=H/4,vi=H*2/3,rt=Math.log10,Ot=Math.sign;function $t(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Gt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Zn(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Fs(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function oi(i,t,e){e=e||(r=>i[r]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const _t=(i,t,e,s)=>oi(i,e,s?n=>{const o=i[n][t];return oi[n][t]oi(i,e,s=>i[s][t]>=e);function io(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+si(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Si(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Es.forEach(o=>{delete i[o]}),delete i._chartjs)}function no(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Rs=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Bs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Rs.call(window,()=>{s=!1,i.apply(t,e)}))}}function oo(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Hs=i=>i==="start"?"left":i==="end"?"right":"center",$=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,ro=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function ao(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:f,maxDefined:d}=r.getUserBounds();f&&(n=J(Math.min(_t(a,l,c).lo,e?s:_t(t,l,r.getPixelForValue(c)).lo),0,s-1)),d?o=J(Math.max(_t(a,r.axis,h,!0).hi+1,e?0:_t(t,l,r.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function lo(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const ae=i=>i===0||i===1,Pi=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*X/e)),Di=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*X/e)+1,Ut={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*j)+1,easeOutSine:i=>Math.sin(i*j),easeInOutSine:i=>-.5*(Math.cos(H*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ae(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ae(i)?i:Pi(i,.075,.3),easeOutElastic:i=>ae(i)?i:Di(i,.075,.3),easeInOutElastic(i){return ae(i)?i:i<.5?.5*Pi(i*2,.1125,.45):.5+.5*Di(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ut.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ut.easeInBounce(i*2)*.5:Ut.easeOutBounce(i*2-1)*.5+.5};function ri(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Oi(i){return ri(i)?i:new Kt(i)}function Ee(i){return ri(i)?i:new Kt(i).saturate(.5).darken(.1).hexString()}const co=["x","y","borderWidth","radius","tension"],ho=["color","borderColor","backgroundColor"];function fo(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:ho},numbers:{type:"number",properties:co}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function uo(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Li=new Map;function go(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Li.get(e);return s||(s=new Intl.NumberFormat(i,t),Li.set(e,s)),s}function ai(i,t,e){return go(t,e).format(i)}const Ns={values(i){return F(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=po(i,e)}const r=rt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ai(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(rt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?Ns.numeric.call(this,i,t,e):""}};function po(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Ce={formatters:Ns};function mo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ce.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const yt=Object.create(null),Ye=Object.create(null);function Yt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Ee(n.backgroundColor),this.hoverBorderColor=(s,n)=>Ee(n.borderColor),this.hoverColor=(s,n)=>Ee(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Re(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return Re(Ye,t,e)}override(t,e){return Re(yt,t,e)}route(t,e,s,n){const o=Yt(this,t),r=Yt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return L(l)?Object.assign({},c,l):D(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var E=new bo({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[fo,uo,mo]);function _o(i){return!i||A(i.size)||A(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Se(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function xo(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,f,d;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function st(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,wo(i,o),l=0;l+i||0;function js(i,t){const e={},s=L(t),n=s?Object.keys(t):t,o=L(i)?s?r=>D(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=Lo(o(r));return e}function Co(i){return js(i,{top:"y",right:"x",bottom:"y",left:"x"})}function $s(i){return js(i,["topLeft","topRight","bottomLeft","bottomRight"])}function G(i){const t=Co(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function tt(i,t){i=i||{},t=t||E.font;let e=D(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=D(i.style,t.style);s&&!(""+s).match(Do)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:D(i.family,t.family),lineHeight:Oo(D(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:D(i.weight,t.weight),string:""};return n.string=_o(n),n}function le(i,t,e,s){let n=!0,o,r,a;for(o=0,r=i.length;oe&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function kt(i,t){return Object.assign(Object.create(i),t)}function li(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=Ks("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>li([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Ys(a,l,()=>Ho(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Ii(a).includes(l)},ownKeys(a){return Ii(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Ct(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Us(i,s),setContext:o=>Ct(i,o,e,s),override:o=>Ct(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Ys(o,r,()=>Ao(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Us(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}const Io=(i,t)=>i?i+si(t):t,ci=(i,t)=>L(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ys(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Ao(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ft(a)&&r.isScriptable(t)&&(a=Fo(t,a,i,e)),F(a)&&a.length&&(a=zo(t,a,i,r.isIndexable)),ci(t,a)&&(a=Ct(a,n,o&&o[t],r)),a}function Fo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),ci(i,l)&&(l=hi(n._scopes,n,i,l)),l}function zo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(L(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const f=hi(c,n,i,h);t.push(Ct(f,o,r&&r[i],a))}}return t}function Xs(i,t,e){return ft(i)?i(t,e):i}const Eo=(i,t)=>i===!0?t:typeof i=="string"?ke(t,i):void 0;function Ro(i,t,e,s,n){for(const o of t){const r=Eo(e,o);if(r){i.add(r);const a=Xs(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function hi(i,t,e,s){const n=t._rootScopes,o=Xs(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ti(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ti(a,r,o,l,s),l===null)?!1:li(Array.from(a),[""],n,o,()=>Bo(t,e,s))}function Ti(i,t,e,s,n){for(;e;)e=Ro(i,t,e,s,n);return e}function Bo(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return F(n)&&L(e)?e:n||{}}function Ho(i,t,e,s){let n;for(const o of t)if(n=Ks(Io(o,i),e),typeof n<"u")return ci(i,n)?hi(e,s,i,n):n}function Ks(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Ii(i){let t=i._keys;return t||(t=i._keys=No(i._scopes)),t}function No(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Wo=Number.EPSILON||1e-14,Tt=(i,t)=>ti==="x"?"y":"x";function Vo(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Mi(o,n),l=Mi(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const f=s*c,d=s*h;return{previous:{x:o.x-f*(r.x-n.x),y:o.y-f*(r.y-n.y)},next:{x:o.x+d*(r.x-n.x),y:o.y+d*(r.y-n.y)}}}function jo(i,t,e){const s=i.length;let n,o,r,a,l,c=Tt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Uo(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function Ko(i,t){return Ae(i).getPropertyValue(t)}const qo=["top","right","bottom","left"];function xt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=qo[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Go=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Zo(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Go(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function mt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Ae(e),o=n.boxSizing==="border-box",r=xt(n,"padding"),a=xt(n,"border","width"),{x:l,y:c,box:h}=Zo(i,e),f=r.left+(h&&a.left),d=r.top+(h&&a.top);let{width:u,height:p}=t;return o&&(u-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-f)/u*e.width/s),y:Math.round((c-d)/p*e.height/s)}}function Qo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=fi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Ae(o),l=xt(a,"border","width"),c=xt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=Pe(a.maxWidth,o,"clientWidth"),n=Pe(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Me,maxHeight:n||Me}}const he=i=>Math.round(i*10)/10;function Jo(i,t,e,s){const n=Ae(i),o=xt(n,"margin"),r=Pe(n.maxWidth,i,"clientWidth")||Me,a=Pe(n.maxHeight,i,"clientHeight")||Me,l=Qo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const d=xt(n,"border","width"),u=xt(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=he(Math.min(c,r,l.maxWidth)),h=he(Math.min(h,a,l.maxHeight)),c&&!h&&(h=he(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=he(Math.floor(h*s))),{width:c,height:h}}function Ai(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const tr=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function Fi(i,t){const e=Ko(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function bt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function er(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function ir(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=bt(i,n,e),a=bt(n,o,e),l=bt(o,t,e),c=bt(r,a,e),h=bt(a,l,e);return bt(c,h,e)}const sr=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},nr=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Be(i,t,e){return i?sr(t,e):nr()}function or(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function rr(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Zs(i){return i==="angle"?{between:zs,compare:Jn,normalize:Y}:{between:Dt,compare:(t,e)=>t-e,normalize:t=>t}}function zi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function ar(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=Zs(s),l=t.length;let{start:c,end:h,loop:f}=i,d,u;if(f){for(c+=l,h+=l,d=0,u=l;dl(n,S,b)&&a(n,S)!==0,_=()=>a(o,b)===0||l(o,S,b),k=()=>g||O(),y=()=>!g||_();for(let x=h,M=h;x<=f;++x)v=t[x%r],!v.skip&&(b=c(v[s]),b!==S&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?x:M),m!==null&&y()&&(p.push(zi({start:m,end:x,loop:d,count:r,style:u})),m=null),M=x,S=b));return m!==null&&p.push(zi({start:m,end:f,loop:d,count:r,style:u})),p}function Js(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function cr(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function hr(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=lr(e,n,o,s);if(s===!0)return Ei(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Rs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var et=new ur;const Bi="transparent",gr={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Oi(i||Bi),n=s.valid&&Oi(t||Bi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class pr{constructor(t,e,s,n){const o=e[s];n=le([t.to,n,o,t.from]);const r=le([t.from,o,n]);this._active=!0,this._fn=t.fn||gr[t.type||typeof r],this._easing=Ut[t.easing]||Ut.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=le([t.to,e,n,t.from]),this._from=le([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!L(o))return;const r={};for(const a of e)r[a]=o[a];(F(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=_r(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&br(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let f=o[c];const d=s.get(c);if(f)if(d&&f.active()){f.update(d,h,a);continue}else f.cancel();if(!d||!d.duration){t[c]=h;continue}o[c]=f=new pr(d,t,c,h),n.push(f)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return et.add(this._chart,s),!0}}function br(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function ji(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=kr(o,r,s),f=t.length;let d;for(let u=0;ue[s].axis===t).shift()}function Sr(i,t){return kt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Pr(i,t,e){return kt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Et(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Ne=i=>i==="reset"||i==="none",$i=(i,t)=>t?i:Object.assign({},i),Dr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:tn(e,!0),values:null};class Xt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Wi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Et(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(f,d,u,p)=>f==="x"?d:f==="r"?p:u,o=e.xAxisID=D(s.xAxisID,He(t,"x")),r=e.yAxisID=D(s.yAxisID,He(t,"y")),a=e.rAxisID=D(s.rAxisID,He(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Si(this._data,this),t._stacked&&Et(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(L(e))this._data=vr(e);else if(s!==e){if(s){Si(s,this);const n=this._cachedMeta;Et(n),n._parsed=[]}e&&Object.isExtensible(e)&&so(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Wi(e.vScale,e),e.stack!==s.stack&&(n=!0,Et(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&ji(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,f,d;if(this._parsing===!1)s._parsed=n,s._sorted=!0,d=n;else{F(n[t])?d=this.parseArrayData(s,n,t,e):L(n[t])?d=this.parseObjectData(s,n,t,e):d=this.parsePrimitiveData(s,n,t,e);const u=()=>f[a]===null||c&&f[a]g||f=0;--d)if(!p()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),g=c.resolveNamedOptions(d,u,p,f);return g.$shared&&(g.$shared=l,o[r]=Object.freeze($i(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),f);l=h.createResolver(d,this.getContext(t,s,e))}const c=new mr(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ne(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){Ne(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Ne(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a0&&this.getParsed(e-1);for(let _=0;_=v){y.skip=!0;continue}const x=this.getParsed(_),M=A(x[u]),C=y[d]=r.getPixelForValue(x[d],_),P=y[u]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,x,l):x[u],_);y.skip=isNaN(C)||isNaN(P)||M,y.stop=_>0&&Math.abs(x[d]-O[d])>m,g&&(y.parsed=x,y.raw=c.data[_]),f&&(y.options=h||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,y,n),O=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}w(be,"id","line"),w(be,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),w(be,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function gt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class di{constructor(t){w(this,"options");this.options=t||{}}static override(t){Object.assign(di.prototype,t)}init(){}formats(){return gt()}parse(){return gt()}format(){return gt()}add(){return gt()}diff(){return gt()}startOf(){return gt()}endOf(){return gt()}}var Or={_date:di};function Lr(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?eo:_t;if(s){if(n._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const f=l(o,t,e-h),d=l(o,t,e+h);return{lo:f.lo,hi:d.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function te(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Ar={evaluateInteractionItems:te,modes:{index(i,t,e,s){const n=mt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?We(i,n,o,s,r):Ve(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,f=c.data[h];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=mt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?We(i,n,o,s,r):Ve(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function Yi(i,t){return i.filter(e=>en.indexOf(e.pos)===-1&&e.box.axis===t)}function Bt(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Fr(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Bt(Rt(t,"left"),!0),n=Bt(Rt(t,"right")),o=Bt(Rt(t,"top"),!0),r=Bt(Rt(t,"bottom")),a=Yi(t,"x"),l=Yi(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Rt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Xi(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function sn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Br(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!L(n)){e.size&&(i[n]-=e.size);const f=s[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,i[n]+=e.size}o.getPadding&&sn(r,o.getPadding());const a=Math.max(0,t.outerWidth-Xi(r,i,"left","right")),l=Math.max(0,t.outerHeight-Xi(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Hr(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Nr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function Vt(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),d=Object.assign({},n);sn(d,G(s));const u=Object.assign({maxPadding:d,w:o,h:r,x:n.left,y:n.top},n),p=Er(l.concat(c),f);Vt(a.fullSize,u,f,p),Vt(l,u,f,p),Vt(c,u,f,p)&&Vt(l,u,f,p),Hr(u),Ki(a.leftAndTop,u,f,p),u.x+=u.w,u.y+=u.h,Ki(a.rightAndBottom,u,f,p),i.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},N(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class nn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Wr extends nn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const _e="$chartjs",Vr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},qi=i=>i===null||i==="";function jr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[_e]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",qi(n)){const o=Fi(i,"width");o!==void 0&&(i.width=o)}if(qi(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Fi(i,"height");o!==void 0&&(i.height=o)}return i}const on=tr?{passive:!0}:!1;function $r(i,t,e){i.addEventListener(t,e,on)}function Ur(i,t,e){i.canvas.removeEventListener(t,e,on)}function Yr(i,t){const e=Vr[i.type]||i.type,{x:s,y:n}=mt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function De(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Xr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||De(a.addedNodes,s),r=r&&!De(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Kr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||De(a.removedNodes,s),r=r&&!De(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Zt=new Map;let Gi=0;function rn(){const i=window.devicePixelRatio;i!==Gi&&(Gi=i,Zt.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function qr(i,t){Zt.size||window.addEventListener("resize",rn),Zt.set(i,t)}function Gr(i){Zt.delete(i),Zt.size||window.removeEventListener("resize",rn)}function Zr(i,t,e){const s=i.canvas,n=s&&fi(s);if(!n)return;const o=Bs((a,l)=>{const c=n.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),qr(i,o),r}function je(i,t,e){e&&e.disconnect(),t==="resize"&&Gr(i)}function Qr(i,t,e){const s=i.canvas,n=Bs(o=>{i.ctx!==null&&e(Yr(o,i))},i);return $r(s,t,n),n}class Jr extends nn{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(jr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[_e])return!1;const s=e[_e].initial;["height","width"].forEach(o=>{const r=s[o];A(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[_e],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Xr,detach:Kr,resize:Zr}[e]||Qr;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:je,detach:je,resize:je}[e]||Ur)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Jo(t,e,s,n)}isAttached(t){const e=fi(t);return!!(e&&e.isConnected)}}function ta(i){return!Gs()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Wr:Jr}class vt{constructor(){w(this,"x");w(this,"y");w(this,"active",!1);w(this,"options");w(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Gt(this.x)&&Gt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}w(vt,"defaults",{}),w(vt,"defaultRoutes");function ea(i,t){const e=i.options.ticks,s=ia(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?na(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return oa(t,c,o,r/n),c;const h=sa(o,t,n);if(r>0){let f,d;const u=r>1?Math.round((l-a)/(r-1)):null;for(de(t,c,h,A(u)?0:a-u,a),f=0,d=r-1;fn)return l}return Math.max(n,1)}function na(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Zi=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Qi=(i,t)=>Math.min(t||i,i);function Ji(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;or+a)))return l}function ca(i,t){N(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:U(e,U(s,e)),max:U(s,U(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=To(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),f=h.widest.width,d=h.highest.height,u=J(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/s:u/(s-1),f+6>a&&(a=u/(s-(t.offset?.5:1)),l=this.maxHeight-Ht(t.grid)-e.padding-ts(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),r=ni(Math.min(Math.asin(J((h.highest.height+6)/a,-1,1)),Math.asin(J(l/c,-1,1))-Math.asin(J(d/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=ts(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ht(o)+l):(t.height=this.maxHeight,t.width=Ht(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:f,highest:d}=this._getLabelSizes(),u=s.padding*2,p=at(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*f.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+u)}else{const b=s.mirror?0:g*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+u)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=s*e.height):(d=s*t.height,u=n*e.width):o==="start"?u=e.width:o==="end"?d=t.width:o!=="inner"&&(d=t.width/2,u=e.width/2),this.paddingLeft=Math.max((d-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-f+r)*this.width/(this.width-f),0)}else{let h=e.height/2,f=t.height/2;o==="start"?(h=0,f=t.height):o==="end"&&(h=e.height,f=0),this.paddingTop=h+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[M]||0,height:a[M]||0});return{first:x(0),last:x(e-1),widest:x(k),highest:x(y),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return to(this._alignToPixels?ut(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=Ht(o),u=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(B){return ut(s,B,g)};let v,S,O,_,k,y,x,M,C,P,T,W;if(r==="top")v=b(this.bottom),y=this.bottom-d,M=v-m,P=b(t.top)+m,W=t.bottom;else if(r==="bottom")v=b(this.top),P=t.top,W=b(t.bottom)-m,y=v+m,M=this.top+d;else if(r==="left")v=b(this.right),k=this.right-d,x=v-m,C=b(t.left)+m,T=t.right;else if(r==="right")v=b(this.left),C=t.left,T=b(t.right)-m,k=v+m,x=this.left+d;else if(e==="x"){if(r==="center")v=b((t.top+t.bottom)/2+.5);else if(L(r)){const B=Object.keys(r)[0],K=r[B];v=b(this.chart.scales[B].getPixelForValue(K))}P=t.top,W=t.bottom,y=v+m,M=y+d}else if(e==="y"){if(r==="center")v=b((t.left+t.right)/2);else if(L(r)){const B=Object.keys(r)[0],K=r[B];v=b(this.chart.scales[B].getPixelForValue(K))}k=v-m,x=k-d,C=t.left,T=t.right}const Z=D(n.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/Z));for(S=0;So.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");E.route(o,n,l,a)})}function ma(i){return"id"in i&&"defaults"in i}class ba{constructor(){this.controllers=new ue(Xt,"datasets",!0),this.elements=new ue(vt,"elements"),this.plugins=new ue(Object,"plugins"),this.scales=new ue(wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):N(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=si(t);I(s["before"+n],[],s),e[t](s),I(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function xa(i){const t={},e=[],s=Object.keys(Q.plugins.items);for(let o=0;o1&&es(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function is(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Pa(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return is(i,"x",e[0])||is(i,"y",e[0])}return{}}function Da(i,t){const e=yt[i.type]||{scales:{}},s=t.scales||{},n=Xe(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!L(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Ke(r,a,Pa(r,i),E.scales[a.type]),c=Ma(l,n),h=e.scales||{};o[r]=jt(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Xe(a,t),h=(yt[a]||{}).scales||{};Object.keys(h).forEach(f=>{const d=wa(f,l),u=r[d+"AxisID"]||d;o[u]=o[u]||Object.create(null),jt(o[u],[{axis:d},s[u],h[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];jt(a,[E.scales[a.type],E.scale])}),o}function an(i){const t=i.options||(i.options={});t.plugins=D(t.plugins,{}),t.scales=Da(i,t)}function ln(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Oa(i){return i=i||{},i.data=ln(i.data),an(i),i}const ss=new Map,cn=new Set;function ge(i,t){let e=ss.get(i);return e||(e=t(),ss.set(i,e),cn.add(e)),e}const Nt=(i,t,e)=>{const s=ke(t,e);s!==void 0&&i.add(s)};class La{constructor(t){this._config=Oa(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ln(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),an(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ge(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ge(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ge(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return ge(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(f=>Nt(l,t,f))),h.forEach(f=>Nt(l,n,f)),h.forEach(f=>Nt(l,yt[o]||{},f)),h.forEach(f=>Nt(l,E,f)),h.forEach(f=>Nt(l,Ye,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),cn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,yt[e]||{},E.datasets[e]||{},{type:e},E,Ye]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=ns(this._resolverCache,t,n);let l=r;if(Ta(r,e)){o.$shared=!1,s=ft(s)?s():s;const c=this.createResolver(t,s,a);l=Ct(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=ns(this._resolverCache,t,s);return L(e)?Ct(o,e,void 0,n):o}}function ns(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:li(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Ca=i=>L(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||ft(i[e]),!1);function Ta(i,t){const{isScriptable:e,isIndexable:s}=Us(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ft(a)||Ca(a))||r&&F(a))return!0}return!1}var Ia="4.3.2";const Aa=["top","bottom","left","right","chartArea"];function os(i,t){return i==="top"||i==="bottom"||Aa.indexOf(i)===-1&&t==="x"}function rs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function as(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[i],t)}function Fa(i){const t=i.chart,e=t.options.animation;I(e&&e.onProgress,[i],t)}function hn(i){return Gs()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const xe={},ls=i=>{const t=hn(i);return Object.values(xe).filter(e=>e.canvas===t).pop()};function za(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function Ea(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}function Ra(i){const{xScale:t,yScale:e}=i;if(t&&e)return{left:t.left,right:t.right,top:e.top,bottom:e.bottom}}class nt{static register(...t){Q.add(...t),cs()}static unregister(...t){Q.remove(...t),cs()}constructor(t,e){const s=this.config=new La(e),n=hn(t),o=ls(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||ta(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Wn(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _a,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=oo(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],xe[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}et.listen(this,"complete",as),et.listen(this,"progress",Fa),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return A(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Q}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ai(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ci(this.canvas,this.ctx),this}stop(){return et.stop(this),this}resize(t,e){et.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ai(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};N(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=Ke(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),N(o,r=>{const a=r.options,l=a.id,c=Ke(l,a),h=D(a.type,r.dtype);(a.position===void 0||os(a.position,c)!==os(r.dposition))&&(a.position=r.dposition),n[l]=!0;let f=null;if(l in s&&s[l].type===h)f=s[l];else{const d=Q.getScale(h);f=new d({id:l,type:h,ctx:this.ctx,chart:this}),s[f.id]=f}f.init(a,t)}),N(n,(r,a)=>{r||delete s[a]}),N(s,r=>{lt.configure(this,r,r.options),lt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rs("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){N(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!yi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;za(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],N(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,n=!s.disabled,o=Ra(t)||this.chartArea,r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(n&&Te(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&Ie(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return st(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Ar.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);we(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),et.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};N(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){N(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},N(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!_i(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=Xn(t),c=Ea(t,this._lastEvent,s,l);s&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const h=!_i(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}w(nt,"defaults",E),w(nt,"instances",xe),w(nt,"overrides",yt),w(nt,"registry",Q),w(nt,"version",Ia),w(nt,"getChart",ls);function cs(){return N(nt.instances,i=>i._plugins.invalidate())}function fn(i,t,e=t){i.lineCap=D(e.borderCapStyle,t.borderCapStyle),i.setLineDash(D(e.borderDash,t.borderDash)),i.lineDashOffset=D(e.borderDashOffset,t.borderDashOffset),i.lineJoin=D(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=D(e.borderWidth,t.borderWidth),i.strokeStyle=D(e.borderColor,t.borderColor)}function Ba(i,t,e){i.lineTo(e.x,e.y)}function Ha(i){return i.stepped?vo:i.tension||i.cubicInterpolationMode==="monotone"?ko:Ba}function dn(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=na&&o>a;return{count:s,start:l,loop:t.loop,ilen:c(r+(c?a-O:O))%o,S=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(u=n[v(0)],i.moveTo(u.x,u.y)),d=0;d<=a;++d){if(u=n[v(d)],u.skip)continue;const O=u.x,_=u.y,k=O|0;k===p?(_m&&(m=_),h=(f*h+O)/++f):(S(),i.lineTo(O,_),p=k,f=0,g=m=_),b=_}S()}function qe(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Wa:Na}function Va(i){return i.stepped?er:i.tension||i.cubicInterpolationMode==="monotone"?ir:bt}function ja(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),fn(i,t.options),i.stroke(n)}function $a(i,t,e,s){const{segments:n,options:o}=t,r=qe(t);for(const a of n)fn(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Ua=typeof Path2D=="function";function Ya(i,t,e,s){Ua&&!t.options.segment?ja(i,t,e,s):$a(i,t,e,s)}class ct extends vt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Xo(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=hr(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=Js(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=Va(s);let c,h;for(c=0,h=r.length;ct!=="borderDash"&&t!=="fill"});function hs(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o){a=ui(r,a,n);const l=n[r],c=n[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function ui(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function fs(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function un(i,t){let e=[],s=!1;return F(i)?(s=!0,e=i):e=Ka(i,t),e.length?new ct({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function ds(i){return i&&i.fill!==!1}function qa(i,t,e){let n=i[t].fill;const o=[t];let r;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!z(n))return n;if(r=i[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function Ga(i,t,e){const s=tl(i);if(L(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return z(n)&&Math.floor(n)===n?Za(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Za(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Qa(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:L(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Ja(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:L(i)?s=i.value:s=t.getBaseValue(),s}function tl(i){const t=i.options,e=t.fill;let s=D(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function el(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,r=s.points,a=il(t,e);a.push(un({x:null,y:t.bottom},s));for(let l=0;l=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&$e(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;ds(o)&&$e(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!ds(s)||e.drawTime!=="beforeDatasetDraw"||$e(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ms=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},ul=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class bs extends vt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=tt(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ms(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let f=t;o.textAlign="left",o.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(f+=h,c[c.length-(g>0?0:1)]=0,u+=h,d++),l[g]={left:0,top:u,row:d,width:m,height:n},c[c.length-1]+=m+a}),f}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let f=a,d=0,u=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:v,itemHeight:S}=gl(s,e,o,m,n);b>0&&u+S+2*a>h&&(f+=d+a,c.push({width:d,height:u}),p+=d+a,g++,d=u=0),l[b]={left:p,top:u,col:g,width:v,height:S},d=Math.max(d,v),u+=S+a}),f+=d,c.push({width:d,height:u}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=Be(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=$(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=$(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Te(t,this),this._draw(),Ie(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=E.color,l=Be(t.rtl,this.left,this.width),c=tt(r.font),{padding:h}=r,f=c.size,d=f/2;let u;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=ms(r,f),b=function(k,y,x){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const M=D(x.lineWidth,1);if(n.fillStyle=D(x.fillStyle,a),n.lineCap=D(x.lineCap,"butt"),n.lineDashOffset=D(x.lineDashOffset,0),n.lineJoin=D(x.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=D(x.strokeStyle,a),n.setLineDash(D(x.lineDash,[])),r.usePointStyle){const C={radius:g*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:M},P=l.xPlus(k,p/2),T=y+d;Ws(n,C,P,T,r.pointStyleWidth&&p)}else{const C=y+Math.max((f-g)/2,0),P=l.leftForLtr(k,p),T=$s(x.borderRadius);n.beginPath(),Object.values(T).some(W=>W!==0)?Vs(n,{x:P,y:C,w:p,h:g,radius:T}):n.rect(P,C,p,g),n.fill(),M!==0&&n.stroke()}n.restore()},v=function(k,y,x){Lt(n,x.text,k,y+m/2,c,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},S=this.isHorizontal(),O=this._computeTitleHeight();S?u={x:$(o,this.left+h,this.right-s[0]),y:this.top+h+O,line:0}:u={x:this.left+h,y:$(o,this.top+O+h,this.bottom-e[0].height),line:0},or(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((k,y)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const x=n.measureText(k.text).width,M=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),C=p+d+x;let P=u.x,T=u.y;l.setWidth(this.width),S?y>0&&P+C+h>this.right&&(T=u.y+=_,u.line++,P=u.x=$(o,this.left+h,this.right-s[u.line])):y>0&&T+_>this.bottom&&(P=u.x=P+e[u.line].width+h,u.line++,T=u.y=$(o,this.top+O+h,this.bottom-e[u.line].height));const W=l.x(P);if(b(W,T,k),P=ro(M,P+p+d,S?P+C:this.right,t.rtl),v(l.x(P),T,k),S)u.x+=C+h;else if(typeof k.text!="string"){const Z=c.lineHeight;u.y+=pn(k,Z)+h}else u.y+=_}),rr(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=tt(e.font),n=G(e.padding);if(!e.display)return;const o=Be(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,f=$(t.align,f,this.right-d);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+$(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const u=$(a,f,f+d);r.textAlign=o.textAlign(Hs(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,Lt(r,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title,e=tt(t.font),s=G(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(Dt(t,this.left,this.right)&&Dt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function ml(i,t,e){let s=i;return typeof t.text!="string"&&(s=pn(t,e)),s}function pn(i,t){const e=i.text?i.text.length:0;return t*e}function bl(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var _l={id:"legend",_element:bs,start(i,t,e){const s=i.legend=new bs({ctx:i.ctx,options:e,chart:i});lt.configure(i,s,e),lt.addBox(i,s)},stop(i){lt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;lt.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=G(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};const xl=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function yl(i,t,e,s){const n=i.indexOf(t);if(n===-1)return xl(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const vl=(i,t)=>i===null?null:J(Math.round(i),0,t);function _s(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}w(Ze,"id","category"),w(Ze,"defaults",{ticks:{callback:_s}});function kl(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:f,includeBounds:d}=i,u=o||1,p=h-1,{min:g,max:m}=t,b=!A(r),v=!A(a),S=!A(c),O=(m-g)/(f+1);let _=ki((m-g)/p/u)*u,k,y,x,M;if(_<1e-14&&!b&&!v)return[{value:g},{value:m}];M=Math.ceil(m/_)-Math.floor(g/_),M>p&&(_=ki(M*_/p/u)*u),A(l)||(k=Math.pow(10,l),_=Math.ceil(_*k)/k),n==="ticks"?(y=Math.floor(g/_)*_,x=Math.ceil(m/_)*_):(y=g,x=m),b&&v&&o&&Zn((a-r)/o,_/1e3)?(M=Math.round(Math.min((a-r)/_,h)),_=(a-r)/M,y=r,x=a):S?(y=b?r:y,x=v?a:x,M=c-1,_=(x-y)/M):(M=(x-y)/_,$t(M,Math.round(M),_/1e3)?M=Math.round(M):M=Math.ceil(M));const C=Math.max(wi(_),wi(y));k=Math.pow(10,A(l)?C:l),y=Math.round(y*k)/k,x=Math.round(x*k)/k;let P=0;for(b&&(d&&y!==r?(e.push({value:r}),ya)break;e.push({value:T})}return v&&d&&x!==a?e.length&&$t(e[e.length-1].value,a,xs(a,O,i))?e[e.length-1].value=a:e.push({value:a}):(!v||x===a)&&e.push({value:x}),e}function xs(i,t,{horizontal:e,minRotation:s}){const n=at(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class Oe extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return A(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=Ot(n),c=Ot(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=kl(n,o);return t.bounds==="ticks"&&Fs(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ai(t,this.chart.options.locale,this.options.ticks.format)}}class Qe extends Oe{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?t:0,this.max=z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=at(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}w(Qe,"id","linear"),w(Qe,"defaults",{ticks:{callback:Ce.formatters.numeric}});const Qt=i=>Math.floor(rt(i)),pt=(i,t)=>Math.pow(10,Qt(i)+t);function ys(i){return i/Math.pow(10,Qt(i))===1}function vs(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function wl(i,t){const e=t-i;let s=Qt(e);for(;vs(i,t,s)>10;)s++;for(;vs(i,t,s)<10;)s--;return Math.min(s,Qt(i))}function Ml(i,{min:t,max:e}){t=U(i.min,t);const s=[],n=Qt(t);let o=wl(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let f=Math.floor((c-h)/Math.pow(10,o)),d=U(i.min,Math.round((l+h+f*Math.pow(10,o))*r)/r);for(;d=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,r=o>=0?1:r),d=Math.round((l+h+f*Math.pow(10,o))*r)/r;const u=U(i.max,d);return s.push({value:u,major:ys(u),significand:f}),s}class ks extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Oe.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return z(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?Math.max(0,t):null,this.max=z(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!z(this._userMin)&&(this.min=t===pt(this.min,0)?pt(this.min,-1):pt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=a=>s=t?s:a,r=a=>n=e?n:a;s===n&&(s<=0?(o(1),r(10)):(o(pt(s,-1)),r(pt(n,1)))),s<=0&&o(pt(n,-1)),n<=0&&r(pt(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=Ml(e,this);return t.bounds==="ticks"&&Fs(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":ai(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=rt(t),this._valueRange=rt(this.max)-rt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(rt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}w(ks,"id","logarithmic"),w(ks,"defaults",{ticks:{callback:Ce.formatters.logarithmic,major:{enabled:!0}}});function Je(i){const t=i.ticks;if(t.display&&i.display){const e=G(t.backdropPadding);return D(t.font&&t.font.size,E.font.size)+e.height}return 0}function Sl(i,t,e){return e=F(e)?e:[e],{w:xo(i,t.string,e),h:e.length*t.lineHeight}}function ws(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Pl(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?H/o:0;for(let l=0;lt.r&&(a=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),n.startt.b&&(l=(n.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Ol(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,s+n+r,o),c=Math.round(ni(Y(l.angle+j))),h=Al(l.y,a.h,c),f=Tl(c),d=Il(l.x,a.w,f);return{visible:!0,x:l.x,y:h,textAlign:f,left:d,top:h,right:d+a.w,bottom:h+a.h}}function Ll(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(st({x:e,y:s},t)||st({x:e,y:o},t)||st({x:n,y:s},t)||st({x:n,y:o},t))}function Cl(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Je(o)/2,additionalAngle:r?H/n:0};let c;for(let h=0;h270||e<90)&&(i-=t),i}function Fl(i,t,e){const{left:s,top:n,right:o,bottom:r}=e,{backdropColor:a}=t;if(!A(a)){const l=$s(t.borderRadius),c=G(t.backdropPadding);i.fillStyle=a;const h=s-c.left,f=n-c.top,d=o-s+c.width,u=r-n+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),Vs(i,{x:h,y:f,w:d,h:u,radius:l}),i.fill()):i.fillRect(h,f,d,u)}}function zl(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const r=s.setContext(i.getPointLabelContext(n));Fl(e,r,o);const a=tt(r.font),{x:l,y:c,textAlign:h}=o;Lt(e,i._pointLabels[n],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function mn(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,X);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let r=1;r{const n=I(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?Pl(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=X/(this._pointLabels.length||1),s=this.options.startAngle||0;return Y(t*e+at(s))}getDistanceFromCenterForValue(t){if(A(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(A(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(f!==0){l=this.getDistanceFromCenterForValue(h.value);const d=this.getContext(f),u=n.setContext(d),p=o.setContext(d);El(this,u,l,r,p)}}),s.display){for(t.save(),a=r-1;a>=0;a--){const h=s.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:d}=h;!d||!f||(t.lineWidth=d,t.strokeStyle=f,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;const c=s.setContext(this.getContext(l)),h=tt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const f=G(c.backdropPadding);t.fillRect(-r/2-f.left,-o-h.size/2-f.top,r+f.width,h.size+f.height)}Lt(t,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}w(pe,"id","radialLinear"),w(pe,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ce.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),w(pe,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),w(pe,"descriptors",{angleLines:{_fallback:"grid"}});const Fe={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},V=Object.keys(Fe);function Ms(i,t){return i-t}function Ss(i,t){if(A(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),z(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Gt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function Ps(i,t,e,s){const n=V.length;for(let o=V.indexOf(i);o=V.indexOf(e);o--){const r=V[o];if(Fe[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return V[e?V.indexOf(e):0]}function Hl(i){for(let t=V.indexOf(i)+1,e=V.length;t=t?e[s]:e[n];i[o]=!0}}function Nl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Os(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=J(e,0,r),s=J(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||Ps(o.minUnit,e,s,this._getLabelCapacity(e)),a=D(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Gt(l)||l===!0,h={};let f=e,d,u;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(d=f,u=0;d+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return I(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],f=c&&a[c],d=s[e],u=c&&f&&d&&d.major;return this._adapter.format(t,n||(u?f:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=_t(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=_t(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Ls extends Le{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=me(e,this.min),this._tableRange=me(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;rn-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(me(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return me(this._table,s*this._tableRange+this._minPos,!0)}}w(Ls,"id","timeseries"),w(Ls,"defaults",Le.defaults);nt.register(ct,ye,be,Ze,Qe,dl,_l);export{nt as Chart}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-da3c73a9.js b/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-da3c73a9.js new file mode 100644 index 0000000..91c9602 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/chart-lib-da3c73a9.js @@ -0,0 +1,16 @@ +var _n=Object.defineProperty;var xn=(i,t,e)=>t in i?_n(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var w=(i,t,e)=>(xn(i,typeof t!="symbol"?t+"":t,e),e);/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function Jt(i){return i+.5|0}const ot=(i,t,e)=>Math.max(Math.min(i,e),t);function Wt(i){return ot(Jt(i*2.55),0,255)}function ht(i){return ot(Jt(i*255),0,255)}function it(i){return ot(Jt(i/2.55)/100,0,1)}function pi(i){return ot(Jt(i*100),0,100)}const q={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ye=[..."0123456789ABCDEF"],yn=i=>Ye[i&15],vn=i=>Ye[(i&240)>>4]+Ye[i&15],ne=i=>(i&240)>>4===(i&15),kn=i=>ne(i.r)&&ne(i.g)&&ne(i.b)&&ne(i.a);function wn(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&q[i[1]]*17,g:255&q[i[2]]*17,b:255&q[i[3]]*17,a:t===5?q[i[4]]*17:255}:(t===7||t===9)&&(e={r:q[i[1]]<<4|q[i[2]],g:q[i[3]]<<4|q[i[4]],b:q[i[5]]<<4|q[i[6]],a:t===9?q[i[7]]<<4|q[i[8]]:255})),e}const Mn=(i,t)=>i<255?t(i):"";function Sn(i){var t=kn(i)?yn:vn;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Mn(i.a,t):void 0}const Pn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ts(i,t,e){const s=t*Math.min(e,1-e),n=(o,r=(o+i/30)%12)=>e-s*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Dn(i,t,e){const s=(n,o=(n+i/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function On(i,t,e){const s=Ts(i,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)s[n]*=1-t-e,s[n]+=t;return s}function Ln(i,t,e,s,n){return i===n?(t-e)/s+(t.5?h/(2-o-r):h/(o+r),l=Ln(e,s,n,h,o),l=l*60+.5),[l|0,c||0,a]}function ii(i,t,e,s){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,s)).map(ht)}function si(i,t,e){return ii(Ts,i,t,e)}function Cn(i,t,e){return ii(On,i,t,e)}function Tn(i,t,e){return ii(Dn,i,t,e)}function Is(i){return(i%360+360)%360}function In(i){const t=Pn.exec(i);let e=255,s;if(!t)return;t[5]!==s&&(e=t[6]?Wt(+t[5]):ht(+t[5]));const n=Is(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?s=Cn(n,o,r):t[1]==="hsv"?s=Tn(n,o,r):s=si(n,o,r),{r:s[0],g:s[1],b:s[2],a:e}}function An(i,t){var e=ei(i);e[0]=Is(e[0]+t),e=si(e),i.r=e[0],i.g=e[1],i.b=e[2]}function Fn(i){if(!i)return;const t=ei(i),e=t[0],s=pi(t[1]),n=pi(t[2]);return i.a<255?`hsla(${e}, ${s}%, ${n}%, ${it(i.a)})`:`hsl(${e}, ${s}%, ${n}%)`}const mi={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},bi={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function zn(){const i={},t=Object.keys(bi),e=Object.keys(mi);let s,n,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return i}let oe;function En(i){oe||(oe=zn(),oe.transparent=[0,0,0,0]);const t=oe[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Rn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Bn(i){const t=Rn.exec(i);let e=255,s,n,o;if(t){if(t[7]!==s){const r=+t[7];e=t[8]?Wt(r):ot(r*255,0,255)}return s=+t[1],n=+t[3],o=+t[5],s=255&(t[2]?Wt(s):ot(s,0,255)),n=255&(t[4]?Wt(n):ot(n,0,255)),o=255&(t[6]?Wt(o):ot(o,0,255)),{r:s,g:n,b:o,a:e}}}function Hn(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${it(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}const Ee=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Pt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function Nn(i,t,e){const s=Pt(it(i.r)),n=Pt(it(i.g)),o=Pt(it(i.b));return{r:ht(Ee(s+e*(Pt(it(t.r))-s))),g:ht(Ee(n+e*(Pt(it(t.g))-n))),b:ht(Ee(o+e*(Pt(it(t.b))-o))),a:i.a+e*(t.a-i.a)}}function re(i,t,e){if(i){let s=ei(i);s[t]=Math.max(0,Math.min(s[t]+s[t]*e,t===0?360:1)),s=si(s),i.r=s[0],i.g=s[1],i.b=s[2]}}function As(i,t){return i&&Object.assign(t||{},i)}function _i(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=ht(i[3]))):(t=As(i,{r:0,g:0,b:0,a:1}),t.a=ht(t.a)),t}function Wn(i){return i.charAt(0)==="r"?Bn(i):In(i)}class Kt{constructor(t){if(t instanceof Kt)return t;const e=typeof t;let s;e==="object"?s=_i(t):e==="string"&&(s=wn(t)||En(t)||Wn(t)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var t=As(this._rgb);return t&&(t.a=it(t.a)),t}set rgb(t){this._rgb=_i(t)}rgbString(){return this._valid?Hn(this._rgb):void 0}hexString(){return this._valid?Sn(this._rgb):void 0}hslString(){return this._valid?Fn(this._rgb):void 0}mix(t,e){if(t){const s=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=s.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=r*s.a+(1-r)*n.a,this.rgb=s}return this}interpolate(t,e){return t&&(this._rgb=Nn(this._rgb,t._rgb,e)),this}clone(){return new Kt(this.rgb)}alpha(t){return this._rgb.a=ht(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Jt(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return re(this._rgb,2,t),this}darken(t){return re(this._rgb,2,-t),this}saturate(t){return re(this._rgb,1,t),this}desaturate(t){return re(this._rgb,1,-t),this}rotate(t){return An(this._rgb,t),this}}/*! + * Chart.js v4.4.0 + * https://www.chartjs.org + * (c) 2023 Chart.js Contributors + * Released under the MIT License + */const Vn=(()=>{let i=0;return()=>i++})();function A(i){return i===null||typeof i>"u"}function F(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function L(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function z(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function $(i,t){return z(i)?i:t}function D(i,t){return typeof i>"u"?t:i}const jn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function I(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function N(i,t,e,s){let n,o,r;if(F(i))if(o=i.length,s)for(n=o-1;n>=0;n--)t.call(e,i[n],n);else for(n=0;ni,x:i=>i.x,y:i=>i.y};function Yn(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Xn(i){const t=Yn(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function we(i,t){return(yi[t]||(yi[t]=Xn(t)))(i)}function ni(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Me=i=>typeof i<"u",ft=i=>typeof i=="function",vi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Kn(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const B=Math.PI,X=2*B,qn=X+B,Se=Number.POSITIVE_INFINITY,Gn=B/180,Y=B/2,dt=B/4,ki=B*2/3,rt=Math.log10,Ot=Math.sign;function $t(i,t,e){return Math.abs(i-t)n-o).pop(),t}function Gt(i){return!isNaN(parseFloat(i))&&isFinite(i)}function Qn(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function zs(i,t,e){let s,n,o;for(s=0,n=i.length;sl&&c=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ri(i,t,e){e=e||(r=>i[r]1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const _t=(i,t,e,s)=>ri(i,e,s?n=>{const o=i[n][t];return oi[n][t]ri(i,e,s=>i[s][t]>=e);function so(i,t,e){let s=0,n=i.length;for(;ss&&i[n-1]>e;)n--;return s>0||n{const s="_onData"+ni(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Pi(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Rs.forEach(o=>{delete i[o]}),delete i._chartjs)}function oo(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Bs=function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame}();function Hs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Bs.call(window,()=>{s=!1,i.apply(t,e)}))}}function ro(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const Ns=i=>i==="start"?"left":i==="end"?"right":"center",j=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,ao=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function lo(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,_parsed:a}=i,l=r.axis,{min:c,max:h,minDefined:f,maxDefined:d}=r.getUserBounds();f&&(n=J(Math.min(_t(a,l,c).lo,e?s:_t(t,l,r.getPixelForValue(c)).lo),0,s-1)),d?o=J(Math.max(_t(a,r.axis,h,!0).hi+1,e?0:_t(t,l,r.getPixelForValue(h),!0).hi+1),n,s)-n:o=s-n}return{start:n,count:o}}function co(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const ae=i=>i===0||i===1,Di=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*X/e)),Oi=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*X/e)+1,Ut={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*Y)+1,easeOutSine:i=>Math.sin(i*Y),easeInOutSine:i=>-.5*(Math.cos(B*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ae(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ae(i)?i:Di(i,.075,.3),easeOutElastic:i=>ae(i)?i:Oi(i,.075,.3),easeInOutElastic(i){return ae(i)?i:i<.5?.5*Di(i*2,.1125,.45):.5+.5*Oi(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Ut.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Ut.easeInBounce(i*2)*.5:Ut.easeOutBounce(i*2-1)*.5+.5};function ai(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Li(i){return ai(i)?i:new Kt(i)}function Re(i){return ai(i)?i:new Kt(i).saturate(.5).darken(.1).hexString()}const ho=["x","y","borderWidth","radius","tension"],fo=["color","borderColor","backgroundColor"];function uo(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:fo},numbers:{type:"number",properties:ho}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function go(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ci=new Map;function po(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Ci.get(e);return s||(s=new Intl.NumberFormat(i,t),Ci.set(e,s)),s}function li(i,t,e){return po(t,e).format(i)}const Ws={values(i){return F(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=mo(i,e)}const r=rt(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),li(i,s,l)},logarithmic(i,t,e){if(i===0)return"0";const s=e[t].significand||i/Math.pow(10,Math.floor(rt(i)));return[1,2,3,5,10,15].includes(s)||t>.8*e.length?Ws.numeric.call(this,i,t,e):""}};function mo(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Te={formatters:Ws};function bo(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Te.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const yt=Object.create(null),Xe=Object.create(null);function Yt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Re(n.backgroundColor),this.hoverBorderColor=(s,n)=>Re(n.borderColor),this.hoverColor=(s,n)=>Re(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Be(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return Be(Xe,t,e)}override(t,e){return Be(yt,t,e)}route(t,e,s,n){const o=Yt(this,t),r=Yt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return L(l)?Object.assign({},c,l):D(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var E=new _o({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[uo,go,bo]);function xo(i){return!i||A(i.size)||A(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Pe(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function yo(i,t,e,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==t&&(n=s.data={},o=s.garbageCollect=[],s.font=t),i.save(),i.font=t;let r=0;const a=e.length;let l,c,h,f,d;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function st(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Mo(i,o),l=0;l+i||0;function $s(i,t){const e={},s=L(t),n=s?Object.keys(t):t,o=L(i)?s?r=>D(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=Co(o(r));return e}function To(i){return $s(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Us(i){return $s(i,["topLeft","topRight","bottomLeft","bottomRight"])}function G(i){const t=To(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function tt(i,t){i=i||{},t=t||E.font;let e=D(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=D(i.style,t.style);s&&!(""+s).match(Oo)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:D(i.family,t.family),lineHeight:Lo(D(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:D(i.weight,t.weight),string:""};return n.string=xo(n),n}function le(i,t,e,s){let n=!0,o,r,a;for(o=0,r=i.length;oe&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function kt(i,t){return Object.assign(Object.create(i),t)}function ci(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=qs("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>ci([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Xs(a,l,()=>No(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Ai(a).includes(l)},ownKeys(a){return Ai(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Ct(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Ys(i,s),setContext:o=>Ct(i,o,e,s),override:o=>Ct(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Xs(o,r,()=>Fo(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Ys(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ft(e)?e:()=>e,isIndexable:ft(s)?s:()=>s}}const Ao=(i,t)=>i?i+ni(t):t,hi=(i,t)=>L(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t))return i[t];const s=e();return i[t]=s,s}function Fo(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ft(a)&&r.isScriptable(t)&&(a=zo(t,a,i,e)),F(a)&&a.length&&(a=Eo(t,a,i,r.isIndexable)),hi(t,a)&&(a=Ct(a,n,o&&o[t],r)),a}function zo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),hi(i,l)&&(l=fi(n._scopes,n,i,l)),l}function Eo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(L(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const f=fi(c,n,i,h);t.push(Ct(f,o,r&&r[i],a))}}return t}function Ks(i,t,e){return ft(i)?i(t,e):i}const Ro=(i,t)=>i===!0?t:typeof i=="string"?we(t,i):void 0;function Bo(i,t,e,s,n){for(const o of t){const r=Ro(e,o);if(r){i.add(r);const a=Ks(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function fi(i,t,e,s){const n=t._rootScopes,o=Ks(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ii(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ii(a,r,o,l,s),l===null)?!1:ci(Array.from(a),[""],n,o,()=>Ho(t,e,s))}function Ii(i,t,e,s,n){for(;e;)e=Bo(i,t,e,s,n);return e}function Ho(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return F(n)&&L(e)?e:n||{}}function No(i,t,e,s){let n;for(const o of t)if(n=qs(Ao(o,i),e),typeof n<"u")return hi(i,n)?fi(e,s,i,n):n}function qs(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Ai(i){let t=i._keys;return t||(t=i._keys=Wo(i._scopes)),t}function Wo(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Vo=Number.EPSILON||1e-14,Tt=(i,t)=>ti==="x"?"y":"x";function jo(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Si(o,n),l=Si(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const f=s*c,d=s*h;return{previous:{x:o.x-f*(r.x-n.x),y:o.y-f*(r.y-n.y)},next:{x:o.x+d*(r.x-n.x),y:o.y+d*(r.y-n.y)}}}function $o(i,t,e){const s=i.length;let n,o,r,a,l,c=Tt(i,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Yo(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;oi.ownerDocument.defaultView.getComputedStyle(i,null);function qo(i,t){return Fe(i).getPropertyValue(t)}const Go=["top","right","bottom","left"];function xt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Go[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Zo=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function Qo(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Zo(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function mt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Fe(e),o=n.boxSizing==="border-box",r=xt(n,"padding"),a=xt(n,"border","width"),{x:l,y:c,box:h}=Qo(i,e),f=r.left+(h&&a.left),d=r.top+(h&&a.top);let{width:u,height:p}=t;return o&&(u-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-f)/u*e.width/s),y:Math.round((c-d)/p*e.height/s)}}function Jo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=di(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Fe(o),l=xt(a,"border","width"),c=xt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=De(a.maxWidth,o,"clientWidth"),n=De(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||Se,maxHeight:n||Se}}const he=i=>Math.round(i*10)/10;function tr(i,t,e,s){const n=Fe(i),o=xt(n,"margin"),r=De(n.maxWidth,i,"clientWidth")||Se,a=De(n.maxHeight,i,"clientHeight")||Se,l=Jo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const d=xt(n,"border","width"),u=xt(n,"padding");c-=u.width+d.width,h-=u.height+d.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=he(Math.min(c,r,l.maxWidth)),h=he(Math.min(h,a,l.maxHeight)),c&&!h&&(h=he(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=he(Math.floor(h*s))),{width:c,height:h}}function Fi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${i.height}px`,r.style.width=`${i.width}px`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const er=function(){let i=!1;try{const t={get passive(){return i=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return i}();function zi(i,t){const e=qo(i,t),s=e&&e.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function bt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function ir(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function sr(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=bt(i,n,e),a=bt(n,o,e),l=bt(o,t,e),c=bt(r,a,e),h=bt(a,l,e);return bt(c,h,e)}const nr=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},or=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function He(i,t,e){return i?nr(t,e):or()}function rr(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function ar(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Qs(i){return i==="angle"?{between:Es,compare:to,normalize:U}:{between:Dt,compare:(t,e)=>t-e,normalize:t=>t}}function Ei({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function lr(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=Qs(s),l=t.length;let{start:c,end:h,loop:f}=i,d,u;if(f){for(c+=l,h+=l,d=0,u=l;dl(n,S,b)&&a(n,S)!==0,_=()=>a(o,b)===0||l(o,S,b),k=()=>g||O(),y=()=>!g||_();for(let x=h,M=h;x<=f;++x)v=t[x%r],!v.skip&&(b=c(v[s]),b!==S&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?x:M),m!==null&&y()&&(p.push(Ei({start:m,end:x,loop:d,count:r,style:u})),m=null),M=x,S=b));return m!==null&&p.push(Ei({start:m,end:f,loop:d,count:r,style:u})),p}function tn(i,t){const e=[],s=i.segments;for(let n=0;nn&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function hr(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function fr(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=cr(e,n,o,s);if(s===!0)return Ri(i,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Bs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var et=new gr;const Hi="transparent",pr={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Li(i||Hi),n=s.valid&&Li(t||Hi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class mr{constructor(t,e,s,n){const o=e[s];n=le([t.to,n,o,t.from]);const r=le([t.from,o,n]);this._active=!0,this._fn=t.fn||pr[t.type||typeof r],this._easing=Ut[t.easing]||Ut.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=le([t.to,e,n,t.from]),this._from=le([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n{const o=t[n];if(!L(o))return;const r={};for(const a of e)r[a]=o[a];(F(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=xr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&_r(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let f=o[c];const d=s.get(c);if(f)if(d&&f.active()){f.update(d,h,a);continue}else f.cancel();if(!d||!d.duration){t[c]=h;continue}o[c]=f=new mr(d,t,c,h),n.push(f)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return et.add(this._chart,s),!0}}function _r(i,t){const e=[],s=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function $i(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=wr(o,r,s),f=t.length;let d;for(let u=0;ue[s].axis===t).shift()}function Pr(i,t){return kt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Dr(i,t,e){return kt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Et(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const We=i=>i==="reset"||i==="none",Ui=(i,t)=>t?i:Object.assign({},i),Or=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:en(e,!0),values:null};class Xt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Vi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Et(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(f,d,u,p)=>f==="x"?d:f==="r"?p:u,o=e.xAxisID=D(s.xAxisID,Ne(t,"x")),r=e.yAxisID=D(s.yAxisID,Ne(t,"y")),a=e.rAxisID=D(s.rAxisID,Ne(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pi(this._data,this),t._stacked&&Et(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(L(e))this._data=kr(e);else if(s!==e){if(s){Pi(s,this);const n=this._cachedMeta;Et(n),n._parsed=[]}e&&Object.isExtensible(e)&&no(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Vi(e.vScale,e),e.stack!==s.stack&&(n=!0,Et(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&$i(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,f,d;if(this._parsing===!1)s._parsed=n,s._sorted=!0,d=n;else{F(n[t])?d=this.parseArrayData(s,n,t,e):L(n[t])?d=this.parseObjectData(s,n,t,e):d=this.parsePrimitiveData(s,n,t,e);const u=()=>f[a]===null||c&&f[a]g||f=0;--d)if(!p()){this.updateRangeFromParsed(c,t,u,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(s,n,e),g=c.resolveNamedOptions(d,u,p,f);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(Ui(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,f=h.datasetAnimationScopeKeys(this._type,e),d=h.getOptionScopes(this.getDataset(),f);l=h.createResolver(d,this.getContext(t,s,e))}const c=new br(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||We(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){We(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!We(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a0&&this.getParsed(e-1);for(let _=0;_=v){y.skip=!0;continue}const x=this.getParsed(_),M=A(x[u]),C=y[d]=r.getPixelForValue(x[d],_),P=y[u]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,x,l):x[u],_);y.skip=isNaN(C)||isNaN(P)||M,y.stop=_>0&&Math.abs(x[d]-O[d])>m,g&&(y.parsed=x,y.raw=c.data[_]),f&&(y.options=h||this.resolveDataElementOptions(_,k.active?"active":n)),b||this.updateElement(k,_,y,n),O=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}w(_e,"id","line"),w(_e,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),w(_e,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function gt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ui{constructor(t){w(this,"options");this.options=t||{}}static override(t){Object.assign(ui.prototype,t)}init(){}formats(){return gt()}parse(){return gt()}format(){return gt()}add(){return gt()}diff(){return gt()}startOf(){return gt()}endOf(){return gt()}}var Lr={_date:ui};function Cr(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?io:_t;if(s){if(n._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const f=l(o,t,e-h),d=l(o,t,e+h);return{lo:f.lo,hi:d.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function te(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Fr={evaluateInteractionItems:te,modes:{index(i,t,e,s){const n=mt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ve(i,n,o,s,r):je(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,f=c.data[h];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=mt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ve(i,n,o,s,r):je(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function Xi(i,t){return i.filter(e=>sn.indexOf(e.pos)===-1&&e.box.axis===t)}function Bt(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function zr(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;ec.box.fullSize),!0),s=Bt(Rt(t,"left"),!0),n=Bt(Rt(t,"right")),o=Bt(Rt(t,"top"),!0),r=Bt(Rt(t,"bottom")),a=Xi(t,"x"),l=Xi(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Rt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Ki(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function nn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Hr(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!L(n)){e.size&&(i[n]-=e.size);const f=s[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,i[n]+=e.size}o.getPadding&&nn(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ki(r,i,"left","right")),l=Math.max(0,t.outerHeight-Ki(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Nr(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Wr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function Vt(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),d=Object.assign({},n);nn(d,G(s));const u=Object.assign({maxPadding:d,w:o,h:r,x:n.left,y:n.top},n),p=Rr(l.concat(c),f);Vt(a.fullSize,u,f,p),Vt(l,u,f,p),Vt(c,u,f,p)&&Vt(l,u,f,p),Nr(u),qi(a.leftAndTop,u,f,p),u.x+=u.w,u.y+=u.h,qi(a.rightAndBottom,u,f,p),i.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h,height:u.h,width:u.w},N(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(u.w,u.h,{left:0,top:0,right:0,bottom:0})})}};class on{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Vr extends on{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const xe="$chartjs",jr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Gi=i=>i===null||i==="";function $r(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[xe]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Gi(n)){const o=zi(i,"width");o!==void 0&&(i.width=o)}if(Gi(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=zi(i,"height");o!==void 0&&(i.height=o)}return i}const rn=er?{passive:!0}:!1;function Ur(i,t,e){i.addEventListener(t,e,rn)}function Yr(i,t,e){i.canvas.removeEventListener(t,e,rn)}function Xr(i,t){const e=jr[i.type]||i.type,{x:s,y:n}=mt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Oe(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Kr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.addedNodes,s),r=r&&!Oe(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function qr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Oe(a.removedNodes,s),r=r&&!Oe(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Zt=new Map;let Zi=0;function an(){const i=window.devicePixelRatio;i!==Zi&&(Zi=i,Zt.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Gr(i,t){Zt.size||window.addEventListener("resize",an),Zt.set(i,t)}function Zr(i){Zt.delete(i),Zt.size||window.removeEventListener("resize",an)}function Qr(i,t,e){const s=i.canvas,n=s&&di(s);if(!n)return;const o=Hs((a,l)=>{const c=n.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),Gr(i,o),r}function $e(i,t,e){e&&e.disconnect(),t==="resize"&&Zr(i)}function Jr(i,t,e){const s=i.canvas,n=Hs(o=>{i.ctx!==null&&e(Xr(o,i))},i);return Ur(s,t,n),n}class ta extends on{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?($r(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[xe])return!1;const s=e[xe].initial;["height","width"].forEach(o=>{const r=s[o];A(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[xe],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Kr,detach:qr,resize:Qr}[e]||Jr;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:$e,detach:$e,resize:$e}[e]||Yr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return tr(t,e,s,n)}isAttached(t){const e=di(t);return!!(e&&e.isConnected)}}function ea(i){return!Zs()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Vr:ta}class vt{constructor(){w(this,"x");w(this,"y");w(this,"active",!1);w(this,"options");w(this,"$animations")}tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Gt(this.x)&&Gt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}w(vt,"defaults",{}),w(vt,"defaultRoutes");function ia(i,t){const e=i.options.ticks,s=sa(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?oa(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return ra(t,c,o,r/n),c;const h=na(o,t,n);if(r>0){let f,d;const u=r>1?Math.round((l-a)/(r-1)):null;for(de(t,c,h,A(u)?0:a-u,a),f=0,d=r-1;fn)return l}return Math.max(n,1)}function oa(i){const t=[];let e,s;for(e=0,s=i.length;ei==="left"?"right":i==="right"?"left":i,Qi=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,Ji=(i,t)=>Math.min(t||i,i);function ts(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;or+a)))return l}function ha(i,t){N(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;os?s:e,s=n&&e>s?e:s,{min:$(e,$(s,e)),max:$(s,$(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){I(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Io(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),f=h.widest.width,d=h.highest.height,u=J(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/s:u/(s-1),f+6>a&&(a=u/(s-(t.offset?.5:1)),l=this.maxHeight-Ht(t.grid)-e.padding-es(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),r=oi(Math.min(Math.asin(J((h.highest.height+6)/a,-1,1)),Math.asin(J(l/c,-1,1))-Math.asin(J(d/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){I(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){I(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=es(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ht(o)+l):(t.height=this.maxHeight,t.width=Ht(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:f,highest:d}=this._getLabelSizes(),u=s.padding*2,p=at(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*f.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+u)}else{const b=s.mirror?0:g*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+u)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=s*e.height):(d=s*t.height,u=n*e.width):o==="start"?u=e.width:o==="end"?d=t.width:o!=="inner"&&(d=t.width/2,u=e.width/2),this.paddingLeft=Math.max((d-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((u-f+r)*this.width/(this.width-f),0)}else{let h=e.height/2,f=t.height/2;o==="start"?(h=0,f=t.height):o==="end"&&(h=e.height,f=0),this.paddingTop=h+r,this.paddingBottom=f+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){I(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e({width:r[M]||0,height:a[M]||0});return{first:x(0),last:x(e-1),widest:x(k),highest:x(y),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return eo(this._alignToPixels?ut(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/s:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=Ht(o),u=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(H){return ut(s,H,g)};let v,S,O,_,k,y,x,M,C,P,T,W;if(r==="top")v=b(this.bottom),y=this.bottom-d,M=v-m,P=b(t.top)+m,W=t.bottom;else if(r==="bottom")v=b(this.top),P=t.top,W=b(t.bottom)-m,y=v+m,M=this.top+d;else if(r==="left")v=b(this.right),k=this.right-d,x=v-m,C=b(t.left)+m,T=t.right;else if(r==="right")v=b(this.left),C=t.left,T=b(t.right)-m,k=v+m,x=this.left+d;else if(e==="x"){if(r==="center")v=b((t.top+t.bottom)/2+.5);else if(L(r)){const H=Object.keys(r)[0],K=r[H];v=b(this.chart.scales[H].getPixelForValue(K))}P=t.top,W=t.bottom,y=v+m,M=y+d}else if(e==="y"){if(r==="center")v=b((t.left+t.right)/2);else if(L(r)){const H=Object.keys(r)[0],K=r[H];v=b(this.chart.scales[H].getPixelForValue(K))}k=v-m,x=k-d,C=t.left,T=t.right}const Z=D(n.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/Z));for(S=0;So.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");E.route(o,n,l,a)})}function ba(i){return"id"in i&&"defaults"in i}class _a{constructor(){this.controllers=new ue(Xt,"datasets",!0),this.elements=new ue(vt,"elements"),this.plugins=new ue(Object,"plugins"),this.scales=new ue(wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):N(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=ni(t);I(s["before"+n],[],s),e[t](s),I(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function ya(i){const t={},e=[],s=Object.keys(Q.plugins.items);for(let o=0;o1&&is(i[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function ss(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Da(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return ss(i,"x",e[0])||ss(i,"y",e[0])}return{}}function Oa(i,t){const e=yt[i.type]||{scales:{}},s=t.scales||{},n=Ke(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!L(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=qe(r,a,Da(r,i),E.scales[a.type]),c=Sa(l,n),h=e.scales||{};o[r]=jt(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Ke(a,t),h=(yt[a]||{}).scales||{};Object.keys(h).forEach(f=>{const d=Ma(f,l),u=r[d+"AxisID"]||d;o[u]=o[u]||Object.create(null),jt(o[u],[{axis:d},s[u],h[f]])})}),Object.keys(o).forEach(r=>{const a=o[r];jt(a,[E.scales[a.type],E.scale])}),o}function ln(i){const t=i.options||(i.options={});t.plugins=D(t.plugins,{}),t.scales=Oa(i,t)}function cn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function La(i){return i=i||{},i.data=cn(i.data),ln(i),i}const ns=new Map,hn=new Set;function ge(i,t){let e=ns.get(i);return e||(e=t(),ns.set(i,e),hn.add(e)),e}const Nt=(i,t,e)=>{const s=we(t,e);s!==void 0&&i.add(s)};class Ca{constructor(t){this._config=La(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ln(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ge(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ge(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ge(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return ge(`${s}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(f=>Nt(l,t,f))),h.forEach(f=>Nt(l,n,f)),h.forEach(f=>Nt(l,yt[o]||{},f)),h.forEach(f=>Nt(l,E,f)),h.forEach(f=>Nt(l,Xe,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),hn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,yt[e]||{},E.datasets[e]||{},{type:e},E,Xe]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=os(this._resolverCache,t,n);let l=r;if(Ia(r,e)){o.$shared=!1,s=ft(s)?s():s;const c=this.createResolver(t,s,a);l=Ct(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=os(this._resolverCache,t,s);return L(e)?Ct(o,e,void 0,n):o}}function os(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:ci(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Ta=i=>L(i)&&Object.getOwnPropertyNames(i).reduce((t,e)=>t||ft(i[e]),!1);function Ia(i,t){const{isScriptable:e,isIndexable:s}=Ys(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ft(a)||Ta(a))||r&&F(a))return!0}return!1}var Aa="4.4.0";const Fa=["top","bottom","left","right","chartArea"];function rs(i,t){return i==="top"||i==="bottom"||Fa.indexOf(i)===-1&&t==="x"}function as(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function ls(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),I(e&&e.onComplete,[i],t)}function za(i){const t=i.chart,e=t.options.animation;I(e&&e.onProgress,[i],t)}function fn(i){return Zs()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ye={},cs=i=>{const t=fn(i);return Object.values(ye).filter(e=>e.canvas===t).pop()};function Ea(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function Ra(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}function pe(i,t,e){return i.options.clip?i[e]:t[e]}function Ba(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:pe(e,t,"left"),right:pe(e,t,"right"),top:pe(s,t,"top"),bottom:pe(s,t,"bottom")}:t}class nt{static register(...t){Q.add(...t),hs()}static unregister(...t){Q.remove(...t),hs()}constructor(t,e){const s=this.config=new Ca(e),n=fn(t),o=cs(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||ea(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Vn(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new xa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ro(f=>this.update(f),r.resizeDelay||0),this._dataChanges=[],ye[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}et.listen(this,"complete",ls),et.listen(this,"progress",za),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return A(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Q}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Fi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ti(this.canvas,this.ctx),this}stop(){return et.stop(this),this}resize(t,e){et.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Fi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),I(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};N(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=qe(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),N(o,r=>{const a=r.options,l=a.id,c=qe(l,a),h=D(a.type,r.dtype);(a.position===void 0||rs(a.position,c)!==rs(r.dposition))&&(a.position=r.dposition),n[l]=!0;let f=null;if(l in s&&s[l].type===h)f=s[l];else{const d=Q.getScale(h);f=new d({id:l,type:h,ctx:this.ctx,chart:this}),s[f.id]=f}f.init(a,t)}),N(n,(r,a)=>{r||delete s[a]}),N(s,r=>{lt.configure(this,r,r.options),lt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(as("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){N(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!vi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;Ea(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],N(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s=t._clip,n=!s.disabled,o=Ba(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(n&&Ie(e,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),t.controller.draw(),n&&Ae(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return st(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Fr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=kt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Me(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),et.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};N(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){N(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},N(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!xi(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(f=>h.datasetIndex===f.datasetIndex&&h.index===f.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=Kn(t),c=Ra(t,this._lastEvent,s,l);s&&(this._lastEvent=null,I(o.onHover,[t,a,this],this),l&&I(o.onClick,[t,a,this],this));const h=!xi(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}w(nt,"defaults",E),w(nt,"instances",ye),w(nt,"overrides",yt),w(nt,"registry",Q),w(nt,"version",Aa),w(nt,"getChart",cs);function hs(){return N(nt.instances,i=>i._plugins.invalidate())}function dn(i,t,e=t){i.lineCap=D(e.borderCapStyle,t.borderCapStyle),i.setLineDash(D(e.borderDash,t.borderDash)),i.lineDashOffset=D(e.borderDashOffset,t.borderDashOffset),i.lineJoin=D(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=D(e.borderWidth,t.borderWidth),i.strokeStyle=D(e.borderColor,t.borderColor)}function Ha(i,t,e){i.lineTo(e.x,e.y)}function Na(i){return i.stepped?ko:i.tension||i.cubicInterpolationMode==="monotone"?wo:Ha}function un(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=na&&o>a;return{count:s,start:l,loop:t.loop,ilen:c(r+(c?a-O:O))%o,S=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(u=n[v(0)],i.moveTo(u.x,u.y)),d=0;d<=a;++d){if(u=n[v(d)],u.skip)continue;const O=u.x,_=u.y,k=O|0;k===p?(_m&&(m=_),h=(f*h+O)/++f):(S(),i.lineTo(O,_),p=k,f=0,g=m=_),b=_}S()}function Ge(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Va:Wa}function ja(i){return i.stepped?ir:i.tension||i.cubicInterpolationMode==="monotone"?sr:bt}function $a(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),dn(i,t.options),i.stroke(n)}function Ua(i,t,e,s){const{segments:n,options:o}=t,r=Ge(t);for(const a of n)dn(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Ya=typeof Path2D=="function";function Xa(i,t,e,s){Ya&&!t.options.segment?$a(i,t,e,s):Ua(i,t,e,s)}class ct extends vt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Ko(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=fr(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=tn(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=ja(s);let c,h;for(c=0,h=r.length;ct!=="borderDash"&&t!=="fill"});function fs(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o){a=gi(r,a,n);const l=n[r],c=n[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):e!==null&&(o.push({x:e,y:l.y}),o.push({x:e,y:c.y}))}),o}function gi(i,t,e){for(;t>i;t--){const s=e[t];if(!isNaN(s.x)&&!isNaN(s.y))break}return t}function ds(i,t,e,s){return i&&t?s(i[e],t[e]):i?i[e]:t?t[e]:0}function gn(i,t){let e=[],s=!1;return F(i)?(s=!0,e=i):e=qa(i,t),e.length?new ct({points:e,options:{tension:0},_loop:s,_fullLoop:s}):null}function us(i){return i&&i.fill!==!1}function Ga(i,t,e){let n=i[t].fill;const o=[t];let r;if(!e)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!z(n))return n;if(r=i[n],!r)return!1;if(r.visible)return n;o.push(n),n=r.fill}return!1}function Za(i,t,e){const s=el(i);if(L(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return z(n)&&Math.floor(n)===n?Qa(s[0],t,n,e):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Qa(i,t,e,s){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=s?!1:e}function Ja(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:L(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function tl(i,t,e){let s;return i==="start"?s=e:i==="end"?s=t.options.reverse?t.min:t.max:L(i)?s=i.value:s=t.getBaseValue(),s}function el(i){const t=i.options,e=t.fill;let s=D(e&&e.target,e);return s===void 0&&(s=!!t.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function il(i){const{scale:t,index:e,line:s}=i,n=[],o=s.segments,r=s.points,a=sl(t,e);a.push(gn({x:null,y:t.bottom},s));for(let l=0;l=0;--r){const a=n[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&Ue(i.ctx,a,o))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const s=i.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const o=s[n].$filler;us(o)&&Ue(i.ctx,o,i.chartArea)}},beforeDatasetDraw(i,t,e){const s=t.meta.$filler;!us(s)||e.drawTime!=="beforeDatasetDraw"||Ue(i.ctx,s,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const bs=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},gl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class _s extends vt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=I(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=tt(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=bs(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let f=t;o.textAlign="left",o.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(f+=h,c[c.length-(g>0?0:1)]=0,u+=h,d++),l[g]={left:0,top:u,row:d,width:m,height:n},c[c.length-1]+=m+a}),f}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let f=a,d=0,u=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:v,itemHeight:S}=pl(s,e,o,m,n);b>0&&u+S+2*a>h&&(f+=d+a,c.push({width:d,height:u}),p+=d+a,g++,d=u=0),l[b]={left:p,top:u,col:g,width:v,height:S},d=Math.max(d,v),u+=S+a}),f+=d,c.push({width:d,height:u}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=He(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=j(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=j(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=j(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=j(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ie(t,this),this._draw(),Ae(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=E.color,l=He(t.rtl,this.left,this.width),c=tt(r.font),{padding:h}=r,f=c.size,d=f/2;let u;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=bs(r,f),b=function(k,y,x){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const M=D(x.lineWidth,1);if(n.fillStyle=D(x.fillStyle,a),n.lineCap=D(x.lineCap,"butt"),n.lineDashOffset=D(x.lineDashOffset,0),n.lineJoin=D(x.lineJoin,"miter"),n.lineWidth=M,n.strokeStyle=D(x.strokeStyle,a),n.setLineDash(D(x.lineDash,[])),r.usePointStyle){const C={radius:g*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:M},P=l.xPlus(k,p/2),T=y+d;Vs(n,C,P,T,r.pointStyleWidth&&p)}else{const C=y+Math.max((f-g)/2,0),P=l.leftForLtr(k,p),T=Us(x.borderRadius);n.beginPath(),Object.values(T).some(W=>W!==0)?js(n,{x:P,y:C,w:p,h:g,radius:T}):n.rect(P,C,p,g),n.fill(),M!==0&&n.stroke()}n.restore()},v=function(k,y,x){Lt(n,x.text,k,y+m/2,c,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},S=this.isHorizontal(),O=this._computeTitleHeight();S?u={x:j(o,this.left+h,this.right-s[0]),y:this.top+h+O,line:0}:u={x:this.left+h,y:j(o,this.top+O+h,this.bottom-e[0].height),line:0},rr(this.ctx,t.textDirection);const _=m+h;this.legendItems.forEach((k,y)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const x=n.measureText(k.text).width,M=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),C=p+d+x;let P=u.x,T=u.y;l.setWidth(this.width),S?y>0&&P+C+h>this.right&&(T=u.y+=_,u.line++,P=u.x=j(o,this.left+h,this.right-s[u.line])):y>0&&T+_>this.bottom&&(P=u.x=P+e[u.line].width+h,u.line++,T=u.y=j(o,this.top+O+h,this.bottom-e[u.line].height));const W=l.x(P);if(b(W,T,k),P=ao(M,P+p+d,S?P+C:this.right,t.rtl),v(l.x(P),T,k),S)u.x+=C+h;else if(typeof k.text!="string"){const Z=c.lineHeight;u.y+=mn(k,Z)+h}else u.y+=_}),ar(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=tt(e.font),n=G(e.padding);if(!e.display)return;const o=He(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+c,f=j(t.align,f,this.right-d);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+j(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const u=j(a,f,f+d);r.textAlign=o.textAlign(Ns(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,Lt(r,e.text,u,h,s)}_computeTitleHeight(){const t=this.options.title,e=tt(t.font),s=G(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(Dt(t,this.left,this.right)&&Dt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function bl(i,t,e){let s=i;return typeof t.text!="string"&&(s=mn(t,e)),s}function mn(i,t){const e=i.text?i.text.length:0;return t*e}function _l(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var xl={id:"legend",_element:_s,start(i,t,e){const s=i.legend=new _s({ctx:i.ctx,options:e,chart:i});lt.configure(i,s,e),lt.addBox(i,s)},stop(i){lt.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;lt.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=G(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};const yl=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function vl(i,t,e,s){const n=i.indexOf(t);if(n===-1)return yl(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const kl=(i,t)=>i===null?null:J(Math.round(i),0,t);function xs(i){const t=this.getLabels();return i>=0&&ie.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}w(Qe,"id","category"),w(Qe,"defaults",{ticks:{callback:xs}});function wl(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:f,includeBounds:d}=i,u=o||1,p=h-1,{min:g,max:m}=t,b=!A(r),v=!A(a),S=!A(c),O=(m-g)/(f+1);let _=wi((m-g)/p/u)*u,k,y,x,M;if(_<1e-14&&!b&&!v)return[{value:g},{value:m}];M=Math.ceil(m/_)-Math.floor(g/_),M>p&&(_=wi(M*_/p/u)*u),A(l)||(k=Math.pow(10,l),_=Math.ceil(_*k)/k),n==="ticks"?(y=Math.floor(g/_)*_,x=Math.ceil(m/_)*_):(y=g,x=m),b&&v&&o&&Qn((a-r)/o,_/1e3)?(M=Math.round(Math.min((a-r)/_,h)),_=(a-r)/M,y=r,x=a):S?(y=b?r:y,x=v?a:x,M=c-1,_=(x-y)/M):(M=(x-y)/_,$t(M,Math.round(M),_/1e3)?M=Math.round(M):M=Math.ceil(M));const C=Math.max(Mi(_),Mi(y));k=Math.pow(10,A(l)?C:l),y=Math.round(y*k)/k,x=Math.round(x*k)/k;let P=0;for(b&&(d&&y!==r?(e.push({value:r}),ya)break;e.push({value:T})}return v&&d&&x!==a?e.length&&$t(e[e.length-1].value,a,ys(a,O,i))?e[e.length-1].value=a:e.push({value:a}):(!v||x===a)&&e.push({value:x}),e}function ys(i,t,{horizontal:e,minRotation:s}){const n=at(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class Le extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return A(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=Ot(n),c=Ot(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=wl(n,o);return t.bounds==="ticks"&&zs(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return li(t,this.chart.options.locale,this.options.ticks.format)}}class Je extends Le{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?t:0,this.max=z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=at(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}w(Je,"id","linear"),w(Je,"defaults",{ticks:{callback:Te.formatters.numeric}});const Qt=i=>Math.floor(rt(i)),pt=(i,t)=>Math.pow(10,Qt(i)+t);function vs(i){return i/Math.pow(10,Qt(i))===1}function ks(i,t,e){const s=Math.pow(10,e),n=Math.floor(i/s);return Math.ceil(t/s)-n}function Ml(i,t){const e=t-i;let s=Qt(e);for(;ks(i,t,s)>10;)s++;for(;ks(i,t,s)<10;)s--;return Math.min(s,Qt(i))}function Sl(i,{min:t,max:e}){t=$(i.min,t);const s=[],n=Qt(t);let o=Ml(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((t-l)*r)/r,h=Math.floor((t-l)/a/10)*a*10;let f=Math.floor((c-h)/Math.pow(10,o)),d=$(i.min,Math.round((l+h+f*Math.pow(10,o))*r)/r);for(;d=10?f=f<15?15:20:f++,f>=20&&(o++,f=2,r=o>=0?1:r),d=Math.round((l+h+f*Math.pow(10,o))*r)/r;const u=$(i.max,d);return s.push({value:u,major:vs(u),significand:f}),s}class ws extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const s=Le.prototype.parse.apply(this,[t,e]);if(s===0){this._zero=!0;return}return z(s)&&s>0?s:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=z(t)?Math.max(0,t):null,this.max=z(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!z(this._userMin)&&(this.min=t===pt(this.min,0)?pt(this.min,-1):pt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let s=this.min,n=this.max;const o=a=>s=t?s:a,r=a=>n=e?n:a;s===n&&(s<=0?(o(1),r(10)):(o(pt(s,-1)),r(pt(n,1)))),s<=0&&o(pt(n,-1)),n<=0&&r(pt(s,1)),this.min=s,this.max=n}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},s=Sl(e,this);return t.bounds==="ticks"&&zs(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(t){return t===void 0?"0":li(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=rt(t),this._valueRange=rt(this.max)-rt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(rt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}w(ws,"id","logarithmic"),w(ws,"defaults",{ticks:{callback:Te.formatters.logarithmic,major:{enabled:!0}}});function ti(i){const t=i.ticks;if(t.display&&i.display){const e=G(t.backdropPadding);return D(t.font&&t.font.size,E.font.size)+e.height}return 0}function Pl(i,t,e){return e=F(e)?e:[e],{w:yo(i,t.string,e),h:e.length*t.lineHeight}}function Ms(i,t,e,s,n){return i===s||i===n?{start:t-e/2,end:t+e/2}:in?{start:t-e,end:t}:{start:t,end:t+e}}function Dl(i){const t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),s=[],n=[],o=i._pointLabels.length,r=i.options.pointLabels,a=r.centerPointLabels?B/o:0;for(let l=0;lt.r&&(a=(s.end-t.r)/o,i.r=Math.max(i.r,t.r+a)),n.startt.b&&(l=(n.end-t.b)/r,i.b=Math.max(i.b,t.b+l))}function Ll(i,t,e){const s=i.drawingArea,{extra:n,additionalAngle:o,padding:r,size:a}=e,l=i.getPointPosition(t,s+n+r,o),c=Math.round(oi(U(l.angle+Y))),h=Fl(l.y,a.h,c),f=Il(c),d=Al(l.x,a.w,f);return{visible:!0,x:l.x,y:h,textAlign:f,left:d,top:h,right:d+a.w,bottom:h+a.h}}function Cl(i,t){if(!t)return!0;const{left:e,top:s,right:n,bottom:o}=i;return!(st({x:e,y:s},t)||st({x:e,y:o},t)||st({x:n,y:s},t)||st({x:n,y:o},t))}function Tl(i,t,e){const s=[],n=i._pointLabels.length,o=i.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:ti(o)/2,additionalAngle:r?B/n:0};let c;for(let h=0;h270||e<90)&&(i-=t),i}function zl(i,t,e){const{left:s,top:n,right:o,bottom:r}=e,{backdropColor:a}=t;if(!A(a)){const l=Us(t.borderRadius),c=G(t.backdropPadding);i.fillStyle=a;const h=s-c.left,f=n-c.top,d=o-s+c.width,u=r-n+c.height;Object.values(l).some(p=>p!==0)?(i.beginPath(),js(i,{x:h,y:f,w:d,h:u,radius:l}),i.fill()):i.fillRect(h,f,d,u)}}function El(i,t){const{ctx:e,options:{pointLabels:s}}=i;for(let n=t-1;n>=0;n--){const o=i._pointLabelItems[n];if(!o.visible)continue;const r=s.setContext(i.getPointLabelContext(n));zl(e,r,o);const a=tt(r.font),{x:l,y:c,textAlign:h}=o;Lt(e,i._pointLabels[n],l,c+a.lineHeight/2,a,{color:r.color,textAlign:h,textBaseline:"middle"})}}function bn(i,t,e,s){const{ctx:n}=i;if(e)n.arc(i.xCenter,i.yCenter,t,0,X);else{let o=i.getPointPosition(0,t);n.moveTo(o.x,o.y);for(let r=1;r{const n=I(this.options.pointLabels.callback,[e,s],this);return n||n===0?n:""}).filter((e,s)=>this.chart.getDataVisibility(s))}fit(){const t=this.options;t.display&&t.pointLabels.display?Dl(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,s,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,s,n))}getIndexAngle(t){const e=X/(this._pointLabels.length||1),s=this.options.startAngle||0;return U(t*e+at(s))}getDistanceFromCenterForValue(t){if(A(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(A(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t{if(f!==0){l=this.getDistanceFromCenterForValue(h.value);const d=this.getContext(f),u=n.setContext(d),p=o.setContext(d);Rl(this,u,l,r,p)}}),s.display){for(t.save(),a=r-1;a>=0;a--){const h=s.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:d}=h;!d||!f||(t.lineWidth=d,t.strokeStyle=f,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,s=e.ticks;if(!s.display)return;const n=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!e.reverse)return;const c=s.setContext(this.getContext(l)),h=tt(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=h.string,r=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const f=G(c.backdropPadding);t.fillRect(-r/2-f.left,-o-h.size/2-f.top,r+f.width,h.size+f.height)}Lt(t,a.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}w(me,"id","radialLinear"),w(me,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Te.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),w(me,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),w(me,"descriptors",{angleLines:{_fallback:"grid"}});const ze={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},V=Object.keys(ze);function Ss(i,t){return i-t}function Ps(i,t){if(A(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),z(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Gt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function Ds(i,t,e,s){const n=V.length;for(let o=V.indexOf(i);o=V.indexOf(e);o--){const r=V[o];if(ze[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return V[e?V.indexOf(e):0]}function Nl(i){for(let t=V.indexOf(i)+1,e=V.length;t=t?e[s]:e[n];i[o]=!0}}function Wl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Ls(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=J(e,0,r),s=J(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||Ds(o.minUnit,e,s,this._getLabelCapacity(e)),a=D(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Gt(l)||l===!0,h={};let f=e,d,u;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(d=f,u=0;d+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return I(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],f=c&&a[c],d=s[e],u=c&&f&&d&&d.major;return this._adapter.format(t,n||(u?f:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=_t(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=_t(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Cs extends Ce{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=be(e,this.min),this._tableRange=be(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;rn-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(be(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return be(this._table,s*this._tableRange+this._minPos,!0)}}w(Cs,"id","timeseries"),w(Cs,"defaults",Ce.defaults);nt.register(ct,ve,_e,Qe,Je,ul,xl);export{nt as Chart}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-4da23e9b.js b/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-4da23e9b.js new file mode 100644 index 0000000..da05f94 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/chevron-down-4da23e9b.js @@ -0,0 +1 @@ +import{r as c,R as p,P as a}from"./index-17fa2fa5.js";function s(){return s=Object.assign||function(r){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(r,e)&&(t[e]=r[e])}return t}function u(r,o){if(r==null)return{};var t={},e=Object.keys(r),n,i;for(i=0;i=0)&&(t[n]=r[n]);return t}var l=c.forwardRef(function(r,o){var t=r.color,e=t===void 0?"currentColor":t,n=r.size,i=n===void 0?24:n,f=v(r,["color","size"]);return p.createElement("svg",s({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},f),p.createElement("polyline",{points:"6 9 12 15 18 9"}))});l.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};l.displayName="ChevronDown";const h=l;export{h as C}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/en-b261f0f9.js b/FILES/etc/config/clash/clash-dashboard/assets/en-4e6aa22d.js similarity index 75% rename from FILES/etc/config/clash/clash-dashboard/assets/en-b261f0f9.js rename to FILES/etc/config/clash/clash-dashboard/assets/en-4e6aa22d.js index d7b469b..7107802 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/en-b261f0f9.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/en-4e6aa22d.js @@ -1 +1 @@ -const e={All:"All",Overview:"Overview",Proxies:"Proxies",Rules:"Rules",Conns:"Conns",Config:"Config",Logs:"Logs",Upload:"Upload",Download:"Download","Upload Total":"Upload Total","Download Total":"Download Total","Active Connections":"Active Connections","Pause Refresh":"Pause Refresh","Resume Refresh":"Resume Refresh",Up:"Up",Down:"Down","Test Latency":"Test Latency",settings:"settings",sort_in_grp:"Sorting in group",hide_unavail_proxies:"Hide unavailable proxies",auto_close_conns:"Automatically close old connections",order_natural:"Original order in config file",order_latency_asc:"By latency from small to big",order_latency_desc:"By latency from big to small",order_name_asc:"By name alphabetically (A-Z)",order_name_desc:"By name alphabetically (Z-A)",Connections:"Connections",current_backend:"Current Backend",Active:"Active",switch_backend:"Switch backend",Closed:"Closed",switch_theme:"Switch theme",theme:"theme",about:"PaoPao GateWay",no_logs:"No logs yet, hang tight...",chart_style:"Chart Style",latency_test_url:"Latency Test URL",allow_lan_mixed:"Allow LAN to access port 1080 proxy [http+socks5]",lang:"Language",update_all_rule_provider:"Update all rule providers",update_all_proxy_provider:"Update all proxy providers",pleaseSelectSourceIP:"please select a source ip to sensor",filterByIP:"Filter By IP"};export{e as data}; +const e={All:"All",Overview:"Overview",Proxies:"Proxies",Rules:"Rules",Conns:"Conns",Config:"Config",Logs:"Logs",Upload:"Upload",Download:"Download","Upload Total":"Upload Total","Download Total":"Download Total","Active Connections":"Active Connections","Pause Refresh":"Pause Refresh","Resume Refresh":"Resume Refresh",Up:"Up",Down:"Down","Test Latency":"Test Latency",settings:"settings",sort_in_grp:"Sorting in group",hide_unavail_proxies:"Hide unavailable proxies",auto_close_conns:"Automatically close old connections",order_natural:"Original order in config file",order_latency_asc:"By latency from small to big",order_latency_desc:"By latency from big to small",order_name_asc:"By name alphabetically (A-Z)",order_name_desc:"By name alphabetically (Z-A)",Connections:"Connections",current_backend:"Current Backend",Active:"Active",switch_backend:"Switch backend",Closed:"Closed",switch_theme:"Switch theme",theme:"theme",about:"PaoPao GateWay",no_logs:"No logs yet, hang tight...",chart_style:"Chart Style",latency_test_url:"Latency Test URL",allow_lan_mixed:"Allow LAN to access port 1080 proxy [http+socks5]",lang:"Language",LogLevel:"Log Level",update_all_rule_provider:"Update all rule providers",update_all_proxy_provider:"Update all proxy providers",dark_mode_pure_black_toggle_label:"Use pure black in dark mode",pleaseSelectSourceIP:"please select a source ip to sensor",filterByIP:"Filter By IP"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-0d511031.js b/FILES/etc/config/clash/clash-dashboard/assets/index-0d511031.js new file mode 100644 index 0000000..bed0792 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-0d511031.js @@ -0,0 +1,9 @@ +import{r as m,R as ui}from"./index-17fa2fa5.js";const at=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Xt=m.createContext({}),Yt=m.createContext(null),Pe=typeof document<"u",xt=Pe?m.useLayoutEffect:m.useEffect,mn=m.createContext({strict:!1});function no(t,e,n,s){const{visualElement:i}=m.useContext(Xt),o=m.useContext(mn),r=m.useContext(Yt),a=m.useContext(at).reducedMotion,c=m.useRef();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;m.useInsertionEffect(()=>{u&&u.update(n,r)});const l=m.useRef(!!window.HandoffAppearAnimations);return xt(()=>{u&&(u.render(),l.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(u.updateFeatures(),!l.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,l.current=!1)}),u}function bt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function so(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):bt(n)&&(n.current=s))},[e])}function Wt(t){return typeof t=="string"||Array.isArray(t)}function Te(t){return typeof t=="object"&&typeof t.start=="function"}const pn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gn=["initial",...pn];function be(t){return Te(t.animate)||gn.some(e=>Wt(t[e]))}function li(t){return!!(be(t)||t.variants)}function io(t,e){if(be(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ro(t){const{initial:e,animate:n}=io(t,m.useContext(Xt));return m.useMemo(()=>({initial:e,animate:n}),[qn(e),qn(n)])}function qn(t){return Array.isArray(t)?t.join(" "):t}const Zn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ht={};for(const t in Zn)Ht[t]={isEnabled:e=>Zn[t].some(n=>!!e[n])};function Ke(t){for(const e in t)Ht[e]={...Ht[e],...t[e]}}const Gt=m.createContext({}),fi=m.createContext({}),yn=Symbol.for("motionComponentSymbol");function hi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ke(t);function o(a,c){let u;const l={...m.useContext(at),...a,layoutId:oo(a)},{isStatic:f}=l,h=ro(a),d=s(a,f);if(!f&&Pe){h.visualElement=no(i,d,l,e);const p=m.useContext(fi),y=m.useContext(mn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(l,y,t,p))}return m.createElement(Xt.Provider,{value:h},u&&h.visualElement?m.createElement(u,{visualElement:h.visualElement,...l}):null,n(i,a,so(d,h.visualElement,c),d,f,h.visualElement))}const r=m.forwardRef(o);return r[yn]=i,r}function oo({layoutId:t}){const e=m.useContext(Gt).id;return e&&t!==void 0?e+"-"+t:t}function di(t){function e(s,i={}){return hi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const ao=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vn(t){return typeof t!="string"||t.includes("-")?!1:!!(ao.indexOf(t)>-1||/[A-Z]/.test(t))}const le={};function co(t){Object.assign(le,t)}const qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],J=new Set(qt);function mi(t,{layout:e,layoutId:n}){return J.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const k=t=>!!(t&&t.getVelocity),uo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lo=qt.length;function fo(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),xn=pi("--"),_e=pi("var(--"),ho=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,mo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ct=(t,e,n)=>Math.min(Math.max(n,t),e),Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>ct(0,1,t)},se={...Pt,default:1},Ot=t=>Math.round(t*1e5)/1e5,Se=/(-)?([\d]*\.?[\d])+/g,gi=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,po=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Zt(t){return typeof t=="string"}const Jt=t=>({test:e=>Zt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Jt("deg"),Z=Jt("%"),S=Jt("px"),go=Jt("vh"),yo=Jt("vw"),Jn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},Qn={...Pt,transform:Math.round},yi={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,size:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:se,scaleX:se,scaleY:se,scaleZ:se,skew:st,skewX:st,skewY:st,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:kt,originX:Jn,originY:Jn,originZ:S,zIndex:Qn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Qn};function Pn(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const f in e){const h=e[f];if(xn(f)){o[f]=h;continue}const d=yi[f],p=mo(h,d);if(J.has(f)){if(c=!0,r[f]=p,!l)continue;h!==(d.default||0)&&(l=!1)}else f.startsWith("origin")?(u=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=fo(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const Tn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vi(t,e,n){for(const s in e)!k(e[s])&&!mi(s,n)&&(t[s]=e[s])}function vo({transformTemplate:t},e,n){return m.useMemo(()=>{const s=Tn();return Pn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function xo(t,e,n){const s=t.style||{},i={};return vi(i,s,t),Object.assign(i,vo(t,e,n)),t.transformValues?t.transformValues(i):i}function Po(t,e,n){const s={},i=xo(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const To=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||To.has(t)}let xi=t=>!fe(t);function Pi(t){t&&(xi=e=>e.startsWith("on")?!fe(e):t(e))}try{Pi(require("@emotion/is-prop-valid").default)}catch{}function bo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(xi(i)||n===!0&&fe(i)||!e&&!fe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ts(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function So(t,e,n){const s=ts(e,t.x,t.width),i=ts(n,t.y,t.height);return`${s} ${i}`}const Ao={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vo={offset:"strokeDashoffset",array:"strokeDasharray"};function Co(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Ao:Vo;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function bn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...u},l,f,h){if(Pn(t,u,l,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:y}=t;d.transform&&(y&&(p.transform=d.transform),delete d.transform),y&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=So(y,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Co(d,r,a,c,!1)}const Ti=()=>({...Tn(),attrs:{}}),Sn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wo(t,e,n,s){const i=m.useMemo(()=>{const o=Ti();return bn(o,e,{enableHardwareAcceleration:!1},Sn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};vi(o,t.style,t),i.style={...o,...i.style}}return i}function Mo(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(vn(n)?wo:Po)(s,o,r,n),l={...bo(s,typeof n=="string",t),...c,ref:i},{children:f}=s,h=m.useMemo(()=>k(f)?f.get():f,[f]);return m.createElement(n,{...l,children:h})}}const $t=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function bi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Si=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ai(t,e,n,s){bi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Si.has(i)?i:$t(i),e.attrs[i])}function An(t,e){const{style:n}=t,s={};for(const i in n)(k(n[i])||e.style&&k(e.style[i])||mi(i,t))&&(s[i]=n[i]);return s}function Vi(t,e){const n=An(t,e);for(const s in t)if(k(t[s])||k(e[s])){const i=qt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function Vn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function j(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),Do=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Eo=t=>he(t)?t[t.length-1]||0:t;function oe(t){const e=k(t)?t.get():t;return Do(e)?e.toValue():e}function Ro({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Lo(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cn=t=>(e,n)=>{const s=m.useContext(Xt),i=m.useContext(Yt),o=()=>Ro(t,e,s,i);return n?o():j(o)};function Lo(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=oe(o[h]);let{initial:r,animate:a}=t;const c=be(t),u=li(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const f=l?a:r;return f&&typeof f!="boolean"&&!Te(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=Vn(t,d);if(!p)return;const{transitionEnd:y,transition:x,...T}=p;for(const v in T){let g=T[v];if(Array.isArray(g)){const P=l?g.length-1:0;g=g[P]}g!==null&&(i[v]=g)}for(const v in y)i[v]=y[v]}),i}const L=t=>t;class es{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Bo(t){let e=new es,n=new es,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const f=l&&i,h=f?e:n;return u&&r.add(c),h.add(c)&&f&&i&&(s=e.order.length),c},cancel:c=>{n.remove(c),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u(f[h]=Bo(()=>n=!0),f),{}),r=f=>o[f].process(i),a=()=>{const f=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Fo),1),i.timestamp=f,i.isProcessing=!0,Ft.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Ft.reduce((f,h)=>{const d=o[h];return f[h]=(p,y=!1,x=!1)=>(n||c(),d.schedule(p,y,x)),f},{}),cancel:f=>Ft.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:V,cancel:N,state:I,steps:Re}=Io(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),ko={useVisualState:Cn({scrapeMotionValuesFromProps:Vi,createRenderState:Ti,onMount:(t,e,{renderState:n,latestValues:s})=>{V.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),V.render(()=>{bn(n,s,{enableHardwareAcceleration:!1},Sn(e.tagName),t.transformTemplate),Ai(e,n)})}})},Oo={useVisualState:Cn({scrapeMotionValuesFromProps:An,createRenderState:Tn})};function wn(t,{forwardMotionProps:e=!1},n,s){return{...vn(t)?ko:Oo,preloadedFeatures:n,useRender:Mo(e),createVisualElement:s,Component:t}}function q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ci=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ae(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const jo=t=>e=>Ci(e)&&t(e,Ae(e));function tt(t,e,n,s){return q(t,e,jo(n),s)}const Uo=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(Uo);function wi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const ns=wi("dragHorizontal"),ss=wi("dragVertical");function Mi(t){let e=!1;if(t==="y")e=ss();else if(t==="x")e=ns();else{const n=ns(),s=ss();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Di(){const t=Mi(!0);return t?(t(),!1):!0}class lt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function is(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.type==="touch"||Di())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&V.update(()=>a[s](o,r))};return tt(t.current,n,i,{passive:!t.getProps()[s]})}class No extends lt{mount(){this.unmount=ot(is(this.node,!0),is(this.node,!1))}unmount(){}}class zo extends lt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(q(this.node.current,"focus",()=>this.onFocus()),q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ei=(t,e)=>e?t===e?!0:Ei(t,e.parentElement):!1;function Le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ae(n))}class Wo extends lt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),o=tt(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l}=this.node.getProps();V.update(()=>{Ei(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(s.onTap||s.onPointerUp)}),r=tt(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Le("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&V.update(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=q(this.node.current,"keyup",r),Le("down",(a,c)=>{this.startPress(a,c)})},n=q(this.node.current,"keydown",e),s=()=>{this.isPressing&&Le("cancel",(o,r)=>this.cancelPress(o,r))},i=q(this.node.current,"blur",s);this.removeAccessibleListeners=ot(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&V.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Di()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&V.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=tt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xe=new WeakMap,Be=new WeakMap,Ho=t=>{const e=Xe.get(t.target);e&&e(t)},Go=t=>{t.forEach(Ho)};function $o({root:t,...e}){const n=t||document;Be.has(n)||Be.set(n,{});const s=Be.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Go,{root:t,...e})),s[i]}function Ko(t,e,n){const s=$o(e);return Xe.set(t,n),s.observe(t),()=>{Xe.delete(t),s.unobserve(t)}}const _o={some:0,all:1};class Xo extends lt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:_o[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),h=u?l:f;h&&h(c)};return Ko(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Yo(e,n))&&this.startObserver()}unmount(){}}function Yo({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ri={inView:{Feature:Xo},tap:{Feature:Wo},focus:{Feature:zo},hover:{Feature:No}};function Li(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function Zo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ve(t,e,n){const s=t.getProps();return Vn(s,e,n!==void 0?n:s.custom,qo(t),Zo(t))}const Bi="framerAppearId",Jo="data-"+$t(Bi);let Fi=L,Ce=L;const et=t=>t*1e3,_=t=>t/1e3,de={current:!1},Ii=t=>Array.isArray(t)&&typeof t[0]=="number";function ki(t){return!!(!t||typeof t=="string"&&Oi[t]||Ii(t)||Array.isArray(t)&&t.every(ki))}const It=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Oi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:It([0,.65,.55,1]),circOut:It([.55,0,1,.45]),backIn:It([.31,.01,.66,-.59]),backOut:It([.33,1.53,.69,.99])};function ji(t){if(t)return Ii(t)?It(t):Array.isArray(t)?t.map(ji):Oi[t]}function Ye(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};c&&(u.offset=c);const l=ji(a);return Array.isArray(l)&&(u.easing=l),t.animate(u,{delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function Qo(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const Ui=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ta=1e-7,ea=12;function na(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Ui(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ta&&++ana(o,0,1,t,n);return o=>o===0||o===1?o:Ui(i(o),e,s)}const sa=Qt(.42,0,1,1),ia=Qt(0,0,.58,1),Ni=Qt(.42,0,.58,1),zi=t=>Array.isArray(t)&&typeof t[0]!="number",Wi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hi=t=>e=>1-t(1-e),Gi=t=>1-Math.sin(Math.acos(t)),Mn=Hi(Gi),ra=Wi(Mn),$i=Qt(.33,1.53,.69,.99),Dn=Hi($i),oa=Wi(Dn),aa=t=>(t*=2)<1?.5*Dn(t):.5*(2-Math.pow(2,-10*(t-1))),ca={linear:L,easeIn:sa,easeInOut:Ni,easeOut:ia,circIn:Gi,circInOut:ra,circOut:Mn,backIn:Dn,backInOut:oa,backOut:$i,anticipate:aa},qe=t=>{if(Array.isArray(t)){Ce(t.length===4);const[e,n,s,i]=t;return Qt(e,n,s,i)}else if(typeof t=="string")return ca[t];return t},En=(t,e)=>n=>!!(Zt(n)&&po.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ki=(t,e,n)=>s=>{if(!Zt(s))return s;const[i,o,r,a]=s.match(Se);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ua=t=>ct(0,255,t),Fe={...Pt,transform:t=>Math.round(ua(t))},pt={test:En("rgb","red"),parse:Ki("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+Ot(kt.transform(s))+")"};function la(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ze={test:En("#"),parse:la,transform:pt.transform},St={test:En("hsl","hue"),parse:Ki("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ot(e))+", "+Z.transform(Ot(n))+", "+Ot(kt.transform(s))+")"},U={test:t=>pt.test(t)||Ze.test(t)||St.test(t),parse:t=>pt.test(t)?pt.parse(t):St.test(t)?St.parse(t):Ze.parse(t),transform:t=>Zt(t)?t:t.hasOwnProperty("red")?pt.transform(t):St.transform(t)},R=(t,e,n)=>-n*t+n*e+t;function Ie(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function fa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Ie(c,a,t+1/3),o=Ie(c,a,t),r=Ie(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ke=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ha=[Ze,pt,St],da=t=>ha.find(e=>e.test(t));function rs(t){const e=da(t);let n=e.parse(t);return e===St&&(n=fa(n)),n}const _i=(t,e)=>{const n=rs(t),s=rs(e),i={...n};return o=>(i.red=ke(n.red,s.red,o),i.green=ke(n.green,s.green,o),i.blue=ke(n.blue,s.blue,o),i.alpha=R(n.alpha,s.alpha,o),pt.transform(i))};function ma(t){var e,n;return isNaN(t)&&Zt(t)&&(((e=t.match(Se))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(gi))===null||n===void 0?void 0:n.length)||0)>0}const Xi={regex:ho,countKey:"Vars",token:"${v}",parse:L},Yi={regex:gi,countKey:"Colors",token:"${c}",parse:U.parse},qi={regex:Se,countKey:"Numbers",token:"${n}",parse:Pt.parse};function Oe(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function me(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Oe(n,Xi),Oe(n,Yi),Oe(n,qi),n}function Zi(t){return me(t).values}function Ji(t){const{values:e,numColors:n,numVars:s,tokenised:i}=me(t),o=e.length;return r=>{let a=i;for(let c=0;ctypeof t=="number"?0:t;function ga(t){const e=Zi(t);return Ji(t)(e.map(pa))}const ut={test:ma,parse:Zi,createTransformer:Ji,getAnimatableNone:ga},Qi=(t,e)=>n=>`${n>0?e:t}`;function tr(t,e){return typeof t=="number"?n=>R(t,e,n):U.test(t)?_i(t,e):t.startsWith("var(")?Qi(t,e):nr(t,e)}const er=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>tr(o,e[r]));return o=>{for(let r=0;r{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=tr(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},nr=(t,e)=>{const n=ut.createTransformer(e),s=me(t),i=me(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ot(er(s.values,i.values),n):Qi(t,e)},yt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},os=(t,e)=>n=>R(t,e,n);function va(t){return typeof t=="number"?os:typeof t=="string"?U.test(t)?_i:nr:Array.isArray(t)?er:typeof t=="object"?ya:os}function xa(t,e,n){const s=[],i=n||va(t[0]),o=t.length-1;for(let r=0;re[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=xa(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;lc(ct(t[0],t[o-1],u)):c}function sr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=yt(0,e,s);t.push(R(n,1,i))}}function Rn(t){const e=[0];return sr(e,t.length-1),e}function Pa(t,e){return t.map(n=>n*e)}function Ta(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function pe({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=zi(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=Pa(n&&n.length===e.length?n:Rn(e),t),a=we(r,e,{ease:Array.isArray(i)?i:Ta(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function Ln(t,e){return e?t*(1e3/e):0}const ba=5;function ir(t,e,n){const s=Math.max(e-ba,0);return Ln(n-t(s),e-s)}const je=.001,Sa=.01,as=10,Aa=.05,Va=1;function Ca({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Fi(t<=et(as));let r=1-e;r=ct(Aa,Va,r),t=ct(Sa,as,_(t)),r<1?(i=u=>{const l=u*r,f=l*t,h=l-n,d=Je(u,r),p=Math.exp(-f);return je-h/d*p},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),y=Je(Math.pow(u,2),r);return(-i(u)+je>0?-1:1)*((h-d)*p)/y}):(i=u=>{const l=Math.exp(-u*t),f=(u-n)*t+1;return-je+l*f},o=u=>{const l=Math.exp(-u*t),f=(n-u)*(t*t);return l*f});const a=5/t,c=Ma(i,o,a);if(t=et(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const wa=12;function Ma(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Ra(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!cs(t,Ea)&&cs(t,Da)){const n=Ca(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function Bn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:l,duration:f,isResolvedFromDuration:h}=Ra(s),d=l?-_(l):0,p=c/(2*Math.sqrt(a*u)),y=o-i,x=_(Math.sqrt(a/u)),T=Math.abs(y)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(p<1){const g=Je(x,p);v=P=>{const A=Math.exp(-p*x*P);return o-A*((d+p*x*y)/g*Math.sin(g*P)+y*Math.cos(g*P))}}else if(p===1)v=g=>o-Math.exp(-x*g)*(y+(d+x*y)*g);else{const g=x*Math.sqrt(p*p-1);v=P=>{const A=Math.exp(-p*x*P),D=Math.min(g*P,300);return o-A*((d+p*x*y)*Math.sinh(D)+g*y*Math.cosh(D))/g}}return{calculatedDuration:h&&f||null,next:g=>{const P=v(g);if(h)r.done=g>=f;else{let A=d;g!==0&&(p<1?A=ir(v,g,P):A=0);const D=Math.abs(A)<=n,C=Math.abs(o-P)<=e;r.done=D&&C}return r.value=r.done?o:P,r}}}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const f=t[0],h={done:!1,value:f},d=b=>a!==void 0&&bc,p=b=>a===void 0?c:c===void 0||Math.abs(a-b)-y*Math.exp(-b/s),g=b=>T+v(b),P=b=>{const w=v(b),O=g(b);h.done=Math.abs(w)<=u,h.value=h.done?T:O};let A,D;const C=b=>{d(h.value)&&(A=b,D=Bn({keyframes:[h.value,p(h.value)],velocity:ir(g,b,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return C(0),{calculatedDuration:null,next:b=>{let w=!1;return!D&&A===void 0&&(w=!0,P(b),C(b)),A!==void 0&&b>A?D.next(b-A):(!w&&P(b),h)}}}const La=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>N(e),now:()=>I.isProcessing?I.timestamp:performance.now()}},Qe=2e4;function tn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Qe?1/0:e}const Ba={decay:us,inertia:us,tween:pe,keyframes:pe,spring:Bn};function Kt({autoplay:t=!0,delay:e=0,driver:n=La,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:l,onUpdate:f,...h}){let d=1,p=!1,y,x;const T=()=>{x=new Promise(E=>{y=E})};T();let v;const g=Ba[i]||pe;let P;g!==pe&&typeof s[0]!="number"&&(P=we([0,100],s,{clamp:!1}),s=[0,100]);const A=g({...h,keyframes:s});let D;a==="mirror"&&(D=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let C="idle",b=null,w=null,O=null;A.calculatedDuration===null&&o&&(A.calculatedDuration=tn(A));const{calculatedDuration:H}=A;let X=1/0,G=1/0;H!==null&&(X=H+r,G=X*(o+1)-r);let M=0;const B=E=>{if(w===null)return;d>0&&(w=Math.min(w,E)),d<0&&(w=Math.min(E-G/d,w)),b!==null?M=b:M=Math.round(E-w)*d;const nt=M-e*(d>=0?1:-1),ee=d>=0?nt<0:nt>G;M=Math.max(nt,0),C==="finished"&&b===null&&(M=G);let $n=M,Kn=A;if(o){const Ee=M/X;let ne=Math.floor(Ee),ft=Ee%1;!ft&&Ee>=1&&(ft=1),ft===1&&ne--,ne=Math.min(ne,o+1);const Xn=!!(ne%2);Xn&&(a==="reverse"?(ft=1-ft,r&&(ft-=r/X)):a==="mirror"&&(Kn=D));let Yn=ct(0,1,ft);M>G&&(Yn=a==="reverse"&&Xn?1:0),$n=Yn*X}const Et=ee?{done:!1,value:s[0]}:Kn.next($n);P&&(Et.value=P(Et.value));let{done:_n}=Et;!ee&&H!==null&&(_n=d>=0?M>=G:M<=0);const eo=b===null&&(C==="finished"||C==="running"&&_n);return f&&f(Et.value),eo&&te(),Et},$=()=>{v&&v.stop(),v=void 0},Q=()=>{C="idle",$(),y(),T(),w=O=null},te=()=>{C="finished",l&&l(),$(),y()},Mt=()=>{if(p)return;v||(v=n(B));const E=v.now();c&&c(),b!==null?w=E-b:(!w||C==="finished")&&(w=E),C==="finished"&&T(),O=w,b=null,C="running",v.start()};t&&Mt();const Dt={then(E,nt){return x.then(E,nt)},get time(){return _(M)},set time(E){E=et(E),M=E,b!==null||!v||d===0?b=E:w=v.now()-E/d},get duration(){const E=A.calculatedDuration===null?tn(A):A.calculatedDuration;return _(E)},get speed(){return d},set speed(E){E===d||!v||(d=E,Dt.time=_(M))},get state(){return C},play:Mt,pause:()=>{C="paused",b=M},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),Q())},cancel:()=>{O!==null&&B(O),Q()},complete:()=>{C="finished"},sample:E=>(w=0,B(E))};return Dt}function rr(t){let e;return()=>(e===void 0&&(e=t()),e)}const Fa=rr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ia=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ie=10,ka=2e4,Oa=(t,e)=>e.type==="spring"||t==="backgroundColor"||!ki(e.ease);function ja(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Fa()&&Ia.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,c;const u=()=>{c=new Promise(v=>{a=v})};u();let{keyframes:l,duration:f=300,ease:h,times:d}=i;if(Oa(e,i)){const v=Kt({...i,repeat:0,delay:0});let g={done:!1,value:l[0]};const P=[];let A=0;for(;!g.done&&Ap.cancel(),x=()=>{V.update(y),a(),u()};return p.onfinish=()=>{t.set(Qo(l,i)),s&&s(),x()},{then(v,g){return c.then(v,g)},attachTimeline(v){return p.timeline=v,p.onfinish=null,L},get time(){return _(p.currentTime||0)},set time(v){p.currentTime=et(v)},get speed(){return p.playbackRate},set speed(v){p.playbackRate=v},get duration(){return _(f)},play:()=>{r||(p.play(),N(y))},pause:()=>p.pause(),stop:()=>{if(r=!0,p.playState==="idle")return;const{currentTime:v}=p;if(v){const g=Kt({...i,autoplay:!1});t.setWithVelocity(g.sample(v-ie).value,g.sample(v).value,ie)}x()},complete:()=>p.finish(),cancel:x}}function Ua({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:L,pause:L,stop:L,then:o=>(o(),Promise.resolve()),cancel:L,complete:L});return e?Kt({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Na={type:"spring",stiffness:500,damping:25,restSpeed:10},za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wa={type:"keyframes",duration:.8},Ha={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ga=(t,{keyframes:e})=>e.length>2?Wa:J.has(t)?t.startsWith("scale")?za(e[1]):Na:Ha,en=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ut.test(e)||e==="0")&&!e.startsWith("url(")),$a=new Set(["brightness","contrast","saturate","opacity"]);function Ka(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Se)||[];if(!s)return t;const i=n.replace(s,"");let o=$a.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const _a=/([a-z-]*)\(.*?\)/g,nn={...ut,getAnimatableNone:t=>{const e=t.match(_a);return e?e.map(Ka).join(" "):t}},Xa={...yi,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:nn,WebkitFilter:nn},Fn=t=>Xa[t];function or(t,e){let n=Fn(t);return n!==nn&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ar=t=>/^0[^.\s]+$/.test(t);function Ya(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ar(t)}function qa(t,e,n,s){const i=en(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const c=[];for(let u=0;ui=>{const o=cr(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-et(r);const c=qa(e,t,n,o),u=c[0],l=c[c.length-1],f=en(t,u),h=en(t,l);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Za(o)||(d={...d,...Ga(t,d)}),d.duration&&(d.duration=et(d.duration)),d.repeatDelay&&(d.repeatDelay=et(d.repeatDelay)),!f||!h||de.current||o.type===!1)return Ua(de.current?{...d,delay:0}:d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=ja(e,t,d);if(p)return p}return Kt(d)};function ge(t){return!!(k(t)&&t.add)}const ur=t=>/^\-?\d*\.?\d+$/.test(t);function Me(t,e){t.indexOf(e)===-1&&t.push(e)}function Ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Ja([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&sCt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t)),jt={current:void 0};class lr{constructor(e,n={}){this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=I;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,V.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>V.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Qa(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new kn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return jt.current&&jt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Ln(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function K(t,e){return new lr(t,e)}const fr=t=>e=>e.test(t),tc={test:t=>t==="auto",parse:t=>t},hr=[Pt,S,Z,st,yo,go,tc],Rt=t=>hr.find(fr(t)),ec=[...hr,U,ut],nc=t=>ec.find(fr(t));function sc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,K(n))}function On(t,e){const n=Ve(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=Eo(o[r]);sc(t,r,a)}}function sn(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&On(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{sn(o,e)})})}function ic(t,e){if(Array.isArray(e))return sn(t,e);if(typeof e=="string")return sn(t,[e]);On(t,e)}function dr(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;ac.remove(f))),u.push(y)}return r&&Promise.all(u).then(()=>{r&&On(t,r)}),u}function rn(t,e,n={}){const s=Ve(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(jn(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:f}=i;return ac(t,e,u+c,l,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function ac(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(cc).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(rn(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function cc(t,e){return t.sortNodePosition(e)}function Un(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>rn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=rn(t,e,n);else{const i=typeof e=="function"?Ve(t,e,n.custom):e;s=Promise.all(jn(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const uc=[...pn].reverse(),lc=pn.length;function fc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Un(t,n,s)))}function hc(t){let e=fc(t);const n=mc();let s=!0;const i=(c,u)=>{const l=Ve(t,u);if(l){const{transition:f,transitionEnd:h,...d}=l;c={...c,...d,...h}}return c};function o(c){e=c(t)}function r(c,u){const l=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},y=1/0;for(let T=0;Ty&&A;const O=Array.isArray(P)?P:[P];let H=O.reduce(i,{});D===!1&&(H={});const{prevResolvedValues:X={}}=g,G={...X,...H},M=B=>{w=!0,d.delete(B),g.needsAnimating[B]=!0};for(const B in G){const $=H[B],Q=X[B];p.hasOwnProperty(B)||($!==Q?he($)&&he(Q)?!Li($,Q)||b?M(B):g.protectedKeys[B]=!0:$!==void 0?M(B):d.add(B):$!==void 0&&d.has(B)?M(B):g.protectedKeys[B]=!0)}g.prevProp=P,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(w=!1),w&&!C&&h.push(...O.map(B=>({animation:B,options:{type:v,...c}})))}if(d.size){const T={};d.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(T[v]=g)}),h.push({animation:T})}let x=!!h.length;return s&&l.initial===!1&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(c,u,l){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=r(l,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function dc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Li(e,t):!1}function ht(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mc(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}class pc extends lt{constructor(e){super(e),e.animationState||(e.animationState=hc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Te(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let gc=0;class yc extends lt{constructor(){super(...arguments),this.id=gc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pr={animation:{Feature:pc},exit:{Feature:yc}},ls=(t,e)=>Math.abs(t-e);function vc(t,e){const n=ls(t.x,e.x),s=ls(t.y,e.y);return Math.sqrt(n**2+s**2)}class gr{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ne(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,f=vc(u.offset,{x:0,y:0})>=3;if(!l&&!f)return;const{point:h}=u,{timestamp:d}=I;this.history.push({...h,timestamp:d});const{onStart:p,onMove:y}=this.handlers;l||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,l)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Ue(l,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(u,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=Ne(u.type==="pointercancel"?this.lastMoveEventInfo:Ue(l,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,d),h&&h(u,d)},!Ci(e))return;this.handlers=n,this.transformPagePoint=s;const i=Ae(e),o=Ue(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=I;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Ne(o,this.history)),this.removeListeners=ot(tt(window,"pointermove",this.handlePointerMove),tt(window,"pointerup",this.handlePointerUp),tt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),N(this.updatePoint)}}function Ue(t,e){return e?{point:e(t.point)}:t}function fs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ne({point:t},e){return{point:t,delta:fs(t,yr(e)),offset:fs(t,xc(e)),velocity:Pc(e,.1)}}function xc(t){return t[0]}function yr(t){return t[t.length-1]}function Pc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=yr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function z(t){return t.max-t.min}function on(t,e=0,n=.01){return Math.abs(t-e)<=n}function hs(t,e,n,s=.5){t.origin=s,t.originPoint=R(e.min,e.max,t.origin),t.scale=z(n)/z(e),(on(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(on(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ut(t,e,n,s){hs(t.x,e.x,n.x,s?s.originX:void 0),hs(t.y,e.y,n.y,s?s.originY:void 0)}function ds(t,e,n){t.min=n.min+e.min,t.max=t.min+z(e)}function Tc(t,e,n){ds(t.x,e.x,n.x),ds(t.y,e.y,n.y)}function ms(t,e,n){t.min=e.min-n.min,t.max=t.min+z(e)}function Nt(t,e,n){ms(t.x,e.x,n.x),ms(t.y,e.y,n.y)}function bc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?R(n,t,s.max):Math.min(t,n)),t}function ps(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Sc(t,{top:e,left:n,bottom:s,right:i}){return{x:ps(t.x,n,i),y:ps(t.y,e,s)}}function gs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=yt(e.min,e.max-s,t.min):s>i&&(n=yt(t.min,t.max-i,e.min)),ct(0,1,n)}function Cc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const an=.35;function wc(t=an){return t===!1?t=0:t===!0&&(t=an),{x:ys(t,"left","right"),y:ys(t,"top","bottom")}}function ys(t,e,n){return{min:vs(t,e),max:vs(t,n)}}function vs(t,e){return typeof t=="number"?t:t[e]||0}const xs=()=>({translate:0,scale:1,origin:0,originPoint:0}),At=()=>({x:xs(),y:xs()}),Ps=()=>({min:0,max:0}),F=()=>({x:Ps(),y:Ps()});function Y(t){return[t("x"),t("y")]}function vr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Mc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Dc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ze(t){return t===void 0||t===1}function cn({scale:t,scaleX:e,scaleY:n}){return!ze(t)||!ze(e)||!ze(n)}function dt(t){return cn(t)||xr(t)||t.z||t.rotate||t.rotateX||t.rotateY}function xr(t){return Ts(t.x)||Ts(t.y)}function Ts(t){return t&&t!=="0%"}function ye(t,e,n){const s=t-n,i=e*s;return n+i}function bs(t,e,n,s,i){return i!==void 0&&(t=ye(t,i,s)),ye(t,n,s)+e}function un(t,e=0,n=1,s,i){t.min=bs(t.min,e,n,s,i),t.max=bs(t.max,e,n,s,i)}function Pr(t,{x:e,y:n}){un(t.x,e.translate,e.scale,e.originPoint),un(t.y,n.translate,n.scale,n.originPoint)}function Ec(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function As(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=R(t.min,t.max,o);un(t,e[n],e[s],r,e.scale)}const Rc=["x","scaleX","originX"],Lc=["y","scaleY","originY"];function Vt(t,e){As(t.x,e,Rc),As(t.y,e,Lc)}function Tr(t,e){return vr(Dc(t.getBoundingClientRect(),e))}function Bc(t,e,n){const s=Tr(t,n),{scroll:i}=e;return i&&(rt(s.x,i.offset.x),rt(s.y,i.offset.y)),s}const Fc=new WeakMap;class Ic{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=F(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(Ae(c,"page").point)},o=(c,u)=>{const{drag:l,dragPropagation:f,onDragStart:h}=this.getProps();if(l&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Mi(l),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Z.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[p];T&&(y=z(T)*(parseFloat(y)/100))}}this.originPoint[p]=y}),h&&V.update(()=>h(c,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:l,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=kc(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(c,u)},a=(c,u)=>this.stop(c,u);this.panSession=new gr(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!re(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=bc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&bt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Sc(s.layoutBox,e):this.constraints=!1,this.elastic=wc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Y(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Cc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Bc(s,i.root,this.visualElement.getTransformPagePoint());let r=Ac(i.layout.layoutBox,o);if(n){const a=n(Mc(r));this.hasMutatedConstraints=!!a,a&&(r=vr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Y(l=>{if(!re(l,n,this.currentDirection))return;let f=c&&c[l]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(In(e,s,0,n))}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Y(n=>{const{drag:s}=this.getProps();if(!re(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-R(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!bt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Y(r=>{const a=this.getAxisMotionValue(r);if(a){const c=a.get();i[r]=Vc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Y(r=>{if(!re(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(R(c,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Fc.set(this.visualElement,this);const e=this.visualElement.current,n=tt(e,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();bt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Y(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=an,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function re(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function kc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Oc extends lt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new Ic(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vs=t=>(e,n)=>{t&&V.update(()=>t(e,n))};class jc extends lt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new gr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vs(e),onStart:Vs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.update(()=>i(o,r))}}}mount(){this.removePointerDownListener=tt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Uc(){const t=m.useContext(Yt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function lf(){return Nc(m.useContext(Yt))}function Nc(t){return t===null?!0:t.isPresent}const ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Cs(t,e.target.x),s=Cs(t,e.target.y);return`${n}% ${s}%`}},zc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=ut.parse(t);if(i.length>5)return s;const o=ut.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=R(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Wc extends ui.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;co(Hc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ae.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function br(t){const[e,n]=Uc(),s=m.useContext(Gt);return ui.createElement(Wc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(fi),isPresent:e,safeToRemove:n})}const Hc={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:zc},Sr=["TopLeft","TopRight","BottomLeft","BottomRight"],Gc=Sr.length,ws=t=>typeof t=="string"?parseFloat(t):t,Ms=t=>typeof t=="number"||S.test(t);function $c(t,e,n,s,i,o){i?(t.opacity=R(0,n.opacity!==void 0?n.opacity:1,Kc(s)),t.opacityExit=R(e.opacity!==void 0?e.opacity:1,0,_c(s))):o&&(t.opacity=R(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(yt(t,e,s))}function Es(t,e){t.min=e.min,t.max=e.max}function W(t,e){Es(t.x,e.x),Es(t.y,e.y)}function Rs(t,e,n,s,i){return t-=e,t=ye(t,1/n,s),i!==void 0&&(t=ye(t,1/i,s)),t}function Xc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=R(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=R(o.min,o.max,s);t===o&&(a-=e),t.min=Rs(t.min,e,n,a,i),t.max=Rs(t.max,e,n,a,i)}function Ls(t,e,[n,s,i],o,r){Xc(t,e[n],e[s],e[i],e.scale,o,r)}const Yc=["x","scaleX","originX"],qc=["y","scaleY","originY"];function Bs(t,e,n,s){Ls(t.x,e,Yc,n?n.x:void 0,s?s.x:void 0),Ls(t.y,e,qc,n?n.y:void 0,s?s.y:void 0)}function Fs(t){return t.translate===0&&t.scale===1}function Vr(t){return Fs(t.x)&&Fs(t.y)}function Zc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Cr(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Is(t){return z(t.x)/z(t.y)}class Jc{constructor(){this.members=[]}add(e){Me(this.members,e),e.scheduleRender()}remove(e){if(Ct(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ks(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:l}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),l&&(s+=`rotateY(${l}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const Qc=(t,e)=>t.depth-e.depth;class tu{constructor(){this.children=[],this.isDirty=!1}add(e){Me(this.children,e),this.isDirty=!0}remove(e){Ct(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Qc),this.isDirty=!1,this.children.forEach(e)}}function eu(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(N(s),t(o-e))};return V.read(s,!0),()=>N(s)}function nu(t){window.MotionDebug&&window.MotionDebug.record(t)}function wr(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Nn(t,e,n){const s=k(t)?t:K(t);return s.start(In("",s,e,n)),s.animation}const Os=["","X","Y","Z"],js=1e3;let su=0;const mt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Mr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=su++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{mt.totalNodes=mt.resolvedTargetDeltas=mt.recalculatedProjection=0,this.nodes.forEach(ou),this.nodes.forEach(fu),this.nodes.forEach(hu),this.nodes.forEach(au),nu(mt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=eu(h,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(Ns))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||yu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=l.getProps(),v=!this.targetLayout||!Cr(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const P={...cr(y,"layout"),onPlay:x,onComplete:T};(l.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||Ns(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,N(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(du),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;lthis.update()))}clearAllSnapshots(){this.nodes.forEach(cu),this.sharedNodes.forEach(mu)}scheduleUpdateProjection(){V.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=P/1e3;zs(f.x,r.x,A),zs(f.y,r.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pu(this.relativeTarget,this.relativeTargetOrigin,h,A),g&&Zc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=F()),W(g,this.relativeTarget)),y&&(this.animationValues=l,$c(l,u,this.latestValues,A,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(N(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{ae.hasAnimatedSinceResize=!0,this.currentAnimation=Nn(0,js,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(js),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Dr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||F();const f=z(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const h=z(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}W(a,c),Vt(a,l),Ut(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Jc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let l=0;l{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function iu(t){t.updateLayout()}function ru(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(h);h.min=s[f].min,h.max=h.min+d}):Dr(o,n.layoutBox,s)&&Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=At();Ut(a,s,n.layoutBox);const c=At();r?Ut(c,t.applyTransform(i,!0),n.measuredBox):Ut(c,s,n.layoutBox);const u=!Vr(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=F();Nt(p,n.layoutBox,h.layoutBox);const y=F();Nt(y,s,d.layoutBox),Cr(p,y)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function ou(t){mt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function au(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function cu(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function uu(t){t.isLayoutDirty=!1}function lu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ns(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function fu(t){t.resolveTargetDelta()}function hu(t){t.calcProjection()}function du(t){t.resetRotation()}function mu(t){t.removeLeadSnapshot()}function zs(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ws(t,e,n,s){t.min=R(e.min,n.min,s),t.max=R(e.max,n.max,s)}function pu(t,e,n,s){Ws(t.x,e.x,n.x,s),Ws(t.y,e.y,n.y,s)}function gu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const yu={duration:.45,ease:[.4,0,.1,1]},Hs=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Gs=Hs("applewebkit/")&&!Hs("chrome/")?Math.round:L;function $s(t){t.min=Gs(t.min),t.max=Gs(t.max)}function vu(t){$s(t.x),$s(t.y)}function Dr(t,e,n){return t==="position"||t==="preserve-aspect"&&!on(Is(e),Is(n),.2)}const xu=Mr({attachResizeListener:(t,e)=>q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gt={current:void 0},Er=Mr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!gt.current){const t=new xu({});t.mount(window),t.setOptions({layoutScroll:!0}),gt.current=t}return gt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Rr={pan:{Feature:jc},drag:{Feature:Oc,ProjectionNode:Er,MeasureLayout:br}},Pu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Tu(t){const e=Pu.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function ln(t,e,n=1){const[s,i]=Tu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ur(r)?parseFloat(r):r}else return _e(i)?ln(i,e,n+1):i}function bu(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!_e(o))return;const r=ln(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!_e(o))continue;const r=ln(o,s);r&&(e[i]=r,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Su=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Lr=t=>Su.has(t),Au=t=>Object.keys(t).some(Lr),Ks=t=>t===Pt||t===S,_s=(t,e)=>parseFloat(t.split(", ")[e]),Xs=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return _s(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?_s(o[1],t):0}},Vu=new Set(["x","y","z"]),Cu=qt.filter(t=>!Vu.has(t));function wu(t){const e=[];return Cu.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Xs(4,13),y:Xs(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const Mu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=wt[u](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const l=e.getValue(u);l&&l.jump(a[u]),t[u]=wt[u](c,o)}),t},Du=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Lr);let o=[],r=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let l=n[c],f=Rt(l);const h=e[c];let d;if(he(h)){const p=h.length,y=h[0]===null?1:0;l=h[y],f=Rt(l);for(let x=y;x=0?window.pageYOffset:null,u=Mu(e,t,a);return o.length&&o.forEach(([l,f])=>{t.getValue(l).set(f)}),t.render(),Pe&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}};function Eu(t,e,n,s){return Au(e)?Du(t,e,n,s):{target:e,transitionEnd:s}}const Ru=(t,e,n,s)=>{const i=bu(t,e,s);return e=i.target,s=i.transitionEnd,Eu(t,e,n,s)},ve={current:null},zn={current:!1};function Br(){if(zn.current=!0,!!Pe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ve.current=t.matches;t.addListener(e),e()}else ve.current=!1}function Lu(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(k(o))t.addValue(i,o),ge(s)&&s.add(i);else if(k(r))t.addValue(i,K(o,{owner:t})),ge(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,K(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const _t=new WeakMap,Fr=Object.keys(Ht),Bu=Fr.length,Ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Fu=gn.length;class Ir{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>V.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.isControllingVariants=be(n),this.isVariantNode=li(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(n,{});for(const f in l){const h=l[f];a[f]!==void 0&&k(h)&&(h.set(a[f],!1),ge(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,_t.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zn.current||Br(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_t.delete(this.current),this.projection&&this.projection.unmount(),N(this.notifyUpdate),N(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=J.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let c=0;cthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):F()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=K(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=Vn(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!k(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new kn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class kr extends Ir{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=mr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){dr(this,s,r);const a=Ru(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Iu(t){return window.getComputedStyle(t)}class Or extends kr{readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}else{const s=Iu(e),i=(xn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Tr(e,n)}build(e,n,s,i){Pn(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return An(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){bi(e,n,s,i)}}class jr extends kr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}return n=Si.has(n)?n:$t(n),e.getAttribute(n)}measureInstanceViewportBox(){return F()}scrapeMotionValuesFromProps(e,n){return Vi(e,n)}build(e,n,s,i){bn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ai(e,n,s,i)}mount(e){this.isSVGTag=Sn(e.tagName),super.mount(e)}}const Wn=(t,e)=>vn(t)?new jr(e,{enableHardwareAcceleration:!1}):new Or(e,{enableHardwareAcceleration:!0}),Ur={layout:{ProjectionNode:Er,MeasureLayout:br}},Nr={...pr,...Ri,...Rr,...Ur},zr=di((t,e)=>wn(t,e,Nr,Wn));function hf(t){return hi(wn(t,{forwardMotionProps:!1},Nr,Wn))}const df=di(wn);function Wr(){const t=m.useRef(!1);return xt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Hn(){const t=Wr(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>V.postRender(s),[s]),e]}class ku extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ou({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:r,top:a,left:c}=i.current;if(e||!s.current||!o||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${r}px !important; + top: ${a}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(u)}},[e]),m.createElement(ku,{isPresent:e,childRef:s,sizeRef:i},m.cloneElement(t,{ref:s}))}const We=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r})=>{const a=j(ju),c=m.useId(),u=m.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:l=>{a.set(l,!0);for(const f of a.values())if(!f)return;s&&s()},register:l=>(a.set(l,!1),()=>a.delete(l))}),o?void 0:[n]);return m.useMemo(()=>{a.forEach((l,f)=>a.set(f,!1))},[n]),m.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),r==="popLayout"&&(t=m.createElement(Ou,{isPresent:n},t)),m.createElement(Yt.Provider,{value:u},t)};function ju(){return new Map}function Hr(t){return m.useEffect(()=>()=>t(),[])}const Tt=t=>t.key||"";function Uu(t,e){t.forEach(n=>{const s=Tt(n);e.set(s,n)})}function Nu(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const mf=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:r="sync"})=>{const a=m.useContext(Gt).forceRender||Hn()[0],c=Wr(),u=Nu(t);let l=u;const f=m.useRef(new Map).current,h=m.useRef(l),d=m.useRef(new Map).current,p=m.useRef(!0);if(xt(()=>{p.current=!1,Uu(u,d),h.current=l}),Hr(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return m.createElement(m.Fragment,null,l.map(v=>m.createElement(We,{key:Tt(v),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:r},v)));l=[...l];const y=h.current.map(Tt),x=u.map(Tt),T=y.length;for(let v=0;v{if(x.indexOf(g)!==-1)return;const P=d.get(g);if(!P)return;const A=y.indexOf(g);let D=v;if(!D){const C=()=>{d.delete(g),f.delete(g);const b=h.current.findIndex(w=>w.key===g);if(h.current.splice(b,1),!f.size){if(h.current=u,c.current===!1)return;a(),s&&s()}};D=m.createElement(We,{key:Tt(P),isPresent:!1,onExitComplete:C,custom:e,presenceAffectsLayout:o,mode:r},P),f.set(g,D)}l.splice(A,0,D)}),l=l.map(v=>{const g=v.key;return f.has(g)?v:m.createElement(We,{key:Tt(v),isPresent:!0,presenceAffectsLayout:o,mode:r},v)}),m.createElement(m.Fragment,null,f.size?l:l.map(v=>m.cloneElement(v)))};function pf({children:t,isValidProp:e,...n}){e&&Pi(e),n={...m.useContext(at),...n},n.isStatic=j(()=>n.isStatic);const s=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.createElement(at.Provider,{value:s},t)}function gf({children:t,features:e,strict:n=!1}){const[,s]=m.useState(!He(e)),i=m.useRef(void 0);if(!He(e)){const{renderer:o,...r}=e;i.current=o,Ke(r)}return m.useEffect(()=>{He(e)&&e().then(({renderer:o,...r})=>{Ke(r),i.current=o,s(!0)})},[]),m.createElement(mn.Provider,{value:{renderer:i.current,strict:n}},t)}function He(t){return typeof t=="function"}const zu=m.createContext(null),Wu=t=>!t.isLayoutDirty&&t.willUpdate(!1);function qs(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Wu);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const Gr=t=>t===!0,Hu=t=>Gr(t===!0)||t==="id",Gu=({children:t,id:e,inherit:n=!0})=>{const s=m.useContext(Gt),i=m.useContext(zu),[o,r]=Hn(),a=m.useRef(null),c=s.id||i;a.current===null&&(Hu(n)&&c&&(e=e?c+"-"+e:c),a.current={id:e,group:Gr(n)&&s.group||qs()});const u=m.useMemo(()=>({...a.current,forceRender:o}),[r]);return m.createElement(Gt.Provider,{value:u},t)},$r=m.createContext(null);function $u(t,e,n,s){if(!s)return t;const i=t.findIndex(l=>l.value===e);if(i===-1)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],c=r.layout,u=R(c.min,c.max,.5);return o===1&&a.layout.max+n>u||o===-1&&a.layout.min+nzr(e)),c=[],u=m.useRef(!1),l={axis:n,registerItem:(f,h)=>{h&&c.findIndex(d=>f===d.value)===-1&&(c.push({value:f,layout:h[n]}),c.sort(Yu))},updateOrder:(f,h,d)=>{if(u.current)return;const p=$u(c,f,h,d);c!==p&&(u.current=!0,s(p.map(Xu).filter(y=>i.indexOf(y)!==-1)))}};return m.useEffect(()=>{u.current=!1}),m.createElement(a,{...o,ref:r,ignoreStrict:!0},m.createElement($r.Provider,{value:l},t))}const _u=m.forwardRef(Ku);function Xu(t){return t.value}function Yu(t,e){return t.layout.min-e.layout.min}function vt(t){const e=j(()=>K(t)),{isStatic:n}=m.useContext(at);if(n){const[,s]=m.useState(t);m.useEffect(()=>e.on("change",s),[])}return e}const qu=t=>typeof t=="object"&&t.mix,Zu=t=>qu(t)?t.mix:void 0;function Ju(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=we(i,o,{mixer:Zu(o[0]),...r});return e?a(s):a}function Gn(t,e){const n=vt(e()),s=()=>n.set(e());return s(),xt(()=>{const i=()=>V.update(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),N(s)}}),n}function Qu(t){jt.current=[],t();const e=Gn(jt.current,t);return jt.current=void 0,e}function fn(t,e,n,s){if(typeof t=="function")return Qu(t);const i=typeof e=="function"?e:Ju(e,n,s);return Array.isArray(t)?Zs(t,i):Zs([t],([o])=>i(o))}function Zs(t,e){const n=j(()=>[]);return Gn(t,()=>{n.length=0;const s=t.length;for(let i=0;izr(s)),u=m.useContext($r),l={x:Js(e.x),y:Js(e.y)},f=fn([l.x,l.y],([x,T])=>x||T?1:"unset"),h=m.useRef(null),{axis:d,registerItem:p,updateOrder:y}=u;return m.useEffect(()=>{p(n,h.current)},[u]),m.createElement(c,{drag:d,...r,dragSnapToOrigin:!0,style:{...e,x:l.x,y:l.y,zIndex:f},layout:o,onDrag:(x,T)=>{const{velocity:v}=T;v[d]&&y(n,l[d].get(),v[d]),i&&i(x,T)},onLayoutMeasure:x=>{h.current=x},ref:a,ignoreStrict:!0},t)}const el=m.forwardRef(tl),yf={Group:_u,Item:el},nl={renderer:Wn,...pr,...Ri},vf={...nl,...Rr,...Ur};function xf(t,...e){const n=t.length;function s(){let i="";for(let o=0;o{s.current&&s.current.stop()};return m.useInsertionEffect(()=>i.attach((r,a)=>{if(n)return a(r);if(o(),s.current=Kt({keyframes:[i.get(),r],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...e,onUpdate:a}),!I.isProcessing){const c=performance.now()-I.timestamp;c<30&&(s.current.time=_(c))}return i.get()},o),[JSON.stringify(e)]),xt(()=>{if(k(t))return t.on("change",r=>i.set(parseFloat(r)))},[i]),i}function sl(t,e,n){m.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function Tf(t){const e=vt(t.getVelocity());return sl(t,"velocityChange",n=>{e.set(n)}),e}function De(t,e,n){var s;if(typeof t=="string"){let i=document;e&&(Ce(!!e.current),i=e.current),n?((s=n[t])!==null&&s!==void 0||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const ce=new WeakMap;let it;function il(t,e){if(e){const{inlineSize:n,blockSize:s}=e[0];return{width:n,height:s}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function rl({target:t,contentRect:e,borderBoxSize:n}){var s;(s=ce.get(t))===null||s===void 0||s.forEach(i=>{i({target:t,contentSize:e,get size(){return il(t,n)}})})}function ol(t){t.forEach(rl)}function al(){typeof ResizeObserver>"u"||(it=new ResizeObserver(ol))}function cl(t,e){it||al();const n=De(t);return n.forEach(s=>{let i=ce.get(s);i||(i=new Set,ce.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=ce.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const ue=new Set;let zt;function ul(){zt=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ue.forEach(n=>n(e))},window.addEventListener("resize",zt)}function ll(t){return ue.add(t),zt||ul(),()=>{ue.delete(t),!ue.size&&zt&&(zt=void 0)}}function fl(t,e){return typeof t=="function"?ll(t):cl(t,e)}const hl=50,Qs=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),dl=()=>({time:0,x:Qs(),y:Qs()}),ml={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ti(t,e,n,s){const i=n[e],{length:o,position:r}=ml[e],a=i.current,c=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=yt(0,i.scrollLength,i.current);const u=s-c;i.velocity=u>hl?0:Ln(i.current-a,u)}function pl(t,e,n){ti(t,"x",e,n),ti(t,"y",e,n),e.time=n}function gl(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const yl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},hn={start:0,center:.5,end:1};function ei(t,e,n=0){let s=0;if(hn[t]!==void 0&&(t=hn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const vl=[0,0];function xl(t,e,n,s){let i=Array.isArray(t)?t:vl,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,hn[t]?t:"0"]),o=ei(i[0],n,s),r=ei(i[1],e),o-r}const Pl={x:0,y:0};function Tl(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function bl(t,e,n){let{offset:s=yl.All}=n;const{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?gl(i,t):Pl,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Tl(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let l=!e[o].interpolate;const f=s.length;for(let h=0;hSl(t,s.target,n),update:i=>{pl(t,n,i),(s.offset||s.target)&&bl(t,n,s)},notify:()=>e(n)}}const Bt=new WeakMap,ni=new WeakMap,Ge=new WeakMap,si=t=>t===document.documentElement?window:t;function Kr(t,{container:e=document.documentElement,...n}={}){let s=Ge.get(e);s||(s=new Set,Ge.set(e,s));const i=dl(),o=Al(e,t,i,n);if(s.add(o),!Bt.has(e)){const a=()=>{for(const h of s)h.measure()},c=()=>{for(const h of s)h.update(I.timestamp)},u=()=>{for(const h of s)h.notify()},l=()=>{V.read(a,!1,!0),V.update(c,!1,!0),V.update(u,!1,!0)};Bt.set(e,l);const f=si(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&ni.set(e,fl(e,l)),f.addEventListener("scroll",l,{passive:!0})}const r=Bt.get(e);return V.read(r,!1,!0),()=>{var a;N(r);const c=Ge.get(e);if(!c||(c.delete(o),c.size))return;const u=Bt.get(e);Bt.delete(e),u&&(si(e).removeEventListener("scroll",u),(a=ni.get(e))===null||a===void 0||a(),window.removeEventListener("resize",u))}}function ii(t,e){Fi(!!(!e||e.current))}const Vl=()=>({scrollX:K(0),scrollY:K(0),scrollXProgress:K(0),scrollYProgress:K(0)});function _r({container:t,target:e,layoutEffect:n=!0,...s}={}){const i=j(Vl);return(n?xt:m.useEffect)(()=>(ii("target",e),ii("container",t),Kr(({x:r,y:a})=>{i.scrollX.set(r.current),i.scrollXProgress.set(r.progress),i.scrollY.set(a.current),i.scrollYProgress.set(a.progress)},{...s,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0})),[t,e,JSON.stringify(s.offset)]),i}function bf(t){return _r({container:t})}function Sf(){return _r()}function Cl(t){const e=m.useRef(0),{isStatic:n}=m.useContext(at);m.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:o})=>{e.current||(e.current=i),t(i-e.current,o)};return V.update(s,!0),()=>N(s)},[t])}function Af(){const t=vt(0);return Cl(e=>t.set(e)),t}class wl extends lr{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(e){let n;J.has(e)?(this.transforms.add(e),n="transform"):!e.startsWith("origin")&&!xn(e)&&e!=="willChange"&&(n=$t(e)),n&&(Me(this.members,n),this.update())}remove(e){J.has(e)?(this.transforms.delete(e),this.transforms.size||Ct(this.members,"transform")):Ct(this.members,$t(e)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Vf(){return j(()=>new wl("auto"))}function Ml(){!zn.current&&Br();const[t]=m.useState(ve.current);return t}function Cf(){const t=Ml(),{reducedMotion:e}=m.useContext(at);return e==="never"?!1:e==="always"?!0:t}function Dl(t){t.values.forEach(e=>e.stop())}function El(){const t=new Set,e={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,s){const i=[];return t.forEach(o=>{i.push(Un(o,n,{transitionOverride:s}))}),Promise.all(i)},set(n){return t.forEach(s=>{ic(s,n)})},stop(){t.forEach(n=>{Dl(n)})},mount(){return()=>{e.stop()}}};return e}function Xr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return V.update(s,!0),()=>N(s)}const Yr=rr(()=>window.ScrollTimeline!==void 0);class qr{constructor(e){this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(Yr()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),Xr(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;nn[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Rl(t){return typeof t=="object"&&!Array.isArray(t)}function Ll(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=wr(t)?new jr(e,{enableHardwareAcceleration:!1}):new Or(e,{enableHardwareAcceleration:!0});n.mount(t),_t.set(t,n)}function Bl(t,e=100){const n=Bn({keyframes:[0,e],...t}),s=Math.min(tn(n),Qe);return{type:"keyframes",ease:i=>n.next(s*i).value/e,duration:_(s)}}function ri(t,e,n,s){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:(i=s.get(e))!==null&&i!==void 0?i:t}const Zr=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Fl(t,e){return zi(t)?t[Zr(0,t.length,e)]:t}function Il(t,e,n){for(let s=0;se&&i.at{const b=Nl(g),{delay:w=0,times:O=Rn(b),type:H="keyframes",...X}=P;let{ease:G=e.ease||"easeOut",duration:M}=P;const B=typeof w=="function"?w(D,C):w,$=b.length;if($<=2&&H==="spring"){let Dt=100;if($===2&&Hl(b)){const ee=b[1]-b[0];Dt=Math.abs(ee)}const E={...X};M!==void 0&&(E.duration=et(M));const nt=Bl(E,Dt);G=nt.ease,M=nt.duration}M??(M=i);const Q=l+B,te=Q+M;O.length===1&&O[0]===0&&(O[1]=1);const Mt=O.length-b.length;Mt>0&&sr(O,Mt),b.length===1&&b.unshift(null),kl(A,b,G,O,Q,te),T=Math.max(B+M,T),f=Math.max(te,f)};if(k(p)){const g=oi(p,r);v(y,x,ai("default",g))}else{const g=De(p,s,a),P=g.length;for(let A=0;A{for(const p in h){const y=h[p];y.sort(Ol);const x=[],T=[],v=[];for(let P=0;Ptypeof t=="number",Hl=t=>t.every(Wl);function Jr(t,e,n,s){const i=De(t,s),o=i.length,r=[];for(let a=0;aArray.isArray(t)&&Array.isArray(t[0]);function $l(t,e,n){const s=[];return Ul(t,e,n).forEach(({keyframes:o,transition:r},a)=>{let c;k(a)?c=Nn(a,o.default,r.default):c=Jr(a,o,r),s.push(c)}),new qr(s)}const Qr=t=>{function e(n,s,i){let o;return Gl(n)?o=$l(n,s,t):Rl(s)?o=Jr(n,s,i,t):o=Nn(n,s,i),t&&t.animations.push(o),o}return e},wf=Qr();function Mf(){const t=j(()=>({current:null,animations:[]})),e=j(()=>Qr(t));return Hr(()=>{t.animations.forEach(n=>n.stop())}),[t,e]}function Kl(){const t=j(El);return xt(t.mount,[]),t}const Df=Kl;function Ef(...t){const e=m.useRef(0),[n,s]=m.useState(t[e.current]),i=m.useCallback(o=>{e.current=typeof o!="number"?Zr(0,t.length,e.current+1):o,s(t[e.current])},[t.length,...t]);return[n,i]}const _l={some:0,all:1};function Xl(t,e,{root:n,margin:s,amount:i="some"}={}){const o=De(t),r=new WeakMap,a=u=>{u.forEach(l=>{const f=r.get(l.target);if(l.isIntersecting!==!!f)if(l.isIntersecting){const h=e(l);typeof h=="function"?r.set(l.target,h):c.unobserve(l.target)}else f&&(f(l),r.delete(l.target))})},c=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:_l[i]});return o.forEach(u=>c.observe(u)),()=>c.disconnect()}function Rf(t,{root:e,margin:n,amount:s,once:i=!1}={}){const[o,r]=m.useState(!1);return m.useEffect(()=>{if(!t.current||i&&o)return;const a=()=>(r(!0),i?void 0:()=>r(!1)),c={root:e&&e.current||void 0,margin:n,amount:s};return Xl(t.current,a,c)},[e,t,n,i]),o}class Yl{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const ql=()=>new Yl;function Lf(){return j(ql)}function Bf(t,e,n,s){m.useEffect(()=>{const i=t.current;if(n&&i)return q(i,e,n,s)},[t,e,n,s])}function Zl(t){return t!==null&&typeof t=="object"&&yn in t}function Ff(t){if(Zl(t))return t[yn]}function Jl(){return Ql}function Ql(t){gt.current&&(gt.current.isUpdating=!1,gt.current.blockUpdate(),t&&t())}function If(){const[t,e]=Hn(),n=Jl(),s=m.useRef();return m.useEffect(()=>{V.postRender(()=>V.postRender(()=>{e===s.current&&(de.current=!1)}))},[e]),i=>{n(()=>{de.current=!0,t(),i(),s.current=e+1})}}function kf(){return m.useCallback(()=>{const e=gt.current;e&&e.resetTree()},[])}const to=(t,e)=>`${t}: ${e}`,xe=new Map;function tf(t,e,n,s){const i=to(t,J.has(e)?"transform":e),o=xe.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,c=()=>{xe.delete(i);try{r.cancel()}catch{}};return a!==null?(s.render(c),performance.now()-a||0):(c(),0)}function Of(t,e,n,s,i){const o=t.dataset[Bi];if(!o)return;window.HandoffAppearAnimations=tf;const r=to(o,e),a=Ye(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});xe.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const u=Ye(t,e,n,s);document.timeline&&(u.startTime=document.timeline.currentTime),xe.set(r,{animation:u,startTime:performance.now()}),i&&i(u)};a.ready?a.ready.then(c).catch(L):c()}const dn=()=>({});class ef extends Ir{build(){}measureInstanceViewportBox(){return F()}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return dn()}getBaseTargetFromProps(){}readValueFromInstance(e,n,s){return s.initialState[n]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s}){const i=mr(s,e||{},this);return dr(this,s,i),{transition:e,transitionEnd:n,...s}}}const nf=Cn({scrapeMotionValuesFromProps:dn,createRenderState:dn});function jf(t){const[e,n]=m.useState(t),s=nf({},!1),i=j(()=>new ef({props:{},visualState:s,presenceContext:null},{initialState:t}));m.useEffect(()=>(i.mount({}),()=>i.unmount()),[i]),m.useEffect(()=>{i.update({onUpdate:r=>{n({...r})}},null)},[n,i]);const o=j(()=>r=>Un(i,r));return[e,o]}const sf=1e5,ci=t=>t>.001?1/t:sf;function Uf(t){let e=vt(1),n=vt(1);const{visualElement:s}=m.useContext(Xt);t?(e=t.scaleX||e,n=t.scaleY||n):s&&(e=s.getValue("scaleX",1),n=s.getValue("scaleY",1));const i=fn(e,ci),o=fn(n,ci);return{scaleX:i,scaleY:o}}let rf=0;const Nf=({children:t})=>(m.useEffect(()=>{},[]),m.createElement(Gu,{id:j(()=>`asl-${rf++}`)},t));function of({source:t,axis:e="y"}){const n={value:0},s=Kr(i=>{n.value=i[e].progress*100},{container:t,axis:e});return{currentTime:n,cancel:s}}const $e=new Map;function af({source:t=document.documentElement,axis:e="y"}={}){$e.has(t)||$e.set(t,{});const n=$e.get(t);return n[e]||(n[e]=Yr()?new ScrollTimeline({source:t,axis:e}):of({source:t,axis:e})),n[e]}function zf(t,e){const n=af(e);return typeof t=="function"?Xr(t,n):t.attachTimeline(n)}function cf(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function Wf(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:cf(n,o),a=Math.abs(r-i);let c=t*a;if(s){const u=o*t;c=qe(s)(c/u)*u}return e+c}}const Hf=V,Gf=Ft.reduce((t,e)=>(t[e]=n=>N(n),t),{});export{mf as AnimatePresence,Nf as AnimateSharedLayout,zu as DeprecatedLayoutGroupContext,Yl as DragControls,tu as FlatTree,Gu as LayoutGroup,Gt as LayoutGroupContext,gf as LazyMotion,pf as MotionConfig,at as MotionConfigContext,Xt as MotionContext,lr as MotionValue,Yt as PresenceContext,yf as Reorder,fi as SwitchLayoutGroupContext,Ir as VisualElement,tt as addPointerEvent,jo as addPointerInfo,co as addScaleCorrector,wf as animate,Kt as animateValue,Un as animateVisualElement,El as animationControls,pr as animations,aa as anticipate,Dn as backIn,oa as backInOut,$i as backOut,fo as buildTransform,z as calcLength,N as cancelFrame,Gf as cancelSync,dr as checkTargetForNewValues,Gi as circIn,ra as circInOut,Mn as circOut,ct as clamp,U as color,ut as complex,F as createBox,hf as createDomMotionComponent,hi as createMotionComponent,Qr as createScopedAnimate,Qt as cubicBezier,eu as delay,ls as distance,vc as distance2D,nl as domAnimation,vf as domMax,sa as easeIn,Ni as easeInOut,ia as easeOut,bo as filterProps,V as frame,I as frameData,Xl as inView,we as interpolate,Ce as invariant,Pe as isBrowser,Di as isDragActive,Zl as isMotionComponent,k as isMotionValue,fe as isValidMotionProp,df as m,Cn as makeUseVisualState,Wi as mirrorEasing,R as mix,zr as motion,K as motionValue,Jo as optimizedAppearDataAttribute,ot as pipe,yt as progress,S as px,oe as resolveMotionValue,Hi as reverseEasing,zf as scroll,Kr as scrollInfo,Bn as spring,Wf as stagger,Of as startOptimizedAppearAnimation,Re as steps,Hf as sync,Ju as transform,Ff as unwrapMotionComponent,Mf as useAnimate,Df as useAnimation,Kl as useAnimationControls,Cl as useAnimationFrame,Ef as useCycle,jf as useDeprecatedAnimatedState,Uf as useDeprecatedInvertedScale,Bf as useDomEvent,Lf as useDragControls,bf as useElementScroll,Hn as useForceUpdate,Rf as useInView,Jl as useInstantLayoutTransition,If as useInstantTransition,lf as useIsPresent,xt as useIsomorphicLayoutEffect,xf as useMotionTemplate,vt as useMotionValue,sl as useMotionValueEvent,Uc as usePresence,Ml as useReducedMotion,Cf as useReducedMotionConfig,kf as useResetProjection,_r as useScroll,Pf as useSpring,Af as useTime,fn as useTransform,Hr as useUnmountEffect,Tf as useVelocity,Sf as useViewportScroll,Vf as useWillChange,_t as visualElementStore,Fi as warning,Zr as wrap}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-17fa2fa5.js b/FILES/etc/config/clash/clash-dashboard/assets/index-17fa2fa5.js new file mode 100644 index 0000000..fe1b4e0 --- /dev/null +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-17fa2fa5.js @@ -0,0 +1,127 @@ +var Fy=Object.defineProperty;var Uy=(e,t,n)=>t in e?Fy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yf=(e,t,n)=>(Uy(e,typeof t!="symbol"?t+"":t,n),n);function $y(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const zy="modulepreload",By=function(e,t){return new URL(e,t).href},wf={},xt=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=By(i,r),i in wf)return;wf[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":zy,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};function Vs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var ih={exports:{}},Hs={},sh={exports:{}},V={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Fo=Symbol.for("react.element"),Vy=Symbol.for("react.portal"),Hy=Symbol.for("react.fragment"),Qy=Symbol.for("react.strict_mode"),Ky=Symbol.for("react.profiler"),qy=Symbol.for("react.provider"),Gy=Symbol.for("react.context"),Yy=Symbol.for("react.forward_ref"),Jy=Symbol.for("react.suspense"),Xy=Symbol.for("react.memo"),Zy=Symbol.for("react.lazy"),Sf=Symbol.iterator;function e0(e){return e===null||typeof e!="object"?null:(e=Sf&&e[Sf]||e["@@iterator"],typeof e=="function"?e:null)}var ah={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lh=Object.assign,uh={};function _r(e,t,n){this.props=e,this.context=t,this.refs=uh,this.updater=n||ah}_r.prototype.isReactComponent={};_r.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ch(){}ch.prototype=_r.prototype;function Wu(e,t,n){this.props=e,this.context=t,this.refs=uh,this.updater=n||ah}var Vu=Wu.prototype=new ch;Vu.constructor=Wu;lh(Vu,_r.prototype);Vu.isPureReactComponent=!0;var xf=Array.isArray,fh=Object.prototype.hasOwnProperty,Hu={current:null},dh={key:!0,ref:!0,__self:!0,__source:!0};function ph(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)fh.call(t,r)&&!dh.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(11&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||f0,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{s(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[t,...r])})}}function Ir(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Cf(e){return e==null?"":""+e}function d0(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function Ku(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}const i=typeof t!="string"?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const s=r(i.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function kf(e,t,n){const{obj:r,k:o}=Ku(e,t,Object);r[o]=n}function p0(e,t,n,r){const{obj:o,k:i}=Ku(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}function es(e,t){const{obj:n,k:r}=Ku(e,t);if(n)return n[r]}function h0(e,t,n){const r=es(e,n);return r!==void 0?r:es(t,n)}function mh(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):mh(e[r],t[r],n):e[r]=t[r]);return e}function zn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var m0={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function g0(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>m0[t]):e}const v0=[" ",",","?","!",";"];function y0(e,t,n){t=t||"",n=n||"";const r=v0.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=new RegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}function ts(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+s;)s++,a=r.slice(i,i+s).join(n),l=o[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const u=r.slice(i+s).join(n);return u?ts(l,u,n):void 0}o=o[r[i]]}return o}function ns(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class _f extends Qs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[t,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."));const l=es(this.data,a);return l||!s||typeof r!="string"?l:ts(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),kf(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let l=es(this.data,a)||{};o?mh(l,r,i):l={...l,...r},kf(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var gh={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const Of={};class rs extends Qs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),d0(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=yt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!y0(t,r,o);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${E}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:`${l}${E}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:s}const d=this.resolve(t,n);let f=d&&d.res;const g=d&&d.usedKey||s,y=d&&d.exactUsedKey||s,w=Object.prototype.toString.apply(f),k=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&k.indexOf(w)<0&&!(typeof m=="string"&&w==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(d.res=E,d):E}if(i){const E=w==="[object Array]",b=E?[]:{},O=E?y:g;for(const P in f)if(Object.prototype.hasOwnProperty.call(f,P)){const x=`${O}${i}${P}`;b[P]=this.translate(x,{...n,joinArrays:!1,ns:a}),b[P]===x&&(b[P]=f[P])}f=b}}else if(p&&typeof m=="string"&&w==="[object Array]")f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let E=!1,b=!1;const O=n.count!==void 0&&typeof n.count!="string",P=rs.hasDefaultValue(n),x=O?this.pluralResolver.getSuffix(u,n.count,n):"",R=n.ordinal&&O?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",L=n[`defaultValue${x}`]||n[`defaultValue${R}`]||n.defaultValue;!this.isValidLookup(f)&&P&&(E=!0,f=L),this.isValidLookup(f)||(b=!0,f=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:f,j=P&&L!==f&&this.options.updateMissing;if(b||E||j){if(this.logger.log(j?"updateKey":"missingKey",u,l,s,j?L:f),i){const C=this.resolve(s,{...n,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&T&&T[0])for(let C=0;C{const $=P&&M!==f?M:A;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,_,$,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(C,l,_,$,j,n),this.emit("missingKey",C,l,_,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?N.forEach(C=>{this.pluralResolver.getSuffixes(C,n).forEach(_=>{F([C],s+_,n[`defaultValue${_}`]||L)})}):F(N,s,L))}f=this.extendTranslation(f,t,n,d,r),b&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(b||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,E?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d):f}extendTranslation(t,n,r,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=t.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language,r),u){const f=t.match(this.interpolator.nestingRegexp),g=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;o=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",g=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",w=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(k=>{this.isValidLookup(r)||(a=k,!Of[`${w[0]}-${k}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Of[`${w[0]}-${k}`]=!0,this.logger.warn(`key "${o}" for languages "${w.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(m=>{if(this.isValidLookup(r))return;s=m;const p=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,c,m,k,n);else{let E;f&&(E=this.pluralResolver.getSuffix(m,n.count,n));const b=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(p.push(c+E),n.ordinal&&E.indexOf(O)===0&&p.push(c+E.replace(O,this.options.pluralSeparator)),g&&p.push(c+b)),y){const P=`${c}${this.options.contextSeparator}${n.context}`;p.push(P),f&&(p.push(P+E),n.ordinal&&E.indexOf(O)===0&&p.push(P+E.replace(O,this.options.pluralSeparator)),g&&p.push(P+b))}}let h;for(;h=p.pop();)this.isValidLookup(r)||(i=h,r=this.getResource(m,k,h,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function xa(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Pf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=yt.create("languageUtils")}getScriptPartFromCode(t){if(t=ns(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ns(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=xa(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=xa(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=xa(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&i.indexOf(o)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let w0=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],S0={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const x0=["v1","v2","v3"],E0=["v4"],bf={zero:0,one:1,two:2,few:3,many:4,other:5};function C0(){const e={};return w0.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:S0[t.fc]}})}),e}class k0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=yt.create("pluralResolver"),(!this.options.compatibilityJSON||E0.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=C0()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ns(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>bf[o]-bf[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!x0.includes(this.options.compatibilityJSON)}}function Rf(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=h0(e,t,n);return!i&&o&&typeof n=="string"&&(i=ts(e,n,r),i===void 0&&(i=ts(t,n,r))),i}class _0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=yt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:g0,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?zn(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?zn(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?zn(n.nestingPrefix):n.nestingPrefixEscaped||zn("$t("),this.nestingSuffix=n.nestingSuffix?zn(n.nestingSuffix):n.nestingSuffixEscaped||zn(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,o){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(y){return y.replace(/\$/g,"$$$$")}const c=y=>{if(y.indexOf(this.formatSeparator)<0){const p=Rf(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...o,...n,interpolationkey:y}):p}const w=y.split(this.formatSeparator),k=w.shift().trim(),m=w.join(this.formatSeparator).trim();return this.format(Rf(n,l,k,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...o,...n,interpolationkey:k})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>u(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?u(this.escape(y)):u(y)}].forEach(y=>{for(a=0;i=y.regex.exec(t);){const w=i[1].trim();if(s=c(w),s===void 0)if(typeof d=="function"){const m=d(t,i,o);s=typeof m=="string"?m:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Cf(s));const k=y.safeValue(s);if(t=t.replace(i[0],k),f?(y.regex.lastIndex+=s.length,y.regex.lastIndex-=i[0].length):y.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const g=f.match(/'/g),y=f.match(/"/g);(g&&g.length%2===0&&!y||y.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,w),`${l}${c}${f}`}return delete s.defaultValue,l}for(;o=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=c.shift(),l=c,u=!0}if(i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Cf(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u&&(i=l.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}function O0(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=u),u==="false"&&(n[a.trim()]=!1),u==="true"&&(n[a.trim()]=!0),isNaN(u)||(n[a.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Bn(e){const t={};return function(r,o,i){const s=o+JSON.stringify(i);let a=t[s];return a||(a=e(ns(o),i),t[s]=a),a(r)}}class P0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=yt.create("formatter"),this.options=t,this.formats={number:Bn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Bn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Bn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Bn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Bn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Bn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=O0(l);if(this.formats[u]){let d=a;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},g=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[u](a,g,{...c,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}function b0(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class R0 extends Qs{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=yt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),r&&this.store.addResourceBundle(i,s,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{p0(l.loaded,[i],s),b0(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&o{this.read.call(this,t,n,r,o+1,i*2,s)},i);return}s(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,o,l):c=u(t,n,r,o),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(t,n,r,o,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function Lf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Nf(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function ui(){}function L0(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class lo extends Qs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nf(t),this.services={},this.logger=yt,this.modules={external:[]},L0(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Lf();this.options={...o,...this.options,...Nf(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?yt.init(i(this.modules.logger),this.options):yt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=P0);const d=new Pf(this.options);this.store=new _f(this.options.resources,this.options);const f=this.services;f.logger=yt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new k0(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new _0(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new R0(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(g){for(var y=arguments.length,w=new Array(y>1?y-1:0),k=1;k1?y-1:0),k=1;k{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ui),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=Ir(),u=()=>{const c=(d,f)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=Ir();return t||(t=this.languages),n||(n=this.options.ns),r||(r=ui),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&gh.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Ir();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),o}getFixedT(t,n,r){var o=this;const i=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${y}`):g=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,o.t(g,l)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Ir();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Ir();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>o.indexOf(s)<0);return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Pf(Lf());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new lo(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new lo(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new _f(this.store.data,o),i.services.resourceStore=i.store),i.translator=new rs(i.services,o),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c0){var a=o.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(o.domain){if(!If.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(o.domain)}if(o.path){if(!If.test(o.path))throw new TypeError("option path is invalid");s+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Df={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=F0(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),s=0;s0){var l=i[s].substring(0,a);l===t.lookupQuerystring&&(n=i[s].substring(a+1))}}}return n}},Dr=null,Mf=function(){if(Dr!==null)return Dr;try{Dr=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Dr=!1}return Dr},z0={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&Mf()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&Mf()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Mr=null,jf=function(){if(Mr!==null)return Mr;try{Mr=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Mr=!1}return Mr},B0={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&jf()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&jf()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},W0={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},V0={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},H0={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},Q0={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function K0(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var yh=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};N0(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return D0(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=A0(r,this.options||{},K0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(i){return i.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(U0),this.addDetector($0),this.addDetector(z0),this.addDetector(B0),this.addDetector(W0),this.addDetector(V0),this.addDetector(H0),this.addDetector(Q0)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var s=r.detectors[i].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(o=o.concat(s))}}),o=o.map(function(i){return r.options.convertDetectedLanguage(i)}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();yh.type="languageDetector";function q0(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Ff(e,t,n){e.loadNamespaces(t,wh(e,n))}function Uf(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,wh(e,r))}function G0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=t.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(i,e)))}function Y0(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(ul("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,e))return!1}}):G0(e,t,n)}const J0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,X0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Z0=e=>X0[e],e1=e=>e.replace(J0,Z0);let cl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e1};function t1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cl={...cl,...e}}function n1(){return cl}let Sh;function r1(e){Sh=e}function o1(){return Sh}const i1={type:"3rdParty",init(e){t1(e.options.react),r1(e)}},s1=v.createContext();class a1{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const l1=(e,t)=>{const n=v.useRef();return v.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function Uo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=v.useContext(s1)||{},i=n||r||o1();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new a1),!i){ul("You will need to pass in an i18next instance by using initReactI18next");const h=(b,O)=>typeof O=="string"?O:O&&typeof O=="object"&&typeof O.defaultValue=="string"?O.defaultValue:Array.isArray(b)?b[b.length-1]:b,E=[h,{},!1];return E.t=h,E.i18n={},E.ready=!1,E}i.options.react&&i.options.react.wait!==void 0&&ul("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...n1(),...i.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let u=e||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(h=>Y0(h,i,s));function d(){return i.getFixedT(t.lng||null,s.nsMode==="fallback"?u:u[0],l)}const[f,g]=v.useState(d);let y=u.join();t.lng&&(y=`${t.lng}${y}`);const w=l1(y),k=v.useRef(!0);v.useEffect(()=>{const{bindI18n:h,bindI18nStore:E}=s;k.current=!0,!c&&!a&&(t.lng?Uf(i,t.lng,u,()=>{k.current&&g(d)}):Ff(i,u,()=>{k.current&&g(d)})),c&&w&&w!==y&&k.current&&g(d);function b(){k.current&&g(d)}return h&&i&&i.on(h,b),E&&i&&i.store.on(E,b),()=>{k.current=!1,h&&i&&h.split(" ").forEach(O=>i.off(O,b)),E&&i&&E.split(" ").forEach(O=>i.store.off(O,b))}},[i,y]);const m=v.useRef(!0);v.useEffect(()=>{k.current&&!m.current&&g(d),m.current=!1},[i,l]);const p=[f,i,c];if(p.t=f,p.i18n=i,p.ready=c,c||!c&&!a)return p;throw new Promise(h=>{t.lng?Uf(i,t.lng,u,()=>h()):Ff(i,u,()=>h())})}const u1={type:"backend",read:(e,t,n)=>{let r;switch(e){case"zh":case"zh-CN":r=xt(()=>import("./zh-715caed0.js"),[],import.meta.url);break;case"en":default:r=xt(()=>import("./en-4e6aa22d.js"),[],import.meta.url);break}r?r.then(o=>n(null,o.data),o=>n(o,null)):n(new Error(`unable to load translation file for language ${e}`),null)}};Ce.use(i1).use(yh).use(u1).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1}});const c1=""+new URL("inter-latin-400-normal-0364d368.woff2",import.meta.url).href,f1=""+new URL("inter-latin-800-normal-a51ac27d.woff2",import.meta.url).href,d1=""+new URL("roboto-mono-latin-400-normal-7295944e.woff2",import.meta.url).href,xh=""+new URL("TwemojiCountryFlags-9f04f144.woff2",import.meta.url).href;var Eh={exports:{}},ze={},Ch={exports:{}},kh={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(e){function t(_,M){var $=_.length;_.push(M);e:for(;0<$;){var B=$-1>>>1,q=_[B];if(0>>1;Bo(mn,$))Zeo(Q,mn)?(_[B]=Q,_[Ze]=$,B=Ze):(_[B]=mn,_[Re]=$,B=Re);else if(Zeo(Q,$))_[B]=Q,_[Ze]=$,B=Ze;else break e}}return M}function o(_,M){var $=_.sortIndex-M.sortIndex;return $!==0?$:_.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,g=!1,y=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(_){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=_)r(u),M.sortIndex=M.expirationTime,t(l,M);else break;M=n(u)}}function E(_){if(w=!1,h(_),!y)if(n(l)!==null)y=!0,F(b);else{var M=n(u);M!==null&&C(E,M.startTime-_)}}function b(_,M){y=!1,w&&(w=!1,m(x),x=-1),g=!0;var $=f;try{for(h(M),d=n(l);d!==null&&(!(d.expirationTime>M)||_&&!D());){var B=d.callback;if(typeof B=="function"){d.callback=null,f=d.priorityLevel;var q=B(d.expirationTime<=M);M=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),h(M)}else r(l);d=n(l)}if(d!==null)var be=!0;else{var Re=n(u);Re!==null&&C(E,Re.startTime-M),be=!1}return be}finally{d=null,f=$,g=!1}}var O=!1,P=null,x=-1,R=5,L=-1;function D(){return!(e.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var M=3;break;default:M=f}var $=f;f=M;try{return _()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,M){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var $=f;f=_;try{return M()}finally{f=$}},e.unstable_scheduleCallback=function(_,M,$){var B=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?B+$:B):$=B,_){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,_={id:c++,callback:M,priorityLevel:_,startTime:$,expirationTime:q,sortIndex:-1},$>B?(_.sortIndex=$,t(u,_),n(l)===null&&_===n(u)&&(w?(m(x),x=-1):w=!0,C(E,$-B))):(_.sortIndex=q,t(l,_),y||g||(y=!0,F(b))),_},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(_){var M=f;return function(){var $=f;f=M;try{return _.apply(this,arguments)}finally{f=$}}}})(kh);Ch.exports=kh;var p1=Ch.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _h=v,Fe=p1;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fl=Object.prototype.hasOwnProperty,h1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$f={},zf={};function m1(e){return fl.call(zf,e)?!0:fl.call($f,e)?!1:h1.test(e)?zf[e]=!0:($f[e]=!0,!1)}function g1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function v1(e,t,n,r){if(t===null||typeof t>"u"||g1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var qu=/[\-:]([a-z])/g;function Gu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qu,Gu);ve[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qu,Gu);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qu,Gu);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yu(e,t,n,r){var o=ve.hasOwnProperty(t)?ve[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` +`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ca=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hr(e):""}function y1(e){switch(e.tag){case 5:return Hr(e.type);case 16:return Hr("Lazy");case 13:return Hr("Suspense");case 19:return Hr("SuspenseList");case 0:case 2:case 15:return e=ka(e.type,!1),e;case 11:return e=ka(e.type.render,!1),e;case 1:return e=ka(e.type,!0),e;default:return""}}function ml(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qn:return"Fragment";case Hn:return"Portal";case dl:return"Profiler";case Ju:return"StrictMode";case pl:return"Suspense";case hl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bh:return(e.displayName||"Context")+".Consumer";case Ph:return(e._context.displayName||"Context")+".Provider";case Xu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zu:return t=e.displayName||null,t!==null?t:ml(e.type)||"Memo";case Ut:t=e._payload,e=e._init;try{return ml(e(t))}catch{}}return null}function w1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ml(t);case 8:return t===Ju?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function S1(e){var t=Lh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fi(e){e._valueTracker||(e._valueTracker=S1(e))}function Nh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function os(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gl(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ln(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Th(e,t){t=t.checked,t!=null&&Yu(e,"checked",t,!1)}function vl(e,t){Th(e,t);var n=ln(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yl(e,t.type,n):t.hasOwnProperty("defaultValue")&&yl(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yl(e,t,n){(t!=="number"||os(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Qr=Array.isArray;function sr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},x1=["Webkit","ms","Moz","O"];Object.keys(Jr).forEach(function(e){x1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jr[t]=Jr[e]})});function jh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jr.hasOwnProperty(e)&&Jr[e]?(""+t).trim():t+"px"}function Ah(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=jh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var E1=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xl(e,t){if(t){if(E1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function El(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cl=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kl=null,ar=null,lr=null;function Kf(e){if(e=Bo(e)){if(typeof kl!="function")throw Error(I(280));var t=e.stateNode;t&&(t=Js(t),kl(e.stateNode,e.type,t))}}function Fh(e){ar?lr?lr.push(e):lr=[e]:ar=e}function Uh(){if(ar){var e=ar,t=lr;if(lr=ar=null,Kf(e),t)for(e=0;e>>=0,e===0?32:31-(I1(e)/D1|0)|0}var pi=64,hi=4194304;function Kr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ls(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Kr(a):(i&=s,i!==0&&(r=Kr(i)))}else s=n&~o,s!==0?r=Kr(s):i!==0&&(r=Kr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function $o(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-at(t),e[t]=n}function F1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zr),nd=String.fromCharCode(32),rd=!1;function im(e,t){switch(e){case"keyup":return dw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kn=!1;function hw(e,t){switch(e){case"compositionend":return sm(t);case"keypress":return t.which!==32?null:(rd=!0,nd);case"textInput":return e=t.data,e===nd&&rd?null:e;default:return null}}function mw(e,t){if(Kn)return e==="compositionend"||!lc&&im(e,t)?(e=rm(),Ui=ic=Qt=null,Kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ad(n)}}function cm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fm(){for(var e=window,t=os();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=os(e.document)}return t}function uc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function kw(e){var t=fm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cm(n.ownerDocument.documentElement,n)){if(r!==null&&uc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ld(n,i);var s=ld(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,qn=null,Ll=null,to=null,Nl=!1;function ud(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nl||qn==null||qn!==os(r)||(r=qn,"selectionStart"in r&&uc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),to&&yo(to,r)||(to=r,r=fs(Ll,"onSelect"),0Jn||(e.current=Al[Jn],Al[Jn]=null,Jn--)}function Y(e,t){Jn++,Al[Jn]=e.current,e.current=t}var un={},Ee=dn(un),Te=dn(!1),Pn=un;function hr(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ie(e){return e=e.childContextTypes,e!=null}function ps(){X(Te),X(Ee)}function gd(e,t,n){if(Ee.current!==un)throw Error(I(168));Y(Ee,t),Y(Te,n)}function Sm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,w1(e)||"Unknown",o));return re({},n,r)}function hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,Pn=Ee.current,Y(Ee,e),Y(Te,Te.current),!0}function vd(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Sm(e,t,Pn),r.__reactInternalMemoizedMergedChildContext=e,X(Te),X(Ee),Y(Ee,e)):X(Te),Y(Te,n)}var _t=null,Xs=!1,Fa=!1;function xm(e){_t===null?_t=[e]:_t.push(e)}function jw(e){Xs=!0,xm(e)}function pn(){if(!Fa&&_t!==null){Fa=!0;var e=0,t=K;try{var n=_t;for(K=1;e>=s,o-=s,Ot=1<<32-at(t)+o|n<x?(R=P,P=null):R=P.sibling;var L=f(m,P,h[x],E);if(L===null){P===null&&(P=R);break}e&&P&&L.alternate===null&&t(m,P),p=i(L,p,x),O===null?b=L:O.sibling=L,O=L,P=R}if(x===h.length)return n(m,P),Z&&gn(m,x),b;if(P===null){for(;xx?(R=P,P=null):R=P.sibling;var D=f(m,P,L.value,E);if(D===null){P===null&&(P=R);break}e&&P&&D.alternate===null&&t(m,P),p=i(D,p,x),O===null?b=D:O.sibling=D,O=D,P=R}if(L.done)return n(m,P),Z&&gn(m,x),b;if(P===null){for(;!L.done;x++,L=h.next())L=d(m,L.value,E),L!==null&&(p=i(L,p,x),O===null?b=L:O.sibling=L,O=L);return Z&&gn(m,x),b}for(P=r(m,P);!L.done;x++,L=h.next())L=g(P,m,x,L.value,E),L!==null&&(e&&L.alternate!==null&&P.delete(L.key===null?x:L.key),p=i(L,p,x),O===null?b=L:O.sibling=L,O=L);return e&&P.forEach(function(A){return t(m,A)}),Z&&gn(m,x),b}function k(m,p,h,E){if(typeof h=="object"&&h!==null&&h.type===Qn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ci:e:{for(var b=h.key,O=p;O!==null;){if(O.key===b){if(b=h.type,b===Qn){if(O.tag===7){n(m,O.sibling),p=o(O,h.props.children),p.return=m,m=p;break e}}else if(O.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ut&&kd(b)===O.type){n(m,O.sibling),p=o(O,h.props),p.ref=zr(m,O,h),p.return=m,m=p;break e}n(m,O);break}else t(m,O);O=O.sibling}h.type===Qn?(p=_n(h.props.children,m.mode,E,h.key),p.return=m,m=p):(E=Ki(h.type,h.key,h.props,null,m.mode,E),E.ref=zr(m,p,h),E.return=m,m=E)}return s(m);case Hn:e:{for(O=h.key;p!==null;){if(p.key===O)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(m,p.sibling),p=o(p,h.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Qa(h,m.mode,E),p.return=m,m=p}return s(m);case Ut:return O=h._init,k(m,p,O(h._payload),E)}if(Qr(h))return y(m,p,h,E);if(jr(h))return w(m,p,h,E);xi(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,h),p.return=m,m=p):(n(m,p),p=Ha(h,m.mode,E),p.return=m,m=p),s(m)):n(m,p)}return k}var gr=Rm(!0),Lm=Rm(!1),Wo={},St=dn(Wo),Eo=dn(Wo),Co=dn(Wo);function En(e){if(e===Wo)throw Error(I(174));return e}function yc(e,t){switch(Y(Co,t),Y(Eo,e),Y(St,Wo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Sl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Sl(t,e)}X(St),Y(St,t)}function vr(){X(St),X(Eo),X(Co)}function Nm(e){En(Co.current);var t=En(St.current),n=Sl(t,e.type);t!==n&&(Y(Eo,e),Y(St,n))}function wc(e){Eo.current===e&&(X(St),X(Eo))}var te=dn(0);function Ss(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ua=[];function Sc(){for(var e=0;en?n:4,e(!0);var r=$a.transition;$a.transition={};try{e(!1),t()}finally{K=n,$a.transition=r}}function Km(){return Xe().memoizedState}function $w(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qm(e))Gm(t,n);else if(n=_m(e,t,n,r),n!==null){var o=_e();lt(n,e,r,o),Ym(n,t,r)}}function zw(e,t,n){var r=rn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qm(e))Gm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,ct(a,s)){var l=t.interleaved;l===null?(o.next=o,gc(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=_m(e,t,o,r),n!==null&&(o=_e(),lt(n,e,r,o),Ym(n,t,r))}}function qm(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Gm(e,t){no=xs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ym(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nc(e,n)}}var Es={readContext:Je,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Bw={readContext:Je,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Od,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wi(4194308,4,Bm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wi(4,2,e,t)},useMemo:function(e,t){var n=mt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$w.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:_d,useDebugValue:_c,useDeferredValue:function(e){return mt().memoizedState=e},useTransition:function(){var e=_d(!1),t=e[0];return e=Uw.bind(null,e[1]),mt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,o=mt();if(Z){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),de===null)throw Error(I(349));Rn&30||Dm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Od(jm.bind(null,r,i,e),[e]),r.flags|=2048,Oo(9,Mm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=mt(),t=de.identifierPrefix;if(Z){var n=Pt,r=Ot;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ko++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[vt]=t,e[xo]=r,ig(e,t,!1,!1),t.stateNode=e;e:{switch(s=El(n,r),n){case"dialog":J("cancel",e),J("close",e),o=r;break;case"iframe":case"object":case"embed":J("load",e),o=r;break;case"video":case"audio":for(o=0;owr&&(t.flags|=128,r=!0,Br(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ss(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Br(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Z)return we(t),null}else 2*se()-i.renderingStartTime>wr&&n!==1073741824&&(t.flags|=128,r=!0,Br(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=se(),t.sibling=null,n=te.current,Y(te,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return Nc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Me&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function Yw(e,t){switch(fc(t),t.tag){case 1:return Ie(t.type)&&ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vr(),X(Te),X(Ee),Sc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wc(t),null;case 13:if(X(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));mr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(te),null;case 4:return vr(),null;case 10:return mc(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var Ci=!1,xe=!1,Jw=typeof WeakSet=="function"?WeakSet:Set,U=null;function tr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Gl(e,t,n){try{n()}catch(r){oe(e,t,r)}}var Md=!1;function Xw(e,t){if(Tl=us,e=fm(),uc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var g;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Il={focusedElem:e,selectionRange:n},us=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,k=y.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:tt(t.type,w),k);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(E){oe(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return y=Md,Md=!1,y}function ro(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gl(t,n,i)}o=o.next}while(o!==r)}}function ta(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lg(e){var t=e.alternate;t!==null&&(e.alternate=null,lg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[xo],delete t[jl],delete t[Dw],delete t[Mw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ug(e){return e.tag===5||e.tag===3||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ug(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ds));else if(r!==4&&(e=e.child,e!==null))for(Jl(e,t,n),e=e.sibling;e!==null;)Jl(e,t,n),e=e.sibling}function Xl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xl(e,t,n),e=e.sibling;e!==null;)Xl(e,t,n),e=e.sibling}var he=null,ot=!1;function jt(e,t,n){for(n=n.child;n!==null;)cg(e,t,n),n=n.sibling}function cg(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Ks,n)}catch{}switch(n.tag){case 5:xe||tr(n,t);case 6:var r=he,o=ot;he=null,jt(e,t,n),he=r,ot=o,he!==null&&(ot?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(ot?(e=he,n=n.stateNode,e.nodeType===8?Aa(e.parentNode,n):e.nodeType===1&&Aa(e,n),go(e)):Aa(he,n.stateNode));break;case 4:r=he,o=ot,he=n.stateNode.containerInfo,ot=!0,jt(e,t,n),he=r,ot=o;break;case 0:case 11:case 14:case 15:if(!xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Gl(n,t,s),o=o.next}while(o!==r)}jt(e,t,n);break;case 1:if(!xe&&(tr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){oe(n,t,a)}jt(e,t,n);break;case 21:jt(e,t,n);break;case 22:n.mode&1?(xe=(r=xe)||n.memoizedState!==null,jt(e,t,n),xe=r):jt(e,t,n);break;default:jt(e,t,n)}}function Ad(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jw),t.forEach(function(r){var o=aS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*eS(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,_s=0,H&6)throw Error(I(331));var o=H;for(H|=4,U=e.current;U!==null;){var i=U,s=i.child;if(U.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lse()-Rc?kn(e,0):bc|=n),De(e,t)}function yg(e,t){t===0&&(e.mode&1?(t=hi,hi<<=1,!(hi&130023424)&&(hi=4194304)):t=1);var n=_e();e=Nt(e,t),e!==null&&($o(e,t,n),De(e,n))}function sS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yg(e,n)}function aS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),yg(e,n)}var wg;wg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,qw(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,Z&&t.flags&1048576&&Em(t,gs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vi(e,t),e=t.pendingProps;var o=hr(t,Ee.current);cr(t,n),o=Ec(null,t,r,e,o,n);var i=Cc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ie(r)?(i=!0,hs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,vc(t),o.updater=Zs,t.stateNode=o,o._reactInternals=t,Bl(t,r,e,n),t=Hl(null,t,r,!0,i,n)):(t.tag=0,Z&&i&&cc(t),ke(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=uS(r),e=tt(r,e),o){case 0:t=Vl(null,t,r,e,n);break e;case 1:t=Td(null,t,r,e,n);break e;case 11:t=Ld(null,t,r,e,n);break e;case 14:t=Nd(null,t,r,tt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Vl(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Td(e,t,r,o,n);case 3:e:{if(ng(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Om(e,t),ws(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=yr(Error(I(423)),t),t=Id(e,t,r,n,o);break e}else if(r!==o){o=yr(Error(I(424)),t),t=Id(e,t,r,n,o);break e}else for(je=en(t.stateNode.containerInfo.firstChild),Ae=t,Z=!0,it=null,n=Lm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mr(),r===o){t=Tt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Nm(t),e===null&&Ul(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Dl(r,o)?s=null:i!==null&&Dl(r,i)&&(t.flags|=32),tg(e,t),ke(e,t,s,n),t.child;case 6:return e===null&&Ul(t),null;case 13:return rg(e,t,n);case 4:return yc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gr(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Ld(e,t,r,o,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Y(vs,r._currentValue),r._currentValue=s,i!==null)if(ct(i.value,s)){if(i.children===o.children&&!Te.current){t=Tt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=bt(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),$l(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$l(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ke(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,cr(t,n),o=Je(o),r=r(o),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,o=tt(r,t.pendingProps),o=tt(r.type,o),Nd(e,t,r,o,n);case 15:return Zm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tt(r,o),Vi(e,t),t.tag=1,Ie(r)?(e=!0,hs(t)):e=!1,cr(t,n),bm(t,r,o),Bl(t,r,o,n),Hl(null,t,r,!0,e,n);case 19:return og(e,t,n);case 22:return eg(e,t,n)}throw Error(I(156,t.tag))};function Sg(e,t){return Qh(e,t)}function lS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qe(e,t,n,r){return new lS(e,t,n,r)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uS(e){if(typeof e=="function")return Ic(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xu)return 11;if(e===Zu)return 14}return 2}function on(e,t){var n=e.alternate;return n===null?(n=qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ki(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Ic(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Qn:return _n(n.children,o,i,t);case Ju:s=8,o|=8;break;case dl:return e=qe(12,n,t,o|2),e.elementType=dl,e.lanes=i,e;case pl:return e=qe(13,n,t,o),e.elementType=pl,e.lanes=i,e;case hl:return e=qe(19,n,t,o),e.elementType=hl,e.lanes=i,e;case Rh:return ra(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ph:s=10;break e;case bh:s=9;break e;case Xu:s=11;break e;case Zu:s=14;break e;case Ut:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=qe(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function _n(e,t,n,r){return e=qe(7,e,r,t),e.lanes=n,e}function ra(e,t,n,r){return e=qe(22,e,r,t),e.elementType=Rh,e.lanes=n,e.stateNode={isHidden:!1},e}function Ha(e,t,n){return e=qe(6,e,null,t),e.lanes=n,e}function Qa(e,t,n){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oa(0),this.expirationTimes=Oa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oa(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Dc(e,t,n,r,o,i,s,a,l){return e=new cS(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qe(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vc(i),e}function fS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kg)}catch(e){console.error(e)}}kg(),Eh.exports=ze;var Fc=Eh.exports,_g,Hd=Fc;_g=Hd.createRoot,Hd.hydrateRoot;var ru={exports:{}},Tn={},Og={exports:{}},gS="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vS=gS,yS=vS;function Pg(){}function bg(){}bg.resetWarningCache=Pg;var wS=function(){function e(r,o,i,s,a,l){if(l!==yS){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:bg,resetWarningCache:Pg};return n.PropTypes=n,n};Og.exports=wS();var Uc=Og.exports;const ee=Vs(Uc);var ou={exports:{}},ft={},iu={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*! + * Adapted from jQuery UI core + * + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(d,f){return f.getPropertyValue("overflow")!=="visible"||d.scrollWidth<=0&&d.scrollHeight<=0}function s(d){var f=d.offsetWidth<=0&&d.offsetHeight<=0;if(f&&!d.innerHTML)return!0;try{var g=window.getComputedStyle(d),y=g.getPropertyValue("display");return f?y!==r&&i(d,g):y===n}catch{return console.warn("Failed to inspect element style"),!1}}function a(d){for(var f=d,g=d.getRootNode&&d.getRootNode();f&&f!==document.body;){if(g&&f===g&&(f=g.host.parentNode),s(f))return!1;f=f.parentNode}return!0}function l(d,f){var g=d.nodeName.toLowerCase(),y=o.test(g)&&!d.disabled||g==="a"&&d.href||f;return y&&a(d)}function u(d){var f=d.getAttribute("tabindex");f===null&&(f=void 0);var g=isNaN(f);return(g||f>=0)&&l(d,!g)}function c(d){var f=[].slice.call(d.querySelectorAll("*"),0).reduce(function(g,y){return g.concat(y.shadowRoot?c(y.shadowRoot):[y])},[]);return f.filter(u)}e.exports=t.default})(iu,iu.exports);var Rg=iu.exports;Object.defineProperty(ft,"__esModule",{value:!0});ft.resetState=CS;ft.log=kS;ft.handleBlur=bo;ft.handleFocus=Ro;ft.markForFocusLater=_S;ft.returnFocus=OS;ft.popWithoutFocus=PS;ft.setupScopedFocus=bS;ft.teardownScopedFocus=RS;var SS=Rg,xS=ES(SS);function ES(e){return e&&e.__esModule?e:{default:e}}var Sr=[],rr=null,su=!1;function CS(){Sr=[]}function kS(){}function bo(){su=!0}function Ro(){if(su){if(su=!1,!rr)return;setTimeout(function(){if(!rr.contains(document.activeElement)){var e=(0,xS.default)(rr)[0]||rr;e.focus()}},0)}}function _S(){Sr.push(document.activeElement)}function OS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{Sr.length!==0&&(t=Sr.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function PS(){Sr.length>0&&Sr.pop()}function bS(e){rr=e,window.addEventListener?(window.addEventListener("blur",bo,!1),document.addEventListener("focus",Ro,!0)):(window.attachEvent("onBlur",bo),document.attachEvent("onFocus",Ro))}function RS(){rr=null,window.addEventListener?(window.removeEventListener("blur",bo),document.removeEventListener("focus",Ro)):(window.detachEvent("onBlur",bo),document.detachEvent("onFocus",Ro))}var au={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=Rg,r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return a.activeElement.shadowRoot?i(a.activeElement.shadowRoot):a.activeElement}function s(a,l){var u=(0,r.default)(a);if(!u.length){l.preventDefault();return}var c=void 0,d=l.shiftKey,f=u[0],g=u[u.length-1],y=i();if(a===y){if(!d)return;c=g}if(g===y&&!d&&(c=f),f===y&&d&&(c=g),c){l.preventDefault(),c.focus();return}var w=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),k=w!=null&&w[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(k){var m=u.indexOf(y);if(m>-1&&(m+=d?-1:1),c=u[m],typeof c>"u"){l.preventDefault(),c=d?g:f,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(au,au.exports);var LS=au.exports,dt={},NS=function(){},TS=NS,ut={},Lg={exports:{}};/*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. +*/(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(Lg);var IS=Lg.exports;Object.defineProperty(ut,"__esModule",{value:!0});ut.canUseDOM=ut.SafeNodeList=ut.SafeHTMLCollection=void 0;var DS=IS,MS=jS(DS);function jS(e){return e&&e.__esModule?e:{default:e}}var la=MS.default,AS=la.canUseDOM?window.HTMLElement:{};ut.SafeHTMLCollection=la.canUseDOM?window.HTMLCollection:{};ut.SafeNodeList=la.canUseDOM?window.NodeList:{};ut.canUseDOM=la.canUseDOM;ut.default=AS;Object.defineProperty(dt,"__esModule",{value:!0});dt.resetState=BS;dt.log=WS;dt.assertNodeList=Ng;dt.setElement=VS;dt.validateElement=$c;dt.hide=HS;dt.show=QS;dt.documentNotReadyOrSSRTesting=KS;var FS=TS,US=zS(FS),$S=ut;function zS(e){return e&&e.__esModule?e:{default:e}}var He=null;function BS(){He&&(He.removeAttribute?He.removeAttribute("aria-hidden"):He.length!=null?He.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(He).forEach(function(e){return e.removeAttribute("aria-hidden")})),He=null}function WS(){}function Ng(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function VS(e){var t=e;if(typeof t=="string"&&$S.canUseDOM){var n=document.querySelectorAll(t);Ng(n,t),t=n}return He=t||He,He}function $c(e){var t=e||He;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,US.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function HS(e){var t=!0,n=!1,r=void 0;try{for(var o=$c(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function QS(e){var t=!0,n=!1,r=void 0;try{for(var o=$c(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function KS(){He=null}var br={};Object.defineProperty(br,"__esModule",{value:!0});br.resetState=qS;br.log=GS;var so={},ao={};function Qd(e,t){e.classList.remove(t)}function qS(){var e=document.getElementsByTagName("html")[0];for(var t in so)Qd(e,so[t]);var n=document.body;for(var r in ao)Qd(n,ao[r]);so={},ao={}}function GS(){}var YS=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},JS=function(t,n){return t[n]&&(t[n]-=1),n},XS=function(t,n,r){r.forEach(function(o){YS(n,o),t.add(o)})},ZS=function(t,n,r){r.forEach(function(o){JS(n,o),n[o]===0&&t.remove(o)})};br.add=function(t,n){return XS(t.classList,t.nodeName.toLowerCase()=="html"?so:ao,n.split(" "))};br.remove=function(t,n){return ZS(t.classList,t.nodeName.toLowerCase()=="html"?so:ao,n.split(" "))};var Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.log=tx;Rr.resetState=nx;function ex(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Tg=function e(){var t=this;ex(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},bs=new Tg;function tx(){console.log("portalOpenInstances ----------"),console.log(bs.openInstances.length),bs.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function nx(){bs=new Tg}Rr.default=bs;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});zc.resetState=sx;zc.log=ax;var rx=Rr,ox=ix(rx);function ix(e){return e&&e.__esModule?e:{default:e}}var Se=void 0,nt=void 0,On=[];function sx(){for(var e=[Se,nt],t=0;t0?(document.body.firstChild!==Se&&document.body.insertBefore(Se,document.body.firstChild),document.body.lastChild!==nt&&document.body.appendChild(nt)):(Se.parentElement&&Se.parentElement.removeChild(Se),nt.parentElement&&nt.parentElement.removeChild(nt))}ox.default.subscribe(lx);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(N){for(var T=1;T0&&(A-=1,A===0&&g.show(M)),C.props.shouldFocusAfterRender&&(C.props.shouldReturnFocusAfterClose?(u.returnFocus(C.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),C.props.onAfterClose&&C.props.onAfterClose(),h.default.deregister(C)},C.open=function(){C.beforeOpen(),C.state.afterOpen&&C.state.beforeClose?(clearTimeout(C.closeTimer),C.setState({beforeClose:!1})):(C.props.shouldFocusAfterRender&&(u.setupScopedFocus(C.node),u.markForFocusLater()),C.setState({isOpen:!0},function(){C.openAnimationFrame=requestAnimationFrame(function(){C.setState({afterOpen:!0}),C.props.isOpen&&C.props.onAfterOpen&&C.props.onAfterOpen({overlayEl:C.overlay,contentEl:C.content})})}))},C.close=function(){C.props.closeTimeoutMS>0?C.closeWithTimeout():C.closeWithoutTimeout()},C.focusContent=function(){return C.content&&!C.contentHasFocus()&&C.content.focus({preventScroll:!0})},C.closeWithTimeout=function(){var _=Date.now()+C.props.closeTimeoutMS;C.setState({beforeClose:!0,closesAt:_},function(){C.closeTimer=setTimeout(C.closeWithoutTimeout,C.state.closesAt-Date.now())})},C.closeWithoutTimeout=function(){C.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},C.afterClose)},C.handleKeyDown=function(_){L(_)&&(0,d.default)(C.content,_),C.props.shouldCloseOnEsc&&D(_)&&(_.stopPropagation(),C.requestClose(_))},C.handleOverlayOnClick=function(_){C.shouldClose===null&&(C.shouldClose=!0),C.shouldClose&&C.props.shouldCloseOnOverlayClick&&(C.ownerHandlesClose()?C.requestClose(_):C.focusContent()),C.shouldClose=null},C.handleContentOnMouseUp=function(){C.shouldClose=!1},C.handleOverlayOnMouseDown=function(_){!C.props.shouldCloseOnOverlayClick&&_.target==C.overlay&&_.preventDefault()},C.handleContentOnClick=function(){C.shouldClose=!1},C.handleContentOnMouseDown=function(){C.shouldClose=!1},C.requestClose=function(_){return C.ownerHandlesClose()&&C.props.onRequestClose(_)},C.ownerHandlesClose=function(){return C.props.onRequestClose},C.shouldBeClosed=function(){return!C.state.isOpen&&!C.state.beforeClose},C.contentHasFocus=function(){return document.activeElement===C.content||C.content.contains(document.activeElement)},C.buildClassName=function(_,M){var $=(typeof M>"u"?"undefined":r(M))==="object"?M:{base:R[_],afterOpen:R[_]+"--after-open",beforeClose:R[_]+"--before-close"},B=$.base;return C.state.afterOpen&&(B=B+" "+$.afterOpen),C.state.beforeClose&&(B=B+" "+$.beforeClose),typeof M=="string"&&M?B+" "+M:B},C.attributesFromObject=function(_,M){return Object.keys(M).reduce(function($,B){return $[_+"-"+B]=M[B],$},{})},C.state={afterOpen:!1,beforeClose:!1},C.shouldClose=null,C.moveFromContentToOverlay=null,C}return o(T,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(C,_){this.props.isOpen&&!C.isOpen?this.open():!this.props.isOpen&&C.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!_.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var C=this.props,_=C.appElement,M=C.ariaHideApp,$=C.htmlOpenClassName,B=C.bodyOpenClassName,q=C.parentSelector,be=q&&q().ownerDocument||document;B&&w.add(be.body,B),$&&w.add(be.getElementsByTagName("html")[0],$),M&&(A+=1,g.hide(_)),h.default.register(this)}},{key:"render",value:function(){var C=this.props,_=C.id,M=C.className,$=C.overlayClassName,B=C.defaultStyles,q=C.children,be=M?{}:B.content,Re=$?{}:B.overlay;if(this.shouldBeClosed())return null;var mn={ref:this.setOverlayRef,className:this.buildClassName("overlay",$),style:n({},Re,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},Ze=n({id:_,ref:this.setContentRef,style:n({},be,this.props.style.content),className:this.buildClassName("content",M),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),Q=this.props.contentElement(Ze,q);return this.props.overlayElement(mn,Q)}}]),T}(i.Component);j.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},j.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(m.default),a.default.instanceOf(k.SafeHTMLCollection),a.default.instanceOf(k.SafeNodeList),a.default.arrayOf(a.default.instanceOf(m.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=j,e.exports=t.default})(ou,ou.exports);var ux=ou.exports;function Ig(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Dg(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function Mg(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}Ig.__suppressDeprecationWarning=!0;Dg.__suppressDeprecationWarning=!0;Mg.__suppressDeprecationWarning=!0;function cx(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,s=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. + +`+i+" uses "+s+" but also contains the following legacy lifecycles:"+(n!==null?` + `+n:"")+(r!==null?` + `+r:"")+(o!==null?` + `+o:"")+` + +The above lifecycles should be removed. Learn more about this warning here: +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=Ig,t.componentWillReceiveProps=Dg),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=Mg;var a=t.componentDidUpdate;t.componentDidUpdate=function(u,c,d){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:d;a.call(this,u,c,f)}}return e}const fx=Object.freeze(Object.defineProperty({__proto__:null,polyfill:cx},Symbol.toStringTag,{value:"Module"})),dx=Wy(fx);Object.defineProperty(Tn,"__esModule",{value:!0});Tn.bodyOpenClassName=Tn.portalClassName=void 0;var qd=Object.assign||function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Lo=typeof window>"u"||"Deno"in window;function Ve(){}function Ox(e,t){return typeof e=="function"?e(t):e}function lu(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fg(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gr(e,t,n){return Ko(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Jb(e,t,n){return Ko(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function zt(e,t,n){return Ko(e)?[{...t,queryKey:e},n]:[e||{},t]}function ep(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(Ko(s)){if(r){if(t.queryHash!==Bc(s,t.options))return!1}else if(!Ns(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function tp(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(Ko(i)){if(!t.options.mutationKey)return!1;if(n){if(Cn(t.options.mutationKey)!==Cn(i))return!1}else if(!Ns(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Bc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cn)(e)}function Cn(e){return JSON.stringify(e,(t,n)=>cu(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Ns(e,t){return Ug(e,t)}function Ug(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ug(e[n],t[n])):!1}function $g(e,t){if(e===t)return e;const n=np(e)&&np(t);if(n||cu(e)&&cu(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!rp(n)||!n.hasOwnProperty("isPrototypeOf"))}function rp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ko(e){return Array.isArray(e)}function zg(e){return new Promise(t=>{setTimeout(t,e)})}function op(e){zg(0).then(e)}function Px(){if(typeof AbortController=="function")return new AbortController}function fu(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?$g(e,t):t}class bx extends Qo{constructor(){super(),this.setup=t=>{if(!Lo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ts=new bx,ip=["online","offline"];class Rx extends Qo{constructor(){super(),this.setup=t=>{if(!Lo&&window.addEventListener){const n=()=>t();return ip.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{ip.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Is=new Rx;function Lx(e){return Math.min(1e3*2**e,3e4)}function ua(e){return(e??"online")==="online"?Is.isOnline():!0}class Bg{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function qi(e){return e instanceof Bg}function Wg(e){let t=!1,n=0,r=!1,o,i,s;const a=new Promise((k,m)=>{i=k,s=m}),l=k=>{r||(g(new Bg(k)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},d=()=>!Ts.isFocused()||e.networkMode!=="always"&&!Is.isOnline(),f=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),o==null||o(),i(k))},g=k=>{r||(r=!0,e.onError==null||e.onError(k),o==null||o(),s(k))},y=()=>new Promise(k=>{o=m=>{const p=r||!d();return p&&k(m),p},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),w=()=>{if(r)return;let k;try{k=e.fn()}catch(m){k=Promise.reject(m)}Promise.resolve(k).then(f).catch(m=>{var p,h;if(r)return;const E=(p=e.retry)!=null?p:3,b=(h=e.retryDelay)!=null?h:Lx,O=typeof b=="function"?b(n,m):b,P=E===!0||typeof E=="number"&&n{if(d())return y()}).then(()=>{t?g(m):w()})})};return ua(e.networkMode)?w():y().then(w),{promise:a,cancel:l,continue:()=>(o==null?void 0:o())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}const Wc=console;function Nx(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let d;t++;try{d=c()}finally{t--,t||a()}return d},i=c=>{t?e.push(c):op(()=>{n(c)})},s=c=>(...d)=>{i(()=>{c(...d)})},a=()=>{const c=e;e=[],c.length&&op(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:s,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const ae=Nx();class Vg{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lu(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Lo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Tx extends Vg{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Wc,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Ix(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=fu(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Fg(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}const s=Px(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};l(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=g=>{if(qi(g)&&g.silent||this.dispatch({type:"error",error:g}),!qi(g)){var y,w,k,m;(y=(w=this.cache.config).onError)==null||y.call(w,g,this),(k=(m=this.cache.config).onSettled)==null||k.call(m,this.state.data,g,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Wg({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:g=>{var y,w,k,m;if(typeof g>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(g),(y=(w=this.cache.config).onSuccess)==null||y.call(w,g,this),(k=(m=this.cache.config).onSettled)==null||k.call(m,g,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(g,y)=>{this.dispatch({type:"failed",failureCount:g,error:y})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:ua(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return qi(s)&&s.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Ix(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Hg extends Qo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,s=(o=n.queryHash)!=null?o:Bc(i,n);let a=this.get(s);return a||(a=new Tx({cache:this,logger:t.getLogger(),queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ae.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=zt(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>ep(r,o))}findAll(t,n){const[r]=zt(t,n);return Object.keys(r).length>0?this.queries.filter(o=>ep(r,o)):this.queries}notify(t){ae.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){ae.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ae.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Dx extends Vg{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Wc,this.observers=[],this.state=t.state||Mx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var P;return this.retryer=Wg({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(x,R)=>{this.dispatch({type:"failed",failureCount:x,error:R})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(P=this.options.retry)!=null?P:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,s,a,l,u,c;if(!n){var d,f,g,y;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const x=await((g=(y=this.options).onMutate)==null?void 0:g.call(y,this.state.variables));x!==this.state.context&&this.dispatch({type:"loading",context:x,variables:this.state.variables})}const P=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,P,this.state.variables,this.state.context,this)),await((i=(s=this.options).onSuccess)==null?void 0:i.call(s,P,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,P,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,P,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:P}),P}catch(P){try{var w,k,m,p,h,E,b,O;throw await((w=(k=this.mutationCache.config).onError)==null?void 0:w.call(k,P,this.state.variables,this.state.context,this)),await((m=(p=this.options).onError)==null?void 0:m.call(p,P,this.state.variables,this.state.context)),await((h=(E=this.mutationCache.config).onSettled)==null?void 0:h.call(E,void 0,P,this.state.variables,this.state.context,this)),await((b=(O=this.options).onSettled)==null?void 0:b.call(O,void 0,P,this.state.variables,this.state.context)),P}finally{this.dispatch({type:"error",error:P})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!ua(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function Mx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class jx extends Qo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new Dx({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){ae.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>tp(t,n))}findAll(t){return this.mutations.filter(n=>tp(t,n))}notify(t){ae.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return ae.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(Ve)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Ax(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",d=(l==null?void 0:l.direction)==="backward",f=((i=e.state.data)==null?void 0:i.pages)||[],g=((s=e.state.data)==null?void 0:s.pageParams)||[];let y=g,w=!1;const k=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var P;if((P=e.signal)!=null&&P.aborted)w=!0;else{var x;(x=e.signal)==null||x.addEventListener("abort",()=>{w=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),p=(O,P,x,R)=>(y=R?[P,...y]:[...y,P],R?[x,...O]:[...O,x]),h=(O,P,x,R)=>{if(w)return Promise.reject("Cancelled");if(typeof x>"u"&&!P&&O.length)return Promise.resolve(O);const L={queryKey:e.queryKey,pageParam:x,meta:e.options.meta};k(L);const D=m(L);return Promise.resolve(D).then(j=>p(O,x,j,R))};let E;if(!f.length)E=h([]);else if(c){const O=typeof u<"u",P=O?u:sp(e.options,f);E=h(f,O,P)}else if(d){const O=typeof u<"u",P=O?u:Fx(e.options,f);E=h(f,O,P,!0)}else{y=[];const O=typeof e.options.getNextPageParam>"u";E=(a&&f[0]?a(f[0],0,f):!0)?h([],O,g[0]):Promise.resolve(p([],g[0],f[0]));for(let x=1;x{if(a&&f[x]?a(f[x],x,f):!0){const D=O?g[x]:sp(e.options,R);return h(R,O,D)}return Promise.resolve(p(R,g[x],f[x]))})}return E.then(O=>({pages:O,pageParams:y}))}}}}function sp(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Fx(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Ux{constructor(t={}){this.queryCache=t.queryCache||new Hg,this.mutationCache=t.mutationCache||new jx,this.logger=t.logger||Wc,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ts.subscribe(()=>{Ts.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Is.subscribe(()=>{Is.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=zt(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Gr(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,s=Ox(n,i);if(typeof s>"u")return;const a=Gr(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return ae.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=zt(t,n),o=this.queryCache;ae.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=zt(t,n,r),s=this.queryCache,a={type:"active",...o};return ae.batch(()=>(s.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(t,n,r){const[o,i={}]=zt(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const s=ae.batch(()=>this.queryCache.findAll(o).map(a=>a.cancel(i)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(t,n,r){const[o,i]=zt(t,n,r);return ae.batch(()=>{var s,a;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const l={...o,type:(s=(a=o.refetchType)!=null?a:o.type)!=null?s:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=zt(t,n,r),s=ae.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let a=Promise.all(s).then(Ve);return i!=null&&i.throwOnError||(a=a.catch(Ve)),a}fetchQuery(t,n,r){const o=Gr(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ve).catch(Ve)}fetchInfiniteQuery(t,n,r){const o=Gr(t,n,r);return o.behavior=Ax(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ve).catch(Ve)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Cn(t)===Cn(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Ns(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Cn(t)===Cn(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Ns(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Bc(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class $x extends Qo{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),ap(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return du(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return du(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),uu(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&lp(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return Bx(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ve)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Lo||this.currentResult.isStale||!lu(this.options.staleTime))return;const n=Fg(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Lo||this.options.enabled===!1||!lu(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ts.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:f,error:g,errorUpdatedAt:y,fetchStatus:w,status:k}=d,m=!1,p=!1,h;if(n._optimisticResults){const x=this.hasListeners(),R=!x&&ap(t,n),L=x&&lp(t,r,n,o);(R||L)&&(w=ua(t.options.networkMode)?"fetching":"paused",f||(k="loading")),n._optimisticResults==="isRestoring"&&(w="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&k!=="error")h=c.data,f=c.dataUpdatedAt,k=c.status,m=!0;else if(n.select&&typeof d.data<"u")if(i&&d.data===(s==null?void 0:s.data)&&n.select===this.selectFn)h=this.selectResult;else try{this.selectFn=n.select,h=n.select(d.data),h=fu(i==null?void 0:i.data,h,n),this.selectResult=h,this.selectError=null}catch(x){this.selectError=x}else h=d.data;if(typeof n.placeholderData<"u"&&typeof h>"u"&&k==="loading"){let x;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))x=i.data;else if(x=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof x<"u")try{x=n.select(x),this.selectError=null}catch(R){this.selectError=R}typeof x<"u"&&(k="success",h=fu(i==null?void 0:i.data,x,n),p=!0)}this.selectError&&(g=this.selectError,h=this.selectResult,y=Date.now(),k="error");const E=w==="fetching",b=k==="loading",O=k==="error";return{status:k,fetchStatus:w,isLoading:b,isSuccess:k==="success",isError:O,isInitialLoading:b&&E,data:h,dataUpdatedAt:f,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:E,isRefetching:E&&!b,isLoadingError:O&&d.dataUpdatedAt===0,isPaused:w==="paused",isPlaceholderData:p,isPreviousData:m,isRefetchError:O&&d.dataUpdatedAt!==0,isStale:Vc(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,uu(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!qi(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){ae.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var s,a,l,u;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function zx(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ap(e,t){return zx(e,t)||e.state.dataUpdatedAt>0&&du(e,t,t.refetchOnMount)}function du(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Vc(e,t)}return!1}function lp(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Vc(e,n)}function Vc(e,t){return e.isStaleByTime(t.staleTime)}function Bx(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!uu(e.getCurrentResult(),t)}var Qg={exports:{}},Kg={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var xr=v;function Wx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vx=typeof Object.is=="function"?Object.is:Wx,Hx=xr.useState,Qx=xr.useEffect,Kx=xr.useLayoutEffect,qx=xr.useDebugValue;function Gx(e,t){var n=t(),r=Hx({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Kx(function(){o.value=n,o.getSnapshot=t,Ka(o)&&i({inst:o})},[e,n,t]),Qx(function(){return Ka(o)&&i({inst:o}),e(function(){Ka(o)&&i({inst:o})})},[e]),qx(n),n}function Ka(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vx(e,n)}catch{return!0}}function Yx(e,t){return t()}var Jx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Yx:Gx;Kg.useSyncExternalStore=xr.useSyncExternalStore!==void 0?xr.useSyncExternalStore:Jx;Qg.exports=Kg;var Xx=Qg.exports;const Zx=Xx.useSyncExternalStore,up=v.createContext(void 0),qg=v.createContext(!1);function Gg(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=up),window.ReactQueryClientContext):up)}const eE=({context:e}={})=>{const t=v.useContext(Gg(e,v.useContext(qg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tE=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=Gg(n,r);return v.createElement(qg.Provider,{value:!n&&r},v.createElement(o.Provider,{value:e},t))},Yg=v.createContext(!1),nE=()=>v.useContext(Yg);Yg.Provider;function rE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const oE=v.createContext(rE()),iE=()=>v.useContext(oE);function sE(e,t){return typeof e=="function"?e(...t):!!e}const aE=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},lE=e=>{v.useEffect(()=>{e.clearReset()},[e])},uE=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&sE(n,[e.error,r]),cE=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},fE=(e,t)=>e.isLoading&&e.isFetching&&!t,dE=(e,t,n)=>(e==null?void 0:e.suspense)&&fE(t,n),pE=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function hE(e,t){const n=eE({context:e.context}),r=nE(),o=iE(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=ae.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ae.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ae.batchCalls(i.onSettled)),cE(i),aE(i,o),lE(o);const[s]=v.useState(()=>new t(n,i)),a=s.getOptimisticResult(i);if(Zx(v.useCallback(l=>{const u=r?()=>{}:s.subscribe(ae.batchCalls(l));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),v.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),dE(i,a,r))throw pE(i,s,o);if(uE({result:a,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:s.trackResult(a)}function mE(e,t,n){const r=Gr(e,t,n);return hE(r,$x)}function Jg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tn};return typeof e=="function"?r.read=e:(r.init=e,r.read=o=>o(r),r.write=(o,i,s)=>i(r,typeof s=="function"?s(o(r)):s)),t&&(r.write=t),r}const cp=e=>"init"in e,fp=e=>!!e.write,Ds=new WeakMap,vE=(e,t)=>{Ds.set(e,t),e.catch(()=>{}).finally(()=>Ds.delete(e))},dp=(e,t)=>{const n=Ds.get(e);n&&(Ds.delete(e),n(t))},pp=(e,t)=>{e.status="fulfilled",e.value=t},hp=(e,t)=>{e.status="rejected",e.reason=t},yE=e=>typeof(e==null?void 0:e.then)=="function",Pi=(e,t)=>"v"in e&&"v"in t&&Object.is(e.v,t.v),mp=(e,t)=>"e"in e&&"e"in t&&Object.is(e.e,t.e),Vr=e=>"v"in e&&e.v instanceof Promise,wE=(e,t)=>"v"in e&&"v"in t&&e.v.orig&&e.v.orig===t.v.orig,bi=e=>{if("e"in e)throw e.e;return e.v},SE=()=>{const e=new WeakMap,t=new WeakMap,n=new Map;let r,o;const i=x=>e.get(x),s=(x,R)=>{const L=e.get(x);if(e.set(x,R),n.has(x)||n.set(x,L),L&&Vr(L)){const D="v"in R?R.v instanceof Promise?R.v:Promise.resolve(R.v):Promise.reject(R.e);dp(L.v,D)}},a=(x,R,L)=>{const D=new Map;let A=!1;L.forEach((j,N)=>{!j&&N===x&&(j=R),j&&(D.set(N,j),R.d.get(N)!==j&&(A=!0))}),(A||R.d.size!==D.size)&&(R.d=D)},l=(x,R,L)=>{const D=i(x),A={d:(D==null?void 0:D.d)||new Map,v:R};if(L&&a(x,A,L),D&&Pi(D,A)&&D.d===A.d)return D;if(D&&Vr(D)&&Vr(A)&&wE(D,A)){if(D.d===A.d)return D;A.v=D.v}return s(x,A),A},u=(x,R,L,D)=>{if(yE(R)){let A;const j=new Promise((N,T)=>{let F=!1;R.then(C=>{if(!F){F=!0;const _=i(x),M=l(x,j,L);pp(j,C),N(C),t.has(x)&&(_==null?void 0:_.d)!==M.d&&b(x,M,_==null?void 0:_.d)}},C=>{if(!F){F=!0;const _=i(x),M=l(x,j,L);hp(j,C),T(C),t.has(x)&&(_==null?void 0:_.d)!==M.d&&b(x,M,_==null?void 0:_.d)}}),A=C=>{F||(F=!0,C.then(_=>pp(j,_),_=>hp(j,_)),N(C))}});return j.orig=R,j.status="pending",vE(j,N=>{N&&A(N),D==null||D()}),l(x,j,L)}return l(x,R,L)},c=(x,R,L)=>{const D=i(x),A={d:(D==null?void 0:D.d)||new Map,e:R};return L&&a(x,A,L),D&&mp(D,A)&&D.d===A.d?D:(s(x,A),A)},d=(x,R)=>{const L=i(x);if(!R&&L&&(t.has(x)||Array.from(L.d).every(([C,_])=>C===x||d(C)===_)))return L;const D=new Map;let A=!0;const j=C=>{if(C===x){const M=i(C);if(M)return D.set(C,M),bi(M);if(cp(C))return D.set(C,void 0),C.init;throw new Error("no atom init")}const _=d(C);return D.set(C,_),bi(_)};let N,T;const F={get signal(){return N||(N=new AbortController),N.signal},get setSelf(){return!T&&fp(x)&&(T=(...C)=>{if(!A)return p(x,...C)}),T}};try{const C=x.read(j,F);return u(x,C,D,()=>N==null?void 0:N.abort())}catch(C){return c(x,C,D)}finally{A=!1}},f=x=>bi(d(x)),g=x=>{let R=t.get(x);return R||(R=h(x)),R},y=(x,R)=>!R.l.size&&(!R.t.size||R.t.size===1&&R.t.has(x)),w=x=>{const R=t.get(x);R&&y(x,R)&&E(x)},k=x=>{const R=new Map,L=new WeakMap,D=N=>{var T;const F=new Set((T=t.get(N))==null?void 0:T.t);return n.forEach((C,_)=>{var M;(M=i(_))!=null&&M.d.has(N)&&F.add(_)}),F},A=N=>{D(N).forEach(T=>{T!==N&&(R.set(T,(R.get(T)||new Set).add(N)),L.set(T,(L.get(T)||0)+1),A(T))})};A(x);const j=N=>{D(N).forEach(T=>{var F;if(T!==N){let C=L.get(T);if(C&&L.set(T,--C),!C){let _=!!((F=R.get(T))!=null&&F.size);if(_){const M=i(T),$=d(T,!0);_=!M||!Pi(M,$)}_||R.forEach(M=>M.delete(T))}j(T)}})};j(x)},m=(x,...R)=>{let L=!0;const D=N=>bi(d(N)),A=(N,...T)=>{let F;if(N===x){if(!cp(N))throw new Error("atom not writable");const C=i(N),_=u(N,T[0]);(!C||!Pi(C,_))&&k(N)}else F=m(N,...T);if(!L){const C=O()}return F},j=x.write(D,A,...R);return L=!1,j},p=(x,...R)=>{const L=m(x,...R),D=O();return L},h=(x,R,L)=>{var D;const A=L||[];(D=i(x))==null||D.d.forEach((N,T)=>{const F=t.get(T);F?F.t.add(x):T!==x&&h(T,x,A)}),d(x);const j={t:new Set(R&&[R]),l:new Set};if(t.set(x,j),fp(x)&&x.onMount){const{onMount:N}=x;A.push(()=>{const T=N((...F)=>p(x,...F));T&&(j.u=T)})}return L||A.forEach(N=>N()),j},E=x=>{var R;const L=(R=t.get(x))==null?void 0:R.u;L&&L(),t.delete(x);const D=i(x);D&&(Vr(D)&&dp(D.v),D.d.forEach((A,j)=>{if(j!==x){const N=t.get(j);N&&(N.t.delete(x),y(j,N)&&E(j))}}))},b=(x,R,L)=>{const D=new Set(R.d.keys());L==null||L.forEach((A,j)=>{if(D.has(j)){D.delete(j);return}const N=t.get(j);N&&(N.t.delete(x),y(j,N)&&E(j))}),D.forEach(A=>{const j=t.get(A);j?j.t.add(x):t.has(x)&&h(A,x)})},O=()=>{let x;for(;n.size;){const R=Array.from(n);n.clear(),R.forEach(([L,D])=>{const A=i(L);if(A){const j=t.get(L);j&&A.d!==(D==null?void 0:D.d)&&b(L,A,D==null?void 0:D.d),j&&!(D&&!Vr(D)&&(Pi(D,A)||mp(D,A)))&&j.l.forEach(N=>N())}})}};return{get:f,set:p,sub:(x,R)=>{const L=g(x),D=O(),A=L.l;return A.add(R),()=>{A.delete(R),w(x)}}}};let qa;const xE=()=>(qa||(qa=SE()),qa),EE=v.createContext(void 0),Xg=e=>{const t=v.useContext(EE);return(e==null?void 0:e.store)||t||xE()},CE=e=>typeof(e==null?void 0:e.then)=="function",kE=W.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)});function _E(e,t){const n=Xg(t),[[r,o,i],s]=v.useReducer(u=>{const c=n.get(e);return Object.is(u[0],c)&&u[1]===n&&u[2]===e?u:[c,n,e]},void 0,()=>[n.get(e),n,e]);let a=r;(o!==n||i!==e)&&(s(),a=n.get(e));const l=t==null?void 0:t.delay;return v.useEffect(()=>{const u=n.sub(e,()=>{if(typeof l=="number"){setTimeout(s,l);return}s()});return s(),u},[n,e,l]),v.useDebugValue(a),CE(a)?kE(a):a}function OE(e,t){const n=Xg(t);return v.useCallback((...o)=>n.set(e,...o),[n,e])}function PE(e,t){return[_E(e,t),OE(e,t)]}/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ca(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function RE(){return Math.random().toString(36).substr(2,8)}function vp(e,t){return{usr:e.state,key:e.key,idx:t}}function hu(e,t,n,r){return n===void 0&&(n=null),No({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?An(t):t,{state:n,key:t&&t.key||r||RE()})}function Ms(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function An(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function LE(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Gt.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(No({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Gt.Pop;let k=c(),m=k==null?null:k-u;u=k,l&&l({action:a,location:w.location,delta:m})}function f(k,m){a=Gt.Push;let p=hu(w.location,k,m);n&&n(p,k),u=c()+1;let h=vp(p,u),E=w.createHref(p);try{s.pushState(h,"",E)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;o.location.assign(E)}i&&l&&l({action:a,location:w.location,delta:1})}function g(k,m){a=Gt.Replace;let p=hu(w.location,k,m);n&&n(p,k),u=c();let h=vp(p,u),E=w.createHref(p);s.replaceState(h,"",E),i&&l&&l({action:a,location:w.location,delta:0})}function y(k){let m=o.location.origin!=="null"?o.location.origin:o.location.href,p=typeof k=="string"?k:Ms(k);return ge(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let w={get action(){return a},get location(){return e(o,s)},listen(k){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(gp,d),l=k,()=>{o.removeEventListener(gp,d),l=null}},createHref(k){return t(o,k)},createURL:y,encodeLocation(k){let m=y(k);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:g,go(k){return s.go(k)}};return w}var yp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yp||(yp={}));function NE(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?An(t):t,o=Hc(r.pathname||"/",n);if(o==null)return null;let i=Zg(e);TE(i);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(ge(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=sn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(ge(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Zg(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:UE(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of ev(i.path))o(i,s,l)}),t}function ev(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=ev(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function TE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$E(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const IE=/^:\w+$/,DE=3,ME=2,jE=1,AE=10,FE=-2,wp=e=>e==="*";function UE(e,t){let n=e.split("/"),r=n.length;return n.some(wp)&&(r+=FE),t&&(r+=ME),n.filter(o=>!wp(o)).reduce((o,i)=>o+(IE.test(i)?DE:i===""?jE:AE),r)}function $E(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function zE(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let f=a[d]||"";s=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=HE(a[d]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function WE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ca(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function VE(e){try{return decodeURI(e)}catch(t){return ca(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function HE(e,t){try{return decodeURIComponent(e)}catch(n){return ca(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Hc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function QE(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?An(e):e;return{pathname:n?n.startsWith("/")?n:KE(n,t):t,search:GE(r),hash:YE(o)}}function KE(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ga(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function tv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nv(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=An(e):(o=No({},e),ge(!o.pathname||!o.pathname.includes("?"),Ga("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Ga("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Ga("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=QE(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const sn=e=>e.join("/").replace(/\/\/+/g,"/"),qE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),GE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function JE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const rv=["post","put","patch","delete"];new Set(rv);const XE=["get",...rv];new Set(XE);/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=v.useRef(!1);return iv(()=>{s.current=!0}),v.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=nv(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:sn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function sv(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=v.useContext(Fn),{pathname:o}=Go(),i=JSON.stringify(tv(r).map(s=>s.pathnameBase));return v.useMemo(()=>nv(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function av(e,t){return r2(e,t)}function r2(e,t,n){qo()||ge(!1);let{navigator:r}=v.useContext(Lr),{matches:o}=v.useContext(Fn),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=Go(),u;if(t){var c;let w=typeof t=="string"?An(t):t;a==="/"||(c=w.pathname)!=null&&c.startsWith(a)||ge(!1),u=w}else u=l;let d=u.pathname||"/",f=a==="/"?d:d.slice(a.length)||"/",g=NE(e,{pathname:f}),y=l2(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:sn([a,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:sn([a,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?v.createElement(fa.Provider,{value:{location:js({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Gt.Pop}},y):y}function o2(){let e=d2(),t=JE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}const i2=v.createElement(o2,null);class s2 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?v.createElement(Fn.Provider,{value:this.props.routeContext},v.createElement(ov.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function a2(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(Qc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Fn.Provider,{value:t},r)}function l2(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||ge(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||i2);let f=t.concat(i.slice(0,u+1)),g=()=>{let y;return c?y=d:l.route.Component?y=v.createElement(l.route.Component,null):l.route.element?y=l.route.element:y=a,v.createElement(a2,{match:l,routeContext:{outlet:a,matches:f,isDataRoute:n!=null},children:y})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?v.createElement(s2,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):g()},null)}var lv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lv||{}),As=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(As||{});function u2(e){let t=v.useContext(Qc);return t||ge(!1),t}function c2(e){let t=v.useContext(ZE);return t||ge(!1),t}function f2(e){let t=v.useContext(Fn);return t||ge(!1),t}function uv(e){let t=f2(),n=t.matches[t.matches.length-1];return n.route.id||ge(!1),n.route.id}function d2(){var e;let t=v.useContext(ov),n=c2(As.UseRouteError),r=uv(As.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function p2(){let{router:e}=u2(lv.UseNavigateStable),t=uv(As.UseNavigateStable),n=v.useRef(!1);return iv(()=>{n.current=!0}),v.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,js({fromRouteId:t},i)))},[e,t])}function h2(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Gt.Pop,navigator:i,static:s=!1}=e;qo()&&ge(!1);let a=t.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=An(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:g="default"}=r,y=v.useMemo(()=>{let w=Hc(u,a);return w==null?null:{location:{pathname:w,search:c,hash:d,state:f,key:g},navigationType:o}},[a,u,c,d,f,g,o]);return y==null?null:v.createElement(Lr.Provider,{value:l},v.createElement(fa.Provider,{children:n,value:y}))}new Promise(()=>{});/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function g2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function v2(e,t){return e.button===0&&(!t||t==="_self")&&!g2(e)}const y2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],w2="startTransition",Sp=Et[w2];function S2(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=bE({window:o,v5Compat:!0}));let s=i.current,[a,l]=v.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&Sp?Sp(()=>l(d)):l(d)},[l,u]);return v.useLayoutEffect(()=>s.listen(c),[s,c]),v.createElement(h2,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const x2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cv=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,d=m2(t,y2),{basename:f}=v.useContext(Lr),g,y=!1;if(typeof u=="string"&&E2.test(u)&&(g=u,x2))try{let p=new URL(window.location.href),h=u.startsWith("//")?new URL(p.protocol+u):new URL(u),E=Hc(h.pathname,f);h.origin===p.origin&&E!=null?u=E+h.search+h.hash:y=!0}catch{}let w=e2(u,{relative:o}),k=C2(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o});function m(p){r&&r(p),p.defaultPrevented||k(p)}return v.createElement("a",mu({},d,{href:g||w,onClick:y||i?r:m,ref:n,target:l}))});var xp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(xp||(xp={}));var Ep;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ep||(Ep={}));function C2(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=t2(),l=Go(),u=sv(e,{relative:s});return v.useCallback(c=>{if(v2(c,n)){c.preventDefault();let d=r!==void 0?r:Ms(l)===Ms(u);a(e,{replace:d,state:o,preventScrollReset:i,relative:s})}},[l,a,u,r,o,n,e,i,s])}function gu(){return gu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Kc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=k2(e,["color","size"]);return W.createElement("svg",gu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("polyline",{points:"20 6 9 17 4 12"}))});Kc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Kc.displayName="Check";const O2=Kc;function vu(){return vu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var qc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=P2(e,["color","size"]);return W.createElement("svg",vu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),W.createElement("line",{x1:"1",y1:"1",x2:"23",y2:"23"}))});qc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};qc.displayName="EyeOff";const R2=qc;function yu(){return yu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function N2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Gc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=L2(e,["color","size"]);return W.createElement("svg",yu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),W.createElement("circle",{cx:"12",cy:"12",r:"3"}))});Gc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Gc.displayName="Eye";const T2=Gc;function wu(){return wu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Yc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=I2(e,["color","size"]);return W.createElement("svg",wu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});Yc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Yc.displayName="GitHub";const M2=Yc;function Su(){return Su=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Jc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=j2(e,["color","size"]);return W.createElement("svg",Su({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("circle",{cx:"12",cy:"12",r:"10"}),W.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),W.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});Jc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Jc.displayName="Info";const F2=Jc;function xu(){return xu=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $2(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Xc=v.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=U2(e,["color","size"]);return W.createElement("svg",xu({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Xc.propTypes={color:ee.string,size:ee.oneOfType([ee.string,ee.number])};Xc.displayName="X";const z2=Xc;function B2(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function fv(e){return e.replace(/\/$/,"")}function Xb(e,t){let n=String(e);for(;n.length{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function da(e){const t=e[Ue];return t?t.type_:Array.isArray(e)?1:pa(e)?2:ha(e)?3:0}function Eu(e,t){return da(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vv(e,t,n){const r=da(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Y2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function pa(e){return e instanceof Map}function ha(e){return e instanceof Set}function wn(e){return e.copy_||e.base_}function Cu(e,t){if(pa(e))return new Map(e);if(ha(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&gv(e))return Er(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ue];let r=Reflect.ownKeys(n);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=J2),Object.freeze(e),t&&To(e,(n,r)=>Zc(r,!0))),e}function J2(){st(2)}function ma(e){return Object.isFrozen(e)}var X2={};function Dn(e){const t=X2[e];return t||st(0,e),t}var Io;function yv(){return Io}function Z2(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _p(e,t){t&&(Dn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ku(e){_u(e),e.drafts_.forEach(eC),e.drafts_=null}function _u(e){e===Io&&(Io=e.parent_)}function Op(e){return Io=Z2(Io,e)}function eC(e){const t=e[Ue];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Pp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ue].modified_&&(ku(t),st(4)),In(e)&&(e=Fs(t,e),t.parent_||Us(t,e)),t.patches_&&Dn("Patches").generateReplacementPatches_(n[Ue].base_,e,t.patches_,t.inversePatches_)):e=Fs(t,n,[]),ku(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==mv?e:void 0}function Fs(e,t,n){if(ma(t))return t;const r=t[Ue];if(!r)return To(t,(o,i)=>bp(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Us(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),To(i,(a,l)=>bp(e,r,o,a,l,n,s)),Us(e,o,!1),n&&e.patches_&&Dn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function bp(e,t,n,r,o,i,s){if(Cr(o)){const a=i&&t&&t.type_!==3&&!Eu(t.assigned_,r)?i.concat(r):void 0,l=Fs(e,o,a);if(vv(n,r,l),Cr(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(In(o)&&!ma(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fs(e,o),(!t||!t.scope_.parent_)&&Us(e,o)}}function Us(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Zc(t,n)}function tC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:yv(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=ef;n&&(o=[r],i=Do);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var ef={get(e,t){if(t===Ue)return e;const n=wn(e);if(!Eu(n,t))return nC(e,n,t);const r=n[t];return e.finalized_||!In(r)?r:r===Ya(e.base_,t)?(Ja(e),e.copy_[t]=Pu(r,e)):r},has(e,t){return t in wn(e)},ownKeys(e){return Reflect.ownKeys(wn(e))},set(e,t,n){const r=wv(wn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ya(wn(e),t),i=o==null?void 0:o[Ue];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Y2(n,o)&&(n!==void 0||Eu(e.base_,t)))return!0;Ja(e),Ou(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Ya(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ja(e),Ou(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=wn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){st(11)},getPrototypeOf(e){return Er(e.base_)},setPrototypeOf(){st(12)}},Do={};To(ef,(e,t)=>{Do[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Do.deleteProperty=function(e,t){return Do.set.call(this,e,t,void 0)};Do.set=function(e,t,n){return ef.set.call(this,e[0],t,n,e[0])};function Ya(e,t){const n=e[Ue];return(n?wn(n):e)[t]}function nC(e,t,n){var o;const r=wv(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function wv(e,t){if(!(t in e))return;let n=Er(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Er(n)}}function Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function Ja(e){e.copy_||(e.copy_=Cu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var rC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(l=i,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&st(6),r!==void 0&&typeof r!="function"&&st(7);let o;if(In(t)){const i=Op(this),s=Pu(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?ku(i):_u(i)}return _p(i,r),Pp(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===mv&&(o=void 0),this.autoFreeze_&&Zc(o,!0),r){const i=[],s=[];Dn("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else st(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){In(e)||st(8),Cr(e)&&(e=oC(e));const t=Op(this),n=Pu(e,void 0);return n[Ue].isManual_=!0,_u(t),n}finishDraft(e,t){const n=e&&e[Ue];(!n||!n.isManual_)&&st(9);const{scope_:r}=n;return _p(r,t),Pp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Dn("Patches").applyPatches_;return Cr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Pu(e,t){const n=pa(e)?Dn("MapSet").proxyMap_(e,t):ha(e)?Dn("MapSet").proxySet_(e,t):tC(e,t);return(t?t.scope_:yv()).drafts_.push(n),n}function oC(e){return Cr(e)||st(10,e),Sv(e)}function Sv(e){if(!In(e)||ma(e))return e;const t=e[Ue];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Cu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Cu(e,!0);return To(n,(r,o)=>{vv(n,r,Sv(o))}),t&&(t.finalized_=!1),n}var $e=new rC,iC=$e.produce;$e.produceWithPatches.bind($e);var sC=$e.setAutoFreeze.bind($e);$e.setUseStrictShallowCopy.bind($e);$e.applyPatches.bind($e);$e.createDraft.bind($e);$e.finishDraft.bind($e);sC(!1);const{createContext:tf,memo:aC,useMemo:lC,useRef:uC,useEffect:cC,useCallback:Rp,useContext:bu,useState:fC}=W,xv=tf(null),Ev=tf(null),Cv=tf(null);function dC(){return bu(Cv)}function pC({initialState:e,actions:t={},children:n}){const r=uC(e),[o,i]=fC(e),s=Rp(()=>r.current,[]);cC(()=>{},[s]);const a=Rp((u,c)=>{if(typeof u=="function")return u(a,s);const d=iC(s(),c);d!==r.current&&(r.current=d,i(d))},[s]),l=lC(()=>kv(t,a),[t,a]);return S.jsx(xv.Provider,{value:o,children:S.jsx(Ev.Provider,{value:a,children:S.jsx(Cv.Provider,{value:l,children:n})})})}function hn(e){return t=>{const n=aC(t);function r(o){const i=bu(xv),s=bu(Ev),a=e(i,o),l={dispatch:s,...o,...a};return S.jsx(n,{...l})}return r}}function hC(e,t){return function(...n){return t(e.apply(this,n))}}function kv(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=hC(o,t):typeof o=="object"&&(n[r]=kv(o,t))}return n}const mC=Symbol(),gC=e=>typeof(e==null?void 0:e.then)=="function";function vC(e){let t,n;const r={getItem:(o,i)=>{var s,a;const l=c=>{if(c=c||"",t!==c){try{n=JSON.parse(c)}catch{return i}t=c}return n},u=(a=(s=e())==null?void 0:s.getItem(o))!=null?a:null;return gC(u)?u.then(l):l(u)},setItem:(o,i)=>{var s;return(s=e())==null?void 0:s.setItem(o,JSON.stringify(i))},removeItem:o=>{var i;return(i=e())==null?void 0:i.removeItem(o)}};return typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(r.subscribe=(o,i,s)=>{if(!(e()instanceof window.Storage))return()=>{};const a=l=>{if(l.storageArea===e()&&l.key===o){let u;try{u=JSON.parse(l.newValue||"")}catch{u=s}i(u)}};return window.addEventListener("storage",a),()=>{window.removeEventListener("storage",a)}}),r}const yC=vC(()=>typeof window<"u"?window.localStorage:void 0);function wC(e,t,n=yC,r){const o=r==null?void 0:r.unstable_getOnInit,i=pu(o?n.getItem(e,t):t);return i.onMount=a=>{o||a(n.getItem(e,t));let l;return n.subscribe&&(l=n.subscribe(e,a,t)),l},pu(a=>a(i),(a,l,u)=>{const c=typeof u=="function"?u(a(i)):u;return c===mC?(l(i,t),n.removeItem(e)):c instanceof Promise?c.then(d=>(l(i,d),n.setItem(e,d))):(l(i,c),n.setItem(e,c))})}const _v="PaoPaoGateWay";function SC(){try{const e=localStorage.getItem(_v);return e?JSON.parse(e):void 0}catch{return}}function Un(e){try{const t=JSON.stringify(e);localStorage.setItem(_v,t)}catch{}}const Ov="/configs";async function Pv(e){const{url:t,init:n}=We(e);return await fetch(t+Ov,n)}function xC(e){return"socks-port"in e&&(e["socket-port"]=e["socks-port"]),e}async function EC(e,t){const{url:n,init:r}=We(e),o=JSON.stringify(xC(t));return await fetch(n+Ov,{...r,body:o,method:"PATCH"})}const bv="/traffic",CC=new TextDecoder("utf-8"),Ri=150,Vt={labels:Array(Ri).fill(0),up:Array(Ri),down:Array(Ri),size:Ri,subscribers:[],appendData(e){this.up.shift(),this.down.shift(),this.labels.shift();const t=Date.now();this.up.push(e.up),this.down.push(e.down),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let or=!1,Li="";function Ru(e){Vt.appendData(JSON.parse(e))}function Rv(e){return e.read().then(({done:t,value:n})=>{const r=CC.decode(n,{stream:!t});Li+=r;const o=Li.split(` +`),i=o[o.length-1];for(let s=0;s{r=!0,n.close()},i=()=>{r=!1,Vt.up.fill(void 0),Vt.down.fill(void 0),Vt.labels.fill(0),Lp(e)};return document.addEventListener("freeze",o,{capture:!0,once:!0}),document.addEventListener("resume",i,{capture:!0,once:!0}),n.addEventListener("error",function(s){Ni=3}),n.addEventListener("close",function(s){Ni=3,r||(document.removeEventListener("freeze",o),document.removeEventListener("resume",i),Lp(e))}),n.addEventListener("message",function(s){Ru(s.data)}),Vt}function Lp(e){if(or)return Vt;or=!0;const{url:t,init:n}=We(e);return fetch(t+bv,n).then(r=>{if(r.ok){const o=r.body.getReader();Rv(o)}else or=!1},r=>{console.log("fetch /traffic error",r),or=!1}),Vt}function Np(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}function kC(e){return t=>{t(`closeModal:${e}`,n=>{n.modals[e]=!1})}}const _C={apiConfig:!1},eR=e=>e.configs.configs,OC=e=>e.configs.haveFetchedConfig,tR=e=>e.configs.configs["log-level"];function Lv(e){return async(t,n)=>{let r;try{r=await Pv(e)}catch{t(Np("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(Np("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",s=>{s.configs.configs=o}),OC(n())?nf(e):t(PC())}}function PC(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function nR(e,t){return async n=>{EC(e,t).then(r=>{r.ok===!1&&console.log("Error update configs",r.statusText)},r=>{throw console.log("Error update configs",r),r}).then(()=>{n(Lv(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}const bC={configs:{port:7890,"socks-port":7891,"redir-port":0,"allow-lan":!1,mode:"Rule","log-level":"uninit"},haveFetchedConfig:!1},RC={darkModePureBlackToggle:"yacd_darkModePureBlackToggle"},Yo=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},Nv=e=>e.app.selectedClashAPIConfigIndex,Tv=e=>e.app.clashAPIConfigs,rf=e=>e.app.theme,LC=e=>e.app.selectedChartStyleIndex,Iv=e=>e.app.latencyTestUrl,rR=e=>e.app.collapsibleIsOpen,oR=e=>e.app.proxySortBy,iR=e=>e.app.hideUnavailableProxies,NC=e=>e.app.autoCloseOldConns,sR=e=>e.app.logStreamingPaused,TC=B2(Un,600);function of(e,{baseURL:t,secret:n,metaLabel:r}){const o=Tv(e());for(let i=0;i{if(of(n,e))return;const o={...e,addedAt:Date.now()};t("addClashAPIConfig",i=>{i.app.clashAPIConfigs.push(o)}),Un(n().app)}}function DC(e){return async(t,n)=>{const r=of(n,e);t("removeClashAPIConfig",o=>{o.app.clashAPIConfigs.splice(r,1),r===o.app.selectedClashAPIConfigIndex?o.app.selectedClashAPIConfigIndex=0:r{const r=of(n,e);Nv(n())!==r&&t("selectClashAPIConfig",i=>{i.app.selectedClashAPIConfigIndex=r}),Un(n().app);try{window.location.reload()}catch{}}}const Xa=document.querySelector("html");function Za(e,t){const n=document.createElement("meta");n.setAttribute("name","theme-color"),n.setAttribute("content",e),t&&n.setAttribute("media",t),document.head.appendChild(n)}function jC(e){const t=Array.from(document.querySelectorAll("meta[name=theme-color]"));let n;for(const r of t)r.getAttribute("media")?document.head.removeChild(r):n=r;if(e==="auto")if(Za("#eeeeee","(prefers-color-scheme: light)"),Za("#202020","(prefers-color-scheme: dark)"),n)document.head.removeChild(n);else return;else{const r=e==="light"?"#eeeeee":"#202020";n?n.setAttribute("content",r):Za(r)}}function Dv(e="dark"){e==="auto"?Xa.setAttribute("data-theme","auto"):e==="dark"?Xa.setAttribute("data-theme","dark"):Xa.setAttribute("data-theme","light"),jC(e)}function AC(e="auto"){return(t,n)=>{rf(n())!==e&&(Dv(e),t("storeSwitchTheme",o=>{o.app.theme=e}),Un(n().app))}}function FC(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),Un(n().app)}}function Tp(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),Un(r().app)}}function UC(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),TC(o().app)}}var oh;const $C={baseURL:((oh=document.getElementById("app"))==null?void 0:oh.getAttribute("data-base-url"))??"http://127.0.0.1:9090",secret:"",addedAt:0},zC={selectedClashAPIConfigIndex:0,clashAPIConfigs:[$C],latencyTestUrl:"http://www.gstatic.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!0,logStreamingPaused:!1},BC=["hostname","port","secret","theme"];function WC(){const{search:e}=window.location,t={},n=new URLSearchParams(e);let r=!1;if(typeof e!="string"||e==="")return[t,n,r];for(const o of BC){const i=n.get(o);i&&(r=!0,t[o]=i,n.delete(o))}return[t,n,r]}function VC(){let e=SC();e={...zC,...e};const[t,n,r]=WC();if(r&&(history!=null&&history.replaceState)){const i=location.pathname+location.hash+(n.size>0?`?${n}`:"");history.replaceState(null,"",i)}const o=e.clashAPIConfigs[e.selectedClashAPIConfigIndex];if(o){const i=new URL(o.baseURL);t.hostname&&(t.hostname.indexOf("http")===0?i.href=decodeURIComponent(t.hostname):i.hostname=t.hostname),t.port&&(i.port=t.port),o.baseURL=fv(i.href),t.secret&&(o.secret=t.secret)}return(t.theme==="dark"||t.theme==="light")&&(e.theme=t.theme),Dv(e.theme),e}const HC=wC(RC.darkModePureBlackToggle,!0),QC="_root_1392e_1",KC="_mono_1392e_10",qC="_link_1392e_14",el={root:QC,mono:KC,link:qC};function tl({name:e,link:t,version:n}){return S.jsxs("div",{className:el.root,children:[S.jsx("h2",{children:e}),S.jsxs("p",{children:[S.jsx("span",{children:"Version "}),S.jsx("span",{className:el.mono,children:n})]}),S.jsx("p",{children:S.jsxs("a",{className:el.link,href:t,target:"_blank",rel:"noopener noreferrer",children:[S.jsx(M2,{size:20}),S.jsx("span",{children:"Source"})]})})]})}function GC(e){const{data:t}=mE(["/version",e.apiConfig],()=>H2("/version",e.apiConfig));return S.jsxs(S.Fragment,{children:[S.jsx(hv,{title:"PaoPao GateWay"}),S.jsx(tl,{name:"PaoPao GateWay",version:"PPGW_version",link:"https://github.com/kkkgo/PaoPaoGateWay"}),t&&t.version?S.jsx(tl,{name:"Clash",version:t.version,link:"https://github.com/Dreamacro/clash"}):null,S.jsx(tl,{name:"Yacd",version:"0.3.8",link:"https://github.com/haishanh/yacd"})]})}const YC=e=>({apiConfig:Yo(e)}),JC=hn(YC)(GC),XC="_loading_74j3j_1",ZC="_spinner_74j3j_9",ek="_rotate_74j3j_1",Ip={loading:XC,spinner:ZC,rotate:ek},Mv=({height:e})=>{const t=e?{height:e}:{};return S.jsx("div",{className:Ip.loading,style:t,children:S.jsx("div",{className:Ip.spinner})})},tk=new Hg,nk=new Ux({queryCache:tk,defaultOptions:{queries:{suspense:!0}}});var $s="NOT_FOUND";function rk(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:$s},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function ok(e,t){var n=[];function r(a){var l=n.findIndex(function(c){return t(a,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return $s}function o(a,l){r(a)===$s&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var ik=function(t,n){return t===n};function sk(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;re.logs.logs,Av=e=>e.logs.tail,fk=e=>e.logs.searchText,aR=ck(jv,Av,fk,(e,t,n)=>{const r=[];for(let o=t;o>=0;o--)r.push(e[o]);if(e.length===Lu)for(let o=Lu-1;o>t;o--)r.push(e[o]);return n===""?r:r.filter(o=>o.payload.toLowerCase().indexOf(n)>=0)});function lR(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function uR(e){return(t,n)=>{const r=n(),o=jv(r),i=Av(r),s=i>=Lu-1?0:i+1;o[s]=e,t("logsAppendLog",a=>{a.logs.tail=s})}}const dk={searchText:"",logs:[],tail:-1},ga="/connections",Gi=[];function pk(e){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}Gi.forEach(n=>n(t))}let Ti;function Nu(e,t){if(Ti===1&&t)return Dp(t);Ti=1;const n=pv(e,ga),r=new WebSocket(n);let o=!1;const i=()=>{o=!0,r.close()},s=()=>{o=!1,Nu(e,void 0)};if(document.addEventListener("freeze",i,{capture:!0,once:!0}),document.addEventListener("resume",s,{capture:!0,once:!0}),r.addEventListener("error",()=>Ti=3),r.addEventListener("close",function(a){Ti=3,o||(document.removeEventListener("freeze",i),document.removeEventListener("resume",s),Nu(e,void 0))}),r.addEventListener("message",a=>pk(a.data)),t)return Dp(t)}function Dp(e){return Gi.push(e),function(){const n=Gi.indexOf(e);Gi.splice(n,1)}}async function cR(e){const{url:t,init:n}=We(e);return await fetch(t+ga,{...n,method:"DELETE"})}async function hk(e){const{url:t,init:n}=We(e);return await fetch(t+ga,{...n})}async function mk(e,t){const{url:n,init:r}=We(e),o=`${n}${ga}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const sf="/proxies";async function gk(e){const{url:t,init:n}=We(e);return await(await fetch(t+sf,n)).json()}async function vk(e,t,n){const r={name:n},{url:o,init:i}=We(e),s=encodeURIComponent(t),a=`${o}${sf}/${s}`;return await fetch(a,{...i,method:"PUT",body:JSON.stringify(r)})}async function Fv(e,t,n="http://www.gstatic.com/generate_204"){const{url:r,init:o}=We(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,s=`${r}${sf}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(s,o)}async function yk(e){const{url:t,init:n}=We(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function Uv(e,t){const{url:n,init:r}=We(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function wk(e,t){const{url:n,init:r}=We(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const Sk={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},$v=()=>null,xk=["Direct","Reject","Relay","Selector","Fallback","URLTest","LoadBalance","Unknown"],zv=e=>e.proxies.proxies,ir=e=>e.proxies.delay,fR=e=>e.proxies.groupNames,Ek=e=>e.proxies.proxyProviders||[],Ck=e=>e.proxies.dangleProxyNames,dR=e=>e.proxies.showModalClosePrevConns;function kk(e,t){const n={};for(const r of e){const i=(t(r)||{history:[]}).history,s=i[i.length-1];s&&typeof s.delay=="number"&&(n[r]={kind:"Result",number:s.delay})}return n}function Nr(e){return async(t,n)=>{const[r,o]=await Promise.all([gk(e),yk(e)]),{proxyProviders:i,providerProxyRecord:s}=Tk(o.providers),a={...s,...r.proxies},[l,u]=Nk(a),c={...ir(n()),...kk(Object.keys(a),f=>a[f])},d=[];for(const f of u)s[f]||d.push(f);t("store/proxies#fetchProxies",f=>{f.proxies.proxies=a,f.proxies.groupNames=l,f.proxies.dangleProxyNames=d,f.proxies.delay=c,f.proxies.proxyProviders=i})}}function pR(e,t){return async n=>{try{await Uv(e,t)}catch{}n(Nr(e))}}function hR(e,t){return async n=>{for(let r=0;r{await af(e,t),await n(Nr(e))}}async function _k(e,t,n){const r=await hk(e);r.ok||console.log("unable to fetch all connections",r.statusText);const i=(await r.json()).connections,s=[];for(const a of i)a.chains.indexOf(t)>-1&&a.chains.indexOf(n)<0&&s.push(a.id);await Promise.all(s.map(a=>mk(e,a).catch($v)))}function Ok(e,t,n){const r=[n,t];let o,i=n;for(;(o=e[i])&&o.now;)r.unshift(o.now),i=o.now;return r}async function Pk(e,t,n,r,o){try{if((await vk(n,r,o)).ok===!1)throw new Error("failed to switch proxy: res.statusText")}catch(s){throw console.log(s,"failed to switch proxy"),s}if(e(Nr(n)),NC(t())){const s=zv(t());Wv(n,s,{groupName:r,itemName:o})}}function Bv(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function Wv(e,t,n){const r=Ok(t,n.groupName,n.itemName);_k(e,n.groupName,r[0])}function bk(e){return async(t,n)=>{var s;const r=n(),o=(s=r.proxies.switchProxyCtx)==null?void 0:s.to;if(!o){t(Bv());return}const i=r.proxies.proxies;Wv(e,i,o),t("closePrevConnsAndTheModal",a=>{a.proxies.showModalClosePrevConns=!1,a.proxies.switchProxyCtx=void 0})}}function gR(e,t,n){return async(r,o)=>{Pk(r,o,e,t,n).catch($v),r("store/proxies#switchProxy",i=>{const s=i.proxies.proxies;s[t]&&s[t].now&&(s[t].now=n)})}}function Rk(e,t){return async(n,r)=>{n("set latency state to testing in progress",i=>{i.proxies.delay={...ir(r()),[t]:{kind:"Testing"}}});const o=Iv(r());try{const i=await Fv(e,t,o);if(i.ok){const{delay:s}=await i.json();n("set latency result",a=>{a.proxies.delay={...ir(r()),[t]:{kind:"Result",number:s}}})}else n("set latency testing error",s=>{s.proxies.delay={...ir(r()),[t]:{kind:"Error",message:i.statusText}}})}catch(i){n("set latency testing networkish error",s=>{s.proxies.delay={...ir(r()),[t]:{kind:"Error",message:i.message||i.type}}})}}}function Lk(e,t){return async(n,r)=>{const o=zv(r()),i=new Map,s=new Map,a=[];t.forEach(l=>{const u=o[l];u.__provider?u.__provider&&(i.get(l)||(i.set(l,!0),n("set latency state to testing in progress",c=>{c.proxies.delay={...ir(r()),[l]:{kind:"Testing"}}})),s.get(u.__provider)||(s.set(u.__provider,!0),a.push(af(e,u.__provider)))):i.get(l)||(i.set(l,!0),n(Rk(e,l)))}),await Promise.all(a),await n(Nr(e))}}function vR(e){return async(t,n)=>{const r=Ck(n()),o=Iv(n());await Promise.all(r.map(s=>Fv(e,s,o)));const i=Ek(n());for(const s of i)await af(e,s.name);await t(Nr(e))}}function Nk(e){let t=[],n;const r=[];for(const o in e){const i=e[o];i.all&&Array.isArray(i.all)?(t.push(o),o==="GLOBAL"&&(n=Array.from(i.all))):xk.indexOf(i.type)<0&&r.push(o)}return n&&(n.push("GLOBAL"),t=t.map(o=>[n.indexOf(o),o]).sort((o,i)=>o[0]-i[0]).map(o=>o[1])),[t,r]}function Tk(e){const t=Object.keys(e),n=[],r={};for(let o=0;on(o=>!o),[]);return[t,r]}function wR(e){const[t,n]=Vv(e);return{value:t,set:n}}const Fk="_ul_1ore2_1",Uk="_li_1ore2_10",$k="_right_1ore2_21",zk="_close_1ore2_32",Bk="_eye_1ore2_39",Wk="_url_1ore2_54",Vk="_secret_1ore2_55",Hk="_metaLabel_1ore2_56",Qk="_btn_1ore2_62",gt={ul:Fk,li:Uk,right:$k,close:zk,eye:Bk,url:Wk,secret:Vk,metaLabel:Hk,btn:Qk},Kk=e=>({apiConfigs:Tv(e),selectedClashAPIConfigIndex:Nv(e)}),qk=hn(Kk)(Gk);function Gk({apiConfigs:e,selectedClashAPIConfigIndex:t}){const{app:{removeClashAPIConfig:n,selectClashAPIConfig:r}}=dC(),o=v.useCallback(s=>{n(s)},[n]),i=v.useCallback(s=>{r(s)},[r]);return S.jsx(S.Fragment,{children:S.jsx("ul",{className:gt.ul,children:e.map((s,a)=>S.jsx("li",{className:It(gt.li,{[gt.isSelected]:a===t}),children:S.jsx(Yk,{disableRemove:a===t,conf:s,onRemove:o,onSelect:i})},s.baseURL+s.secret+s.metaLabel))})})}function Yk({conf:e,disableRemove:t,onRemove:n,onSelect:r}){const[o,i]=Ak(),s=o?R2:T2,a=v.useCallback(l=>{l.stopPropagation()},[]);return S.jsxs(S.Fragment,{children:[S.jsx(Mp,{disabled:t,onClick:()=>n(e),className:gt.close,children:S.jsx(z2,{size:20})}),S.jsxs("div",{className:gt.right,children:[e.metaLabel?S.jsxs(S.Fragment,{children:[S.jsx("span",{className:gt.metaLabel,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.metaLabel}),S.jsx("span",{})]}):null,S.jsx("span",{className:gt.url,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.baseURL}),S.jsx("span",{}),e.secret?S.jsxs(S.Fragment,{children:[S.jsx("span",{className:gt.secret,children:o?e.secret:"***"}),S.jsx(Mp,{onClick:i,className:gt.eye,children:S.jsx(s,{size:16})})]}):null]})]})}function Mp({children:e,onClick:t,className:n,disabled:r}){return S.jsx("button",{disabled:r,className:It(n,gt.btn),onClick:t,children:e})}const Jk="_root_zwtea_1",Xk="_header_zwtea_5",Zk="_icon_zwtea_10",e_="_body_zwtea_20",t_="_hostnamePort_zwtea_24",n_="_error_zwtea_36",r_="_footer_zwtea_42",At={root:Jk,header:Xk,icon:Zk,body:e_,hostnamePort:t_,error:n_,footer:r_},o_="_btn_lzu00_1",i_="_circular_lzu00_27",s_="_minimal_lzu00_30",a_="_btnStart_lzu00_48",l_="_loadingContainer_lzu00_55",Yr={btn:o_,circular:i_,minimal:s_,btnStart:a_,loadingContainer:l_},u_="_sectionNameType_1b9pp_1",c_="_loadingDot_1b9pp_66",f_="_dot2_1b9pp_1",d_="_dot1_1b9pp_1",p_="_dot3_1b9pp_1",Hv={sectionNameType:u_,loadingDot:c_,dot2:f_,dot1:d_,dot3:p_};function SR({name:e,type:t}){return S.jsxs("h2",{className:Hv.sectionNameType,children:[S.jsx("span",{children:e}),S.jsx("span",{children:t})]})}function h_(){return S.jsx("span",{className:Hv.loadingDot})}const{forwardRef:m_,useCallback:g_}=Et;function v_(e,t){const{onClick:n,disabled:r=!1,isLoading:o,kind:i="primary",className:s,children:a,label:l,text:u,start:c,...d}=e,f={children:a,label:l,text:u,start:c},g=g_(w=>{o||n&&n(w)},[o,n]),y=It(Yr.btn,{[Yr.minimal]:i==="minimal",[Yr.circular]:i==="circular"},s);return S.jsx("button",{className:y,ref:t,onClick:g,disabled:r,...d,children:o?S.jsxs(S.Fragment,{children:[S.jsx("span",{style:{display:"inline-flex",opacity:0},children:S.jsx(jp,{...f})}),S.jsx("span",{className:Yr.loadingContainer,children:S.jsx(h_,{})})]}):S.jsx(jp,{...f})})}function jp({children:e,label:t,text:n,start:r}){return S.jsxs(S.Fragment,{children:[r?S.jsx("span",{className:Yr.btnStart,children:typeof r=="function"?r():r}):null,e||t||n]})}const y_=m_(v_),w_="_root_1wn1y_1",S_="_floatAbove_1wn1y_33",Ap={root:w_,floatAbove:S_},{useCallback:x_}=Et;function nl({id:e,label:t,value:n,onChange:r,...o}){const i=x_(s=>r(s),[r]);return S.jsxs("div",{className:Ap.root,children:[S.jsx("input",{id:e,value:n,onChange:i,...o}),S.jsx("label",{htmlFor:e,className:Ap.floatAbove,children:t})]})}const E_="_path_r8pm3_1",C_="_dash_r8pm3_1",k_={path:E_,dash:C_};function lf({width:e=320,height:t=320,animate:n=!1,c0:r="currentColor",stroke:o="#eee",eye:i="#eee",mouth:s="#eee"}){const a=It({[k_.path]:n});return S.jsx("svg",{width:e,height:t,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",children:S.jsxs("g",{fill:"none",fillRule:"evenodd",children:[S.jsx("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:o,strokeWidth:"4",strokeLinecap:"round",fill:r,className:a}),S.jsx("circle",{fill:i,cx:"216.5",cy:"181.5",r:"14.5"}),S.jsx("circle",{fill:i,cx:"104.5",cy:"181.5",r:"14.5"}),S.jsx("g",{stroke:s,strokeLinecap:"round",strokeWidth:"4",children:S.jsx("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"})})]})})}const{useState:Ii,useRef:Fp,useCallback:rl,useEffect:__}=Et,Qv=0,O_=()=>{},P_=e=>({apiConfig:Yo(e)});function b_({dispatch:e}){const[t,n]=Ii(""),[r,o]=Ii(""),[i,s]=Ii(""),[a,l]=Ii(""),u=Fp(!1),c=Fp(null),d=rl(w=>{u.current=!0,l("");const k=w.target,{name:m}=k,p=k.value;switch(m){case"baseURL":n(p);break;case"secret":o(p);break;case"metaLabel":s(p);break;default:throw new Error(`unknown input name ${m}`)}},[]),f=rl(()=>{R_({baseURL:t,secret:r}).then(w=>{w[0]!==Qv?l(w[1]):e(IC({baseURL:t,secret:r,metaLabel:i}))})},[t,r,i,e]),g=rl(w=>{w.target instanceof Element&&(!w.target.tagName||w.target.tagName.toUpperCase()!=="INPUT")||w.key==="Enter"&&f()},[f]),y=async()=>{(await fetch("/")).json().then(k=>{k.hello==="clash"&&n(window.location.origin)},O_)};return __(()=>{y()},[]),S.jsxs("div",{className:At.root,ref:c,onKeyDown:g,children:[S.jsx("div",{className:At.header,children:S.jsx("div",{className:At.icon,children:S.jsx(lf,{width:160,height:160,stroke:"var(--stroke)"})})}),S.jsxs("div",{className:At.body,children:[S.jsxs("div",{className:At.hostnamePort,children:[S.jsx(nl,{id:"baseURL",name:"baseURL",label:"API Base URL",type:"text",placeholder:"http://127.0.0.1:9090",value:t,onChange:d}),S.jsx(nl,{id:"secret",name:"secret",label:"Secret(optional)",value:r,type:"text",onChange:d})]}),a?S.jsx("div",{className:At.error,children:a}):null,S.jsx("div",{className:At.label,children:S.jsx(nl,{id:"metaLabel",name:"metaLabel",label:"Label(optional)",type:"text",placeholder:"",value:i,onChange:d})})]}),S.jsx("div",{className:At.footer,children:S.jsx(y_,{label:"Add",onClick:f})}),S.jsx("div",{style:{height:20}}),S.jsx(qk,{})]})}const Kv=hn(P_)(b_);async function R_(e){try{new URL(e.baseURL)}catch{if(e.baseURL){const n=e.baseURL.substring(0,7);if(n!=="http://"&&n!=="https:/")return[1,"Must starts with http:// or https://"]}return[1,"Invalid URL"]}try{const t=await Pv(e);return t.status>399?[1,t.statusText]:[Qv]}catch{return[1,"Failed to connect"]}}/** + * @reach/utils v0.18.0 + * + * Copyright (c) 2018-2022, React Training LLC + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function qv(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ie(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function Up(e){return typeof e=="boolean"}function zs(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function L_(e){return typeof e=="string"}function N_(e,t){if(e!=null)if(zs(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function $n(...e){return v.useCallback(t=>{for(let n of e)N_(n,t)},e)}function cn(e){return qv()?e?e.ownerDocument:document:null}function T_(e,t){let n=v.createContext(t);function r(i){let{children:s,...a}=i,l=v.useMemo(()=>a,Object.values(a));return v.createElement(n.Provider,{value:l},s)}function o(i){let s=v.useContext(n);if(s)return s;if(t)return t;throw Error(`${i} must be rendered inside of a ${e} component.`)}return n.displayName=`${e}Context`,r.displayName=`${e}Provider`,[r,o]}function I_(e){let t=cn(e),n=t.defaultView||window;return t?{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}:{width:0,height:0}}function Yi(e){return"which"in e?e.which===3:"button"in e?e.button===2:!1}function kr(...e){return e.filter(t=>t!=null).join("--")}function uf(){}function Gv(){let[,e]=v.useState(Object.create(null));return v.useCallback(()=>{e(Object.create(null))},[])}var dr=qv()?v.useLayoutEffect:v.useEffect;function ol(e){const t=v.useRef(null);return v.useEffect(()=>{t.current=e},[e]),t.current}function D_(e,t){let[n,r]=v.useState(t),o=v.useCallback(i=>{e.current=i,r(i)},[]);return[n,o]}var M_=({children:e,type:t="reach-portal",containerRef:n})=>{let r=v.useRef(null),o=v.useRef(null),i=Gv();return v.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),dr(()=>{if(!r.current)return;let s=r.current.ownerDocument,a=(n==null?void 0:n.current)||s.body;return o.current=s==null?void 0:s.createElement(t),a.appendChild(o.current),i(),()=>{o.current&&a&&a.removeChild(o.current)}},[t,i,n]),o.current?Fc.createPortal(e,o.current):v.createElement("span",{ref:r})},cf=({unstable_skipInitialRender:e,...t})=>{let[n,r]=v.useState(!1);return v.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:v.createElement(M_,{...t})};cf.displayName="Portal";var j_=["bottom","height","left","right","top","width"],A_=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),j_.some(function(r){return t[r]!==n[r]})},Ft=new Map,Yv,F_=function e(){var t=[];Ft.forEach(function(n,r){var o=r.getBoundingClientRect();A_(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),Yv=window.requestAnimationFrame(e)};function U_(e,t){return{observe:function(){var r=Ft.size===0;Ft.has(e)?Ft.get(e).callbacks.push(t):Ft.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&F_()},unobserve:function(){var r=Ft.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Ft.delete(e),Ft.size||cancelAnimationFrame(Yv)}}}}function Bs(e,t,n){let r,o;Up(t)?r=t:(r=(t==null?void 0:t.observe)??!0,o=t==null?void 0:t.onChange),zs(n)&&(o=n),v.useEffect(()=>{Up(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")},[t]),v.useEffect(()=>{zs(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")},[n]);let[i,s]=v.useState(e.current),a=v.useRef(!1),l=v.useRef(!1),[u,c]=v.useState(null),d=v.useRef(o);return dr(()=>{d.current=o,e.current!==i&&s(e.current)}),dr(()=>{i&&!a.current&&(a.current=!0,c(i.getBoundingClientRect()))},[i]),dr(()=>{if(!r)return;let f=i;if(l.current||(l.current=!0,f=e.current),!f){console.warn("You need to place the ref");return}let g=U_(f,y=>{var w;(w=d.current)==null||w.call(d,y),c(y)});return g.observe(),()=>{g.unobserve()}},[r,i,e]),u}/*! +* tabbable 5.3.3 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var $_=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Tu=$_.join(","),Jv=typeof Element>"u",Mo=Jv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Iu=!Jv&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},z_=function(t,n,r){var o=Array.prototype.slice.apply(t.querySelectorAll(Tu));return n&&Mo.call(t,Tu)&&o.unshift(t),o=o.filter(r),o},B_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else{var c=Mo.call(s,Tu);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!r.shadowRootFilter||r.shadowRootFilter(s);if(d&&f){var g=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scope:s,candidates:g})}else i.unshift.apply(i,s.children)}}return o},Xv=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},W_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Zv=function(t){return t.tagName==="INPUT"},V_=function(t){return Zv(t)&&t.type==="hidden"},H_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Q_=function(t,n){for(var r=0;rsummary:first-of-type"),s=i?t.parentElement:t;if(Mo.call(s,"details:not([open]) *"))return!0;var a=Iu(t).host,l=(a==null?void 0:a.ownerDocument.contains(a))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,d=Iu(t);if(c&&!c.shadowRoot&&o(c)===!0)return $p(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(l)return!t.getClientRects().length}else if(r==="non-zero-area")return $p(t);return!1},J_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},eO=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scope,a=s?o.scope:o,l=Xv(a,s),u=s?e(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(W_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ct=function(t,n){n=n||{};var r;return n.getShadowRoot?r=B_([t],n.includeContainer,{filter:zp.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Z_}):r=z_(t,n.includeContainer,zp.bind(null,n)),eO(r)},ff=v.forwardRef(function({unstable_skipInitialPortalRender:t,...n},r){return v.createElement(cf,{unstable_skipInitialRender:t},v.createElement(ey,{ref:r,...n}))});ff.displayName="Popover";var ey=v.forwardRef(function({as:t="div",targetRef:n,position:r=rO,unstable_observableRefs:o=[],...i},s){const a=v.useRef(null),l=Bs(a,{observe:!i.hidden}),u=Bs(n,{observe:!0}),c=$n(a,s);return iO(n,a),v.createElement(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...tO(r,u,l,...o),...i.style}})});ey.displayName="PopoverImpl";function tO(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function nO(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var rO=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=oO(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...nO(e,t,r)}};function oO(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth(n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}),[]);function o(){const p=Ct(n),h=p&&e.current?p.indexOf(e.current):-1,E=p&&p[h+1];return t.current&&t.current.contains(E||null)?!1:E}function i(){return e.current?e.current===n.activeElement:!1}function s(p){const h=t.current&&Ct(t.current);h&&h[0]&&(p.preventDefault(),h[0].focus())}function a(){if(t.current?t.current.contains(n.activeElement||null):!1){const h=t.current&&Ct(t.current);return!!(h&&h[h.length-1]===n.activeElement)}return!1}function l(p){const h=o();h&&(p.preventDefault(),h.focus())}function u(p){if(!p.shiftKey)return;const h=o();return p.target===h}function c(p){const h=t.current&&Ct(t.current),E=h&&h[h.length-1];E&&(p.preventDefault(),E.focus())}function d(p){const h=t.current&&Ct(t.current);return h?h.length===0?!1:p.target===h[0]:!1}function f(p){var h;p.preventDefault(),(h=e.current)==null||h.focus()}function g(p){const h=t.current?Ct(n).filter(E=>!t.current.contains(E)):null;return h?p.target===h[h.length-1]:!1}function y(p){return p.target===Ct(n)[0]}let w=[];function k(){const p=t.current&&Ct(t.current);p&&(p.forEach(h=>{w.push([h,h.tabIndex]),h.tabIndex=-1}),n.addEventListener("focusin",m))}function m(){n.removeEventListener("focusin",m),w.forEach(([p,h])=>{p.tabIndex=h})}}var il=!1,sO=0;function Bp(){return++sO}var Wp=Et["useId".toString()];function ty(e){if(Wp!==void 0){let o=Wp();return e??o}let t=e??(il?Bp():null),[n,r]=v.useState(t);return dr(()=>{n===null&&r(Bp())},[]),v.useEffect(()=>{il===!1&&(il=!0)},[]),e??n??void 0}function aO(e,t={}){const n=[];let r=v.createContext({descendants:n,registerDescendant:()=>uf,...t});return r.displayName=e,r}function lO(e,t,n){let r=Gv(),{registerDescendant:o,descendants:i}=v.useContext(t),s=n??i.findIndex(a=>a.element===e.element);return dr(()=>(e.element||r(),o({...e,index:s})),[e,r,s,o,...Object.values(e)]),s}function uO(){return v.useState([])}function cO(e){return v.useContext(e).descendants}function fO({context:e,children:t,items:n,set:r}){let o=v.useCallback(({element:i,index:s,...a})=>i?(r(l=>{if(s!=null&&s!==-1)return Vp(l,{element:i,index:s,...a},s);if(l.length===0)return[{...a,element:i,index:0}];if(l.find(d=>d.element===i))return console.warn(`[reach-ui]: \`useDescendant\` was called with an element that was already registered. + +If you are using the \`@reach/descendants\` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app. + +If you are using another \`reach-ui\` package, this is probably our bug! + +To report a bug, open a new issue: + + https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md + +IMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.`),hO(l);let u=pO(l,i),c;return u===-1?c=[...l,{...a,element:i,index:l.length}]:c=Vp(l,{...a,element:i,index:u},u),c}),()=>{i&&r(l=>l.filter(u=>i!==u.element))}):uf,[]);return v.createElement(e.Provider,{value:v.useMemo(()=>({descendants:n,registerDescendant:o}),[n,o])},t)}function dO(e,t){let{descendants:n}=v.useContext(e),{callback:r,currentIndex:o,filter:i,key:s="index",orientation:a="vertical",rotate:l=!0,rtl:u=!1}=t;return function(d){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(d.key))return;let f=o??-1,g=i?n.filter(i):n;if(!g.length)return;let y=g.findIndex(h=>h.index===o);function w(){return f===p().index?l?m():g[y]:g[(y+1)%g.length]}function k(){return f===m().index?l?p():g[y]:g[(y-1+g.length)%g.length]}function m(){return g[0]}function p(){return g[g.length-1]}switch(d.key){case"ArrowDown":if(a==="vertical"||a==="both"){d.preventDefault();let P=w();r(s==="option"?P:P[s])}break;case"ArrowUp":if(a==="vertical"||a==="both"){d.preventDefault();let P=k();r(s==="option"?P:P[s])}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){d.preventDefault();let P=(u?w:k)();r(s==="option"?P:P[s])}break;case"ArrowRight":if(a==="horizontal"||a==="both"){d.preventDefault();let P=(u?k:w)();r(s==="option"?P:P[s])}break;case"PageUp":d.preventDefault();let h=(d.ctrlKey?k:m)();r(s==="option"?h:h[s]);break;case"Home":d.preventDefault();let E=m();r(s==="option"?E:E[s]);break;case"PageDown":d.preventDefault();let b=(d.ctrlKey?w:p)();r(s==="option"?b:b[s]);break;case"End":d.preventDefault();let O=p();r(s==="option"?O:O[s]);break}}}function ny(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function pO(e,t){if(!t||!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(r&&ny(r,t))return n+1}return-1}function Vp(e,t,n){return n==null||!(n in e)?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function hO(e){return e.sort((t,n)=>!t.element||!n.element?0:ny(t.element,n.element)?-1:1).map((t,n)=>({...t,index:n}))}var ry="CLEAR_SELECTION_INDEX",df="CLICK_MENU_ITEM",jo="CLOSE_MENU",mO="OPEN_MENU_AT_FIRST_ITEM",Du="OPEN_MENU_AT_INDEX",oy="OPEN_MENU_CLEARED",Mu="SEARCH_FOR_ITEM",Yt="SELECT_ITEM_AT_INDEX",ju="SET_BUTTON_ID",va=aO("DropdownDescendantContext"),[gO,Jo]=T_("Dropdown"),vO={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},iy=({id:e,children:t})=>{let n=v.useRef(null),r=v.useRef(null),o=v.useRef(null),[i,s]=uO(),a=ty(e),l=e||kr("menu",a),u=kr("menu-button",l),[c,d]=v.useReducer(kO,{...vO,triggerId:u}),f=v.useRef(!1),g=v.useRef([]),y=v.useRef(!1),w=v.useRef({x:0,y:0});return v.useEffect(()=>{c.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{Ws(r.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[c.isExpanded]),v.createElement(fO,{context:va,items:i,set:s},v.createElement(gO,{dispatch:d,dropdownId:l,dropdownRef:r,mouseDownStartPosRef:w,popoverRef:o,readyToSelect:y,selectCallbacks:g,state:c,triggerClickedRef:f,triggerRef:n},zs(t)?t({isExpanded:c.isExpanded,isOpen:c.isExpanded}):t))};iy.displayName="DropdownProvider";function sy({onKeyDown:e,onMouseDown:t,id:n,ref:r,...o}){let{dispatch:i,dropdownId:s,mouseDownStartPosRef:a,triggerClickedRef:l,triggerRef:u,state:{triggerId:c,isExpanded:d}}=Jo("useDropdownTrigger"),f=$n(u,r),g=fy(),y=v.useMemo(()=>g.findIndex(m=>!m.disabled),[g]);v.useEffect(()=>{n!=null&&n!==c&&i({type:ju,payload:n})},[c,i,n]),v.useEffect(()=>{n==null&&i({type:ju,payload:kr("menu-button",s)})},[s,i,n]);function w(m){switch(m.key){case"ArrowDown":case"ArrowUp":m.preventDefault(),i({type:Du,payload:{index:y}});break;case"Enter":case" ":i({type:Du,payload:{index:y}});break}}function k(m){Yi(m.nativeEvent)||(a.current={x:m.clientX,y:m.clientY},d||(l.current=!0),i(d?{type:jo}:{type:oy}))}return{data:{isExpanded:d,controls:s},props:{...o,ref:f,id:c||void 0,onKeyDown:ie(e,w),onMouseDown:ie(t,k),type:"button"}}}var yO=v.forwardRef(({as:e="button",...t},n)=>{let{props:r}=sy({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-trigger":"",...r})});yO.displayName="DropdownTrigger";function ay({index:e,isLink:t=!1,onClick:n,onDragStart:r,onMouseDown:o,onMouseEnter:i,onMouseLeave:s,onMouseMove:a,onMouseUp:l,onSelect:u,disabled:c,onFocus:d,valueText:f,ref:g,...y}){let{dispatch:w,dropdownRef:k,mouseDownStartPosRef:m,readyToSelect:p,selectCallbacks:h,triggerRef:E,state:{selectionIndex:b,isExpanded:O}}=Jo("useDropdownItem"),P=v.useRef(null),[x,R]=v.useState(f||""),L=v.useCallback(Q=>{!f&&(Q!=null&&Q.textContent)&&R(Q.textContent)},[f]),D=v.useRef(!1),[A,j]=D_(P,null),N=v.useMemo(()=>({element:A,key:x,disabled:c,isLink:t}),[c,A,t,x]),T=lO(N,va,e),F=T===b&&!c,C=$n(g,j,L);h.current[T]=u;function _(){Ws(E.current),u&&u(),w({type:df})}function M(Q){Yi(Q.nativeEvent)||t&&(c?Q.preventDefault():_())}function $(Q){t&&Q.preventDefault()}function B(Q){Yi(Q.nativeEvent)||(t?D.current=!0:Q.preventDefault())}function q(Q){let Mt=cn(k.current);!F&&T!=null&&!c&&(k!=null&&k.current&&k.current!==Mt.activeElement&&P.current!==Mt.activeElement&&k.current.focus(),w({type:Yt,payload:{index:T}}))}function be(Q){w({type:ry})}function Re(Q){if(!p.current){let Mt=8,jy=Math.abs(Q.clientX-m.current.x),Ay=Math.abs(Q.clientY-m.current.y);(jy>Mt||Ay>Mt)&&(p.current=!0)}!F&&T!=null&&!c&&w({type:Yt,payload:{index:T,dropdownRef:k}})}function mn(){p.current=!0,!F&&T!=null&&!c&&w({type:Yt,payload:{index:T}})}function Ze(Q){if(!Yi(Q.nativeEvent)){if(!p.current){p.current=!0;return}t?D.current?D.current=!1:P.current&&P.current.click():c||_()}}return v.useEffect(()=>{if(O){let Q=window.setTimeout(()=>{p.current=!0},400);return()=>{window.clearTimeout(Q)}}else p.current=!1},[O,p]),v.useEffect(()=>{let Q=cn(P.current);return Q.addEventListener("mouseup",Mt),()=>{Q.removeEventListener("mouseup",Mt)};function Mt(){D.current=!1}},[]),{data:{disabled:c},props:{id:cy(T),tabIndex:-1,...y,ref:C,"data-disabled":c?"":void 0,"data-selected":F?"":void 0,"data-valuetext":x,onClick:ie(n,M),onDragStart:ie(r,$),onMouseDown:ie(o,B),onMouseEnter:ie(i,q),onMouseLeave:ie(s,be),onMouseMove:ie(a,Re),onFocus:ie(d,mn),onMouseUp:ie(l,Ze)}}}var wO=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=ay({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-item":"",...r})});wO.displayName="DropdownItem";function ly({id:e,onKeyDown:t,ref:n,...r}){let{dispatch:o,triggerRef:i,dropdownRef:s,selectCallbacks:a,dropdownId:l,state:{isExpanded:u,triggerId:c,selectionIndex:d,typeaheadQuery:f}}=Jo("useDropdownItems"),g=fy(),y=$n(s,n);v.useEffect(()=>{let h=EO(g,f);f&&h!=null&&o({type:Yt,payload:{index:h,dropdownRef:s}});let E=window.setTimeout(()=>f&&o({type:Mu,payload:""}),1e3);return()=>window.clearTimeout(E)},[o,g,f,s]);let w=ol(g.length),k=ol(g[d]),m=ol(d);v.useEffect(()=>{d>g.length-1?o({type:Yt,payload:{index:g.length-1,dropdownRef:s}}):w!==g.length&&d>-1&&k&&m===d&&g[d]!==k&&o({type:Yt,payload:{index:g.findIndex(h=>h.key===(k==null?void 0:k.key)),dropdownRef:s}})},[s,o,g,w,k,m,d]);let p=ie(function(E){let{key:b}=E;if(u)switch(b){case"Enter":case" ":let O=g.find(P=>P.index===d);O&&!O.disabled&&(E.preventDefault(),O.isLink&&O.element?O.element.click():(Ws(i.current),a.current[O.index]&&a.current[O.index](),o({type:df})));break;case"Escape":Ws(i.current),o({type:jo});break;case"Tab":E.preventDefault();break;default:if(L_(b)&&b.length===1){let P=f+b.toLowerCase();o({type:Mu,payload:P})}break}},dO(va,{currentIndex:d,orientation:"vertical",rotate:!1,filter:h=>!h.disabled,callback:h=>{o({type:Yt,payload:{index:h,dropdownRef:s}})},key:"index"}));return{data:{activeDescendant:cy(d)||void 0,triggerId:c},props:{tabIndex:-1,...r,ref:y,id:l,onKeyDown:ie(t,p)}}}var SO=v.forwardRef(({as:e="div",...t},n)=>{let{props:r}=ly({...t,ref:n});return v.createElement(e,{"data-reach-dropdown-items":"",...r})});SO.displayName="DropdownItems";function uy({onBlur:e,portal:t=!0,position:n,ref:r,...o}){let{triggerRef:i,triggerClickedRef:s,dispatch:a,dropdownRef:l,popoverRef:u,state:{isExpanded:c}}=Jo("useDropdownPopover"),d=$n(u,r);return v.useEffect(()=>{if(!c)return;let f=cn(u.current);function g(y){s.current?s.current=!1:CO(u.current,y.target)||a({type:jo})}return f.addEventListener("mousedown",g),()=>{f.removeEventListener("mousedown",g)}},[s,i,a,l,u,c]),{data:{portal:t,position:n,targetRef:i,isExpanded:c},props:{ref:d,hidden:!c,onBlur:ie(e,f=>{f.currentTarget.contains(f.relatedTarget)||a({type:jo})}),...o}}}var xO=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=uy({...t,ref:n}),a={"data-reach-dropdown-popover":""};return r?v.createElement(ff,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...a})});xO.displayName="DropdownPopover";function EO(e,t=""){if(!t)return null;let n=e.find(r=>{var o,i,s;return r.disabled?!1:(s=(i=(o=r.element)==null?void 0:o.dataset)==null?void 0:i.valuetext)==null?void 0:s.toLowerCase().startsWith(t)});return n?e.indexOf(n):null}function cy(e){let{dropdownId:t}=Jo("useItemId");return e!=null&&e>-1?kr(`option-${e}`,t):void 0}function Ws(e){e&&e.focus()}function CO(e,t){return!!(e&&e.contains(t))}function kO(e,t={}){switch(t.type){case df:return{...e,isExpanded:!1,selectionIndex:-1};case jo:return{...e,isExpanded:!1,selectionIndex:-1};case mO:return{...e,isExpanded:!0,selectionIndex:0};case Du:return{...e,isExpanded:!0,selectionIndex:t.payload.index};case oy:return{...e,isExpanded:!0,selectionIndex:-1};case Yt:{let{dropdownRef:n={current:null}}=t.payload;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(n.current){let r=cn(n.current);n.current!==(r==null?void 0:r.activeElement)&&n.current.focus()}return{...e,selectionIndex:t.payload.max!=null?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)}}return e}case ry:return{...e,selectionIndex:-1};case ju:return{...e,triggerId:t.payload};case Mu:return typeof t.payload<"u"?{...e,typeaheadQuery:t.payload}:e;default:return e}}function fy(){return cO(va)}var dy={exports:{}},G={};/** @license React v17.0.2 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ya=60103,wa=60106,Xo=60107,Zo=60108,ei=60114,ti=60109,ni=60110,ri=60112,oi=60113,pf=60120,ii=60115,si=60116,py=60121,hy=60122,my=60117,gy=60129,vy=60131;if(typeof Symbol=="function"&&Symbol.for){var pe=Symbol.for;ya=pe("react.element"),wa=pe("react.portal"),Xo=pe("react.fragment"),Zo=pe("react.strict_mode"),ei=pe("react.profiler"),ti=pe("react.provider"),ni=pe("react.context"),ri=pe("react.forward_ref"),oi=pe("react.suspense"),pf=pe("react.suspense_list"),ii=pe("react.memo"),si=pe("react.lazy"),py=pe("react.block"),hy=pe("react.server.block"),my=pe("react.fundamental"),gy=pe("react.debug_trace_mode"),vy=pe("react.legacy_hidden")}function pt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ya:switch(e=e.type,e){case Xo:case ei:case Zo:case oi:case pf:return e;default:switch(e=e&&e.$$typeof,e){case ni:case ri:case si:case ii:case ti:return e;default:return t}}case wa:return t}}}var _O=ti,OO=ya,PO=ri,bO=Xo,RO=si,LO=ii,NO=wa,TO=ei,IO=Zo,DO=oi;G.ContextConsumer=ni;G.ContextProvider=_O;G.Element=OO;G.ForwardRef=PO;G.Fragment=bO;G.Lazy=RO;G.Memo=LO;G.Portal=NO;G.Profiler=TO;G.StrictMode=IO;G.Suspense=DO;G.isAsyncMode=function(){return!1};G.isConcurrentMode=function(){return!1};G.isContextConsumer=function(e){return pt(e)===ni};G.isContextProvider=function(e){return pt(e)===ti};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ya};G.isForwardRef=function(e){return pt(e)===ri};G.isFragment=function(e){return pt(e)===Xo};G.isLazy=function(e){return pt(e)===si};G.isMemo=function(e){return pt(e)===ii};G.isPortal=function(e){return pt(e)===wa};G.isProfiler=function(e){return pt(e)===ei};G.isStrictMode=function(e){return pt(e)===Zo};G.isSuspense=function(e){return pt(e)===oi};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Xo||e===ei||e===gy||e===Zo||e===oi||e===pf||e===vy||typeof e=="object"&&e!==null&&(e.$$typeof===si||e.$$typeof===ii||e.$$typeof===ti||e.$$typeof===ni||e.$$typeof===ri||e.$$typeof===my||e.$$typeof===py||e[0]===hy)};G.typeOf=pt;dy.exports=G;var MO=dy.exports,yy=v.forwardRef(({as:e=v.Fragment,id:t,children:n,...r},o)=>{let s=v.useMemo(()=>{try{return MO.isFragment(v.createElement(e,null))}catch{return!1}},[e])?{}:{ref:o,id:t,"data-reach-menu":"",...r};return v.createElement(e,{...s},v.createElement(iy,{id:t,children:n}))});yy.displayName="Menu";var wy=v.forwardRef(({as:e="button",...t},n)=>{let{data:{isExpanded:r,controls:o},props:i}=sy({...t,ref:n});return v.createElement(e,{"aria-expanded":r?!0:void 0,"aria-haspopup":!0,"aria-controls":o,...i,"data-reach-menu-button":""})});wy.displayName="MenuButton";var hf=v.forwardRef(({as:e="div",...t},n)=>{let{data:{disabled:r},props:o}=ay({...t,ref:n});return v.createElement(e,{role:"menuitem",...o,"aria-disabled":r||void 0,"data-reach-menu-item":""})});hf.displayName="MenuItemImpl";var Sy=v.forwardRef(({as:e="div",...t},n)=>v.createElement(hf,{...t,ref:n,as:e}));Sy.displayName="MenuItem";var xy=v.forwardRef(({as:e="div",...t},n)=>{let{data:{activeDescendant:r,triggerId:o},props:i}=ly({...t,ref:n});return v.createElement(e,{"aria-activedescendant":r,"aria-labelledby":o||void 0,role:"menu",...i,"data-reach-menu-items":""})});xy.displayName="MenuItems";var jO=v.forwardRef(({as:e="a",component:t,onSelect:n,...r},o)=>(v.useEffect(()=>{t&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[t]),v.createElement(hf,{...r,ref:o,"data-reach-menu-link":"",as:e,isLink:!0,onSelect:n||uf})));jO.displayName="MenuLink";var Ey=v.forwardRef(({portal:e=!0,...t},n)=>v.createElement(Cy,{portal:e},v.createElement(xy,{...t,ref:n,"data-reach-menu-list":""})));Ey.displayName="MenuList";var Cy=v.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=uy({...t,ref:n}),a={"data-reach-menu-popover":""};return r?v.createElement(ff,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):v.createElement(e,{...s,...a})});Cy.displayName="MenuPopover";var ky=v.forwardRef(function({as:t="span",style:n={},...r},o){return v.createElement(t,{ref:o,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal",...n},...r})});ky.displayName="VisuallyHidden";var AO=100,FO=500,Au={initial:"IDLE",states:{IDLE:{enter:sl,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:zO,leave:BO,on:{MOUSE_MOVE:"FOCUSED",MOUSE_LEAVE:"IDLE",MOUSE_DOWN:"DISMISSED",BLUR:"IDLE",REST:"VISIBLE"}},VISIBLE:{on:{FOCUS:"FOCUSED",MOUSE_ENTER:"FOCUSED",MOUSE_LEAVE:"LEAVING_VISIBLE",BLUR:"LEAVING_VISIBLE",MOUSE_DOWN:"DISMISSED",SELECT_WITH_KEYBOARD:"DISMISSED",GLOBAL_MOUSE_MOVE:"LEAVING_VISIBLE"}},LEAVING_VISIBLE:{enter:WO,leave:()=>{VO(),sl()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{sl()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},Ge={value:Au.initial,context:{id:null}},Ji=[];function UO(e){return Ji.push(e),()=>{Ji.splice(Ji.indexOf(e),1)}}function $O(){Ji.forEach(e=>e(Ge))}var Fu;function zO(){window.clearTimeout(Fu),Fu=window.setTimeout(()=>{rt({type:"REST"})},AO)}function BO(){window.clearTimeout(Fu)}var Uu;function WO(){window.clearTimeout(Uu),Uu=window.setTimeout(()=>rt({type:"TIME_COMPLETE"}),FO)}function VO(){window.clearTimeout(Uu)}function sl(){Ge.context.id=null}function HO({id:e,onPointerEnter:t,onPointerMove:n,onPointerLeave:r,onPointerDown:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onMouseDown:l,onFocus:u,onBlur:c,onKeyDown:d,disabled:f,ref:g,DEBUG_STYLE:y}={}){let w=String(ty(e)),[k,m]=v.useState(y?!0:Hp(w,!0)),p=v.useRef(null),h=$n(g,p),E=Bs(p,{observe:k});v.useEffect(()=>UO(()=>{m(Hp(w))}),[w]),v.useEffect(()=>{let F=cn(p.current);function C(_){(_.key==="Escape"||_.key==="Esc")&&Ge.value==="VISIBLE"&&rt({type:"SELECT_WITH_KEYBOARD"})}return F.addEventListener("keydown",C),()=>F.removeEventListener("keydown",C)},[]),GO({disabled:f,isVisible:k,ref:p});function b(F,C){return typeof window<"u"&&"PointerEvent"in window?F:ie(F,C)}function O(F){return function(_){_.pointerType==="mouse"&&F(_)}}function P(){rt({type:"MOUSE_ENTER",id:w})}function x(){rt({type:"MOUSE_MOVE",id:w})}function R(){rt({type:"MOUSE_LEAVE"})}function L(){Ge.context.id===w&&rt({type:"MOUSE_DOWN"})}function D(){window.__REACH_DISABLE_TOOLTIPS||rt({type:"FOCUS",id:w})}function A(){Ge.context.id===w&&rt({type:"BLUR"})}function j(F){(F.key==="Enter"||F.key===" ")&&rt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":k?kr("tooltip",w):void 0,"data-state":k?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:h,onPointerEnter:ie(t,O(P)),onPointerMove:ie(n,O(x)),onPointerLeave:ie(r,O(R)),onPointerDown:ie(o,O(L)),onMouseEnter:b(i,P),onMouseMove:b(s,x),onMouseLeave:b(a,R),onMouseDown:b(l,L),onFocus:ie(u,D),onBlur:ie(c,A),onKeyDown:ie(d,j)},{id:w,triggerRect:E,isVisible:k},k]}var mf=v.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},s){let a=v.Children.only(e);v.useEffect(()=>{n&&console.warn("The `ariaLabel prop is deprecated and will be removed from @reach/tooltip in a future version of Reach UI. Please use `aria-label` instead.")},[n]);let[l,u]=HO({id:r,onPointerEnter:a.props.onPointerEnter,onPointerMove:a.props.onPointerMove,onPointerLeave:a.props.onPointerLeave,onPointerDown:a.props.onPointerDown,onMouseEnter:a.props.onMouseEnter,onMouseMove:a.props.onMouseMove,onMouseLeave:a.props.onMouseLeave,onMouseDown:a.props.onMouseDown,onFocus:a.props.onFocus,onBlur:a.props.onBlur,onKeyDown:a.props.onKeyDown,disabled:a.props.disabled,ref:a.ref,DEBUG_STYLE:o});return v.createElement(v.Fragment,null,v.cloneElement(a,l),v.createElement(_y,{ref:s,label:t,"aria-label":n,...u,...i}))});mf.displayName="Tooltip";var _y=v.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},s){return r?v.createElement(cf,null,v.createElement(Oy,{ref:s,label:t,"aria-label":n,isVisible:r,...i,id:kr("tooltip",String(o))})):null});_y.displayName="TooltipPopup";var Oy=v.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:s,position:a=qO,style:l,triggerRect:u,...c},d){let f=(n||t)!=null,g=v.useRef(null),y=$n(d,g),w=Bs(g,{observe:i});return v.createElement(v.Fragment,null,v.createElement(r,{role:f?void 0:"tooltip",...c,ref:y,"data-reach-tooltip":"",id:f?void 0:o,style:{...l,...QO(a,u,w)}},s),f&&v.createElement(ky,{role:"tooltip",id:o},n||t))});Oy.displayName="TooltipContent";function QO(e,t,n){return n?e(t,n):{visibility:"hidden"}}var KO=8,qO=(e,t,n=KO)=>{let{width:r,height:o}=I_();if(!e||!t)return{};let i={top:e.top-t.height<0,right:r{if(!(typeof window<"u"&&"PointerEvent"in window)||!e||!t)return;let r=cn(n.current);function o(i){t&&(i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||rt({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function rt(e){let{value:t,context:n,changed:r}=YO(Ge,e);r&&(Ge={value:t,context:n},$O())}function YO(e,t){let n=Au.states[e.value],r=n&&n.on&&n.on[t.type];if(!r)return{...e,changed:!1};n&&n.leave&&n.leave(e.context,t);const{type:o,...i}=t;let s={...Ge.context,...i},a=typeof r=="string"?r:r.target,l=Au.states[a];return l&&l.enter&&l.enter(e.context,t),{value:a,context:s,changed:!0}}function Hp(e,t){return Ge.context.id===e&&(t?Ge.value==="VISIBLE":Ge.value==="VISIBLE"||Ge.value==="LEAVING_VISIBLE")}function JO(e){let t={};const n={},r={};function o(l="default"){return n[l]=e(l).then(u=>{delete n[l],t[l]=u}).catch(u=>{r[l]=u}),n[l]}function i(l="default"){t[l]!==void 0||n[l]||o(l)}function s(l="default"){if(t[l]!==void 0)return t[l];throw r[l]?r[l]:n[l]?n[l]:o(l)}function a(l){l?delete t[l]:t={}}return{preload:i,read:s,clear:a}}const gf=JO(()=>xt(()=>import("./index-0d511031.js"),[],import.meta.url)),XO="_checkWrapper_1nrct_45",ZO="_active_1nrct_51",Qp={checkWrapper:XO,active:ZO};function eP({theme:e,dispatch:t}){const{t:n}=Uo(),r=v.useMemo(()=>{switch(e){case"dark":return S.jsx(Kp,{});case"auto":return S.jsx(nP,{});case"light":return S.jsx(tP,{});default:return console.assert(!1,"Unknown theme"),S.jsx(Kp,{})}},[e]),o=v.useCallback(i=>t(AC(i)),[t]);return S.jsxs(yy,{children:[S.jsx(mf,{label:n("switch_theme"),"aria-label":"switch theme",children:S.jsx(wy,{children:r})}),S.jsxs(Ey,{children:[S.jsx(al,{value:"auto",label:"Auto",active:e==="auto",onSelect:o}),S.jsx(al,{value:"dark",label:"Dark",active:e==="dark",onSelect:o}),S.jsx(al,{value:"light",label:"Light",active:e==="light",onSelect:o})]})]})}function al(e){const t=It(Qp.checkWrapper,{[Qp.active]:e.active});return S.jsxs(Sy,{onSelect:()=>e.onSelect(e.value),children:[S.jsx("span",{className:t,children:S.jsx(O2,{size:14})}),S.jsx("span",{children:e.label})]})}function Kp(){const t=gf.read().motion;return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx(t.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})})}function tP(){const t=gf.read().motion;return S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("circle",{cx:"12",cy:"12",r:"5"}),S.jsxs(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[S.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),S.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),S.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),S.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),S.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),S.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),S.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),S.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function nP(){const t=gf.read().motion;return S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("circle",{cx:"12",cy:"12",r:"11"}),S.jsx("clipPath",{id:"cut-off-bottom",children:S.jsx(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),S.jsx("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const rP=e=>({theme:rf(e)}),Py=hn(rP)(eP),$u=0;class oP extends Error{constructor(t,n){super(t),this.message=t,this.code=n}}const zu={[$u]:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};function iP(e){const{code:t}=e;return typeof t=="number"?zu[t]:zu.default}const sP="_content_b98hm_1",aP="_container_b98hm_16",lP="_overlay_b98hm_22",uP="_fixed_b98hm_26",Di={content:sP,container:aP,overlay:lP,fixed:uP},cP="_overlay_1i06e_1",fP="_content_1i06e_10",qp={overlay:cP,content:fP};function dP({isOpen:e,onRequestClose:t,className:n,overlayClassName:r,children:o,...i}){const s=It(n,qp.content),a=It(r,qp.overlay);return S.jsx(Ag,{isOpen:e,onRequestClose:t,className:s,overlayClassName:a,...i,children:o})}const pP=v.memo(dP),{useCallback:hP,useEffect:mP}=Et;function gP({dispatch:e,apiConfig:t,modals:n}){if(!window.fetch){const{detail:o}=zu[$u];throw new oP(o,$u)}const r=hP(()=>{e(kC("apiConfig"))},[e]);return mP(()=>{e(Lv(t))},[e,t]),S.jsxs(pP,{isOpen:n.apiConfig,className:Di.content,overlayClassName:Di.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:r,children:[S.jsx("div",{className:Di.container,children:S.jsx(Kv,{})}),S.jsx("div",{className:Di.fixed,children:S.jsx(Py,{})})]})}const vP=e=>({modals:e.modals,apiConfig:Yo(e)}),yP=hn(vP)(gP),wP={hasProcessPath:!1},SP=v.createContext(wP),xP="_root_4m2cd_1",EP="_yacd_4m2cd_14",CP="_link_4m2cd_23",ll={root:xP,yacd:EP,link:CP};function kP({width:e=24,height:t=24}={}){return S.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:S.jsx("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})})}const _P="https://github.com/haishanh/yacd/issues";function OP({message:e,detail:t}){return S.jsxs("div",{className:ll.root,children:[S.jsx("div",{className:ll.yacd,children:S.jsx(lf,{width:150,height:150})}),e?S.jsx("h1",{children:e}):null,t?S.jsx("p",{children:t}):null,S.jsx("p",{children:S.jsxs("a",{className:ll.link,href:_P,children:[S.jsx(kP,{width:16,height:16}),"haishanh/yacd"]})})]})}class PP extends v.Component{constructor(){super(...arguments);yf(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){if(this.state.error){const{message:n,detail:r}=iP(this.state.error);return S.jsx(OP,{message:n,detail:r})}else return this.props.children}}const bP="_root_4oasi_1",RP="_chart_4oasi_10",Gp={root:bP,chart:RP};var LP=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const vf=Vs(LP);function Yp(e,t,n,r=0,o=!1){for(const s of t)if(vf(n,s.args)){if(o)return;if(s.error)throw s.error;if(s.response)return s.response;throw s.promise}const i={args:n,promise:e(...n).then(s=>i.response=s??!0).catch(s=>i.error=s??"unknown error").then(()=>{r>0&&setTimeout(()=>{const s=t.indexOf(i);s!==-1&&t.splice(s,1)},r)})};if(t.push(i),!o)throw i.promise}function NP(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>vf(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function TP(e,t=0){const n=[];return{read:(...r)=>Yp(e,n,r,t),preload:(...r)=>void Yp(e,n,r,t,!0),clear:(...r)=>NP(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>vf(r,i.args)))==null?void 0:o.response}}}const Jp=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function Ao(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),Jp.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=Jp[t];return e+" "+n}const IP=TP(()=>xt(()=>import("./chart-lib-da3c73a9.js"),[],import.meta.url)),Xp={borderWidth:1,pointRadius:0,tension:.2,fill:!0},DP={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{display:!1,dash:[3,6]},ticks:{callback(e){return Ao(e)+"/s "}}}}},Zp=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}],{useEffect:MP}=W;function jP(e,t,n,r,o={}){MP(()=>{const i=document.getElementById(t).getContext("2d"),s={...DP,...o},a=new e(i,{type:"line",data:n,options:s}),l=r&&r.subscribe(()=>a.update());return()=>{l&&l(),a.destroy()}},[e,t,n,r,o])}const{useMemo:AP}=Et,FP={position:"relative",maxWidth:1e3},UP=e=>({apiConfig:Yo(e),selectedChartStyleIndex:LC(e)}),$P=hn(UP)(zP);function zP({apiConfig:e,selectedChartStyleIndex:t}){const n=IP.read(),r=nf(e),{t:o}=Uo(),i=AP(()=>({labels:r.labels,datasets:[{...Xp,...Zp[t].up,label:o("Up"),data:r.up},{...Xp,...Zp[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return jP(n.Chart,"trafficChart",i,r),S.jsx("div",{style:FP,children:S.jsx("canvas",{id:"trafficChart"})})}const BP="_TrafficNow_hzna1_1",WP="_sec_hzna1_10",Vn={TrafficNow:BP,sec:WP},{useState:by,useEffect:Ry,useCallback:VP}=Et,HP=e=>({apiConfig:Yo(e)}),QP=hn(HP)(KP);function KP({apiConfig:e}){const{t}=Uo(),{upStr:n,downStr:r}=qP(e),{upTotal:o,dlTotal:i,connNumber:s}=GP(e);return S.jsxs("div",{className:Vn.TrafficNow,children:[S.jsxs("div",{className:Vn.sec,children:[S.jsx("div",{children:t("Upload")}),S.jsx("div",{children:n})]}),S.jsxs("div",{className:Vn.sec,children:[S.jsx("div",{children:t("Download")}),S.jsx("div",{children:r})]}),S.jsxs("div",{className:Vn.sec,children:[S.jsx("div",{children:t("Upload Total")}),S.jsx("div",{children:o})]}),S.jsxs("div",{className:Vn.sec,children:[S.jsx("div",{children:t("Download Total")}),S.jsx("div",{children:i})]}),S.jsxs("div",{className:Vn.sec,children:[S.jsx("div",{children:t("Active Connections")}),S.jsx("div",{children:s})]})]})}function qP(e){const[t,n]=by({upStr:"0 B/s",downStr:"0 B/s"});return Ry(()=>nf(e).subscribe(r=>n({upStr:Ao(r.up)+"/s",downStr:Ao(r.down)+"/s"})),[e]),t}function GP(e){const[t,n]=by({upTotal:"0 B",dlTotal:"0 B",connNumber:0}),r=VP(({downloadTotal:o,uploadTotal:i,connections:s})=>{n({upTotal:Ao(i),dlTotal:Ao(o),connNumber:s.length})},[n]);return Ry(()=>Nu(e,r),[e,r]),t}function YP(){const{t:e}=Uo();return S.jsxs("div",{children:[S.jsx(hv,{title:e("Overview")}),S.jsxs("div",{className:Gp.root,children:[S.jsx("div",{children:S.jsx(QP,{})}),S.jsx("div",{className:Gp.chart,children:S.jsx(v.Suspense,{fallback:S.jsx(Mv,{height:"200px"}),children:S.jsx($P,{})})})]})]})}const JP="_lo_pmly2_1",XP={lo:JP};function ZP(){return S.jsx("div",{className:XP.lo,children:S.jsx(lf,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const eb="_app_1s3k7_1",tb="_content_1s3k7_18",Ly={app:eb,content:tb};var Ny={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},eh=W.createContext&&W.createContext(Ny),an=globalThis&&globalThis.__assign||function(){return an=Object.assign||function(e){for(var t,n=1,r=arguments.length;nS.jsx(wb,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),S.jsxs("div",{className:Ht.footer,children:[S.jsx(Py,{}),S.jsx(mf,{label:e("about"),children:S.jsx(cv,{to:"/about",className:Ht.iconWrapper,children:S.jsx(F2,{size:20})})})]})]})}const Eb="_toggle_kjvr5_1",Cb="_input_kjvr5_13",kb="_track_kjvr5_17",xR={toggle:Eb,input:Cb,track:kb},_b="_input_1hkb4_1",ER={input:_b},Ob="_animate_1w0e8_1",CR={animate:Ob,"zap-pulse":"_zap-pulse_1w0e8_1"};function Bu(){return Bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=l)&&this.A(n),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},t.prototype.p=function(n){n.preventDefault(),typeof n.button=="number"&&n.button!==0||(this.I(n.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},t.prototype.v=function(n){n.preventDefault(),this.L(n.clientX)},t.prototype.g=function(n){this.U(n),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},t.prototype.k=function(n){this.X=null,this.I(n.touches[0].clientX)},t.prototype.m=function(n){this.L(n.touches[0].clientX)},t.prototype.M=function(n){n.preventDefault(),this.U(n)},t.prototype.$=function(n){Date.now()-this.l>50&&(this.A(n),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},t.prototype.C=function(){this.u=Date.now()},t.prototype.D=function(){this.setState({j:!0})},t.prototype.O=function(){this.setState({j:!1})},t.prototype.S=function(n){this.H=n},t.prototype.T=function(n){n.preventDefault(),this.H.focus(),this.A(n),this.W&&this.setState({j:!1})},t.prototype.A=function(n){var r=this.props;(0,r.onChange)(!r.checked,n,r.id)},t.prototype.render=function(){var n=this.props,r=n.checked,o=n.disabled,i=n.className,s=n.offColor,a=n.onColor,l=n.offHandleColor,u=n.onHandleColor,c=n.checkedIcon,d=n.uncheckedIcon,f=n.checkedHandleIcon,g=n.uncheckedHandleIcon,y=n.boxShadow,w=n.activeBoxShadow,k=n.height,m=n.width,p=n.borderRadius,h=function(T,F){var C={};for(var _ in T)Object.prototype.hasOwnProperty.call(T,_)&&F.indexOf(_)===-1&&(C[_]=T[_]);return C}(n,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),E=this.state,b=E.h,O=E.N,P=E.j,x={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:k/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},R={height:k,width:m,margin:Math.max(0,(this.t-k)/2),position:"relative",background:nh(b,this.i,this.o,s,a),borderRadius:typeof p=="number"?p:k/2,cursor:o?"default":"pointer",WebkitTransition:O?null:"background 0.25s",MozTransition:O?null:"background 0.25s",transition:O?null:"background 0.25s"},L={height:k,width:Math.min(1.5*k,m-(this.t+k)/2+1),position:"relative",opacity:(b-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:O?null:"opacity 0.25s",MozTransition:O?null:"opacity 0.25s",transition:O?null:"opacity 0.25s"},D={height:k,width:Math.min(1.5*k,m-(this.t+k)/2+1),position:"absolute",opacity:1-(b-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:O?null:"opacity 0.25s",MozTransition:O?null:"opacity 0.25s",transition:O?null:"opacity 0.25s"},A={height:this.t,width:this.t,background:nh(b,this.i,this.o,l,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:typeof p=="number"?p-1:"50%",position:"absolute",transform:"translateX("+b+"px)",top:Math.max(0,(k-this.t)/2),outline:0,boxShadow:P?w:y,border:0,WebkitTransition:O?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:O?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:O?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},j={height:this.t,width:this.t,opacity:Math.max(2*(1-(b-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:O?null:"opacity 0.25s",MozTransition:O?null:"opacity 0.25s",transition:O?null:"opacity 0.25s"},N={height:this.t,width:this.t,opacity:Math.max(2*((b-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:O?null:"opacity 0.25s",MozTransition:O?null:"opacity 0.25s",transition:O?null:"opacity 0.25s"};return W.createElement("div",{className:i,style:x},W.createElement("div",{className:"react-switch-bg",style:R,onClick:o?null:this.T,onMouseDown:function(T){return T.preventDefault()}},c&&W.createElement("div",{style:L},c),d&&W.createElement("div",{style:D},d)),W.createElement("div",{className:"react-switch-handle",style:A,onClick:function(T){return T.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.k,onTouchMove:o?null:this.m,onTouchEnd:o?null:this.M,onTouchCancel:o?null:this.O},g&&W.createElement("div",{style:j},g),f&&W.createElement("div",{style:N},f)),W.createElement("input",Bu({},{type:"checkbox",role:"switch","aria-checked":r,checked:r,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},h,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},t}(v.Component);Xi.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:Pb,checkedIcon:bb,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56};const Rb=Xi.default?Xi.default:Xi;function Lb({checked:e=!1,onChange:t,theme:n,name:r}){const o=n==="dark"?"#393939":"#e9e9e9";return S.jsx(Rb,{onChange:t,checked:e,uncheckedIcon:!1,checkedIcon:!1,offColor:o,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:r})}const kR=hn(e=>({theme:rf(e)}))(Lb),Nb="_ToggleSwitch_10mtp_1",Tb="_slider_10mtp_28",rh={ToggleSwitch:Nb,slider:Tb};function Ib({options:e,value:t,name:n,onChange:r}){const o=v.useMemo(()=>e.map(a=>a.value).indexOf(t),[e,t]),i=v.useCallback(a=>{const l=Math.floor(100/e.length);if(a===e.length-1)return 100-e.length*l+l;if(a>-1)return l},[e]),s=v.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return S.jsxs("div",{className:rh.ToggleSwitch,children:[S.jsx("div",{className:rh.slider,style:s}),e.map((a,l)=>{const u=`${n}-${a.label}`,c=l===0?"":"border-left";return S.jsxs("label",{htmlFor:u,className:c,style:{width:i(l)+"%"},children:[S.jsx("input",{id:u,name:n,type:"radio",value:a.value,checked:t===a.value,onChange:r}),S.jsx("div",{children:a.label})]},u)})]})}W.memo(Ib);const{lazy:ai,Suspense:Iy}=Et,Db=ai(()=>xt(()=>import("./Connections-adb3a6d0.js"),["./Connections-adb3a6d0.js","./useRemainingViewPortHeight-0cb185fe.js","./index-b2af8b42.js","./chevron-down-4da23e9b.js","./Fab-aebb033d.js","./Fab-a434d836.css","./play-3d48a080.js","./Connections-ddae4f70.css"],import.meta.url)),Mb=ai(()=>xt(()=>import("./Config-8af30e1b.js"),["./Config-8af30e1b.js","./logs-367bea05.js","./Select-54a41ffb.js","./Select-3de40504.css","./Config-db1f64eb.css"],import.meta.url)),jb=ai(()=>xt(()=>import("./Logs-9c71a415.js"),["./Logs-9c71a415.js","./index.esm-cd2d54ba.js","./logs-367bea05.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-0cb185fe.js","./Fab-aebb033d.js","./Fab-a434d836.css","./play-3d48a080.js","./Logs-5e5ee0ad.css"],import.meta.url)),Ab=ai(()=>xt(()=>import("./Proxies-ffaa28cd.js"),["./Proxies-ffaa28cd.js","./chevron-down-4da23e9b.js","./Fab-aebb033d.js","./Fab-a434d836.css","./TextFilter-c83c25f0.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-b2af8b42.js","./Select-54a41ffb.js","./Select-3de40504.css","./Proxies-40f80166.css"],import.meta.url)),Fb=ai(()=>xt(()=>import("./Rules-d0c6e66d.js"),["./Rules-d0c6e66d.js","./index.esm-cd2d54ba.js","./TextFilter-c83c25f0.js","./debounce-c1ba2006.js","./TextFilter-ced87fc6.css","./index-b2af8b42.js","./Fab-aebb033d.js","./Fab-a434d836.css","./useRemainingViewPortHeight-0cb185fe.js","./Rules-e11cb70e.css"],import.meta.url)),Ub=[{path:"/",element:S.jsx(YP,{})},{path:"/connections",element:S.jsx(SP.Provider,{value:{hasProcessPath:!1},children:S.jsx(Db,{})})},{path:"/configs",element:S.jsx(Mb,{})},{path:"/logs",element:S.jsx(jb,{})},{path:"/proxies",element:S.jsx(Ab,{})},{path:"/rules",element:S.jsx(Fb,{})},{path:"/about",element:S.jsx(JC,{})},!1].filter(Boolean);function $b(){return av(Ub)}function zb(){return S.jsxs(S.Fragment,{children:[S.jsx(yP,{}),S.jsx(xb,{}),S.jsx("div",{className:Ly.content,children:S.jsx(Iy,{fallback:S.jsx(ZP,{}),children:S.jsx($b,{})})})]})}function Bb(){return av([{path:"/backend",element:S.jsx(Kv,{})},{path:"*",element:S.jsx(zb,{})}])}function Wb({children:e}){const[t]=PE(HC),n=It(Ly.app,{pureBlackDark:t});return S.jsx("div",{className:n,children:e})}const Vb=()=>S.jsx(PP,{children:S.jsx(pC,{initialState:Dk,actions:Mk,children:S.jsx(tE,{client:nk,children:S.jsx(S2,{children:S.jsx(Wb,{children:S.jsx(Iy,{fallback:S.jsx(Mv,{}),children:S.jsx(Bb,{})})})})})})}),Hb=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Qb(e){if("serviceWorker"in navigator){const t=new URL("",window.location.href);if(t.origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=new URL("sw.js",t.href).href;Hb?(Kb(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):Dy(n,e)})}}function Dy(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function Kb(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(o=>{o.unregister().then(()=>{window.location.reload()})}):Dy(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}Gb();const My=document.getElementById("app"),qb=_g(My);function Mi(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function Gb(){Mi(c1),Mi(f1),Mi(d1),Mi(xh)}Ag.setAppElement(My);qb.render(S.jsx(v.StrictMode,{children:S.jsx(Vb,{})}));setTimeout(()=>{xt(()=>import("./index.modern-c58ff412.js"),[],import.meta.url).then(e=>{e&&e.polyfillCountryFlagEmojis("Twemoji Country Flags",xh)}).catch(()=>{})},1);Qb();console.log("Checkout the repo: https://github.com/haishanh/yacd");console.log("Version:","0.3.8");console.log("Commit hash:","88a59be");export{wR as $,LC as A,y_ as B,hv as C,Iv as D,fk as E,lR as F,uR as G,aR as H,z2 as I,tR as J,sR as K,Zb as L,SP as M,We as N,Xb as O,ee as P,CR as Q,W as R,lf as S,SR as T,yR as U,xk as V,HO as W,_y as X,zv as Y,ir as Z,gR as _,Ag as a,mf as a0,rR as a1,oR as a2,iR as a3,pR as a4,hR as a5,vR as a6,mR as a7,gf as a8,NC as a9,Nr as aa,fR as ab,Ek as ac,dR as ad,Qo as ae,uu as af,Mx as ag,ae as ah,Jb as ai,eE as aj,Zx as ak,sE as al,Vs as am,pu as an,mE as ao,uo as ap,hn as b,It as c,cR as d,ER as e,Nu as f,Yo as g,Et as h,IP as i,S as j,Xp as k,Zp as l,qp as m,jP as n,eR as o,Ao as p,Lv as q,v as r,xR as s,Np as t,Uo as u,nR as v,dC as w,PE as x,kR as y,HC as z}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-346cd228.js b/FILES/etc/config/clash/clash-dashboard/assets/index-346cd228.js deleted file mode 100644 index f0c02c0..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-346cd228.js +++ /dev/null @@ -1,9 +0,0 @@ -import{r as m,R as oi}from"./index-dcea5d2f.js";const at=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),_t=m.createContext({}),Xt=m.createContext(null),xe=typeof document<"u",ct=xe?m.useLayoutEffect:m.useEffect,dn=m.createContext({strict:!1});function Qr(t,e,n,s){const{visualElement:i}=m.useContext(_t),o=m.useContext(dn),r=m.useContext(Xt),a=m.useContext(at).reducedMotion,c=m.useRef();s=s||o.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;return m.useInsertionEffect(()=>{u&&u.update(n,r)}),ct(()=>{u&&u.render()}),m.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?ct:m.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function bt(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function to(t,e,n){return m.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):bt(n)&&(n.current=s))},[e])}function zt(t){return typeof t=="string"||Array.isArray(t)}function Pe(t){return typeof t=="object"&&typeof t.start=="function"}const mn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pn=["initial",...mn];function Te(t){return Pe(t.animate)||pn.some(e=>zt(t[e]))}function ai(t){return!!(Te(t)||t.variants)}function eo(t,e){if(Te(t)){const{initial:n,animate:s}=t;return{initial:n===!1||zt(n)?n:void 0,animate:zt(s)?s:void 0}}return t.inherit!==!1?e:{}}function no(t){const{initial:e,animate:n}=eo(t,m.useContext(_t));return m.useMemo(()=>({initial:e,animate:n}),[Xn(e),Xn(n)])}function Xn(t){return Array.isArray(t)?t.join(" "):t}const Yn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Wt={};for(const t in Yn)Wt[t]={isEnabled:e=>Yn[t].some(n=>!!e[n])};function $e(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const Ht=m.createContext({}),ci=m.createContext({}),gn=Symbol.for("motionComponentSymbol");function ui({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&$e(t);function o(a,c){let u;const l={...m.useContext(at),...a,layoutId:so(a)},{isStatic:f}=l,h=no(a),d=s(a,f);if(!f&&xe){h.visualElement=Qr(i,d,l,e);const p=m.useContext(ci),y=m.useContext(dn).strict;h.visualElement&&(u=h.visualElement.loadFeatures(l,y,t,p))}return m.createElement(_t.Provider,{value:h},u&&h.visualElement?m.createElement(u,{visualElement:h.visualElement,...l}):null,n(i,a,to(d,h.visualElement,c),d,f,h.visualElement))}const r=m.forwardRef(o);return r[gn]=i,r}function so({layoutId:t}){const e=m.useContext(Ht).id;return e&&t!==void 0?e+"-"+t:t}function li(t){function e(s,i={}){return ui(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const io=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yn(t){return typeof t!="string"||t.includes("-")?!1:!!(io.indexOf(t)>-1||/[A-Z]/.test(t))}const ue={};function ro(t){Object.assign(ue,t)}const Yt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],J=new Set(Yt);function fi(t,{layout:e,layoutId:n}){return J.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ue[t]||t==="opacity")}const I=t=>!!(t&&t.getVelocity),oo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ao=Yt.length;function co(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),vn=hi("--"),Ke=hi("var(--"),uo=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,lo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,ut=(t,e,n)=>Math.min(Math.max(n,t),e),Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>ut(0,1,t)},ne={...Pt,default:1},Ot=t=>Math.round(t*1e5)/1e5,be=/(-)?([\d]*\.?[\d])+/g,di=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,fo=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function qt(t){return typeof t=="string"}const Zt=t=>({test:e=>qt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Zt("deg"),Z=Zt("%"),S=Zt("px"),ho=Zt("vh"),mo=Zt("vw"),qn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},Zn={...Pt,transform:Math.round},mi={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,size:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:ne,scaleX:ne,scaleY:ne,scaleZ:ne,skew:st,skewX:st,skewY:st,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:kt,originX:qn,originY:qn,originZ:S,zIndex:Zn,fillOpacity:kt,strokeOpacity:kt,numOctaves:Zn};function xn(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let c=!1,u=!1,l=!0;for(const f in e){const h=e[f];if(vn(f)){o[f]=h;continue}const d=mi[f],p=lo(h,d);if(J.has(f)){if(c=!0,r[f]=p,!l)continue;h!==(d.default||0)&&(l=!1)}else f.startsWith("origin")?(u=!0,a[f]=p):i[f]=p}if(e.transform||(c||s?i.transform=co(t.transform,n,l,s):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${f} ${h} ${d}`}}const Pn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pi(t,e,n){for(const s in e)!I(e[s])&&!fi(s,n)&&(t[s]=e[s])}function po({transformTemplate:t},e,n){return m.useMemo(()=>{const s=Pn();return xn(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function go(t,e,n){const s=t.style||{},i={};return pi(i,s,t),Object.assign(i,po(t,e,n)),t.transformValues?t.transformValues(i):i}function yo(t,e,n){const s={},i=go(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const vo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function le(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||vo.has(t)}let gi=t=>!le(t);function yi(t){t&&(gi=e=>e.startsWith("on")?!le(e):t(e))}try{yi(require("@emotion/is-prop-valid").default)}catch{}function xo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(gi(i)||n===!0&&le(i)||!e&&!le(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Jn(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function Po(t,e,n){const s=Jn(e,t.x,t.width),i=Jn(n,t.y,t.height);return`${s} ${i}`}const To={offset:"stroke-dashoffset",array:"stroke-dasharray"},bo={offset:"strokeDashoffset",array:"strokeDasharray"};function So(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?To:bo;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function Tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:c=0,...u},l,f,h){if(xn(t,u,l,h),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:y}=t;d.transform&&(y&&(p.transform=d.transform),delete d.transform),y&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Po(y,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&So(d,r,a,c,!1)}const vi=()=>({...Pn(),attrs:{}}),bn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ao(t,e,n,s){const i=m.useMemo(()=>{const o=vi();return Tn(o,e,{enableHardwareAcceleration:!1},bn(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};pi(o,t.style,t),i.style={...o,...i.style}}return i}function Vo(t=!1){return(n,s,i,{latestValues:o},r)=>{const c=(yn(n)?Ao:yo)(s,o,r,n),l={...xo(s,typeof n=="string",t),...c,ref:i},{children:f}=s,h=m.useMemo(()=>I(f)?f.get():f,[f]);return m.createElement(n,{...l,children:h})}}const Gt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function xi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Pi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ti(t,e,n,s){xi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Pi.has(i)?i:Gt(i),e.attrs[i])}function Sn(t,e){const{style:n}=t,s={};for(const i in n)(I(n[i])||e.style&&I(e.style[i])||fi(i,t))&&(s[i]=n[i]);return s}function bi(t,e){const n=Sn(t,e);for(const s in t)if(I(t[s])||I(e[s])){const i=Yt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[i]=t[s]}return n}function An(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function j(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const fe=t=>Array.isArray(t),Co=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),wo=t=>fe(t)?t[t.length-1]||0:t;function re(t){const e=I(t)?t.get():t;return Co(e)?e.toValue():e}function Mo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Do(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Vn=t=>(e,n)=>{const s=m.useContext(_t),i=m.useContext(Xt),o=()=>Mo(t,e,s,i);return n?o():j(o)};function Do(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=re(o[h]);let{initial:r,animate:a}=t;const c=Te(t),u=ai(t);e&&u&&!c&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||r===!1;const f=l?a:r;return f&&typeof f!="boolean"&&!Pe(f)&&(Array.isArray(f)?f:[f]).forEach(d=>{const p=An(t,d);if(!p)return;const{transitionEnd:y,transition:x,...T}=p;for(const v in T){let g=T[v];if(Array.isArray(g)){const P=l?g.length-1:0;g=g[P]}g!==null&&(i[v]=g)}for(const v in y)i[v]=y[v]}),i}const Eo={useVisualState:Vn({scrapeMotionValuesFromProps:bi,createRenderState:vi,onMount:(t,e,{renderState:n,latestValues:s})=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Tn(n,s,{enableHardwareAcceleration:!1},bn(e.tagName),t.transformTemplate),Ti(e,n)}})},Ro={useVisualState:Vn({scrapeMotionValuesFromProps:Sn,createRenderState:Pn})};function Cn(t,{forwardMotionProps:e=!1},n,s){return{...yn(t)?Eo:Ro,preloadedFeatures:n,useRender:Vo(e),createVisualElement:s,Component:t}}function q(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Si=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Se(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Lo=t=>e=>Si(e)&&t(e,Se(e));function tt(t,e,n,s){return q(t,e,Lo(n),s)}const Fo=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(Fo);function Ai(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Qn=Ai("dragHorizontal"),ts=Ai("dragVertical");function Vi(t){let e=!1;if(t==="y")e=ts();else if(t==="x")e=Qn();else{const n=Qn(),s=ts();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Ci(){const t=Vi(!0);return t?(t(),!1):!0}class ft{constructor(e){this.isMounted=!1,this.node=e}update(){}}const L=t=>t;function Bo(t){let e=[],n=[],s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(c,u=!1,l=!1)=>{const f=l&&i,h=f?e:n;return u&&r.add(c),h.indexOf(c)===-1&&(h.push(c),f&&i&&(s=e.length)),c},cancel:c=>{const u=n.indexOf(c);u!==-1&&n.splice(u,1),r.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.length=0,s=e.length,s)for(let u=0;u(f[h]=Bo(()=>n=!0),f),{}),r=f=>o[f].process(i),a=f=>{n=!1,i.delta=s?1e3/60:Math.max(Math.min(f-i.timestamp,Io),1),i.timestamp=f,i.isProcessing=!0,Bt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},c=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Bt.reduce((f,h)=>{const d=o[h];return f[h]=(p,y=!1,x=!1)=>(n||c(),d.schedule(p,y,x)),f},{}),cancel:f=>Bt.forEach(h=>o[h].cancel(f)),state:i,steps:o}}const{schedule:V,cancel:N,state:k,steps:Ee}=ko(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0);function es(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(o,r)=>{if(o.type==="touch"||Ci())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&V.update(()=>a[s](o,r))};return tt(t.current,n,i,{passive:!t.getProps()[s]})}class Oo extends ft{mount(){this.unmount=ot(es(this.node,!0),es(this.node,!1))}unmount(){}}class jo extends ft{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ot(q(this.node.current,"focus",()=>this.onFocus()),q(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const wi=(t,e)=>e?t===e?!0:wi(t,e.parentElement):!1;function Re(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Se(n))}class Uo extends ft{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.removeEndListeners(),this.isPressing)return;const s=this.node.getProps(),o=tt(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:l}=this.node.getProps();V.update(()=>{wi(this.node.current,a.target)?u&&u(a,c):l&&l(a,c)})},{passive:!(s.onTap||s.onPointerUp)}),r=tt(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Re("up",(c,u)=>{const{onTap:l}=this.node.getProps();l&&V.update(()=>l(c,u))})};this.removeEndListeners(),this.removeEndListeners=q(this.node.current,"keyup",r),Re("down",(a,c)=>{this.startPress(a,c)})},n=q(this.node.current,"keydown",e),s=()=>{this.isPressing&&Re("cancel",(o,r)=>this.cancelPress(o,r))},i=q(this.node.current,"blur",s);this.removeAccessibleListeners=ot(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&V.update(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ci()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&V.update(()=>s(e,n))}mount(){const e=this.node.getProps(),n=tt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=q(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _e=new WeakMap,Le=new WeakMap,No=t=>{const e=_e.get(t.target);e&&e(t)},zo=t=>{t.forEach(No)};function Wo({root:t,...e}){const n=t||document;Le.has(n)||Le.set(n,{});const s=Le.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(zo,{root:t,...e})),s[i]}function Ho(t,e,n){const s=Wo(e);return _e.set(t,n),s.observe(t),()=>{_e.delete(t),s.unobserve(t)}}const Go={some:0,all:1};class $o extends ft{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Go[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),h=u?l:f;h&&h(c)};return Ho(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Ko(e,n))&&this.startObserver()}unmount(){}}function Ko({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Mi={inView:{Feature:$o},tap:{Feature:Uo},focus:{Feature:jo},hover:{Feature:Oo}};function Di(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function Xo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ae(t,e,n){const s=t.getProps();return An(s,e,n!==void 0?n:s.custom,_o(t),Xo(t))}const Ei="framerAppearId",Yo="data-"+Gt(Ei);let Ri=L,Ve=L;const et=t=>t*1e3,_=t=>t/1e3,he={current:!1},Li=t=>Array.isArray(t)&&typeof t[0]=="number";function Fi(t){return!!(!t||typeof t=="string"&&Bi[t]||Li(t)||Array.isArray(t)&&t.every(Fi))}const It=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Bi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:It([0,.65,.55,1]),circOut:It([.55,0,1,.45]),backIn:It([.31,.01,.66,-.59]),backOut:It([.33,1.53,.69,.99])};function Ii(t){if(t)return Li(t)?It(t):Array.isArray(t)?t.map(Ii):Bi[t]}function Xe(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:c}={}){const u={[e]:n};c&&(u.offset=c);const l=Ii(a);return Array.isArray(l)&&(u.easing=l),t.animate(u,{delay:s,duration:i,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function qo(t,{repeat:e,repeatType:n="loop"}){const s=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[s]}const ki=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Zo=1e-7,Jo=12;function Qo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ki(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Zo&&++aQo(o,0,1,t,n);return o=>o===0||o===1?o:ki(i(o),e,s)}const ta=Jt(.42,0,1,1),ea=Jt(0,0,.58,1),Oi=Jt(.42,0,.58,1),ji=t=>Array.isArray(t)&&typeof t[0]!="number",Ui=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ni=t=>e=>1-t(1-e),zi=t=>1-Math.sin(Math.acos(t)),wn=Ni(zi),na=Ui(wn),Wi=Jt(.33,1.53,.69,.99),Mn=Ni(Wi),sa=Ui(Mn),ia=t=>(t*=2)<1?.5*Mn(t):.5*(2-Math.pow(2,-10*(t-1))),ra={linear:L,easeIn:ta,easeInOut:Oi,easeOut:ea,circIn:zi,circInOut:na,circOut:wn,backIn:Mn,backInOut:sa,backOut:Wi,anticipate:ia},Ye=t=>{if(Array.isArray(t)){Ve(t.length===4);const[e,n,s,i]=t;return Jt(e,n,s,i)}else if(typeof t=="string")return ra[t];return t},Dn=(t,e)=>n=>!!(qt(n)&&fo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Hi=(t,e,n)=>s=>{if(!qt(s))return s;const[i,o,r,a]=s.match(be);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},oa=t=>ut(0,255,t),Fe={...Pt,transform:t=>Math.round(oa(t))},gt={test:Dn("rgb","red"),parse:Hi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+Ot(kt.transform(s))+")"};function aa(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const qe={test:Dn("#"),parse:aa,transform:gt.transform},St={test:Dn("hsl","hue"),parse:Hi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ot(e))+", "+Z.transform(Ot(n))+", "+Ot(kt.transform(s))+")"},U={test:t=>gt.test(t)||qe.test(t)||St.test(t),parse:t=>gt.test(t)?gt.parse(t):St.test(t)?St.parse(t):qe.parse(t),transform:t=>qt(t)?t:t.hasOwnProperty("red")?gt.transform(t):St.transform(t)},R=(t,e,n)=>-n*t+n*e+t;function Be(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ca({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Be(c,a,t+1/3),o=Be(c,a,t),r=Be(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const Ie=(t,e,n)=>{const s=t*t;return Math.sqrt(Math.max(0,n*(e*e-s)+s))},ua=[qe,gt,St],la=t=>ua.find(e=>e.test(t));function ns(t){const e=la(t);let n=e.parse(t);return e===St&&(n=ca(n)),n}const Gi=(t,e)=>{const n=ns(t),s=ns(e),i={...n};return o=>(i.red=Ie(n.red,s.red,o),i.green=Ie(n.green,s.green,o),i.blue=Ie(n.blue,s.blue,o),i.alpha=R(n.alpha,s.alpha,o),gt.transform(i))};function fa(t){var e,n;return isNaN(t)&&qt(t)&&(((e=t.match(be))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(di))===null||n===void 0?void 0:n.length)||0)>0}const $i={regex:uo,countKey:"Vars",token:"${v}",parse:L},Ki={regex:di,countKey:"Colors",token:"${c}",parse:U.parse},_i={regex:be,countKey:"Numbers",token:"${n}",parse:Pt.parse};function ke(t,{regex:e,countKey:n,token:s,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,s),t.values.push(...o.map(i)))}function de(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&ke(n,$i),ke(n,Ki),ke(n,_i),n}function Xi(t){return de(t).values}function Yi(t){const{values:e,numColors:n,numVars:s,tokenised:i}=de(t),o=e.length;return r=>{let a=i;for(let c=0;ctypeof t=="number"?0:t;function da(t){const e=Xi(t);return Yi(t)(e.map(ha))}const lt={test:fa,parse:Xi,createTransformer:Yi,getAnimatableNone:da},qi=(t,e)=>n=>`${n>0?e:t}`;function Zi(t,e){return typeof t=="number"?n=>R(t,e,n):U.test(t)?Gi(t,e):t.startsWith("var(")?qi(t,e):Qi(t,e)}const Ji=(t,e)=>{const n=[...t],s=n.length,i=t.map((o,r)=>Zi(o,e[r]));return o=>{for(let r=0;r{const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Zi(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}},Qi=(t,e)=>{const n=lt.createTransformer(e),s=de(t),i=de(e);return s.numVars===i.numVars&&s.numColors===i.numColors&&s.numNumbers>=i.numNumbers?ot(Ji(s.values,i.values),n):qi(t,e)},vt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},ss=(t,e)=>n=>R(t,e,n);function pa(t){return typeof t=="number"?ss:typeof t=="string"?U.test(t)?Gi:Qi:Array.isArray(t)?Ji:typeof t=="object"?ma:ss}function ga(t,e,n){const s=[],i=n||pa(t[0]),o=t.length-1;for(let r=0;re[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=ga(e,s,i),a=r.length,c=u=>{let l=0;if(a>1)for(;lc(ut(t[0],t[o-1],u)):c}function tr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=vt(0,e,s);t.push(R(n,1,i))}}function En(t){const e=[0];return tr(e,t.length-1),e}function ya(t,e){return t.map(n=>n*e)}function va(t,e){return t.map(()=>e||Oi).splice(0,t.length-1)}function me({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ji(s)?s.map(Ye):Ye(s),o={done:!1,value:e[0]},r=ya(n&&n.length===e.length?n:En(e),t),a=Ce(r,e,{ease:Array.isArray(i)?i:va(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function Rn(t,e){return e?t*(1e3/e):0}const xa=5;function er(t,e,n){const s=Math.max(e-xa,0);return Rn(n-t(s),e-s)}const Oe=.001,Pa=.01,is=10,Ta=.05,ba=1;function Sa({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Ri(t<=et(is));let r=1-e;r=ut(Ta,ba,r),t=ut(Pa,is,_(t)),r<1?(i=u=>{const l=u*r,f=l*t,h=l-n,d=Ze(u,r),p=Math.exp(-f);return Oe-h/d*p},o=u=>{const f=u*r*t,h=f*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-f),y=Ze(Math.pow(u,2),r);return(-i(u)+Oe>0?-1:1)*((h-d)*p)/y}):(i=u=>{const l=Math.exp(-u*t),f=(u-n)*t+1;return-Oe+l*f},o=u=>{const l=Math.exp(-u*t),f=(n-u)*(t*t);return l*f});const a=5/t,c=Va(i,o,a);if(t=et(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Aa=12;function Va(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Ma(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!rs(t,wa)&&rs(t,Ca)){const n=Sa(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function Ln({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:l,duration:f,isResolvedFromDuration:h}=Ma(s),d=l?-_(l):0,p=c/(2*Math.sqrt(a*u)),y=o-i,x=_(Math.sqrt(a/u)),T=Math.abs(y)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(p<1){const g=Ze(x,p);v=P=>{const A=Math.exp(-p*x*P);return o-A*((d+p*x*y)/g*Math.sin(g*P)+y*Math.cos(g*P))}}else if(p===1)v=g=>o-Math.exp(-x*g)*(y+(d+x*y)*g);else{const g=x*Math.sqrt(p*p-1);v=P=>{const A=Math.exp(-p*x*P),D=Math.min(g*P,300);return o-A*((d+p*x*y)*Math.sinh(D)+g*y*Math.cosh(D))/g}}return{calculatedDuration:h&&f||null,next:g=>{const P=v(g);if(h)r.done=g>=f;else{let A=d;g!==0&&(p<1?A=er(v,g,P):A=0);const D=Math.abs(A)<=n,C=Math.abs(o-P)<=e;r.done=D&&C}return r.value=r.done?o:P,r}}}function os({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:c,restDelta:u=.5,restSpeed:l}){const f=t[0],h={done:!1,value:f},d=b=>a!==void 0&&bc,p=b=>a===void 0?c:c===void 0||Math.abs(a-b)-y*Math.exp(-b/s),g=b=>T+v(b),P=b=>{const w=v(b),O=g(b);h.done=Math.abs(w)<=u,h.value=h.done?T:O};let A,D;const C=b=>{d(h.value)&&(A=b,D=Ln({keyframes:[h.value,p(h.value)],velocity:er(g,b,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:l}))};return C(0),{calculatedDuration:null,next:b=>{let w=!1;return!D&&A===void 0&&(w=!0,P(b),C(b)),A!==void 0&&b>A?D.next(b-A):(!w&&P(b),h)}}}const Da=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>N(e),now:()=>k.isProcessing?k.timestamp:performance.now()}},Je=2e4;function Qe(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Je?1/0:e}const Ea={decay:os,inertia:os,tween:me,keyframes:me,spring:Ln};function $t({autoplay:t=!0,delay:e=0,driver:n=Da,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:l,onUpdate:f,...h}){let d=1,p=!1,y,x;const T=()=>{x=new Promise(E=>{y=E})};T();let v;const g=Ea[i]||me;let P;g!==me&&typeof s[0]!="number"&&(P=Ce([0,100],s,{clamp:!1}),s=[0,100]);const A=g({...h,keyframes:s});let D;a==="mirror"&&(D=g({...h,keyframes:[...s].reverse(),velocity:-(h.velocity||0)}));let C="idle",b=null,w=null,O=null;A.calculatedDuration===null&&o&&(A.calculatedDuration=Qe(A));const{calculatedDuration:H}=A;let X=1/0,G=1/0;H!==null&&(X=H+r,G=X*(o+1)-r);let M=0;const F=E=>{if(w===null)return;d>0&&(w=Math.min(w,E)),d<0&&(w=Math.min(E-G/d,w)),b!==null?M=b:M=Math.round(E-w)*d;const nt=M-e*(d>=0?1:-1),te=d>=0?nt<0:nt>G;M=Math.max(nt,0),C==="finished"&&b===null&&(M=G);let Hn=M,Gn=A;if(o){const De=M/X;let ee=Math.floor(De),ht=De%1;!ht&&De>=1&&(ht=1),ht===1&&ee--,ee=Math.min(ee,o+1);const Kn=!!(ee%2);Kn&&(a==="reverse"?(ht=1-ht,r&&(ht-=r/X)):a==="mirror"&&(Gn=D));let _n=ut(0,1,ht);M>G&&(_n=a==="reverse"&&Kn?1:0),Hn=_n*X}const Et=te?{done:!1,value:s[0]}:Gn.next(Hn);P&&(Et.value=P(Et.value));let{done:$n}=Et;!te&&H!==null&&($n=d>=0?M>=G:M<=0);const Jr=b===null&&(C==="finished"||C==="running"&&$n);return f&&f(Et.value),Jr&&Qt(),Et},$=()=>{v&&v.stop(),v=void 0},Q=()=>{C="idle",$(),y(),T(),w=O=null},Qt=()=>{C="finished",l&&l(),$(),y()},Mt=()=>{if(p)return;v||(v=n(F));const E=v.now();c&&c(),b!==null?w=E-b:(!w||C==="finished")&&(w=E),C==="finished"&&T(),O=w,b=null,C="running",v.start()};t&&Mt();const Dt={then(E,nt){return x.then(E,nt)},get time(){return _(M)},set time(E){E=et(E),M=E,b!==null||!v||d===0?b=E:w=v.now()-E/d},get duration(){const E=A.calculatedDuration===null?Qe(A):A.calculatedDuration;return _(E)},get speed(){return d},set speed(E){E===d||!v||(d=E,Dt.time=_(M))},get state(){return C},play:Mt,pause:()=>{C="paused",b=M},stop:()=>{p=!0,C!=="idle"&&(C="idle",u&&u(),Q())},cancel:()=>{O!==null&&F(O),Q()},complete:()=>{C="finished"},sample:E=>(w=0,F(E))};return Dt}function nr(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ra=nr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),La=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),se=10,Fa=2e4,Ba=(t,e)=>e.type==="spring"||t==="backgroundColor"||!Fi(e.ease);function Ia(t,e,{onUpdate:n,onComplete:s,...i}){if(!(Ra()&&La.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let r=!1,a,c;const u=()=>{c=new Promise(v=>{a=v})};u();let{keyframes:l,duration:f=300,ease:h,times:d}=i;if(Ba(e,i)){const v=$t({...i,repeat:0,delay:0});let g={done:!1,value:l[0]};const P=[];let A=0;for(;!g.done&&Ap.cancel(),x=()=>{V.update(y),a(),u()};return p.onfinish=()=>{t.set(qo(l,i)),s&&s(),x()},{then(v,g){return c.then(v,g)},attachTimeline(v){return p.timeline=v,p.onfinish=null,L},get time(){return _(p.currentTime||0)},set time(v){p.currentTime=et(v)},get speed(){return p.playbackRate},set speed(v){p.playbackRate=v},get duration(){return _(f)},play:()=>{r||(p.play(),N(y))},pause:()=>p.pause(),stop:()=>{if(r=!0,p.playState==="idle")return;const{currentTime:v}=p;if(v){const g=$t({...i,autoplay:!1});t.setWithVelocity(g.sample(v-se).value,g.sample(v).value,se)}x()},complete:()=>p.finish(),cancel:x}}function ka({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:L,pause:L,stop:L,then:o=>(o(),Promise.resolve()),cancel:L,complete:L});return e?$t({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const Oa={type:"spring",stiffness:500,damping:25,restSpeed:10},ja=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ua={type:"keyframes",duration:.8},Na={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},za=(t,{keyframes:e})=>e.length>2?Ua:J.has(t)?t.startsWith("scale")?ja(e[1]):Oa:Na,tn=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lt.test(e)||e==="0")&&!e.startsWith("url(")),Wa=new Set(["brightness","contrast","saturate","opacity"]);function Ha(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(be)||[];if(!s)return t;const i=n.replace(s,"");let o=Wa.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Ga=/([a-z-]*)\(.*?\)/g,en={...lt,getAnimatableNone:t=>{const e=t.match(Ga);return e?e.map(Ha).join(" "):t}},$a={...mi,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:en,WebkitFilter:en},Fn=t=>$a[t];function sr(t,e){let n=Fn(t);return n!==en&&(n=lt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ir=t=>/^0[^.\s]+$/.test(t);function Ka(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ir(t)}function _a(t,e,n,s){const i=tn(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=s.from!==void 0?s.from:t.get();let a;const c=[];for(let u=0;ui=>{const o=rr(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a=a-et(r);const c=_a(e,t,n,o),u=c[0],l=c[c.length-1],f=tn(t,u),h=tn(t,l);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Xa(o)||(d={...d,...za(t,d)}),d.duration&&(d.duration=et(d.duration)),d.repeatDelay&&(d.repeatDelay=et(d.repeatDelay)),!f||!h||he.current||o.type===!1)return ka(he.current?{...d,delay:0}:d);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=Ia(e,t,d);if(p)return p}return $t(d)};function pe(t){return!!(I(t)&&t.add)}const Ya=t=>/^\-?\d*\.?\d+$/.test(t);function we(t,e){t.indexOf(e)===-1&&t.push(e)}function Ct(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function qa([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&sCt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t));class or{constructor(e,n={}){this.version="10.15.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{this.prev=this.current,this.current=s;const{delta:o,timestamp:r}=k;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,V.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>V.postRender(this.velocityCheck),this.velocityCheck=({timestamp:s})=>{s!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Za(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new In);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=e,this.timeDelta=s}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Rn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function K(t,e){return new or(t,e)}const ar=t=>e=>e.test(t),Ja={test:t=>t==="auto",parse:t=>t},cr=[Pt,S,Z,st,mo,ho,Ja],Rt=t=>cr.find(ar(t)),Qa=[...cr,U,lt],tc=t=>Qa.find(ar(t));function ec(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,K(n))}function kn(t,e){const n=Ae(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const r in o){const a=wo(o[r]);ec(t,r,a)}}function nn(t,e){[...e].reverse().forEach(s=>{const i=t.getVariant(s);i&&kn(t,i),t.variantChildren&&t.variantChildren.forEach(o=>{nn(o,e)})})}function nc(t,e){if(Array.isArray(e))return nn(t,e);if(typeof e=="string")return nn(t,[e]);kn(t,e)}function ur(t,e,n){var s,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;ac.remove(f))),u.push(y)}return r&&Promise.all(u).then(()=>{r&&kn(t,r)}),u}function sn(t,e,n={}){const s=Ae(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(On(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:f}=i;return rc(t,e,u+c,l,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function rc(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,c=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(oc).forEach((u,l)=>{u.notify("AnimationStart",e),r.push(sn(u,e,{...o,delay:n+c(l)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function oc(t,e){return t.sortNodePosition(e)}function jn(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>sn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=sn(t,e,n);else{const i=typeof e=="function"?Ae(t,e,n.custom):e;s=Promise.all(On(t,i,n))}return s.then(()=>t.notify("AnimationComplete",e))}const ac=[...mn].reverse(),cc=mn.length;function uc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>jn(t,n,s)))}function lc(t){let e=uc(t);const n=hc();let s=!0;const i=(c,u)=>{const l=Ae(t,u);if(l){const{transition:f,transitionEnd:h,...d}=l;c={...c,...d,...h}}return c};function o(c){e=c(t)}function r(c,u){const l=t.getProps(),f=t.getVariantContext(!0)||{},h=[],d=new Set;let p={},y=1/0;for(let T=0;Ty&&A;const O=Array.isArray(P)?P:[P];let H=O.reduce(i,{});D===!1&&(H={});const{prevResolvedValues:X={}}=g,G={...X,...H},M=F=>{w=!0,d.delete(F),g.needsAnimating[F]=!0};for(const F in G){const $=H[F],Q=X[F];p.hasOwnProperty(F)||($!==Q?fe($)&&fe(Q)?!Di($,Q)||b?M(F):g.protectedKeys[F]=!0:$!==void 0?M(F):d.add(F):$!==void 0&&d.has(F)?M(F):g.protectedKeys[F]=!0)}g.prevProp=P,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),s&&t.blockInitialAnimation&&(w=!1),w&&!C&&h.push(...O.map(F=>({animation:F,options:{type:v,...c}})))}if(d.size){const T={};d.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(T[v]=g)}),h.push({animation:T})}let x=!!h.length;return s&&l.initial===!1&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(h):Promise.resolve()}function a(c,u,l){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(d=>{var p;return(p=d.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=r(l,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function fc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Di(e,t):!1}function dt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hc(){return{animate:dt(!0),whileInView:dt(),whileHover:dt(),whileTap:dt(),whileDrag:dt(),whileFocus:dt(),exit:dt()}}class dc extends ft{constructor(e){super(e),e.animationState||(e.animationState=lc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Pe(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let mc=0;class pc extends ft{constructor(){super(...arguments),this.id=mc++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:s}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:s??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const fr={animation:{Feature:dc},exit:{Feature:pc}},as=(t,e)=>Math.abs(t-e);function gc(t,e){const n=as(t.x,e.x),s=as(t.y,e.y);return Math.sqrt(n**2+s**2)}class hr{constructor(e,n,{transformPagePoint:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Ue(this.lastMoveEventInfo,this.history),l=this.startEvent!==null,f=gc(u.offset,{x:0,y:0})>=3;if(!l&&!f)return;const{point:h}=u,{timestamp:d}=k;this.history.push({...h,timestamp:d});const{onStart:p,onMove:y}=this.handlers;l||(p&&p(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,l)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=je(l,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(u,l)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:h}=this.handlers,d=Ue(u.type==="pointercancel"?this.lastMoveEventInfo:je(l,this.transformPagePoint),this.history);this.startEvent&&f&&f(u,d),h&&h(u,d)},!Si(e))return;this.handlers=n,this.transformPagePoint=s;const i=Se(e),o=je(i,this.transformPagePoint),{point:r}=o,{timestamp:a}=k;this.history=[{...r,timestamp:a}];const{onSessionStart:c}=n;c&&c(e,Ue(o,this.history)),this.removeListeners=ot(tt(window,"pointermove",this.handlePointerMove),tt(window,"pointerup",this.handlePointerUp),tt(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),N(this.updatePoint)}}function je(t,e){return e?{point:e(t.point)}:t}function cs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ue({point:t},e){return{point:t,delta:cs(t,dr(e)),offset:cs(t,yc(e)),velocity:vc(e,.1)}}function yc(t){return t[0]}function dr(t){return t[t.length-1]}function vc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=dr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function z(t){return t.max-t.min}function rn(t,e=0,n=.01){return Math.abs(t-e)<=n}function us(t,e,n,s=.5){t.origin=s,t.originPoint=R(e.min,e.max,t.origin),t.scale=z(n)/z(e),(rn(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=R(n.min,n.max,t.origin)-t.originPoint,(rn(t.translate)||isNaN(t.translate))&&(t.translate=0)}function jt(t,e,n,s){us(t.x,e.x,n.x,s?s.originX:void 0),us(t.y,e.y,n.y,s?s.originY:void 0)}function ls(t,e,n){t.min=n.min+e.min,t.max=t.min+z(e)}function xc(t,e,n){ls(t.x,e.x,n.x),ls(t.y,e.y,n.y)}function fs(t,e,n){t.min=e.min-n.min,t.max=t.min+z(e)}function Ut(t,e,n){fs(t.x,e.x,n.x),fs(t.y,e.y,n.y)}function Pc(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?R(n,t,s.max):Math.min(t,n)),t}function hs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Tc(t,{top:e,left:n,bottom:s,right:i}){return{x:hs(t.x,n,i),y:hs(t.y,e,s)}}function ds(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=vt(e.min,e.max-s,t.min):s>i&&(n=vt(t.min,t.max-i,e.min)),ut(0,1,n)}function Ac(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const on=.35;function Vc(t=on){return t===!1?t=0:t===!0&&(t=on),{x:ms(t,"left","right"),y:ms(t,"top","bottom")}}function ms(t,e,n){return{min:ps(t,e),max:ps(t,n)}}function ps(t,e){return typeof t=="number"?t:t[e]||0}const gs=()=>({translate:0,scale:1,origin:0,originPoint:0}),At=()=>({x:gs(),y:gs()}),ys=()=>({min:0,max:0}),B=()=>({x:ys(),y:ys()});function Y(t){return[t("x"),t("y")]}function mr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Cc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function wc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Ne(t){return t===void 0||t===1}function an({scale:t,scaleX:e,scaleY:n}){return!Ne(t)||!Ne(e)||!Ne(n)}function mt(t){return an(t)||pr(t)||t.z||t.rotate||t.rotateX||t.rotateY}function pr(t){return vs(t.x)||vs(t.y)}function vs(t){return t&&t!=="0%"}function ge(t,e,n){const s=t-n,i=e*s;return n+i}function xs(t,e,n,s,i){return i!==void 0&&(t=ge(t,i,s)),ge(t,n,s)+e}function cn(t,e=0,n=1,s,i){t.min=xs(t.min,e,n,s,i),t.max=xs(t.max,e,n,s,i)}function gr(t,{x:e,y:n}){cn(t.x,e.translate,e.scale,e.originPoint),cn(t.y,n.translate,n.scale,n.originPoint)}function Mc(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function Ts(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=R(t.min,t.max,o);cn(t,e[n],e[s],r,e.scale)}const Dc=["x","scaleX","originX"],Ec=["y","scaleY","originY"];function Vt(t,e){Ts(t.x,e,Dc),Ts(t.y,e,Ec)}function yr(t,e){return mr(wc(t.getBoundingClientRect(),e))}function Rc(t,e,n){const s=yr(t,n),{scroll:i}=e;return i&&(rt(s.x,i.offset.x),rt(s.y,i.offset.y)),s}const Lc=new WeakMap;class Fc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=B(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{this.stopAnimation(),n&&this.snapToCursor(Se(c,"page").point)},o=(c,u)=>{const{drag:l,dragPropagation:f,onDragStart:h}=this.getProps();if(l&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Vi(l),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(p=>{let y=this.getAxisMotionValue(p).get()||0;if(Z.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[p];T&&(y=z(T)*(parseFloat(y)/100))}}this.originPoint[p]=y}),h&&V.update(()=>h(c,u),!1,!0);const{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:l,dragDirectionLock:f,onDirectionLock:h,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:p}=u;if(f&&this.currentDirection===null){this.currentDirection=Bc(p),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",u.point,p),this.updateAxis("y",u.point,p),this.visualElement.render(),d&&d(c,u)},a=(c,u)=>this.stop(c,u);this.panSession=new hr(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!ie(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Pc(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),{layout:s}=this.visualElement.projection||{},i=this.constraints;e&&bt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Tc(s.layoutBox,e):this.constraints=!1,this.elastic=Vc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Y(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Ac(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Rc(s,i.root,this.visualElement.getTransformPagePoint());let r=bc(i.layout.layoutBox,o);if(n){const a=n(Cc(r));this.hasMutatedConstraints=!!a,a&&(r=mr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=Y(l=>{if(!ie(l,n,this.currentDirection))return;let f=c&&c[l]||{};r&&(f={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[l]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Bn(e,s,0,n))}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Y(n=>{const{drag:s}=this.getProps();if(!ie(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-R(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!bt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Y(r=>{const a=this.getAxisMotionValue(r);if(a){const c=a.get();i[r]=Sc({min:c,max:c},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Y(r=>{if(!ie(r,e,null))return;const a=this.getAxisMotionValue(r),{min:c,max:u}=this.constraints[r];a.set(R(c,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Lc.set(this.visualElement,this);const e=this.visualElement.current,n=tt(e,"pointerdown",c=>{const{drag:u,dragListener:l=!0}=this.getProps();u&&l&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();bt(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=q(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Y(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=on,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ie(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Bc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ic extends ft{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new Fc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const bs=t=>(e,n)=>{t&&V.update(()=>t(e,n))};class kc extends ft{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new hr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:bs(e),onStart:bs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.update(()=>i(o,r))}}}mount(){this.removePointerDownListener=tt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Oc(){const t=m.useContext(Xt);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=m.useId();return m.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}function of(){return jc(m.useContext(Xt))}function jc(t){return t===null?!0:t.isPresent}const oe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Ss(t,e.target.x),s=Ss(t,e.target.y);return`${n}% ${s}%`}},Uc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=lt.parse(t);if(i.length>5)return s;const o=lt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=c;const u=R(a,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Nc extends oi.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;ro(zc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),oe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function vr(t){const[e,n]=Oc(),s=m.useContext(Ht);return oi.createElement(Nc,{...t,layoutGroup:s,switchLayoutGroup:m.useContext(ci),isPresent:e,safeToRemove:n})}const zc={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:Uc},xr=["TopLeft","TopRight","BottomLeft","BottomRight"],Wc=xr.length,As=t=>typeof t=="string"?parseFloat(t):t,Vs=t=>typeof t=="number"||S.test(t);function Hc(t,e,n,s,i,o){i?(t.opacity=R(0,n.opacity!==void 0?n.opacity:1,Gc(s)),t.opacityExit=R(e.opacity!==void 0?e.opacity:1,0,$c(s))):o&&(t.opacity=R(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(vt(t,e,s))}function ws(t,e){t.min=e.min,t.max=e.max}function W(t,e){ws(t.x,e.x),ws(t.y,e.y)}function Ms(t,e,n,s,i){return t-=e,t=ge(t,1/n,s),i!==void 0&&(t=ge(t,1/i,s)),t}function Kc(t,e=0,n=1,s=.5,i,o=t,r=t){if(Z.test(e)&&(e=parseFloat(e),e=R(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=R(o.min,o.max,s);t===o&&(a-=e),t.min=Ms(t.min,e,n,a,i),t.max=Ms(t.max,e,n,a,i)}function Ds(t,e,[n,s,i],o,r){Kc(t,e[n],e[s],e[i],e.scale,o,r)}const _c=["x","scaleX","originX"],Xc=["y","scaleY","originY"];function Es(t,e,n,s){Ds(t.x,e,_c,n?n.x:void 0,s?s.x:void 0),Ds(t.y,e,Xc,n?n.y:void 0,s?s.y:void 0)}function Rs(t){return t.translate===0&&t.scale===1}function Tr(t){return Rs(t.x)&&Rs(t.y)}function Yc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function br(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Ls(t){return z(t.x)/z(t.y)}class qc{constructor(){this.members=[]}add(e){we(this.members,e),e.scheduleRender()}remove(e){if(Ct(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Fs(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:u,rotateY:l}=n;c&&(s+=`rotate(${c}deg) `),u&&(s+=`rotateX(${u}deg) `),l&&(s+=`rotateY(${l}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(s+=`scale(${r}, ${a})`),s||"none"}const Zc=(t,e)=>t.depth-e.depth;class Jc{constructor(){this.children=[],this.isDirty=!1}add(e){we(this.children,e),this.isDirty=!0}remove(e){Ct(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Zc),this.isDirty=!1,this.children.forEach(e)}}function Qc(t,e){const n=performance.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(N(s),t(o-e))};return V.read(s,!0),()=>N(s)}function tu(t){window.MotionDebug&&window.MotionDebug.record(t)}function Sr(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Un(t,e,n){const s=I(t)?t:K(t);return s.start(Bn("",s,e,n)),s.animation}const Bs=["","X","Y","Z"],Is=1e3;let eu=0;const pt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ar({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=eu++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{pt.totalNodes=pt.resolvedTargetDeltas=pt.recalculatedProjection=0,this.nodes.forEach(iu),this.nodes.forEach(uu),this.nodes.forEach(lu),this.nodes.forEach(ru),tu(pt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Qc(h,250),oe.hasAnimatedSinceResize&&(oe.hasAnimatedSinceResize=!1,this.nodes.forEach(Os))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&l&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||pu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=l.getProps(),v=!this.targetLayout||!br(this.targetLayout,p)||d,g=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,g);const P={...rr(y,"layout"),onPlay:x,onComplete:T};(l.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||Os(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,N(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(fu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;lthis.update()))}clearAllSnapshots(){this.nodes.forEach(ou),this.sharedNodes.forEach(hu)}scheduleUpdateProjection(){V.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=P/1e3;js(f.x,r.x,A),js(f.y,r.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),du(this.relativeTarget,this.relativeTargetOrigin,h,A),g&&Yc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=B()),W(g,this.relativeTarget)),y&&(this.animationValues=l,Hc(l,u,this.latestValues,A,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(N(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{oe.hasAnimatedSinceResize=!0,this.currentAnimation=Un(0,Is,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Is),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:l}=r;if(!(!a||!c||!u)){if(this!==r&&this.layout&&u&&Vr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||B();const f=z(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+f;const h=z(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+h}W(a,c),Vt(a,l),jt(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new qc),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:c}=r;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const u={};for(let l=0;l{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ks),this.root.sharedNodes.clear()}}}function nu(t){t.updateLayout()}function su(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(h);h.min=s[f].min,h.max=h.min+d}):Vr(o,n.layoutBox,s)&&Y(f=>{const h=r?n.measuredBox[f]:n.layoutBox[f],d=z(s[f]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+d)});const a=At();jt(a,s,n.layoutBox);const c=At();r?jt(c,t.applyTransform(i,!0),n.measuredBox):jt(c,s,n.layoutBox);const u=!Tr(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:d}=f;if(h&&d){const p=B();Ut(p,n.layoutBox,h.layoutBox);const y=B();Ut(y,s,d.layoutBox),br(p,y)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=p,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:l})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function iu(t){pt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ru(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ou(t){t.clearSnapshot()}function ks(t){t.clearMeasurements()}function au(t){t.isLayoutDirty=!1}function cu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Os(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function uu(t){t.resolveTargetDelta()}function lu(t){t.calcProjection()}function fu(t){t.resetRotation()}function hu(t){t.removeLeadSnapshot()}function js(t,e,n){t.translate=R(e.translate,0,n),t.scale=R(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Us(t,e,n,s){t.min=R(e.min,n.min,s),t.max=R(e.max,n.max,s)}function du(t,e,n,s){Us(t.x,e.x,n.x,s),Us(t.y,e.y,n.y,s)}function mu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const pu={duration:.45,ease:[.4,0,.1,1]},Ns=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),zs=Ns("applewebkit/")&&!Ns("chrome/")?Math.round:L;function Ws(t){t.min=zs(t.min),t.max=zs(t.max)}function gu(t){Ws(t.x),Ws(t.y)}function Vr(t,e,n){return t==="position"||t==="preserve-aspect"&&!rn(Ls(e),Ls(n),.2)}const yu=Ar({attachResizeListener:(t,e)=>q(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),yt={current:void 0},Cr=Ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!yt.current){const t=new yu({});t.mount(window),t.setOptions({layoutScroll:!0}),yt.current=t}return yt.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),wr={pan:{Feature:kc},drag:{Feature:Ic,ProjectionNode:Cr,MeasureLayout:vr}},vu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function xu(t){const e=vu.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}function un(t,e,n=1){const[s,i]=xu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);return o?o.trim():Ke(i)?un(i,e,n+1):i}function Pu(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!Ke(o))return;const r=un(o,s);r&&i.set(r)});for(const i in e){const o=e[i];if(!Ke(o))continue;const r=un(o,s);r&&(e[i]=r,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const Tu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Mr=t=>Tu.has(t),bu=t=>Object.keys(t).some(Mr),Hs=t=>t===Pt||t===S,Gs=(t,e)=>parseFloat(t.split(", ")[e]),$s=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return Gs(i[1],e);{const o=s.match(/^matrix\((.+)\)$/);return o?Gs(o[1],t):0}},Su=new Set(["x","y","z"]),Au=Yt.filter(t=>!Su.has(t));function Vu(t){const e=[];return Au.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:$s(4,13),y:$s(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const Cu=(t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(u=>{a[u]=wt[u](s,o)}),e.render();const c=e.measureViewportBox();return n.forEach(u=>{const l=e.getValue(u);l&&l.jump(a[u]),t[u]=wt[u](c,o)}),t},wu=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Mr);let o=[],r=!1;const a=[];if(i.forEach(c=>{const u=t.getValue(c);if(!t.hasValue(c))return;let l=n[c],f=Rt(l);const h=e[c];let d;if(fe(h)){const p=h.length,y=h[0]===null?1:0;l=h[y],f=Rt(l);for(let x=y;x=0?window.pageYOffset:null,u=Cu(e,t,a);return o.length&&o.forEach(([l,f])=>{t.getValue(l).set(f)}),t.render(),xe&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:s}}else return{target:e,transitionEnd:s}};function Mu(t,e,n,s){return bu(e)?wu(t,e,n,s):{target:e,transitionEnd:s}}const Du=(t,e,n,s)=>{const i=Pu(t,e,s);return e=i.target,s=i.transitionEnd,Mu(t,e,n,s)},ye={current:null},Nn={current:!1};function Dr(){if(Nn.current=!0,!!xe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ye.current=t.matches;t.addListener(e),e()}else ye.current=!1}function Eu(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(I(o))t.addValue(i,o),pe(s)&&s.add(i);else if(I(r))t.addValue(i,K(o,{owner:t})),pe(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,K(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const Kt=new WeakMap,Er=Object.keys(Wt),Ru=Er.length,Ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Lu=pn.length;class Rr{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>V.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.isControllingVariants=Te(n),this.isVariantNode=ai(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...l}=this.scrapeMotionValuesFromProps(n,{});for(const f in l){const h=l[f];a[f]!==void 0&&I(h)&&(h.set(a[f],!1),pe(u)&&u.add(f))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Kt.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Nn.current||Dr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ye.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Kt.delete(this.current),this.projection&&this.projection.unmount(),N(this.notifyUpdate),N(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=J.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.update(this.notifyUpdate,!1,!0),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let c=0;cthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):B()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=K(n,{owner:this}),this.addValue(e,s)),s}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props,i=typeof s=="string"||typeof s=="object"?(n=An(this.props,s))===null||n===void 0?void 0:n[e]:void 0;if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!I(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new In),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Lr extends Rr{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s},{transformValues:i},o){let r=lr(s,e||{},this);if(i&&(n&&(n=i(n)),s&&(s=i(s)),r&&(r=i(r))),o){ur(this,s,r);const a=Du(this,s,r,n);n=a.transitionEnd,s=a.target}return{transition:e,transitionEnd:n,...s}}}function Fu(t){return window.getComputedStyle(t)}class Fr extends Lr{readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}else{const s=Fu(e),i=(vn(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return yr(e,n)}build(e,n,s,i){xn(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Sn(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;I(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){xi(e,n,s,i)}}class Br extends Lr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(J.has(n)){const s=Fn(n);return s&&s.default||0}return n=Pi.has(n)?n:Gt(n),e.getAttribute(n)}measureInstanceViewportBox(){return B()}scrapeMotionValuesFromProps(e,n){return bi(e,n)}build(e,n,s,i){Tn(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ti(e,n,s,i)}mount(e){this.isSVGTag=bn(e.tagName),super.mount(e)}}const zn=(t,e)=>yn(t)?new Br(e,{enableHardwareAcceleration:!1}):new Fr(e,{enableHardwareAcceleration:!0}),Ir={layout:{ProjectionNode:Cr,MeasureLayout:vr}},kr={...fr,...Mi,...wr,...Ir},Or=li((t,e)=>Cn(t,e,kr,zn));function cf(t){return ui(Cn(t,{forwardMotionProps:!1},kr,zn))}const uf=li(Cn);function jr(){const t=m.useRef(!1);return ct(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Wn(){const t=jr(),[e,n]=m.useState(0),s=m.useCallback(()=>{t.current&&n(e+1)},[e]);return[m.useCallback(()=>V.postRender(s),[s]),e]}class Bu extends m.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Iu({children:t,isPresent:e}){const n=m.useId(),s=m.useRef(null),i=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:o,height:r,top:a,left:c}=i.current;if(e||!s.current||!o||!r)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${r}px !important; - top: ${a}px !important; - left: ${c}px !important; - } - `),()=>{document.head.removeChild(u)}},[e]),m.createElement(Bu,{isPresent:e,childRef:s,sizeRef:i},m.cloneElement(t,{ref:s}))}const ze=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r})=>{const a=j(ku),c=m.useId(),u=m.useMemo(()=>({id:c,initial:e,isPresent:n,custom:i,onExitComplete:l=>{a.set(l,!0);for(const f of a.values())if(!f)return;s&&s()},register:l=>(a.set(l,!1),()=>a.delete(l))}),o?void 0:[n]);return m.useMemo(()=>{a.forEach((l,f)=>a.set(f,!1))},[n]),m.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),r==="popLayout"&&(t=m.createElement(Iu,{isPresent:n},t)),m.createElement(Xt.Provider,{value:u},t)};function ku(){return new Map}function Ur(t){return m.useEffect(()=>()=>t(),[])}const Tt=t=>t.key||"";function Ou(t,e){t.forEach(n=>{const s=Tt(n);e.set(s,n)})}function ju(t){const e=[];return m.Children.forEach(t,n=>{m.isValidElement(n)&&e.push(n)}),e}const lf=({children:t,custom:e,initial:n=!0,onExitComplete:s,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:r="sync"})=>{const a=m.useContext(Ht).forceRender||Wn()[0],c=jr(),u=ju(t);let l=u;const f=m.useRef(new Map).current,h=m.useRef(l),d=m.useRef(new Map).current,p=m.useRef(!0);if(ct(()=>{p.current=!1,Ou(u,d),h.current=l}),Ur(()=>{p.current=!0,d.clear(),f.clear()}),p.current)return m.createElement(m.Fragment,null,l.map(v=>m.createElement(ze,{key:Tt(v),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:r},v)));l=[...l];const y=h.current.map(Tt),x=u.map(Tt),T=y.length;for(let v=0;v{if(x.indexOf(g)!==-1)return;const P=d.get(g);if(!P)return;const A=y.indexOf(g);let D=v;if(!D){const C=()=>{d.delete(g),f.delete(g);const b=h.current.findIndex(w=>w.key===g);if(h.current.splice(b,1),!f.size){if(h.current=u,c.current===!1)return;a(),s&&s()}};D=m.createElement(ze,{key:Tt(P),isPresent:!1,onExitComplete:C,custom:e,presenceAffectsLayout:o,mode:r},P),f.set(g,D)}l.splice(A,0,D)}),l=l.map(v=>{const g=v.key;return f.has(g)?v:m.createElement(ze,{key:Tt(v),isPresent:!0,presenceAffectsLayout:o,mode:r},v)}),m.createElement(m.Fragment,null,f.size?l:l.map(v=>m.cloneElement(v)))};function ff({children:t,isValidProp:e,...n}){e&&yi(e),n={...m.useContext(at),...n},n.isStatic=j(()=>n.isStatic);const s=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return m.createElement(at.Provider,{value:s},t)}function hf({children:t,features:e,strict:n=!1}){const[,s]=m.useState(!We(e)),i=m.useRef(void 0);if(!We(e)){const{renderer:o,...r}=e;i.current=o,$e(r)}return m.useEffect(()=>{We(e)&&e().then(({renderer:o,...r})=>{$e(r),i.current=o,s(!0)})},[]),m.createElement(dn.Provider,{value:{renderer:i.current,strict:n}},t)}function We(t){return typeof t=="function"}const Uu=m.createContext(null),Nu=t=>!t.isLayoutDirty&&t.willUpdate(!1);function _s(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Nu);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const Nr=t=>t===!0,zu=t=>Nr(t===!0)||t==="id",Wu=({children:t,id:e,inherit:n=!0})=>{const s=m.useContext(Ht),i=m.useContext(Uu),[o,r]=Wn(),a=m.useRef(null),c=s.id||i;a.current===null&&(zu(n)&&c&&(e=e?c+"-"+e:c),a.current={id:e,group:Nr(n)&&s.group||_s()});const u=m.useMemo(()=>({...a.current,forceRender:o}),[r]);return m.createElement(Ht.Provider,{value:u},t)},zr=m.createContext(null);function Hu(t,e,n,s){if(!s)return t;const i=t.findIndex(l=>l.value===e);if(i===-1)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],c=r.layout,u=R(c.min,c.max,.5);return o===1&&a.layout.max+n>u||o===-1&&a.layout.min+nOr(e)),c=[],u=m.useRef(!1),l={axis:n,registerItem:(f,h)=>{h&&c.findIndex(d=>f===d.value)===-1&&(c.push({value:f,layout:h[n]}),c.sort(_u))},updateOrder:(f,h,d)=>{if(u.current)return;const p=Hu(c,f,h,d);c!==p&&(u.current=!0,s(p.map(Ku).filter(y=>i.indexOf(y)!==-1)))}};return m.useEffect(()=>{u.current=!1}),m.createElement(a,{...o,ref:r,ignoreStrict:!0},m.createElement(zr.Provider,{value:l},t))}const $u=m.forwardRef(Gu);function Ku(t){return t.value}function _u(t,e){return t.layout.min-e.layout.min}function xt(t){const e=j(()=>K(t)),{isStatic:n}=m.useContext(at);if(n){const[,s]=m.useState(t);m.useEffect(()=>e.on("change",s),[])}return e}const Xu=t=>typeof t=="object"&&t.mix,Yu=t=>Xu(t)?t.mix:void 0;function qu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=Ce(i,o,{mixer:Yu(o[0]),...r});return e?a(s):a}function Wr(t,e){const n=xt(e()),s=()=>n.set(e());return s(),ct(()=>{const i=()=>V.update(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),N(s)}}),n}function ln(t,e,n,s){const i=typeof e=="function"?e:qu(e,n,s);return Array.isArray(t)?Xs(t,i):Xs([t],([o])=>i(o))}function Xs(t,e){const n=j(()=>[]);return Wr(t,()=>{n.length=0;const s=t.length;for(let i=0;iOr(s)),u=m.useContext(zr),l={x:Ys(e.x),y:Ys(e.y)},f=ln([l.x,l.y],([x,T])=>x||T?1:"unset"),h=m.useRef(null),{axis:d,registerItem:p,updateOrder:y}=u;return m.useEffect(()=>{p(n,h.current)},[u]),m.createElement(c,{drag:d,...r,dragSnapToOrigin:!0,style:{...e,x:l.x,y:l.y,zIndex:f},layout:o,onDrag:(x,T)=>{const{velocity:v}=T;v[d]&&y(n,l[d].get(),v[d]),i&&i(x,T)},onLayoutMeasure:x=>{h.current=x},ref:a,ignoreStrict:!0},t)}const Ju=m.forwardRef(Zu),df={Group:$u,Item:Ju},Qu={renderer:zn,...fr,...Mi},mf={...Qu,...wr,...Ir};function pf(t,...e){const n=t.length;function s(){let i="";for(let o=0;o{s.current&&s.current.stop()};return m.useInsertionEffect(()=>i.attach((r,a)=>{if(n)return a(r);if(o(),s.current=$t({keyframes:[i.get(),r],velocity:i.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...e,onUpdate:a}),!k.isProcessing){const c=performance.now()-k.timestamp;c<30&&(s.current.time=_(c))}return i.get()},o),[JSON.stringify(e)]),ct(()=>{if(I(t))return t.on("change",r=>i.set(parseFloat(r)))},[i]),i}function tl(t,e,n){m.useInsertionEffect(()=>t.on(e,n),[t,e,n])}function yf(t){const e=xt(t.getVelocity());return tl(t,"velocityChange",n=>{e.set(n)}),e}function Me(t,e,n){var s;if(typeof t=="string"){let i=document;e&&(Ve(!!e.current),i=e.current),n?((s=n[t])!==null&&s!==void 0||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const ae=new WeakMap;let it;function el(t,e){if(e){const{inlineSize:n,blockSize:s}=e[0];return{width:n,height:s}}else return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}function nl({target:t,contentRect:e,borderBoxSize:n}){var s;(s=ae.get(t))===null||s===void 0||s.forEach(i=>{i({target:t,contentSize:e,get size(){return el(t,n)}})})}function sl(t){t.forEach(nl)}function il(){typeof ResizeObserver>"u"||(it=new ResizeObserver(sl))}function rl(t,e){it||il();const n=Me(t);return n.forEach(s=>{let i=ae.get(s);i||(i=new Set,ae.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=ae.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const ce=new Set;let Nt;function ol(){Nt=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ce.forEach(n=>n(e))},window.addEventListener("resize",Nt)}function al(t){return ce.add(t),Nt||ol(),()=>{ce.delete(t),!ce.size&&Nt&&(Nt=void 0)}}function cl(t,e){return typeof t=="function"?al(t):rl(t,e)}const ul=50,qs=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ll=()=>({time:0,x:qs(),y:qs()}),fl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Zs(t,e,n,s){const i=n[e],{length:o,position:r}=fl[e],a=i.current,c=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=vt(0,i.scrollLength,i.current);const u=s-c;i.velocity=u>ul?0:Rn(i.current-a,u)}function hl(t,e,n){Zs(t,"x",e,n),Zs(t,"y",e,n),e.time=n}function dl(t,e){let n={x:0,y:0},s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s instanceof SVGGraphicsElement&&"getBBox"in s){const{top:i,left:o}=s.getBBox();for(n.x+=o,n.y+=i;s&&s.tagName!=="svg";)s=s.parentNode}return n}const ml={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},fn={start:0,center:.5,end:1};function Js(t,e,n=0){let s=0;if(fn[t]!==void 0&&(t=fn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const pl=[0,0];function gl(t,e,n,s){let i=Array.isArray(t)?t:pl,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,fn[t]?t:"0"]),o=Js(i[0],n,s),r=Js(i[1],e),o-r}const yl={x:0,y:0};function vl(t,e,n){let{offset:s=ml.All}=n;const{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?dl(i,t):yl,c=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let l=!e[o].interpolate;const f=s.length;for(let h=0;hxl(t,s.target,n),update:i=>{hl(t,n,i),(s.offset||s.target)&&vl(t,n,s)},notify:()=>e(n)}}const Ft=new WeakMap,Qs=new WeakMap,He=new WeakMap,ti=t=>t===document.documentElement?window:t;function Hr(t,{container:e=document.documentElement,...n}={}){let s=He.get(e);s||(s=new Set,He.set(e,s));const i=ll(),o=Pl(e,t,i,n);if(s.add(o),!Ft.has(e)){const a=()=>{for(const h of s)h.measure()},c=()=>{for(const h of s)h.update(k.timestamp)},u=()=>{for(const h of s)h.notify()},l=()=>{V.read(a,!1,!0),V.update(c,!1,!0),V.update(u,!1,!0)};Ft.set(e,l);const f=ti(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&Qs.set(e,cl(e,l)),f.addEventListener("scroll",l,{passive:!0})}const r=Ft.get(e);return V.read(r,!1,!0),()=>{var a;N(r);const c=He.get(e);if(!c||(c.delete(o),c.size))return;const u=Ft.get(e);Ft.delete(e),u&&(ti(e).removeEventListener("scroll",u),(a=Qs.get(e))===null||a===void 0||a(),window.removeEventListener("resize",u))}}function ei(t,e){Ri(!!(!e||e.current))}const Tl=()=>({scrollX:K(0),scrollY:K(0),scrollXProgress:K(0),scrollYProgress:K(0)});function Gr({container:t,target:e,layoutEffect:n=!0,...s}={}){const i=j(Tl);return(n?ct:m.useEffect)(()=>(ei("target",e),ei("container",t),Hr(({x:r,y:a})=>{i.scrollX.set(r.current),i.scrollXProgress.set(r.progress),i.scrollY.set(a.current),i.scrollYProgress.set(a.progress)},{...s,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0})),[]),i}function vf(t){return Gr({container:t})}function xf(){return Gr()}function bl(t){const e=m.useRef(0),{isStatic:n}=m.useContext(at);m.useEffect(()=>{if(n)return;const s=({timestamp:i,delta:o})=>{e.current||(e.current=i),t(i-e.current,o)};return V.update(s,!0),()=>N(s)},[t])}function Pf(){const t=xt(0);return bl(e=>t.set(e)),t}class Sl extends or{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(e){let n;J.has(e)?(this.transforms.add(e),n="transform"):!e.startsWith("origin")&&!vn(e)&&e!=="willChange"&&(n=Gt(e)),n&&(we(this.members,n),this.update())}remove(e){J.has(e)?(this.transforms.delete(e),this.transforms.size||Ct(this.members,"transform")):Ct(this.members,Gt(e)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function Tf(){return j(()=>new Sl("auto"))}function Al(){!Nn.current&&Dr();const[t]=m.useState(ye.current);return t}function bf(){const t=Al(),{reducedMotion:e}=m.useContext(at);return e==="never"?!1:e==="always"?!0:t}function Vl(t){t.values.forEach(e=>e.stop())}function Cl(){const t=new Set,e={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,s){const i=[];return t.forEach(o=>{i.push(jn(o,n,{transitionOverride:s}))}),Promise.all(i)},set(n){return t.forEach(s=>{nc(s,n)})},stop(){t.forEach(n=>{Vl(n)})},mount(){return()=>{e.stop()}}};return e}function $r(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return V.update(s,!0),()=>N(s)}const Kr=nr(()=>window.ScrollTimeline!==void 0);class _r{constructor(e){this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(Kr()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),$r(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;nn[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function wl(t){return typeof t=="object"&&!Array.isArray(t)}function Ml(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Sr(t)?new Br(e,{enableHardwareAcceleration:!1}):new Fr(e,{enableHardwareAcceleration:!0});n.mount(t),Kt.set(t,n)}function Dl(t,e=100){const n=Ln({keyframes:[0,e],...t}),s=Math.min(Qe(n),Je);return{type:"keyframes",ease:i=>n.next(s*i).value/e,duration:_(s)}}function ni(t,e,n,s){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:(i=s.get(e))!==null&&i!==void 0?i:t}const Xr=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function El(t,e){return ji(t)?t[Xr(0,t.length,e)]:t}function Rl(t,e,n){for(let s=0;se&&i.at{const b=kl(g),{delay:w=0,times:O=En(b),type:H="keyframes",...X}=P;let{ease:G=e.ease||"easeOut",duration:M}=P;const F=typeof w=="function"?w(D,C):w,$=b.length;if($<=2&&H==="spring"){let Dt=100;if($===2&&Ul(b)){const te=b[1]-b[0];Dt=Math.abs(te)}const E={...X};M!==void 0&&(E.duration=et(M));const nt=Dl(E,Dt);G=nt.ease,M=nt.duration}M??(M=i);const Q=l+F,Qt=Q+M;O.length===1&&O[0]===0&&(O[1]=1);const Mt=O.length-b.length;Mt>0&&tr(O,Mt),b.length===1&&b.unshift(null),Ll(A,b,G,O,Q,Qt),T=Math.max(F+M,T),f=Math.max(Qt,f)};if(I(p)){const g=si(p,r);v(y,x,ii("default",g))}else{const g=Me(p,s,a),P=g.length;for(let A=0;A{for(const p in h){const y=h[p];y.sort(Fl);const x=[],T=[],v=[];for(let P=0;Ptypeof t=="number",Ul=t=>t.every(jl);function Yr(t,e,n,s){const i=Me(t,s),o=i.length,r=[];for(let a=0;aArray.isArray(t)&&Array.isArray(t[0]);function zl(t,e,n){const s=[];return Il(t,e,n).forEach(({keyframes:o,transition:r},a)=>{let c;I(a)?c=Un(a,o.default,r.default):c=Yr(a,o,r),s.push(c)}),new _r(s)}const qr=t=>{function e(n,s,i){let o;return Nl(n)?o=zl(n,s,t):wl(s)?o=Yr(n,s,i,t):o=Un(n,s,i),t&&t.animations.push(o),o}return e},Sf=qr();function Af(){const t=j(()=>({current:null,animations:[]})),e=j(()=>qr(t));return Ur(()=>{t.animations.forEach(n=>n.stop())}),[t,e]}function Wl(){const t=j(Cl);return ct(t.mount,[]),t}const Vf=Wl;function Cf(...t){const e=m.useRef(0),[n,s]=m.useState(t[e.current]),i=m.useCallback(o=>{e.current=typeof o!="number"?Xr(0,t.length,e.current+1):o,s(t[e.current])},[t.length,...t]);return[n,i]}const Hl={some:0,all:1};function Gl(t,e,{root:n,margin:s,amount:i="some"}={}){const o=Me(t),r=new WeakMap,a=u=>{u.forEach(l=>{const f=r.get(l.target);if(l.isIntersecting!==!!f)if(l.isIntersecting){const h=e(l);typeof h=="function"?r.set(l.target,h):c.unobserve(l.target)}else f&&(f(l),r.delete(l.target))})},c=new IntersectionObserver(a,{root:n,rootMargin:s,threshold:typeof i=="number"?i:Hl[i]});return o.forEach(u=>c.observe(u)),()=>c.disconnect()}function wf(t,{root:e,margin:n,amount:s,once:i=!1}={}){const[o,r]=m.useState(!1);return m.useEffect(()=>{if(!t.current||i&&o)return;const a=()=>(r(!0),i?void 0:()=>r(!1)),c={root:e&&e.current||void 0,margin:n,amount:s};return Gl(t.current,a,c)},[e,t,n,i]),o}class $l{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const Kl=()=>new $l;function Mf(){return j(Kl)}function Df(t,e,n,s){m.useEffect(()=>{const i=t.current;if(n&&i)return q(i,e,n,s)},[t,e,n,s])}function _l(t){return t!==null&&typeof t=="object"&&gn in t}function Ef(t){if(_l(t))return t[gn]}function Xl(){return Yl}function Yl(t){yt.current&&(yt.current.isUpdating=!1,yt.current.blockUpdate(),t&&t())}function Rf(){const[t,e]=Wn(),n=Xl(),s=m.useRef();return m.useEffect(()=>{V.postRender(()=>V.postRender(()=>{e===s.current&&(he.current=!1)}))},[e]),i=>{n(()=>{he.current=!0,t(),i(),s.current=e+1})}}function Lf(){return m.useCallback(()=>{const e=yt.current;e&&e.resetTree()},[])}const Zr=(t,e)=>`${t}: ${e}`,ve=new Map;function ql(t,e,n,s){const i=Zr(t,J.has(e)?"transform":e),o=ve.get(i);if(!o)return 0;const{animation:r,startTime:a}=o,c=()=>{ve.delete(i);try{r.cancel()}catch{}};return a!==null?(s.render(c),performance.now()-a||0):(c(),0)}function Ff(t,e,n,s,i){const o=t.dataset[Ei];if(!o)return;window.HandoffAppearAnimations=ql;const r=Zr(o,e),a=Xe(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"});ve.set(r,{animation:a,startTime:null});const c=()=>{a.cancel();const u=Xe(t,e,n,s);document.timeline&&(u.startTime=document.timeline.currentTime),ve.set(r,{animation:u,startTime:performance.now()}),i&&i(u)};a.ready?a.ready.then(c).catch(L):c()}const hn=()=>({});class Zl extends Rr{build(){}measureInstanceViewportBox(){return B()}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return hn()}getBaseTargetFromProps(){}readValueFromInstance(e,n,s){return s.initialState[n]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...s}){const i=lr(s,e||{},this);return ur(this,s,i),{transition:e,transitionEnd:n,...s}}}const Jl=Vn({scrapeMotionValuesFromProps:hn,createRenderState:hn});function Bf(t){const[e,n]=m.useState(t),s=Jl({},!1),i=j(()=>new Zl({props:{},visualState:s,presenceContext:null},{initialState:t}));m.useEffect(()=>(i.mount({}),()=>i.unmount()),[i]),m.useEffect(()=>{i.update({onUpdate:r=>{n({...r})}},null)},[n,i]);const o=j(()=>r=>jn(i,r));return[e,o]}const Ql=1e5,ri=t=>t>.001?1/t:Ql;function If(t){let e=xt(1),n=xt(1);const{visualElement:s}=m.useContext(_t);t?(e=t.scaleX||e,n=t.scaleY||n):s&&(e=s.getValue("scaleX",1),n=s.getValue("scaleY",1));const i=ln(e,ri),o=ln(n,ri);return{scaleX:i,scaleY:o}}let tf=0;const kf=({children:t})=>(m.useEffect(()=>{},[]),m.createElement(Wu,{id:j(()=>`asl-${tf++}`)},t));function ef({source:t,axis:e="y"}){const n={value:0},s=Hr(i=>{n.value=i[e].progress*100},{container:t,axis:e});return{currentTime:n,cancel:s}}const Ge=new Map;function nf({source:t=document.documentElement,axis:e="y"}={}){Ge.has(t)||Ge.set(t,{});const n=Ge.get(t);return n[e]||(n[e]=Kr()?new ScrollTimeline({source:t,axis:e}):ef({source:t,axis:e})),n[e]}function Of(t,e){const n=nf(e);return typeof t=="function"?$r(t,n):t.attachTimeline(n)}function sf(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function jf(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:sf(n,o),a=Math.abs(r-i);let c=t*a;if(s){const u=o*t;c=Ye(s)(c/u)*u}return e+c}}const Uf=V,Nf=Bt.reduce((t,e)=>(t[e]=n=>N(n),t),{});export{lf as AnimatePresence,kf as AnimateSharedLayout,Uu as DeprecatedLayoutGroupContext,$l as DragControls,Jc as FlatTree,Wu as LayoutGroup,Ht as LayoutGroupContext,hf as LazyMotion,ff as MotionConfig,at as MotionConfigContext,_t as MotionContext,or as MotionValue,Xt as PresenceContext,df as Reorder,ci as SwitchLayoutGroupContext,Rr as VisualElement,tt as addPointerEvent,Lo as addPointerInfo,ro as addScaleCorrector,Sf as animate,$t as animateValue,jn as animateVisualElement,Cl as animationControls,fr as animations,ia as anticipate,Mn as backIn,sa as backInOut,Wi as backOut,co as buildTransform,z as calcLength,N as cancelFrame,Nf as cancelSync,ur as checkTargetForNewValues,zi as circIn,na as circInOut,wn as circOut,ut as clamp,U as color,lt as complex,B as createBox,cf as createDomMotionComponent,ui as createMotionComponent,qr as createScopedAnimate,Jt as cubicBezier,Qc as delay,as as distance,gc as distance2D,Qu as domAnimation,mf as domMax,ta as easeIn,Oi as easeInOut,ea as easeOut,xo as filterProps,V as frame,k as frameData,Gl as inView,Ce as interpolate,Ve as invariant,xe as isBrowser,Ci as isDragActive,_l as isMotionComponent,I as isMotionValue,le as isValidMotionProp,uf as m,Vn as makeUseVisualState,Ui as mirrorEasing,R as mix,Or as motion,K as motionValue,Yo as optimizedAppearDataAttribute,ot as pipe,vt as progress,S as px,re as resolveMotionValue,Ni as reverseEasing,Of as scroll,Hr as scrollInfo,Ln as spring,jf as stagger,Ff as startOptimizedAppearAnimation,Ee as steps,Uf as sync,qu as transform,Ef as unwrapMotionComponent,Af as useAnimate,Vf as useAnimation,Wl as useAnimationControls,bl as useAnimationFrame,Cf as useCycle,Bf as useDeprecatedAnimatedState,If as useDeprecatedInvertedScale,Df as useDomEvent,Mf as useDragControls,vf as useElementScroll,Wn as useForceUpdate,wf as useInView,Xl as useInstantLayoutTransition,Rf as useInstantTransition,of as useIsPresent,ct as useIsomorphicLayoutEffect,pf as useMotionTemplate,xt as useMotionValue,tl as useMotionValueEvent,Oc as usePresence,Al as useReducedMotion,bf as useReducedMotionConfig,Lf as useResetProjection,Gr as useScroll,gf as useSpring,Pf as useTime,ln as useTransform,Ur as useUnmountEffect,yf as useVelocity,xf as useViewportScroll,Tf as useWillChange,Kt as visualElementStore,Ri as warning,Xr as wrap}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-4697f19f.css b/FILES/etc/config/clash/clash-dashboard/assets/index-4697f19f.css deleted file mode 100644 index 8fd9e43..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-4697f19f.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */*,:before,:after{box-sizing:border-box}html{font-family:system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";line-height:1.15;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4}body{margin:0}hr{height:0;color:inherit}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}.relative,.border-left,.border-top,.border-bottom{position:relative}.border-bottom:after,.border-top:before{position:absolute;content:"";height:1px;width:100%;-webkit-transform:scaleY(.5) translateZ(0);transform:scaleY(.5) translateZ(0);left:0;right:0;background:#555}.border-left:before{position:absolute;content:"";height:100%;width:1px;-webkit-transform:scaleX(.5) translateZ(0);transform:scaleX(.5) translateZ(0);top:0;bottom:0;background:#555}.border-top:before{top:0}.border-bottom:after{bottom:0}.border-left:before{left:0}*,*:before,*:after{box-sizing:border-box}:root{--font-mono: "Roboto Mono", Menlo, monospace;--font-normal: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Apple Color Emoji, Twemoji Country Flags, Segoe UI Emoji, Segoe UI Symbol, "PingFang SC", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--color-focus-blue: #1a73e8;--btn-bg: #387cec}body{font-family:var(--font-normal);-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;padding:0}@media (prefers-color-scheme: dark){:root[data-theme=auto]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #282828;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;color-scheme:dark}}@media (prefers-color-scheme: light){:root[data-theme=auto]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #f5f5f5;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;color-scheme:light}}:root[data-theme=dark]{--color-background: #202020;--color-background2: rgba(32, 32, 32, .3);--color-bg-card: #2d2d2d;--card-hover-border-lightness: 30%;--color-text: #ddd;--color-text-secondary: #ccc;--color-text-highlight: #fff;--color-bg-sidebar: #2d2d30;--color-input-bg: #2d2d30;--color-input-border: #3f3f3f;--color-toggle-bg: #353535;--color-toggle-selected: #181818;--color-icon: #c7c7c7;--color-separator: #333;--color-btn-bg: #232323;--color-btn-fg: #bebebe;--color-bg-proxy: #303030;--color-row-odd: #282828;--bg-log-info-tag: #454545;--bg-modal: #1f1f20;--bg-near-transparent: rgba(255, 255, 255, .1);--bg-tooltip: #111;--bc-tooltip: #555;--select-border-color: #040404;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23ffffff%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: transparent;color-scheme:dark}:root[data-theme=light]{--color-background: #eee;--color-background2: rgba(240, 240, 240, .3);--color-bg-card: #fafafa;--card-hover-border-lightness: 80%;--color-text: #222;--color-text-secondary: #646464;--color-text-highlight: #040404;--color-bg-sidebar: #f8f8f8;--color-input-bg: #f0f0f0;--color-input-border: #c0c0c0;--color-toggle-bg: #ffffff;--color-toggle-selected: #d7d7d7;--color-icon: #5b5b5b;--color-separator: #ccc;--color-btn-bg: #f4f4f4;--color-btn-fg: #101010;--color-bg-proxy: #fafafa;--color-row-odd: #f5f5f5;--bg-log-info-tag: #888;--bg-modal: #fbfbfb;--bg-near-transparent: rgba(0, 0, 0, .1);--bg-tooltip: #f0f0f0;--bc-tooltip: #ccc;--select-border-color: #999999;--select-bg-hover: url(data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%228%22%20height%3D%2224%22%20viewBox%3D%220%200%208%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%207L7%2011H1L4%207Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M4%2017L1%2013L7%2013L4%2017Z%22%20fill%3D%22%23222222%22%20%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20);--color-proxy-dot-selected-ind-bo: #888;color-scheme:light}.flexCenter{display:flex;align-items:center;justify-content:center}.fabgrp{position:fixed;z-index:3;right:20px;bottom:20px}.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0}:root{--reach-tooltip: 1}[data-reach-tooltip]{z-index:1;pointer-events:none;position:absolute;padding:.25em .5em;box-shadow:2px 2px 10px #0000001a;white-space:nowrap;font-size:85%;background:var(--bg-tooltip);color:var(--color-text);border:solid 1px var(--bc-tooltip);border-radius:4px}._root_5bosw_1{height:76px;display:flex;align-items:center}._h1_5bosw_7{padding:0 15px;font-size:1.7em;text-align:left;margin:0}@media screen and (min-width: 30em){._h1_5bosw_7{padding:0 40px;font-size:2em}}._root_1392e_1{padding:6px 15px}@media screen and (min-width: 30em){._root_1392e_1{padding:10px 40px}}._mono_1392e_10{font-family:var(--font-mono)}._link_1392e_14{color:var(--color-text-secondary);display:inline-flex}._link_1392e_14:hover{color:var(--color-text-highlight)}._loading_74j3j_1{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._spinner_74j3j_9{width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:_rotate_74j3j_1 1s steps(12,end) infinite;animation:_rotate_74j3j_1 1s steps(12,end) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%}@-webkit-keyframes _rotate_74j3j_1{0%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}to{-webkit-transform:rotate3d(0,0,1,360deg);transform:rotate3d(0,0,1,360deg)}}@keyframes _rotate_74j3j_1{0%{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}to{-webkit-transform:rotate3d(0,0,1,360deg);transform:rotate3d(0,0,1,360deg)}}._ul_1ore2_1{position:relative;margin:0;padding:0;list-style:none;line-height:1.8;--width-max-content: 230px}._li_1ore2_10{position:relative;margin:5px 0;padding:10px 0;border-radius:10px;display:grid;place-content:center;grid-template-columns:40px 1fr;-webkit-column-gap:10px;column-gap:10px;border:1px solid var(--bg-near-transparent)}._li_1ore2_10 ._right_1ore2_21{display:grid;-webkit-column-gap:10px;column-gap:10px;grid-template-columns:1fr 40px;grid-auto-rows:30px}._li_1ore2_10:hover{background-color:var(--bg-near-transparent)}._close_1ore2_32{opacity:0;place-self:center;cursor:pointer}._li_1ore2_10:hover ._close_1ore2_32,._li_1ore2_10:hover ._eye_1ore2_39{opacity:1}._close_1ore2_32:focus,._eye_1ore2_39:focus{opacity:1}._eye_1ore2_39{opacity:0;place-self:center;cursor:pointer}._url_1ore2_54,._secret_1ore2_55,._metaLabel_1ore2_56{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._btn_1ore2_62{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid transparent;background-color:transparent;color:inherit;display:flex;align-items:center;padding:5px;border-radius:100px}._btn_1ore2_62:focus{border-color:var(--color-focus-blue)}._btn_1ore2_62:hover:enabled{background-color:var(--color-focus-blue);color:#fff}._btn_1ore2_62:active:enabled{-webkit-transform:scale(.97);transform:scale(.97)}._btn_1ore2_62:disabled{color:var(--color-text-secondary)}._url_1ore2_54,._metaLabel_1ore2_56{cursor:pointer}._url_1ore2_54:hover,._metaLabel_1ore2_56:hover{color:var(--color-text-highlight)}._root_zwtea_1:focus{outline:none}._header_zwtea_5{display:flex;justify-content:center;align-items:center}._header_zwtea_5 ._icon_zwtea_10{--stroke: #f3f3f3;color:#20497e;opacity:.7;transition:opacity .4s}._header_zwtea_5 ._icon_zwtea_10:hover{opacity:1}._body_zwtea_20{padding:15px 0 0}._hostnamePort_zwtea_24{display:flex}._hostnamePort_zwtea_24 div{flex:1 1 auto}._hostnamePort_zwtea_24 div:nth-child(2){flex-grow:0;flex-basis:120px;margin-left:10px}._error_zwtea_36{height:20px;font-size:.8em;color:#ff8b8b}._footer_zwtea_42{padding:5px 0 10px;display:flex;justify-content:flex-end;align-items:center}._btn_lzu00_1{-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;position:relative;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--color-btn-fg);background:var(--color-btn-bg);border:1px solid #555;border-radius:100px;padding:10px 13px}._btn_lzu00_1:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1:hover{background:#387cec;border:1px solid #387cec;color:#fff}._btn_lzu00_1:active{-webkit-transform:scale(.97);transform:scale(.97)}._btn_lzu00_1._circular_lzu00_27{padding:8px}._btn_lzu00_1._minimal_lzu00_30{border-color:transparent;background:none;padding:6px 12px}._btn_lzu00_1._minimal_lzu00_30:focus{border-color:var(--color-focus-blue)}._btn_lzu00_1._minimal_lzu00_30:hover{color:#fff;background:#387cec;border:1px solid #387cec}._btn_lzu00_1:disabled{opacity:.5}._btnStart_lzu00_48{margin-right:5px;display:inline-flex;align-items:center;justify-content:center}._loadingContainer_lzu00_55{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:inline-flex}h2._sectionNameType_1b9pp_1{margin:0;font-size:1.3em}@media screen and (min-width: 30em){h2._sectionNameType_1b9pp_1{font-size:1.5em}}h2._sectionNameType_1b9pp_1 span:nth-child(2){font-size:12px;color:#777;font-weight:400;margin:0 .3em}:root[data-theme=light]{--loading-dot-1-1: rgba(0, 0, 0, .1);--loading-dot-1-2: rgba(0, 0, 0, .5);--loading-dot-1-3: rgba(0, 0, 0, .3);--loading-dot-2-1: rgba(0, 0, 0, .3);--loading-dot-2-2: rgba(0, 0, 0, .1);--loading-dot-2-3: rgba(0, 0, 0, .5);--loading-dot-3-1: rgba(0, 0, 0, .5);--loading-dot-3-2: rgba(0, 0, 0, .3);--loading-dot-3-3: rgba(0, 0, 0, .1)}:root[data-theme=dark]{--loading-dot-1-1: rgba(255, 255, 255, .5);--loading-dot-1-2: rgba(255, 255, 255, .1);--loading-dot-1-3: rgba(255, 255, 255, .3);--loading-dot-2-1: rgba(255, 255, 255, .3);--loading-dot-2-2: rgba(255, 255, 255, .5);--loading-dot-2-3: rgba(255, 255, 255, .1);--loading-dot-3-1: rgba(255, 255, 255, .1);--loading-dot-3-2: rgba(255, 255, 255, .3);--loading-dot-3-3: rgba(255, 255, 255, .5)}._loadingDot_1b9pp_66,._loadingDot_1b9pp_66:before,._loadingDot_1b9pp_66:after{display:inline-block;vertical-align:middle;width:6px;height:6px;border-radius:50%;font-size:0}._loadingDot_1b9pp_66{position:relative;background-color:var(--loading-dot-2-1);-webkit-animation:_dot2_1b9pp_1 1s step-start infinite;animation:_dot2_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:before{content:"";position:absolute;left:-12px;background-color:var(--loading-dot-1-1);-webkit-animation:_dot1_1b9pp_1 1s step-start infinite;animation:_dot1_1b9pp_1 1s step-start infinite}._loadingDot_1b9pp_66:after{content:"";position:absolute;right:-12px;background-color:var(--loading-dot-3-1);-webkit-animation:_dot3_1b9pp_1 1s step-start infinite;animation:_dot3_1b9pp_1 1s step-start infinite}@-webkit-keyframes _dot1_1b9pp_1{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@keyframes _dot1_1b9pp_1{0%,to{background-color:var(--loading-dot-1-1)}33%{background-color:var(--loading-dot-1-2)}66%{background-color:var(--loading-dot-1-3)}}@-webkit-keyframes _dot2_1b9pp_1{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@keyframes _dot2_1b9pp_1{0%,to{background-color:var(--loading-dot-2-1)}33%{background-color:var(--loading-dot-2-2)}66%{background-color:var(--loading-dot-2-3)}}@-webkit-keyframes _dot3_1b9pp_1{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}@keyframes _dot3_1b9pp_1{0%,to{background-color:var(--loading-dot-3-1)}33%{background-color:var(--loading-dot-3-2)}66%{background-color:var(--loading-dot-3-3)}}._root_1or8t_1{position:relative;padding:10px 0}._root_1or8t_1 input{-webkit-appearance:none;background-color:transparent;background-image:none;border:none;border-radius:0;border-bottom:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 4px;width:100%}._root_1or8t_1 input:focus{border-color:var(--color-focus-blue)}._root_1or8t_1 label{position:absolute;left:5px;bottom:22px;transition:-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out;transition:transform .15s ease-in-out,-webkit-transform .15s ease-in-out;-webkit-transform-origin:0 0;transform-origin:0 0;font-size:.9em}._root_1or8t_1 label._floatAbove_1or8t_32{-webkit-transform:scale(.75) translateY(-25px);transform:scale(.75) translateY(-25px)}._root_1or8t_1 input:focus+label{color:var(--color-focus-blue);-webkit-transform:scale(.75) translateY(-25px);transform:scale(.75) translateY(-25px)}._path_r8pm3_1{stroke-dasharray:890;stroke-dashoffset:890;-webkit-animation:_dash_r8pm3_1 3s ease-in-out forwards normal infinite;animation:_dash_r8pm3_1 3s ease-in-out forwards normal infinite}@-webkit-keyframes _dash_r8pm3_1{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}@keyframes _dash_r8pm3_1{0%{stroke-dashoffset:890}to{stroke-dashoffset:0}}[data-reach-menu-button]{--sz: 40px;width:var(--sz);height:var(--sz);display:inline-flex;align-items:center;justify-content:center;-webkit-appearance:none;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--color-btn-fg);background:none;border:1px solid transparent;border-radius:20px}[data-reach-menu-button]:hover{opacity:.6}[data-reach-menu-button]:focus{border-color:var(--color-focus-blue)}[data-reach-menu-list]{background:var(--bg-tooltip);color:var(--color-text);border:1px solid #555;padding:4px;border-radius:8px}[data-reach-menu-item]{padding:5px 16px 5px 6px;border-radius:7px;cursor:pointer;display:flex;align-items:center}[data-reach-menu-item][data-selected]{background:var(--color-focus-blue);color:#f7f7f7}._checkWrapper_1nrct_45{display:inline-flex;align-items:center;margin-right:2px;visibility:hidden}._checkWrapper_1nrct_45._active_1nrct_51{visibility:visible}._content_b98hm_1._content_b98hm_1{background:none;position:fixed;top:0;bottom:0;left:0;right:0;-webkit-transform:none;transform:none;padding:0;border-radius:0;display:flex;justify-content:center;overflow-y:auto}._container_b98hm_16{position:relative;margin-left:20px;margin-right:20px}._overlay_b98hm_22._overlay_b98hm_22{background-color:var(--color-background)}._fixed_b98hm_26{position:fixed;padding:16px;bottom:0;right:0}._overlay_1i06e_1{position:fixed;top:0;right:0;left:0;bottom:0;background:#444}._content_1i06e_10{outline:none;position:relative;color:var(--color-text);background:#444;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);padding:20px;border-radius:10px}._root_4m2cd_1{position:fixed;top:0;bottom:0;left:0;right:0;overflow:hidden;padding:20px;background:var(--color-background);color:var(--color-text);text-align:center}._yacd_4m2cd_14{color:#2a477a;opacity:.6;display:flex;justify-content:center;align-items:center;padding:40px}._link_4m2cd_23{display:inline-flex;align-items:center;color:var(--color-text-secondary)}._link_4m2cd_23:hover,._link_4m2cd_23:active{color:#387cec}._link_4m2cd_23 svg{margin-right:5px}._root_4oasi_1{padding:6px 15px}@media screen and (min-width: 30em){._root_4oasi_1{padding:10px 40px}}._chart_4oasi_10{margin-top:15px}._TrafficNow_hzna1_1{color:var(--color-text);display:flex;align-items:center;flex-wrap:wrap;display:grid;grid-template-columns:repeat(auto-fit,180px);grid-gap:10px}._TrafficNow_hzna1_1 ._sec_hzna1_10{padding:10px;background-color:var(--color-bg-card);border-radius:10px;box-shadow:0 1px 5px #0000001a}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(1){color:var(--color-text-secondary);font-size:.7em}._TrafficNow_hzna1_1 ._sec_hzna1_10 div:nth-child(2){padding:10px 0 0;font-size:1.8em}._lo_pmly2_1{opacity:.5;width:100%;height:100%;display:flex;justify-content:center;align-items:center}._app_1s3k7_1{position:fixed;top:0;bottom:0;left:0;right:0;display:flex;align-items:stretch;background:var(--color-background);color:var(--color-text)}@media (max-width: 768px){._app_1s3k7_1{flex-direction:column}}._content_1s3k7_18{flex-grow:1;overflow:auto}._root_r8ke8_1{display:flex;flex-direction:column;padding:8px}@media (max-width: 768px){._root_r8ke8_1{padding:0}}._logoPlaceholder_r8ke8_12{height:15px}@media (max-width: 768px){._logoPlaceholder_r8ke8_12{display:none}}._rows_r8ke8_21{flex:1}@media (max-width: 768px){._rows_r8ke8_21{display:flex;justify-content:space-between;overflow:auto}}._row_r8ke8_21{color:var(--color-text);text-decoration:none;border-radius:1000px;display:flex;align-items:center;padding:6px 16px}@media screen and (min-width: 30em){._row_r8ke8_21{padding:8px 20px}}@media (max-width: 768px){._row_r8ke8_21{border-radius:0}}@media (max-width: 768px){._row_r8ke8_21{flex-direction:column}}._row_r8ke8_21 svg{color:var(--color-icon);width:22px;height:22px}@media screen and (min-width: 30em){._row_r8ke8_21 svg{width:24px;height:24px}}._rowActive_r8ke8_68{--bg: hsla(217deg, 83%, 57%, .2);--fg: hsl(217deg 83% 57%);color:var(--fg);background:var(--bg)}@media (max-width: 768px){._rowActive_r8ke8_68{background:none}}._label_r8ke8_80{padding-left:14px;font-size:.75em;white-space:nowrap}@media (max-width: 768px){._label_r8ke8_80{padding-left:0;padding-top:5px}}@media screen and (min-width: 30em){._label_r8ke8_80{font-size:1em}}._footer_r8ke8_97{display:flex;flex-direction:column;align-items:center}@media (max-width: 768px){._footer_r8ke8_97{display:none}}._iconWrapper_r8ke8_108{--sz: 40px;width:var(--sz);height:var(--sz);display:flex;justify-content:center;align-items:center;outline:none;padding:5px;color:var(--color-text);border-radius:100%;border:1px solid transparent}._iconWrapper_r8ke8_108:hover{opacity:.6}._iconWrapper_r8ke8_108:focus{border-color:var(--color-focus-blue)}._input_mh4af_1{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:4px;border:1px solid var(--color-input-border);box-sizing:border-box;color:inherit;display:inline-block;font-size:inherit;height:40px;outline:none;padding:0 8px;width:100%}._input_mh4af_1:focus{box-shadow:#4299e199 0 0 0 3px}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}._animate_1w0e8_1{--saturation: 70%;stroke:hsl(46deg,var(--saturation),45%);-webkit-transform:scale(1);transform:scale(1);-webkit-animation:_zap-pulse_1w0e8_1 .7s 0s ease-in-out none normal infinite;animation:_zap-pulse_1w0e8_1 .7s 0s ease-in-out none normal infinite}@-webkit-keyframes _zap-pulse_1w0e8_1{0%{stroke:hsl(46deg,var(--saturation),45%);-webkit-transform:scale(1);transform:scale(1)}50%{stroke:hsl(46deg,var(--saturation),95%);-webkit-transform:scale(1.1);transform:scale(1.1)}to{stroke:hsl(46deg,var(--saturation),45%);-webkit-transform:scale(1);transform:scale(1)}}@keyframes _zap-pulse_1w0e8_1{0%{stroke:hsl(46deg,var(--saturation),45%);-webkit-transform:scale(1);transform:scale(1)}50%{stroke:hsl(46deg,var(--saturation),95%);-webkit-transform:scale(1.1);transform:scale(1.1)}to{stroke:hsl(46deg,var(--saturation),45%);-webkit-transform:scale(1);transform:scale(1)}}._ToggleSwitch_10mtp_1{-webkit-user-select:none;user-select:none;border-radius:4px;border:1px solid #525252;color:var(--color-text);background:var(--color-toggle-bg);display:flex;position:relative;outline:none}._ToggleSwitch_10mtp_1:focus{border-color:var(--color-focus-blue)}._ToggleSwitch_10mtp_1 input{position:absolute;left:0;opacity:0}._ToggleSwitch_10mtp_1 label{z-index:2;display:flex;align-items:center;justify-content:center;padding:10px 0;cursor:pointer}._slider_10mtp_28{z-index:1;position:absolute;display:block;left:0;height:100%;transition:left .2s ease-out;background:var(--color-toggle-selected)} diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index-759f7e71.js b/FILES/etc/config/clash/clash-dashboard/assets/index-b2af8b42.js similarity index 99% rename from FILES/etc/config/clash/clash-dashboard/assets/index-759f7e71.js rename to FILES/etc/config/clash/clash-dashboard/assets/index-b2af8b42.js index 96b28f9..2469f69 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index-759f7e71.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index-b2af8b42.js @@ -1 +1 @@ -import{ao as x}from"./index-dcea5d2f.js";function h(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function s(e){h(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||x(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}var C={};function A(){return C}function P(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function M(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getTime()-n.getTime();return i<0?-1:i>0?1:i}function X(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getFullYear()-n.getFullYear(),o=a.getMonth()-n.getMonth();return i*12+o}function _(e,t){return h(2,arguments),s(e).getTime()-s(t).getTime()}var S={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},I="trunc";function j(e){return e?S[e]:S[I]}function R(e){h(1,arguments);var t=s(e);return t.setHours(23,59,59,999),t}function E(e){h(1,arguments);var t=s(e),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}function Y(e){h(1,arguments);var t=s(e);return R(t).getTime()===E(t).getTime()}function z(e,t){h(2,arguments);var a=s(e),n=s(t),i=M(a,n),o=Math.abs(X(a,n)),r;if(o<1)r=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*o);var l=M(a,n)===-i;Y(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function L(e,t,a){h(2,arguments);var n=_(e,t)/1e3;return j(a==null?void 0:a.roundingMethod)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q=function(t,a,n){var i,o=V[t];return typeof o=="string"?i=o:a===1?i=o.one:i=o.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const H=q;function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=t.width?String(t.width):e.defaultWidth,n=e.formats[a]||e.formats[e.defaultWidth];return n}}var J={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:w({formats:J,defaultWidth:"full"}),time:w({formats:U,defaultWidth:"full"}),dateTime:w({formats:$,defaultWidth:"full"})};const B=Q;var G={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K=function(t,a,n,i){return G[t]};const Z=K;function g(e){return function(t,a){var n=a!=null&&a.context?String(a.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=a!=null&&a.width?String(a.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=a!=null&&a.width?String(a.width):e.defaultWidth;i=e.values[u]||e.values[l]}var f=e.argumentCallback?e.argumentCallback(t):t;return i[f]}}var ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},re={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oe=function(t,a){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ue={ordinalNumber:oe,era:g({values:ee,defaultWidth:"wide"}),quarter:g({values:te,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:ae,defaultWidth:"wide"}),day:g({values:ne,defaultWidth:"wide"}),dayPeriod:g({values:re,defaultWidth:"wide",formattingValues:ie,defaultFormattingWidth:"wide"})};const se=ue;function b(e){return function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?de(l,function(m){return m.test(r)}):le(l,function(m){return m.test(r)}),f;f=e.valueCallback?e.valueCallback(u):u,f=a.valueCallback?a.valueCallback(f):f;var c=t.slice(r.length);return{value:f,rest:c}}}function le(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function de(e,t){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=a.valueCallback?a.valueCallback(r):r;var l=t.slice(i.length);return{value:r,rest:l}}}var me=/^(\d+)(th|st|nd|rd)?/i,he=/\d+/i,ce={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ve={any:[/^b/i,/^(a|c)/i]},ge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},be={any:[/1/i,/2/i,/3/i,/4/i]},Me={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Se={ordinalNumber:fe({matchPattern:me,parsePattern:he,valueCallback:function(t){return parseInt(t,10)}}),era:b({matchPatterns:ce,defaultMatchWidth:"wide",parsePatterns:ve,defaultParseWidth:"any"}),quarter:b({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:b({matchPatterns:Me,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),day:b({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})};const Te=Se;var We={code:"en-US",formatDistance:H,formatLong:B,formatRelative:Z,localize:se,match:Te,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ne=We;function W(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}function ke(e){return W({},e)}var T=1440,Oe=2520,p=43200,Fe=86400;function Ce(e,t,a){var n,i;h(2,arguments);var o=A(),r=(n=(i=a==null?void 0:a.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ne;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(ke(a),{addSuffix:!!(a!=null&&a.addSuffix),comparison:l}),f,c;l>0?(f=s(t),c=s(e)):(f=s(e),c=s(t));var m=L(c,f),N=(P(c)-P(f))/1e3,d=Math.round((m-N)/60),v;if(d<2)return a!=null&&a.includeSeconds?m<5?r.formatDistance("lessThanXSeconds",5,u):m<10?r.formatDistance("lessThanXSeconds",10,u):m<20?r.formatDistance("lessThanXSeconds",20,u):m<40?r.formatDistance("halfAMinute",0,u):m<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d1?"s":"")+" required, but only "+t.length+" present")}function s(e){h(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||x(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}var C={};function A(){return C}function P(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function M(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getTime()-n.getTime();return i<0?-1:i>0?1:i}function X(e,t){h(2,arguments);var a=s(e),n=s(t),i=a.getFullYear()-n.getFullYear(),o=a.getMonth()-n.getMonth();return i*12+o}function _(e,t){return h(2,arguments),s(e).getTime()-s(t).getTime()}var S={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},I="trunc";function j(e){return e?S[e]:S[I]}function R(e){h(1,arguments);var t=s(e);return t.setHours(23,59,59,999),t}function E(e){h(1,arguments);var t=s(e),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}function Y(e){h(1,arguments);var t=s(e);return R(t).getTime()===E(t).getTime()}function z(e,t){h(2,arguments);var a=s(e),n=s(t),i=M(a,n),o=Math.abs(X(a,n)),r;if(o<1)r=0;else{a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*o);var l=M(a,n)===-i;Y(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function L(e,t,a){h(2,arguments);var n=_(e,t)/1e3;return j(a==null?void 0:a.roundingMethod)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q=function(t,a,n){var i,o=V[t];return typeof o=="string"?i=o:a===1?i=o.one:i=o.other.replace("{{count}}",a.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const H=q;function w(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=t.width?String(t.width):e.defaultWidth,n=e.formats[a]||e.formats[e.defaultWidth];return n}}var J={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},U={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Q={date:w({formats:J,defaultWidth:"full"}),time:w({formats:U,defaultWidth:"full"}),dateTime:w({formats:$,defaultWidth:"full"})};const B=Q;var G={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K=function(t,a,n,i){return G[t]};const Z=K;function g(e){return function(t,a){var n=a!=null&&a.context?String(a.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=a!=null&&a.width?String(a.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=a!=null&&a.width?String(a.width):e.defaultWidth;i=e.values[u]||e.values[l]}var f=e.argumentCallback?e.argumentCallback(t):t;return i[f]}}var ee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},te={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ne={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},re={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oe=function(t,a){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ue={ordinalNumber:oe,era:g({values:ee,defaultWidth:"wide"}),quarter:g({values:te,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:g({values:ae,defaultWidth:"wide"}),day:g({values:ne,defaultWidth:"wide"}),dayPeriod:g({values:re,defaultWidth:"wide",formattingValues:ie,defaultFormattingWidth:"wide"})};const se=ue;function b(e){return function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?de(l,function(m){return m.test(r)}):le(l,function(m){return m.test(r)}),f;f=e.valueCallback?e.valueCallback(u):u,f=a.valueCallback?a.valueCallback(f):f;var c=t.slice(r.length);return{value:f,rest:c}}}function le(e,t){for(var a in e)if(e.hasOwnProperty(a)&&t(e[a]))return a}function de(e,t){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var i=n[0],o=t.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=a.valueCallback?a.valueCallback(r):r;var l=t.slice(i.length);return{value:r,rest:l}}}var me=/^(\d+)(th|st|nd|rd)?/i,he=/\d+/i,ce={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ve={any:[/^b/i,/^(a|c)/i]},ge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},be={any:[/1/i,/2/i,/3/i,/4/i]},Me={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},we={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Se={ordinalNumber:fe({matchPattern:me,parsePattern:he,valueCallback:function(t){return parseInt(t,10)}}),era:b({matchPatterns:ce,defaultMatchWidth:"wide",parsePatterns:ve,defaultParseWidth:"any"}),quarter:b({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:b({matchPatterns:Me,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),day:b({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})};const Te=Se;var We={code:"en-US",formatDistance:H,formatLong:B,formatRelative:Z,localize:se,match:Te,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ne=We;function W(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}function ke(e){return W({},e)}var T=1440,Oe=2520,p=43200,Fe=86400;function Ce(e,t,a){var n,i;h(2,arguments);var o=A(),r=(n=(i=a==null?void 0:a.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ne;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(ke(a),{addSuffix:!!(a!=null&&a.addSuffix),comparison:l}),f,c;l>0?(f=s(t),c=s(e)):(f=s(e),c=s(t));var m=L(c,f),N=(P(c)-P(f))/1e3,d=Math.round((m-N)/60),v;if(d<2)return a!=null&&a.includeSeconds?m<5?r.formatDistance("lessThanXSeconds",5,u):m<10?r.formatDistance("lessThanXSeconds",10,u):m<20?r.formatDistance("lessThanXSeconds",20,u):m<40?r.formatDistance("halfAMinute",0,u):m<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(dt in e?e_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kh=(e,t,n)=>(t_(e,typeof t!="symbol"?t+"":t,n),n);function n_(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const r_="modulepreload",o_=function(e,t){return new URL(e,t).href},Qh={},en=function(t,n,r){if(!n||n.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=o_(i,r),i in Qh)return;Qh[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let c=o.length-1;c>=0;c--){const f=o[c];if(f.href===i&&(!s||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":r_,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};var I4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i_(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Xg={exports:{}},pl={},Jg={exports:{}},ue={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Gi=Symbol.for("react.element"),s_=Symbol.for("react.portal"),a_=Symbol.for("react.fragment"),l_=Symbol.for("react.strict_mode"),u_=Symbol.for("react.profiler"),c_=Symbol.for("react.provider"),f_=Symbol.for("react.context"),d_=Symbol.for("react.forward_ref"),h_=Symbol.for("react.suspense"),p_=Symbol.for("react.memo"),m_=Symbol.for("react.lazy"),qh=Symbol.iterator;function g_(e){return e===null||typeof e!="object"?null:(e=qh&&e[qh]||e["@@iterator"],typeof e=="function"?e:null)}var Zg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ev=Object.assign,tv={};function xo(e,t,n){this.props=e,this.context=t,this.refs=tv,this.updater=n||Zg}xo.prototype.isReactComponent={};xo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nv(){}nv.prototype=xo.prototype;function Jf(e,t,n){this.props=e,this.context=t,this.refs=tv,this.updater=n||Zg}var Zf=Jf.prototype=new nv;Zf.constructor=Jf;ev(Zf,xo.prototype);Zf.isPureReactComponent=!0;var Gh=Array.isArray,rv=Object.prototype.hasOwnProperty,ed={current:null},ov={key:!0,ref:!0,__self:!0,__source:!0};function iv(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)rv.call(t,r)&&!ov.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(11&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||k_,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t]=this.observers[t].filter(r=>r!==n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{s(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(s=>{s.apply(s,[t,...r])})}}function Mo(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Xh(e){return e==null?"":""+e}function T_(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}function nd(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}const i=typeof t!="string"?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};const s=r(i.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return o()?{}:{obj:e,k:r(i.shift())}}function Jh(e,t,n){const{obj:r,k:o}=nd(e,t,Object);r[o]=n}function N_(e,t,n,r){const{obj:o,k:i}=nd(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)}function Ea(e,t){const{obj:n,k:r}=nd(e,t);if(n)return n[r]}function O_(e,t,n){const r=Ea(e,n);return r!==void 0?r:Ea(t,n)}function av(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):av(e[r],t[r],n):e[r]=t[r]);return e}function Lr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var L_={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function P_(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>L_[t]):e}const A_=[" ",",","?","!",";"];function I_(e,t,n){t=t||"",n=n||"";const r=A_.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=new RegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(e);if(!i){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(i=!0)}return i}function xa(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;ii+s;)s++,a=r.slice(i,i+s).join(n),l=o[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const u=r.slice(i+s).join(n);return u?xa(l,u,n):void 0}o=o[r[i]]}return o}function Ca(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Zh extends ml{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[t,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(a=t.split("."));const l=Ea(this.data,a);return l||!s||typeof r!="string"?l:xa(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),o=n,n=a[1]),this.addNamespaces(n),Jh(this.data,a,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),o=r,r=n,n=a[1]),this.addNamespaces(n);let l=Ea(this.data,a)||{};o?av(l,r,i):l={...l,...r},Jh(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var lv={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const ep={};class ba extends ml{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),T_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!I_(t,r,o);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:i};const u=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(o)}return typeof i=="string"&&(i=[i]),{key:t,namespaces:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const w=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${w}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:`${l}${w}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l}:s}const f=this.resolve(t,n);let d=f&&f.res;const m=f&&f.usedKey||s,v=f&&f.exactUsedKey||s,y=Object.prototype.toString.apply(d),E=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject;if(h&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&E.indexOf(y)<0&&!(typeof g=="string"&&y==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,d,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(f.res=w,f):w}if(i){const w=y==="[object Array]",R=w?[]:{},x=w?v:m;for(const k in d)if(Object.prototype.hasOwnProperty.call(d,k)){const L=`${x}${i}${k}`;R[k]=this.translate(L,{...n,joinArrays:!1,ns:a}),R[k]===L&&(R[k]=d[k])}d=R}}else if(h&&typeof g=="string"&&y==="[object Array]")d=d.join(g),d&&(d=this.extendTranslation(d,t,n,r));else{let w=!1,R=!1;const x=n.count!==void 0&&typeof n.count!="string",k=ba.hasDefaultValue(n),L=x?this.pluralResolver.getSuffix(u,n.count,n):"",G=n.ordinal&&x?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",$=n[`defaultValue${L}`]||n[`defaultValue${G}`]||n.defaultValue;!this.isValidLookup(d)&&k&&(w=!0,d=$),this.isValidLookup(d)||(R=!0,d=s);const de=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:d,se=k&&$!==d&&this.options.updateMissing;if(R||w||se){if(this.logger.log(se?"updateKey":"missingKey",u,l,s,se?$:d),i){const T=this.resolve(s,{...n,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let W=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let T=0;T{const M=k&&B!==d?B:de;this.options.missingKeyHandler?this.options.missingKeyHandler(T,l,O,M,se,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(T,l,O,M,se,n),this.emit("missingKey",T,l,O,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?W.forEach(T=>{this.pluralResolver.getSuffixes(T,n).forEach(O=>{X([T],s+O,n[`defaultValue${O}`]||$)})}):X(W,s,$))}d=this.extendTranslation(d,t,n,f,r),R&&d===s&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${s}`),(R||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,w?d:void 0):d=this.options.parseMissingKeyHandler(d))}return o?(f.res=d,f):d}extendTranslation(t,n,r,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language,r),u){const d=t.match(this.interpolator.nestingRegexp),m=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,s,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(l,n),c=u.key;o=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",m=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(E=>{this.isValidLookup(r)||(a=E,!ep[`${y[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(ep[`${y[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(g=>{if(this.isValidLookup(r))return;s=g;const h=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(h,c,g,E,n);else{let w;d&&(w=this.pluralResolver.getSuffix(g,n.count,n));const R=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(h.push(c+w),n.ordinal&&w.indexOf(x)===0&&h.push(c+w.replace(x,this.options.pluralSeparator)),m&&h.push(c+R)),v){const k=`${c}${this.options.contextSeparator}${n.context}`;h.push(k),d&&(h.push(k+w),n.ordinal&&w.indexOf(x)===0&&h.push(k+w.replace(x,this.options.pluralSeparator)),m&&h.push(k+R))}}let p;for(;p=h.pop();)this.isValidLookup(r)||(i=p,r=this.getResource(g,E,p,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function pu(e){return e.charAt(0).toUpperCase()+e.slice(1)}class tp{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}getScriptPartFromCode(t){if(t=Ca(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ca(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=pu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=pu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=pu(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&i.indexOf(o)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):typeof t=="string"&&i(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let M_=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],D_={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const $_=["v1","v2","v3"],U_=["v4"],np={zero:0,one:1,two:2,few:3,many:4,other:5};function F_(){const e={};return M_.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:D_[t.fc]}})}),e}class j_{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||U_.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=F_()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Ca(t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>np[o]-np[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!$_.includes(this.options.compatibilityJSON)}}function rp(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=O_(e,t,n);return!i&&o&&typeof n=="string"&&(i=xa(e,n,r),i===void 0&&(i=xa(t,n,r))),i}class z_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:P_,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Lr(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Lr(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Lr(n.nestingPrefix):n.nestingPrefixEscaped||Lr("$t("),this.nestingSuffix=n.nestingSuffix?Lr(n.nestingSuffix):n.nestingSuffixEscaped||Lr(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(t,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(t,n,r,o){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(v){return v.replace(/\$/g,"$$$$")}const c=v=>{if(v.indexOf(this.formatSeparator)<0){const h=rp(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(h,void 0,r,{...o,...n,interpolationkey:v}):h}const y=v.split(this.formatSeparator),E=y.shift().trim(),g=y.join(this.formatSeparator).trim();return this.format(rp(n,l,E,this.options.keySeparator,this.options.ignoreJSONStructure),g,r,{...o,...n,interpolationkey:E})};this.resetRegExp();const f=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>u(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?u(this.escape(v)):u(v)}].forEach(v=>{for(a=0;i=v.regex.exec(t);){const y=i[1].trim();if(s=c(y),s===void 0)if(typeof f=="function"){const g=f(t,i,o);s=typeof g=="string"?g:""}else if(o&&Object.prototype.hasOwnProperty.call(o,y))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Xh(s));const E=v.safeValue(s);if(t=t.replace(i[0],E),d?(v.regex.lastIndex+=s.length,v.regex.lastIndex-=i[0].length):v.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,s);const m=d.match(/'/g),v=d.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(d=d.replace(/'/g,'"'));try{s=JSON.parse(d),u&&(s={...u,...s})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${c}${d}`}return delete s.defaultValue,l}for(;o=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=c.shift(),l=c,u=!0}if(i=n(a.call(this,o[1].trim(),s),s),i&&o[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Xh(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),u&&(i=l.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}function V_(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(!s)return;const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=u),u==="false"&&(n[a.trim()]=!1),u==="true"&&(n[a.trim()]=!0),isNaN(u)||(n[a.trim()]=parseInt(u,10))})}return{formatName:t,formatOptions:n}}function Pr(e){const t={};return function(r,o,i){const s=o+JSON.stringify(i);let a=t[s];return a||(a=e(Ca(o),i),t[s]=a),a(r)}}class B_{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xt.create("formatter"),this.options=t,this.formats={number:Pr((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Pr((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Pr((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Pr((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Pr((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Pr(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=V_(l);if(this.formats[u]){let f=a;try{const d=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},m=d.locale||d.lng||o.locale||o.lng||r;f=this.formats[u](a,m,{...c,...o,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}function W_(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class H_ extends ml{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Xt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},s={},a={},l={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const d=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?s[d]===void 0&&(s[d]=!0):(this.state[d]=1,c=!1,s[d]===void 0&&(s[d]=!0),i[d]===void 0&&(i[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],s=o[1];n&&this.emit("failedLoading",i,s,n),r&&this.store.addResourceBundle(i,s,r),this.state[t]=n?-1:2;const a={};this.queue.forEach(l=>{N_(l.loaded,[i],s),W_(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{a[u][f]===void 0&&(a[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&o{this.read.call(this,t,n,r,o+1,i*2,s)},i);return}s(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,o,l):c=u(t,n,r,o),c&&typeof c.then=="function"?c.then(f=>a(null,f)).catch(a):a(null,c)}catch(c){a(c)}else u(t,n,r,o,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function op(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ip(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ts(){}function K_(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class yi extends ml{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ip(t),this.services={},this.logger=Xt,this.modules={external:[]},K_(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=op();this.options={...o,...this.options,...ip(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?Xt.init(i(this.modules.logger),this.options):Xt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=B_);const f=new tp(this.options);this.store=new Zh(this.options.resources,this.options);const d=this.services;d.logger=Xt,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new j_(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(d.formatter=i(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new z_(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new H_(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var v=arguments.length,y=new Array(v>1?v-1:0),E=1;E1?v-1:0),E=1;E{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ts),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const l=Mo(),u=()=>{const c=(f,d)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode")return r();const i=[],s=a=>{if(!a)return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const o=Mo();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Ts),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&lv.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Mo();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),o}getFixedT(t,n,r){var o=this;const i=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f`${l.keyPrefix}${d}${v}`):m=l.keyPrefix?`${l.keyPrefix}${d}${s}`:s,o.t(m,l)};return typeof t=="string"?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(i,t)))}loadNamespaces(t,n){const r=Mo();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Mo();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],i=t.filter(s=>o.indexOf(s)<0);return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new tp(op());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new yi(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ts;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new yi(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Zh(this.store.data,o),i.services.resourceStore=i.store),i.translator=new ba(i.services,o),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c0){var a=o.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(a))}if(o.domain){if(!ap.test(o.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(o.domain)}if(o.path){if(!ap.test(o.path))throw new TypeError("option path is invalid");s+="; Path=".concat(o.path)}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(o.expires.toUTCString())}if(o.httpOnly&&(s+="; HttpOnly"),o.secure&&(s+="; Secure"),o.sameSite){var l=typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},lp={create:function(t,n,r,o){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),o&&(i.domain=o),document.cookie=eE(t,encodeURIComponent(n),i)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),o=0;o-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var o=r.substring(1),i=o.split("&"),s=0;s0){var l=i[s].substring(0,a);l===t.lookupQuerystring&&(n=i[s].substring(a+1))}}}return n}},Do=null,up=function(){if(Do!==null)return Do;try{Do=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Do=!1}return Do},rE={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&up()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&up()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},$o=null,cp=function(){if($o!==null)return $o;try{$o=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$o=!1}return $o},oE={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&cp()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&cp()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},iE={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r0?n:void 0}},sE={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},aE={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},lE={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function uE(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var cv=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Q_(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return Y_(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=Z_(r,this.options||{},uE()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(i){return i.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(tE),this.addDetector(nE),this.addDetector(rE),this.addDetector(oE),this.addDetector(iE),this.addDetector(sE),this.addDetector(aE),this.addDetector(lE)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var o=[];return n.forEach(function(i){if(r.detectors[i]){var s=r.detectors[i].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(o=o.concat(s))}}),o=o.map(function(i){return r.options.convertDetectedLanguage(i)}),this.services.languageUtils.getBestMatchFromCodes?o:o.length>0?o[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var o=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(i){o.detectors[i]&&o.detectors[i].cacheUserLanguage(n,o.options)}))}}]),e}();cv.type="languageDetector";function cE(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function dp(e,t,n){e.loadNamespaces(t,fv(e,n))}function hp(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,fv(e,r))}function fE(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=t.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(i,e)))}function dE(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(uc("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,e))return!1}}):fE(e,t,n)}const hE=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pE={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},mE=e=>pE[e],gE=e=>e.replace(hE,mE);let cc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:gE};function vE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cc={...cc,...e}}function yE(){return cc}let dv;function SE(e){dv=e}function wE(){return dv}const _E={type:"3rdParty",init(e){vE(e.options.react),SE(e)}},EE=S.createContext();class xE{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const CE=(e,t)=>{const n=S.useRef();return S.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function Yi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=S.useContext(EE)||{},i=n||r||wE();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new xE),!i){uc("You will need to pass in an i18next instance by using initReactI18next");const p=(R,x)=>typeof x=="string"?x:x&&typeof x=="object"&&typeof x.defaultValue=="string"?x.defaultValue:Array.isArray(R)?R[R.length-1]:R,w=[p,{},!1];return w.t=p,w.i18n={},w.ready=!1,w}i.options.react&&i.options.react.wait!==void 0&&uc("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...yE(),...i.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let u=e||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(p=>dE(p,i,s));function f(){return i.getFixedT(t.lng||null,s.nsMode==="fallback"?u:u[0],l)}const[d,m]=S.useState(f);let v=u.join();t.lng&&(v=`${t.lng}${v}`);const y=CE(v),E=S.useRef(!0);S.useEffect(()=>{const{bindI18n:p,bindI18nStore:w}=s;E.current=!0,!c&&!a&&(t.lng?hp(i,t.lng,u,()=>{E.current&&m(f)}):dp(i,u,()=>{E.current&&m(f)})),c&&y&&y!==v&&E.current&&m(f);function R(){E.current&&m(f)}return p&&i&&i.on(p,R),w&&i&&i.store.on(w,R),()=>{E.current=!1,p&&i&&p.split(" ").forEach(x=>i.off(x,R)),w&&i&&w.split(" ").forEach(x=>i.store.off(x,R))}},[i,v]);const g=S.useRef(!0);S.useEffect(()=>{E.current&&!g.current&&m(f),g.current=!1},[i,l]);const h=[d,i,c];if(h.t=d,h.i18n=i,h.ready=c,c||!c&&!a)return h;throw new Promise(p=>{t.lng?hp(i,t.lng,u,()=>p()):dp(i,u,()=>p())})}const bE={type:"backend",read:(e,t,n)=>{let r;switch(e){case"zh":case"zh-CN":r=en(()=>import("./zh-98a29f34.js"),[],import.meta.url);break;case"en":default:r=en(()=>import("./en-b261f0f9.js"),[],import.meta.url);break}r?r.then(o=>n(null,o.data),o=>n(o,null)):n(new Error(`unable to load translation file for language ${e}`),null)}};Ye.use(_E).use(cv).use(bE).init({debug:!1,fallbackLng:"en",interpolation:{escapeValue:!1}});const hv=""+new URL("TwemojiCountryFlags-9f04f144.woff2",import.meta.url).href;var pv={exports:{}},gt={},mv={exports:{}},gv={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(O,B){var M=O.length;O.push(B);e:for(;0>>1,b=O[F];if(0>>1;Fo(J,M))Vo(H,J)?(O[F]=H,O[V]=M,F=V):(O[F]=J,O[D]=M,F=D);else if(Vo(H,M))O[F]=H,O[V]=M,F=V;else break e}}return B}function o(O,B){var M=O.sortIndex-B.sortIndex;return M!==0?M:O.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,m=!1,v=!1,y=!1,E=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(O){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=O)r(u),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(u)}}function w(O){if(y=!1,p(O),!v)if(n(l)!==null)v=!0,X(R);else{var B=n(u);B!==null&&T(w,B.startTime-O)}}function R(O,B){v=!1,y&&(y=!1,g(L),L=-1),m=!0;var M=d;try{for(p(B),f=n(l);f!==null&&(!(f.expirationTime>B)||O&&!oe());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var b=F(f.expirationTime<=B);B=e.unstable_now(),typeof b=="function"?f.callback=b:f===n(l)&&r(l),p(B)}else r(l);f=n(l)}if(f!==null)var P=!0;else{var D=n(u);D!==null&&T(w,D.startTime-B),P=!1}return P}finally{f=null,d=M,m=!1}}var x=!1,k=null,L=-1,G=5,$=-1;function oe(){return!(e.unstable_now()-$O||125F?(O.sortIndex=M,t(u,O),n(l)===null&&O===n(u)&&(y?(g(L),L=-1):y=!0,T(w,M-F))):(O.sortIndex=b,t(l,O),v||m||(v=!0,X(R))),O},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(O){var B=d;return function(){var M=d;d=B;try{return O.apply(this,arguments)}finally{d=M}}}})(gv);mv.exports=gv;var RE=mv.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vv=S,ht=RE;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=Object.prototype.hasOwnProperty,kE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pp={},mp={};function TE(e){return fc.call(mp,e)?!0:fc.call(pp,e)?!1:kE.test(e)?mp[e]=!0:(pp[e]=!0,!1)}function NE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function OE(e,t,n,r){if(t===null||typeof t>"u"||NE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var rd=/[\-:]([a-z])/g;function od(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(rd,od);We[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(rd,od);We[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(rd,od);We[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function id(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` -`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{gu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xo(e):""}function LE(e){switch(e.tag){case 5:return Xo(e.type);case 16:return Xo("Lazy");case 13:return Xo("Suspense");case 19:return Xo("SuspenseList");case 0:case 2:case 15:return e=vu(e.type,!1),e;case 11:return e=vu(e.type.render,!1),e;case 1:return e=vu(e.type,!0),e;default:return""}}function mc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $r:return"Fragment";case Dr:return"Portal";case dc:return"Profiler";case sd:return"StrictMode";case hc:return"Suspense";case pc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wv:return(e.displayName||"Context")+".Consumer";case Sv:return(e._context.displayName||"Context")+".Provider";case ad:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ld:return t=e.displayName||null,t!==null?t:mc(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return mc(e(t))}catch{}}return null}function PE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mc(t);case 8:return t===sd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ev(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function AE(e){var t=Ev(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Os(e){e._valueTracker||(e._valueTracker=AE(e))}function xv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ev(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ra(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gc(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Bn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Cv(e,t){t=t.checked,t!=null&&id(e,"checked",t,!1)}function vc(e,t){Cv(e,t);var n=Bn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yc(e,t.type,n):t.hasOwnProperty("defaultValue")&&yc(e,t.type,Bn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yc(e,t,n){(t!=="number"||Ra(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jo=Array.isArray;function Xr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ls.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _i(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var oi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},IE=["Webkit","ms","Moz","O"];Object.keys(oi).forEach(function(e){IE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oi[t]=oi[e]})});function Tv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||oi.hasOwnProperty(e)&&oi[e]?(""+t).trim():t+"px"}function Nv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Tv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ME=Te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _c(e,t){if(t){if(ME[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function Ec(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xc=null;function ud(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cc=null,Jr=null,Zr=null;function _p(e){if(e=Zi(e)){if(typeof Cc!="function")throw Error(I(280));var t=e.stateNode;t&&(t=wl(t),Cc(e.stateNode,e.type,t))}}function Ov(e){Jr?Zr?Zr.push(e):Zr=[e]:Jr=e}function Lv(){if(Jr){var e=Jr,t=Zr;if(Zr=Jr=null,_p(e),t)for(e=0;e>>=0,e===0?32:31-(KE(e)/QE|0)|0}var Ps=64,As=4194304;function Zo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Zo(a):(i&=s,i!==0&&(r=Zo(i)))}else s=n&~o,s!==0?r=Zo(s):i!==0&&(r=Zo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Xi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function XE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=si),Op=String.fromCharCode(32),Lp=!1;function Xv(e,t){switch(e){case"keyup":return bx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ur=!1;function kx(e,t){switch(e){case"compositionend":return Jv(t);case"keypress":return t.which!==32?null:(Lp=!0,Op);case"textInput":return e=t.data,e===Op&&Lp?null:e;default:return null}}function Tx(e,t){if(Ur)return e==="compositionend"||!vd&&Xv(e,t)?(e=Gv(),sa=pd=Tn=null,Ur=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Mp(n)}}function ny(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ny(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ry(){for(var e=window,t=Ra();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ra(e.document)}return t}function yd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $x(e){var t=ry(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ny(n.ownerDocument.documentElement,n)){if(r!==null&&yd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Dp(n,i);var s=Dp(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Fr=null,Oc=null,li=null,Lc=!1;function $p(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lc||Fr==null||Fr!==Ra(r)||(r=Fr,"selectionStart"in r&&yd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),li&&ki(li,r)||(li=r,r=Aa(Oc,"onSelect"),0Vr||(e.current=$c[Vr],$c[Vr]=null,Vr--)}function ve(e,t){Vr++,$c[Vr]=e.current,e.current=t}var Wn={},Ge=qn(Wn),ot=qn(!1),dr=Wn;function so(e,t){var n=e.type.contextTypes;if(!n)return Wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function it(e){return e=e.childContextTypes,e!=null}function Ma(){we(ot),we(Ge)}function Wp(e,t,n){if(Ge.current!==Wn)throw Error(I(168));ve(Ge,t),ve(ot,n)}function dy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(I(108,PE(e)||"Unknown",o));return Te({},n,r)}function Da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wn,dr=Ge.current,ve(Ge,e),ve(ot,ot.current),!0}function Hp(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=dy(e,t,dr),r.__reactInternalMemoizedMergedChildContext=e,we(ot),we(Ge),ve(Ge,e)):we(ot),ve(ot,n)}var an=null,_l=!1,Lu=!1;function hy(e){an===null?an=[e]:an.push(e)}function Gx(e){_l=!0,hy(e)}function Gn(){if(!Lu&&an!==null){Lu=!0;var e=0,t=fe;try{var n=an;for(fe=1;e>=s,o-=s,ln=1<<32-jt(t)+o|n<L?(G=k,k=null):G=k.sibling;var $=d(g,k,p[L],w);if($===null){k===null&&(k=G);break}e&&k&&$.alternate===null&&t(g,k),h=i($,h,L),x===null?R=$:x.sibling=$,x=$,k=G}if(L===p.length)return n(g,k),Ee&&er(g,L),R;if(k===null){for(;LL?(G=k,k=null):G=k.sibling;var oe=d(g,k,$.value,w);if(oe===null){k===null&&(k=G);break}e&&k&&oe.alternate===null&&t(g,k),h=i(oe,h,L),x===null?R=oe:x.sibling=oe,x=oe,k=G}if($.done)return n(g,k),Ee&&er(g,L),R;if(k===null){for(;!$.done;L++,$=p.next())$=f(g,$.value,w),$!==null&&(h=i($,h,L),x===null?R=$:x.sibling=$,x=$);return Ee&&er(g,L),R}for(k=r(g,k);!$.done;L++,$=p.next())$=m(k,g,L,$.value,w),$!==null&&(e&&$.alternate!==null&&k.delete($.key===null?L:$.key),h=i($,h,L),x===null?R=$:x.sibling=$,x=$);return e&&k.forEach(function(de){return t(g,de)}),Ee&&er(g,L),R}function E(g,h,p,w){if(typeof p=="object"&&p!==null&&p.type===$r&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ns:e:{for(var R=p.key,x=h;x!==null;){if(x.key===R){if(R=p.type,R===$r){if(x.tag===7){n(g,x.sibling),h=o(x,p.props.children),h.return=g,g=h;break e}}else if(x.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===wn&&Jp(R)===x.type){n(g,x.sibling),h=o(x,p.props),h.ref=Bo(g,x,p),h.return=g,g=h;break e}n(g,x);break}else t(g,x);x=x.sibling}p.type===$r?(h=cr(p.props.children,g.mode,w,p.key),h.return=g,g=h):(w=pa(p.type,p.key,p.props,null,g.mode,w),w.ref=Bo(g,h,p),w.return=g,g=w)}return s(g);case Dr:e:{for(x=p.key;h!==null;){if(h.key===x)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(g,h.sibling),h=o(h,p.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=Fu(p,g.mode,w),h.return=g,g=h}return s(g);case wn:return x=p._init,E(g,h,x(p._payload),w)}if(Jo(p))return v(g,h,p,w);if(Uo(p))return y(g,h,p,w);js(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(g,h.sibling),h=o(h,p),h.return=g,g=h):(n(g,h),h=Uu(p,g.mode,w),h.return=g,g=h),s(g)):n(g,h)}return E}var lo=_y(!0),Ey=_y(!1),es={},Zt=qn(es),Li=qn(es),Pi=qn(es);function ar(e){if(e===es)throw Error(I(174));return e}function kd(e,t){switch(ve(Pi,t),ve(Li,e),ve(Zt,es),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wc(t,e)}we(Zt),ve(Zt,t)}function uo(){we(Zt),we(Li),we(Pi)}function xy(e){ar(Pi.current);var t=ar(Zt.current),n=wc(t,e.type);t!==n&&(ve(Li,e),ve(Zt,n))}function Td(e){Li.current===e&&(we(Zt),we(Li))}var Re=qn(0);function Va(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pu=[];function Nd(){for(var e=0;en?n:4,e(!0);var r=Au.transition;Au.transition={};try{e(!1),t()}finally{fe=n,Au.transition=r}}function Fy(){return Nt().memoizedState}function Zx(e,t,n){var r=Fn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jy(e))zy(t,n);else if(n=vy(e,t,n,r),n!==null){var o=Je();zt(n,e,r,o),Vy(n,t,r)}}function eC(e,t,n){var r=Fn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jy(e))zy(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Bt(a,s)){var l=t.interleaved;l===null?(o.next=o,bd(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=vy(e,t,o,r),n!==null&&(o=Je(),zt(n,e,r,o),Vy(n,t,r))}}function jy(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function zy(e,t){ui=Ba=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,fd(e,n)}}var Wa={readContext:Tt,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},tC={readContext:Tt,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:em,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ca(4194308,4,Iy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ca(4194308,4,e,t)},useInsertionEffect:function(e,t){return ca(4,2,e,t)},useMemo:function(e,t){var n=qt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Zx.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:Zp,useDebugValue:Id,useDeferredValue:function(e){return qt().memoizedState=e},useTransition:function(){var e=Zp(!1),t=e[0];return e=Jx.bind(null,e[1]),qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=qt();if(Ee){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Fe===null)throw Error(I(349));pr&30||Ry(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,em(Ty.bind(null,r,i,e),[e]),r.flags|=2048,Mi(9,ky.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=qt(),t=Fe.identifierPrefix;if(Ee){var n=un,r=ln;n=(r&~(1<<32-jt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ai++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Yt]=t,e[Oi]=r,Xy(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ec(n,r),n){case"dialog":ye("cancel",e),ye("close",e),o=r;break;case"iframe":case"object":case"embed":ye("load",e),o=r;break;case"video":case"audio":for(o=0;ofo&&(t.flags|=128,r=!0,Wo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Va(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ee)return Ke(t),null}else 2*Le()-i.renderingStartTime>fo&&n!==1073741824&&(t.flags|=128,r=!0,Wo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Le(),t.sibling=null,n=Re.current,ve(Re,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return jd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ct&1073741824&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function uC(e,t){switch(wd(t),t.tag){case 1:return it(t.type)&&Ma(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),we(ot),we(Ge),Nd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Td(t),null;case 13:if(we(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));ao()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Re),null;case 4:return uo(),null;case 10:return Cd(t.type._context),null;case 22:case 23:return jd(),null;case 24:return null;default:return null}}var Vs=!1,qe=!1,cC=typeof WeakSet=="function"?WeakSet:Set,K=null;function Kr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Gc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var um=!1;function fC(e,t){if(Pc=La,e=ry(),yd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var m;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)d=f,f=m;for(;;){if(f===e)break t;if(d===n&&++u===o&&(a=s),d===i&&++c===r&&(l=s),(m=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ac={focusedElem:e,selectionRange:n},La=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,E=v.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:It(t.type,y),E);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(w){Ne(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return v=um,um=!1,v}function ci(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Gc(t,n,i)}o=o.next}while(o!==r)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function e0(e){var t=e.alternate;t!==null&&(e.alternate=null,e0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yt],delete t[Oi],delete t[Dc],delete t[Qx],delete t[qx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function t0(e){return e.tag===5||e.tag===3||e.tag===4}function cm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||t0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ia));else if(r!==4&&(e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}var ze=null,$t=!1;function vn(e,t,n){for(n=n.child;n!==null;)n0(e,t,n),n=n.sibling}function n0(e,t,n){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(gl,n)}catch{}switch(n.tag){case 5:qe||Kr(n,t);case 6:var r=ze,o=$t;ze=null,vn(e,t,n),ze=r,$t=o,ze!==null&&($t?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&($t?(e=ze,n=n.stateNode,e.nodeType===8?Ou(e.parentNode,n):e.nodeType===1&&Ou(e,n),bi(e)):Ou(ze,n.stateNode));break;case 4:r=ze,o=$t,ze=n.stateNode.containerInfo,$t=!0,vn(e,t,n),ze=r,$t=o;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Gc(n,t,s),o=o.next}while(o!==r)}vn(e,t,n);break;case 1:if(!qe&&(Kr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}vn(e,t,n);break;case 21:vn(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,vn(e,t,n),qe=r):vn(e,t,n);break;default:vn(e,t,n)}}function fm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cC),t.forEach(function(r){var o=wC.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hC(r/1960))-r,10e?16:e,Nn===null)var r=!1;else{if(e=Nn,Nn=null,Qa=0,ce&6)throw Error(I(331));var o=ce;for(ce|=4,K=e.current;K!==null;){var i=K,s=i.child;if(K.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lLe()-Ud?ur(e,0):$d|=n),st(e,t)}function c0(e,t){t===0&&(e.mode&1?(t=As,As<<=1,!(As&130023424)&&(As=4194304)):t=1);var n=Je();e=hn(e,t),e!==null&&(Xi(e,t,n),st(e,n))}function SC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),c0(e,n)}function wC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(t),c0(e,n)}var f0;f0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,aC(e,t,n);rt=!!(e.flags&131072)}else rt=!1,Ee&&t.flags&1048576&&py(t,Ua,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fa(e,t),e=t.pendingProps;var o=so(t,Ge.current);to(t,n),o=Ld(null,t,r,e,o,n);var i=Pd();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,it(r)?(i=!0,Da(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Rd(t),o.updater=El,t.stateNode=o,o._reactInternals=t,Vc(t,r,e,n),t=Hc(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&Sd(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fa(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=EC(r),e=It(r,e),o){case 0:t=Wc(null,t,r,e,n);break e;case 1:t=sm(null,t,r,e,n);break e;case 11:t=om(null,t,r,e,n);break e;case 14:t=im(null,t,r,It(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Wc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),sm(e,t,r,o,n);case 3:e:{if(qy(t),e===null)throw Error(I(387));r=t.pendingProps,i=t.memoizedState,o=i.element,yy(e,t),za(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=co(Error(I(423)),t),t=am(e,t,r,n,o);break e}else if(r!==o){o=co(Error(I(424)),t),t=am(e,t,r,n,o);break e}else for(ft=Dn(t.stateNode.containerInfo.firstChild),dt=t,Ee=!0,Ut=null,n=Ey(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ao(),r===o){t=pn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return xy(t),e===null&&Fc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ic(r,o)?s=null:i!==null&&Ic(r,i)&&(t.flags|=32),Qy(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&Fc(t),null;case 13:return Gy(e,t,n);case 4:return kd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lo(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),om(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ve(Fa,r._currentValue),r._currentValue=s,i!==null)if(Bt(i.value,s)){if(i.children===o.children&&!ot.current){t=pn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=cn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),jc(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(I(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),jc(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,to(t,n),o=Tt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=It(r,t.pendingProps),o=It(r.type,o),im(e,t,r,o,n);case 15:return Hy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),fa(e,t),t.tag=1,it(r)?(e=!0,Da(t)):e=!1,to(t,n),wy(t,r,o),Vc(t,r,o,n),Hc(null,t,r,!0,e,n);case 19:return Yy(e,t,n);case 22:return Ky(e,t,n)}throw Error(I(156,t.tag))};function d0(e,t){return Uv(e,t)}function _C(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bt(e,t,n,r){return new _C(e,t,n,r)}function Vd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function EC(e){if(typeof e=="function")return Vd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ad)return 11;if(e===ld)return 14}return 2}function jn(e,t){var n=e.alternate;return n===null?(n=bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pa(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Vd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case $r:return cr(n.children,o,i,t);case sd:s=8,o|=8;break;case dc:return e=bt(12,n,t,o|2),e.elementType=dc,e.lanes=i,e;case hc:return e=bt(13,n,t,o),e.elementType=hc,e.lanes=i,e;case pc:return e=bt(19,n,t,o),e.elementType=pc,e.lanes=i,e;case _v:return Rl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Sv:s=10;break e;case wv:s=9;break e;case ad:s=11;break e;case ld:s=14;break e;case wn:s=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=bt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function cr(e,t,n,r){return e=bt(7,e,r,t),e.lanes=n,e}function Rl(e,t,n,r){return e=bt(22,e,r,t),e.elementType=_v,e.lanes=n,e.stateNode={isHidden:!1},e}function Uu(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function Fu(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xC(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Su(0),this.expirationTimes=Su(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Su(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bd(e,t,n,r,o,i,s,a,l){return e=new xC(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=bt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rd(i),e}function CC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g0)}catch(e){console.error(e)}}g0(),pv.exports=gt;var Ll=pv.exports;const NC=qi(Ll);var v0,Sm=Ll;v0=Sm.createRoot,Sm.hydrateRoot;var rf={exports:{}},vr={},y0={exports:{}},OC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",LC=OC,PC=LC;function S0(){}function w0(){}w0.resetWarningCache=S0;var AC=function(){function e(r,o,i,s,a,l){if(l!==PC){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:w0,resetWarningCache:S0};return n.PropTypes=n,n};y0.exports=AC();var Qd=y0.exports;const Ce=qi(Qd);var of={exports:{}},Wt={},sf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;/*! - * Adapted from jQuery UI core - * - * http://jqueryui.com - * - * Copyright 2014 jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - * - * http://api.jqueryui.com/category/ui-core/ - */var n="none",r="contents",o=/input|select|textarea|button|object|iframe/;function i(f,d){return d.getPropertyValue("overflow")!=="visible"||f.scrollWidth<=0&&f.scrollHeight<=0}function s(f){var d=f.offsetWidth<=0&&f.offsetHeight<=0;if(d&&!f.innerHTML)return!0;try{var m=window.getComputedStyle(f),v=m.getPropertyValue("display");return d?v!==r&&i(f,m):v===n}catch{return console.warn("Failed to inspect element style"),!1}}function a(f){for(var d=f,m=f.getRootNode&&f.getRootNode();d&&d!==document.body;){if(m&&d===m&&(d=m.host.parentNode),s(d))return!1;d=d.parentNode}return!0}function l(f,d){var m=f.nodeName.toLowerCase(),v=o.test(m)&&!f.disabled||m==="a"&&f.href||d;return v&&a(f)}function u(f){var d=f.getAttribute("tabindex");d===null&&(d=void 0);var m=isNaN(d);return(m||d>=0)&&l(f,!m)}function c(f){var d=[].slice.call(f.querySelectorAll("*"),0).reduce(function(m,v){return m.concat(v.shadowRoot?c(v.shadowRoot):[v])},[]);return d.filter(u)}e.exports=t.default})(sf,sf.exports);var _0=sf.exports;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.resetState=$C;Wt.log=UC;Wt.handleBlur=$i;Wt.handleFocus=Ui;Wt.markForFocusLater=FC;Wt.returnFocus=jC;Wt.popWithoutFocus=zC;Wt.setupScopedFocus=VC;Wt.teardownScopedFocus=BC;var IC=_0,MC=DC(IC);function DC(e){return e&&e.__esModule?e:{default:e}}var ho=[],qr=null,af=!1;function $C(){ho=[]}function UC(){}function $i(){af=!0}function Ui(){if(af){if(af=!1,!qr)return;setTimeout(function(){if(!qr.contains(document.activeElement)){var e=(0,MC.default)(qr)[0]||qr;e.focus()}},0)}}function FC(){ho.push(document.activeElement)}function jC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{ho.length!==0&&(t=ho.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function zC(){ho.length>0&&ho.pop()}function VC(e){qr=e,window.addEventListener?(window.addEventListener("blur",$i,!1),document.addEventListener("focus",Ui,!0)):(window.attachEvent("onBlur",$i),document.attachEvent("onFocus",Ui))}function BC(){qr=null,window.addEventListener?(window.removeEventListener("blur",$i),document.removeEventListener("focus",Ui)):(window.detachEvent("onBlur",$i),document.detachEvent("onFocus",Ui))}var lf={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=_0,r=o(n);function o(a){return a&&a.__esModule?a:{default:a}}function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document;return a.activeElement.shadowRoot?i(a.activeElement.shadowRoot):a.activeElement}function s(a,l){var u=(0,r.default)(a);if(!u.length){l.preventDefault();return}var c=void 0,f=l.shiftKey,d=u[0],m=u[u.length-1],v=i();if(a===v){if(!f)return;c=m}if(m===v&&!f&&(c=d),d===v&&f&&(c=m),c){l.preventDefault(),c.focus();return}var y=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),E=y!=null&&y[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(E){var g=u.indexOf(v);if(g>-1&&(g+=f?-1:1),c=u[g],typeof c>"u"){l.preventDefault(),c=f?m:d,c.focus();return}l.preventDefault(),c.focus()}}e.exports=t.default})(lf,lf.exports);var WC=lf.exports,Ht={},HC=function(){},KC=HC,Vt={},E0={exports:{}};/*! - Copyright (c) 2015 Jed Watson. - Based on code that is Copyright 2013-2015, Facebook, Inc. - All rights reserved. -*/(function(e){(function(){var t=!!(typeof window<"u"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker<"u",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(E0);var QC=E0.exports;Object.defineProperty(Vt,"__esModule",{value:!0});Vt.canUseDOM=Vt.SafeNodeList=Vt.SafeHTMLCollection=void 0;var qC=QC,GC=YC(qC);function YC(e){return e&&e.__esModule?e:{default:e}}var Pl=GC.default,XC=Pl.canUseDOM?window.HTMLElement:{};Vt.SafeHTMLCollection=Pl.canUseDOM?window.HTMLCollection:{};Vt.SafeNodeList=Pl.canUseDOM?window.NodeList:{};Vt.canUseDOM=Pl.canUseDOM;Vt.default=XC;Object.defineProperty(Ht,"__esModule",{value:!0});Ht.resetState=nb;Ht.log=rb;Ht.assertNodeList=x0;Ht.setElement=ob;Ht.validateElement=qd;Ht.hide=ib;Ht.show=sb;Ht.documentNotReadyOrSSRTesting=ab;var JC=KC,ZC=tb(JC),eb=Vt;function tb(e){return e&&e.__esModule?e:{default:e}}var Et=null;function nb(){Et&&(Et.removeAttribute?Et.removeAttribute("aria-hidden"):Et.length!=null?Et.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(Et).forEach(function(e){return e.removeAttribute("aria-hidden")})),Et=null}function rb(){}function x0(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function ob(e){var t=e;if(typeof t=="string"&&eb.canUseDOM){var n=document.querySelectorAll(t);x0(n,t),t=n}return Et=t||Et,Et}function qd(e){var t=e||Et;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,ZC.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function ib(e){var t=!0,n=!1,r=void 0;try{for(var o=qd(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function sb(e){var t=!0,n=!1,r=void 0;try{for(var o=qd(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=!0){var s=i.value;s.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}function ab(){Et=null}var Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.resetState=lb;Ro.log=ub;var hi={},pi={};function wm(e,t){e.classList.remove(t)}function lb(){var e=document.getElementsByTagName("html")[0];for(var t in hi)wm(e,hi[t]);var n=document.body;for(var r in pi)wm(n,pi[r]);hi={},pi={}}function ub(){}var cb=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},fb=function(t,n){return t[n]&&(t[n]-=1),n},db=function(t,n,r){r.forEach(function(o){cb(n,o),t.add(o)})},hb=function(t,n,r){r.forEach(function(o){fb(n,o),n[o]===0&&t.remove(o)})};Ro.add=function(t,n){return db(t.classList,t.nodeName.toLowerCase()=="html"?hi:pi,n.split(" "))};Ro.remove=function(t,n){return hb(t.classList,t.nodeName.toLowerCase()=="html"?hi:pi,n.split(" "))};var ko={};Object.defineProperty(ko,"__esModule",{value:!0});ko.log=mb;ko.resetState=gb;function pb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var C0=function e(){var t=this;pb(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},Ya=new C0;function mb(){console.log("portalOpenInstances ----------"),console.log(Ya.openInstances.length),Ya.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function gb(){Ya=new C0}ko.default=Ya;var Gd={};Object.defineProperty(Gd,"__esModule",{value:!0});Gd.resetState=wb;Gd.log=_b;var vb=ko,yb=Sb(vb);function Sb(e){return e&&e.__esModule?e:{default:e}}var Qe=void 0,Mt=void 0,fr=[];function wb(){for(var e=[Qe,Mt],t=0;t0?(document.body.firstChild!==Qe&&document.body.insertBefore(Qe,document.body.firstChild),document.body.lastChild!==Mt&&document.body.appendChild(Mt)):(Qe.parentElement&&Qe.parentElement.removeChild(Qe),Mt.parentElement&&Mt.parentElement.removeChild(Mt))}yb.default.subscribe(Eb);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(W){for(var U=1;U0&&(de-=1,de===0&&m.show(B)),T.props.shouldFocusAfterRender&&(T.props.shouldReturnFocusAfterClose?(u.returnFocus(T.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),T.props.onAfterClose&&T.props.onAfterClose(),p.default.deregister(T)},T.open=function(){T.beforeOpen(),T.state.afterOpen&&T.state.beforeClose?(clearTimeout(T.closeTimer),T.setState({beforeClose:!1})):(T.props.shouldFocusAfterRender&&(u.setupScopedFocus(T.node),u.markForFocusLater()),T.setState({isOpen:!0},function(){T.openAnimationFrame=requestAnimationFrame(function(){T.setState({afterOpen:!0}),T.props.isOpen&&T.props.onAfterOpen&&T.props.onAfterOpen({overlayEl:T.overlay,contentEl:T.content})})}))},T.close=function(){T.props.closeTimeoutMS>0?T.closeWithTimeout():T.closeWithoutTimeout()},T.focusContent=function(){return T.content&&!T.contentHasFocus()&&T.content.focus({preventScroll:!0})},T.closeWithTimeout=function(){var O=Date.now()+T.props.closeTimeoutMS;T.setState({beforeClose:!0,closesAt:O},function(){T.closeTimer=setTimeout(T.closeWithoutTimeout,T.state.closesAt-Date.now())})},T.closeWithoutTimeout=function(){T.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},T.afterClose)},T.handleKeyDown=function(O){$(O)&&(0,f.default)(T.content,O),T.props.shouldCloseOnEsc&&oe(O)&&(O.stopPropagation(),T.requestClose(O))},T.handleOverlayOnClick=function(O){T.shouldClose===null&&(T.shouldClose=!0),T.shouldClose&&T.props.shouldCloseOnOverlayClick&&(T.ownerHandlesClose()?T.requestClose(O):T.focusContent()),T.shouldClose=null},T.handleContentOnMouseUp=function(){T.shouldClose=!1},T.handleOverlayOnMouseDown=function(O){!T.props.shouldCloseOnOverlayClick&&O.target==T.overlay&&O.preventDefault()},T.handleContentOnClick=function(){T.shouldClose=!1},T.handleContentOnMouseDown=function(){T.shouldClose=!1},T.requestClose=function(O){return T.ownerHandlesClose()&&T.props.onRequestClose(O)},T.ownerHandlesClose=function(){return T.props.onRequestClose},T.shouldBeClosed=function(){return!T.state.isOpen&&!T.state.beforeClose},T.contentHasFocus=function(){return document.activeElement===T.content||T.content.contains(document.activeElement)},T.buildClassName=function(O,B){var M=(typeof B>"u"?"undefined":r(B))==="object"?B:{base:G[O],afterOpen:G[O]+"--after-open",beforeClose:G[O]+"--before-close"},F=M.base;return T.state.afterOpen&&(F=F+" "+M.afterOpen),T.state.beforeClose&&(F=F+" "+M.beforeClose),typeof B=="string"&&B?F+" "+B:F},T.attributesFromObject=function(O,B){return Object.keys(B).reduce(function(M,F){return M[O+"-"+F]=B[F],M},{})},T.state={afterOpen:!1,beforeClose:!1},T.shouldClose=null,T.moveFromContentToOverlay=null,T}return o(U,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(T,O){this.props.isOpen&&!T.isOpen?this.open():!this.props.isOpen&&T.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!O.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var T=this.props,O=T.appElement,B=T.ariaHideApp,M=T.htmlOpenClassName,F=T.bodyOpenClassName,b=T.parentSelector,P=b&&b().ownerDocument||document;F&&y.add(P.body,F),M&&y.add(P.getElementsByTagName("html")[0],M),B&&(de+=1,m.hide(O)),p.default.register(this)}},{key:"render",value:function(){var T=this.props,O=T.id,B=T.className,M=T.overlayClassName,F=T.defaultStyles,b=T.children,P=B?{}:F.content,D=M?{}:F.overlay;if(this.shouldBeClosed())return null;var J={ref:this.setOverlayRef,className:this.buildClassName("overlay",M),style:n({},D,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},V=n({id:O,ref:this.setContentRef,style:n({},P,this.props.style.content),className:this.buildClassName("content",B),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),H=this.props.contentElement(V,b);return this.props.overlayElement(J,H)}}]),U}(i.Component);se.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},se.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(g.default),a.default.instanceOf(E.SafeHTMLCollection),a.default.instanceOf(E.SafeNodeList),a.default.arrayOf(a.default.instanceOf(g.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=se,e.exports=t.default})(of,of.exports);var xb=of.exports;function b0(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function R0(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function k0(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}b0.__suppressDeprecationWarning=!0;R0.__suppressDeprecationWarning=!0;k0.__suppressDeprecationWarning=!0;function Cb(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,s=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. - -`+i+" uses "+s+" but also contains the following legacy lifecycles:"+(n!==null?` - `+n:"")+(r!==null?` - `+r:"")+(o!==null?` - `+o:"")+` - -The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=b0,t.componentWillReceiveProps=R0),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=k0;var a=t.componentDidUpdate;t.componentDidUpdate=function(u,c,f){var d=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;a.call(this,u,c,d)}}return e}const bb=Object.freeze(Object.defineProperty({__proto__:null,polyfill:Cb},Symbol.toStringTag,{value:"Module"})),Rb=i_(bb);Object.defineProperty(vr,"__esModule",{value:!0});vr.bodyOpenClassName=vr.portalClassName=void 0;var Em=Object.assign||function(e){for(var t=1;t{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Fi=typeof window>"u"||"Deno"in window;function _t(){}function jb(e,t){return typeof e=="function"?e(t):e}function uf(e){return typeof e=="number"&&e>=0&&e!==1/0}function O0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ti(e,t,n){return os(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function M4(e,t,n){return os(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function En(e,t,n){return os(e)?[{...t,queryKey:e},n]:[e||{},t]}function Tm(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(os(s)){if(r){if(t.queryHash!==Yd(s,t.options))return!1}else if(!Za(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function Nm(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(os(i)){if(!t.options.mutationKey)return!1;if(n){if(lr(t.options.mutationKey)!==lr(i))return!1}else if(!Za(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function Yd(e,t){return((t==null?void 0:t.queryKeyHashFn)||lr)(e)}function lr(e){return JSON.stringify(e,(t,n)=>cf(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Za(e,t){return L0(e,t)}function L0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!L0(e[n],t[n])):!1}function P0(e,t){if(e===t)return e;const n=Lm(e)&&Lm(t);if(n||cf(e)&&cf(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!Pm(n)||!n.hasOwnProperty("isPrototypeOf"))}function Pm(e){return Object.prototype.toString.call(e)==="[object Object]"}function os(e){return Array.isArray(e)}function A0(e){return new Promise(t=>{setTimeout(t,e)})}function Am(e){A0(0).then(e)}function zb(){if(typeof AbortController=="function")return new AbortController}function ff(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?P0(e,t):t}class Vb extends rs{constructor(){super(),this.setup=t=>{if(!Fi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const el=new Vb,Im=["online","offline"];class Bb extends rs{constructor(){super(),this.setup=t=>{if(!Fi&&window.addEventListener){const n=()=>t();return Im.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{Im.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const tl=new Bb;function Wb(e){return Math.min(1e3*2**e,3e4)}function Al(e){return(e??"online")==="online"?tl.isOnline():!0}class I0{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function ma(e){return e instanceof I0}function M0(e){let t=!1,n=0,r=!1,o,i,s;const a=new Promise((E,g)=>{i=E,s=g}),l=E=>{r||(m(new I0(E)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},f=()=>!el.isFocused()||e.networkMode!=="always"&&!tl.isOnline(),d=E=>{r||(r=!0,e.onSuccess==null||e.onSuccess(E),o==null||o(),i(E))},m=E=>{r||(r=!0,e.onError==null||e.onError(E),o==null||o(),s(E))},v=()=>new Promise(E=>{o=g=>{const h=r||!f();return h&&E(g),h},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),y=()=>{if(r)return;let E;try{E=e.fn()}catch(g){E=Promise.reject(g)}Promise.resolve(E).then(d).catch(g=>{var h,p;if(r)return;const w=(h=e.retry)!=null?h:3,R=(p=e.retryDelay)!=null?p:Wb,x=typeof R=="function"?R(n,g):R,k=w===!0||typeof w=="number"&&n{if(f())return v()}).then(()=>{t?m(g):y()})})};return Al(e.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(o==null?void 0:o())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}const Xd=console;function Hb(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let f;t++;try{f=c()}finally{t--,t||a()}return f},i=c=>{t?e.push(c):Am(()=>{n(c)})},s=c=>(...f)=>{i(()=>{c(...f)})},a=()=>{const c=e;e=[],c.length&&Am(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:o,batchCalls:s,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const Pe=Hb();class D0{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),uf(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Fi?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Kb extends D0{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Xd,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Qb(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=ff(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(_t).catch(_t):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!O0(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(v=>v.options.queryFn);m&&this.setOptions(m.options)}Array.isArray(this.options.queryKey);const s=zb(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};l(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=m=>{if(ma(m)&&m.silent||this.dispatch({type:"error",error:m}),!ma(m)){var v,y,E,g;(v=(y=this.cache.config).onError)==null||v.call(y,m,this),(E=(g=this.cache.config).onSettled)==null||E.call(g,this.state.data,m,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=M0({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:m=>{var v,y,E,g;if(typeof m>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(m),(v=(y=this.cache.config).onSuccess)==null||v.call(y,m,this),(E=(g=this.cache.config).onSettled)==null||E.call(g,m,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(m,v)=>{this.dispatch({type:"failed",failureCount:m,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Al(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return ma(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Pe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Qb(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class $0 extends rs{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,s=(o=n.queryHash)!=null?o:Yd(i,n);let a=this.get(s);return a||(a=new Kb({cache:this,logger:t.getLogger(),queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Pe.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=En(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>Tm(r,o))}findAll(t,n){const[r]=En(t,n);return Object.keys(r).length>0?this.queries.filter(o=>Tm(r,o)):this.queries}notify(t){Pe.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Pe.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Pe.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class qb extends D0{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Xd,this.observers=[],this.state=t.state||Gb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var k;return this.retryer=M0({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(L,G)=>{this.dispatch({type:"failed",failureCount:L,error:G})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(k=this.options.retry)!=null?k:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,s,a,l,u,c;if(!n){var f,d,m,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(d=this.mutationCache.config).onMutate)==null?void 0:f.call(d,this.state.variables,this));const L=await((m=(v=this.options).onMutate)==null?void 0:m.call(v,this.state.variables));L!==this.state.context&&this.dispatch({type:"loading",context:L,variables:this.state.variables})}const k=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,k,this.state.variables,this.state.context,this)),await((i=(s=this.options).onSuccess)==null?void 0:i.call(s,k,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,k,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,k,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:k}),k}catch(k){try{var y,E,g,h,p,w,R,x;throw await((y=(E=this.mutationCache.config).onError)==null?void 0:y.call(E,k,this.state.variables,this.state.context,this)),await((g=(h=this.options).onError)==null?void 0:g.call(h,k,this.state.variables,this.state.context)),await((p=(w=this.mutationCache.config).onSettled)==null?void 0:p.call(w,void 0,k,this.state.variables,this.state.context,this)),await((R=(x=this.options).onSettled)==null?void 0:R.call(x,void 0,k,this.state.variables,this.state.context)),k}finally{this.dispatch({type:"error",error:k})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Al(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Pe.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function Gb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Yb extends rs{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new qb({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Pe.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>Nm(t,n))}findAll(t){return this.mutations.filter(n=>Nm(t,n))}notify(t){Pe.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Pe.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(_t)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Xb(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",d=((i=e.state.data)==null?void 0:i.pages)||[],m=((s=e.state.data)==null?void 0:s.pageParams)||[];let v=m,y=!1;const E=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>{var k;if((k=e.signal)!=null&&k.aborted)y=!0;else{var L;(L=e.signal)==null||L.addEventListener("abort",()=>{y=!0})}return e.signal}})},g=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(x,k,L,G)=>(v=G?[k,...v]:[...v,k],G?[L,...x]:[...x,L]),p=(x,k,L,G)=>{if(y)return Promise.reject("Cancelled");if(typeof L>"u"&&!k&&x.length)return Promise.resolve(x);const $={queryKey:e.queryKey,pageParam:L,meta:e.options.meta};E($);const oe=g($);return Promise.resolve(oe).then(se=>h(x,L,se,G))};let w;if(!d.length)w=p([]);else if(c){const x=typeof u<"u",k=x?u:Mm(e.options,d);w=p(d,x,k)}else if(f){const x=typeof u<"u",k=x?u:Jb(e.options,d);w=p(d,x,k,!0)}else{v=[];const x=typeof e.options.getNextPageParam>"u";w=(a&&d[0]?a(d[0],0,d):!0)?p([],x,m[0]):Promise.resolve(h([],m[0],d[0]));for(let L=1;L{if(a&&d[L]?a(d[L],L,d):!0){const oe=x?m[L]:Mm(e.options,G);return p(G,x,oe)}return Promise.resolve(h(G,m[L],d[L]))})}return w.then(x=>({pages:x,pageParams:v}))}}}}function Mm(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Jb(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Zb{constructor(t={}){this.queryCache=t.queryCache||new $0,this.mutationCache=t.mutationCache||new Yb,this.logger=t.logger||Xd,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=el.subscribe(()=>{el.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=tl.subscribe(()=>{tl.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=En(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=ti(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,s=jb(n,i);if(typeof s>"u")return;const a=ti(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Pe.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=En(t,n),o=this.queryCache;Pe.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=En(t,n,r),s=this.queryCache,a={type:"active",...o};return Pe.batch(()=>(s.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(t,n,r){const[o,i={}]=En(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const s=Pe.batch(()=>this.queryCache.findAll(o).map(a=>a.cancel(i)));return Promise.all(s).then(_t).catch(_t)}invalidateQueries(t,n,r){const[o,i]=En(t,n,r);return Pe.batch(()=>{var s,a;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const l={...o,type:(s=(a=o.refetchType)!=null?a:o.type)!=null?s:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=En(t,n,r),s=Pe.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let a=Promise.all(s).then(_t);return i!=null&&i.throwOnError||(a=a.catch(_t)),a}fetchQuery(t,n,r){const o=ti(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(_t).catch(_t)}fetchInfiniteQuery(t,n,r){const o=ti(t,n,r);return o.behavior=Xb(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(_t).catch(_t)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>lr(t)===lr(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Za(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>lr(t)===lr(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Za(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Yd(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class eR extends rs{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Dm(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return df(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return df(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Om(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&$m(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return nR(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_t)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Fi||this.currentResult.isStale||!uf(this.options.staleTime))return;const n=O0(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Fi||this.options.enabled===!1||!uf(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||el.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:d,error:m,errorUpdatedAt:v,fetchStatus:y,status:E}=f,g=!1,h=!1,p;if(n._optimisticResults){const L=this.hasListeners(),G=!L&&Dm(t,n),$=L&&$m(t,r,n,o);(G||$)&&(y=Al(t.options.networkMode)?"fetching":"paused",d||(E="loading")),n._optimisticResults==="isRestoring"&&(y="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&E!=="error")p=c.data,d=c.dataUpdatedAt,E=c.status,g=!0;else if(n.select&&typeof f.data<"u")if(i&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)p=this.selectResult;else try{this.selectFn=n.select,p=n.select(f.data),p=ff(i==null?void 0:i.data,p,n),this.selectResult=p,this.selectError=null}catch(L){this.selectError=L}else p=f.data;if(typeof n.placeholderData<"u"&&typeof p>"u"&&E==="loading"){let L;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))L=i.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof L<"u")try{L=n.select(L),this.selectError=null}catch(G){this.selectError=G}typeof L<"u"&&(E="success",p=ff(i==null?void 0:i.data,L,n),h=!0)}this.selectError&&(m=this.selectError,p=this.selectResult,v=Date.now(),E="error");const w=y==="fetching",R=E==="loading",x=E==="error";return{status:E,fetchStatus:y,isLoading:R,isSuccess:E==="success",isError:x,isInitialLoading:R&&w,data:p,dataUpdatedAt:d,error:m,errorUpdatedAt:v,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!R,isLoadingError:x&&f.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:h,isPreviousData:g,isRefetchError:x&&f.dataUpdatedAt!==0,isStale:Jd(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Om(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!ma(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Pe.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var s,a,l,u;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function tR(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Dm(e,t){return tR(e,t)||e.state.dataUpdatedAt>0&&df(e,t,t.refetchOnMount)}function df(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Jd(e,t)}return!1}function $m(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Jd(e,n)}function Jd(e,t){return e.isStaleByTime(t.staleTime)}function nR(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:e.getCurrentResult()!==t}var U0={exports:{}},F0={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var po=S;function rR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oR=typeof Object.is=="function"?Object.is:rR,iR=po.useState,sR=po.useEffect,aR=po.useLayoutEffect,lR=po.useDebugValue;function uR(e,t){var n=t(),r=iR({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return aR(function(){o.value=n,o.getSnapshot=t,ju(o)&&i({inst:o})},[e,n,t]),sR(function(){return ju(o)&&i({inst:o}),e(function(){ju(o)&&i({inst:o})})},[e]),lR(n),n}function ju(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!oR(e,n)}catch{return!0}}function cR(e,t){return t()}var fR=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cR:uR;F0.useSyncExternalStore=po.useSyncExternalStore!==void 0?po.useSyncExternalStore:fR;U0.exports=F0;var dR=U0.exports;const hR=dR.useSyncExternalStore,Um=S.createContext(void 0),j0=S.createContext(!1);function z0(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Um),window.ReactQueryClientContext):Um)}const pR=({context:e}={})=>{const t=S.useContext(z0(e,S.useContext(j0)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mR=({client:e,children:t,context:n,contextSharing:r=!1})=>{S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=z0(n,r);return S.createElement(j0.Provider,{value:!n&&r},S.createElement(o.Provider,{value:e},t))},V0=S.createContext(!1),gR=()=>S.useContext(V0);V0.Provider;function vR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const yR=S.createContext(vR()),SR=()=>S.useContext(yR);function wR(e,t){return typeof e=="function"?e(...t):!!e}const _R=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},ER=e=>{S.useEffect(()=>{e.clearReset()},[e])},xR=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&wR(n,[e.error,r]),CR=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},bR=(e,t)=>e.isLoading&&e.isFetching&&!t,RR=(e,t,n)=>(e==null?void 0:e.suspense)&&bR(t,n),kR=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function TR(e,t){const n=pR({context:e.context}),r=gR(),o=SR(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=Pe.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Pe.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Pe.batchCalls(i.onSettled)),CR(i),_R(i,o),ER(o);const[s]=S.useState(()=>new t(n,i)),a=s.getOptimisticResult(i);if(hR(S.useCallback(l=>{const u=r?()=>{}:s.subscribe(Pe.batchCalls(l));return s.updateResult(),u},[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),S.useEffect(()=>{s.setOptions(i,{listeners:!1})},[i,s]),RR(i,a,r))throw kR(i,s,o);if(xR({result:a,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:s.trackResult(a)}function NR(e,t,n){const r=ti(e,t,n);return TR(r,eR)}/** - * @remix-run/router v1.7.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ji(){return ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Il(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function LR(){return Math.random().toString(36).substr(2,8)}function jm(e,t){return{usr:e.state,key:e.key,idx:t}}function hf(e,t,n,r){return n===void 0&&(n=null),ji({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cr(t):t,{state:n,key:t&&t.key||r||LR()})}function nl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function PR(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Ln.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(ji({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function f(){a=Ln.Pop;let E=c(),g=E==null?null:E-u;u=E,l&&l({action:a,location:y.location,delta:g})}function d(E,g){a=Ln.Push;let h=hf(y.location,E,g);n&&n(h,E),u=c()+1;let p=jm(h,u),w=y.createHref(h);try{s.pushState(p,"",w)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(w)}i&&l&&l({action:a,location:y.location,delta:1})}function m(E,g){a=Ln.Replace;let h=hf(y.location,E,g);n&&n(h,E),u=c();let p=jm(h,u),w=y.createHref(h);s.replaceState(p,"",w),i&&l&&l({action:a,location:y.location,delta:0})}function v(E){let g=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof E=="string"?E:nl(E);return Be(g,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,g)}let y={get action(){return a},get location(){return e(o,s)},listen(E){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Fm,f),l=E,()=>{o.removeEventListener(Fm,f),l=null}},createHref(E){return t(o,E)},createURL:v,encodeLocation(E){let g=v(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:m,go(E){return s.go(E)}};return y}var zm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zm||(zm={}));function AR(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Cr(t):t,o=Zd(r.pathname||"/",n);if(o==null)return null;let i=B0(e);IR(i);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Be(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=zn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Be(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),B0(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:zR(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of W0(i.path))o(i,s,l)}),t}function W0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=W0(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function IR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const MR=/^:\w+$/,DR=3,$R=2,UR=1,FR=10,jR=-2,Vm=e=>e==="*";function zR(e,t){let n=e.split("/"),r=n.length;return n.some(Vm)&&(r+=jR),t&&(r+=$R),n.filter(o=>!Vm(o)).reduce((o,i)=>o+(MR.test(i)?DR:i===""?UR:FR),r)}function VR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function BR(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let d=a[f]||"";s=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=QR(a[f]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function HR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Il(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function KR(e){try{return decodeURI(e)}catch(t){return Il(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function QR(e,t){try{return decodeURIComponent(e)}catch(n){return Il(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Zd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function qR(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Cr(e):e;return{pathname:n?n.startsWith("/")?n:GR(n,t):t,search:XR(r),hash:JR(o)}}function GR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function zu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function H0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function K0(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Cr(e):(o=ji({},e),Be(!o.pathname||!o.pathname.includes("?"),zu("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),zu("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),zu("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let f=t.length-1;if(s.startsWith("..")){let d=s.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=qR(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const zn=e=>e.join("/").replace(/\/\/+/g,"/"),YR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ZR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Q0=["post","put","patch","delete"];new Set(Q0);const e2=["get",...Q0];new Set(e2);/** - * React Router v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=S.useRef(!1);return G0(()=>{s.current=!0}),S.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=K0(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:zn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function Y0(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=S.useContext(br),{pathname:o}=ss(),i=JSON.stringify(H0(r).map(s=>s.pathnameBase));return S.useMemo(()=>K0(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function X0(e,t){return i2(e,t)}function i2(e,t,n){is()||Be(!1);let{navigator:r}=S.useContext(To),{matches:o}=S.useContext(br),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=ss(),u;if(t){var c;let y=typeof t=="string"?Cr(t):t;a==="/"||(c=y.pathname)!=null&&c.startsWith(a)||Be(!1),u=y}else u=l;let f=u.pathname||"/",d=a==="/"?f:f.slice(a.length)||"/",m=AR(e,{pathname:d}),v=c2(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:zn([a,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:zn([a,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n);return t&&v?S.createElement(Ml.Provider,{value:{location:rl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ln.Pop}},v):v}function s2(){let e=p2(),t=ZR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:o},n):null,i)}const a2=S.createElement(s2,null);class l2 extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?S.createElement(br.Provider,{value:this.props.routeContext},S.createElement(q0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function u2(e){let{routeContext:t,match:n,children:r}=e,o=S.useContext(eh);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(br.Provider,{value:t},r)}function c2(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||Be(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,f=null;n&&(f=l.route.errorElement||a2);let d=t.concat(i.slice(0,u+1)),m=()=>{let v;return c?v=f:l.route.Component?v=S.createElement(l.route.Component,null):l.route.element?v=l.route.element:v=a,S.createElement(u2,{match:l,routeContext:{outlet:a,matches:d,isDataRoute:n!=null},children:v})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?S.createElement(l2,{location:n.location,revalidation:n.revalidation,component:f,error:c,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var pf;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(pf||(pf={}));var zi;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(zi||(zi={}));function f2(e){let t=S.useContext(eh);return t||Be(!1),t}function d2(e){let t=S.useContext(t2);return t||Be(!1),t}function h2(e){let t=S.useContext(br);return t||Be(!1),t}function J0(e){let t=h2(),n=t.matches[t.matches.length-1];return n.route.id||Be(!1),n.route.id}function p2(){var e;let t=S.useContext(q0),n=d2(zi.UseRouteError),r=J0(zi.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function m2(){let{router:e}=f2(pf.UseNavigateStable),t=J0(zi.UseNavigateStable),n=S.useRef(!1);return G0(()=>{n.current=!0}),S.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,rl({fromRouteId:t},i)))},[e,t])}function g2(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ln.Pop,navigator:i,static:s=!1}=e;is()&&Be(!1);let a=t.replace(/^\/*/,"/"),l=S.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Cr(r));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:m="default"}=r,v=S.useMemo(()=>{let y=Zd(u,a);return y==null?null:{location:{pathname:y,search:c,hash:f,state:d,key:m},navigationType:o}},[a,u,c,f,d,m,o]);return v==null?null:S.createElement(To.Provider,{value:l},S.createElement(Ml.Provider,{children:n,value:v}))}var Bm;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Bm||(Bm={}));new Promise(()=>{});/** - * React Router DOM v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function y2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function S2(e,t){return e.button===0&&(!t||t==="_self")&&!y2(e)}const w2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],_2="startTransition",Wm=tn[_2];function E2(e){let{basename:t,children:n,future:r,window:o}=e,i=S.useRef();i.current==null&&(i.current=OR({window:o,v5Compat:!0}));let s=i.current,[a,l]=S.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=S.useCallback(f=>{u&&Wm?Wm(()=>l(f)):l(f)},[l,u]);return S.useLayoutEffect(()=>s.listen(c),[s,c]),S.createElement(g2,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const x2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",C2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Z0=S.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,f=v2(t,w2),{basename:d}=S.useContext(To),m,v=!1;if(typeof u=="string"&&C2.test(u)&&(m=u,x2))try{let h=new URL(window.location.href),p=u.startsWith("//")?new URL(h.protocol+u):new URL(u),w=Zd(p.pathname,d);p.origin===h.origin&&w!=null?u=w+p.search+p.hash:v=!0}catch{}let y=n2(u,{relative:o}),E=b2(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o});function g(h){r&&r(h),h.defaultPrevented||E(h)}return S.createElement("a",mf({},f,{href:m||y,onClick:v||i?r:g,ref:n,target:l}))});var Hm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Hm||(Hm={}));var Km;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Km||(Km={}));function b2(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=r2(),l=ss(),u=Y0(e,{relative:s});return S.useCallback(c=>{if(S2(c,n)){c.preventDefault();let f=r!==void 0?r:nl(l)===nl(u);a(e,{replace:f,state:o,preventScrollReset:i,relative:s})}},[l,a,u,r,o,n,e,i,s])}function R2(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var k2=R2,ae=k2;function T2(e){return!!e&&typeof e.then=="function"}var Se=T2;function N2(e,t){if(e!=null)return e;throw ae(t??"Got unexpected null or undefined")}var xe=N2;function ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Dl{getValue(){throw ae("BaseLoadable")}toPromise(){throw ae("BaseLoadable")}valueMaybe(){throw ae("BaseLoadable")}valueOrThrow(){throw ae(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ae("BaseLoadable")}promiseOrThrow(){throw ae(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ae("BaseLoadable")}errorOrThrow(){throw ae(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ae("BaseLoadable")}}class O2 extends Dl{constructor(t){super(),ie(this,"state","hasValue"),ie(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Se(n)?yr(n):mo(n)?n:as(n)}catch(n){return Se(n)?yr(n.next(()=>this.map(t))):$l(n)}}}class L2 extends Dl{constructor(t){super(),ie(this,"state","hasError"),ie(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class e1 extends Dl{constructor(t){super(),ie(this,"state","loading"),ie(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return yr(this.contents.then(n=>{const r=t(n);if(mo(r)){const o=r;switch(o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":return o.contents}}return r}).catch(n=>{if(Se(n))return n.then(()=>this.map(t).contents);throw n}))}}function as(e){return Object.freeze(new O2(e))}function $l(e){return Object.freeze(new L2(e))}function yr(e){return Object.freeze(new e1(e))}function t1(){return Object.freeze(new e1(new Promise(()=>{})))}function P2(e){return e.every(t=>t.state==="hasValue")?as(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?$l(xe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):yr(Promise.all(e.map(t=>t.contents)))}function n1(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>mo(o)?o:Se(o)?yr(o):as(o)),r=P2(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,s,a)=>({...i,[s]:o[a]}),{}))}function mo(e){return e instanceof Dl}const A2={of:e=>Se(e)?yr(e):mo(e)?e:as(e),error:e=>$l(e),loading:()=>t1(),all:n1,isLoadable:mo};var Rr={loadableWithValue:as,loadableWithError:$l,loadableWithPromise:yr,loadableLoading:t1,loadableAll:n1,isLoadable:mo,RecoilLoadable:A2},I2=Rr.loadableWithValue,M2=Rr.loadableWithError,D2=Rr.loadableWithPromise,$2=Rr.loadableLoading,U2=Rr.loadableAll,F2=Rr.isLoadable,j2=Rr.RecoilLoadable,ls=Object.freeze({__proto__:null,loadableWithValue:I2,loadableWithError:M2,loadableWithPromise:D2,loadableLoading:$2,loadableAll:U2,isLoadable:F2,RecoilLoadable:j2});const gf={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function z2(e,t){var n,r;const o=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(o==null||o==="")return;if(!["true","false"].includes(o))throw ae(`({}).${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function V2(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function B2(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(z2("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{gf.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),V2("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{gf.RECOIL_GKS_ENABLED.add(n)})}))}B2();var No=gf;function Ul(e){return No.RECOIL_GKS_ENABLED.has(e)}Ul.setPass=e=>{No.RECOIL_GKS_ENABLED.add(e)};Ul.setFail=e=>{No.RECOIL_GKS_ENABLED.delete(e)};Ul.clear=()=>{No.RECOIL_GKS_ENABLED.clear()};var pe=Ul;function W2(e,t,{error:n}={}){return null}var H2=W2,th=H2,Vu,Bu,Wu;const K2=(Vu=Q.createMutableSource)!==null&&Vu!==void 0?Vu:Q.unstable_createMutableSource,r1=(Bu=Q.useMutableSource)!==null&&Bu!==void 0?Bu:Q.unstable_useMutableSource,o1=(Wu=Q.useSyncExternalStore)!==null&&Wu!==void 0?Wu:Q.unstable_useSyncExternalStore;function Q2(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function q2(){return pe("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:pe("recoil_sync_external_store")&&o1!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:pe("recoil_mutable_source")&&r1!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?pe("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:pe("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function G2(){return!1}var us={createMutableSource:K2,useMutableSource:r1,useSyncExternalStore:o1,currentRendererSupportsUseSyncExternalStore:Q2,reactMode:q2,isFastRefreshEnabled:G2};class nh{constructor(t){ie(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class i1 extends nh{}class s1 extends nh{}function Y2(e){return e instanceof i1||e instanceof s1}var Fl={AbstractRecoilValue:nh,RecoilState:i1,RecoilValueReadOnly:s1,isRecoilValue:Y2},X2=Fl.AbstractRecoilValue,J2=Fl.RecoilState,Z2=Fl.RecoilValueReadOnly,ek=Fl.isRecoilValue,go=Object.freeze({__proto__:null,AbstractRecoilValue:X2,RecoilState:J2,RecoilValueReadOnly:Z2,isRecoilValue:ek});function tk(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var jl=tk;class a1{}const nk=new a1,Sr=new Map,rh=new Map;function rk(e){return jl(e,t=>xe(rh.get(t)))}function ok(e){if(Sr.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in - production. But it is safe to ignore this warning if it occurred because of - hot module replacement.`;console.warn(t)}}function ik(e){No.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&ok(e.key),Sr.set(e.key,e);const t=e.set==null?new go.RecoilValueReadOnly(e.key):new go.RecoilState(e.key);return rh.set(e.key,t),t}class l1 extends Error{}function sk(e){const t=Sr.get(e);if(t==null)throw new l1(`Missing definition for RecoilValue: "${e}""`);return t}function ak(e){return Sr.get(e)}const ol=new Map;function lk(e){var t;if(!pe("recoil_memory_managament_2020"))return;const n=Sr.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Sr.delete(e),(r=u1(e))===null||r===void 0||r(),ol.delete(e)}}function uk(e,t){pe("recoil_memory_managament_2020")&&(t===void 0?ol.delete(e):ol.set(e,t))}function u1(e){return ol.get(e)}var lt={nodes:Sr,recoilValues:rh,registerNode:ik,getNode:sk,getNodeMaybe:ak,deleteNodeConfigIfPossible:lk,setConfigDeletionHandler:uk,getConfigDeletionHandler:u1,recoilValuesForKeys:rk,NodeMissingError:l1,DefaultValue:a1,DEFAULT_VALUE:nk};function ck(e,t){t()}var fk={enqueueExecution:ck};function dk(e,t){return t={exports:{}},e(t,t.exports),t.exports}var hk=dk(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},n={},r=5,o=Math.pow(2,r),i=o-1,s=o/2,a=o/4,l={},u=function(C){return function(){return C}},c=n.hash=function(N){var C=typeof N>"u"?"undefined":t(N);if(C==="number")return N;C!=="string"&&(N+="");for(var A=0,j=0,z=N.length;j>1&1431655765,C=(C&858993459)+(C>>2&858993459),C=C+(C>>4)&252645135,C+=C>>8,C+=C>>16,C&127},d=function(C,A){return A>>>C&i},m=function(C){return 1<=A;)z[te--]=z[te];return z[A]=j,z}for(var Z=0,ee=0,le=new Array(q+1);Z>>=1;return te[A]=j,oe(C,ee+1,te)},W=function(C,A,j,z){for(var q=new Array(A-1),te=0,Z=0,ee=0,le=z.length;ee1?G(C,this.hash,le):le[0]}var _e=z();return _e===l?this:(++Z.value,U(C,j,this.hash,this,q,L(C,q,te,_e)))},M=function(C,A,j,z,q,te,Z){var ee=this.mask,le=this.children,_e=d(j,q),tt=m(_e),$e=v(ee,tt),wt=ee&tt,Lt=wt?le[$e]:x,Or=Lt._modify(C,A,j+r,z,q,te,Z);if(Lt===Or)return this;var Rs=T(C,this),Ao=ee,Io=void 0;if(wt&&k(Or)){if(Ao&=~tt,!Ao)return x;if(le.length<=2&&de(le[$e^1]))return le[$e^1];Io=E(Rs,$e,le)}else if(!wt&&!k(Or)){if(le.length>=s)return se(C,_e,Or,ee,le);Ao|=tt,Io=g(Rs,$e,Or,le)}else Io=y(Rs,$e,Or,le);return Rs?(this.mask=Ao,this.children=Io,this):$(C,Ao,Io)},F=function(C,A,j,z,q,te,Z){var ee=this.size,le=this.children,_e=d(j,q),tt=le[_e],$e=(tt||x)._modify(C,A,j+r,z,q,te,Z);if(tt===$e)return this;var wt=T(C,this),Lt=void 0;if(k(tt)&&!k($e))++ee,Lt=y(wt,_e,$e,le);else if(!k(tt)&&k($e)){if(--ee,ee<=a)return W(C,ee,_e,le);Lt=y(wt,_e,x,le)}else Lt=y(wt,_e,$e,le);return wt?(this.size=ee,this.children=Lt,this):oe(C,ee,Lt)};x._modify=function(N,C,A,j,z,q,te){var Z=j();return Z===l?x:(++te.value,L(N,z,q,Z))};function b(N,C,A,j,z){this._editable=N,this._edit=C,this._config=A,this._root=j,this._size=z}b.prototype.setTree=function(N,C){return this._editable?(this._root=N,this._size=C,this):N===this._root?this:new b(this._editable,this._edit,this._config,N,C)};var P=n.tryGetHash=function(N,C,A,j){for(var z=j._root,q=0,te=j._config.keyEq;;)switch(z.type){case h:return te(A,z.key)?z.value:N;case p:{if(C===z.hash)for(var Z=z.children,ee=0,le=Z.length;ee{n.set(o,t(r,o))}),n}var il=Sk;function wk(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function _k(e){return{nodeDeps:il(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:il(e.nodeToNodeSubscriptions,t=>new Set(t))}}function Hu(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:i}=n,s=o.get(e);if(s&&r&&s!==r.nodeDeps.get(e))return;o.set(e,t);const a=s==null?t:mi(t,s);for(const l of a)i.has(l)||i.set(l,new Set),xe(i.get(l)).add(e);if(s){const l=mi(s,t);for(const u of l){if(!i.has(u))return;const c=xe(i.get(u));c.delete(e),c.size===0&&i.delete(u)}}}function Ek(e,t,n,r){var o,i,s,a;const l=n.getState();r===l.currentTree.version||r===((o=l.nextTree)===null||o===void 0?void 0:o.version)||((i=l.previousTree)===null||i===void 0||i.version);const u=n.getGraph(r);if(Hu(e,t,u),r===((s=l.previousTree)===null||s===void 0?void 0:s.version)){const f=n.getGraph(l.currentTree.version);Hu(e,t,f,u)}if(r===((a=l.previousTree)===null||a===void 0?void 0:a.version)||r===l.currentTree.version){var c;const f=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(f!==void 0){const d=n.getGraph(f);Hu(e,t,d,u)}}}var cs={cloneGraph:_k,graph:wk,saveDepsToStore:Ek};let xk=0;const Ck=()=>xk++;let bk=0;const Rk=()=>bk++;let kk=0;const Tk=()=>kk++;var zl={getNextTreeStateVersion:Ck,getNextStoreID:Rk,getNextComponentID:Tk};const{persistentMap:Qm}=vk,{graph:Nk}=cs,{getNextTreeStateVersion:c1}=zl;function f1(){const e=c1();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Qm(),nonvalidatedAtoms:Qm()}}function Ok(){const e=f1();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,Nk()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var d1={makeEmptyTreeState:f1,makeEmptyStoreState:Ok,getNextTreeStateVersion:c1};class h1{}function Lk(){return new h1}var Vl={RetentionZone:h1,retentionZone:Lk};function Pk(e,t){const n=new Set(e);return n.add(t),n}function Ak(e,t){const n=new Set(e);return n.delete(t),n}function Ik(e,t,n){const r=new Map(e);return r.set(t,n),r}function Mk(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function Dk(e,t){const n=new Map(e);return n.delete(t),n}function $k(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var p1={setByAddingToSet:Pk,setByDeletingFromSet:Ak,mapBySettingInMap:Ik,mapByUpdatingInMap:Mk,mapByDeletingFromMap:Dk,mapByDeletingMultipleFromMap:$k};function*Uk(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var sh=Uk;function Fk(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var m1=Fk;const{getNode:fs,getNodeMaybe:jk,recoilValuesForKeys:qm}=lt,{RetentionZone:Gm}=Vl,{setByAddingToSet:zk}=p1,Vk=Object.freeze(new Set);class Bk extends Error{}function Wk(e,t,n){if(!pe("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(i){let s=r.get(i);s||r.set(i,s=new Set),s.add(t)}if(n instanceof Gm)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!pe("recoil_memory_managament_2020"))return;const{retention:i}=e.getState();function s(a){const l=i.nodesRetainedByZone.get(a);l==null||l.delete(t),l&&l.size===0&&i.nodesRetainedByZone.delete(a)}if(n instanceof Gm)s(n);else if(Array.isArray(n))for(const a of n)s(a)}}function ah(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=fs(n),s=Wk(e,n,i.retainedBy),a=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{a(),s()})}function Hk(e,t,n){ah(e,e.getState().currentTree,t,n)}function Kk(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function Qk(e,t,n){return ah(e,t,n,"get"),fs(n).get(e,t)}function g1(e,t,n){return fs(n).peek(e,t)}function qk(e,t,n){var r;const o=jk(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:zk(e.dirtyAtoms,t)}}function Gk(e,t,n,r){const o=fs(n);if(o.set==null)throw new Bk(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return ah(e,t,n,"set"),i(e,t,r)}function Yk(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=fs(n).nodeType;return m1({type:i},{loadable:()=>g1(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>i==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var s;return qm((s=o.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,a;return{nodes:qm(sh(v1(e,t,new Set([n])),l=>l!==n)),components:jl((s=(a=r.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],([l])=>({name:l}))}}})}function v1(e,t,n){const r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let a=o.pop();a;a=o.pop()){var s;r.add(a);const l=(s=i.nodeToNodeSubscriptions.get(a))!==null&&s!==void 0?s:Vk;for(const u of l)r.has(u)||o.push(u)}return r}var Yn={getNodeLoadable:Qk,peekNodeLoadable:g1,setNodeValue:Gk,initializeNode:Hk,cleanUpNode:Kk,setUnvalidatedAtomValue_DEPRECATED:qk,peekNodeInfo:Yk,getDownstreamNodes:v1};let y1=null;function Xk(e){y1=e}function Jk(){var e;(e=y1)===null||e===void 0||e()}var S1={setInvalidateMemoizedSnapshot:Xk,invalidateMemoizedSnapshot:Jk};const{getDownstreamNodes:Zk,getNodeLoadable:w1,setNodeValue:eT}=Yn,{getNextComponentID:tT}=zl,{getNode:nT,getNodeMaybe:_1}=lt,{DefaultValue:lh}=lt,{reactMode:rT}=us,{AbstractRecoilValue:oT,RecoilState:iT,RecoilValueReadOnly:sT,isRecoilValue:aT}=go,{invalidateMemoizedSnapshot:lT}=S1;function uT(e,{key:t},n=e.getState().currentTree){var r,o;const i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=i.previousTree)===null||o===void 0||o.version);const s=w1(e,n,t);return s.state==="loading"&&s.contents.catch(()=>{}),s}function cT(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof lh?n.delete(o):n.set(o,r)}),n}function fT(e,t,{key:n},r){if(typeof r=="function"){const o=w1(e,t,n);if(o.state==="loading"){const i=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ae(i)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function dT(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,s=fT(e,t,o,i),a=eT(e,t,o.key,s);for(const[l,u]of a.entries())vf(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;vf(t,o,i)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:i}=n,s=_1(o);s==null||(r=s.invalidate)===null||r===void 0||r.call(s,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else th(`Unknown action ${n.type}`)}function vf(e,t,n){n.state==="hasValue"&&n.contents instanceof lh?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function E1(e,t){e.replaceState(n=>{const r=x1(n);for(const o of t)dT(e,r,o);return C1(e,r),lT(),r})}function Bl(e,t){if(gi.length){const n=gi[gi.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else E1(e,[t])}const gi=[];function hT(){const e=new Map;return gi.push(e),()=>{for(const[t,n]of e)E1(t,n);gi.pop()}}function x1(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function C1(e,t){const n=Zk(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=_1(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function b1(e,t,n){Bl(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function pT(e,t,n){if(n instanceof lh)return b1(e,t,n);Bl(e,{type:"setLoadable",recoilValue:t,loadable:n})}function mT(e,t){Bl(e,{type:"markModified",recoilValue:t})}function gT(e,t,n){Bl(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function vT(e,{key:t},n,r=null){const o=tT(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),xe(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const s=rT();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{const a=e.getState(),l=a.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(o)||(l.delete(o),l.size===0&&a.nodeToComponentSubscriptions.delete(t))}}}function yT(e,t){var n;const{currentTree:r}=e.getState(),o=nT(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var nn={RecoilValueReadOnly:sT,AbstractRecoilValue:oT,RecoilState:iT,getRecoilValueAsLoadable:uT,setRecoilValue:b1,setRecoilValueLoadable:pT,markRecoilValueModified:mT,setUnvalidatedRecoilValue:gT,subscribeToRecoilValue:vT,isRecoilValue:aT,applyAtomValueWrites:cT,batchStart:hT,writeLoadableToTreeState:vf,invalidateDownstreams:C1,copyTreeState:x1,refreshRecoilValue:yT};function ST(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var wT=ST;const{cleanUpNode:_T}=Yn,{deleteNodeConfigIfPossible:ET,getNode:R1}=lt,{RetentionZone:k1}=Vl,xT=12e4,T1=new Set;function N1(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const s of t)if(s instanceof k1)for(const a of kT(n,s))o.add(a);else o.add(s);const i=CT(e,o);for(const s of i)RT(e,r,s)}function CT(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,s=new Set;return a(t),i;function a(l){const u=new Set,c=bT(e,r,l,i,s);for(const v of c){var f;if(R1(v).retainedBy==="recoilRoot"){s.add(v);continue}if(((f=n.retention.referenceCounts.get(v))!==null&&f!==void 0?f:0)>0){s.add(v);continue}if(O1(v).some(E=>n.retention.referenceCounts.get(E))){s.add(v);continue}const y=o.nodeToNodeSubscriptions.get(v);if(y&&wT(y,E=>s.has(E))){s.add(v);continue}i.add(v),u.add(v)}const d=new Set;for(const v of u)for(const y of(m=o.nodeDeps.get(v))!==null&&m!==void 0?m:T1){var m;i.has(y)||d.add(y)}d.size&&a(d)}}function bT(e,t,n,r,o){const i=e.getGraph(t.version),s=[],a=new Set;for(;n.size>0;)l(xe(n.values().next().value));return s;function l(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(a.has(u))return;const c=i.nodeToNodeSubscriptions.get(u);if(c)for(const f of c)l(f);a.add(u),n.delete(u),s.push(u)}}function RT(e,t,n){if(!pe("recoil_memory_managament_2020"))return;_T(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=O1(n);for(const l of o){var i;(i=r.retention.nodesRetainedByZone.get(l))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=r.graphsByVersion.get(t.version);if(s){const l=s.nodeDeps.get(n);if(l!==void 0){s.nodeDeps.delete(n);for(const u of l){var a;(a=s.nodeToNodeSubscriptions.get(u))===null||a===void 0||a.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}ET(n)}function kT(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:T1}function O1(e){const t=R1(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof k1?[t]:t}function TT(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):N1(e,new Set([t]))}function NT(e,t,n){var r;if(!pe("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?L1(e,t):o.set(t,i)}function L1(e,t){if(!pe("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),TT(e,t)}function OT(e){if(!pe("recoil_memory_managament_2020"))return;const t=e.getState();N1(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function LT(e){return e===void 0?"recoilRoot":e}var kr={SUSPENSE_TIMEOUT_MS:xT,updateRetainCount:NT,updateRetainCountToZero:L1,releaseScheduledRetainablesNow:OT,retainedByOptionWithDefault:LT};const{unstable_batchedUpdates:PT}=NC;var AT={unstable_batchedUpdates:PT};const{unstable_batchedUpdates:IT}=AT;var MT={unstable_batchedUpdates:IT};const{batchStart:DT}=nn,{unstable_batchedUpdates:$T}=MT;let uh=$T||(e=>e());const UT=e=>{uh=e},FT=()=>uh,jT=e=>{uh(()=>{let t=()=>{};try{t=DT(),e()}finally{t()}})};var Wl={getBatcher:FT,setBatcher:UT,batchUpdates:jT};function*zT(e){for(const t of e)for(const n of t)yield n}var P1=zT;const A1=typeof Window>"u"||typeof window>"u",VT=e=>!A1&&(e===window||e instanceof Window),BT=typeof navigator<"u"&&navigator.product==="ReactNative";var Hl={isSSR:A1,isReactNative:BT,isWindow:VT};function WT(e,t){let n;return(...r)=>{n||(n={});const o=t(...r);return Object.hasOwnProperty.call(n,o)||(n[o]=e(...r)),n[o]}}function HT(e,t){let n,r;return(...o)=>{const i=t(...o);return n===i||(n=i,r=e(...o)),r}}function KT(e,t){let n,r;return[(...s)=>{const a=t(...s);return n===a||(n=a,r=e(...s)),r},()=>{n=null}]}var QT={memoizeWithArgsHash:WT,memoizeOneWithArgsHash:HT,memoizeOneWithArgsHashAndInvalidation:KT};const{batchUpdates:yf}=Wl,{initializeNode:qT,peekNodeInfo:GT}=Yn,{graph:YT}=cs,{getNextStoreID:XT}=zl,{DEFAULT_VALUE:JT,recoilValues:Ym,recoilValuesForKeys:Xm}=lt,{AbstractRecoilValue:ZT,getRecoilValueAsLoadable:eN,setRecoilValue:Jm,setUnvalidatedRecoilValue:tN}=nn,{updateRetainCount:ga}=kr,{setInvalidateMemoizedSnapshot:nN}=S1,{getNextTreeStateVersion:rN,makeEmptyStoreState:oN}=d1,{isSSR:iN}=Hl,{memoizeOneWithArgsHashAndInvalidation:sN}=QT;class Kl{constructor(t,n){ie(this,"_store",void 0),ie(this,"_refCount",1),ie(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),eN(this._store,r))),ie(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),ie(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const s=this._store.getState().currentTree;return Xm(s.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Ym.values():r.isInitialized===!0?Xm(P1([o,i])):sh(Ym.values(),({key:s})=>!o.has(s)&&!i.has(s))}),ie(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),GT(this._store,this._store.getState().currentTree,r))),ie(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new Sf(this,yf);return r(o),o}),ie(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new Sf(this,yf);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:XT(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return xe(o.get(r));const i=YT();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ae("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)qT(this._store,r,"get"),ga(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){iN||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!pe("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){pe("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function I1(e,t,n=!1){const r=e.getState(),o=n?rN():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(jl(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function aN(e){const t=new Kl(oN());return e!=null?t.map(e):t}const[Zm,M1]=sN((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:xe(r.previousTree);return new Kl(I1(e,o),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});nN(M1);function lN(e,t="latest"){const n=Zm(e,t);return n.isRetained()?n:(M1(),Zm(e,t))}class Sf extends Kl{constructor(t,n){super(I1(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),ie(this,"_batch",void 0),ie(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{ga(i,r.key,1),Jm(this.getStore_INTERNAL(),r,o)})}),ie(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{ga(o,r.key,1),Jm(this.getStore_INTERNAL(),r,JT)})}),ie(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();yf(()=>{for(const[i,s]of r.entries())ga(o,i,1),tN(o,new ZT(i),s)})}),this._batch=n}}var Ql={Snapshot:Kl,MutableSnapshot:Sf,freshSnapshot:aN,cloneSnapshot:lN},uN=Ql.Snapshot,cN=Ql.MutableSnapshot,fN=Ql.freshSnapshot,dN=Ql.cloneSnapshot,ql=Object.freeze({__proto__:null,Snapshot:uN,MutableSnapshot:cN,freshSnapshot:fN,cloneSnapshot:dN});function hN(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var pN=hN;const{useRef:mN}=Q;function gN(e){const t=mN(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var eg=gN;const{getNextTreeStateVersion:vN,makeEmptyStoreState:D1}=d1,{cleanUpNode:yN,getDownstreamNodes:SN,initializeNode:wN,setNodeValue:_N,setUnvalidatedAtomValue_DEPRECATED:EN}=Yn,{graph:xN}=cs,{cloneGraph:CN}=cs,{getNextStoreID:$1}=zl,{createMutableSource:Ku,reactMode:U1}=us,{applyAtomValueWrites:bN}=nn,{releaseScheduledRetainablesNow:F1}=kr,{freshSnapshot:RN}=ql,{useCallback:kN,useContext:j1,useEffect:wf,useMemo:TN,useRef:NN,useState:ON}=Q;function Ko(){throw ae("This component must be used inside a component.")}const z1=Object.freeze({storeID:$1(),getState:Ko,replaceState:Ko,getGraph:Ko,subscribeToTransactions:Ko,addTransactionMetadata:Ko});let _f=!1;function tg(e){if(_f)throw ae("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){pe("recoil_memory_managament_2020")&&pe("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&F1(e);const n=t.currentTree.version,r=vN();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,CN(xe(t.graphsByVersion.get(n))))}}const V1=Q.createContext({current:z1}),Gl=()=>j1(V1),B1=Q.createContext(null);function LN(){return j1(B1)}function ch(e,t,n){const r=SN(e,n,n.dirtyAtoms);for(const o of r){const i=t.nodeToComponentSubscriptions.get(o);if(i)for(const[s,[a,l]]of i)l(n)}}function W1(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[s,a]of i)a(e);for(const[o,i]of t.transactionSubscriptions)i(e);(!U1().early||t.suspendedComponentResolvers.size>0)&&(ch(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function PN(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,W1(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):th("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,pe("recoil_memory_managament_2020")&&n==null&&F1(e)}finally{t.commitDepth--}}function AN({setNotifyBatcherOfChange:e}){const t=Gl(),[,n]=ON([]);return e(()=>n({})),wf(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),wf(()=>{fk.enqueueExecution("Batcher",()=>{PN(t.current)})}),null}function IN(e,t){const n=D1();return t({set:(r,o)=>{const i=n.currentTree,s=_N(e,i,r.key,o),a=new Set(s.keys()),l=i.nonvalidatedAtoms.clone();for(const u of a)l.delete(u);n.currentTree={...i,dirtyAtoms:pN(i.dirtyAtoms,a),atomValues:bN(i.atomValues,s),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=EN(n.currentTree,i,o)})}}),n}function MN(e){const t=RN(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let ng=0;function DN({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=m=>{const v=o.current.graphsByVersion;if(v.has(m))return xe(v.get(m));const y=xN();return v.set(m,y),y},s=(m,v)=>{if(v==null){const{transactionSubscriptions:y}=f.current.getState(),E=ng++;return y.set(E,m),{release:()=>{y.delete(E)}}}else{const{nodeTransactionSubscriptions:y}=f.current.getState();y.has(v)||y.set(v,new Map);const E=ng++;return xe(y.get(v)).set(E,m),{release:()=>{const g=y.get(v);g&&(g.delete(E),g.size===0&&y.delete(v))}}}},a=m=>{tg(f.current);for(const v of Object.keys(m))xe(f.current.getState().nextTree).transactionMetadata[v]=m[v]},l=m=>{tg(f.current);const v=xe(o.current.nextTree);let y;try{_f=!0,y=m(v)}finally{_f=!1}y!==v&&(o.current.nextTree=y,U1().early&&ch(f.current,o.current,y),xe(u.current)())},u=NN(null),c=kN(m=>{u.current=m},[u]),f=eg(()=>n??{storeID:$1(),getState:()=>o.current,replaceState:l,getGraph:i,subscribeToTransactions:s,addTransactionMetadata:a});n!=null&&(f.current=n),o=eg(()=>e!=null?IN(f.current,e):t!=null?MN(t):D1());const d=TN(()=>Ku==null?void 0:Ku(o,()=>o.current.currentTree.version),[o]);return wf(()=>{const m=f.current;for(const v of new Set(m.getState().knownAtoms))wN(m,v,"get");return()=>{for(const v of m.getState().knownAtoms)yN(m,v)}},[f]),Q.createElement(V1.Provider,{value:f},Q.createElement(B1.Provider,{value:d},Q.createElement(AN,{setNotifyBatcherOfChange:c}),r))}function $N(e){const{override:t,...n}=e,r=Gl();return t===!1&&r.current!==z1?e.children:Q.createElement(DN,n)}function UN(){return Gl().current.storeID}var gn={RecoilRoot:$N,useStoreRef:Gl,useRecoilMutableSource:LN,useRecoilStoreID:UN,notifyComponents_FOR_TESTING:ch,sendEndOfBatchNotifications_FOR_TESTING:W1};function FN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var H1=BN;const{useStoreRef:WN}=gn,{SUSPENSE_TIMEOUT_MS:HN}=kr,{updateRetainCount:Qo}=kr,{RetentionZone:KN}=Vl,{useEffect:QN,useRef:qN}=Q,{isSSR:rg}=Hl;function GN(e){if(pe("recoil_memory_managament_2020"))return YN(e)}function YN(e){const n=(Array.isArray(e)?e:[e]).map(s=>s instanceof KN?s:s.key),r=WN();QN(()=>{if(!pe("recoil_memory_managament_2020"))return;const s=r.current;if(o.current&&!rg)window.clearTimeout(o.current),o.current=null;else for(const a of n)Qo(s,a,1);return()=>{for(const a of n)Qo(s,a,-1)}},[r,...n]);const o=qN(),i=H1(n);if(!rg&&(i===void 0||!jN(i,n))){const s=r.current;for(const a of n)Qo(s,a,1);if(i)for(const a of i)Qo(s,a,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const a of n)Qo(s,a,-1)},HN)}}var fh=GN;function XN(){return""}var ds=XN;const{batchUpdates:JN}=Wl,{DEFAULT_VALUE:K1}=lt,{currentRendererSupportsUseSyncExternalStore:ZN,reactMode:Oo,useMutableSource:eO,useSyncExternalStore:tO}=us,{useRecoilMutableSource:nO,useStoreRef:rn}=gn,{AbstractRecoilValue:Ef,getRecoilValueAsLoadable:hs,setRecoilValue:sl,setUnvalidatedRecoilValue:rO,subscribeToRecoilValue:vo}=nn,{useCallback:at,useEffect:yo,useMemo:Q1,useRef:vi,useState:dh}=Q,{setByAddingToSet:oO}=p1,{isSSR:iO}=Hl;function hh(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const i=n.current.getState().suspendedComponentResolvers;i.add(o),iO&&Se(e.contents)&&e.contents.finally(()=>{i.delete(o)})}):e.state==="hasError"?e.contents:ae(`Invalid value of loadable atom "${t.key}"`)}function sO(){const e=ds(),t=rn(),[,n]=dh([]),r=vi(new Set);r.current=new Set;const o=vi(new Set),i=vi(new Map),s=at(l=>{const u=i.current.get(l);u&&(u.release(),i.current.delete(l))},[i]),a=at((l,u)=>{i.current.has(u)&&n([])},[]);return yo(()=>{const l=t.current;mi(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const c=vo(l,new Ef(u),d=>a(d,u),e);i.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(l.getState(),u)}):a(l.getState(),u)}),mi(o.current,r.current).forEach(u=>{s(u)}),o.current=r.current}),yo(()=>{const l=i.current;return mi(r.current,new Set(l.keys())).forEach(u=>{const c=vo(t.current,new Ef(u),f=>a(f,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>s(c))},[e,t,s,a]),Q1(()=>{function l(v){return y=>{sl(t.current,v,y)}}function u(v){return()=>sl(t.current,v,K1)}function c(v){var y;r.current.has(v.key)||(r.current=oO(r.current,v.key));const E=t.current.getState();return hs(t.current,v,Oo().early&&(y=E.nextTree)!==null&&y!==void 0?y:E.currentTree)}function f(v){const y=c(v);return hh(y,v,t)}function d(v){return[f(v),l(v)]}function m(v){return[c(v),l(v)]}return{getRecoilValue:f,getRecoilValueLoadable:c,getRecoilState:d,getRecoilStateLoadable:m,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const aO={current:0};function lO(e){const t=rn(),n=ds(),r=at(()=>{var a;const l=t.current,u=l.getState(),c=Oo().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return{loadable:hs(l,e,c),key:e.key}},[t,e]),o=at(a=>{let l;return()=>{var u,c;const f=a();return(u=l)!==null&&u!==void 0&&u.loadable.is(f.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===f.key?l:(l=f,f)}},[]),i=Q1(()=>o(r),[r,o]),s=at(a=>{const l=t.current;return vo(l,e,a,n).release},[t,e,n]);return tO(s,i,i).loadable}function uO(e){const t=rn(),n=at(()=>{var u;const c=t.current,f=c.getState(),d=Oo().early&&(u=f.nextTree)!==null&&u!==void 0?u:f.currentTree;return hs(c,e,d)},[t,e]),r=at(()=>n(),[n]),o=ds(),i=at((u,c)=>{const f=t.current;return vo(f,e,()=>{if(!pe("recoil_suppress_rerender_in_callback"))return c();const m=n();l.current.is(m)||c(),l.current=m},o).release},[t,e,o,n]),s=nO();if(s==null)throw ae("Recoil hooks must be used in components contained within a component.");const a=eO(s,r,i),l=vi(a);return yo(()=>{l.current=a}),a}function xf(e){const t=rn(),n=ds(),r=at(()=>{var l;const u=t.current,c=u.getState(),f=Oo().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return hs(u,e,f)},[t,e]),o=at(()=>({loadable:r(),key:e.key}),[r,e.key]),i=at(l=>{const u=o();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[o]);yo(()=>{const l=vo(t.current,e,u=>{a(i)},n);return a(i),l.release},[n,e,t,i]);const[s,a]=dh(o);return s.key!==e.key?o().loadable:s.loadable}function cO(e){const t=rn(),[,n]=dh([]),r=ds(),o=at(()=>{var a;const l=t.current,u=l.getState(),c=Oo().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return hs(l,e,c)},[t,e]),i=o(),s=vi(i);return yo(()=>{s.current=i}),yo(()=>{const a=t.current,l=a.getState(),u=vo(a,e,f=>{var d;if(!pe("recoil_suppress_rerender_in_callback"))return n([]);const m=o();(d=s.current)!==null&&d!==void 0&&d.is(m)||n(m),s.current=m},r);if(l.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var c;if(!pe("recoil_suppress_rerender_in_callback"))return n([]);const f=o();(c=s.current)!==null&&c!==void 0&&c.is(f)||n(f),s.current=f}return u.release},[r,o,e,t]),i}function ph(e){return pe("recoil_memory_managament_2020")&&fh(e),{TRANSITION_SUPPORT:xf,SYNC_EXTERNAL_STORE:ZN()?lO:xf,MUTABLE_SOURCE:uO,LEGACY:cO}[Oo().mode](e)}function q1(e){const t=rn(),n=ph(e);return hh(n,e,t)}function Yl(e){const t=rn();return at(n=>{sl(t.current,e,n)},[t,e])}function fO(e){const t=rn();return at(()=>{sl(t.current,e,K1)},[t,e])}function dO(e){return[q1(e),Yl(e)]}function hO(e){return[ph(e),Yl(e)]}function pO(){const e=rn();return(t,n={})=>{JN(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>rO(e.current,new Ef(o),r))})}}function G1(e){return pe("recoil_memory_managament_2020")&&fh(e),xf(e)}function Y1(e){const t=rn(),n=G1(e);return hh(n,e,t)}function mO(e){return[Y1(e),Yl(e)]}var gO={recoilComponentGetRecoilValueCount_FOR_TESTING:aO,useRecoilInterface:sO,useRecoilState:dO,useRecoilStateLoadable:hO,useRecoilValue:q1,useRecoilValueLoadable:ph,useResetRecoilState:fO,useSetRecoilState:Yl,useSetUnvalidatedAtomValues:pO,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:G1,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Y1,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:mO};function vO(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var yO=vO;function SO(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var wO=SO;function _O(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function sg(e){const t=e.atomValues.toMap(),n=il(yO(t,(r,o)=>{const s=X1(o).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return EO(e.nonvalidatedAtoms.toMap(),n)}function OO(e){Jl(Xl(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=sg(r),i=sg(n),s=il(bO,l=>{var u,c,f,d;return{persistence_UNSTABLE:{type:(u=(c=l.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(f=(d=l.persistence_UNSTABLE)===null||d===void 0?void 0:d.backButton)!==null&&f!==void 0?f:!1}}}),a=wO(r.dirtyAtoms,l=>o.has(l)||i.has(l));e({atomValues:o,previousAtomValues:i,atomInfo:s,modifiedAtoms:a,transactionMetadata:{...r.transactionMetadata}})},[e]))}function LO(e){Jl(Xl(t=>{const n=al(t,"latest"),r=al(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function PO(){const e=mh(),[t,n]=NO(()=>al(e.current)),r=H1(t),o=og(),i=og();if(Jl(Xl(a=>n(al(a)),[])),J1(()=>{const a=t.retain();if(o.current&&!ig){var l;window.clearTimeout(o.current),o.current=null,(l=i.current)===null||l===void 0||l.call(i),i.current=null}return()=>{window.setTimeout(a,10)}},[t]),r!==t&&!ig){if(o.current){var s;window.clearTimeout(o.current),o.current=null,(s=i.current)===null||s===void 0||s.call(i),i.current=null}i.current=t.retain(),o.current=window.setTimeout(()=>{var a;o.current=null,(a=i.current)===null||a===void 0||a.call(i),i.current=null},TO)}return t}function Z1(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;xO(()=>{const s=new Set;for(const u of[o.atomValues.keys(),i.atomValues.keys()])for(const c of u){var a,l;((a=o.atomValues.get(c))===null||a===void 0?void 0:a.contents)!==((l=i.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&X1(c).shouldRestoreFromSnapshots&&s.add(c)}s.forEach(u=>{kO(e,new RO(u),i.atomValues.has(u)?xe(i.atomValues.get(u)):CO)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function AO(){const e=mh();return Xl(t=>Z1(e.current,t),[e])}var eS={useRecoilSnapshot:PO,gotoSnapshot:Z1,useGotoRecoilSnapshot:AO,useRecoilTransactionObserver:LO,useTransactionObservation_DEPRECATED:OO,useTransactionSubscription_DEPRECATED:Jl};const{peekNodeInfo:IO}=Yn,{useStoreRef:MO}=gn;function DO(){const e=MO();return({key:t})=>IO(e.current,e.current.getState().currentTree,t)}var $O=DO;const{reactMode:UO}=us,{RecoilRoot:FO,useStoreRef:jO}=gn,{useMemo:zO}=Q;function VO(){UO().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=jO().current;return zO(()=>{function t({children:n}){return Q.createElement(FO,{store_INTERNAL:e},n)}return t},[e])}var BO=VO;const{loadableWithValue:WO}=ls,{initializeNode:HO}=Yn,{DEFAULT_VALUE:KO,getNode:QO}=lt,{copyTreeState:qO,getRecoilValueAsLoadable:GO,invalidateDownstreams:YO,writeLoadableToTreeState:XO}=nn;function ag(e){return QO(e.key).nodeType==="atom"}class JO{constructor(t,n){ie(this,"_store",void 0),ie(this,"_treeState",void 0),ie(this,"_changes",void 0),ie(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!ag(r))throw ae("Reading selectors within atomicUpdate is not supported");const o=GO(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:ae(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),ie(this,"set",(r,o)=>{if(!ag(r))throw ae("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const i=this.get(r);this._changes.set(r.key,o(i))}else HO(this._store,r.key,"set"),this._changes.set(r.key,o)}),ie(this,"reset",r=>{this.set(r,KO)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=qO(this._treeState);for(const[n,r]of this._changes)XO(t,n,WO(r));return YO(this._store,t),t}}function ZO(e){return t=>{e.replaceState(n=>{const r=new JO(e,n);return t(r),r.newTreeState_INTERNAL()})}}var eL={atomicUpdater:ZO},tL=eL.atomicUpdater,tS=Object.freeze({__proto__:null,atomicUpdater:tL});function nL(e,t){if(!e)throw new Error(t)}var rL=nL,ni=rL;const{atomicUpdater:oL}=tS,{batchUpdates:iL}=Wl,{DEFAULT_VALUE:sL}=lt,{useStoreRef:aL}=gn,{refreshRecoilValue:lL,setRecoilValue:lg}=nn,{cloneSnapshot:uL}=ql,{gotoSnapshot:cL}=eS,{useCallback:fL}=Q;class nS{}const dL=new nS;function rS(e,t,n,r){let o=dL,i;if(iL(()=>{const a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw ae(a);const l=m1({...r??{},set:(c,f)=>lg(e,c,f),reset:c=>lg(e,c,sL),refresh:c=>lL(e,c),gotoSnapshot:c=>cL(e,c),transact_UNSTABLE:c=>oL(e)(c)},{snapshot:()=>{const c=uL(e);return i=c.retain(),c}}),u=t(l);if(typeof u!="function")throw ae(a);o=u(...n)}),o instanceof nS&&ni(!1),Se(o))o=o.finally(()=>{var a;(a=i)===null||a===void 0||a()});else{var s;(s=i)===null||s===void 0||s()}return o}function hL(e,t){const n=aL();return fL((...r)=>rS(n.current,e,r),t!=null?[...t,n]:void 0)}var oS={recoilCallback:rS,useRecoilCallback:hL};const{useStoreRef:pL}=gn,{refreshRecoilValue:mL}=nn,{useCallback:gL}=Q;function vL(e){const t=pL();return gL(()=>{const n=t.current;mL(n,e)},[e,t])}var yL=vL;const{atomicUpdater:SL}=tS,{useStoreRef:wL}=gn,{useMemo:_L}=Q;function EL(e,t){const n=wL();return _L(()=>(...r)=>{SL(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var xL=EL;class CL{constructor(t){ie(this,"value",void 0),this.value=t}}var bL={WrappedValue:CL},RL=bL.WrappedValue,iS=Object.freeze({__proto__:null,WrappedValue:RL});const{isFastRefreshEnabled:kL}=us;class ug extends Error{}class TL{constructor(t){var n,r,o;ie(this,"_name",void 0),ie(this,"_numLeafs",void 0),ie(this,"_root",void 0),ie(this,"_onHit",void 0),ie(this,"_onSet",void 0),ie(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:i=>i}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var i,s,a,l;let u,c;for(const[E,g]of t){var f,d,m;const h=this._root;if((h==null?void 0:h.type)==="leaf")throw this.invalidCacheError();const p=u;if(u=p?p.branches.get(c):h,u=(f=u)!==null&&f!==void 0?f:{type:"branch",nodeKey:E,parent:p,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==E)throw this.invalidCacheError();p==null||p.branches.set(c,u),r==null||(d=r.onNodeVisit)===null||d===void 0||d.call(r,u),c=this._mapNodeValue(g),this._root=(m=this._root)!==null&&m!==void 0?m:u}const v=u?(i=u)===null||i===void 0?void 0:i.branches.get(c):this._root;if(v!=null&&(v.type!=="leaf"||v.branchKey!==c))throw this.invalidCacheError();const y={type:"leaf",value:n,parent:u,branchKey:c};(s=u)===null||s===void 0||s.branches.set(c,y),this._root=(a=this._root)!==null&&a!==void 0?a:y,this._numLeafs++,this._onSet(y),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,y)};try{o()}catch(i){if(i instanceof ug)this.clear(),o();else throw i}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,o=t.branchKey;for(;r;){var i;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(i=r)===null||i===void 0?void 0:i.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=kL()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw th(t+(this._name!=null?` - ${this._name}`:"")),new ug}}var NL={TreeCache:TL},OL=NL.TreeCache,sS=Object.freeze({__proto__:null,TreeCache:OL});class LL{constructor(t){var n;ie(this,"_maxSize",void 0),ie(this,"_size",void 0),ie(this,"_head",void 0),ie(this,"_tail",void 0),ie(this,"_map",void 0),ie(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const i=this.head(),s={key:t,right:i,left:null,value:n};i?i.left=s:this._tail=s,this._map.set(r,s),this._head=s,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=xe(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var PL={LRUCache:LL},AL=PL.LRUCache,aS=Object.freeze({__proto__:null,LRUCache:AL});const{LRUCache:IL}=aS,{TreeCache:ML}=sS;function DL({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new IL({maxSize:t}),o=new ML({name:e,mapNodeValue:n,onHit:i=>{r.set(i,!0)},onSet:i=>{const s=r.tail();r.set(i,!0),s&&o.size()>t&&o.delete(s.key)}});return o}var cg=DL;function At(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw ae("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Se(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>At(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return At(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,s]of e)o[typeof i=="string"?i:At(i,t)]=s;return At(o,t,n)}return e instanceof Set?At(Array.from(e).sort((o,i)=>At(o,t).localeCompare(At(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?At(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${At(o,t)}:${At(e[o],t,o)}`).join(",")}}`}function $L(e,t={allowFunctions:!1}){return At(e,t)}var Zl=$L;const{TreeCache:UL}=sS,Ks={equality:"reference",eviction:"keep-all",maxSize:1/0};function FL({equality:e=Ks.equality,eviction:t=Ks.eviction,maxSize:n=Ks.maxSize}=Ks,r){const o=jL(e);return zL(t,n,o,r)}function jL(e){switch(e){case"reference":return t=>t;case"value":return t=>Zl(t)}throw ae(`Unrecognized equality policy ${e}`)}function zL(e,t,n,r){switch(e){case"keep-all":return new UL({name:r,mapNodeValue:n});case"lru":return cg({name:r,maxSize:xe(t),mapNodeValue:n});case"most-recent":return cg({name:r,maxSize:1,mapNodeValue:n})}throw ae(`Unrecognized eviction policy ${e}`)}var VL=FL;function BL(e){return()=>null}var WL={startPerfBlock:BL};const{isLoadable:HL,loadableWithError:Qs,loadableWithPromise:KL,loadableWithValue:Qu}=ls,{WrappedValue:lS}=iS,{getNodeLoadable:qs,peekNodeLoadable:QL,setNodeValue:qL}=Yn,{saveDepsToStore:GL}=cs,{DEFAULT_VALUE:YL,getConfigDeletionHandler:XL,getNode:JL,registerNode:fg}=lt,{isRecoilValue:ZL}=go,{markRecoilValueModified:dg}=nn,{retainedByOptionWithDefault:eP}=kr,{recoilCallback:tP}=oS,{startPerfBlock:nP}=WL;class uS{}const qo=new uS,Go=[],Gs=new Map,rP=(()=>{let e=0;return()=>e++})();function cS(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,i=e.set!=null?e.set:void 0,s=new Set,a=VL(o??{equality:"reference",eviction:"keep-all"},n),l=eP(e.retainedBy_UNSTABLE),u=new Map;let c=0;function f(){return!pe("recoil_memory_managament_2020")||c>0}function d(b){return b.getState().knownSelectors.add(n),c++,()=>{c--}}function m(){return XL(n)!==void 0&&!f()}function v(b,P,D,J,V){X(P,J,V),y(b,D)}function y(b,P){W(b,P)&&se(b),g(P,!0)}function E(b,P){W(b,P)&&(xe($(b)).stateVersions.clear(),g(P,!1))}function g(b,P){const D=Gs.get(b);if(D!=null){for(const J of D)dg(J,xe(t));P&&Gs.delete(b)}}function h(b,P){let D=Gs.get(P);D==null&&Gs.set(P,D=new Set),D.add(b)}function p(b,P,D,J,V,H){return P.then(ne=>{if(!f())throw se(b),qo;const Y=Qu(ne);return v(b,D,V,Y,J),ne}).catch(ne=>{if(!f())throw se(b),qo;if(Se(ne))return w(b,ne,D,J,V,H);const Y=Qs(ne);throw v(b,D,V,Y,J),ne})}function w(b,P,D,J,V,H){return P.then(ne=>{if(!f())throw se(b),qo;H.loadingDepKey!=null&&H.loadingDepPromise===P?D.atomValues.set(H.loadingDepKey,Qu(ne)):b.getState().knownSelectors.forEach(he=>{D.atomValues.delete(he)});const Y=k(b,D);if(Y&&Y.state!=="loading"){if((W(b,V)||$(b)==null)&&y(b,V),Y.state==="hasValue")return Y.contents;throw Y.contents}if(!W(b,V)){const he=G(b,D);if(he!=null)return he.loadingLoadable.contents}const[ge,Ie]=x(b,D,V);if(ge.state!=="loading"&&v(b,D,V,ge,Ie),ge.state==="hasError")throw ge.contents;return ge.contents}).catch(ne=>{if(ne instanceof uS)throw qo;if(!f())throw se(b),qo;const Y=Qs(ne);throw v(b,D,V,Y,J),ne})}function R(b,P,D,J){var V,H,ne,Y;if(W(b,J)||P.version===((V=b.getState())===null||V===void 0||(H=V.currentTree)===null||H===void 0?void 0:H.version)||P.version===((ne=b.getState())===null||ne===void 0||(Y=ne.nextTree)===null||Y===void 0?void 0:Y.version)){var ge,Ie,he;GL(n,D,b,(ge=(Ie=b.getState())===null||Ie===void 0||(he=Ie.nextTree)===null||he===void 0?void 0:he.version)!==null&&ge!==void 0?ge:b.getState().currentTree.version)}for(const be of D)s.add(be)}function x(b,P,D){const J=nP(n);let V=!0,H=!0;const ne=()=>{J(),H=!1};let Y,ge=!1,Ie;const he={loadingDepKey:null,loadingDepPromise:null},be=new Map;function Ot({key:St}){const ut=qs(b,P,St);switch(be.set(St,ut),V||(R(b,P,new Set(be.keys()),D),E(b,D)),ut.state){case"hasValue":return ut.contents;case"hasError":throw ut.contents;case"loading":throw he.loadingDepKey=St,he.loadingDepPromise=ut.contents,ut.contents}throw ae("Invalid Loadable state")}const Zn=St=>(...ut)=>{if(H)throw ae("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&ni(!1),tP(b,St,ut,{node:t})};try{Y=r({get:Ot,getCallback:Zn}),Y=ZL(Y)?Ot(Y):Y,HL(Y)&&(Y.state==="hasError"&&(ge=!0),Y=Y.contents),Se(Y)?Y=p(b,Y,P,be,D,he).finally(ne):ne(),Y=Y instanceof lS?Y.value:Y}catch(St){Y=St,Se(Y)?Y=w(b,Y,P,be,D,he).finally(ne):(ge=!0,ne())}return ge?Ie=Qs(Y):Se(Y)?Ie=KL(Y):Ie=Qu(Y),V=!1,de(b,D,be),R(b,P,new Set(be.keys()),D),[Ie,be]}function k(b,P){let D=P.atomValues.get(n);if(D!=null)return D;const J=new Set;try{D=a.get(H=>(typeof H!="string"&&ni(!1),qs(b,P,H).contents),{onNodeVisit:H=>{H.type==="branch"&&H.nodeKey!==n&&J.add(H.nodeKey)}})}catch(H){throw ae(`Problem with cache lookup for selector "${n}": ${H.message}`)}if(D){var V;P.atomValues.set(n,D),R(b,P,J,(V=$(b))===null||V===void 0?void 0:V.executionID)}return D}function L(b,P){const D=k(b,P);if(D!=null)return se(b),D;const J=G(b,P);if(J!=null){var V;return((V=J.loadingLoadable)===null||V===void 0?void 0:V.state)==="loading"&&h(b,J.executionID),J.loadingLoadable}const H=rP(),[ne,Y]=x(b,P,H);return ne.state==="loading"?(oe(b,H,ne,Y,P),h(b,H)):(se(b),X(P,ne,Y)),ne}function G(b,P){const D=P1([u.has(b)?[xe(u.get(b))]:[],jl(sh(u,([V])=>V!==b),([,V])=>V)]);function J(V){for(const[H,ne]of V)if(!qs(b,P,H).is(ne))return!0;return!1}for(const V of D){if(V.stateVersions.get(P.version)||!J(V.depValuesDiscoveredSoFarDuringAsyncWork))return V.stateVersions.set(P.version,!0),V;V.stateVersions.set(P.version,!1)}}function $(b){return u.get(b)}function oe(b,P,D,J,V){u.set(b,{depValuesDiscoveredSoFarDuringAsyncWork:J,executionID:P,loadingLoadable:D,stateVersions:new Map([[V.version,!0]])})}function de(b,P,D){if(W(b,P)){const J=$(b);J!=null&&(J.depValuesDiscoveredSoFarDuringAsyncWork=D)}}function se(b){u.delete(b)}function W(b,P){var D;return P===((D=$(b))===null||D===void 0?void 0:D.executionID)}function U(b){return Array.from(b.entries()).map(([P,D])=>[P,D.contents])}function X(b,P,D){b.atomValues.set(n,P);try{a.set(U(D),P)}catch(J){throw ae(`Problem with setting cache for selector "${n}": ${J.message}`)}}function T(b){if(Go.includes(n)){const P=`Recoil selector has circular dependencies: ${Go.slice(Go.indexOf(n)).join(" → ")}`;return Qs(ae(P))}Go.push(n);try{return b()}finally{Go.pop()}}function O(b,P){const D=P.atomValues.get(n);return D??a.get(J=>{var V;return typeof J!="string"&&ni(!1),(V=QL(b,P,J))===null||V===void 0?void 0:V.contents})}function B(b,P){return T(()=>L(b,P))}function M(b){b.atomValues.delete(n)}function F(b,P){t==null&&ni(!1);for(const J of s){var D;const V=JL(J);(D=V.clearCache)===null||D===void 0||D.call(V,b,P)}s.clear(),M(P),a.clear(),dg(b,t)}return i!=null?t=fg({key:n,nodeType:"selector",peek:O,get:B,set:(P,D,J)=>{let V=!1;const H=new Map;function ne({key:he}){if(V)throw ae("Recoil: Async selector sets are not currently supported.");const be=qs(P,D,he);if(be.state==="hasValue")return be.contents;if(be.state==="loading"){const Ot=`Getting value of asynchronous atom or selector "${he}" in a pending state while setting selector "${n}" is not yet supported.`;throw ae(Ot)}else throw be.contents}function Y(he,be){if(V)throw ae("Recoil: Async selector sets are not currently supported.");const Ot=typeof be=="function"?be(ne(he)):be;qL(P,D,he.key,Ot).forEach((St,ut)=>H.set(ut,St))}function ge(he){Y(he,YL)}const Ie=i({set:Y,get:ne,reset:ge},J);if(Ie!==void 0)throw Se(Ie)?ae("Recoil: Async selector sets are not currently supported."):ae("Recoil: selector set should be a void function.");return V=!0,H},init:d,invalidate:M,clearCache:F,shouldDeleteConfigOnRelease:m,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=fg({key:n,nodeType:"selector",peek:O,get:B,init:d,invalidate:M,clearCache:F,shouldDeleteConfigOnRelease:m,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}cS.value=e=>new lS(e);var So=cS;const{isLoadable:oP,loadableWithError:qu,loadableWithPromise:Gu,loadableWithValue:Ir}=ls,{WrappedValue:fS}=iS,{peekNodeInfo:iP}=Yn,{DEFAULT_VALUE:or,DefaultValue:xn,getConfigDeletionHandler:dS,registerNode:sP,setConfigDeletionHandler:aP}=lt,{isRecoilValue:lP}=go,{getRecoilValueAsLoadable:uP,markRecoilValueModified:cP,setRecoilValue:hg,setRecoilValueLoadable:fP}=nn,{retainedByOptionWithDefault:dP}=kr,Yo=e=>e instanceof fS?e.value:e;function hP(e){const{key:t,persistence_UNSTABLE:n}=e,r=dP(e.retainedBy_UNSTABLE);let o=0;function i(h){return Gu(h.then(p=>(s=Ir(p),p)).catch(p=>{throw s=qu(p),p}))}let s=Se(e.default)?i(e.default):oP(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:Ir(Yo(e.default));s.contents;let a;const l=new Map;function u(h){return h}function c(h,p){const w=p.then(R=>{var x,k;return((k=((x=h.getState().nextTree)!==null&&x!==void 0?x:h.getState().currentTree).atomValues.get(t))===null||k===void 0?void 0:k.contents)===w&&hg(h,g,R),R}).catch(R=>{var x,k;throw((k=((x=h.getState().nextTree)!==null&&x!==void 0?x:h.getState().currentTree).atomValues.get(t))===null||k===void 0?void 0:k.contents)===w&&fP(h,g,qu(R)),R});return w}function f(h,p,w){var R;o++;const x=()=>{var $;o--,($=l.get(h))===null||$===void 0||$.forEach(oe=>oe()),l.delete(h)};if(h.getState().knownAtoms.add(t),s.state==="loading"){const $=()=>{var oe;((oe=h.getState().nextTree)!==null&&oe!==void 0?oe:h.getState().currentTree).atomValues.has(t)||cP(h,g)};s.contents.finally($)}const k=(R=e.effects)!==null&&R!==void 0?R:e.effects_UNSTABLE;if(k!=null){let W=function(M){if(oe&&M.key===t){const F=$;return F instanceof xn?d(h,p):Se(F)?Gu(F.then(b=>b instanceof xn?s.toPromise():b)):Ir(F)}return uP(h,M)},U=function(M){return W(M).toPromise()},X=function(M){var F;const b=iP(h,(F=h.getState().nextTree)!==null&&F!==void 0?F:h.getState().currentTree,M.key);return oe&&M.key===t&&!($ instanceof xn)?{...b,isSet:!0,loadable:W(M)}:b},$=or,oe=!0,de=!1,se=null;const T=M=>F=>{if(oe){const b=W(g),P=b.state==="hasValue"?b.contents:or;$=typeof F=="function"?F(P):F,Se($)&&($=$.then(D=>(se={effect:M,value:D},D)))}else{if(Se(F))throw ae("Setting atoms to async values is not implemented.");typeof F!="function"&&(se={effect:M,value:Yo(F)}),hg(h,g,typeof F=="function"?b=>{const P=Yo(F(b));return se={effect:M,value:P},P}:Yo(F))}},O=M=>()=>T(M)(or),B=M=>F=>{var b;const{release:P}=h.subscribeToTransactions(D=>{var J;let{currentTree:V,previousTree:H}=D.getState();H||(H=V);const ne=(J=V.atomValues.get(t))!==null&&J!==void 0?J:s;if(ne.state==="hasValue"){var Y,ge,Ie,he;const be=ne.contents,Ot=(Y=H.atomValues.get(t))!==null&&Y!==void 0?Y:s,Zn=Ot.state==="hasValue"?Ot.contents:or;((ge=se)===null||ge===void 0?void 0:ge.effect)!==M||((Ie=se)===null||Ie===void 0?void 0:Ie.value)!==be?F(be,Zn,!V.atomValues.has(t)):((he=se)===null||he===void 0?void 0:he.effect)===M&&(se=null)}},t);l.set(h,[...(b=l.get(h))!==null&&b!==void 0?b:[],P])};for(const M of k)try{const F=M({node:g,storeID:h.storeID,parentStoreID_UNSTABLE:h.parentStoreID,trigger:w,setSelf:T(M),resetSelf:O(M),onSet:B(M),getPromise:U,getLoadable:W,getInfo_UNSTABLE:X});if(F!=null){var L;l.set(h,[...(L=l.get(h))!==null&&L!==void 0?L:[],F])}}catch(F){$=F,de=!0}if(oe=!1,!($ instanceof xn)){var G;const M=de?qu($):Se($)?Gu(c(h,$)):Ir(Yo($));M.contents,p.atomValues.set(t,M),(G=h.getState().nextTree)===null||G===void 0||G.atomValues.set(t,M)}}return x}function d(h,p){var w,R;return(w=(R=p.atomValues.get(t))!==null&&R!==void 0?R:a)!==null&&w!==void 0?w:s}function m(h,p){if(p.atomValues.has(t))return xe(p.atomValues.get(t));if(p.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return s;const w=p.nonvalidatedAtoms.get(t),R=n.validator(w,or);return a=R instanceof xn?s:Ir(R),a}else return s}function v(){a=void 0}function y(h,p,w){if(p.atomValues.has(t)){const R=xe(p.atomValues.get(t));if(R.state==="hasValue"&&w===R.contents)return new Map}else if(!p.nonvalidatedAtoms.has(t)&&w instanceof xn)return new Map;return a=void 0,new Map().set(t,Ir(w))}function E(){return dS(t)!==void 0&&o<=0}const g=sP({key:t,nodeType:"atom",peek:d,get:m,set:y,init:f,invalidate:v,shouldDeleteConfigOnRelease:E,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return g}function gh(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return lP(n)?pP({...t,default:n}):hP({...t,default:n})}function pP(e){const t=gh({...e,default:or,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof xn?r:xe(e.persistence_UNSTABLE).validator(r,or)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=So({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof xn?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return aP(n.key,dS(e.key)),n}gh.value=e=>new fS(e);var hS=gh;class mP{constructor(t){var n;ie(this,"_map",void 0),ie(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var gP={MapCache:mP},vP=gP.MapCache,yP=Object.freeze({__proto__:null,MapCache:vP});const{LRUCache:pg}=aS,{MapCache:SP}=yP,Ys={equality:"reference",eviction:"none",maxSize:1/0};function wP({equality:e=Ys.equality,eviction:t=Ys.eviction,maxSize:n=Ys.maxSize}=Ys){const r=_P(e);return EP(t,n,r)}function _P(e){switch(e){case"reference":return t=>t;case"value":return t=>Zl(t)}throw ae(`Unrecognized equality policy ${e}`)}function EP(e,t,n){switch(e){case"keep-all":return new SP({mapKey:n});case"lru":return new pg({mapKey:n,maxSize:xe(t)});case"most-recent":return new pg({mapKey:n,maxSize:1})}throw ae(`Unrecognized eviction policy ${e}`)}var pS=wP;const{setConfigDeletionHandler:xP}=lt;function CP(e){var t,n;const r=pS({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i,s;const a=r.get(o);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),f=hS({...u,key:`${e.key}__${(i=Zl(o))!==null&&i!==void 0?i:"void"}`,default:typeof c=="function"?c(o):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(s=e.effects)!==null&&s!==void 0?s:e.effects_UNSTABLE});return r.set(o,f),xP(f.key,()=>{r.delete(o)}),f}}var bP=CP;const{setConfigDeletionHandler:RP}=lt;let kP=0;function TP(e){var t,n;const r=pS({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let s;try{s=r.get(o)}catch(d){throw ae(`Problem with cache lookup for selector ${e.key}: ${d.message}`)}if(s!=null)return s;const a=`${e.key}__selectorFamily/${(i=Zl(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${kP++}`,l=d=>e.get(o)(d),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const d=e.set;f=So({key:a,get:l,set:(v,y)=>d(o)(v,y),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else f=So({key:a,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(o,f),RP(f.key,()=>{r.delete(o)}),f}}var Xn=TP;const NP=Xn({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function OP(e){return NP(e)}var LP=OP;const PP=Xn({key:"__error",get:e=>()=>{throw ae(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function AP(e){return PP(e)}var IP=AP;function MP(e){return e}var DP=MP;const{loadableWithError:mS,loadableWithPromise:gS,loadableWithValue:vS}=ls;function eu(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,i]of t.entries())try{n[o]=e(i)}catch(s){r[o]=s}return[n,r]}function $P(e){return e!=null&&!Se(e)}function tu(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Cf(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function ro(e,t,n){const r=n.map((o,i)=>o==null?vS(t[i]):Se(o)?gS(o):mS(o));return Cf(e,r)}function UP(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const FP=Xn({key:"__waitForNone",get:e=>({get:t})=>{const n=tu(e),[r,o]=eu(t,n);return ro(e,r,o)},dangerouslyAllowMutability:!0}),jP=Xn({key:"__waitForAny",get:e=>({get:t})=>{const n=tu(e),[r,o]=eu(t,n);return o.some(i=>!Se(i))?ro(e,r,o):new Promise(i=>{for(const[s,a]of o.entries())Se(a)&&a.then(l=>{r[s]=l,o[s]=void 0,i(ro(e,r,o))}).catch(l=>{o[s]=l,i(ro(e,r,o))})})},dangerouslyAllowMutability:!0}),zP=Xn({key:"__waitForAll",get:e=>({get:t})=>{const n=tu(e),[r,o]=eu(t,n);if(o.every(s=>s==null))return Cf(e,r);const i=o.find($P);if(i!=null)throw i;return Promise.all(o).then(s=>Cf(e,UP(r,s)))},dangerouslyAllowMutability:!0}),VP=Xn({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=tu(e),[r,o]=eu(t,n);return o.every(i=>!Se(i))?ro(e,r,o):Promise.all(o.map((i,s)=>Se(i)?i.then(a=>{r[s]=a,o[s]=void 0}).catch(a=>{r[s]=void 0,o[s]=a}):null)).then(()=>ro(e,r,o))},dangerouslyAllowMutability:!0}),BP=Xn({key:"__noWait",get:e=>({get:t})=>{try{return So.value(vS(t(e)))}catch(n){return So.value(Se(n)?gS(n):mS(n))}},dangerouslyAllowMutability:!0});var WP={waitForNone:FP,waitForAny:jP,waitForAll:zP,waitForAllSettled:VP,noWait:BP};const{RecoilLoadable:HP}=ls,{DefaultValue:KP}=lt,{RecoilRoot:QP,useRecoilStoreID:qP}=gn,{isRecoilValue:GP}=go,{retentionZone:YP}=Vl,{freshSnapshot:XP}=ql,{useRecoilState:JP,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:ZP,useRecoilStateLoadable:eA,useRecoilValue:tA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:nA,useRecoilValueLoadable:rA,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:oA,useResetRecoilState:iA,useSetRecoilState:sA}=gO,{useGotoRecoilSnapshot:aA,useRecoilSnapshot:lA,useRecoilTransactionObserver:uA}=eS,{useRecoilCallback:cA}=oS,{noWait:fA,waitForAll:dA,waitForAllSettled:hA,waitForAny:pA,waitForNone:mA}=WP;var vh={DefaultValue:KP,isRecoilValue:GP,RecoilLoadable:HP,RecoilEnv:No,RecoilRoot:QP,useRecoilStoreID:qP,useRecoilBridgeAcrossReactRoots_UNSTABLE:BO,atom:hS,selector:So,atomFamily:bP,selectorFamily:Xn,constSelector:LP,errorSelector:IP,readOnlySelector:DP,noWait:fA,waitForNone:mA,waitForAny:pA,waitForAll:dA,waitForAllSettled:hA,useRecoilValue:tA,useRecoilValueLoadable:rA,useRecoilState:JP,useRecoilStateLoadable:eA,useSetRecoilState:sA,useResetRecoilState:iA,useGetRecoilValueInfo_UNSTABLE:$O,useRecoilRefresher_UNSTABLE:yL,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:oA,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:nA,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:ZP,useRecoilCallback:cA,useRecoilTransaction_UNSTABLE:xL,useGotoRecoilSnapshot:aA,useRecoilSnapshot:lA,useRecoilTransactionObserver_UNSTABLE:uA,snapshot_UNSTABLE:XP,useRetain:fh,retentionZone:YP},gA=vh.RecoilRoot,vA=vh.atom,D4=vh.useRecoilState;function bf(){return bf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var yh=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=yA(e,["color","size"]);return Q.createElement("svg",bf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("polyline",{points:"20 6 9 17 4 12"}))});yh.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};yh.displayName="Check";const wA=yh;function Rf(){return Rf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Sh=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=_A(e,["color","size"]);return Q.createElement("svg",Rf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),Q.createElement("line",{x1:"1",y1:"1",x2:"23",y2:"23"}))});Sh.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};Sh.displayName="EyeOff";const xA=Sh;function kf(){return kf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var wh=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=CA(e,["color","size"]);return Q.createElement("svg",kf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),Q.createElement("circle",{cx:"12",cy:"12",r:"3"}))});wh.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};wh.displayName="Eye";const RA=wh;function Tf(){return Tf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var _h=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=kA(e,["color","size"]);return Q.createElement("svg",Tf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"}))});_h.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};_h.displayName="GitHub";const NA=_h;function Nf(){return Nf=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Eh=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=OA(e,["color","size"]);return Q.createElement("svg",Nf({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("circle",{cx:"12",cy:"12",r:"10"}),Q.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),Q.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});Eh.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};Eh.displayName="Info";const PA=Eh;function Of(){return Of=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IA(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var xh=S.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,s=AA(e,["color","size"]);return Q.createElement("svg",Of({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},s),Q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});xh.propTypes={color:Ce.string,size:Ce.oneOfType([Ce.string,Ce.number])};xh.displayName="X";const MA=xh;function DA(e,t){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function yS(e){return e.replace(/\/$/,"")}function $4(e,t){let n=String(e);for(;n.length{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function nu(e){const t=e[pt];return t?t.type_:Array.isArray(e)?1:ru(e)?2:ou(e)?3:0}function Lf(e,t){return nu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function CS(e,t,n){const r=nu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function WA(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ru(e){return e instanceof Map}function ou(e){return e instanceof Set}function rr(e){return e.copy_||e.base_}function Pf(e,t){if(ru(e))return new Map(e);if(ou(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&xS(e))return wo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[pt];let r=Reflect.ownKeys(n);for(let o=0;o1&&(e.set=e.add=e.clear=e.delete=HA),Object.freeze(e),t&&Vi(e,(n,r)=>Ch(r,!0))),e}function HA(){Ft(2)}function iu(e){return Object.isFrozen(e)}var KA={};function _r(e){const t=KA[e];return t||Ft(0,e),t}var Bi;function bS(){return Bi}function QA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vg(e,t){t&&(_r("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Af(e){If(e),e.drafts_.forEach(qA),e.drafts_=null}function If(e){e===Bi&&(Bi=e.parent_)}function yg(e){return Bi=QA(Bi,e)}function qA(e){const t=e[pt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[pt].modified_&&(Af(t),Ft(4)),wr(e)&&(e=ll(t,e),t.parent_||ul(t,e)),t.patches_&&_r("Patches").generateReplacementPatches_(n[pt].base_,e,t.patches_,t.inversePatches_)):e=ll(t,n,[]),Af(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ES?e:void 0}function ll(e,t,n){if(iu(t))return t;const r=t[pt];if(!r)return Vi(t,(o,i)=>wg(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ul(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Vi(i,(a,l)=>wg(e,r,o,a,l,n,s)),ul(e,o,!1),n&&e.patches_&&_r("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function wg(e,t,n,r,o,i,s){if(_o(o)){const a=i&&t&&t.type_!==3&&!Lf(t.assigned_,r)?i.concat(r):void 0,l=ll(e,o,a);if(CS(n,r,l),_o(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(wr(o)&&!iu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ll(e,o),(!t||!t.scope_.parent_)&&ul(e,o)}}function ul(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ch(t,n)}function GA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=bh;n&&(o=[r],i=Wi);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var bh={get(e,t){if(t===pt)return e;const n=rr(e);if(!Lf(n,t))return YA(e,n,t);const r=n[t];return e.finalized_||!wr(r)?r:r===Yu(e.base_,t)?(Xu(e),e.copy_[t]=Df(r,e)):r},has(e,t){return t in rr(e)},ownKeys(e){return Reflect.ownKeys(rr(e))},set(e,t,n){const r=RS(rr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Yu(rr(e),t),i=o==null?void 0:o[pt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(WA(n,o)&&(n!==void 0||Lf(e.base_,t)))return!0;Xu(e),Mf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Yu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xu(e),Mf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=rr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ft(11)},getPrototypeOf(e){return wo(e.base_)},setPrototypeOf(){Ft(12)}},Wi={};Vi(bh,(e,t)=>{Wi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wi.deleteProperty=function(e,t){return Wi.set.call(this,e,t,void 0)};Wi.set=function(e,t,n){return bh.set.call(this,e[0],t,n,e[0])};function Yu(e,t){const n=e[pt];return(n?rr(n):e)[t]}function YA(e,t,n){var o;const r=RS(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function RS(e,t){if(!(t in e))return;let n=wo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=wo(n)}}function Mf(e){e.modified_||(e.modified_=!0,e.parent_&&Mf(e.parent_))}function Xu(e){e.copy_||(e.copy_=Pf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var XA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(l=i,...u){return s.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&Ft(6),r!==void 0&&typeof r!="function"&&Ft(7);let o;if(wr(t)){const i=yg(this),s=Df(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?Af(i):If(i)}return vg(i,r),Sg(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===ES&&(o=void 0),this.autoFreeze_&&Ch(o,!0),r){const i=[],s=[];_r("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else Ft(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wr(e)||Ft(8),_o(e)&&(e=JA(e));const t=yg(this),n=Df(e,void 0);return n[pt].isManual_=!0,If(t),n}finishDraft(e,t){const n=e&&e[pt];(!n||!n.isManual_)&&Ft(9);const{scope_:r}=n;return vg(r,t),Sg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=_r("Patches").applyPatches_;return _o(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Df(e,t){const n=ru(e)?_r("MapSet").proxyMap_(e,t):ou(e)?_r("MapSet").proxySet_(e,t):GA(e,t);return(t?t.scope_:bS()).drafts_.push(n),n}function JA(e){return _o(e)||Ft(10,e),kS(e)}function kS(e){if(!wr(e)||iu(e))return e;const t=e[pt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Pf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Pf(e,!0);return Vi(n,(r,o)=>{CS(n,r,kS(o))}),t&&(t.finalized_=!1),n}var mt=new XA,ZA=mt.produce;mt.produceWithPatches.bind(mt);var eI=mt.setAutoFreeze.bind(mt);mt.setUseStrictShallowCopy.bind(mt);mt.applyPatches.bind(mt);mt.createDraft.bind(mt);mt.finishDraft.bind(mt);eI(!1);const{createContext:Rh,memo:tI,useMemo:nI,useRef:rI,useEffect:oI,useCallback:_g,useContext:$f,useState:iI}=Q,TS=Rh(null),NS=Rh(null),OS=Rh(null);function sI(){return $f(OS)}function aI({initialState:e,actions:t={},children:n}){const r=rI(e),[o,i]=iI(e),s=_g(()=>r.current,[]);oI(()=>{},[s]);const a=_g((u,c)=>{if(typeof u=="function")return u(a,s);const f=ZA(s(),c);f!==r.current&&(r.current=f,i(f))},[s]),l=nI(()=>LS(t,a),[t,a]);return _.jsx(TS.Provider,{value:o,children:_.jsx(NS.Provider,{value:a,children:_.jsx(OS.Provider,{value:l,children:n})})})}function Jn(e){return t=>{const n=tI(t);function r(o){const i=$f(TS),s=$f(NS),a=e(i,o),l={dispatch:s,...o,...a};return _.jsx(n,{...l})}return r}}function lI(e,t){return function(...n){return t(e.apply(this,n))}}function LS(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"?n[r]=lI(o,t):typeof o=="object"&&(n[r]=LS(o,t))}return n}const PS="PaoPaoGateWay";function uI(){try{const e=localStorage.getItem(PS);return e?JSON.parse(e):void 0}catch{return}}function Tr(e){try{const t=JSON.stringify(e);localStorage.setItem(PS,t)}catch{}}const AS="/configs";async function IS(e){const{url:t,init:n}=yt(e);return await fetch(t+AS,n)}function cI(e){return"socks-port"in e&&(e["socket-port"]=e["socks-port"]),e}async function fI(e,t){const{url:n,init:r}=yt(e),o=JSON.stringify(cI(t));return await fetch(n+AS,{...r,body:o,method:"PATCH"})}const MS="/traffic",dI=new TextDecoder("utf-8"),Xs=150,Rn={labels:Array(Xs).fill(0),up:Array(Xs),down:Array(Xs),size:Xs,subscribers:[],appendData(e){this.up.shift(),this.down.shift(),this.labels.shift();const t=Date.now();this.up.push(e.up),this.down.push(e.down),this.labels.push(t),this.subscribers.forEach(n=>n(e))},subscribe(e){return this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}}};let Gr=!1,Js="";function Uf(e){Rn.appendData(JSON.parse(e))}function DS(e){return e.read().then(({done:t,value:n})=>{const r=dI.decode(n,{stream:!t});Js+=r;const o=Js.split(` -`),i=o[o.length-1];for(let s=0;s{r=!0,n.close()},i=()=>{r=!1,Rn.up.fill(void 0),Rn.down.fill(void 0),Rn.labels.fill(0),Eg(e)};return document.addEventListener("freeze",o,{capture:!0,once:!0}),document.addEventListener("resume",i,{capture:!0,once:!0}),n.addEventListener("error",function(s){Zs=3}),n.addEventListener("close",function(s){Zs=3,r||(document.removeEventListener("freeze",o),document.removeEventListener("resume",i),Eg(e))}),n.addEventListener("message",function(s){Uf(s.data)}),Rn}function Eg(e){if(Gr)return Rn;Gr=!0;const{url:t,init:n}=yt(e);return fetch(t+MS,n).then(r=>{if(r.ok){const o=r.body.getReader();DS(o)}else Gr=!1},r=>{console.log("fetch /traffic error",r),Gr=!1}),Rn}function xg(e){return t=>{t(`openModal:${e}`,n=>{n.modals[e]=!0})}}function hI(e){return t=>{t(`closeModal:${e}`,n=>{n.modals[e]=!1})}}const pI={apiConfig:!1},F4=e=>e.configs.configs,mI=e=>e.configs.haveFetchedConfig,j4=e=>e.configs.configs["log-level"];function $S(e){return async(t,n)=>{let r;try{r=await IS(e)}catch{t(xg("apiConfig"));return}if(!r.ok){console.log("Error fetch configs",r.statusText),t(xg("apiConfig"));return}const o=await r.json();t("store/configs#fetchConfigs",s=>{s.configs.configs=o}),mI(n())?kh(e):t(gI())}}function gI(){return e=>{e("store/configs#markHaveFetchedConfig",t=>{t.configs.haveFetchedConfig=!0})}}function z4(e,t){return async n=>{fI(e,t).then(r=>{r.ok===!1&&console.log("Error update configs",r.statusText)},r=>{throw console.log("Error update configs",r),r}).then(()=>{n($S(e))}),n("storeConfigsOptimisticUpdateConfigs",r=>{r.configs.configs={...r.configs.configs,...t}})}}const vI={configs:{port:7890,"socks-port":7891,"redir-port":0,"allow-lan":!1,mode:"Rule","log-level":"uninit"},haveFetchedConfig:!1},ps=e=>{const t=e.app.selectedClashAPIConfigIndex;return e.app.clashAPIConfigs[t]},US=e=>e.app.selectedClashAPIConfigIndex,FS=e=>e.app.clashAPIConfigs,Th=e=>e.app.theme,yI=e=>e.app.selectedChartStyleIndex,jS=e=>e.app.latencyTestUrl,V4=e=>e.app.collapsibleIsOpen,B4=e=>e.app.proxySortBy,W4=e=>e.app.hideUnavailableProxies,SI=e=>e.app.autoCloseOldConns,H4=e=>e.app.logStreamingPaused,wI=DA(Tr,600);function Nh(e,{baseURL:t,secret:n,metaLabel:r}){const o=FS(e());for(let i=0;i{if(Nh(n,e))return;const o={...e,addedAt:Date.now()};t("addClashAPIConfig",i=>{i.app.clashAPIConfigs.push(o)}),Tr(n().app)}}function EI(e){return async(t,n)=>{const r=Nh(n,e);t("removeClashAPIConfig",o=>{o.app.clashAPIConfigs.splice(r,1),r===o.app.selectedClashAPIConfigIndex?o.app.selectedClashAPIConfigIndex=0:r{const r=Nh(n,e);US(n())!==r&&t("selectClashAPIConfig",i=>{i.app.selectedClashAPIConfigIndex=r}),Tr(n().app);try{window.location.reload()}catch{}}}const Ju=document.querySelector("html");function Zu(e,t){const n=document.createElement("meta");n.setAttribute("name","theme-color"),n.setAttribute("content",e),t&&n.setAttribute("media",t),document.head.appendChild(n)}function CI(e){const t=Array.from(document.querySelectorAll("meta[name=theme-color]"));let n;for(const r of t)r.getAttribute("media")?document.head.removeChild(r):n=r;if(e==="auto")if(Zu("#eeeeee","(prefers-color-scheme: light)"),Zu("#202020","(prefers-color-scheme: dark)"),n)document.head.removeChild(n);else return;else{const r=e==="light"?"#eeeeee":"#202020";n?n.setAttribute("content",r):Zu(r)}}function zS(e="dark"){e==="auto"?Ju.setAttribute("data-theme","auto"):e==="dark"?Ju.setAttribute("data-theme","dark"):Ju.setAttribute("data-theme","light"),CI(e)}function bI(e="auto"){return(t,n)=>{Th(n())!==e&&(zS(e),t("storeSwitchTheme",o=>{o.app.theme=e}),Tr(n().app))}}function RI(e){return(t,n)=>{t("appSelectChartStyleIndex",r=>{r.app.selectedChartStyleIndex=Number(e)}),Tr(n().app)}}function Cg(e,t){return(n,r)=>{n("appUpdateAppConfig",o=>{o.app[e]=t}),Tr(r().app)}}function kI(e,t,n){return(r,o)=>{r("updateCollapsibleIsOpen",i=>{i.app.collapsibleIsOpen[`${e}:${t}`]=n}),wI(o().app)}}var Yg;const TI={baseURL:((Yg=document.getElementById("app"))==null?void 0:Yg.getAttribute("data-base-url"))??"http://127.0.0.1:9090",secret:"",addedAt:0},NI={selectedClashAPIConfigIndex:0,clashAPIConfigs:[TI],latencyTestUrl:"https://www.youtube.com/generate_204",selectedChartStyleIndex:0,theme:"dark",collapsibleIsOpen:{},proxySortBy:"Natural",hideUnavailableProxies:!1,autoCloseOldConns:!0,logStreamingPaused:!1};function OI(){const{search:e}=window.location,t={};if(typeof e!="string"||e==="")return t;const n=e.replace(/^\?/,"").split("&");for(let r=0;rFA("/version",e.apiConfig));return _.jsxs(_.Fragment,{children:[_.jsx(_S,{title:"PaoPao GateWay"}),_.jsx(tc,{name:"PaoPao GateWay",version:"PPGW_version",link:"https://github.com/kkkgo/PaoPaoGateWay"}),t&&t.version?_.jsx(tc,{name:"Clash",version:t.version,link:"https://github.com/Dreamacro/clash"}):null,_.jsx(tc,{name:"Yacd",version:"0.3.8",link:"https://github.com/haishanh/yacd"})]})}const DI=e=>({apiConfig:ps(e)}),$I=Jn(DI)(MI),UI="_loading_74j3j_1",FI="_spinner_74j3j_9",jI="_rotate_74j3j_1",bg={loading:UI,spinner:FI,rotate:jI},VS=({height:e})=>{const t=e?{height:e}:{};return _.jsx("div",{className:bg.loading,style:t,children:_.jsx("div",{className:bg.spinner})})},zI=new $0,VI=new Zb({queryCache:zI,defaultOptions:{queries:{suspense:!0}}});var cl="NOT_FOUND";function BI(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:cl},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function WI(e,t){var n=[];function r(a){var l=n.findIndex(function(c){return t(a,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return cl}function o(a,l){r(a)===cl&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var HI=function(t,n){return t===n};function KI(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i1?t-1:0),r=1;re.logs.logs,WS=e=>e.logs.tail,XI=e=>e.logs.searchText,K4=YI(BS,WS,XI,(e,t,n)=>{const r=[];for(let o=t;o>=0;o--)r.push(e[o]);if(e.length===Ff)for(let o=Ff-1;o>t;o--)r.push(e[o]);return n===""?r:r.filter(o=>o.payload.toLowerCase().indexOf(n)>=0)});function Q4(e){return t=>{t("logsUpdateSearchText",n=>{n.logs.searchText=e.toLowerCase()})}}function q4(e){return(t,n)=>{const r=n(),o=BS(r),i=WS(r),s=i>=Ff-1?0:i+1;o[s]=e,t("logsAppendLog",a=>{a.logs.tail=s})}}const JI={searchText:"",logs:[],tail:-1},su="/connections",va=[];function ZI(e){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}va.forEach(n=>n(t))}let ea;function jf(e,t){if(ea===1&&t)return Rg(t);ea=1;const n=wS(e,su),r=new WebSocket(n);let o=!1;const i=()=>{o=!0,r.close()},s=()=>{o=!1,jf(e,void 0)};if(document.addEventListener("freeze",i,{capture:!0,once:!0}),document.addEventListener("resume",s,{capture:!0,once:!0}),r.addEventListener("error",()=>ea=3),r.addEventListener("close",function(a){ea=3,o||(document.removeEventListener("freeze",i),document.removeEventListener("resume",s),jf(e,void 0))}),r.addEventListener("message",a=>ZI(a.data)),t)return Rg(t)}function Rg(e){return va.push(e),function(){const n=va.indexOf(e);va.splice(n,1)}}async function G4(e){const{url:t,init:n}=yt(e);return await fetch(t+su,{...n,method:"DELETE"})}async function eM(e){const{url:t,init:n}=yt(e);return await fetch(t+su,{...n})}async function tM(e,t){const{url:n,init:r}=yt(e),o=`${n}${su}/${t}`;return await fetch(o,{...r,method:"DELETE"})}const Oh="/proxies";async function nM(e){const{url:t,init:n}=yt(e);return await(await fetch(t+Oh,n)).json()}async function rM(e,t,n){const r={name:n},{url:o,init:i}=yt(e),s=encodeURIComponent(t),a=`${o}${Oh}/${s}`;return await fetch(a,{...i,method:"PUT",body:JSON.stringify(r)})}async function HS(e,t,n="https://www.youtube.com/generate_204"){const{url:r,init:o}=yt(e),i=`timeout=5000&url=${encodeURIComponent(n)}`,s=`${r}${Oh}/${encodeURIComponent(t)}/delay?${i}`;return await fetch(s,o)}async function oM(e){const{url:t,init:n}=yt(e),r=await fetch(t+"/providers/proxies",n);return r.status===404?{providers:{}}:await r.json()}async function KS(e,t){const{url:n,init:r}=yt(e),o={...r,method:"PUT"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t),o)}async function iM(e,t){const{url:n,init:r}=yt(e),o={...r,method:"GET"};return await fetch(n+"/providers/proxies/"+encodeURIComponent(t)+"/healthcheck",o)}const sM={proxies:{},delay:{},groupNames:[],showModalClosePrevConns:!1},QS=()=>null,aM=["Direct","Reject","Relay","Selector","Fallback","URLTest","LoadBalance","Unknown"],qS=e=>e.proxies.proxies,Yr=e=>e.proxies.delay,Y4=e=>e.proxies.groupNames,lM=e=>e.proxies.proxyProviders||[],uM=e=>e.proxies.dangleProxyNames,X4=e=>e.proxies.showModalClosePrevConns;function cM(e,t){const n={};for(const r of e){const i=(t(r)||{history:[]}).history,s=i[i.length-1];s&&typeof s.delay=="number"&&(n[r]={kind:"Result",number:s.delay})}return n}function Lo(e){return async(t,n)=>{const[r,o]=await Promise.all([nM(e),oM(e)]),{proxyProviders:i,providerProxyRecord:s}=yM(o.providers),a={...s,...r.proxies},[l,u]=vM(a),c={...Yr(n()),...cM(Object.keys(a),d=>a[d])},f=[];for(const d of u)s[d]||f.push(d);t("store/proxies#fetchProxies",d=>{d.proxies.proxies=a,d.proxies.groupNames=l,d.proxies.dangleProxyNames=f,d.proxies.delay=c,d.proxies.proxyProviders=i})}}function J4(e,t){return async n=>{try{await KS(e,t)}catch{}n(Lo(e))}}function Z4(e,t){return async n=>{for(let r=0;r{await Lh(e,t),await n(Lo(e))}}async function fM(e,t,n){const r=await eM(e);r.ok||console.log("unable to fetch all connections",r.statusText);const i=(await r.json()).connections,s=[];for(const a of i)a.chains.indexOf(t)>-1&&a.chains.indexOf(n)<0&&s.push(a.id);await Promise.all(s.map(a=>tM(e,a).catch(QS)))}function dM(e,t,n){const r=[n,t];let o,i=n;for(;(o=e[i])&&o.now;)r.unshift(o.now),i=o.now;return r}async function hM(e,t,n,r,o){try{if((await rM(n,r,o)).ok===!1)throw new Error("failed to switch proxy: res.statusText")}catch(s){throw console.log(s,"failed to switch proxy"),s}if(e(Lo(n)),SI(t())){const s=qS(t());YS(n,s,{groupName:r,itemName:o})}}function GS(){return e=>{e("closeModalClosePrevConns",t=>{t.proxies.showModalClosePrevConns=!1})}}function YS(e,t,n){const r=dM(t,n.groupName,n.itemName);fM(e,n.groupName,r[0])}function pM(e){return async(t,n)=>{var s;const r=n(),o=(s=r.proxies.switchProxyCtx)==null?void 0:s.to;if(!o){t(GS());return}const i=r.proxies.proxies;YS(e,i,o),t("closePrevConnsAndTheModal",a=>{a.proxies.showModalClosePrevConns=!1,a.proxies.switchProxyCtx=void 0})}}function tU(e,t,n){return async(r,o)=>{hM(r,o,e,t,n).catch(QS),r("store/proxies#switchProxy",i=>{const s=i.proxies.proxies;s[t]&&s[t].now&&(s[t].now=n)})}}function mM(e,t){return async(n,r)=>{n("set latency state to testing in progress",i=>{i.proxies.delay={...Yr(r()),[t]:{kind:"Testing"}}});const o=jS(r());try{const i=await HS(e,t,o);if(i.ok){const{delay:s}=await i.json();n("set latency result",a=>{a.proxies.delay={...Yr(r()),[t]:{kind:"Result",number:s}}})}else n("set latency testing error",s=>{s.proxies.delay={...Yr(r()),[t]:{kind:"Error",message:i.statusText}}})}catch(i){n("set latency testing networkish error",s=>{s.proxies.delay={...Yr(r()),[t]:{kind:"Error",message:i.message||i.type}}})}}}function gM(e,t){return async(n,r)=>{const o=qS(r()),i=new Map,s=new Map,a=[];t.forEach(l=>{const u=o[l];u.__provider?u.__provider&&(i.get(l)||(i.set(l,!0),n("set latency state to testing in progress",c=>{c.proxies.delay={...Yr(r()),[l]:{kind:"Testing"}}})),s.get(u.__provider)||(s.set(u.__provider,!0),a.push(Lh(e,u.__provider)))):i.get(l)||(i.set(l,!0),n(mM(e,l)))}),await Promise.all(a),await n(Lo(e))}}function nU(e){return async(t,n)=>{const r=uM(n()),o=jS(n());await Promise.all(r.map(s=>HS(e,s,o)));const i=lM(n());for(const s of i)await Lh(e,s.name);await t(Lo(e))}}function vM(e){let t=[],n;const r=[];for(const o in e){const i=e[o];i.all&&Array.isArray(i.all)?(t.push(o),o==="GLOBAL"&&(n=Array.from(i.all))):aM.indexOf(i.type)<0&&r.push(o)}return n&&(n.push("GLOBAL"),t=t.map(o=>[n.indexOf(o),o]).sort((o,i)=>o[0]-i[0]).map(o=>o[1])),[t,r]}function yM(e){const t=Object.keys(e),n=[],r={};for(let o=0;on(o=>!o),[]);return[t,r]}function oU(e){const[t,n]=JS(e);return{value:t,set:n}}const CM="_ul_1ore2_1",bM="_li_1ore2_10",RM="_right_1ore2_21",kM="_close_1ore2_32",TM="_eye_1ore2_39",NM="_url_1ore2_54",OM="_secret_1ore2_55",LM="_metaLabel_1ore2_56",PM="_btn_1ore2_62",Gt={ul:CM,li:bM,right:RM,close:kM,eye:TM,url:NM,secret:OM,metaLabel:LM,btn:PM},AM=e=>({apiConfigs:FS(e),selectedClashAPIConfigIndex:US(e)}),IM=Jn(AM)(MM);function MM({apiConfigs:e,selectedClashAPIConfigIndex:t}){const{app:{removeClashAPIConfig:n,selectClashAPIConfig:r}}=sI(),o=S.useCallback(s=>{n(s)},[n]),i=S.useCallback(s=>{r(s)},[r]);return _.jsx(_.Fragment,{children:_.jsx("ul",{className:Gt.ul,children:e.map((s,a)=>_.jsx("li",{className:Hn(Gt.li,{[Gt.isSelected]:a===t}),children:_.jsx(DM,{disableRemove:a===t,conf:s,onRemove:o,onSelect:i})},s.baseURL+s.secret+s.metaLabel))})})}function DM({conf:e,disableRemove:t,onRemove:n,onSelect:r}){const[o,i]=xM(),s=o?xA:RA,a=S.useCallback(l=>{l.stopPropagation()},[]);return _.jsxs(_.Fragment,{children:[_.jsx(kg,{disabled:t,onClick:()=>n(e),className:Gt.close,children:_.jsx(MA,{size:20})}),_.jsxs("div",{className:Gt.right,children:[e.metaLabel?_.jsxs(_.Fragment,{children:[_.jsx("span",{className:Gt.metaLabel,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.metaLabel}),_.jsx("span",{})]}):null,_.jsx("span",{className:Gt.url,tabIndex:0,role:"button",onClick:()=>r(e),onKeyUp:a,children:e.baseURL}),_.jsx("span",{}),e.secret?_.jsxs(_.Fragment,{children:[_.jsx("span",{className:Gt.secret,children:o?e.secret:"***"}),_.jsx(kg,{onClick:i,className:Gt.eye,children:_.jsx(s,{size:16})})]}):null]})]})}function kg({children:e,onClick:t,className:n,disabled:r}){return _.jsx("button",{disabled:r,className:Hn(n,Gt.btn),onClick:t,children:e})}const $M="_root_zwtea_1",UM="_header_zwtea_5",FM="_icon_zwtea_10",jM="_body_zwtea_20",zM="_hostnamePort_zwtea_24",VM="_error_zwtea_36",BM="_footer_zwtea_42",yn={root:$M,header:UM,icon:FM,body:jM,hostnamePort:zM,error:VM,footer:BM},WM="_btn_lzu00_1",HM="_circular_lzu00_27",KM="_minimal_lzu00_30",QM="_btnStart_lzu00_48",qM="_loadingContainer_lzu00_55",ri={btn:WM,circular:HM,minimal:KM,btnStart:QM,loadingContainer:qM},GM="_sectionNameType_1b9pp_1",YM="_loadingDot_1b9pp_66",XM="_dot2_1b9pp_1",JM="_dot1_1b9pp_1",ZM="_dot3_1b9pp_1",ZS={sectionNameType:GM,loadingDot:YM,dot2:XM,dot1:JM,dot3:ZM};function iU({name:e,type:t}){return _.jsxs("h2",{className:ZS.sectionNameType,children:[_.jsx("span",{children:e}),_.jsx("span",{children:t})]})}function eD(){return _.jsx("span",{className:ZS.loadingDot})}const{forwardRef:tD,useCallback:nD}=tn;function rD(e,t){const{onClick:n,disabled:r=!1,isLoading:o,kind:i="primary",className:s,children:a,label:l,text:u,start:c,...f}=e,d={children:a,label:l,text:u,start:c},m=nD(y=>{o||n&&n(y)},[o,n]),v=Hn(ri.btn,{[ri.minimal]:i==="minimal",[ri.circular]:i==="circular"},s);return _.jsx("button",{className:v,ref:t,onClick:m,disabled:r,...f,children:o?_.jsxs(_.Fragment,{children:[_.jsx("span",{style:{display:"inline-flex",opacity:0},children:_.jsx(Tg,{...d})}),_.jsx("span",{className:ri.loadingContainer,children:_.jsx(eD,{})})]}):_.jsx(Tg,{...d})})}function Tg({children:e,label:t,text:n,start:r}){return _.jsxs(_.Fragment,{children:[r?_.jsx("span",{className:ri.btnStart,children:typeof r=="function"?r():r}):null,e||t||n]})}const oD=tD(rD),iD="_root_1or8t_1",sD="_floatAbove_1or8t_32",Ng={root:iD,floatAbove:sD},{useCallback:aD}=tn;function nc({id:e,label:t,value:n,onChange:r,...o}){const i=aD(s=>r(s),[r]);return _.jsxs("div",{className:Ng.root,children:[_.jsx("input",{id:e,value:n,onChange:i,...o}),_.jsx("label",{htmlFor:e,className:Ng.floatAbove,children:t})]})}const lD="_path_r8pm3_1",uD="_dash_r8pm3_1",cD={path:lD,dash:uD};function Ph({width:e=320,height:t=320,animate:n=!1,c0:r="currentColor",stroke:o="#eee",eye:i="#eee",mouth:s="#eee"}){const a=Hn({[cD.path]:n});return _.jsx("svg",{width:e,height:t,viewBox:"0 0 320 320",xmlns:"http://www.w3.org/2000/svg",children:_.jsxs("g",{fill:"none",fillRule:"evenodd",children:[_.jsx("path",{d:"M71.689 53.055c9.23-1.487 25.684 27.263 41.411 56.663 18.572-8.017 71.708-7.717 93.775 0 4.714-15.612 31.96-57.405 41.626-56.663 3.992.088 13.07 31.705 23.309 94.96 2.743 16.949 7.537 47.492 14.38 91.63-42.339 17.834-84.37 26.751-126.095 26.751-41.724 0-83.756-8.917-126.095-26.751C52.973 116.244 65.536 54.047 71.689 53.055z",stroke:o,strokeWidth:"4",strokeLinecap:"round",fill:r,className:a}),_.jsx("circle",{fill:i,cx:"216.5",cy:"181.5",r:"14.5"}),_.jsx("circle",{fill:i,cx:"104.5",cy:"181.5",r:"14.5"}),_.jsx("g",{stroke:s,strokeLinecap:"round",strokeWidth:"4",children:_.jsx("path",{d:"M175.568 218.694c-2.494 1.582-5.534 2.207-8.563 1.508-3.029-.7-5.487-2.594-7.035-5.11M143.981 218.694c2.494 1.582 5.534 2.207 8.563 1.508 3.03-.7 5.488-2.594 7.036-5.11"})})]})})}const{useState:ta,useRef:Og,useCallback:rc,useEffect:fD}=tn,ew=0,dD=()=>{},hD=e=>({apiConfig:ps(e)});function pD({dispatch:e}){const[t,n]=ta(""),[r,o]=ta(""),[i,s]=ta(""),[a,l]=ta(""),u=Og(!1),c=Og(null),f=rc(y=>{u.current=!0,l("");const E=y.target,{name:g}=E,h=E.value;switch(g){case"baseURL":n(h);break;case"secret":o(h);break;case"metaLabel":s(h);break;default:throw new Error(`unknown input name ${g}`)}},[]),d=rc(()=>{mD({baseURL:t,secret:r}).then(y=>{y[0]!==ew?l(y[1]):e(_I({baseURL:t,secret:r,metaLabel:i}))})},[t,r,i,e]),m=rc(y=>{y.target instanceof Element&&(!y.target.tagName||y.target.tagName.toUpperCase()!=="INPUT")||y.key==="Enter"&&d()},[d]),v=async()=>{(await fetch("/")).json().then(E=>{E.hello==="clash"&&n(window.location.origin)},dD)};return fD(()=>{v()},[]),_.jsxs("div",{className:yn.root,ref:c,onKeyDown:m,children:[_.jsx("div",{className:yn.header,children:_.jsx("div",{className:yn.icon,children:_.jsx(Ph,{width:160,height:160,stroke:"var(--stroke)"})})}),_.jsxs("div",{className:yn.body,children:[_.jsxs("div",{className:yn.hostnamePort,children:[_.jsx(nc,{id:"baseURL",name:"baseURL",label:"API Base URL",type:"text",placeholder:"http://127.0.0.1:9090",value:t,onChange:f}),_.jsx(nc,{id:"secret",name:"secret",label:"Secret(optional)",value:r,type:"text",onChange:f})]}),a?_.jsx("div",{className:yn.error,children:a}):null,_.jsx("div",{className:yn.label,children:_.jsx(nc,{id:"metaLabel",name:"metaLabel",label:"Label(optional)",type:"text",placeholder:"",value:i,onChange:f})})]}),_.jsx("div",{className:yn.footer,children:_.jsx(oD,{label:"Add",onClick:d})}),_.jsx("div",{style:{height:20}}),_.jsx(IM,{})]})}const tw=Jn(hD)(pD);async function mD(e){try{new URL(e.baseURL)}catch{if(e.baseURL){const n=e.baseURL.substring(0,7);if(n!=="http://"&&n!=="https:/")return[1,"Must starts with http:// or https://"]}return[1,"Invalid URL"]}try{const t=await IS(e);return t.status>399?[1,t.statusText]:[ew]}catch{return[1,"Failed to connect"]}}/** - * @reach/utils v0.18.0 - * - * Copyright (c) 2018-2022, React Training LLC - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function nw(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Oe(e,t){return n=>{if(e&&e(n),!n.defaultPrevented)return t(n)}}function Lg(e){return typeof e=="boolean"}function fl(e){return!!(e&&{}.toString.call(e)=="[object Function]")}function gD(e){return typeof e=="string"}function vD(e,t){if(e!=null)if(fl(e))e(t);else try{e.current=t}catch{throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}function Nr(...e){return S.useCallback(t=>{for(let n of e)vD(n,t)},e)}function Kn(e){return nw()?e?e.ownerDocument:document:null}function yD(e,t){let n=S.createContext(t);function r(i){let{children:s,...a}=i,l=S.useMemo(()=>a,Object.values(a));return S.createElement(n.Provider,{value:l},s)}function o(i){let s=S.useContext(n);if(s)return s;if(t)return t;throw Error(`${i} must be rendered inside of a ${e} component.`)}return n.displayName=`${e}Context`,r.displayName=`${e}Provider`,[r,o]}function SD(e){let t=Kn(e),n=t.defaultView||window;return t?{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}:{width:0,height:0}}function ya(e){return"which"in e?e.which===3:"button"in e?e.button===2:!1}function Eo(...e){return e.filter(t=>t!=null).join("--")}function Ah(){}function rw(){let[,e]=S.useState(Object.create(null));return S.useCallback(()=>{e(Object.create(null))},[])}var oo=nw()?S.useLayoutEffect:S.useEffect;function oc(e){const t=S.useRef(null);return S.useEffect(()=>{t.current=e},[e]),t.current}function wD(e,t){let[n,r]=S.useState(t),o=S.useCallback(i=>{e.current=i,r(i)},[]);return[n,o]}var _D=({children:e,type:t="reach-portal",containerRef:n})=>{let r=S.useRef(null),o=S.useRef(null),i=rw();return S.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),oo(()=>{if(!r.current)return;let s=r.current.ownerDocument,a=(n==null?void 0:n.current)||s.body;return o.current=s==null?void 0:s.createElement(t),a.appendChild(o.current),i(),()=>{o.current&&a&&a.removeChild(o.current)}},[t,i,n]),o.current?Ll.createPortal(e,o.current):S.createElement("span",{ref:r})},Ih=({unstable_skipInitialRender:e,...t})=>{let[n,r]=S.useState(!1);return S.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:S.createElement(_D,{...t})};Ih.displayName="Portal";var ED=["bottom","height","left","right","top","width"],xD=function(t,n){return t===void 0&&(t={}),n===void 0&&(n={}),ED.some(function(r){return t[r]!==n[r]})},Sn=new Map,ow,CD=function e(){var t=[];Sn.forEach(function(n,r){var o=r.getBoundingClientRect();xD(o,n.rect)&&(n.rect=o,t.push(n))}),t.forEach(function(n){n.callbacks.forEach(function(r){return r(n.rect)})}),ow=window.requestAnimationFrame(e)};function bD(e,t){return{observe:function(){var r=Sn.size===0;Sn.has(e)?Sn.get(e).callbacks.push(t):Sn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]}),r&&CD()},unobserve:function(){var r=Sn.get(e);if(r){var o=r.callbacks.indexOf(t);o>=0&&r.callbacks.splice(o,1),r.callbacks.length||Sn.delete(e),Sn.size||cancelAnimationFrame(ow)}}}}function dl(e,t,n){let r,o;Lg(t)?r=t:(r=(t==null?void 0:t.observe)??!0,o=t==null?void 0:t.onChange),fl(n)&&(o=n),S.useEffect(()=>{Lg(t)&&console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")},[t]),S.useEffect(()=>{fl(n)&&console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")},[n]);let[i,s]=S.useState(e.current),a=S.useRef(!1),l=S.useRef(!1),[u,c]=S.useState(null),f=S.useRef(o);return oo(()=>{f.current=o,e.current!==i&&s(e.current)}),oo(()=>{i&&!a.current&&(a.current=!0,c(i.getBoundingClientRect()))},[i]),oo(()=>{if(!r)return;let d=i;if(l.current||(l.current=!0,d=e.current),!d){console.warn("You need to place the ref");return}let m=bD(d,v=>{var y;(y=f.current)==null||y.call(f,v),c(v)});return m.observe(),()=>{m.unobserve()}},[r,i,e]),u}/*! -* tabbable 5.3.3 -* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE -*/var RD=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],zf=RD.join(","),iw=typeof Element>"u",Hi=iw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vf=!iw&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},kD=function(t,n,r){var o=Array.prototype.slice.apply(t.querySelectorAll(zf));return n&&Hi.call(t,zf)&&o.unshift(t),o=o.filter(r),o},TD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else{var c=Hi.call(s,zf);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(f&&d){var m=e(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scope:s,candidates:m})}else i.unshift.apply(i,s.children)}}return o},sw=function(t,n){return t.tabIndex<0&&(n||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},ND=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},aw=function(t){return t.tagName==="INPUT"},OD=function(t){return aw(t)&&t.type==="hidden"},LD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},PD=function(t,n){for(var r=0;rsummary:first-of-type"),s=i?t.parentElement:t;if(Hi.call(s,"details:not([open]) *"))return!0;var a=Vf(t).host,l=(a==null?void 0:a.ownerDocument.contains(a))||t.ownerDocument.contains(t);if(!r||r==="full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,f=Vf(t);if(c&&!c.shadowRoot&&o(c)===!0)return Pg(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=u}if(l)return!t.getClientRects().length}else if(r==="non-zero-area")return Pg(t);return!1},$D=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},jD=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scope,a=s?o.scope:o,l=sw(a,s),u=s?e(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(ND).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},on=function(t,n){n=n||{};var r;return n.getShadowRoot?r=TD([t],n.includeContainer,{filter:Ag.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:FD}):r=kD(t,n.includeContainer,Ag.bind(null,n)),jD(r)},Mh=S.forwardRef(function({unstable_skipInitialPortalRender:t,...n},r){return S.createElement(Ih,{unstable_skipInitialRender:t},S.createElement(lw,{ref:r,...n}))});Mh.displayName="Popover";var lw=S.forwardRef(function({as:t="div",targetRef:n,position:r=BD,unstable_observableRefs:o=[],...i},s){const a=S.useRef(null),l=dl(a,{observe:!i.hidden}),u=dl(n,{observe:!0}),c=Nr(a,s);return HD(n,a),S.createElement(t,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...zD(r,u,l,...o),...i.style}})});lw.displayName="PopoverImpl";function zD(e,t,n,...r){return n?e(t,n,...r.map(o=>o.current)):{visibility:"hidden"}}function VD(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var BD=(e,t)=>{if(!e||!t)return{};const{directionRight:n,directionUp:r}=WD(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...VD(e,t,r)}};function WD(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth(n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}),[]);function o(){const h=on(n),p=h&&e.current?h.indexOf(e.current):-1,w=h&&h[p+1];return t.current&&t.current.contains(w||null)?!1:w}function i(){return e.current?e.current===n.activeElement:!1}function s(h){const p=t.current&&on(t.current);p&&p[0]&&(h.preventDefault(),p[0].focus())}function a(){if(t.current?t.current.contains(n.activeElement||null):!1){const p=t.current&&on(t.current);return!!(p&&p[p.length-1]===n.activeElement)}return!1}function l(h){const p=o();p&&(h.preventDefault(),p.focus())}function u(h){if(!h.shiftKey)return;const p=o();return h.target===p}function c(h){const p=t.current&&on(t.current),w=p&&p[p.length-1];w&&(h.preventDefault(),w.focus())}function f(h){const p=t.current&&on(t.current);return p?p.length===0?!1:h.target===p[0]:!1}function d(h){var p;h.preventDefault(),(p=e.current)==null||p.focus()}function m(h){const p=t.current?on(n).filter(w=>!t.current.contains(w)):null;return p?h.target===p[p.length-1]:!1}function v(h){return h.target===on(n)[0]}let y=[];function E(){const h=t.current&&on(t.current);h&&(h.forEach(p=>{y.push([p,p.tabIndex]),p.tabIndex=-1}),n.addEventListener("focusin",g))}function g(){n.removeEventListener("focusin",g),y.forEach(([h,p])=>{h.tabIndex=p})}}var ic=!1,KD=0;function Ig(){return++KD}var Mg=tn["useId".toString()];function uw(e){if(Mg!==void 0){let o=Mg();return e??o}let t=e??(ic?Ig():null),[n,r]=S.useState(t);return oo(()=>{n===null&&r(Ig())},[]),S.useEffect(()=>{ic===!1&&(ic=!0)},[]),e??n??void 0}function QD(e,t={}){const n=[];let r=S.createContext({descendants:n,registerDescendant:()=>Ah,...t});return r.displayName=e,r}function qD(e,t,n){let r=rw(),{registerDescendant:o,descendants:i}=S.useContext(t),s=n??i.findIndex(a=>a.element===e.element);return oo(()=>(e.element||r(),o({...e,index:s})),[e,r,s,o,...Object.values(e)]),s}function GD(){return S.useState([])}function YD(e){return S.useContext(e).descendants}function XD({context:e,children:t,items:n,set:r}){let o=S.useCallback(({element:i,index:s,...a})=>i?(r(l=>{if(s!=null&&s!==-1)return Dg(l,{element:i,index:s,...a},s);if(l.length===0)return[{...a,element:i,index:0}];if(l.find(f=>f.element===i))return console.warn(`[reach-ui]: \`useDescendant\` was called with an element that was already registered. - -If you are using the \`@reach/descendants\` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app. - -If you are using another \`reach-ui\` package, this is probably our bug! - -To report a bug, open a new issue: - - https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md - -IMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.`),e3(l);let u=ZD(l,i),c;return u===-1?c=[...l,{...a,element:i,index:l.length}]:c=Dg(l,{...a,element:i,index:u},u),c}),()=>{i&&r(l=>l.filter(u=>i!==u.element))}):Ah,[]);return S.createElement(e.Provider,{value:S.useMemo(()=>({descendants:n,registerDescendant:o}),[n,o])},t)}function JD(e,t){let{descendants:n}=S.useContext(e),{callback:r,currentIndex:o,filter:i,key:s="index",orientation:a="vertical",rotate:l=!0,rtl:u=!1}=t;return function(f){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(f.key))return;let d=o??-1,m=i?n.filter(i):n;if(!m.length)return;let v=m.findIndex(p=>p.index===o);function y(){return d===h().index?l?g():m[v]:m[(v+1)%m.length]}function E(){return d===g().index?l?h():m[v]:m[(v-1+m.length)%m.length]}function g(){return m[0]}function h(){return m[m.length-1]}switch(f.key){case"ArrowDown":if(a==="vertical"||a==="both"){f.preventDefault();let k=y();r(s==="option"?k:k[s])}break;case"ArrowUp":if(a==="vertical"||a==="both"){f.preventDefault();let k=E();r(s==="option"?k:k[s])}break;case"ArrowLeft":if(a==="horizontal"||a==="both"){f.preventDefault();let k=(u?y:E)();r(s==="option"?k:k[s])}break;case"ArrowRight":if(a==="horizontal"||a==="both"){f.preventDefault();let k=(u?E:y)();r(s==="option"?k:k[s])}break;case"PageUp":f.preventDefault();let p=(f.ctrlKey?E:g)();r(s==="option"?p:p[s]);break;case"Home":f.preventDefault();let w=g();r(s==="option"?w:w[s]);break;case"PageDown":f.preventDefault();let R=(f.ctrlKey?y:h)();r(s==="option"?R:R[s]);break;case"End":f.preventDefault();let x=h();r(s==="option"?x:x[s]);break}}}function cw(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ZD(e,t){if(!t||!e.length)return-1;let n=e.length;for(;n--;){let r=e[n].element;if(r&&cw(r,t))return n+1}return-1}function Dg(e,t,n){return n==null||!(n in e)?[...e,t]:[...e.slice(0,n),t,...e.slice(n)]}function e3(e){return e.sort((t,n)=>!t.element||!n.element?0:cw(t.element,n.element)?-1:1).map((t,n)=>({...t,index:n}))}var fw="CLEAR_SELECTION_INDEX",Dh="CLICK_MENU_ITEM",Ki="CLOSE_MENU",t3="OPEN_MENU_AT_FIRST_ITEM",Bf="OPEN_MENU_AT_INDEX",dw="OPEN_MENU_CLEARED",Wf="SEARCH_FOR_ITEM",Pn="SELECT_ITEM_AT_INDEX",Hf="SET_BUTTON_ID",au=QD("DropdownDescendantContext"),[n3,ms]=yD("Dropdown"),r3={triggerId:null,isExpanded:!1,typeaheadQuery:"",selectionIndex:-1},hw=({id:e,children:t})=>{let n=S.useRef(null),r=S.useRef(null),o=S.useRef(null),[i,s]=GD(),a=uw(e),l=e||Eo("menu",a),u=Eo("menu-button",l),[c,f]=S.useReducer(c3,{...r3,triggerId:u}),d=S.useRef(!1),m=S.useRef([]),v=S.useRef(!1),y=S.useRef({x:0,y:0});return S.useEffect(()=>{c.isExpanded?(window.__REACH_DISABLE_TOOLTIPS=!0,window.requestAnimationFrame(()=>{hl(r.current)})):window.__REACH_DISABLE_TOOLTIPS=!1},[c.isExpanded]),S.createElement(XD,{context:au,items:i,set:s},S.createElement(n3,{dispatch:f,dropdownId:l,dropdownRef:r,mouseDownStartPosRef:y,popoverRef:o,readyToSelect:v,selectCallbacks:m,state:c,triggerClickedRef:d,triggerRef:n},fl(t)?t({isExpanded:c.isExpanded,isOpen:c.isExpanded}):t))};hw.displayName="DropdownProvider";function pw({onKeyDown:e,onMouseDown:t,id:n,ref:r,...o}){let{dispatch:i,dropdownId:s,mouseDownStartPosRef:a,triggerClickedRef:l,triggerRef:u,state:{triggerId:c,isExpanded:f}}=ms("useDropdownTrigger"),d=Nr(u,r),m=Sw(),v=S.useMemo(()=>m.findIndex(g=>!g.disabled),[m]);S.useEffect(()=>{n!=null&&n!==c&&i({type:Hf,payload:n})},[c,i,n]),S.useEffect(()=>{n==null&&i({type:Hf,payload:Eo("menu-button",s)})},[s,i,n]);function y(g){switch(g.key){case"ArrowDown":case"ArrowUp":g.preventDefault(),i({type:Bf,payload:{index:v}});break;case"Enter":case" ":i({type:Bf,payload:{index:v}});break}}function E(g){ya(g.nativeEvent)||(a.current={x:g.clientX,y:g.clientY},f||(l.current=!0),i(f?{type:Ki}:{type:dw}))}return{data:{isExpanded:f,controls:s},props:{...o,ref:d,id:c||void 0,onKeyDown:Oe(e,y),onMouseDown:Oe(t,E),type:"button"}}}var o3=S.forwardRef(({as:e="button",...t},n)=>{let{props:r}=pw({...t,ref:n});return S.createElement(e,{"data-reach-dropdown-trigger":"",...r})});o3.displayName="DropdownTrigger";function mw({index:e,isLink:t=!1,onClick:n,onDragStart:r,onMouseDown:o,onMouseEnter:i,onMouseLeave:s,onMouseMove:a,onMouseUp:l,onSelect:u,disabled:c,onFocus:f,valueText:d,ref:m,...v}){let{dispatch:y,dropdownRef:E,mouseDownStartPosRef:g,readyToSelect:h,selectCallbacks:p,triggerRef:w,state:{selectionIndex:R,isExpanded:x}}=ms("useDropdownItem"),k=S.useRef(null),[L,G]=S.useState(d||""),$=S.useCallback(H=>{!d&&(H!=null&&H.textContent)&&G(H.textContent)},[d]),oe=S.useRef(!1),[de,se]=wD(k,null),W=S.useMemo(()=>({element:de,key:L,disabled:c,isLink:t}),[c,de,t,L]),U=qD(W,au,e),X=U===R&&!c,T=Nr(m,se,$);p.current[U]=u;function O(){hl(w.current),u&&u(),y({type:Dh})}function B(H){ya(H.nativeEvent)||t&&(c?H.preventDefault():O())}function M(H){t&&H.preventDefault()}function F(H){ya(H.nativeEvent)||(t?oe.current=!0:H.preventDefault())}function b(H){let ne=Kn(E.current);!X&&U!=null&&!c&&(E!=null&&E.current&&E.current!==ne.activeElement&&k.current!==ne.activeElement&&E.current.focus(),y({type:Pn,payload:{index:U}}))}function P(H){y({type:fw})}function D(H){if(!h.current){let ne=8,Y=Math.abs(H.clientX-g.current.x),ge=Math.abs(H.clientY-g.current.y);(Y>ne||ge>ne)&&(h.current=!0)}!X&&U!=null&&!c&&y({type:Pn,payload:{index:U,dropdownRef:E}})}function J(){h.current=!0,!X&&U!=null&&!c&&y({type:Pn,payload:{index:U}})}function V(H){if(!ya(H.nativeEvent)){if(!h.current){h.current=!0;return}t?oe.current?oe.current=!1:k.current&&k.current.click():c||O()}}return S.useEffect(()=>{if(x){let H=window.setTimeout(()=>{h.current=!0},400);return()=>{window.clearTimeout(H)}}else h.current=!1},[x,h]),S.useEffect(()=>{let H=Kn(k.current);return H.addEventListener("mouseup",ne),()=>{H.removeEventListener("mouseup",ne)};function ne(){oe.current=!1}},[]),{data:{disabled:c},props:{id:yw(U),tabIndex:-1,...v,ref:T,"data-disabled":c?"":void 0,"data-selected":X?"":void 0,"data-valuetext":L,onClick:Oe(n,B),onDragStart:Oe(r,M),onMouseDown:Oe(o,F),onMouseEnter:Oe(i,b),onMouseLeave:Oe(s,P),onMouseMove:Oe(a,D),onFocus:Oe(f,J),onMouseUp:Oe(l,V)}}}var i3=S.forwardRef(({as:e="div",...t},n)=>{let{props:r}=mw({...t,ref:n});return S.createElement(e,{"data-reach-dropdown-item":"",...r})});i3.displayName="DropdownItem";function gw({id:e,onKeyDown:t,ref:n,...r}){let{dispatch:o,triggerRef:i,dropdownRef:s,selectCallbacks:a,dropdownId:l,state:{isExpanded:u,triggerId:c,selectionIndex:f,typeaheadQuery:d}}=ms("useDropdownItems"),m=Sw(),v=Nr(s,n);S.useEffect(()=>{let p=l3(m,d);d&&p!=null&&o({type:Pn,payload:{index:p,dropdownRef:s}});let w=window.setTimeout(()=>d&&o({type:Wf,payload:""}),1e3);return()=>window.clearTimeout(w)},[o,m,d,s]);let y=oc(m.length),E=oc(m[f]),g=oc(f);S.useEffect(()=>{f>m.length-1?o({type:Pn,payload:{index:m.length-1,dropdownRef:s}}):y!==m.length&&f>-1&&E&&g===f&&m[f]!==E&&o({type:Pn,payload:{index:m.findIndex(p=>p.key===(E==null?void 0:E.key)),dropdownRef:s}})},[s,o,m,y,E,g,f]);let h=Oe(function(w){let{key:R}=w;if(u)switch(R){case"Enter":case" ":let x=m.find(k=>k.index===f);x&&!x.disabled&&(w.preventDefault(),x.isLink&&x.element?x.element.click():(hl(i.current),a.current[x.index]&&a.current[x.index](),o({type:Dh})));break;case"Escape":hl(i.current),o({type:Ki});break;case"Tab":w.preventDefault();break;default:if(gD(R)&&R.length===1){let k=d+R.toLowerCase();o({type:Wf,payload:k})}break}},JD(au,{currentIndex:f,orientation:"vertical",rotate:!1,filter:p=>!p.disabled,callback:p=>{o({type:Pn,payload:{index:p,dropdownRef:s}})},key:"index"}));return{data:{activeDescendant:yw(f)||void 0,triggerId:c},props:{tabIndex:-1,...r,ref:v,id:l,onKeyDown:Oe(t,h)}}}var s3=S.forwardRef(({as:e="div",...t},n)=>{let{props:r}=gw({...t,ref:n});return S.createElement(e,{"data-reach-dropdown-items":"",...r})});s3.displayName="DropdownItems";function vw({onBlur:e,portal:t=!0,position:n,ref:r,...o}){let{triggerRef:i,triggerClickedRef:s,dispatch:a,dropdownRef:l,popoverRef:u,state:{isExpanded:c}}=ms("useDropdownPopover"),f=Nr(u,r);return S.useEffect(()=>{if(!c)return;let d=Kn(u.current);function m(v){s.current?s.current=!1:u3(u.current,v.target)||a({type:Ki})}return d.addEventListener("mousedown",m),()=>{d.removeEventListener("mousedown",m)}},[s,i,a,l,u,c]),{data:{portal:t,position:n,targetRef:i,isExpanded:c},props:{ref:f,hidden:!c,onBlur:Oe(e,d=>{d.currentTarget.contains(d.relatedTarget)||a({type:Ki})}),...o}}}var a3=S.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=vw({...t,ref:n}),a={"data-reach-dropdown-popover":""};return r?S.createElement(Mh,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):S.createElement(e,{...s,...a})});a3.displayName="DropdownPopover";function l3(e,t=""){if(!t)return null;let n=e.find(r=>{var o,i,s;return r.disabled?!1:(s=(i=(o=r.element)==null?void 0:o.dataset)==null?void 0:i.valuetext)==null?void 0:s.toLowerCase().startsWith(t)});return n?e.indexOf(n):null}function yw(e){let{dropdownId:t}=ms("useItemId");return e!=null&&e>-1?Eo(`option-${e}`,t):void 0}function hl(e){e&&e.focus()}function u3(e,t){return!!(e&&e.contains(t))}function c3(e,t={}){switch(t.type){case Dh:return{...e,isExpanded:!1,selectionIndex:-1};case Ki:return{...e,isExpanded:!1,selectionIndex:-1};case t3:return{...e,isExpanded:!0,selectionIndex:0};case Bf:return{...e,isExpanded:!0,selectionIndex:t.payload.index};case dw:return{...e,isExpanded:!0,selectionIndex:-1};case Pn:{let{dropdownRef:n={current:null}}=t.payload;if(t.payload.index>=0&&t.payload.index!==e.selectionIndex){if(n.current){let r=Kn(n.current);n.current!==(r==null?void 0:r.activeElement)&&n.current.focus()}return{...e,selectionIndex:t.payload.max!=null?Math.min(Math.max(t.payload.index,0),t.payload.max):Math.max(t.payload.index,0)}}return e}case fw:return{...e,selectionIndex:-1};case Hf:return{...e,triggerId:t.payload};case Wf:return typeof t.payload<"u"?{...e,typeaheadQuery:t.payload}:e;default:return e}}function Sw(){return YD(au)}var ww={exports:{}},me={};/** @license React v17.0.2 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var lu=60103,uu=60106,gs=60107,vs=60108,ys=60114,Ss=60109,ws=60110,_s=60112,Es=60113,$h=60120,xs=60115,Cs=60116,_w=60121,Ew=60122,xw=60117,Cw=60129,bw=60131;if(typeof Symbol=="function"&&Symbol.for){var je=Symbol.for;lu=je("react.element"),uu=je("react.portal"),gs=je("react.fragment"),vs=je("react.strict_mode"),ys=je("react.profiler"),Ss=je("react.provider"),ws=je("react.context"),_s=je("react.forward_ref"),Es=je("react.suspense"),$h=je("react.suspense_list"),xs=je("react.memo"),Cs=je("react.lazy"),_w=je("react.block"),Ew=je("react.server.block"),xw=je("react.fundamental"),Cw=je("react.debug_trace_mode"),bw=je("react.legacy_hidden")}function Kt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case lu:switch(e=e.type,e){case gs:case ys:case vs:case Es:case $h:return e;default:switch(e=e&&e.$$typeof,e){case ws:case _s:case Cs:case xs:case Ss:return e;default:return t}}case uu:return t}}}var f3=Ss,d3=lu,h3=_s,p3=gs,m3=Cs,g3=xs,v3=uu,y3=ys,S3=vs,w3=Es;me.ContextConsumer=ws;me.ContextProvider=f3;me.Element=d3;me.ForwardRef=h3;me.Fragment=p3;me.Lazy=m3;me.Memo=g3;me.Portal=v3;me.Profiler=y3;me.StrictMode=S3;me.Suspense=w3;me.isAsyncMode=function(){return!1};me.isConcurrentMode=function(){return!1};me.isContextConsumer=function(e){return Kt(e)===ws};me.isContextProvider=function(e){return Kt(e)===Ss};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===lu};me.isForwardRef=function(e){return Kt(e)===_s};me.isFragment=function(e){return Kt(e)===gs};me.isLazy=function(e){return Kt(e)===Cs};me.isMemo=function(e){return Kt(e)===xs};me.isPortal=function(e){return Kt(e)===uu};me.isProfiler=function(e){return Kt(e)===ys};me.isStrictMode=function(e){return Kt(e)===vs};me.isSuspense=function(e){return Kt(e)===Es};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gs||e===ys||e===Cw||e===vs||e===Es||e===$h||e===bw||typeof e=="object"&&e!==null&&(e.$$typeof===Cs||e.$$typeof===xs||e.$$typeof===Ss||e.$$typeof===ws||e.$$typeof===_s||e.$$typeof===xw||e.$$typeof===_w||e[0]===Ew)};me.typeOf=Kt;ww.exports=me;var _3=ww.exports,Rw=S.forwardRef(({as:e=S.Fragment,id:t,children:n,...r},o)=>{let s=S.useMemo(()=>{try{return _3.isFragment(S.createElement(e,null))}catch{return!1}},[e])?{}:{ref:o,id:t,"data-reach-menu":"",...r};return S.createElement(e,{...s},S.createElement(hw,{id:t,children:n}))});Rw.displayName="Menu";var kw=S.forwardRef(({as:e="button",...t},n)=>{let{data:{isExpanded:r,controls:o},props:i}=pw({...t,ref:n});return S.createElement(e,{"aria-expanded":r?!0:void 0,"aria-haspopup":!0,"aria-controls":o,...i,"data-reach-menu-button":""})});kw.displayName="MenuButton";var Uh=S.forwardRef(({as:e="div",...t},n)=>{let{data:{disabled:r},props:o}=mw({...t,ref:n});return S.createElement(e,{role:"menuitem",...o,"aria-disabled":r||void 0,"data-reach-menu-item":""})});Uh.displayName="MenuItemImpl";var Tw=S.forwardRef(({as:e="div",...t},n)=>S.createElement(Uh,{...t,ref:n,as:e}));Tw.displayName="MenuItem";var Nw=S.forwardRef(({as:e="div",...t},n)=>{let{data:{activeDescendant:r,triggerId:o},props:i}=gw({...t,ref:n});return S.createElement(e,{"aria-activedescendant":r,"aria-labelledby":o||void 0,role:"menu",...i,"data-reach-menu-items":""})});Nw.displayName="MenuItems";var E3=S.forwardRef(({as:e="a",component:t,onSelect:n,...r},o)=>(S.useEffect(()=>{t&&console.warn("[@reach/menu-button]: Please use the `as` prop instead of `component`")},[t]),S.createElement(Uh,{...r,ref:o,"data-reach-menu-link":"",as:e,isLink:!0,onSelect:n||Ah})));E3.displayName="MenuLink";var Ow=S.forwardRef(({portal:e=!0,...t},n)=>S.createElement(Lw,{portal:e},S.createElement(Nw,{...t,ref:n,"data-reach-menu-list":""})));Ow.displayName="MenuList";var Lw=S.forwardRef(({as:e="div",...t},n)=>{let{data:{portal:r,targetRef:o,position:i},props:s}=vw({...t,ref:n}),a={"data-reach-menu-popover":""};return r?S.createElement(Mh,{...s,...a,as:e,targetRef:o,position:i,unstable_skipInitialPortalRender:!0}):S.createElement(e,{...s,...a})});Lw.displayName="MenuPopover";var Pw=S.forwardRef(function({as:t="span",style:n={},...r},o){return S.createElement(t,{ref:o,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal",...n},...r})});Pw.displayName="VisuallyHidden";var x3=100,C3=500,Kf={initial:"IDLE",states:{IDLE:{enter:sc,on:{MOUSE_ENTER:"FOCUSED",FOCUS:"VISIBLE"}},FOCUSED:{enter:k3,leave:T3,on:{MOUSE_MOVE:"FOCUSED",MOUSE_LEAVE:"IDLE",MOUSE_DOWN:"DISMISSED",BLUR:"IDLE",REST:"VISIBLE"}},VISIBLE:{on:{FOCUS:"FOCUSED",MOUSE_ENTER:"FOCUSED",MOUSE_LEAVE:"LEAVING_VISIBLE",BLUR:"LEAVING_VISIBLE",MOUSE_DOWN:"DISMISSED",SELECT_WITH_KEYBOARD:"DISMISSED",GLOBAL_MOUSE_MOVE:"LEAVING_VISIBLE"}},LEAVING_VISIBLE:{enter:N3,leave:()=>{O3(),sc()},on:{MOUSE_ENTER:"VISIBLE",FOCUS:"VISIBLE",TIME_COMPLETE:"IDLE"}},DISMISSED:{leave:()=>{sc()},on:{MOUSE_LEAVE:"IDLE",BLUR:"IDLE"}}}},Rt={value:Kf.initial,context:{id:null}},Sa=[];function b3(e){return Sa.push(e),()=>{Sa.splice(Sa.indexOf(e),1)}}function R3(){Sa.forEach(e=>e(Rt))}var Qf;function k3(){window.clearTimeout(Qf),Qf=window.setTimeout(()=>{Dt({type:"REST"})},x3)}function T3(){window.clearTimeout(Qf)}var qf;function N3(){window.clearTimeout(qf),qf=window.setTimeout(()=>Dt({type:"TIME_COMPLETE"}),C3)}function O3(){window.clearTimeout(qf)}function sc(){Rt.context.id=null}function L3({id:e,onPointerEnter:t,onPointerMove:n,onPointerLeave:r,onPointerDown:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onMouseDown:l,onFocus:u,onBlur:c,onKeyDown:f,disabled:d,ref:m,DEBUG_STYLE:v}={}){let y=String(uw(e)),[E,g]=S.useState(v?!0:$g(y,!0)),h=S.useRef(null),p=Nr(m,h),w=dl(h,{observe:E});S.useEffect(()=>b3(()=>{g($g(y))}),[y]),S.useEffect(()=>{let X=Kn(h.current);function T(O){(O.key==="Escape"||O.key==="Esc")&&Rt.value==="VISIBLE"&&Dt({type:"SELECT_WITH_KEYBOARD"})}return X.addEventListener("keydown",T),()=>X.removeEventListener("keydown",T)},[]),M3({disabled:d,isVisible:E,ref:h});function R(X,T){return typeof window<"u"&&"PointerEvent"in window?X:Oe(X,T)}function x(X){return function(O){O.pointerType==="mouse"&&X(O)}}function k(){Dt({type:"MOUSE_ENTER",id:y})}function L(){Dt({type:"MOUSE_MOVE",id:y})}function G(){Dt({type:"MOUSE_LEAVE"})}function $(){Rt.context.id===y&&Dt({type:"MOUSE_DOWN"})}function oe(){window.__REACH_DISABLE_TOOLTIPS||Dt({type:"FOCUS",id:y})}function de(){Rt.context.id===y&&Dt({type:"BLUR"})}function se(X){(X.key==="Enter"||X.key===" ")&&Dt({type:"SELECT_WITH_KEYBOARD"})}return[{"aria-describedby":E?Eo("tooltip",y):void 0,"data-state":E?"tooltip-visible":"tooltip-hidden","data-reach-tooltip-trigger":"",ref:p,onPointerEnter:Oe(t,x(k)),onPointerMove:Oe(n,x(L)),onPointerLeave:Oe(r,x(G)),onPointerDown:Oe(o,x($)),onMouseEnter:R(i,k),onMouseMove:R(s,L),onMouseLeave:R(a,G),onMouseDown:R(l,$),onFocus:Oe(u,oe),onBlur:Oe(c,de),onKeyDown:Oe(f,se)},{id:y,triggerRect:w,isVisible:E},E]}var Fh=S.forwardRef(function({children:e,label:t,ariaLabel:n,id:r,DEBUG_STYLE:o,...i},s){let a=S.Children.only(e);S.useEffect(()=>{n&&console.warn("The `ariaLabel prop is deprecated and will be removed from @reach/tooltip in a future version of Reach UI. Please use `aria-label` instead.")},[n]);let[l,u]=L3({id:r,onPointerEnter:a.props.onPointerEnter,onPointerMove:a.props.onPointerMove,onPointerLeave:a.props.onPointerLeave,onPointerDown:a.props.onPointerDown,onMouseEnter:a.props.onMouseEnter,onMouseMove:a.props.onMouseMove,onMouseLeave:a.props.onMouseLeave,onMouseDown:a.props.onMouseDown,onFocus:a.props.onFocus,onBlur:a.props.onBlur,onKeyDown:a.props.onKeyDown,disabled:a.props.disabled,ref:a.ref,DEBUG_STYLE:o});return S.createElement(S.Fragment,null,S.cloneElement(a,l),S.createElement(Aw,{ref:s,label:t,"aria-label":n,...u,...i}))});Fh.displayName="Tooltip";var Aw=S.forwardRef(function({label:t,ariaLabel:n,isVisible:r,id:o,...i},s){return r?S.createElement(Ih,null,S.createElement(Iw,{ref:s,label:t,"aria-label":n,isVisible:r,...i,id:Eo("tooltip",String(o))})):null});Aw.displayName="TooltipPopup";var Iw=S.forwardRef(function({ariaLabel:t,"aria-label":n,as:r="div",id:o,isVisible:i,label:s,position:a=I3,style:l,triggerRect:u,...c},f){let d=(n||t)!=null,m=S.useRef(null),v=Nr(f,m),y=dl(m,{observe:i});return S.createElement(S.Fragment,null,S.createElement(r,{role:d?void 0:"tooltip",...c,ref:v,"data-reach-tooltip":"",id:d?void 0:o,style:{...l,...P3(a,u,y)}},s),d&&S.createElement(Pw,{role:"tooltip",id:o},n||t))});Iw.displayName="TooltipContent";function P3(e,t,n){return n?e(t,n):{visibility:"hidden"}}var A3=8,I3=(e,t,n=A3)=>{let{width:r,height:o}=SD();if(!e||!t)return{};let i={top:e.top-t.height<0,right:r{if(!(typeof window<"u"&&"PointerEvent"in window)||!e||!t)return;let r=Kn(n.current);function o(i){t&&(i.target instanceof Element&&i.target.closest("[data-reach-tooltip-trigger][data-state='tooltip-visible']")||Dt({type:"GLOBAL_MOUSE_MOVE"}))}return r.addEventListener("mousemove",o),()=>{r.removeEventListener("mousemove",o)}},[e,t,n])}function Dt(e){let{value:t,context:n,changed:r}=D3(Rt,e);r&&(Rt={value:t,context:n},R3())}function D3(e,t){let n=Kf.states[e.value],r=n&&n.on&&n.on[t.type];if(!r)return{...e,changed:!1};n&&n.leave&&n.leave(e.context,t);const{type:o,...i}=t;let s={...Rt.context,...i},a=typeof r=="string"?r:r.target,l=Kf.states[a];return l&&l.enter&&l.enter(e.context,t),{value:a,context:s,changed:!0}}function $g(e,t){return Rt.context.id===e&&(t?Rt.value==="VISIBLE":Rt.value==="VISIBLE"||Rt.value==="LEAVING_VISIBLE")}function $3(e){let t={};const n={},r={};function o(l="default"){return n[l]=e(l).then(u=>{delete n[l],t[l]=u}).catch(u=>{r[l]=u}),n[l]}function i(l="default"){t[l]!==void 0||n[l]||o(l)}function s(l="default"){if(t[l]!==void 0)return t[l];throw r[l]?r[l]:n[l]?n[l]:o(l)}function a(l){l?delete t[l]:t={}}return{preload:i,read:s,clear:a}}const jh=$3(()=>en(()=>import("./index-346cd228.js"),[],import.meta.url)),U3="_checkWrapper_1nrct_45",F3="_active_1nrct_51",Ug={checkWrapper:U3,active:F3};function j3({theme:e,dispatch:t}){const{t:n}=Yi(),r=S.useMemo(()=>{switch(e){case"dark":return _.jsx(Fg,{});case"auto":return _.jsx(V3,{});case"light":return _.jsx(z3,{});default:return console.assert(!1,"Unknown theme"),_.jsx(Fg,{})}},[e]),o=S.useCallback(i=>t(bI(i)),[t]);return _.jsxs(Rw,{children:[_.jsx(Fh,{label:n("switch_theme"),"aria-label":"switch theme",children:_.jsx(kw,{children:r})}),_.jsxs(Ow,{children:[_.jsx(ac,{value:"auto",label:"Auto",active:e==="auto",onSelect:o}),_.jsx(ac,{value:"dark",label:"Dark",active:e==="dark",onSelect:o}),_.jsx(ac,{value:"light",label:"Light",active:e==="light",onSelect:o})]})]})}function ac(e){const t=Hn(Ug.checkWrapper,{[Ug.active]:e.active});return _.jsxs(Tw,{onSelect:()=>e.onSelect(e.value),children:[_.jsx("span",{className:t,children:_.jsx(wA,{size:14})}),_.jsx("span",{children:e.label})]})}function Fg(){const t=jh.read().motion;return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx(t.path,{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})})}function z3(){const t=jh.read().motion;return _.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"5"}),_.jsxs(t.g,{initial:{scale:.7},animate:{scale:1},transition:{duration:.5},children:[_.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),_.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),_.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),_.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),_.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),_.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),_.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),_.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]})}function V3(){const t=jh.read().motion;return _.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"11"}),_.jsx("clipPath",{id:"cut-off-bottom",children:_.jsx(t.rect,{x:"12",y:"0",width:"12",height:"24",initial:{rotate:-30},animate:{rotate:0},transition:{duration:.7}})}),_.jsx("circle",{cx:"12",cy:"12",r:"6",clipPath:"url(#cut-off-bottom)",fill:"currentColor"})]})}const B3=e=>({theme:Th(e)}),Mw=Jn(B3)(j3),Gf=0;class W3 extends Error{constructor(t,n){super(t),this.message=t,this.code=n}}const Yf={[Gf]:{message:"Browser not supported!",detail:'This browser does not support "fetch", please choose another one.'},default:{message:"Oops, something went wrong!"}};function H3(e){const{code:t}=e;return typeof t=="number"?Yf[t]:Yf.default}const K3="_content_b98hm_1",Q3="_container_b98hm_16",q3="_overlay_b98hm_22",G3="_fixed_b98hm_26",na={content:K3,container:Q3,overlay:q3,fixed:G3},Y3="_overlay_1i06e_1",X3="_content_1i06e_10",jg={overlay:Y3,content:X3};function J3({isOpen:e,onRequestClose:t,className:n,overlayClassName:r,children:o,...i}){const s=Hn(n,jg.content),a=Hn(r,jg.overlay);return _.jsx(N0,{isOpen:e,onRequestClose:t,className:s,overlayClassName:a,...i,children:o})}const Z3=S.memo(J3),{useCallback:e$,useEffect:t$}=tn;function n$({dispatch:e,apiConfig:t,modals:n}){if(!window.fetch){const{detail:o}=Yf[Gf];throw new W3(o,Gf)}const r=e$(()=>{e(hI("apiConfig"))},[e]);return t$(()=>{e($S(t))},[e,t]),_.jsxs(Z3,{isOpen:n.apiConfig,className:na.content,overlayClassName:na.overlay,shouldCloseOnOverlayClick:!1,shouldCloseOnEsc:!1,onRequestClose:r,children:[_.jsx("div",{className:na.container,children:_.jsx(tw,{})}),_.jsx("div",{className:na.fixed,children:_.jsx(Mw,{})})]})}const r$=e=>({modals:e.modals,apiConfig:ps(e)}),o$=Jn(r$)(n$),i$={hasProcessPath:!1},s$=S.createContext(i$),a$="_root_4m2cd_1",l$="_yacd_4m2cd_14",u$="_link_4m2cd_23",lc={root:a$,yacd:l$,link:u$};function c$({width:e=24,height:t=24}={}){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:_.jsx("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})})}const f$="https://github.com/haishanh/yacd/issues";function d$({message:e,detail:t}){return _.jsxs("div",{className:lc.root,children:[_.jsx("div",{className:lc.yacd,children:_.jsx(Ph,{width:150,height:150})}),e?_.jsx("h1",{children:e}):null,t?_.jsx("p",{children:t}):null,_.jsx("p",{children:_.jsxs("a",{className:lc.link,href:f$,children:[_.jsx(c$,{width:16,height:16}),"haishanh/yacd"]})})]})}class h$ extends S.Component{constructor(){super(...arguments);Kh(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}render(){if(this.state.error){const{message:n,detail:r}=H3(this.state.error);return _.jsx(d$,{message:n,detail:r})}else return this.props.children}}const p$="_root_4oasi_1",m$="_chart_4oasi_10",zg={root:p$,chart:m$};var g$=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const zh=qi(g$);function Vg(e,t,n,r=0,o=!1){for(const s of t)if(zh(n,s.args)){if(o)return;if(s.error)throw s.error;if(s.response)return s.response;throw s.promise}const i={args:n,promise:e(...n).then(s=>i.response=s??!0).catch(s=>i.error=s??"unknown error").then(()=>{r>0&&setTimeout(()=>{const s=t.indexOf(i);s!==-1&&t.splice(s,1)},r)})};if(t.push(i),!o)throw i.promise}function v$(e,...t){if(t===void 0||t.length===0)e.splice(0,e.length);else{const n=e.find(r=>zh(t,r.args));if(n){const r=e.indexOf(n);r!==-1&&e.splice(r,1)}}}function y$(e,t=0){const n=[];return{read:(...r)=>Vg(e,n,r,t),preload:(...r)=>void Vg(e,n,r,t,!0),clear:(...r)=>v$(n,...r),peek:(...r)=>{var o;return(o=n.find(i=>zh(r,i.args)))==null?void 0:o.response}}}const Bg=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];function Qi(e){if(e<1e3)return e+" B";const t=Math.min(Math.floor(Math.log10(e)/3),Bg.length-1);e=Number((e/Math.pow(1e3,t)).toPrecision(3));const n=Bg[t];return e+" "+n}const S$=y$(()=>en(()=>import("./chart-lib-236f0953.js"),[],import.meta.url)),Wg={borderWidth:1,pointRadius:0,tension:.2,fill:!0},w$={responsive:!0,maintainAspectRatio:!0,plugins:{legend:{labels:{boxWidth:20}}},scales:{x:{display:!1,type:"category"},y:{type:"linear",display:!0,grid:{display:!0,color:"#555",drawTicks:!1},border:{display:!1,dash:[3,6]},ticks:{callback(e){return Qi(e)+"/s "}}}}},Hg=[{down:{backgroundColor:"rgba(176, 209, 132, 0.8)",borderColor:"rgb(176, 209, 132)"},up:{backgroundColor:"rgba(181, 220, 231, 0.8)",borderColor:"rgb(181, 220, 231)"}},{up:{backgroundColor:"rgb(98, 190, 100)",borderColor:"rgb(78,146,79)"},down:{backgroundColor:"rgb(160, 230, 66)",borderColor:"rgb(110, 156, 44)"}},{up:{backgroundColor:"rgba(94, 175, 223, 0.3)",borderColor:"rgb(94, 175, 223)"},down:{backgroundColor:"rgba(139, 227, 195, 0.3)",borderColor:"rgb(139, 227, 195)"}},{up:{backgroundColor:"rgba(242, 174, 62, 0.3)",borderColor:"rgb(242, 174, 62)"},down:{backgroundColor:"rgba(69, 154, 248, 0.3)",borderColor:"rgb(69, 154, 248)"}}],{useEffect:_$}=Q;function E$(e,t,n,r,o={}){_$(()=>{const i=document.getElementById(t).getContext("2d"),s={...w$,...o},a=new e(i,{type:"line",data:n,options:s}),l=r&&r.subscribe(()=>a.update());return()=>{l&&l(),a.destroy()}},[e,t,n,r,o])}const{useMemo:x$}=tn,C$={position:"relative",maxWidth:1e3},b$=e=>({apiConfig:ps(e),selectedChartStyleIndex:yI(e)}),R$=Jn(b$)(k$);function k$({apiConfig:e,selectedChartStyleIndex:t}){const n=S$.read(),r=kh(e),{t:o}=Yi(),i=x$(()=>({labels:r.labels,datasets:[{...Wg,...Hg[t].up,label:o("Up"),data:r.up},{...Wg,...Hg[t].down,label:o("Down"),data:r.down}]}),[r,t,o]);return E$(n.Chart,"trafficChart",i,r),_.jsx("div",{style:C$,children:_.jsx("canvas",{id:"trafficChart"})})}const T$="_TrafficNow_hzna1_1",N$="_sec_hzna1_10",Mr={TrafficNow:T$,sec:N$},{useState:Dw,useEffect:$w,useCallback:O$}=tn,L$=e=>({apiConfig:ps(e)}),P$=Jn(L$)(A$);function A$({apiConfig:e}){const{t}=Yi(),{upStr:n,downStr:r}=I$(e),{upTotal:o,dlTotal:i,connNumber:s}=M$(e);return _.jsxs("div",{className:Mr.TrafficNow,children:[_.jsxs("div",{className:Mr.sec,children:[_.jsx("div",{children:t("Upload")}),_.jsx("div",{children:n})]}),_.jsxs("div",{className:Mr.sec,children:[_.jsx("div",{children:t("Download")}),_.jsx("div",{children:r})]}),_.jsxs("div",{className:Mr.sec,children:[_.jsx("div",{children:t("Upload Total")}),_.jsx("div",{children:o})]}),_.jsxs("div",{className:Mr.sec,children:[_.jsx("div",{children:t("Download Total")}),_.jsx("div",{children:i})]}),_.jsxs("div",{className:Mr.sec,children:[_.jsx("div",{children:t("Active Connections")}),_.jsx("div",{children:s})]})]})}function I$(e){const[t,n]=Dw({upStr:"0 B/s",downStr:"0 B/s"});return $w(()=>kh(e).subscribe(r=>n({upStr:Qi(r.up)+"/s",downStr:Qi(r.down)+"/s"})),[e]),t}function M$(e){const[t,n]=Dw({upTotal:"0 B",dlTotal:"0 B",connNumber:0}),r=O$(({downloadTotal:o,uploadTotal:i,connections:s})=>{n({upTotal:Qi(i),dlTotal:Qi(o),connNumber:s.length})},[n]);return $w(()=>jf(e,r),[e,r]),t}function D$(){const{t:e}=Yi();return _.jsxs("div",{children:[_.jsx(_S,{title:e("Overview")}),_.jsxs("div",{className:zg.root,children:[_.jsx("div",{children:_.jsx(P$,{})}),_.jsx("div",{className:zg.chart,children:_.jsx(S.Suspense,{fallback:_.jsx(VS,{height:"200px"}),children:_.jsx(R$,{})})})]})]})}const $$="_lo_pmly2_1",U$={lo:$$};function F$(){return _.jsx("div",{className:U$.lo,children:_.jsx(Ph,{width:280,height:280,animate:!0,c0:"transparent",c1:"#646464"})})}const j$="_app_1s3k7_1",z$="_content_1s3k7_18",Uw={app:j$,content:z$};var Fw={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Kg=Q.createContext&&Q.createContext(Fw),Vn=globalThis&&globalThis.__assign||function(){return Vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n_.jsx(i4,{to:n,isActive:t.pathname===n,iconId:r,labelText:e(o)},n))}),_.jsxs("div",{className:kn.footer,children:[_.jsx(Mw,{}),_.jsx(Fh,{label:e("about"),children:_.jsx(Z0,{to:"/about",className:kn.iconWrapper,children:_.jsx(PA,{size:20})})})]})]})}const l4="_input_mh4af_1",sU={input:l4},u4="_animate_1w0e8_1",aU={animate:u4,"zap-pulse":"_zap-pulse_1w0e8_1"};function Xf(){return Xf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=l)&&this.A(n),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},t.prototype.p=function(n){n.preventDefault(),typeof n.button=="number"&&n.button!==0||(this.I(n.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},t.prototype.v=function(n){n.preventDefault(),this.L(n.clientX)},t.prototype.g=function(n){this.U(n),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},t.prototype.k=function(n){this.X=null,this.I(n.touches[0].clientX)},t.prototype.m=function(n){this.L(n.touches[0].clientX)},t.prototype.M=function(n){n.preventDefault(),this.U(n)},t.prototype.$=function(n){Date.now()-this.l>50&&(this.A(n),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},t.prototype.C=function(){this.u=Date.now()},t.prototype.D=function(){this.setState({j:!0})},t.prototype.O=function(){this.setState({j:!1})},t.prototype.S=function(n){this.H=n},t.prototype.T=function(n){n.preventDefault(),this.H.focus(),this.A(n),this.W&&this.setState({j:!1})},t.prototype.A=function(n){var r=this.props;(0,r.onChange)(!r.checked,n,r.id)},t.prototype.render=function(){var n=this.props,r=n.checked,o=n.disabled,i=n.className,s=n.offColor,a=n.onColor,l=n.offHandleColor,u=n.onHandleColor,c=n.checkedIcon,f=n.uncheckedIcon,d=n.checkedHandleIcon,m=n.uncheckedHandleIcon,v=n.boxShadow,y=n.activeBoxShadow,E=n.height,g=n.width,h=n.borderRadius,p=function(U,X){var T={};for(var O in U)Object.prototype.hasOwnProperty.call(U,O)&&X.indexOf(O)===-1&&(T[O]=U[O]);return T}(n,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),w=this.state,R=w.h,x=w.N,k=w.j,L={position:"relative",display:"inline-block",textAlign:"left",opacity:o?.5:1,direction:"ltr",borderRadius:E/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},G={height:E,width:g,margin:Math.max(0,(this.t-E)/2),position:"relative",background:qg(R,this.i,this.o,s,a),borderRadius:typeof h=="number"?h:E/2,cursor:o?"default":"pointer",WebkitTransition:x?null:"background 0.25s",MozTransition:x?null:"background 0.25s",transition:x?null:"background 0.25s"},$={height:E,width:Math.min(1.5*E,g-(this.t+E)/2+1),position:"relative",opacity:(R-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:x?null:"opacity 0.25s",MozTransition:x?null:"opacity 0.25s",transition:x?null:"opacity 0.25s"},oe={height:E,width:Math.min(1.5*E,g-(this.t+E)/2+1),position:"absolute",opacity:1-(R-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:x?null:"opacity 0.25s",MozTransition:x?null:"opacity 0.25s",transition:x?null:"opacity 0.25s"},de={height:this.t,width:this.t,background:qg(R,this.i,this.o,l,u),display:"inline-block",cursor:o?"default":"pointer",borderRadius:typeof h=="number"?h-1:"50%",position:"absolute",transform:"translateX("+R+"px)",top:Math.max(0,(E-this.t)/2),outline:0,boxShadow:k?y:v,border:0,WebkitTransition:x?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:x?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:x?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},se={height:this.t,width:this.t,opacity:Math.max(2*(1-(R-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:x?null:"opacity 0.25s",MozTransition:x?null:"opacity 0.25s",transition:x?null:"opacity 0.25s"},W={height:this.t,width:this.t,opacity:Math.max(2*((R-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:x?null:"opacity 0.25s",MozTransition:x?null:"opacity 0.25s",transition:x?null:"opacity 0.25s"};return Q.createElement("div",{className:i,style:L},Q.createElement("div",{className:"react-switch-bg",style:G,onClick:o?null:this.T,onMouseDown:function(U){return U.preventDefault()}},c&&Q.createElement("div",{style:$},c),f&&Q.createElement("div",{style:oe},f)),Q.createElement("div",{className:"react-switch-handle",style:de,onClick:function(U){return U.preventDefault()},onMouseDown:o?null:this.p,onTouchStart:o?null:this.k,onTouchMove:o?null:this.m,onTouchEnd:o?null:this.M,onTouchCancel:o?null:this.O},m&&Q.createElement("div",{style:se},m),d&&Q.createElement("div",{style:W},d)),Q.createElement("input",Xf({},{type:"checkbox",role:"switch","aria-checked":r,checked:r,disabled:o,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},p,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},t}(S.Component);wa.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:c4,checkedIcon:f4,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56};const d4=wa.default?wa.default:wa;function h4({checked:e=!1,onChange:t,theme:n,name:r}){const o=n==="dark"?"#393939":"#e9e9e9";return _.jsx(d4,{onChange:t,checked:e,uncheckedIcon:!1,checkedIcon:!1,offColor:o,onColor:"#047aff",offHandleColor:"#fff",onHandleColor:"#fff",handleDiameter:24,height:28,width:44,className:"rs",name:r})}const lU=Jn(e=>({theme:Th(e)}))(h4),p4="_ToggleSwitch_10mtp_1",m4="_slider_10mtp_28",Gg={ToggleSwitch:p4,slider:m4};function g4({options:e,value:t,name:n,onChange:r}){const o=S.useMemo(()=>e.map(a=>a.value).indexOf(t),[e,t]),i=S.useCallback(a=>{const l=Math.floor(100/e.length);if(a===e.length-1)return 100-e.length*l+l;if(a>-1)return l},[e]),s=S.useMemo(()=>({width:i(o)+"%",left:o*i(0)+"%"}),[o,i]);return _.jsxs("div",{className:Gg.ToggleSwitch,children:[_.jsx("div",{className:Gg.slider,style:s}),e.map((a,l)=>{const u=`${n}-${a.label}`,c=l===0?"":"border-left";return _.jsxs("label",{htmlFor:u,className:c,style:{width:i(l)+"%"},children:[_.jsx("input",{id:u,name:n,type:"radio",value:a.value,checked:t===a.value,onChange:r}),_.jsx("div",{children:a.label})]},u)})]})}Q.memo(g4);const{lazy:bs,Suspense:zw}=tn,v4=bs(()=>en(()=>import("./Connections-92103147.js"),["./Connections-92103147.js","./BaseModal-29d7cf7b.js","./BaseModal-ef61154c.css","./useRemainingViewPortHeight-054801fd.js","./index-759f7e71.js","./Fab-8003d842.js","./Fab-a0a7e573.css","./play-263403e0.js","./Connections-f01328e8.css"],import.meta.url)),y4=bs(()=>en(()=>import("./Config-f50e8a52.js"),["./Config-f50e8a52.js","./logs-9e380b83.js","./Select-29e929fc.js","./Select-3de40504.css","./Config-35023b66.css"],import.meta.url)),S4=bs(()=>en(()=>import("./Logs-c88cdced.js"),["./Logs-c88cdced.js","./index.esm-fff1f13f.js","./logs-9e380b83.js","./debounce-c1ba2006.js","./useRemainingViewPortHeight-054801fd.js","./Fab-8003d842.js","./Fab-a0a7e573.css","./play-263403e0.js","./Logs-4b8e75d1.css"],import.meta.url)),w4=bs(()=>en(()=>import("./Proxies-1a2faf73.js"),["./Proxies-1a2faf73.js","./BaseModal-29d7cf7b.js","./BaseModal-ef61154c.css","./Fab-8003d842.js","./Fab-a0a7e573.css","./TextFilter-5cf71eda.js","./debounce-c1ba2006.js","./TextFilter-b21c0577.css","./index-759f7e71.js","./Select-29e929fc.js","./Select-3de40504.css","./Proxies-b68bae25.css"],import.meta.url)),_4=bs(()=>en(()=>import("./Rules-9573ff0c.js"),["./Rules-9573ff0c.js","./index.esm-fff1f13f.js","./TextFilter-5cf71eda.js","./debounce-c1ba2006.js","./TextFilter-b21c0577.css","./index-759f7e71.js","./Fab-8003d842.js","./Fab-a0a7e573.css","./useRemainingViewPortHeight-054801fd.js","./Rules-e11cb70e.css"],import.meta.url)),E4=[{path:"/",element:_.jsx(D$,{})},{path:"/connections",element:_.jsx(s$.Provider,{value:{hasProcessPath:!1},children:_.jsx(v4,{})})},{path:"/configs",element:_.jsx(y4,{})},{path:"/logs",element:_.jsx(S4,{})},{path:"/proxies",element:_.jsx(w4,{})},{path:"/rules",element:_.jsx(_4,{})},{path:"/about",element:_.jsx($I,{})},!1].filter(Boolean);function x4(){return X0(E4)}function C4(){return _.jsxs(_.Fragment,{children:[_.jsx(o$,{}),_.jsx(a4,{}),_.jsx("div",{className:Uw.content,children:_.jsx(zw,{fallback:_.jsx(F$,{}),children:_.jsx(x4,{})})})]})}function b4(){return X0([{path:"/backend",element:_.jsx(tw,{})},{path:"*",element:_.jsx(C4,{})}])}const R4=()=>_.jsx(h$,{children:_.jsx(gA,{children:_.jsx(aI,{initialState:wM,actions:_M,children:_.jsx(mR,{client:VI,children:_.jsx(E2,{children:_.jsx("div",{className:Uw.app,children:_.jsx(zw,{fallback:_.jsx(VS,{}),children:_.jsx(b4,{})})})})})})})}),k4=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function T4(e){if("serviceWorker"in navigator){const t=new URL("",window.location.href);if(t.origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=new URL("sw.js",t.href).href;k4?(N4(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker")})):Vw(n,e)})}}function Vw(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function N4(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(o=>{o.unregister().then(()=>{window.location.reload()})}):Vw(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}P4();const Bw=document.getElementById("app"),O4=v0(Bw);function L4(e){const t=document.createElement("link");t.href=e,t.rel="preload",t.as="font",t.crossOrigin="",document.head.appendChild(t)}function P4(){L4(hv)}N0.setAppElement(Bw);O4.render(_.jsx(S.StrictMode,{children:_.jsx(R4,{})}));setTimeout(()=>{en(()=>import("./index.modern-c58ff412.js"),[],import.meta.url).then(e=>{e&&e.polyfillCountryFlagEmojis("Twemoji Country Flags",hv)}).catch(()=>{})},1);T4();console.log("Checkout the repo: https://github.com/haishanh/yacd");console.log("Version:","0.3.8");console.log("Commit hash:",`b4a1278 -`);export{Fh as $,XI as A,oD as B,_S as C,Q4 as D,q4 as E,K4 as F,j4 as G,H4 as H,MA as I,U4 as J,yt as K,$4 as L,s$ as M,aU as N,iU as O,Ce as P,D4 as Q,Q as R,Ph as S,rU as T,aM as U,L3 as V,Aw as W,qS as X,Yr as Y,tU as Z,oU as _,I4 as a,V4 as a0,B4 as a1,W4 as a2,J4 as a3,Z4 as a4,nU as a5,eU as a6,jh as a7,SI as a8,Lo as a9,Y4 as aa,lM as ab,X4 as ac,rs as ad,Om as ae,Gb as af,Pe as ag,M4 as ah,pR as ai,hR as aj,wR as ak,qi as al,vA as am,NR as an,Si as ao,N0 as b,Hn as c,Jn as d,G4 as e,jf as f,ps as g,tn as h,S$ as i,_ as j,Wg as k,Hg as l,jg as m,E$ as n,F4 as o,Qi as p,$S as q,S as r,sU as s,xg as t,Yi as u,z4 as v,sI as w,lU as x,yI as y,jS as z}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/index.esm-fff1f13f.js b/FILES/etc/config/clash/clash-dashboard/assets/index.esm-cd2d54ba.js similarity index 94% rename from FILES/etc/config/clash/clash-dashboard/assets/index.esm-fff1f13f.js rename to FILES/etc/config/clash/clash-dashboard/assets/index.esm-cd2d54ba.js index b494f78..4811e6f 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/index.esm-fff1f13f.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/index.esm-cd2d54ba.js @@ -1 +1 @@ -import{r as E}from"./index-dcea5d2f.js";function U(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function L(n,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},L(n,t)}function W(){return W=Object.assign?Object.assign.bind():function(n){for(var t=1;t=0)&&(r[a]=n[a]);return r}var ct=typeof performance=="object"&&typeof performance.now=="function",H=ct?function(){return performance.now()}:function(){return Date.now()};function K(n){cancelAnimationFrame(n.id)}function ut(n,t){var r=H();function i(){H()-r>=t?n.call(null):a.id=requestAnimationFrame(i)}var a={id:requestAnimationFrame(i)};return a}var N=-1;function V(n){if(n===void 0&&(n=!1),N===-1||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),N=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return N}var _=null;function B(n){if(n===void 0&&(n=!1),_===null||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?_="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?_="negative":_="positive-ascending"),document.body.removeChild(t),_}return _}var ft=150,dt=function(t,r){return t};function J(n){var t,r=n.getItemOffset,i=n.getEstimatedTotalSize,a=n.getItemSize,l=n.getOffsetForIndexAndAlignment,c=n.getStartIndexForOffset,f=n.getStopIndexForStartIndex,p=n.initInstanceProps,z=n.shouldResetStyleCacheOnItemSizeChange,g=n.validateProps;return t=function(O){ot(M,O);function M(v){var e;return e=O.call(this,v)||this,e._instanceProps=p(e.props,U(e)),e._outerRef=void 0,e._resetIsScrollingTimeoutId=null,e.state={instance:U(e),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof e.props.initialScrollOffset=="number"?e.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},e._callOnItemsRendered=void 0,e._callOnItemsRendered=F(function(o,s,u,m){return e.props.onItemsRendered({overscanStartIndex:o,overscanStopIndex:s,visibleStartIndex:u,visibleStopIndex:m})}),e._callOnScroll=void 0,e._callOnScroll=F(function(o,s,u){return e.props.onScroll({scrollDirection:o,scrollOffset:s,scrollUpdateWasRequested:u})}),e._getItemStyle=void 0,e._getItemStyle=function(o){var s=e.props,u=s.direction,m=s.itemSize,S=s.layout,d=e._getItemStyleCache(z&&m,z&&S,z&&u),h;if(d.hasOwnProperty(o))h=d[o];else{var y=r(e.props,o,e._instanceProps),x=a(e.props,o,e._instanceProps),T=u==="horizontal"||S==="horizontal",b=u==="rtl",R=T?y:0;d[o]=h={position:"absolute",left:b?void 0:R,right:b?R:void 0,top:T?0:y,height:T?"100%":x,width:T?x:"100%"}}return h},e._getItemStyleCache=void 0,e._getItemStyleCache=F(function(o,s,u){return{}}),e._onScrollHorizontal=function(o){var s=o.currentTarget,u=s.clientWidth,m=s.scrollLeft,S=s.scrollWidth;e.setState(function(d){if(d.scrollOffset===m)return null;var h=e.props.direction,y=m;if(h==="rtl")switch(B()){case"negative":y=-m;break;case"positive-descending":y=S-u-m;break}return y=Math.max(0,Math.min(y,S-u)),{isScrolling:!0,scrollDirection:d.scrollOffseth.clientWidth?V():0:d=h.scrollHeight>h.clientHeight?V():0}this.scrollTo(l(this.props,e,o,S,this._instanceProps,d))},I.componentDidMount=function(){var e=this.props,o=e.direction,s=e.initialScrollOffset,u=e.layout;if(typeof s=="number"&&this._outerRef!=null){var m=this._outerRef;o==="horizontal"||u==="horizontal"?m.scrollLeft=s:m.scrollTop=s}this._callPropsCallbacks()},I.componentDidUpdate=function(){var e=this.props,o=e.direction,s=e.layout,u=this.state,m=u.scrollOffset,S=u.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var d=this._outerRef;if(o==="horizontal"||s==="horizontal")if(o==="rtl")switch(B()){case"negative":d.scrollLeft=-m;break;case"positive-ascending":d.scrollLeft=m;break;default:var h=d.clientWidth,y=d.scrollWidth;d.scrollLeft=y-h-m;break}else d.scrollLeft=m;else d.scrollTop=m}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&K(this._resetIsScrollingTimeoutId)},I.render=function(){var e=this.props,o=e.children,s=e.className,u=e.direction,m=e.height,S=e.innerRef,d=e.innerElementType,h=e.innerTagName,y=e.itemCount,x=e.itemData,T=e.itemKey,b=T===void 0?dt:T,R=e.layout,X=e.outerElementType,Y=e.outerTagName,tt=e.style,et=e.useIsScrolling,rt=e.width,A=this.state.isScrolling,P=u==="horizontal"||R==="horizontal",it=P?this._onScrollHorizontal:this._onScrollVertical,D=this._getRangeToRender(),nt=D[0],at=D[1],k=[];if(y>0)for(var w=nt;w<=at;w++)k.push(E.createElement(o,{data:x,key:b(w,x),index:w,isScrolling:et?A:void 0,style:this._getItemStyle(w)}));var $=i(this.props,this._instanceProps);return E.createElement(X||Y||"div",{className:s,onScroll:it,ref:this._outerRefSetter,style:W({position:"relative",height:m,width:rt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:u},tt)},E.createElement(d||h||"div",{children:k,ref:S,style:{height:P?"100%":$,pointerEvents:A?"none":void 0,width:P?$:"100%"}}))},I._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var e=this.props.itemCount;if(e>0){var o=this._getRangeToRender(),s=o[0],u=o[1],m=o[2],S=o[3];this._callOnItemsRendered(s,u,m,S)}}if(typeof this.props.onScroll=="function"){var d=this.state,h=d.scrollDirection,y=d.scrollOffset,x=d.scrollUpdateWasRequested;this._callOnScroll(h,y,x)}},I._getRangeToRender=function(){var e=this.props,o=e.itemCount,s=e.overscanCount,u=this.state,m=u.isScrolling,S=u.scrollDirection,d=u.scrollOffset;if(o===0)return[0,0,0,0];var h=c(this.props,d,this._instanceProps),y=f(this.props,h,d,this._instanceProps),x=!m||S==="backward"?Math.max(1,s):1,T=!m||S==="forward"?Math.max(1,s):1;return[Math.max(0,h-x),Math.max(0,Math.min(o-1,y+T)),h,y]},M}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var mt=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},ht=50,C=function(t,r,i){var a=t,l=a.itemSize,c=i.itemMetadataMap,f=i.lastMeasuredIndex;if(r>f){var p=0;if(f>=0){var z=c[f];p=z.offset+z.size}for(var g=f+1;g<=r;g++){var O=l(g);c[g]={offset:p,size:O},p+=O}i.lastMeasuredIndex=r}return c[r]},vt=function(t,r,i){var a=r.itemMetadataMap,l=r.lastMeasuredIndex,c=l>0?a[l].offset:0;return c>=i?Q(t,r,l,0,i):pt(t,r,Math.max(0,l),i)},Q=function(t,r,i,a,l){for(;a<=i;){var c=a+Math.floor((i-a)/2),f=C(t,c,r).offset;if(f===l)return c;fl&&(i=c-1)}return a>0?a-1:0},pt=function(t,r,i,a){for(var l=t.itemCount,c=1;i=i&&(c=i-1),c>=0){var p=a[c];f=p.offset+p.size}var z=i-c-1,g=z*l;return f+g},yt=J({getItemOffset:function(t,r,i){return C(t,r,i).offset},getItemSize:function(t,r,i){return i.itemMetadataMap[r].size},getEstimatedTotalSize:G,getOffsetForIndexAndAlignment:function(t,r,i,a,l,c){var f=t.direction,p=t.height,z=t.layout,g=t.width,O=f==="horizontal"||z==="horizontal",M=O?g:p,I=C(t,r,l),v=G(t,l),e=Math.max(0,Math.min(v-M,I.offset)),o=Math.max(0,I.offset-M+I.size+c);switch(i==="smart"&&(a>=o-M&&a<=e+M?i="auto":i="center"),i){case"start":return e;case"end":return o;case"center":return Math.round(o+(e-o)/2);case"auto":default:return a>=o&&a<=e?a:a=s-v&&a<=o+v?i="auto":i="center"),i){case"start":return o;case"end":return s;case"center":{var u=Math.round(s+(o-s)/2);return ue+Math.floor(v/2)?e:u}case"auto":default:return a>=s&&a<=o?a:a=0)&&(r[a]=n[a]);return r}var ct=typeof performance=="object"&&typeof performance.now=="function",H=ct?function(){return performance.now()}:function(){return Date.now()};function K(n){cancelAnimationFrame(n.id)}function ut(n,t){var r=H();function i(){H()-r>=t?n.call(null):a.id=requestAnimationFrame(i)}var a={id:requestAnimationFrame(i)};return a}var N=-1;function V(n){if(n===void 0&&(n=!1),N===-1||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),N=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return N}var _=null;function B(n){if(n===void 0&&(n=!1),_===null||n){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var i=document.createElement("div"),a=i.style;return a.width="100px",a.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?_="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?_="negative":_="positive-ascending"),document.body.removeChild(t),_}return _}var ft=150,dt=function(t,r){return t};function J(n){var t,r=n.getItemOffset,i=n.getEstimatedTotalSize,a=n.getItemSize,l=n.getOffsetForIndexAndAlignment,c=n.getStartIndexForOffset,f=n.getStopIndexForStartIndex,p=n.initInstanceProps,z=n.shouldResetStyleCacheOnItemSizeChange,g=n.validateProps;return t=function(O){ot(M,O);function M(v){var e;return e=O.call(this,v)||this,e._instanceProps=p(e.props,U(e)),e._outerRef=void 0,e._resetIsScrollingTimeoutId=null,e.state={instance:U(e),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof e.props.initialScrollOffset=="number"?e.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},e._callOnItemsRendered=void 0,e._callOnItemsRendered=F(function(o,s,u,m){return e.props.onItemsRendered({overscanStartIndex:o,overscanStopIndex:s,visibleStartIndex:u,visibleStopIndex:m})}),e._callOnScroll=void 0,e._callOnScroll=F(function(o,s,u){return e.props.onScroll({scrollDirection:o,scrollOffset:s,scrollUpdateWasRequested:u})}),e._getItemStyle=void 0,e._getItemStyle=function(o){var s=e.props,u=s.direction,m=s.itemSize,S=s.layout,d=e._getItemStyleCache(z&&m,z&&S,z&&u),h;if(d.hasOwnProperty(o))h=d[o];else{var y=r(e.props,o,e._instanceProps),x=a(e.props,o,e._instanceProps),T=u==="horizontal"||S==="horizontal",b=u==="rtl",R=T?y:0;d[o]=h={position:"absolute",left:b?void 0:R,right:b?R:void 0,top:T?0:y,height:T?"100%":x,width:T?x:"100%"}}return h},e._getItemStyleCache=void 0,e._getItemStyleCache=F(function(o,s,u){return{}}),e._onScrollHorizontal=function(o){var s=o.currentTarget,u=s.clientWidth,m=s.scrollLeft,S=s.scrollWidth;e.setState(function(d){if(d.scrollOffset===m)return null;var h=e.props.direction,y=m;if(h==="rtl")switch(B()){case"negative":y=-m;break;case"positive-descending":y=S-u-m;break}return y=Math.max(0,Math.min(y,S-u)),{isScrolling:!0,scrollDirection:d.scrollOffseth.clientWidth?V():0:d=h.scrollHeight>h.clientHeight?V():0}this.scrollTo(l(this.props,e,o,S,this._instanceProps,d))},I.componentDidMount=function(){var e=this.props,o=e.direction,s=e.initialScrollOffset,u=e.layout;if(typeof s=="number"&&this._outerRef!=null){var m=this._outerRef;o==="horizontal"||u==="horizontal"?m.scrollLeft=s:m.scrollTop=s}this._callPropsCallbacks()},I.componentDidUpdate=function(){var e=this.props,o=e.direction,s=e.layout,u=this.state,m=u.scrollOffset,S=u.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var d=this._outerRef;if(o==="horizontal"||s==="horizontal")if(o==="rtl")switch(B()){case"negative":d.scrollLeft=-m;break;case"positive-ascending":d.scrollLeft=m;break;default:var h=d.clientWidth,y=d.scrollWidth;d.scrollLeft=y-h-m;break}else d.scrollLeft=m;else d.scrollTop=m}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&K(this._resetIsScrollingTimeoutId)},I.render=function(){var e=this.props,o=e.children,s=e.className,u=e.direction,m=e.height,S=e.innerRef,d=e.innerElementType,h=e.innerTagName,y=e.itemCount,x=e.itemData,T=e.itemKey,b=T===void 0?dt:T,R=e.layout,X=e.outerElementType,Y=e.outerTagName,tt=e.style,et=e.useIsScrolling,rt=e.width,A=this.state.isScrolling,P=u==="horizontal"||R==="horizontal",it=P?this._onScrollHorizontal:this._onScrollVertical,D=this._getRangeToRender(),nt=D[0],at=D[1],k=[];if(y>0)for(var w=nt;w<=at;w++)k.push(E.createElement(o,{data:x,key:b(w,x),index:w,isScrolling:et?A:void 0,style:this._getItemStyle(w)}));var $=i(this.props,this._instanceProps);return E.createElement(X||Y||"div",{className:s,onScroll:it,ref:this._outerRefSetter,style:L({position:"relative",height:m,width:rt,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:u},tt)},E.createElement(d||h||"div",{children:k,ref:S,style:{height:P?"100%":$,pointerEvents:A?"none":void 0,width:P?$:"100%"}}))},I._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var e=this.props.itemCount;if(e>0){var o=this._getRangeToRender(),s=o[0],u=o[1],m=o[2],S=o[3];this._callOnItemsRendered(s,u,m,S)}}if(typeof this.props.onScroll=="function"){var d=this.state,h=d.scrollDirection,y=d.scrollOffset,x=d.scrollUpdateWasRequested;this._callOnScroll(h,y,x)}},I._getRangeToRender=function(){var e=this.props,o=e.itemCount,s=e.overscanCount,u=this.state,m=u.isScrolling,S=u.scrollDirection,d=u.scrollOffset;if(o===0)return[0,0,0,0];var h=c(this.props,d,this._instanceProps),y=f(this.props,h,d,this._instanceProps),x=!m||S==="backward"?Math.max(1,s):1,T=!m||S==="forward"?Math.max(1,s):1;return[Math.max(0,h-x),Math.max(0,Math.min(o-1,y+T)),h,y]},M}(E.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var mt=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},ht=50,C=function(t,r,i){var a=t,l=a.itemSize,c=i.itemMetadataMap,f=i.lastMeasuredIndex;if(r>f){var p=0;if(f>=0){var z=c[f];p=z.offset+z.size}for(var g=f+1;g<=r;g++){var O=l(g);c[g]={offset:p,size:O},p+=O}i.lastMeasuredIndex=r}return c[r]},vt=function(t,r,i){var a=r.itemMetadataMap,l=r.lastMeasuredIndex,c=l>0?a[l].offset:0;return c>=i?Q(t,r,l,0,i):pt(t,r,Math.max(0,l),i)},Q=function(t,r,i,a,l){for(;a<=i;){var c=a+Math.floor((i-a)/2),f=C(t,c,r).offset;if(f===l)return c;fl&&(i=c-1)}return a>0?a-1:0},pt=function(t,r,i,a){for(var l=t.itemCount,c=1;i=i&&(c=i-1),c>=0){var p=a[c];f=p.offset+p.size}var z=i-c-1,g=z*l;return f+g},yt=J({getItemOffset:function(t,r,i){return C(t,r,i).offset},getItemSize:function(t,r,i){return i.itemMetadataMap[r].size},getEstimatedTotalSize:G,getOffsetForIndexAndAlignment:function(t,r,i,a,l,c){var f=t.direction,p=t.height,z=t.layout,g=t.width,O=f==="horizontal"||z==="horizontal",M=O?g:p,I=C(t,r,l),v=G(t,l),e=Math.max(0,Math.min(v-M,I.offset)),o=Math.max(0,I.offset-M+I.size+c);switch(i==="smart"&&(a>=o-M&&a<=e+M?i="auto":i="center"),i){case"start":return e;case"end":return o;case"center":return Math.round(o+(e-o)/2);case"auto":default:return a>=o&&a<=e?a:a=s-v&&a<=o+v?i="auto":i="center"),i){case"start":return o;case"end":return s;case"center":{var u=Math.round(s+(o-s)/2);return ue+Math.floor(v/2)?e:u}case"auto":default:return a>=s&&a<=o?a:aMath.floor((1+Math.random())*65536).toString(16);let h=!1,i=!1,f="",s,g;function m(e,n){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=$(r);t.time=l,t.id=+r-0+M(),t.even=h=!h,n(t)}function $(e){const n=e.getFullYear()%100,t=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${n}-${t}-${r} ${l}:${o}:${c}`}function p(e,n){return e.read().then(({done:t,value:r})=>{const l=D.decode(r,{stream:!t});f+=l;const o=f.split(` +`),c=o[o.length-1];for(let d=0;de[t]).join("|")}let b,a;function k(e,n){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=n;const t=L(e,v);s=new WebSocket(t),s.addEventListener("error",()=>{y(e,n)}),s.addEventListener("message",function(r){m(r.data,n)})}function E(){s.close(),a&&a.abort()}function N(e){!g||!s||(s.close(),i=!1,k(e,g))}function y(e,n){if(a&&S(e)!==b)a.abort();else if(i)return;i=!0,b=S(e),a=new AbortController;const t=a.signal,{url:r,init:l}=w(e);fetch(r+v+"?level="+e.logLevel,{...l,signal:t}).then(o=>{const c=o.body.getReader();p(c,n)},o=>{i=!1,!t.aborted&&console.log("GET /logs error:",o.message)})}export{k as f,N as r,E as s}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/logs-9e380b83.js b/FILES/etc/config/clash/clash-dashboard/assets/logs-9e380b83.js deleted file mode 100644 index 66c602b..0000000 --- a/FILES/etc/config/clash/clash-dashboard/assets/logs-9e380b83.js +++ /dev/null @@ -1,2 +0,0 @@ -import{J as L,K as w,L as u}from"./index-dcea5d2f.js";const v="/logs",D=new TextDecoder("utf-8"),M=()=>Math.floor((1+Math.random())*65536).toString(16);let h=!1,i=!1,f="",s,g;function m(e,n){let t;try{t=JSON.parse(e)}catch{console.log("JSON.parse error",JSON.parse(e))}const r=new Date,l=$(r);t.time=l,t.id=+r-0+M(),t.even=h=!h,n(t)}function $(e){const n=e.getFullYear()%100,t=u(e.getMonth()+1,2),r=u(e.getDate(),2),l=u(e.getHours(),2),o=u(e.getMinutes(),2),c=u(e.getSeconds(),2);return`${n}-${t}-${r} ${l}:${o}:${c}`}function p(e,n){return e.read().then(({done:t,value:r})=>{const l=D.decode(r,{stream:!t});f+=l;const o=f.split(` -`),c=o[o.length-1];for(let d=0;de[t]).join("|")}let b,a;function k(e,n){if(e.logLevel==="uninit"||i||s&&s.readyState===1)return;g=n;const t=L(e,v);s=new WebSocket(t),s.addEventListener("error",()=>{y(e,n)}),s.addEventListener("message",function(r){m(r.data,n)})}function J(){s.close(),a&&a.abort()}function O(e){!g||!s||(s.close(),i=!1,k(e,g))}function y(e,n){if(a&&S(e)!==b)a.abort();else if(i)return;i=!0,b=S(e),a=new AbortController;const t=a.signal,{url:r,init:l}=w(e);fetch(r+v+"?level="+e.logLevel,{...l,signal:t}).then(o=>{const c=o.body.getReader();p(c,n)},o=>{i=!1,!t.aborted&&console.log("GET /logs error:",o.message)})}export{k as f,O as r,J as s}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/play-263403e0.js b/FILES/etc/config/clash/clash-dashboard/assets/play-3d48a080.js similarity index 97% rename from FILES/etc/config/clash/clash-dashboard/assets/play-263403e0.js rename to FILES/etc/config/clash/clash-dashboard/assets/play-3d48a080.js index 511a67e..a0927f1 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/play-263403e0.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/play-3d48a080.js @@ -1 +1 @@ -import{r as g,R as s,P as a}from"./index-dcea5d2f.js";function f(){return f=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function y(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var c=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=v(t,["color","size"]);return s.createElement("svg",f({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))});c.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};c.displayName="Pause";const b=c;function p(){return p=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function O(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var u=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=h(t,["color","size"]);return s.createElement("svg",p({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}))});u.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};u.displayName="Play";const w=u;export{w as P,b as a}; +import{r as g,R as s,P as a}from"./index-17fa2fa5.js";function f(){return f=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function y(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var c=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=v(t,["color","size"]);return s.createElement("svg",f({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s.createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))});c.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};c.displayName="Pause";const b=c;function p(){return p=Object.assign||function(t){for(var o=1;o=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function O(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,i;for(i=0;i=0)&&(r[n]=t[n]);return r}var u=g.forwardRef(function(t,o){var r=t.color,e=r===void 0?"currentColor":r,n=t.size,i=n===void 0?24:n,l=h(t,["color","size"]);return s.createElement("svg",p({ref:o,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),s.createElement("polygon",{points:"5 3 19 12 5 21 5 3"}))});u.propTypes={color:a.string,size:a.oneOfType([a.string,a.number])};u.displayName="Play";const w=u;export{w as P,b as a}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-054801fd.js b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-0cb185fe.js similarity index 81% rename from FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-054801fd.js rename to FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-0cb185fe.js index 4793f0a..e0f66e6 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-054801fd.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/useRemainingViewPortHeight-0cb185fe.js @@ -1 +1 @@ -import{h as r}from"./index-dcea5d2f.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u}; +import{h as r}from"./index-17fa2fa5.js";const{useState:s,useRef:u,useCallback:a,useLayoutEffect:c}=r;function d(){const t=u(null),[n,i]=s(200),e=a(()=>{const{top:o}=t.current.getBoundingClientRect();i(window.innerHeight-o)},[]);return c(()=>(e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]),[t,n]}export{d as u}; diff --git a/FILES/etc/config/clash/clash-dashboard/assets/zh-98a29f34.js b/FILES/etc/config/clash/clash-dashboard/assets/zh-715caed0.js similarity index 79% rename from FILES/etc/config/clash/clash-dashboard/assets/zh-98a29f34.js rename to FILES/etc/config/clash/clash-dashboard/assets/zh-715caed0.js index 6beab6e..cbcadbd 100644 --- a/FILES/etc/config/clash/clash-dashboard/assets/zh-98a29f34.js +++ b/FILES/etc/config/clash/clash-dashboard/assets/zh-715caed0.js @@ -1 +1 @@ -const e={All:"所有",Overview:"概览",Proxies:"代理",Rules:"规则",Conns:"连接",Config:"配置",Logs:"日志",Upload:"上传",Download:"下载","Upload Total":"上传总量","Download Total":"下载总量","Active Connections":"活动连接","Pause Refresh":"暂停刷新","Resume Refresh":"继续刷新",Up:"上传",Down:"下载","Test Latency":"延迟测速",settings:"设置",sort_in_grp:"代理组条目排序",hide_unavail_proxies:"隐藏不可用代理",auto_close_conns:"切换代理时自动断开旧连接",order_natural:"原 config 文件中的排序",order_latency_asc:"按延迟从小到大",order_latency_desc:"按延迟从大到小",order_name_asc:"按名称字母排序 (A-Z)",order_name_desc:"按名称字母排序 (Z-A)",Connections:"连接",current_backend:"当前后端",Active:"活动",switch_backend:"切换后端",Closed:"已断开",switch_theme:"切换主题",theme:"主题",about:"PaoPao GateWay",no_logs:"暂无日志...",chart_style:"流量图样式",latency_test_url:"延迟测速 URL",allow_lan_mixed:"允许局域网访问1080端口代理[http+socks5]",lang:"语言",update_all_rule_provider:"更新所有 rule provider",update_all_proxy_provider:"更新所有 proxy providers",pleaseSelectSourceIP:"请选择要审查的源ip",filterByIP:"从源IP筛选"};export{e as data}; +const e={All:"所有",Overview:"概览",Proxies:"代理",Rules:"规则",Conns:"连接",Config:"配置",Logs:"日志",Upload:"上传",Download:"下载","Upload Total":"上传总量","Download Total":"下载总量","Active Connections":"活动连接","Pause Refresh":"暂停刷新","Resume Refresh":"继续刷新",Up:"上传",Down:"下载","Test Latency":"延迟测速",settings:"设置",sort_in_grp:"代理组条目排序",hide_unavail_proxies:"隐藏不可用代理",auto_close_conns:"切换代理时自动断开旧连接",order_natural:"原 config 文件中的排序",order_latency_asc:"按延迟从小到大",order_latency_desc:"按延迟从大到小",order_name_asc:"按名称字母排序 (A-Z)",order_name_desc:"按名称字母排序 (Z-A)",Connections:"连接",current_backend:"当前后端",Active:"活动",switch_backend:"切换后端",Closed:"已断开",switch_theme:"切换主题",theme:"主题",about:"PaoPao GateWay",no_logs:"暂无日志...",chart_style:"流量图样式",latency_test_url:"延迟测速 URL",allow_lan_mixed:"允许局域网访问1080端口代理[http+socks5]",Mode:"模式(不明白请保持Global)",LogLevel:"日志等级",lang:"语言",update_all_rule_provider:"更新所有 rule provider",update_all_proxy_provider:"更新所有 proxy providers",dark_mode_pure_black_toggle_label:"在黑色主题下使用纯黑背景",pleaseSelectSourceIP:"请选择要审查的源ip",filterByIP:"从源IP筛选"};export{e as data}; diff --git a/FILES/etc/config/clash/clash-dashboard/index_base.html b/FILES/etc/config/clash/clash-dashboard/index_base.html index 98a8283..fddbe5f 100644 --- a/FILES/etc/config/clash/clash-dashboard/index_base.html +++ b/FILES/etc/config/clash/clash-dashboard/index_base.html @@ -138,8 +138,8 @@ } }); - - + + diff --git a/FILES/etc/config/clash/clash-dashboard/sw.js b/FILES/etc/config/clash/clash-dashboard/sw.js index 9849446..eabd63b 100644 --- a/FILES/etc/config/clash/clash-dashboard/sw.js +++ b/FILES/etc/config/clash/clash-dashboard/sw.js @@ -1706,7 +1706,7 @@ class ve extends V { } } ae(); -Oe([{"revision":null,"url":"assets/BaseModal-29d7cf7b.js"},{"revision":null,"url":"assets/BaseModal-ef61154c.css"},{"revision":null,"url":"assets/chart-lib-236f0953.js"},{"revision":null,"url":"assets/Config-35023b66.css"},{"revision":null,"url":"assets/Config-f50e8a52.js"},{"revision":null,"url":"assets/Connections-92103147.js"},{"revision":null,"url":"assets/Connections-f01328e8.css"},{"revision":null,"url":"assets/debounce-c1ba2006.js"},{"revision":null,"url":"assets/en-b261f0f9.js"},{"revision":null,"url":"assets/Fab-8003d842.js"},{"revision":null,"url":"assets/Fab-a0a7e573.css"},{"revision":null,"url":"assets/index-346cd228.js"},{"revision":null,"url":"assets/index-4697f19f.css"},{"revision":null,"url":"assets/index-759f7e71.js"},{"revision":null,"url":"assets/index-dcea5d2f.js"},{"revision":null,"url":"assets/index.esm-fff1f13f.js"},{"revision":null,"url":"assets/index.modern-c58ff412.js"},{"revision":null,"url":"assets/Logs-4b8e75d1.css"},{"revision":null,"url":"assets/logs-9e380b83.js"},{"revision":null,"url":"assets/Logs-c88cdced.js"},{"revision":null,"url":"assets/play-263403e0.js"},{"revision":null,"url":"assets/Proxies-1a2faf73.js"},{"revision":null,"url":"assets/Proxies-b68bae25.css"},{"revision":null,"url":"assets/Rules-9573ff0c.js"},{"revision":null,"url":"assets/Rules-e11cb70e.css"},{"revision":null,"url":"assets/Select-29e929fc.js"},{"revision":null,"url":"assets/Select-3de40504.css"},{"revision":null,"url":"assets/TextFilter-5cf71eda.js"},{"revision":null,"url":"assets/TextFilter-b21c0577.css"},{"revision":null,"url":"assets/useRemainingViewPortHeight-054801fd.js"},{"revision":null,"url":"assets/zh-98a29f34.js"},{"revision":"655d1bf701187b5ca974bdd020489590","url":"index.html"},{"revision":"402b66900e731ca748771b6fc5e7a068","url":"registerSW.js"},{"revision":"c0f9cb6aaf647e778bdc01c59944755b","url":"manifest.webmanifest"}]); +Oe([{"revision":null,"url":"assets/chart-lib-da3c73a9.js"},{"revision":null,"url":"assets/chevron-down-4da23e9b.js"},{"revision":null,"url":"assets/Config-8af30e1b.js"},{"revision":null,"url":"assets/Config-db1f64eb.css"},{"revision":null,"url":"assets/Connections-adb3a6d0.js"},{"revision":null,"url":"assets/Connections-ddae4f70.css"},{"revision":null,"url":"assets/debounce-c1ba2006.js"},{"revision":null,"url":"assets/en-4e6aa22d.js"},{"revision":null,"url":"assets/Fab-a434d836.css"},{"revision":null,"url":"assets/Fab-aebb033d.js"},{"revision":null,"url":"assets/index-0d511031.js"},{"revision":null,"url":"assets/index-17fa2fa5.js"},{"revision":null,"url":"assets/index-b2af8b42.js"},{"revision":null,"url":"assets/index-b6d3babf.css"},{"revision":null,"url":"assets/index.esm-cd2d54ba.js"},{"revision":null,"url":"assets/index.modern-c58ff412.js"},{"revision":null,"url":"assets/logs-367bea05.js"},{"revision":null,"url":"assets/Logs-5e5ee0ad.css"},{"revision":null,"url":"assets/Logs-9c71a415.js"},{"revision":null,"url":"assets/play-3d48a080.js"},{"revision":null,"url":"assets/Proxies-40f80166.css"},{"revision":null,"url":"assets/Proxies-ffaa28cd.js"},{"revision":null,"url":"assets/Rules-d0c6e66d.js"},{"revision":null,"url":"assets/Rules-e11cb70e.css"},{"revision":null,"url":"assets/Select-3de40504.css"},{"revision":null,"url":"assets/Select-54a41ffb.js"},{"revision":null,"url":"assets/TextFilter-c83c25f0.js"},{"revision":null,"url":"assets/TextFilter-ced87fc6.css"},{"revision":null,"url":"assets/useRemainingViewPortHeight-0cb185fe.js"},{"revision":null,"url":"assets/zh-715caed0.js"},{"revision":"b7830129e4765c730b0c251aa4aa4b98","url":"index.html"},{"revision":"402b66900e731ca748771b6fc5e7a068","url":"registerSW.js"},{"revision":"c0f9cb6aaf647e778bdc01c59944755b","url":"manifest.webmanifest"}]); const We = new RegExp("/[^/?]+\\.[^/]+$"); N( // Return false to exempt requests from being fulfilled by index.html.