@yoast/ai-insights-client 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-insights-client.cjs.js +158 -157
- package/dist/ai-insights-client.es.js +7801 -7507
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Yx=Object.defineProperty;var Mh=e=>{throw TypeError(e)};var Xx=(e,t,n)=>t in e?Yx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ye=(e,t,n)=>Xx(e,typeof t!="symbol"?t+"":t,n),Zc=(e,t,n)=>t.has(e)||Mh("Cannot "+n);var T=(e,t,n)=>(Zc(e,t,"read from private field"),n?n.call(e):t.get(e)),re=(e,t,n)=>t.has(e)?Mh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),G=(e,t,n,r)=>(Zc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ee=(e,t,n)=>(Zc(e,t,"access private method"),n);var Ha=(e,t,n,r)=>({set _(i){G(e,t,i,n)},get _(){return T(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),A=require("@yoast/ui-library"),z=require("react"),Jx=require("styled-components");function Zx(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const M=Zx(z);function i0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zs={},jh;function ew(){if(jh)return Zs;jh=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.parse=o,Zs.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function o(f,h){const g=new s,m=f.length;if(m<2)return g;const p=(h==null?void 0:h.decode)||u;let v=0;do{const b=f.indexOf("=",v);if(b===-1)break;const w=f.indexOf(";",v),S=w===-1?m:w;if(b>S){v=f.lastIndexOf(";",b-1)+1;continue}const x=a(f,v,b),E=l(f,b,x),C=f.slice(x,E);if(g[C]===void 0){let k=a(f,b+1,S),_=l(f,S,k);const O=p(f.slice(k,_));g[C]=O}v=S+1}while(v<m);return g}function a(f,h,g){do{const m=f.charCodeAt(h);if(m!==32&&m!==9)return h}while(++h<g);return g}function l(f,h,g){for(;h>g;){const m=f.charCodeAt(--h);if(m!==32&&m!==9)return h+1}return g}function c(f,h,g){const m=(g==null?void 0:g.encode)||encodeURIComponent;if(!e.test(f))throw new TypeError(`argument name is invalid: ${f}`);const p=m(h);if(!t.test(p))throw new TypeError(`argument val is invalid: ${h}`);let v=f+"="+p;if(!g)return v;if(g.maxAge!==void 0){if(!Number.isInteger(g.maxAge))throw new TypeError(`option maxAge is invalid: ${g.maxAge}`);v+="; Max-Age="+g.maxAge}if(g.domain){if(!n.test(g.domain))throw new TypeError(`option domain is invalid: ${g.domain}`);v+="; Domain="+g.domain}if(g.path){if(!r.test(g.path))throw new TypeError(`option path is invalid: ${g.path}`);v+="; Path="+g.path}if(g.expires){if(!d(g.expires)||!Number.isFinite(g.expires.valueOf()))throw new TypeError(`option expires is invalid: ${g.expires}`);v+="; Expires="+g.expires.toUTCString()}if(g.httpOnly&&(v+="; HttpOnly"),g.secure&&(v+="; Secure"),g.partitioned&&(v+="; Partitioned"),g.priority)switch(typeof g.priority=="string"?g.priority.toLowerCase():void 0){case"low":v+="; Priority=Low";break;case"medium":v+="; Priority=Medium";break;case"high":v+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${g.priority}`)}if(g.sameSite)switch(typeof g.sameSite=="string"?g.sameSite.toLowerCase():g.sameSite){case!0:case"strict":v+="; SameSite=Strict";break;case"lax":v+="; SameSite=Lax";break;case"none":v+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${g.sameSite}`)}return v}function u(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch(h){return f}}function d(f){return i.call(f)==="[object Date]"}return Zs}ew();/**
|
|
2
2
|
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
@@ -7,74 +7,75 @@
|
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var Ah="popstate";function Qx(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,g)=>u(h,typeof h=="string"?null:h.state,g===0?"default":void 0));let s=l(n==null?i.length-1:n),o="POP",a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function u(h,g=null,m){let p=Po(i?c().pathname:"/",h,g,m);return cn(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:wi(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let g=typeof h=="string"?Hr(h):h;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(h,g){o="PUSH";let m=u(h,g);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,g){o="REPLACE";let m=u(h,g);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let g=l(s+h),m=i[g];s=g,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function Yx(e={}){function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return Po("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:wi(i)}return Jp(t,n,null,e)}function Xx(e={}){function t(i,s){let{pathname:o="/",search:a="",hash:l=""}=Hr(i.location.hash.substring(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),Po("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(i,s){let o=i.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=i.location.href,c=l.indexOf("#");a=c===-1?l:l.slice(0,c)}return a+"#"+(typeof s=="string"?s:wi(s))}function r(i,s){cn(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(s)})`)}return Jp(t,n,r,e)}function Xe(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function cn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Jx(){return Math.random().toString(36).substring(2,10)}function Ph(e,t){return{usr:e.state,key:e.key,idx:t}}function Po(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hr(t):t,state:n,key:t&&t.key||r||Jx()}}function wi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Jp(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function d(){a="POP";let p=u(),v=p==null?null:p-c;c=p,l&&l({action:a,location:m.location,delta:v})}function f(p,v){a="PUSH";let b=Po(m.location,p,v);n&&n(b,p),c=u()+1;let x=Ph(b,c),S=m.createHref(b);try{o.pushState(x,"",S)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(p,v){a="REPLACE";let b=Po(m.location,p,v);n&&n(b,p),c=u();let x=Ph(b,c),S=m.createHref(b);o.replaceState(x,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function g(p){return Zx(p)}let m={get action(){return a},get location(){return e(i,o)},listen(p){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Ah,d),l=p,()=>{i.removeEventListener(Ah,d),l=null}},createHref(p){return t(i,p)},createURL:g,encodeLocation(p){let v=g(p);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(p){return o.go(p)}};return m}function Zx(e,t=!1){let n="http://localhost";typeof window!="undefined"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Xe(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:wi(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Zp(e,t,n="/"){return ew(e,t,n,!1)}function ew(e,t,n,r){let i=typeof t=="string"?Hr(t):t,s=or(i.pathname||"/",n);if(s==null)return null;let o=e0(e);tw(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=n0(s);a=uw(o[l],c,r)}return a}function e0(e,t=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Xe(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 c=nr([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Xe(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),e0(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:lw(c,s.index),routesMeta:u})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of t0(s.path))i(s,o,l)}),t}function t0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=t0(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function tw(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var nw=/^:[\w-]+$/,rw=3,iw=2,sw=1,ow=10,aw=-2,Th=e=>e==="*";function lw(e,t){let n=e.split("/"),r=n.length;return n.some(Th)&&(r+=aw),t&&(r+=iw),n.filter(i=>!Th(i)).reduce((i,s)=>i+(nw.test(s)?rw:s===""?sw:ow),r)}function cw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function uw(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=Os({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Os({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:nr([s,d.pathname]),pathnameBase:yw(nr([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=nr([s,d.pathnameBase]))}return o}function Os(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=dw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:d},f)=>{if(u==="*"){let g=a[f]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function dw(e,t=!1,n=!0){cn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function n0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function or(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 fw(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hr(e):e;return{pathname:n?n.startsWith("/")?n:hw(n,t):t,search:mw(r),hash:pw(i)}}function hw(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Jc(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 <Link to="..."> and the router will parse it for you.`}function gw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function r0(e){let t=gw(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function i0(e,t,n,r=!1){let i;typeof e=="string"?i=Hr(e):(i={...e},Xe(!i.pathname||!i.pathname.includes("?"),Jc("?","pathname","search",i)),Xe(!i.pathname||!i.pathname.includes("#"),Jc("#","pathname","hash",i)),Xe(!i.search||!i.search.includes("#"),Jc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=fw(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var nr=e=>e.join("/").replace(/\/\/+/g,"/"),yw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function vw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var s0=["POST","PUT","PATCH","DELETE"];new Set(s0);var bw=["GET",...s0];new Set(bw);var Ds=M.createContext(null);Ds.displayName="DataRouter";var gc=M.createContext(null);gc.displayName="DataRouterState";var o0=M.createContext({isTransitioning:!1});o0.displayName="ViewTransition";var xw=M.createContext(new Map);xw.displayName="Fetchers";var ww=M.createContext(null);ww.displayName="Await";var Nn=M.createContext(null);Nn.displayName="Navigation";var Ca=M.createContext(null);Ca.displayName="Location";var Bn=M.createContext({outlet:null,matches:[],isDataRoute:!1});Bn.displayName="Route";var af=M.createContext(null);af.displayName="RouteError";function Sw(e,{relative:t}={}){Xe(Ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=M.useContext(Nn),{hash:i,pathname:s,search:o}=_a(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:nr([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Ls(){return M.useContext(Ca)!=null}function un(){return Xe(Ls(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(Ca).location}function $h(e){Xe(Ls(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=un();return M.useMemo(()=>Os(e,n0(t)),[t,e])}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function l0(e){M.useContext(Nn).static||M.useLayoutEffect(e)}function qn(){let{isDataRoute:e}=M.useContext(Bn);return e?Rw():Cw()}function Cw(){Xe(Ls(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ds),{basename:t,navigator:n}=M.useContext(Nn),{matches:r}=M.useContext(Bn),{pathname:i}=un(),s=JSON.stringify(r0(r)),o=M.useRef(!1);return l0(()=>{o.current=!0}),M.useCallback((l,c={})=>{if(cn(o.current,a0),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=i0(l,JSON.parse(s),i,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:nr([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,s,i,e])}var _w=M.createContext(null);function kw(e){let t=M.useContext(Bn).outlet;return t&&M.createElement(_w.Provider,{value:e},t)}function _a(e,{relative:t}={}){let{matches:n}=M.useContext(Bn),{pathname:r}=un(),i=JSON.stringify(r0(n));return M.useMemo(()=>i0(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Ow(e,t){return c0(e,t)}function c0(e,t,n,r){var v;Xe(Ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=M.useContext(Nn),{matches:s}=M.useContext(Bn),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let b=u&&u.path||"";u0(l,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
*/var Dh="popstate";function tw(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,g)=>u(h,typeof h=="string"?null:h.state,g===0?"default":void 0));let s=l(n==null?i.length-1:n),o="POP",a=null;function l(h){return Math.min(Math.max(h,0),i.length-1)}function c(){return i[s]}function u(h,g=null,m){let p=$o(i?c().pathname:"/",h,g,m);return un(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:Si(h)}return{get index(){return s},get action(){return o},get location(){return c()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let g=typeof h=="string"?Ur(h):h;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(h,g){o="PUSH";let m=u(h,g);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,g){o="REPLACE";let m=u(h,g);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let g=l(s+h),m=i[g];s=g,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function nw(e={}){function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return $o("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Si(i)}return s0(t,n,null,e)}function rw(e={}){function t(i,s){let{pathname:o="/",search:a="",hash:l=""}=Ur(i.location.hash.substring(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),$o("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(i,s){let o=i.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=i.location.href,c=l.indexOf("#");a=c===-1?l:l.slice(0,c)}return a+"#"+(typeof s=="string"?s:Si(s))}function r(i,s){un(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(s)})`)}return s0(t,n,r,e)}function Xe(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function un(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function iw(){return Math.random().toString(36).substring(2,10)}function Lh(e,t){return{usr:e.state,key:e.key,idx:t}}function $o(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ur(t):t,state:n,key:t&&t.key||r||iw()}}function Si({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ur(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function s0(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function d(){a="POP";let p=u(),v=p==null?null:p-c;c=p,l&&l({action:a,location:m.location,delta:v})}function f(p,v){a="PUSH";let b=$o(m.location,p,v);n&&n(b,p),c=u()+1;let w=Lh(b,c),S=m.createHref(b);try{o.pushState(w,"",S)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(S)}s&&l&&l({action:a,location:m.location,delta:1})}function h(p,v){a="REPLACE";let b=$o(m.location,p,v);n&&n(b,p),c=u();let w=Lh(b,c),S=m.createHref(b);o.replaceState(w,"",S),s&&l&&l({action:a,location:m.location,delta:0})}function g(p){return sw(p)}let m={get action(){return a},get location(){return e(i,o)},listen(p){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Dh,d),l=p,()=>{i.removeEventListener(Dh,d),l=null}},createHref(p){return t(i,p)},createURL:g,encodeLocation(p){let v=g(p);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(p){return o.go(p)}};return m}function sw(e,t=!1){let n="http://localhost";typeof window!="undefined"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Xe(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Si(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function o0(e,t,n="/"){return ow(e,t,n,!1)}function ow(e,t,n,r){let i=typeof t=="string"?Ur(t):t,s=cr(i.pathname||"/",n);if(s==null)return null;let o=a0(e);aw(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=c0(s);a=mw(o[l],c,r)}return a}function a0(e,t=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Xe(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 c=sr([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Xe(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),a0(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:gw(c,s.index),routesMeta:u})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of l0(s.path))i(s,o,l)}),t}function l0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=l0(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function aw(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:yw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var lw=/^:[\w-]+$/,cw=3,uw=2,dw=1,fw=10,hw=-2,Ih=e=>e==="*";function gw(e,t){let n=e.split("/"),r=n.length;return n.some(Ih)&&(r+=hw),t&&(r+=uw),n.filter(i=>!Ih(i)).reduce((i,s)=>i+(lw.test(s)?cw:s===""?dw:fw),r)}function yw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function mw(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=Es({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Es({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:sr([s,d.pathname]),pathnameBase:ww(sr([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=sr([s,d.pathnameBase]))}return o}function Es(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=pw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:d},f)=>{if(u==="*"){let g=a[f]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function pw(e,t=!1,n=!0){un(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function c0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return un(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function cr(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 vw(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ur(e):e;return{pathname:n?n.startsWith("/")?n:bw(n,t):t,search:Sw(r),hash:Cw(i)}}function bw(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function eu(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 <Link to="..."> and the router will parse it for you.`}function xw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function u0(e){let t=xw(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function d0(e,t,n,r=!1){let i;typeof e=="string"?i=Ur(e):(i={...e},Xe(!i.pathname||!i.pathname.includes("?"),eu("?","pathname","search",i)),Xe(!i.pathname||!i.pathname.includes("#"),eu("#","pathname","hash",i)),Xe(!i.search||!i.search.includes("#"),eu("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=vw(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var sr=e=>e.join("/").replace(/\/\/+/g,"/"),ww=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Sw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Cw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function _w(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var f0=["POST","PUT","PATCH","DELETE"];new Set(f0);var kw=["GET",...f0];new Set(kw);var Ls=M.createContext(null);Ls.displayName="DataRouter";var yc=M.createContext(null);yc.displayName="DataRouterState";var h0=M.createContext({isTransitioning:!1});h0.displayName="ViewTransition";var Ow=M.createContext(new Map);Ow.displayName="Fetchers";var Ew=M.createContext(null);Ew.displayName="Await";var qn=M.createContext(null);qn.displayName="Navigation";var ka=M.createContext(null);ka.displayName="Location";var zn=M.createContext({outlet:null,matches:[],isDataRoute:!1});zn.displayName="Route";var ff=M.createContext(null);ff.displayName="RouteError";function Aw(e,{relative:t}={}){Xe(Is(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=M.useContext(qn),{hash:i,pathname:s,search:o}=Oa(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:sr([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Is(){return M.useContext(ka)!=null}function dn(){return Xe(Is(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(ka).location}function Rh(e){Xe(Is(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=dn();return M.useMemo(()=>Es(e,c0(t)),[t,e])}var g0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function y0(e){M.useContext(qn).static||M.useLayoutEffect(e)}function _n(){let{isDataRoute:e}=M.useContext(zn);return e?Hw():Tw()}function Tw(){Xe(Is(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Ls),{basename:t,navigator:n}=M.useContext(qn),{matches:r}=M.useContext(zn),{pathname:i}=dn(),s=JSON.stringify(u0(r)),o=M.useRef(!1);return y0(()=>{o.current=!0}),M.useCallback((l,c={})=>{if(un(o.current,g0),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=d0(l,JSON.parse(s),i,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:sr([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,s,i,e])}var Pw=M.createContext(null);function $w(e){let t=M.useContext(zn).outlet;return t&&M.createElement(Pw.Provider,{value:e},t)}function Oa(e,{relative:t}={}){let{matches:n}=M.useContext(zn),{pathname:r}=dn(),i=JSON.stringify(u0(n));return M.useMemo(()=>d0(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Mw(e,t){return m0(e,t)}function m0(e,t,n,r){var v;Xe(Is(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=M.useContext(qn),{matches:s}=M.useContext(zn),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",c=o?o.pathnameBase:"/",u=o&&o.route;{let b=u&&u.path||"";p0(l,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
11
|
|
|
12
|
-
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=un(),f;if(t){let b=typeof t=="string"?Hr(t):t;Xe(c==="/"||((v=b.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",g=h;if(c!=="/"){let b=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=Zp(e,{pathname:g});cn(u||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),cn(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=$w(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:nr([c,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:nr([c,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?M.createElement(Ca.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function Ew(){let e=Iw(),t=vw(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:s},"ErrorBoundary")," or"," ",M.createElement("code",{style:s},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:i},n):null,o)}var Aw=M.createElement(Ew,null),Pw=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?M.createElement(Bn.Provider,{value:this.props.routeContext},M.createElement(af.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Tw({routeContext:e,match:t,children:n}){let r=M.useContext(Ds);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(Bn.Provider,{value:e},n)}function $w(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);Xe(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let c=i[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:u,errors:d}=n,f=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!d||d[c.route.id]===void 0);if(c.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,c,u)=>{let d,f=!1,h=null,g=null;n&&(d=s&&c.route.id?s[c.route.id]:void 0,h=c.route.errorElement||Aw,o&&(a<0&&u===0?(u0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,g=null):a===u&&(f=!0,g=c.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),p=()=>{let v;return d?v=h:f?v=g:c.route.Component?v=M.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=l,M.createElement(Tw,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?M.createElement(Pw,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function lf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mw(e){let t=M.useContext(Ds);return Xe(t,lf(e)),t}function jw(e){let t=M.useContext(gc);return Xe(t,lf(e)),t}function Dw(e){let t=M.useContext(Bn);return Xe(t,lf(e)),t}function cf(e){let t=Dw(e),n=t.matches[t.matches.length-1];return Xe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Lw(){return cf("useRouteId")}function Iw(){var r;let e=M.useContext(af),t=jw("useRouteError"),n=cf("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Rw(){let{router:e}=Mw("useNavigate"),t=cf("useNavigate"),n=M.useRef(!1);return l0(()=>{n.current=!0}),M.useCallback(async(i,s={})=>{cn(n.current,a0),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Mh={};function u0(e,t,n){!t&&!Mh[e]&&(Mh[e]=!0,cn(!1,n))}M.memo(Fw);function Fw({routes:e,future:t,state:n}){return c0(e,void 0,n,t)}function Nw({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=M.useRef();i.current==null&&(i.current=Qx({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=M.useState({action:s.action,location:s.location}),l=M.useCallback(c=>{M.startTransition(()=>a(c))},[a]);return M.useLayoutEffect(()=>s.listen(l),[s,l]),M.createElement(uf,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function yc(e){return kw(e.context)}function Mt(e){Xe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function uf({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){Xe(!Ls(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=M.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Hr(n));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:f="default"}=n,h=M.useMemo(()=>{let g=or(l,o);return g==null?null:{location:{pathname:g,search:c,hash:u,state:d,key:f},navigationType:r}},[o,l,c,u,d,f,r]);return cn(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:M.createElement(Nn.Provider,{value:a},M.createElement(Ca.Provider,{children:t,value:h}))}function Bw({children:e,location:t}){return Ow(zu(e),t)}function zu(e,t=[]){let n=[];return M.Children.forEach(e,(r,i)=>{if(!M.isValidElement(r))return;let s=[...t,i];if(r.type===M.Fragment){n.push.apply(n,zu(r.props.children,s));return}Xe(r.type===Mt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Xe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=zu(r.props.children,s)),n.push(o)}),n}var Cl="get",_l="application/x-www-form-urlencoded";function mc(e){return e!=null&&typeof e.tagName=="string"}function qw(e){return mc(e)&&e.tagName.toLowerCase()==="button"}function zw(e){return mc(e)&&e.tagName.toLowerCase()==="form"}function Hw(e){return mc(e)&&e.tagName.toLowerCase()==="input"}function Uw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kw(e,t){return e.button===0&&(!t||t==="_self")&&!Uw(e)}var Ha=null;function Ww(){if(Ha===null)try{new FormData(document.createElement("form"),0),Ha=!1}catch(e){Ha=!0}return Ha}var Vw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zc(e){return e!=null&&!Vw.has(e)?(cn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_l}"`),null):e}function Gw(e,t){let n,r,i,s,o;if(zw(e)){let a=e.getAttribute("action");r=a?or(a,t):null,n=e.getAttribute("method")||Cl,i=Zc(e.getAttribute("enctype"))||_l,s=new FormData(e)}else if(qw(e)||Hw(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?or(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Cl,i=Zc(e.getAttribute("formenctype"))||Zc(a.getAttribute("enctype"))||_l,s=new FormData(a,e),!Ww()){let{name:c,type:u,value:d}=e;if(u==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,d)}}else{if(mc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Cl,r=null,i=_l,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function df(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function Qw(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yw(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Xw(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await Qw(s,n);return o.links?o.links():[]}return[]}));return t2(r.flat(1).filter(Yw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function jh(e,t,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?t.filter((l,c)=>{var d;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Jw(e,t,{includeHydrateFallback:n}={}){return Zw(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function Zw(e){return[...new Set(e)]}function e2(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function t2(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(e2(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var n2=new Set([100,101,204,205]);function r2(e,t){let n=typeof e=="string"?new URL(e,typeof window=="undefined"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&or(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function d0(){let e=M.useContext(Ds);return df(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function i2(){let e=M.useContext(gc);return df(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ff=M.createContext(void 0);ff.displayName="FrameworkContext";function f0(){let e=M.useContext(ff);return df(e,"You must render this element inside a <HydratedRouter> element"),e}function s2(e,t){let n=M.useContext(ff),[r,i]=M.useState(!1),[s,o]=M.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,f=M.useRef(null);M.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let m=v=>{v.forEach(b=>{o(b.isIntersecting)})},p=new IntersectionObserver(m,{threshold:.5});return f.current&&p.observe(f.current),()=>{p.disconnect()}}},[e]),M.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:Js(a,h),onBlur:Js(l,g),onMouseEnter:Js(c,h),onMouseLeave:Js(u,g),onTouchStart:Js(d,h)}]:[!1,f,{}]}function Js(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function o2({page:e,...t}){let{router:n}=d0(),r=M.useMemo(()=>Zp(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?M.createElement(l2,{page:e,matches:r,...t}):null}function a2(e){let{manifest:t,routeModules:n}=f0(),[r,i]=M.useState([]);return M.useEffect(()=>{let s=!1;return Xw(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function l2({page:e,matches:t,...n}){let r=un(),{manifest:i,routeModules:s}=f0(),{basename:o}=d0(),{loaderData:a,matches:l}=i2(),c=M.useMemo(()=>jh(e,t,l,i,r,"data"),[e,t,l,i,r]),u=M.useMemo(()=>jh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,m=!1;if(t.forEach(v=>{var x;let b=i.routes[v.route.id];!b||!b.hasLoader||(!c.some(S=>S.route.id===v.route.id)&&v.route.id in a&&((x=s[v.route.id])!=null&&x.shouldRevalidate)||b.hasClientLoader?m=!0:g.add(v.route.id))}),g.size===0)return[];let p=r2(e,o);return m&&g.size>0&&p.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,c,t,e,s]),f=M.useMemo(()=>Jw(u,i),[u,i]),h=a2(u);return M.createElement(M.Fragment,null,d.map(g=>M.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),f.map(g=>M.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),h.map(({key:g,link:m})=>M.createElement("link",{key:g,...m})))}function c2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var h0=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{h0&&(window.__reactRouterVersion="7.6.3")}catch(e){}function u2({basename:e,children:t,window:n}){let r=M.useRef();r.current==null&&(r.current=Yx({window:n,v5Compat:!0}));let i=r.current,[s,o]=M.useState({action:i.action,location:i.location}),a=M.useCallback(l=>{M.startTransition(()=>o(l))},[o]);return M.useLayoutEffect(()=>i.listen(a),[i,a]),M.createElement(uf,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}function d2({basename:e,children:t,window:n}){let r=M.useRef();r.current==null&&(r.current=Xx({window:n,v5Compat:!0}));let i=r.current,[s,o]=M.useState({action:i.action,location:i.location}),a=M.useCallback(l=>{M.startTransition(()=>o(l))},[o]);return M.useLayoutEffect(()=>i.listen(a),[i,a]),M.createElement(uf,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var g0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ur=M.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d,...f},h){let{basename:g}=M.useContext(Nn),m=typeof c=="string"&&g0.test(c),p,v=!1;if(typeof c=="string"&&m&&(p=c,h0))try{let _=new URL(window.location.href),k=c.startsWith("//")?new URL(_.protocol+c):new URL(c),$=or(k.pathname,g);k.origin===_.origin&&$!=null?c=$+k.search+k.hash:v=!0}catch(_){cn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Sw(c,{relative:i}),[x,S,w]=s2(r,f),P=y2(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:d});function C(_){t&&t(_),_.defaultPrevented||P(_)}let O=M.createElement("a",{...f,...w,href:p||b,onClick:v||s?t:C,ref:c2(h,S),target:l,"data-discover":!m&&n==="render"?"true":void 0});return x&&!m?M.createElement(M.Fragment,null,O,M.createElement(o2,{page:b})):O});Ur.displayName="Link";var f2=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let d=_a(o,{relative:c.relative}),f=un(),h=M.useContext(gc),{navigator:g,basename:m}=M.useContext(Nn),p=h!=null&&x2(d)&&a===!0,v=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=f.pathname,x=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&m&&(x=or(x,m)||x);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let w=b===v||!i&&b.startsWith(v)&&b.charAt(S)==="/",P=x!=null&&(x===v||!i&&x.startsWith(v)&&x.charAt(v.length)==="/"),C={isActive:w,isPending:P,isTransitioning:p},O=w?t:void 0,_;typeof r=="function"?_=r(C):_=[r,w?"active":null,P?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let k=typeof s=="function"?s(C):s;return M.createElement(Ur,{...c,"aria-current":O,className:_,ref:u,style:k,to:o,viewTransition:a},typeof l=="function"?l(C):l)});f2.displayName="NavLink";var h2=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Cl,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...f},h)=>{let g=v2(),m=b2(a,{relative:c}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&g0.test(a),b=x=>{if(l&&l(x),x.defaultPrevented)return;x.preventDefault();let S=x.nativeEvent.submitter,w=(S==null?void 0:S.getAttribute("formmethod"))||o;g(S||x.currentTarget,{fetcherKey:t,method:w,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:d})};return M.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});h2.displayName="Form";function g2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function y0(e){let t=M.useContext(Ds);return Xe(t,g2(e)),t}function y2(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=qn(),l=un(),c=_a(e,{relative:s});return M.useCallback(u=>{if(Kw(u,t)){u.preventDefault();let d=n!==void 0?n:wi(l)===wi(c);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,c,n,r,t,e,i,s,o])}var m2=0,p2=()=>`__${String(++m2)}__`;function v2(){let{router:e}=y0("useSubmit"),{basename:t}=M.useContext(Nn),n=Lw();return M.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:c}=Gw(r,t);if(i.navigate===!1){let u=i.fetcherKey||p2();await e.fetch(u,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function b2(e,{relative:t}={}){let{basename:n}=M.useContext(Nn),r=M.useContext(Bn);Xe(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={..._a(e||".",{relative:t})},o=un();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let u=a.toString();s.search=u?`?${u}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:nr([n,s.pathname])),wi(s)}function x2(e,t={}){let n=M.useContext(o0);Xe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=y0("useViewTransitionState"),i=_a(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=or(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=or(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Os(i.pathname,o)!=null||Os(i.pathname,s)!=null}[...n2];var Is=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Si=typeof window=="undefined"||"Deno"in globalThis;function Et(){}function w2(e,t){return typeof e=="function"?e(t):e}function Hu(e){return typeof e=="number"&&e>=0&&e!==1/0}function m0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Lr(e,t){return typeof e=="function"?e(t):e}function rn(e,t){return typeof e=="function"?e(t):e}function Dh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==hf(o,t.options))return!1}else if(!To(t.queryKey,o))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||i&&i!==t.state.fetchStatus||s&&!s(t))}function Lh(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Ci(t.options.mutationKey)!==Ci(s))return!1}else if(!To(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function hf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ci)(e)}function Ci(e){return JSON.stringify(e,(t,n)=>Ku(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function To(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>To(e[n],t[n])):!1}function Uu(e,t){if(e===t)return e;const n=Ih(e)&&Ih(t);if(n||Ku(e)&&Ku(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=Uu(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return i===o&&c===i?e:a}return t}function Il(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ih(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ku(e){if(!Rh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Rh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Rh(e){return Object.prototype.toString.call(e)==="[object Object]"}function S2(e){return new Promise(t=>{setTimeout(t,e)})}function Wu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Uu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Uu(e,t)}return t}function C2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function _2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rl=Symbol();function p0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Rl&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function v0(e,t){return typeof e=="function"?e(...t):!!e}var li,wr,Zi,Np,k2=(Np=class extends Is{constructor(){super();re(this,li);re(this,wr);re(this,Zi);V(this,Zi,t=>{if(!Si&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,wr)||this.setEventListener(A(this,Zi))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,wr))==null||t.call(this),V(this,wr,void 0))}setEventListener(t){var n;V(this,Zi,t),(n=A(this,wr))==null||n.call(this),V(this,wr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){A(this,li)!==t&&(V(this,li,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof A(this,li)=="boolean"?A(this,li):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},li=new WeakMap,wr=new WeakMap,Zi=new WeakMap,Np),gf=new k2,es,Sr,ts,Bp,O2=(Bp=class extends Is{constructor(){super();re(this,es,!0);re(this,Sr);re(this,ts);V(this,ts,t=>{if(!Si&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,Sr)||this.setEventListener(A(this,ts))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,Sr))==null||t.call(this),V(this,Sr,void 0))}setEventListener(t){var n;V(this,ts,t),(n=A(this,Sr))==null||n.call(this),V(this,Sr,t(this.setOnline.bind(this)))}setOnline(t){A(this,es)!==t&&(V(this,es,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return A(this,es)}},es=new WeakMap,Sr=new WeakMap,ts=new WeakMap,Bp),Es=new O2;function Vu(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function E2(e){return Math.min(1e3*2**e,3e4)}function b0(e){return(e!=null?e:"online")==="online"?Es.isOnline():!0}var x0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eu(e){return e instanceof x0}function w0(e){let t=!1,n=0,r=!1,i;const s=Vu(),o=m=>{var p;r||(f(new x0(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>gf.isFocused()&&(e.networkMode==="always"||Es.isOnline())&&e.canRun(),u=()=>b0(e.networkMode)&&e.canRun(),d=m=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var p;i=v=>{(r||c())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const p=n===0?e.initialPromise:void 0;try{m=p!=null?p:e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var P,C,O;if(r)return;const b=(P=e.retry)!=null?P:Si?0:3,x=(C=e.retryDelay)!=null?C:E2,S=typeof x=="function"?x(n,v):x,w=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!w){f(v);return}n++,(O=e.onFail)==null||O.call(e,n,v),S2(S).then(()=>c()?void 0:h()).then(()=>{t?f(v):g()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():h().then(g),s)}}var A2=e=>setTimeout(e,0);function P2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=A2;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ct=P2(),ci,qp,S0=(qp=class{constructor(){re(this,ci)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hu(this.gcTime)&&V(this,ci,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:Si?1/0:5*60*1e3)}clearGcTimeout(){A(this,ci)&&(clearTimeout(A(this,ci)),V(this,ci,void 0))}},ci=new WeakMap,qp),ns,ui,nn,di,pt,ca,fi,pn,Vn,zp,T2=(zp=class extends S0{constructor(t){var n;super();re(this,pn);re(this,ns);re(this,ui);re(this,nn);re(this,di);re(this,pt);re(this,ca);re(this,fi);V(this,fi,!1),V(this,ca,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,di,t.client),V(this,nn,A(this,di).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,ns,$2(this.options)),this.state=(n=t.state)!=null?n:A(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,pt))==null?void 0:t.promise}setOptions(t){this.options={...A(this,ca),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,nn).remove(this)}setData(t,n){const r=Wu(this.state.data,t,this.options);return Ee(this,pn,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ee(this,pn,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=A(this,pt))==null?void 0:r.promise;return(i=A(this,pt))==null||i.cancel(t),n?n.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,ns))}isActive(){return this.observers.some(t=>rn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Lr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!m0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,pt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,pt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,nn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(A(this,pt)&&(A(this,fi)?A(this,pt).cancel({revert:!0}):A(this,pt).cancelRetry()),this.scheduleGc()),A(this,nn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,pn,Vn).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,pt))return A(this,pt).continueRetry(),A(this,pt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(V(this,fi,!0),r.signal)})},s=()=>{const f=p0(this.options,n),g=(()=>{const m={client:A(this,di),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return V(this,fi,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,di),state:this.state,fetchFn:s};return i(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),V(this,ui,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Ee(this,pn,Vn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,p;eu(f)&&f.silent||Ee(this,pn,Vn).call(this,{type:"error",error:f}),eu(f)||((g=(h=A(this,nn).config).onError)==null||g.call(h,f,this),(p=(m=A(this,nn).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return V(this,pt,w0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,p;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(g=(h=A(this,nn).config).onSuccess)==null||g.call(h,f,this),(p=(m=A(this,nn).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Ee(this,pn,Vn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Ee(this,pn,Vn).call(this,{type:"pause"})},onContinue:()=>{Ee(this,pn,Vn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),A(this,pt).start()}},ns=new WeakMap,ui=new WeakMap,nn=new WeakMap,di=new WeakMap,pt=new WeakMap,ca=new WeakMap,fi=new WeakMap,pn=new WeakSet,Vn=function(t){const n=r=>{var i,s;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,...C0(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return V(this,ui,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return eu(o)&&o.revert&&A(this,ui)?{...A(this,ui),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,nn).notify({query:this,type:"updated",action:t})})},zp);function C0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:b0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $n,Hp,M2=(Hp=class extends Is{constructor(t={}){super();re(this,$n);this.config=t,V(this,$n,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:hf(i,n);let o=this.get(s);return o||(o=new T2({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){A(this,$n).has(t.queryHash)||(A(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=A(this,$n).get(t.queryHash);n&&(t.destroy(),n===t&&A(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,$n).get(t)}getAll(){return[...A(this,$n).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Dh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Dh(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,Hp),Mn,kt,hi,jn,br,Up,j2=(Up=class extends S0{constructor(t){super();re(this,jn);re(this,Mn);re(this,kt);re(this,hi);this.mutationId=t.mutationId,V(this,kt,t.mutationCache),V(this,Mn,[]),this.state=t.state||_0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,Mn).includes(t)||(A(this,Mn).push(t),this.clearGcTimeout(),A(this,kt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,Mn,A(this,Mn).filter(n=>n!==t)),this.scheduleGc(),A(this,kt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,Mn).length||(this.state.status==="pending"?this.scheduleGc():A(this,kt).remove(this))}continue(){var t,n;return(n=(t=A(this,hi))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,c,u,d,f,h,g,m,p,v,b,x,S,w,P,C,O,_;const n=()=>{Ee(this,jn,br).call(this,{type:"continue"})};V(this,hi,w0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,$)=>{Ee(this,jn,br).call(this,{type:"failed",failureCount:k,error:$})},onPause:()=>{Ee(this,jn,br).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,kt).canRun(this)}));const r=this.state.status==="pending",i=!A(this,hi).canStart();try{if(r)n();else{Ee(this,jn,br).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=A(this,kt).config).onMutate)==null?void 0:a.call(o,t,this));const $=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));$!==this.state.context&&Ee(this,jn,br).call(this,{type:"pending",context:$,variables:t,isPaused:i})}const k=await A(this,hi).start();return await((d=(u=A(this,kt).config).onSuccess)==null?void 0:d.call(u,k,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,k,t,this.state.context)),await((m=(g=A(this,kt).config).onSettled)==null?void 0:m.call(g,k,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,k,null,t,this.state.context)),Ee(this,jn,br).call(this,{type:"success",data:k}),k}catch(k){try{throw await((x=(b=A(this,kt).config).onError)==null?void 0:x.call(b,k,t,this.state.context,this)),await((w=(S=this.options).onError)==null?void 0:w.call(S,k,t,this.state.context)),await((C=(P=A(this,kt).config).onSettled)==null?void 0:C.call(P,void 0,k,this.state.variables,this.state.context,this)),await((_=(O=this.options).onSettled)==null?void 0:_.call(O,void 0,k,t,this.state.context)),k}finally{Ee(this,jn,br).call(this,{type:"error",error:k})}}finally{A(this,kt).runNext(this)}}},Mn=new WeakMap,kt=new WeakMap,hi=new WeakMap,jn=new WeakSet,br=function(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"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};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"}}};this.state=n(this.state),ct.batch(()=>{A(this,Mn).forEach(r=>{r.onMutationUpdate(t)}),A(this,kt).notify({mutation:this,type:"updated",action:t})})},Up);function _0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jn,vn,ua,Kp,D2=(Kp=class extends Is{constructor(t={}){super();re(this,Jn);re(this,vn);re(this,ua);this.config=t,V(this,Jn,new Set),V(this,vn,new Map),V(this,ua,0)}build(t,n,r){const i=new j2({mutationCache:this,mutationId:++za(this,ua)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){A(this,Jn).add(t);const n=Ua(t);if(typeof n=="string"){const r=A(this,vn).get(n);r?r.push(t):A(this,vn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Jn).delete(t)){const n=Ua(t);if(typeof n=="string"){const r=A(this,vn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&A(this,vn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ua(t);if(typeof n=="string"){const r=A(this,vn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=Ua(t);if(typeof n=="string"){const s=(r=A(this,vn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i=s==null?void 0:s.continue())!=null?i:Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{A(this,Jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Jn).clear(),A(this,vn).clear()})}getAll(){return Array.from(A(this,Jn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Lh(n,r))}findAll(t={}){return this.getAll().filter(n=>Lh(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(Et))))}},Jn=new WeakMap,vn=new WeakMap,ua=new WeakMap,Kp);function Ua(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Fh(e){return{onFetch:(t,n)=>{var u,d,f,h,g;const r=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{var x;let m=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=p0(t.options,t.fetchOptions),b=async(S,w,P)=>{if(m)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const O=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:w,direction:P?"backward":"forward",meta:t.options.meta};return p(j),j})(),_=await v(O),{maxPages:k}=t.options,$=P?_2:C2;return{pages:$(S.pages,_,k),pageParams:$(S.pageParams,w,k)}};if(i&&s.length){const S=i==="backward",w=S?L2:Nh,P={pages:s,pageParams:o},C=w(r,P);a=await b(P,C,S)}else{const S=e!=null?e:s.length;do{const w=l===0?(x=o[0])!=null?x:r.initialPageParam:Nh(r,a);if(l>0&&w==null)break;a=await b(a,w),l++}while(l<S)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Nh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function L2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var nt,Cr,_r,rs,is,kr,ss,os,Wp,I2=(Wp=class{constructor(e={}){re(this,nt);re(this,Cr);re(this,_r);re(this,rs);re(this,is);re(this,kr);re(this,ss);re(this,os);V(this,nt,e.queryCache||new M2),V(this,Cr,e.mutationCache||new D2),V(this,_r,e.defaultOptions||{}),V(this,rs,new Map),V(this,is,new Map),V(this,kr,0)}mount(){za(this,kr)._++,A(this,kr)===1&&(V(this,ss,gf.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,nt).onFocus())})),V(this,os,Es.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,nt).onOnline())})))}unmount(){var e,t;za(this,kr)._--,A(this,kr)===0&&((e=A(this,ss))==null||e.call(this),V(this,ss,void 0),(t=A(this,os))==null||t.call(this),V(this,os,void 0))}isFetching(e){return A(this,nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,nt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=A(this,nt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Lr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return A(this,nt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=A(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=w2(t,s);if(o!==void 0)return A(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>A(this,nt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,nt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=A(this,nt);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=A(this,nt);return ct.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ct.batch(()=>A(this,nt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Et).catch(Et)}invalidateQueries(e,t={}){return ct.batch(()=>{var n,r;return A(this,nt).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(r=(n=e==null?void 0:e.refetchType)!=null?n:e==null?void 0:e.type)!=null?r:"active"},t)})}refetchQueries(e,t={}){var i;const n={...t,cancelRefetch:(i=t.cancelRefetch)!=null?i:!0},r=ct.batch(()=>A(this,nt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Et)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=A(this,nt).build(this,t);return n.isStaleByTime(Lr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=Fh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e.behavior=Fh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Es.isOnline()?A(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,nt)}getMutationCache(){return A(this,Cr)}getDefaultOptions(){return A(this,_r)}setDefaultOptions(e){V(this,_r,e)}setQueryDefaults(e,t){A(this,rs).set(Ci(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,rs).values()],n={};return t.forEach(r=>{To(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){A(this,is).set(Ci(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,is).values()],n={};return t.forEach(r=>{To(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,_r).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=hf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,_r).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,nt).clear(),A(this,Cr).clear()}},nt=new WeakMap,Cr=new WeakMap,_r=new WeakMap,rs=new WeakMap,is=new WeakMap,kr=new WeakMap,ss=new WeakMap,os=new WeakMap,Wp),jt,$e,da,Ot,gi,as,Or,Er,fa,ls,cs,yi,mi,Ar,us,ze,fo,Gu,Qu,Yu,Xu,Ju,Zu,ed,k0,Vp,R2=(Vp=class extends Is{constructor(t,n){super();re(this,ze);re(this,jt);re(this,$e);re(this,da);re(this,Ot);re(this,gi);re(this,as);re(this,Or);re(this,Er);re(this,fa);re(this,ls);re(this,cs);re(this,yi);re(this,mi);re(this,Ar);re(this,us,new Set);this.options=n,V(this,jt,t),V(this,Er,null),V(this,Or,Vu()),this.options.experimental_prefetchInRender||A(this,Or).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,$e).addObserver(this),Bh(A(this,$e),this.options)?Ee(this,ze,fo).call(this):this.updateResult(),Ee(this,ze,Xu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return td(A(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return td(A(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,ze,Ju).call(this),Ee(this,ze,Zu).call(this),A(this,$e).removeObserver(this)}setOptions(t){const n=this.options,r=A(this,$e);if(this.options=A(this,jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof rn(this.options.enabled,A(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,ze,ed).call(this),A(this,$e).setOptions(this.options),n._defaulted&&!Il(this.options,n)&&A(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,$e),observer:this});const i=this.hasListeners();i&&qh(A(this,$e),r,this.options,n)&&Ee(this,ze,fo).call(this),this.updateResult(),i&&(A(this,$e)!==r||rn(this.options.enabled,A(this,$e))!==rn(n.enabled,A(this,$e))||Lr(this.options.staleTime,A(this,$e))!==Lr(n.staleTime,A(this,$e)))&&Ee(this,ze,Gu).call(this);const s=Ee(this,ze,Qu).call(this);i&&(A(this,$e)!==r||rn(this.options.enabled,A(this,$e))!==rn(n.enabled,A(this,$e))||s!==A(this,Ar))&&Ee(this,ze,Yu).call(this,s)}getOptimisticResult(t){const n=A(this,jt).getQueryCache().build(A(this,jt),t),r=this.createResult(n,t);return N2(this,r)&&(V(this,Ot,r),V(this,as,this.options),V(this,gi,A(this,$e).state)),r}getCurrentResult(){return A(this,Ot)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){A(this,us).add(t)}getCurrentQuery(){return A(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=A(this,jt).defaultQueryOptions(t),r=A(this,jt).getQueryCache().build(A(this,jt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return Ee(this,ze,fo).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),A(this,Ot)))}createResult(t,n){var _;const r=A(this,$e),i=this.options,s=A(this,Ot),o=A(this,gi),a=A(this,as),c=t!==r?t.state:A(this,da),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const k=this.hasListeners(),$=!k&&Bh(t,n),j=k&&qh(t,r,n,i);($||j)&&(d={...d,...C0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let k;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(k=s.data,v=!0):k=typeof n.placeholderData=="function"?n.placeholderData((_=A(this,cs))==null?void 0:_.state.data,A(this,cs)):n.placeholderData,k!==void 0&&(p="success",h=Wu(s==null?void 0:s.data,k,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===A(this,fa))h=A(this,ls);else try{V(this,fa,n.select),h=n.select(h),h=Wu(s==null?void 0:s.data,h,n),V(this,ls,h),V(this,Er,null)}catch(k){V(this,Er,k)}A(this,Er)&&(g=A(this,Er),h=A(this,ls),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",x=p==="pending",S=p==="error",w=x&&b,P=h!==void 0,O={status:p,fetchStatus:d.fetchStatus,isPending:x,isSuccess:p==="success",isError:S,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!P,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&P,isStale:yf(t,n),refetch:this.refetch,promise:A(this,Or),isEnabled:rn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=Y=>{O.status==="error"?Y.reject(O.error):O.data!==void 0&&Y.resolve(O.data)},$=()=>{const Y=V(this,Or,O.promise=Vu());k(Y)},j=A(this,Or);switch(j.status){case"pending":t.queryHash===r.queryHash&&k(j);break;case"fulfilled":(O.status==="error"||O.data!==j.value)&&$();break;case"rejected":(O.status!=="error"||O.error!==j.reason)&&$();break}}return O}updateResult(){const t=A(this,Ot),n=this.createResult(A(this,$e),this.options);if(V(this,gi,A(this,$e).state),V(this,as,this.options),A(this,gi).data!==void 0&&V(this,cs,A(this,$e)),Il(n,t))return;V(this,Ot,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!A(this,us).size)return!0;const o=new Set(s!=null?s:A(this,us));return this.options.throwOnError&&o.add("error"),Object.keys(A(this,Ot)).some(a=>{const l=a;return A(this,Ot)[l]!==t[l]&&o.has(l)})};Ee(this,ze,k0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,ze,Xu).call(this)}},jt=new WeakMap,$e=new WeakMap,da=new WeakMap,Ot=new WeakMap,gi=new WeakMap,as=new WeakMap,Or=new WeakMap,Er=new WeakMap,fa=new WeakMap,ls=new WeakMap,cs=new WeakMap,yi=new WeakMap,mi=new WeakMap,Ar=new WeakMap,us=new WeakMap,ze=new WeakSet,fo=function(t){Ee(this,ze,ed).call(this);let n=A(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Et)),n},Gu=function(){Ee(this,ze,Ju).call(this);const t=Lr(this.options.staleTime,A(this,$e));if(Si||A(this,Ot).isStale||!Hu(t))return;const r=m0(A(this,Ot).dataUpdatedAt,t)+1;V(this,yi,setTimeout(()=>{A(this,Ot).isStale||this.updateResult()},r))},Qu=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,$e)):this.options.refetchInterval)!=null?t:!1},Yu=function(t){Ee(this,ze,Zu).call(this),V(this,Ar,t),!(Si||rn(this.options.enabled,A(this,$e))===!1||!Hu(A(this,Ar))||A(this,Ar)===0)&&V(this,mi,setInterval(()=>{(this.options.refetchIntervalInBackground||gf.isFocused())&&Ee(this,ze,fo).call(this)},A(this,Ar)))},Xu=function(){Ee(this,ze,Gu).call(this),Ee(this,ze,Yu).call(this,Ee(this,ze,Qu).call(this))},Ju=function(){A(this,yi)&&(clearTimeout(A(this,yi)),V(this,yi,void 0))},Zu=function(){A(this,mi)&&(clearInterval(A(this,mi)),V(this,mi,void 0))},ed=function(){const t=A(this,jt).getQueryCache().build(A(this,jt),this.options);if(t===A(this,$e))return;const n=A(this,$e);V(this,$e,t),V(this,da,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},k0=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(A(this,Ot))}),A(this,jt).getQueryCache().notify({query:A(this,$e),type:"observerResultsUpdated"})})},Vp);function F2(e,t){return rn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bh(e,t){return F2(e,t)||e.state.data!==void 0&&td(e,t,t.refetchOnMount)}function td(e,t,n){if(rn(t.enabled,e)!==!1&&Lr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yf(e,t)}return!1}function qh(e,t,n,r){return(e!==t||rn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&yf(e,n)}function yf(e,t){return rn(t.enabled,e)!==!1&&e.isStaleByTime(Lr(t.staleTime,e))}function N2(e,t){return!Il(e.getCurrentResult(),t)}var Pr,Tr,Dt,Zn,sr,kl,nd,Gp,B2=(Gp=class extends Is{constructor(n,r){super();re(this,sr);re(this,Pr);re(this,Tr);re(this,Dt);re(this,Zn);V(this,Pr,n),this.setOptions(r),this.bindMethods(),Ee(this,sr,kl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=A(this,Pr).defaultMutationOptions(n),Il(this.options,r)||A(this,Pr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,Dt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ci(r.mutationKey)!==Ci(this.options.mutationKey)?this.reset():((i=A(this,Dt))==null?void 0:i.state.status)==="pending"&&A(this,Dt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=A(this,Dt))==null||n.removeObserver(this)}onMutationUpdate(n){Ee(this,sr,kl).call(this),Ee(this,sr,nd).call(this,n)}getCurrentResult(){return A(this,Tr)}reset(){var n;(n=A(this,Dt))==null||n.removeObserver(this),V(this,Dt,void 0),Ee(this,sr,kl).call(this),Ee(this,sr,nd).call(this)}mutate(n,r){var i;return V(this,Zn,r),(i=A(this,Dt))==null||i.removeObserver(this),V(this,Dt,A(this,Pr).getMutationCache().build(A(this,Pr),this.options)),A(this,Dt).addObserver(this),A(this,Dt).execute(n)}},Pr=new WeakMap,Tr=new WeakMap,Dt=new WeakMap,Zn=new WeakMap,sr=new WeakSet,kl=function(){var r,i;const n=(i=(r=A(this,Dt))==null?void 0:r.state)!=null?i:_0();V(this,Tr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},nd=function(n){ct.batch(()=>{var r,i,s,o,a,l,c,u;if(A(this,Zn)&&this.hasListeners()){const d=A(this,Tr).variables,f=A(this,Tr).context;(n==null?void 0:n.type)==="success"?((i=(r=A(this,Zn)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=A(this,Zn)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=A(this,Zn)).onError)==null||l.call(a,n.error,d,f),(u=(c=A(this,Zn)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(A(this,Tr))})})},Gp),O0=M.createContext(void 0),ur=e=>{const t=M.useContext(O0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},q2=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(O0.Provider,{value:e,children:t})),E0=M.createContext(!1),z2=()=>M.useContext(E0);E0.Provider;function H2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var U2=M.createContext(H2()),K2=()=>M.useContext(U2),W2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},V2=e=>{M.useEffect(()=>{e.clearReset()},[e])},G2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||v0(n,[e.error,r])),Q2=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r!=null?r:1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Y2=(e,t)=>e.isLoading&&e.isFetching&&!t,X2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function J2(e,t,n){var d,f,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=z2(),i=K2(),s=ur(n),o=s.defaultQueryOptions(e);(f=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?"isRestoring":"optimistic",Q2(o),W2(o,i),V2(i);const a=!s.getQueryCache().get(o.queryHash),[l]=M.useState(()=>new t(s,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(p=>{const v=u?l.subscribe(ct.batchCalls(p)):Et;return l.updateResult(),v},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setOptions(o)},[o,l]),X2(o,c))throw zh(o,l,i);if(G2({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((g=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,o,c),o.experimental_prefetchInRender&&!Si&&Y2(c,r)){const p=a?zh(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(Et).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function dr(e,t){return J2(e,R2,t)}function $i(e,t){const n=ur(t),[r]=M.useState(()=>new B2(n,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const i=M.useSyncExternalStore(M.useCallback(o=>r.subscribe(ct.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=M.useCallback((o,a)=>{r.mutate(o,a).catch(Et)},[r]);if(i.error&&v0(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Se={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Hh(this.context.count)},getNextContextId(){return Hh(this.context.count++)}};function Hh(e){const t=String(e),n=t.length-1;return Se.context.id+(n?String.fromCharCode(96+n):"")+t}function ho(e){Se.context=e}var A0=!1,Z2=(e,t)=>e===t,Fl=Symbol("solid-proxy"),P0=typeof Proxy=="function",pc=Symbol("solid-track"),Nl={equals:Z2},T0=I0,fr=1,Bl=2,$0={owned:null,cleanups:null,context:null,owner:null},tu={},Ie=null,nu=null,eS=null,Ve=null,St=null,rr=null,vc=0;function ir(e,t){const n=Ve,r=Ie,i=e.length===0,s=t===void 0?r:t,o=i?$0:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>tt(()=>$o(o)));Ie=o,Ve=null;try{return In(a,!0)}finally{Ve=n,Ie=r}}function ne(e,t){t=t?Object.assign({},Nl,t):Nl;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),L0(n,i));return[D0.bind(n),r]}function M0(e,t,n){const r=bc(e,t,!0,fr);Rs(r)}function pe(e,t,n){const r=bc(e,t,!1,fr);Rs(r)}function ve(e,t,n){T0=dS;const r=bc(e,t,!1,fr);(!n||!n.render)&&(r.user=!0),rr?rr.push(r):Rs(r)}function q(e,t,n){n=n?Object.assign({},Nl,n):Nl;const r=bc(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Rs(r),D0.bind(r)}function tS(e){return e&&typeof e=="object"&&"then"in e}function nS(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=tu,l=null,c=!1,u="initialValue"in s,d=typeof r=="function"&&q(r);const f=new Set,[h,g]=(s.storage||ne)(s.initialValue),[m,p]=ne(void 0),[v,b]=ne(void 0,{equals:!1}),[x,S]=ne(u?"ready":"unresolved");Se.context&&(l=Se.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Se.load&&Se.has(l)&&(a=Se.load(l)));function w(_,k,$,j){return o===_&&(o=null,j!==void 0&&(u=!0),(_===a||k===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(j,{value:k})),a=tu,P(k,$)),k}function P(_,k){In(()=>{k===void 0&&g(()=>_),S(k!==void 0?"errored":u?"ready":"unresolved"),p(k);for(const $ of f.keys())$.decrement();f.clear()},!1)}function C(){const _=lS,k=h(),$=m();if($!==void 0&&!o)throw $;return Ve&&Ve.user,k}function O(_=!0){if(_!==!1&&c)return;c=!1;const k=d?d():r;if(k==null||k===!1){w(o,tt(h));return}const $=a!==tu?a:tt(()=>i(k,{value:h(),refetching:_}));return tS($)?(o=$,"value"in $?($.status==="success"?w(o,$.value,void 0,k):w(o,void 0,rd($.value),k),$):(c=!0,queueMicrotask(()=>c=!1),In(()=>{S(u?"refreshing":"pending"),b()},!1),$.then(j=>w($,j,void 0,k),j=>w($,void 0,rd(j),k)))):(w(o,$,void 0,k),$)}return Object.defineProperties(C,{state:{get:()=>x()},error:{get:()=>m()},loading:{get(){const _=x();return _==="pending"||_==="refreshing"}},latest:{get(){if(!u)return C();const _=m();if(_&&!o)throw _;return h()}}}),d?M0(()=>O(!1)):O(!1),[C,{refetch:O,mutate:g}]}function rS(e){return In(e,!1)}function tt(e){if(Ve===null)return e();const t=Ve;Ve=null;try{return e()}finally{Ve=t}}function ar(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(s)return s=!1,o;const l=tt(()=>t(a,i,o));return i=a,l}}function lr(e){ve(()=>tt(e))}function be(e){return Ie===null||(Ie.cleanups===null?Ie.cleanups=[e]:Ie.cleanups.push(e)),e}function Uh(){return Ie}function iS(e,t){const n=Ie,r=Ve;Ie=e,Ve=null;try{return In(t,!0)}catch(i){mf(i)}finally{Ie=n,Ve=r}}function sS(e){const t=Ve,n=Ie;return Promise.resolve().then(()=>{Ve=t,Ie=n;let r;return In(e,!1),Ve=Ie=null,r?r.done:void 0})}var[oS,jF]=ne(!1);function aS(){return[oS,sS]}function yt(e,t){const n=Symbol("context");return{id:n,Provider:fS(n),defaultValue:e}}function mt(e){let t;return Ie&&Ie.context&&(t=Ie.context[e.id])!==void 0?t:e.defaultValue}function j0(e){const t=q(e),n=q(()=>id(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var lS;function D0(){if(this.sources&&this.state)if(this.state===fr)Rs(this);else{const e=St;St=null,In(()=>zl(this),!1),St=e}if(Ve){const e=this.observers?this.observers.length:0;Ve.sources?(Ve.sources.push(this),Ve.sourceSlots.push(e)):(Ve.sources=[this],Ve.sourceSlots=[e]),this.observers?(this.observers.push(Ve),this.observerSlots.push(Ve.sources.length-1)):(this.observers=[Ve],this.observerSlots=[Ve.sources.length-1])}return this.value}function L0(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&In(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=nu&&nu.running;o&&nu.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?St.push(s):rr.push(s),s.observers&&R0(s)),o||(s.state=fr)}if(St.length>1e6)throw St=[],new Error},!1)),t}function Rs(e){if(!e.fn)return;$o(e);const t=vc;cS(e,e.value,t)}function cS(e,t,n){let r;const i=Ie,s=Ve;Ve=Ie=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=fr,e.owned&&e.owned.forEach($o),e.owned=null),e.updatedAt=n+1,mf(o)}finally{Ve=s,Ie=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?L0(e,r):e.value=r,e.updatedAt=n)}function bc(e,t,n,r=fr,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ie,context:Ie?Ie.context:null,pure:n};return Ie===null||Ie!==$0&&(Ie.owned?Ie.owned.push(s):Ie.owned=[s]),s}function ql(e){if(e.state===0)return;if(e.state===Bl)return zl(e);if(e.suspense&&tt(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<vc);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===fr)Rs(e);else if(e.state===Bl){const r=St;St=null,In(()=>zl(e,t[0]),!1),St=r}}function In(e,t){if(St)return e();let n=!1;t||(St=[]),rr?n=!0:rr=[],vc++;try{const r=e();return uS(n),r}catch(r){n||(rr=null),St=null,mf(r)}}function uS(e){if(St&&(I0(St),St=null),e)return;const t=rr;rr=null,t.length&&In(()=>T0(t),!1)}function I0(e){for(let t=0;t<e.length;t++)ql(e[t])}function dS(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:ql(r)}if(Se.context){if(Se.count){Se.effects||(Se.effects=[]),Se.effects.push(...e.slice(0,n));return}ho()}for(Se.effects&&(Se.done||!Se.count)&&(e=[...Se.effects,...e],n+=Se.effects.length,delete Se.effects),t=0;t<n;t++)ql(e[t])}function zl(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===fr?r!==t&&(!r.updatedAt||r.updatedAt<vc)&&ql(r):i===Bl&&zl(r,t)}}}function R0(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Bl,n.pure?St.push(n):rr.push(n),n.observers&&R0(n))}}function $o(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)$o(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)$o(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function rd(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function mf(e,t=Ie){throw rd(e)}function id(e){if(typeof e=="function"&&!e.length)return id(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=id(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function fS(e,t){return function(r){let i;return pe(()=>i=tt(()=>(Ie.context={...Ie.context,[e]:r.value},j0(()=>r.children))),void 0),i}}var sd=Symbol("fallback");function Hl(e){for(let t=0;t<e.length;t++)e[t]()}function hS(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return be(()=>Hl(s)),()=>{let l=e()||[],c=l.length,u,d;return l[pc],tt(()=>{let h,g,m,p,v,b,x,S,w;if(c===0)o!==0&&(Hl(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[sd],i[0]=ir(P=>(s[0]=P,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d<c;d++)r[d]=l[d],i[d]=ir(f);o=c}else{for(m=new Array(c),p=new Array(c),a&&(v=new Array(c)),b=0,x=Math.min(o,c);b<x&&r[b]===l[b];b++);for(x=o-1,S=c-1;x>=b&&S>=b&&r[x]===l[S];x--,S--)m[S]=i[x],p[S]=s[x],a&&(v[S]=a[x]);for(h=new Map,g=new Array(S+1),d=S;d>=b;d--)w=l[d],u=h.get(w),g[d]=u===void 0?-1:u,h.set(w,d);for(u=b;u<=x;u++)w=r[u],d=h.get(w),d!==void 0&&d!==-1?(m[d]=i[u],p[d]=s[u],a&&(v[d]=a[u]),d=g[d],h.set(w,d)):s[u]();for(d=b;d<c;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=ir(f);i=i.slice(0,o=c),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[g,m]=ne(d);return a[d]=m,t(l[d],g)}return t(l[d])}}}function gS(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return be(()=>Hl(s)),()=>{const c=e()||[],u=c.length;return c[pc],tt(()=>{if(u===0)return a!==0&&(Hl(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[sd],i[0]=ir(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===sd&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?o[l](()=>c[l]):l>=r.length&&(i[l]=ir(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=u,r=c.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,g]=ne(c[l]);return o[l]=g,t(h,l)}}}function T(e,t){return tt(()=>e(t||{}))}function Ka(){return!0}var od={get(e,t,n){return t===Fl?n:e.get(t)},has(e,t){return t===Fl?!0:e.has(t)},set:Ka,deleteProperty:Ka,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ka,deleteProperty:Ka}},ownKeys(e){return e.keys()}};function ru(e){return(e=typeof e=="function"?e():e)?e:{}}function yS(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Ce(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&Fl in a,e[o]=typeof a=="function"?(t=!0,q(a)):a}if(P0&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=ru(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in ru(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(ru(e[a])));return[...new Set(o)]}},od);const n={},r=Object.create(null);for(let o=e.length-1;o>=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:yS.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function He(e,...t){if(P0&&Fl in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},od));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},od)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const c of t)c.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function F0(e){let t,n;const r=i=>{const s=Se.context;if(s){const[a,l]=ne();Se.count||(Se.count=0),Se.count++,(n||(n=e())).then(c=>{!Se.done&&ho(s),Se.count--,l(()=>c.default),ho()}),t=a}else if(!t){const[a]=nS(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return q(()=>(o=t())?tt(()=>{if(!s||Se.done)return o(i);const a=Se.context;ho(s);const l=o(i);return ho(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var mS=0;function dn(){return Se.context?Se.getNextContextId():`cl-${mS++}`}var N0=e=>`Stale read from <${e}>.`;function pS(e){const t="fallback"in e&&{fallback:()=>e.fallback};return q(hS(()=>e.each,e.children,t||void 0))}function vS(e){const t="fallback"in e&&{fallback:()=>e.fallback};return q(gS(()=>e.each,e.children,t||void 0))}function me(e){const t=e.keyed,n=q(()=>e.when,void 0,void 0),r=t?n:q(n,void 0,{equals:(i,s)=>!i==!s});return q(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?tt(()=>s(t?i:()=>{if(!tt(r))throw N0("Show");return n()})):s}return e.fallback},void 0,void 0)}function bS(e){const t=j0(()=>e.children),n=q(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;o<i.length;o++){const a=o,l=i[o],c=s,u=q(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:q(u,void 0,{equals:(f,h)=>!f==!h});s=()=>c()||(d()?[a,u,l]:void 0)}return s});return q(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?tt(()=>a(o.keyed?s():()=>{var c;if(((c=tt(n)())==null?void 0:c[0])!==i)throw N0("Match");return s()})):a},void 0,void 0)}function iu(e){return e}var xS=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],wS=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...xS]),SS=new Set(["innerHTML","textContent","innerText","children"]),CS=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),_S=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function kS(e,t){const n=_S[e];return typeof n=="object"?n[t]?n.$:void 0:n}var OS=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),ES=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),AS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function PS(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,c=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const u=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],u)}else if(s===a)for(;o<i;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],u),t[i]=n[s]}else{if(!c){c=new Map;let d=a;for(;d<s;)c.set(n[d],d++)}const u=c.get(t[o]);if(u!=null)if(a<u&&u<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-a){const g=t[o];for(;a<u;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var So="_$DX_DELEGATE";function B0(e,t,n,r={}){let i;return ir(s=>{i=s,t===document?e():U(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function de(e,t,n,r){let i;const s=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function xc(e,t=window.document){const n=t[So]||(t[So]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,H0))}}function TS(e=window.document){if(e[So]){for(let t of e[So].keys())e.removeEventListener(t,H0);delete e[So]}}function G(e,t,n){Mi(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function $S(e,t,n,r){Mi(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function MS(e,t,n){Mi(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Q(e,t){Mi(e)||(t==null?e.removeAttribute("class"):e.className=t)}function q0(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function jS(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Kh(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Kh(e,a,!0),n[a]=l)}return n}function DS(e,t,n){if(!t)return n?G(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function z0(e,t={},n,r){const i={};return r||pe(()=>i.children=Mo(e,t.children,i.children)),pe(()=>typeof t.ref=="function"&&Fs(t.ref,e)),pe(()=>LS(e,t,n,!0,i,!0)),i}function Fs(e,t,n){return tt(()=>e(t,n))}function U(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Mo(e,t,r,n);pe(i=>Mo(e,t(),i,n),r)}function LS(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Wh(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=Wh(e,o,a,i[o],n,s,t)}}function IS(e){let t,n;return!Mi()||!(t=Se.registry.get(n=FS()))?e():(Se.completed&&Se.completed.add(t),Se.registry.delete(n),t)}function Mi(e){return!!Se.context&&!Se.done&&(!e||e.isConnected)}function RS(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Kh(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function Wh(e,t,n,r,i,s,o){let a,l,c,u,d;if(t==="style")return DS(e,n,r);if(t==="classList")return jS(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=OS.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(q0(e,f,n,h),h&&xc([f]))}else if(t.slice(0,5)==="attr:")G(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")MS(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=SS.has(t))||!i&&((u=kS(t,e.tagName))||(l=wS.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(d)t=t.slice(5),l=!0;else if(Mi(e))return n;t==="class"||t==="className"?Q(e,n):a&&!l&&!c?e[RS(t)]=n:e[u||t]=n}else{const f=i&&t.indexOf(":")>-1&&AS[t.split(":")[0]];f?$S(e,f,t,n):G(e,CS[t]||t,n)}return n}function H0(e){if(Se.registry&&Se.events&&Se.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Se.registry&&!Se.done&&(Se.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!o());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function Mo(e,t,n,r,i){const s=Mi(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(s||o==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Ri(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(s)return n;n=Ri(e,n,r)}else{if(o==="function")return pe(()=>{let l=t();for(;typeof l=="function";)l=l();n=Mo(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(ad(l,t,n,i))return pe(()=>n=Mo(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Ri(e,n,r),a)return n}else c?n.length===0?Vh(e,l,r):PS(e,n,l):(n&&Ri(e),Vh(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Ri(e,n,r,t);Ri(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ad(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=ad(e,a,l)||i;else if(c==="function")if(r){for(;typeof a=="function";)a=a();i=ad(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return i}function Vh(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Ri(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function FS(){return Se.getNextContextId()}var NS="http://www.w3.org/2000/svg";function U0(e,t=!1){return t?document.createElementNS(NS,e):document.createElement(e)}function K0(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Uh();let s,o=!!Se.context;return ve(()=>{o&&(Uh().user=o=!1),s||(s=iS(i,()=>q(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=ne(!1),u=()=>c(!0);ir(d=>U(a,()=>l()?d():s(),null)),be(u)}else{const l=U0(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),U(c,s),a.appendChild(l),e.ref&&e.ref(l),be(()=>a.removeChild(l))}},void 0,{render:!o}),n}function BS(e,t){const n=q(e);return q(()=>{const r=n();switch(typeof r){case"function":return tt(()=>r(t));case"string":const i=ES.has(r),s=Se.context?IS():U0(r,i);return z0(s,t,i),s}})}function qS(e){const[,t]=He(e,["component"]);return BS(()=>e.component,t)}var zS=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},W0=class{constructor(t){this.generateIdentifier=t,this.kv=new zS}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},HS=class extends W0{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function US(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function KS(e,t){const n=US(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function As(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Ol(e,t){return e.indexOf(t)!==-1}function Gh(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var WS=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return KS(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},VS=e=>Object.prototype.toString.call(e).slice(8,-1),V0=e=>typeof e=="undefined",GS=e=>e===null,jo=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,ld=e=>jo(e)&&Object.keys(e).length===0,Fr=e=>Array.isArray(e),QS=e=>typeof e=="string",YS=e=>typeof e=="number"&&!isNaN(e),XS=e=>typeof e=="boolean",JS=e=>e instanceof RegExp,Do=e=>e instanceof Map,Lo=e=>e instanceof Set,G0=e=>VS(e)==="Symbol",ZS=e=>e instanceof Date&&!isNaN(e.valueOf()),eC=e=>e instanceof Error,Qh=e=>typeof e=="number"&&isNaN(e),tC=e=>XS(e)||GS(e)||V0(e)||YS(e)||QS(e)||G0(e),nC=e=>typeof e=="bigint",rC=e=>e===1/0||e===-1/0,iC=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),sC=e=>e instanceof URL,Q0=e=>e.replace(/\./g,"\\."),su=e=>e.map(String).map(Q0).join("."),Co=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function _n(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Y0=[_n(V0,"undefined",()=>null,()=>{}),_n(nC,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),_n(ZS,"Date",e=>e.toISOString(),e=>new Date(e)),_n(eC,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),_n(JS,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),_n(Lo,"set",e=>[...e.values()],e=>new Set(e)),_n(Do,"map",e=>[...e.entries()],e=>new Map(e)),_n(e=>Qh(e)||rC(e),"number",e=>Qh(e)?"NaN":e>0?"Infinity":"-Infinity",Number),_n(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),_n(sC,"URL",e=>e.toString(),e=>new URL(e))];function wc(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var X0=wc((e,t)=>G0(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),oC=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),J0=wc(iC,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=oC[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Z0(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var ev=wc(Z0,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),tv=wc((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),aC=[ev,X0,tv,J0],Yh=(e,t)=>{const n=Gh(aC,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=Gh(Y0,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},nv={};Y0.forEach(e=>{nv[e.annotation]=e});var lC=(e,t,n)=>{if(Fr(t))switch(t[0]){case"symbol":return X0.untransform(e,t,n);case"class":return ev.untransform(e,t,n);case"custom":return tv.untransform(e,t,n);case"typed-array":return J0.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=nv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Ki=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function rv(e){if(Ol(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ol(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ol(e,"constructor"))throw new Error("constructor is not allowed as a property")}var cC=(e,t)=>{rv(t);for(let n=0;n<t.length;n++){const r=t[n];if(Lo(e))e=Ki(e,+r);else if(Do(e)){const i=+r,s=+t[++n]==0?"key":"value",o=Ki(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},cd=(e,t,n)=>{if(rv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(Fr(r)){const a=+o;r=r[a]}else if(jo(r))r=r[o];else if(Lo(r)){const a=+o;r=Ki(r,a)}else if(Do(r)){if(s===t.length-2)break;const l=+o,c=+t[++s]==0?"key":"value",u=Ki(r,l);switch(c){case"key":r=u;break;case"value":r=r.get(u);break}}}const i=t[t.length-1];if(Fr(r)?r[+i]=n(r[+i]):jo(r)&&(r[i]=n(r[i])),Lo(r)){const s=Ki(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(Do(r)){const s=+t[t.length-2],o=Ki(r,s);switch(+i==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function ud(e,t,n=[]){if(!e)return;if(!Fr(e)){As(e,(s,o)=>ud(s,t,[...n,...Co(o)]));return}const[r,i]=e;i&&As(i,(s,o)=>{ud(s,t,[...n,...Co(o)])}),t(r,n)}function uC(e,t,n){return ud(t,(r,i)=>{e=cd(e,i,s=>lC(s,r,n))}),e}function dC(e,t){function n(r,i){const s=cC(e,Co(i));r.map(Co).forEach(o=>{e=cd(e,o,()=>s)})}if(Fr(t)){const[r,i]=t;r.forEach(s=>{e=cd(e,Co(s),()=>e)}),i&&As(i,n)}else As(t,n);return e}var fC=(e,t)=>jo(e)||Fr(e)||Do(e)||Lo(e)||Z0(e,t);function hC(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function gC(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[s,...o]=i;s.length===0?r=o.map(su):n[su(s)]=o.map(su)}),r?ld(n)?[r]:[r,n]:ld(n)?void 0:n}var iv=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=tC(e);if(!a){hC(e,i,t);const g=o.get(e);if(g)return r?{transformedValue:null}:g}if(!fC(e,n)){const g=Yh(e,n),m=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Ol(s,e))return{transformedValue:null};const l=Yh(e,n),c=(h=l==null?void 0:l.value)!=null?h:e,u=Fr(c)?[]:{},d={};As(c,(g,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const p=iv(g,t,n,r,[...i,m],[...s,e],o);u[m]=p.transformedValue,Fr(p.annotations)?d[m]=p.annotations:jo(p.annotations)&&As(p.annotations,(v,b)=>{d[Q0(m)+"."+b]=v})});const f=ld(d)?{transformedValue:u,annotations:l?[l.type]:void 0}:{transformedValue:u,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function sv(e){return Object.prototype.toString.call(e).slice(8,-1)}function Xh(e){return sv(e)==="Array"}function yC(e){if(sv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function mC(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function dd(e,t={}){if(Xh(e))return e.map(i=>dd(i,t));if(!yC(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(Xh(t.props)&&!t.props.includes(s))return i;const o=e[s],a=dd(o,t);return mC(i,s,a,e,t.nonenumerable),i},{})}var Ge=class{constructor({dedupe:e=!1}={}){this.classRegistry=new HS,this.symbolRegistry=new W0(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new WS,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=iv(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=gC(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=dd(t);return n!=null&&n.values&&(r=uC(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=dC(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Ge.defaultInstance=new Ge;Ge.serialize=Ge.defaultInstance.serialize.bind(Ge.defaultInstance);Ge.deserialize=Ge.defaultInstance.deserialize.bind(Ge.defaultInstance);Ge.stringify=Ge.defaultInstance.stringify.bind(Ge.defaultInstance);Ge.parse=Ge.defaultInstance.parse.bind(Ge.defaultInstance);Ge.registerClass=Ge.defaultInstance.registerClass.bind(Ge.defaultInstance);Ge.registerSymbol=Ge.defaultInstance.registerSymbol.bind(Ge.defaultInstance);Ge.registerCustom=Ge.defaultInstance.registerCustom.bind(Ge.defaultInstance);Ge.allowErrorProps=Ge.defaultInstance.allowErrorProps.bind(Ge.defaultInstance);var ov=Ge.serialize,pC=Ge.stringify;function zi(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function vC(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function bC({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function Wi({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function xC(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var Ul=(e,t=!1)=>{const{json:n}=ov(e);return JSON.stringify(n,null,t?2:void 0)},Wa=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,wC=(e,t)=>e.queryHash.localeCompare(t.queryHash),av=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,SC=(e,t)=>Wa(e)===Wa(t)?av(e,t):Wa(e)>Wa(t)?1:-1,fd={status:SC,"query hash":wC,"last updated":av},Va=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,lv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,CC=(e,t)=>Va(e)===Va(t)?lv(e,t):Va(e)>Va(t)?1:-1,hd={status:CC,"last updated":lv},Jh=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),cv=()=>{const[e,t]=ne("dark");return lr(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");t(n.matches?"dark":"light");const r=i=>{t(i.matches?"dark":"light")};n.addEventListener("change",r),be(()=>n.removeEventListener("change",r))}),e},si=(e,t,n)=>{if(t.length===0)return n;if(e instanceof Map){const r=new Map(e);if(t.length===1)return r.set(t[0],n),r;const[i,...s]=t;return r.set(i,si(r.get(i),s,n)),r}if(e instanceof Set){const r=si(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=si(r[i],s,n),r}if(e instanceof Object){const r={...e};if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=si(r[i],s,n),r}return e},go=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(t.length===1)return n.delete(t[0]),n;const[r,...i]=t;return n.set(r,go(n.get(r),i)),n}if(e instanceof Set){const n=go(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(t.length===1)return n.filter((s,o)=>o.toString()!==t[0]);const[r,...i]=t;return n[r]=go(n[r],i),n}if(e instanceof Object){const n={...e};if(t.length===1)return delete n[t[0]],n;const[r,...i]=t;return n[r]=go(n[r],i),n}return e},uv=(e,t)=>{if(!e||document.querySelector("#_goober")||(t==null?void 0:t.querySelector("#_goober")))return;const r=document.createElement("style"),i=document.createTextNode("");r.appendChild(i),r.id="_goober",r.setAttribute("nonce",e),t?t.appendChild(r):document.head.appendChild(r)},ds,ha,ga,ya,pi,ma,fs,hs,gs,ys,ms,ps,pa,Qp,_C=(Qp=class{constructor(e){re(this,ds);re(this,ha);re(this,ga);re(this,ya);re(this,pi,!1);re(this,ma);re(this,fs);re(this,hs);re(this,gs);re(this,ys);re(this,ms);re(this,ps);re(this,pa);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}=e;V(this,ds,ne(t)),V(this,ga,n),V(this,ya,r),V(this,ha,i),V(this,ma,c),V(this,fs,u),V(this,hs,ne(s)),V(this,gs,ne(o)),V(this,ys,ne(a)),V(this,ms,ne(l))}setButtonPosition(e){A(this,hs)[1](e)}setPosition(e){A(this,gs)[1](e)}setInitialIsOpen(e){A(this,ys)[1](e)}setErrorTypes(e){A(this,ms)[1](e)}setClient(e){A(this,ds)[1](e)}mount(e){if(A(this,pi))throw new Error("Devtools is already mounted");const t=B0(()=>{const n=this,[r]=A(this,hs),[i]=A(this,gs),[s]=A(this,ys),[o]=A(this,ms),[a]=A(this,ds);let l;return A(this,ps)?l=A(this,ps):(l=F0(()=>Promise.resolve().then(()=>XI)),V(this,ps,l)),uv(A(this,ma),A(this,fs)),T(l,Ce({get queryFlavor(){return A(n,ga)},get version(){return A(n,ya)},get onlineManager(){return A(n,ha)},get shadowDOMTarget(){return A(n,fs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);V(this,pi,!0),V(this,pa,t)}unmount(){var e;if(!A(this,pi))throw new Error("Devtools is not mounted");(e=A(this,pa))==null||e.call(this),V(this,pi,!1)}},ds=new WeakMap,ha=new WeakMap,ga=new WeakMap,ya=new WeakMap,pi=new WeakMap,ma=new WeakMap,fs=new WeakMap,hs=new WeakMap,gs=new WeakMap,ys=new WeakMap,ms=new WeakMap,ps=new WeakMap,pa=new WeakMap,Qp),vs,va,ba,xa,vi,wa,bs,xs,ws,Ss,Cs,_s,ks,Sa,Yp,kC=(Yp=class{constructor(e){re(this,vs);re(this,va);re(this,ba);re(this,xa);re(this,vi,!1);re(this,wa);re(this,bs);re(this,xs);re(this,ws);re(this,Ss);re(this,Cs);re(this,_s);re(this,ks);re(this,Sa);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u,onClose:d}=e;V(this,vs,ne(t)),V(this,ba,n),V(this,xa,r),V(this,va,i),V(this,wa,c),V(this,bs,u),V(this,xs,ne(s)),V(this,ws,ne(o)),V(this,Ss,ne(a)),V(this,Cs,ne(l)),V(this,_s,ne(d))}setButtonPosition(e){A(this,xs)[1](e)}setPosition(e){A(this,ws)[1](e)}setInitialIsOpen(e){A(this,Ss)[1](e)}setErrorTypes(e){A(this,Cs)[1](e)}setClient(e){A(this,vs)[1](e)}setOnClose(e){A(this,_s)[1](()=>e)}mount(e){if(A(this,vi))throw new Error("Devtools is already mounted");const t=B0(()=>{const n=this,[r]=A(this,xs),[i]=A(this,ws),[s]=A(this,Ss),[o]=A(this,Cs),[a]=A(this,vs),[l]=A(this,_s);let c;return A(this,ks)?c=A(this,ks):(c=F0(()=>Promise.resolve().then(()=>eR)),V(this,ks,c)),uv(A(this,wa),A(this,bs)),T(c,Ce({get queryFlavor(){return A(n,ba)},get version(){return A(n,xa)},get onlineManager(){return A(n,va)},get shadowDOMTarget(){return A(n,bs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()},get onClose(){return l()}}))},e);V(this,vi,!0),V(this,Sa,t)}unmount(){var e;if(!A(this,vi))throw new Error("Devtools is not mounted");(e=A(this,Sa))==null||e.call(this),V(this,vi,!1)}},vs=new WeakMap,va=new WeakMap,ba=new WeakMap,xa=new WeakMap,vi=new WeakMap,wa=new WeakMap,bs=new WeakMap,xs=new WeakMap,ws=new WeakMap,Ss=new WeakMap,Cs=new WeakMap,_s=new WeakMap,ks=new WeakMap,Sa=new WeakMap,Yp);function OC(e){const t=ur(e.client),n=M.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[c]=M.useState(new _C({client:t,queryFlavor:"React Query",version:"5",onlineManager:Es,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return M.useEffect(()=>{c.setClient(t)},[t,c]),M.useEffect(()=>{r&&c.setButtonPosition(r)},[r,c]),M.useEffect(()=>{i&&c.setPosition(i)},[i,c]),M.useEffect(()=>{c.setInitialIsOpen(s||!1)},[s,c]),M.useEffect(()=>{c.setErrorTypes(o||[])},[o,c]),M.useEffect(()=>(n.current&&c.mount(n.current),()=>{c.unmount()}),[c]),y.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function EC(e){const t=ur(e.client),n=M.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=M.useState(new kC({client:t,queryFlavor:"React Query",version:"5",onlineManager:Es,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return M.useEffect(()=>{o.setClient(t)},[t,o]),M.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),M.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),M.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),y.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var AC=process.env.NODE_ENV!=="development"?function(){return null}:OC;process.env.NODE_ENV;function dv(e,t){return function(){return e.apply(t,arguments)}}const{toString:PC}=Object.prototype,{getPrototypeOf:pf}=Object,{iterator:Sc,toStringTag:fv}=Symbol,Cc=(e=>t=>{const n=PC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Cn=e=>(e=e.toLowerCase(),t=>Cc(t)===e),_c=e=>t=>typeof t===e,{isArray:Ns}=Array,Io=_c("undefined");function TC(e){return e!==null&&!Io(e)&&e.constructor!==null&&!Io(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hv=Cn("ArrayBuffer");function $C(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hv(e.buffer),t}const MC=_c("string"),Rt=_c("function"),gv=_c("number"),kc=e=>e!==null&&typeof e=="object",jC=e=>e===!0||e===!1,El=e=>{if(Cc(e)!=="object")return!1;const t=pf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(fv in e)&&!(Sc in e)},DC=Cn("Date"),LC=Cn("File"),IC=Cn("Blob"),RC=Cn("FileList"),FC=e=>kc(e)&&Rt(e.pipe),NC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Cc(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},BC=Cn("URLSearchParams"),[qC,zC,HC,UC]=["ReadableStream","Request","Response","Headers"].map(Cn),KC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ka(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),Ns(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function yv(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const oi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,mv=e=>!Io(e)&&e!==oi;function gd(){const{caseless:e}=mv(this)&&this||{},t={},n=(r,i)=>{const s=e&&yv(t,i)||i;El(t[s])&&El(r)?t[s]=gd(t[s],r):El(r)?t[s]=gd({},r):Ns(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ka(arguments[r],n);return t}const WC=(e,t,n,{allOwnKeys:r}={})=>(ka(t,(i,s)=>{n&&Rt(i)?e[s]=dv(i,n):e[s]=i},{allOwnKeys:r}),e),VC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),GC=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},QC=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&pf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},YC=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},XC=e=>{if(!e)return null;if(Ns(e))return e;let t=e.length;if(!gv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},JC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&pf(Uint8Array)),ZC=(e,t)=>{const r=(e&&e[Sc]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},e_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},t_=Cn("HTMLFormElement"),n_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Zh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),r_=Cn("RegExp"),pv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ka(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},i_=e=>{pv(e,(t,n)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Rt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},s_=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ns(e)?r(e):r(String(e).split(t)),n},o_=()=>{},a_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function l_(e){return!!(e&&Rt(e.append)&&e[fv]==="FormData"&&e[Sc])}const c_=e=>{const t=new Array(10),n=(r,i)=>{if(kc(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Ns(r)?[]:{};return ka(r,(o,a)=>{const l=n(o,i+1);!Io(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},u_=Cn("AsyncFunction"),d_=e=>e&&(kc(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),vv=((e,t)=>e?setImmediate:t?((n,r)=>(oi.addEventListener("message",({source:i,data:s})=>{i===oi&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),oi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rt(oi.postMessage)),f_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(oi):typeof process!="undefined"&&process.nextTick||vv,h_=e=>e!=null&&Rt(e[Sc]),F={isArray:Ns,isArrayBuffer:hv,isBuffer:TC,isFormData:NC,isArrayBufferView:$C,isString:MC,isNumber:gv,isBoolean:jC,isObject:kc,isPlainObject:El,isReadableStream:qC,isRequest:zC,isResponse:HC,isHeaders:UC,isUndefined:Io,isDate:DC,isFile:LC,isBlob:IC,isRegExp:r_,isFunction:Rt,isStream:FC,isURLSearchParams:BC,isTypedArray:JC,isFileList:RC,forEach:ka,merge:gd,extend:WC,trim:KC,stripBOM:VC,inherits:GC,toFlatObject:QC,kindOf:Cc,kindOfTest:Cn,endsWith:YC,toArray:XC,forEachEntry:ZC,matchAll:e_,isHTMLForm:t_,hasOwnProperty:Zh,hasOwnProp:Zh,reduceDescriptors:pv,freezeMethods:i_,toObjectSet:s_,toCamelCase:n_,noop:o_,toFiniteNumber:a_,findKey:yv,global:oi,isContextDefined:mv,isSpecCompliantForm:l_,toJSONObject:c_,isAsyncFn:u_,isThenable:d_,setImmediate:vv,asap:f_,isIterable:h_};function _e(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const bv=_e.prototype,xv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xv[e]={value:e}});Object.defineProperties(_e,xv);Object.defineProperty(bv,"isAxiosError",{value:!0});_e.from=(e,t,n,r,i,s)=>{const o=Object.create(bv);return F.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),_e.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const g_=null;function yd(e){return F.isPlainObject(e)||F.isArray(e)}function wv(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function eg(e,t,n){return e?e.concat(t).map(function(i,s){return i=wv(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function y_(e){return F.isArray(e)&&!e.some(yd)}const m_=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function Oc(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!F.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(F.isDate(g))return g.toISOString();if(F.isBoolean(g))return g.toString();if(!l&&F.isBlob(g))throw new _e("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(g)||F.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,p){let v=g;if(g&&!p&&typeof g=="object"){if(F.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(F.isArray(g)&&y_(g)||(F.isFileList(g)||F.endsWith(m,"[]"))&&(v=F.toArray(g)))return m=wv(m),v.forEach(function(x,S){!(F.isUndefined(x)||x===null)&&t.append(o===!0?eg([m],S,s):o===null?m:m+"[]",c(x))}),!1}return yd(g)?!0:(t.append(eg(p,m,s),c(g)),!1)}const d=[],f=Object.assign(m_,{defaultVisitor:u,convertValue:c,isVisitable:yd});function h(g,m){if(!F.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),F.forEach(g,function(v,b){(!(F.isUndefined(v)||v===null)&&i.call(t,v,F.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return h(e),t}function tg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vf(e,t){this._pairs=[],e&&Oc(e,this,t)}const Sv=vf.prototype;Sv.append=function(t,n){this._pairs.push([t,n])};Sv.toString=function(t){const n=t?function(r){return t.call(this,r,tg)}:tg;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function p_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cv(e,t,n){if(!t)return e;const r=n&&n.encode||p_;F.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=F.isURLSearchParams(t)?t.toString():new vf(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ng{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},v_=typeof URLSearchParams!="undefined"?URLSearchParams:vf,b_=typeof FormData!="undefined"?FormData:null,x_=typeof Blob!="undefined"?Blob:null,w_={isBrowser:!0,classes:{URLSearchParams:v_,FormData:b_,Blob:x_},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",md=typeof navigator=="object"&&navigator||void 0,S_=bf&&(!md||["ReactNative","NativeScript","NS"].indexOf(md.product)<0),C_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",__=bf&&window.location.href||"http://localhost",k_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:S_,hasStandardBrowserWebWorkerEnv:C_,navigator:md,origin:__},Symbol.toStringTag,{value:"Module"})),wt={...k_,...w_};function O_(e,t){return Oc(e,new wt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return wt.isNode&&F.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function E_(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function A_(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function kv(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&F.isArray(i)?i.length:o,l?(F.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&F.isArray(i[o])&&(i[o]=A_(i[o])),!a)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,(r,i)=>{t(E_(r),i,n,0)}),n}return null}function P_(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Oa={transitional:_v,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=F.isObject(t);if(s&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return i?JSON.stringify(kv(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t)||F.isReadableStream(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return O_(t,this.formSerializer).toString();if((a=F.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Oc(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),P_(t)):t}],transformResponse:[function(t){const n=this.transitional||Oa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(F.isResponse(t)||F.isReadableStream(t))return t;if(t&&F.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?_e.from(a,_e.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],e=>{Oa.headers[e]={}});const T_=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$_=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
13
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
14
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[rg]=this[rg]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Zs(o);r[a]||(L_(i,o),r[a]=!0)}return F.isArray(t)?t.forEach(s):s(t),this}};Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.reduceDescriptors(Ft.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});F.freezeMethods(Ft);function au(e,t){const n=this||Oa,r=t||n,i=Ft.from(r.headers);let s=r.data;return F.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Ov(e){return!!(e&&e.__CANCEL__)}function Bs(e,t,n){_e.call(this,e==null?"canceled":e,_e.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(Bs,_e,{__CANCEL__:!0});function Ev(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _e("Request failed with status code "+n.status,[_e.ERR_BAD_REQUEST,_e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function I_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function R_(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const h=u&&c-u;return h?Math.round(f*1e3/h):void 0}}function F_(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Kl=(e,t,n=3)=>{let r=0;const i=R_(50,250);return F_(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},ig=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},sg=e=>(...t)=>F.asap(()=>e(...t)),N_=wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wt.origin),wt.navigator&&/(msie|trident)/i.test(wt.navigator.userAgent)):()=>!0,B_=wt.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),F.isString(r)&&o.push("path="+r),F.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function q_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Av(e,t,n){let r=!q_(t);return e&&(r||n==!1)?z_(e,t):t}const og=e=>e instanceof Ft?{...e}:e;function _i(e,t){t=t||{};const n={};function r(c,u,d,f){return F.isPlainObject(c)&&F.isPlainObject(u)?F.merge.call({caseless:f},c,u):F.isPlainObject(u)?F.merge({},u):F.isArray(u)?u.slice():u}function i(c,u,d,f){if(F.isUndefined(u)){if(!F.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function s(c,u){if(!F.isUndefined(u))return r(void 0,u)}function o(c,u){if(F.isUndefined(u)){if(!F.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(og(c),og(u),d,!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,f=d(e[u],t[u],u);F.isUndefined(f)&&d!==a||(n[u]=f)}),n}const Pv=e=>{const t=_i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=Ft.from(o),t.url=Cv(Av(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(F.isFormData(n)){if(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(wt.hasStandardBrowserEnv&&(r&&F.isFunction(r)&&(r=r(t)),r||r!==!1&&N_(t.url))){const c=i&&s&&B_.read(s);c&&o.set(i,c)}return t},H_=typeof XMLHttpRequest!="undefined",U_=H_&&function(e){return new Promise(function(n,r){const i=Pv(e);let s=i.data;const o=Ft.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,f,h,g;function m(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const x=Ft.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),w={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:e,request:p};Ev(function(C){n(C),m()},function(C){r(C),m()},w),p=null}"onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new _e("Request aborted",_e.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new _e("Network Error",_e.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||_v;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new _e(S,w.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&F.forEach(o.toJSON(),function(S,w){p.setRequestHeader(w,S)}),F.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),c&&([f,g]=Kl(c,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=Kl(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=x=>{p&&(r(!x||x.type?new Bs(null,e,p):x),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=I_(i.url);if(b&&wt.protocols.indexOf(b)===-1){r(new _e("Unsupported protocol "+b+":",_e.ERR_BAD_REQUEST,e));return}p.send(s||null)})},K_=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof _e?u:new Bs(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new _e(`timeout ${t} of ms exceeded`,_e.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>F.asap(a),l}},W_=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},V_=async function*(e,t){for await(const n of G_(e))yield*W_(n,t)},G_=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ag=(e,t,n,r)=>{const i=V_(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Ec=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Tv=Ec&&typeof ReadableStream=="function",Q_=Ec&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),$v=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Y_=Tv&&$v(()=>{let e=!1;const t=new Request(wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),lg=64*1024,pd=Tv&&$v(()=>F.isReadableStream(new Response("").body)),Wl={stream:pd&&(e=>e.body)};Ec&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Wl[t]&&(Wl[t]=F.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new _e(`Response type '${t}' is not supported`,_e.ERR_NOT_SUPPORT,r)})})})(new Response);const X_=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new Request(wt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e=e+""),F.isString(e))return(await Q_(e)).byteLength},J_=async(e,t)=>{const n=F.toFiniteNumber(e.getContentLength());return n==null?X_(t):n},Z_=Ec&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Pv(e);c=c?(c+"").toLowerCase():"text";let h=K_([i,s&&s.toAbortSignal()],o),g;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&Y_&&n!=="get"&&n!=="head"&&(p=await J_(u,r))!==0){let w=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(F.isFormData(r)&&(P=w.headers.get("content-type"))&&u.setContentType(P),w.body){const[C,O]=ig(p,Kl(sg(l)));r=ag(w.body,lg,C,O)}}F.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(g,f);const x=pd&&(c==="stream"||c==="response");if(pd&&(a||x&&m)){const w={};["status","statusText","headers"].forEach(_=>{w[_]=b[_]});const P=F.toFiniteNumber(b.headers.get("content-length")),[C,O]=a&&ig(P,Kl(sg(a),!0))||[];b=new Response(ag(b.body,lg,C,()=>{O&&O(),m&&m()}),w)}c=c||"text";let S=await Wl[F.findKey(Wl,c)||"text"](b,e);return!x&&m&&m(),await new Promise((w,P)=>{Ev(w,P,{data:S,headers:Ft.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new _e("Network Error",_e.ERR_NETWORK,e,g),{cause:v.cause||v}):_e.from(v,v&&v.code,e,g)}}),vd={http:g_,xhr:U_,fetch:Z_};F.forEach(vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const cg=e=>`- ${e}`,ek=e=>F.isFunction(e)||e===null||e===!1,Mv={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!ek(n)&&(r=vd[(o=String(n)).toLowerCase()],r===void 0))throw new _e(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
15
|
-
`+s.map(
|
|
16
|
-
`):" "+
|
|
17
|
-
`+s):r.stack=s}catch(o){}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_i(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Pl.assertOptions(r,{silentJSONParsing:kn.transitional(kn.boolean),forcedJSONParsing:kn.transitional(kn.boolean),clarifyTimeoutError:kn.transitional(kn.boolean)},!1),i!=null&&(F.isFunction(i)?n.paramsSerializer={serialize:i}:Pl.assertOptions(i,{encode:kn.function,serialize:kn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pl.assertOptions(n,{baseUrl:kn.spelling("baseURL"),withXsrfToken:kn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&F.merge(s.common,s[n.method]);s&&F.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Ft.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const g=[ug.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),f=g.length,u=Promise.resolve(n);d<f;)u=u.then(g[d++],g[d++]);return u}f=a.length;let h=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(p){m.call(this,p);break}}try{u=ug.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=_i(this.defaults,t);const n=Av(t.baseURL,t.url,t.allowAbsoluteUrls);return Cv(n,t.params,t.paramsSerializer)}};F.forEach(["delete","get","head","options"],function(t){bi.prototype[t]=function(n,r){return this.request(_i(r||{},{method:t,url:n,data:(r||{}).data}))}});F.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(_i(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}bi.prototype[t]=n(),bi.prototype[t+"Form"]=n(!0)});let nk=class Dv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new Bs(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Dv(function(i){t=i}),cancel:t}}};function rk(e){return function(n){return e.apply(null,n)}}function ik(e){return F.isObject(e)&&e.isAxiosError===!0}const bd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bd).forEach(([e,t])=>{bd[t]=e});function Lv(e){const t=new bi(e),n=dv(bi.prototype.request,t);return F.extend(n,bi.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Lv(_i(e,i))},n}const Je=Lv(Oa);Je.Axios=bi;Je.CanceledError=Bs;Je.CancelToken=nk;Je.isCancel=Ov;Je.VERSION=jv;Je.toFormData=Oc;Je.AxiosError=_e;Je.Cancel=Je.CanceledError;Je.all=function(t){return Promise.all(t)};Je.spread=rk;Je.isAxiosError=ik;Je.mergeConfig=_i;Je.AxiosHeaders=Ft;Je.formToJSON=e=>kv(F.isHTMLForm(e)?new FormData(e):e);Je.getAdapter=Mv.getAdapter;Je.HttpStatusCode=bd;Je.default=Je;const{Axios:RF,AxiosError:FF,CanceledError:NF,isCancel:BF,CancelToken:qF,VERSION:zF,all:HF,Cancel:UF,isAxiosError:KF,spread:WF,toFormData:VF,AxiosHeaders:GF,HttpStatusCode:QF,formToJSON:YF,getAdapter:XF,mergeConfig:JF}=Je;function Ro(e){"@babel/helpers - typeof";return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(e)}function Fo(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return qt(b,"_invoke",function(x,S,w){var P,C,O,_=0,k=w||[],$=!1,j={p:0,n:0,v:e,a:Y,f:Y.bind(e,4),d:function(D,L){return P=D,C=0,O=e,j.n=L,o}};function Y(R,D){for(C=R,O=D,t=0;!$&&_&&!L&&t<k.length;t++){var L,N=k[t],le=j.p,fe=N[2];R>3?(L=fe===D)&&(O=N[(C=N[4])?5:(C=3,3)],N[4]=N[5]=e):N[0]<=le&&((L=R<2&&le<N[1])?(C=0,j.v=D,j.n=N[1]):le<fe&&(L=R<3||N[0]>D||D>fe)&&(N[4]=R,N[5]=D,j.n=fe,C=0))}if(L||R>1)return o;throw $=!0,D}return function(R,D,L){if(_>1)throw TypeError("Generator is already running");for($&&D===1&&Y(D,L),C=D,O=L;(t=C<2?e:O)||!$;){P||(C?C<3?(C>1&&(j.n=-1),Y(C,O)):j.n=O:j.v=O);try{if(_=2,P){if(C||(R="next"),t=P[R]){if(!(t=t.call(P,O)))throw TypeError("iterator result is not an object");if(!t.done)return t;O=t.value,C<2&&(C=0)}else C===1&&(t=P.return)&&t.call(P),C<2&&(O=TypeError("The iterator does not provide a '"+R+"' method"),C=1);P=e}else if((t=($=j.n<0)?O:x.call(S,j))!==o)break}catch(N){P=e,C=1,O=N}finally{_=1}}return{value:t,done:$}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(qt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,qt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,qt(d,"constructor",c),qt(c,"constructor",l),l.displayName="GeneratorFunction",qt(c,i,"GeneratorFunction"),qt(d),qt(d,i,"Generator"),qt(d,r,function(){return this}),qt(d,"toString",function(){return"[object Generator]"}),(Fo=function(){return{w:s,m:f}})()}function qt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}qt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){qt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},qt(e,t,n,r)}function fg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function Iv(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){fg(s,r,i,o,a,"next",l)}function a(l){fg(s,r,i,o,a,"throw",l)}o(void 0)})}}function hg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hg(Object(n),!0).forEach(function(r){sk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sk(e,t,n){return(t=ok(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ok(e){var t=ak(e,"string");return Ro(t)=="symbol"?t:t+""}function ak(e,t){if(Ro(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ro(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lk(e){var t;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(e,"="));if(r.length===2)return(t=r.pop())===null||t===void 0?void 0:t.split(";").shift()}}var ck="yst-insights-token";function uk(){if(typeof window!="undefined")return localStorage.getItem(ck)||void 0}var Ps=Je.create({withCredentials:!0});Ps.interceptors.request.use(function(e){var t=lk("XSRF-TOKEN"),n=t?decodeURIComponent(t):void 0,r=uk();return e.headers=Gi(Gi(Gi({},e.headers||{}),n?{"X-XSRF-TOKEN":n}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),e},function(e){return Promise.reject(e)});Ps.interceptors.response.use(function(e){return e},function(){var e=Iv(Fo().m(function t(n){var r;return Fo().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},t)}));return function(t){return e.apply(this,arguments)}}());function _t(e){return xd.apply(this,arguments)}function xd(){return xd=Iv(Fo().m(function e(t){var n;return Fo().w(function(r){for(;;)switch(r.n){case 0:return n=Gi({},t),delete n.baseURL,r.a(2,Ps.request(Gi(Gi({},n),{},{withCredentials:!0})))}},e)})),xd.apply(this,arguments)}function Rv(e){Ps.defaults.baseURL=e}function No(e){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(e)}function gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gg(Object(n),!0).forEach(function(r){dk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dk(e,t,n){return(t=fk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fk(e){var t=hk(e,"string");return No(t)=="symbol"?t:t+""}function hk(e,t){if(No(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(No(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gk=function(t,n){return _t({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},Fv=function(t){return["/brands/".concat(t,"/analysis")]},yk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Fv(t),a=function(c){var u=c.signal;return gk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function mk(e,t,n){var r=yk(e,t),i=dr(r,n);return i.queryKey=r.queryKey,i}var pk=function(t){return _t({url:"/brands/".concat(t,"/analysis"),method:"DELETE"})},vk=function(t){var n=["deleteAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId;return pk(c)};return we({mutationFn:s},i)},bk=function(t,n){var r=vk(t);return $i(r,n)},xk=function(t,n,r){return _t({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},wk=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},Sk=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:wk(t,n),l=function(u){var d=u.signal;return xk(t,n,d)};return we({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Pc(e,t,n,r){var i=Sk(e,t,n),s=dr(i,r);return s.queryKey=i.queryKey,s}var Ck=function(t,n,r){return _t({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},_k=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},kk=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:_k(t,n),l=function(u){var d=u.signal;return Ck(t,n,d)};return we({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Ok(e,t,n,r){var i=kk(e,t,n),s=dr(i,r);return s.queryKey=i.queryKey,s}var Ek=function(t){return _t({url:"/users/logout",method:"POST",signal:t})},Ak=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return Ek()};return we({mutationFn:s},i)},Pk=function(t,n){var r=Ak(t);return $i(r,n)},Tk=function(t,n){return _t({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},Nv=function(t){return["/brands/".concat(t,"/associated-brands")]},$k=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Nv(t),a=function(c){var u=c.signal;return Tk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Mk(e,t,n){var r=$k(e,t),i=dr(r,n);return i.queryKey=r.queryKey,i}var jk=function(t,n,r){return _t({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},Dk=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return jk(c,u)};return we({mutationFn:s},i)},Lk=function(t,n){var r=Dk(t);return $i(r,n)},Ik=function(t){return _t({url:"/brands",method:"GET",signal:t})},xr=function(){return["/brands"]},Rk=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:xr(),o=function(l){var c=l.signal;return Ik(c)};return we({queryKey:s,queryFn:o},i)};function Ea(e,t){var n=Rk(e),r=dr(n,t);return r.queryKey=n.queryKey,r}var Fk=function(t,n){return _t({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},Nk=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.data;return Fk(c)};return we({mutationFn:s},i)},Bk=function(t,n){var r=Nk(t);return $i(r,n)},qk=function(t,n){return _t({url:"/brands/".concat(t),method:"GET",signal:n})},zk=function(t){return["/brands/".concat(t)]},Hk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:zk(t),a=function(c){var u=c.signal;return qk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Bv(e,t,n){var r=Hk(e,t),i=dr(r,n);return i.queryKey=r.queryKey,i}var Uk=function(t){return _t({url:"/brands/".concat(t),method:"DELETE"})},Kk=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId;return Uk(c)};return we({mutationFn:s},i)},Wk=function(t,n){var r=Kk(t);return $i(r,n)},Vk=function(t,n){return _t({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},Gk=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return Vk(c,u)};return we({mutationFn:s},i)},Qk=function(t,n){var r=Gk(t);return $i(r,n)},Yk=function(t,n){return _t({url:"/brands/".concat(t,"/queries"),method:"GET",signal:n})},Xk=function(t){return["/brands/".concat(t,"/queries")]},Jk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Xk(t),a=function(c){var u=c.signal;return Yk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Zk(e,t,n){var r=Jk(e,t),i=dr(r,n);return i.queryKey=r.queryKey,i}var eO=function(t,n){return _t({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},tO=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return eO(c,u)};return we({mutationFn:s},i)},nO=function(t,n){var r=tO(t);return $i(r,n)},rO=function(t,n){return _t({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},iO=function(t){return["/brands/".concat(t,"/query-suggestions")]},sO=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:iO(t),a=function(c){var u=c.signal;return rO(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function oO(e,t,n){var r=sO(e,t),i=dr(r,n);return i.queryKey=r.queryKey,i}var aO=function(t){return _t({url:"/users/current",method:"GET",signal:t})},qv=function(){return["/users/current"]},lO=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:qv(),o=function(l){var c=l.signal;return aO(c)};return we({queryKey:s,queryFn:o},i)};function zv(e,t){var n=lO(e),r=dr(n,t);return r.queryKey=n.queryKey,r}var Hv=H.createContext(void 0),cO=function(t){var n,r,i,s=t.children,o=t.brandId,a=t.analysisId,l=t.model,c=$h("/brands/:brandId"),u=$h("/brands/:brandId/analysis/:analysisId"),d=(u==null||(n=u.params)===null||n===void 0?void 0:n.brandId)||(c==null||(r=c.params)===null||r===void 0?void 0:r.brandId),f=u!=null&&(i=u.params)!==null&&i!==void 0&&i.analysisId?Number(u.params.analysisId):void 0,h=H.useMemo(function(){return{brandId:d||o||"",analysisId:f||a||"latest",model:l||"openai"}},[d,o,f,a,l]),g=H.useMemo(function(){return{data:h}},[h]);return y.jsx(Hv.Provider,{value:g,children:s})},Uv=H.createContext(void 0),uO=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=H.useCallback(function(d){r(d),i("latest")},[r,i]),a=H.useCallback(function(d){i(d)},[i]),l=H.useCallback(function(d){s(d)},[s]),c=H.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),u=H.useMemo(function(){return{mutations:c}},[c]);return y.jsx(Uv.Provider,{value:u,children:n})};function cu(e,t){return gO(e)||hO(e,t)||fO(e,t)||dO()}function dO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
12
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=dn(),f;if(t){let b=typeof t=="string"?Ur(t):t;Xe(c==="/"||((v=b.pathname)==null?void 0:v.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",g=h;if(c!=="/"){let b=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=o0(e,{pathname:g});un(u||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),un(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=Rw(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:sr([c,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:sr([c,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?M.createElement(ka.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function jw(){let e=zw(),t=_w(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:s},"ErrorBoundary")," or"," ",M.createElement("code",{style:s},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),n?M.createElement("pre",{style:i},n):null,o)}var Dw=M.createElement(jw,null),Lw=class extends M.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?M.createElement(zn.Provider,{value:this.props.routeContext},M.createElement(ff.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Iw({routeContext:e,match:t,children:n}){let r=M.useContext(Ls);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(zn.Provider,{value:e},n)}function Rw(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);Xe(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let c=i[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:u,errors:d}=n,f=c.route.loader&&!u.hasOwnProperty(c.route.id)&&(!d||d[c.route.id]===void 0);if(c.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,c,u)=>{let d,f=!1,h=null,g=null;n&&(d=s&&c.route.id?s[c.route.id]:void 0,h=c.route.errorElement||Dw,o&&(a<0&&u===0?(p0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,g=null):a===u&&(f=!0,g=c.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),p=()=>{let v;return d?v=h:f?v=g:c.route.Component?v=M.createElement(c.route.Component,null):c.route.element?v=c.route.element:v=l,M.createElement(Iw,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?M.createElement(Lw,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function hf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fw(e){let t=M.useContext(Ls);return Xe(t,hf(e)),t}function Nw(e){let t=M.useContext(yc);return Xe(t,hf(e)),t}function Bw(e){let t=M.useContext(zn);return Xe(t,hf(e)),t}function gf(e){let t=Bw(e),n=t.matches[t.matches.length-1];return Xe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qw(){return gf("useRouteId")}function zw(){var r;let e=M.useContext(ff),t=Nw("useRouteError"),n=gf("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Hw(){let{router:e}=Fw("useNavigate"),t=gf("useNavigate"),n=M.useRef(!1);return y0(()=>{n.current=!0}),M.useCallback(async(i,s={})=>{un(n.current,g0),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Fh={};function p0(e,t,n){!t&&!Fh[e]&&(Fh[e]=!0,un(!1,n))}M.memo(Uw);function Uw({routes:e,future:t,state:n}){return m0(e,void 0,n,t)}function Kw({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=M.useRef();i.current==null&&(i.current=tw({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=M.useState({action:s.action,location:s.location}),l=M.useCallback(c=>{M.startTransition(()=>a(c))},[a]);return M.useLayoutEffect(()=>s.listen(l),[s,l]),M.createElement(yf,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function mc(e){return $w(e.context)}function Mt(e){Xe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function yf({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){Xe(!Is(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=M.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Ur(n));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:f="default"}=n,h=M.useMemo(()=>{let g=cr(l,o);return g==null?null:{location:{pathname:g,search:c,hash:u,state:d,key:f},navigationType:r}},[o,l,c,u,d,f,r]);return un(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:M.createElement(qn.Provider,{value:a},M.createElement(ka.Provider,{children:t,value:h}))}function Ww({children:e,location:t}){return Mw(Ku(e),t)}function Ku(e,t=[]){let n=[];return M.Children.forEach(e,(r,i)=>{if(!M.isValidElement(r))return;let s=[...t,i];if(r.type===M.Fragment){n.push.apply(n,Ku(r.props.children,s));return}Xe(r.type===Mt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Xe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ku(r.props.children,s)),n.push(o)}),n}var _l="get",kl="application/x-www-form-urlencoded";function pc(e){return e!=null&&typeof e.tagName=="string"}function Vw(e){return pc(e)&&e.tagName.toLowerCase()==="button"}function Gw(e){return pc(e)&&e.tagName.toLowerCase()==="form"}function Qw(e){return pc(e)&&e.tagName.toLowerCase()==="input"}function Yw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Xw(e,t){return e.button===0&&(!t||t==="_self")&&!Yw(e)}var Ua=null;function Jw(){if(Ua===null)try{new FormData(document.createElement("form"),0),Ua=!1}catch(e){Ua=!0}return Ua}var Zw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tu(e){return e!=null&&!Zw.has(e)?(un(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kl}"`),null):e}function e2(e,t){let n,r,i,s,o;if(Gw(e)){let a=e.getAttribute("action");r=a?cr(a,t):null,n=e.getAttribute("method")||_l,i=tu(e.getAttribute("enctype"))||kl,s=new FormData(e)}else if(Vw(e)||Qw(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?cr(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||_l,i=tu(e.getAttribute("formenctype"))||tu(a.getAttribute("enctype"))||kl,s=new FormData(a,e),!Jw()){let{name:c,type:u,value:d}=e;if(u==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,d)}}else{if(pc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_l,r=null,i=kl,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function mf(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function t2(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function n2(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function r2(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await t2(s,n);return o.links?o.links():[]}return[]}));return a2(r.flat(1).filter(n2).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Nh(e,t,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?t.filter((l,c)=>{var d;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function i2(e,t,{includeHydrateFallback:n}={}){return s2(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function s2(e){return[...new Set(e)]}function o2(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function a2(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(o2(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var l2=new Set([100,101,204,205]);function c2(e,t){let n=typeof e=="string"?new URL(e,typeof window=="undefined"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&cr(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function v0(){let e=M.useContext(Ls);return mf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function u2(){let e=M.useContext(yc);return mf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pf=M.createContext(void 0);pf.displayName="FrameworkContext";function b0(){let e=M.useContext(pf);return mf(e,"You must render this element inside a <HydratedRouter> element"),e}function d2(e,t){let n=M.useContext(pf),[r,i]=M.useState(!1),[s,o]=M.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,f=M.useRef(null);M.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let m=v=>{v.forEach(b=>{o(b.isIntersecting)})},p=new IntersectionObserver(m,{threshold:.5});return f.current&&p.observe(f.current),()=>{p.disconnect()}}},[e]),M.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:eo(a,h),onBlur:eo(l,g),onMouseEnter:eo(c,h),onMouseLeave:eo(u,g),onTouchStart:eo(d,h)}]:[!1,f,{}]}function eo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function f2({page:e,...t}){let{router:n}=v0(),r=M.useMemo(()=>o0(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?M.createElement(g2,{page:e,matches:r,...t}):null}function h2(e){let{manifest:t,routeModules:n}=b0(),[r,i]=M.useState([]);return M.useEffect(()=>{let s=!1;return r2(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function g2({page:e,matches:t,...n}){let r=dn(),{manifest:i,routeModules:s}=b0(),{basename:o}=v0(),{loaderData:a,matches:l}=u2(),c=M.useMemo(()=>Nh(e,t,l,i,r,"data"),[e,t,l,i,r]),u=M.useMemo(()=>Nh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,m=!1;if(t.forEach(v=>{var w;let b=i.routes[v.route.id];!b||!b.hasLoader||(!c.some(S=>S.route.id===v.route.id)&&v.route.id in a&&((w=s[v.route.id])!=null&&w.shouldRevalidate)||b.hasClientLoader?m=!0:g.add(v.route.id))}),g.size===0)return[];let p=c2(e,o);return m&&g.size>0&&p.searchParams.set("_routes",t.filter(v=>g.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,c,t,e,s]),f=M.useMemo(()=>i2(u,i),[u,i]),h=h2(u);return M.createElement(M.Fragment,null,d.map(g=>M.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),f.map(g=>M.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),h.map(({key:g,link:m})=>M.createElement("link",{key:g,...m})))}function y2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var x0=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{x0&&(window.__reactRouterVersion="7.6.3")}catch(e){}function m2({basename:e,children:t,window:n}){let r=M.useRef();r.current==null&&(r.current=nw({window:n,v5Compat:!0}));let i=r.current,[s,o]=M.useState({action:i.action,location:i.location}),a=M.useCallback(l=>{M.startTransition(()=>o(l))},[o]);return M.useLayoutEffect(()=>i.listen(a),[i,a]),M.createElement(yf,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}function p2({basename:e,children:t,window:n}){let r=M.useRef();r.current==null&&(r.current=rw({window:n,v5Compat:!0}));let i=r.current,[s,o]=M.useState({action:i.action,location:i.location}),a=M.useCallback(l=>{M.startTransition(()=>o(l))},[o]);return M.useLayoutEffect(()=>i.listen(a),[i,a]),M.createElement(yf,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i})}var w0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kr=M.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d,...f},h){let{basename:g}=M.useContext(qn),m=typeof c=="string"&&w0.test(c),p,v=!1;if(typeof c=="string"&&m&&(p=c,x0))try{let _=new URL(window.location.href),O=c.startsWith("//")?new URL(_.protocol+c):new URL(c),P=cr(O.pathname,g);O.origin===_.origin&&P!=null?c=P+O.search+O.hash:v=!0}catch(_){un(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Aw(c,{relative:i}),[w,S,x]=d2(r,f),E=w2(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:d});function C(_){t&&t(_),_.defaultPrevented||E(_)}let k=M.createElement("a",{...f,...x,href:p||b,onClick:v||s?t:C,ref:y2(h,S),target:l,"data-discover":!m&&n==="render"?"true":void 0});return w&&!m?M.createElement(M.Fragment,null,k,M.createElement(f2,{page:b})):k});Kr.displayName="Link";var v2=M.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let d=Oa(o,{relative:c.relative}),f=dn(),h=M.useContext(yc),{navigator:g,basename:m}=M.useContext(qn),p=h!=null&&O2(d)&&a===!0,v=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=f.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&m&&(w=cr(w,m)||w);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=b===v||!i&&b.startsWith(v)&&b.charAt(S)==="/",E=w!=null&&(w===v||!i&&w.startsWith(v)&&w.charAt(v.length)==="/"),C={isActive:x,isPending:E,isTransitioning:p},k=x?t:void 0,_;typeof r=="function"?_=r(C):_=[r,x?"active":null,E?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let O=typeof s=="function"?s(C):s;return M.createElement(Kr,{...c,"aria-current":k,className:_,ref:u,style:O,to:o,viewTransition:a},typeof l=="function"?l(C):l)});v2.displayName="NavLink";var b2=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=_l,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...f},h)=>{let g=_2(),m=k2(a,{relative:c}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&w0.test(a),b=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let S=w.nativeEvent.submitter,x=(S==null?void 0:S.getAttribute("formmethod"))||o;g(S||w.currentTarget,{fetcherKey:t,method:x,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:d})};return M.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});b2.displayName="Form";function x2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function S0(e){let t=M.useContext(Ls);return Xe(t,x2(e)),t}function w2(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=_n(),l=dn(),c=Oa(e,{relative:s});return M.useCallback(u=>{if(Xw(u,t)){u.preventDefault();let d=n!==void 0?n:Si(l)===Si(c);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,c,n,r,t,e,i,s,o])}var S2=0,C2=()=>`__${String(++S2)}__`;function _2(){let{router:e}=S0("useSubmit"),{basename:t}=M.useContext(qn),n=qw();return M.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:c}=e2(r,t);if(i.navigate===!1){let u=i.fetcherKey||C2();await e.fetch(u,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function k2(e,{relative:t}={}){let{basename:n}=M.useContext(qn),r=M.useContext(zn);Xe(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Oa(e||".",{relative:t})},o=dn();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let u=a.toString();s.search=u?`?${u}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:sr([n,s.pathname])),Si(s)}function O2(e,t={}){let n=M.useContext(h0);Xe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=S0("useViewTransitionState"),i=Oa(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=cr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=cr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Es(i.pathname,o)!=null||Es(i.pathname,s)!=null}[...l2];var Rs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ci=typeof window=="undefined"||"Deno"in globalThis;function Et(){}function E2(e,t){return typeof e=="function"?e(t):e}function Wu(e){return typeof e=="number"&&e>=0&&e!==1/0}function C0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ir(e,t){return typeof e=="function"?e(t):e}function sn(e,t){return typeof e=="function"?e(t):e}function Bh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==vf(o,t.options))return!1}else if(!Mo(t.queryKey,o))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||i&&i!==t.state.fetchStatus||s&&!s(t))}function qh(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(_i(t.options.mutationKey)!==_i(s))return!1}else if(!Mo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function vf(e,t){return((t==null?void 0:t.queryKeyHashFn)||_i)(e)}function _i(e){return JSON.stringify(e,(t,n)=>Gu(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Mo(e[n],t[n])):!1}function Vu(e,t){if(e===t)return e;const n=zh(e)&&zh(t);if(n||Gu(e)&&Gu(t)){const r=n?e:Object.keys(e),i=r.length,s=n?t:Object.keys(t),o=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:s[u];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=Vu(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return i===o&&c===i?e:a}return t}function Rl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function zh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gu(e){if(!Hh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Hh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Hh(e){return Object.prototype.toString.call(e)==="[object Object]"}function A2(e){return new Promise(t=>{setTimeout(t,e)})}function Qu(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Vu(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return Vu(e,t)}return t}function T2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function P2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Fl=Symbol();function _0(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Fl&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Fl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function k0(e,t){return typeof e=="function"?e(...t):!!e}var ci,Sr,es,Wp,$2=(Wp=class extends Rs{constructor(){super();re(this,ci);re(this,Sr);re(this,es);G(this,es,t=>{if(!Ci&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){T(this,Sr)||this.setEventListener(T(this,es))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Sr))==null||t.call(this),G(this,Sr,void 0))}setEventListener(t){var n;G(this,es,t),(n=T(this,Sr))==null||n.call(this),G(this,Sr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){T(this,ci)!==t&&(G(this,ci,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof T(this,ci)=="boolean"?T(this,ci):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ci=new WeakMap,Sr=new WeakMap,es=new WeakMap,Wp),bf=new $2,ts,Cr,ns,Vp,M2=(Vp=class extends Rs{constructor(){super();re(this,ts,!0);re(this,Cr);re(this,ns);G(this,ns,t=>{if(!Ci&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,Cr)||this.setEventListener(T(this,ns))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Cr))==null||t.call(this),G(this,Cr,void 0))}setEventListener(t){var n;G(this,ns,t),(n=T(this,Cr))==null||n.call(this),G(this,Cr,t(this.setOnline.bind(this)))}setOnline(t){T(this,ts)!==t&&(G(this,ts,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return T(this,ts)}},ts=new WeakMap,Cr=new WeakMap,ns=new WeakMap,Vp),As=new M2;function Yu(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function j2(e){return Math.min(1e3*2**e,3e4)}function O0(e){return(e!=null?e:"online")==="online"?As.isOnline():!0}var E0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function nu(e){return e instanceof E0}function A0(e){let t=!1,n=0,r=!1,i;const s=Yu(),o=m=>{var p;r||(f(new E0(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>bf.isFocused()&&(e.networkMode==="always"||As.isOnline())&&e.canRun(),u=()=>O0(e.networkMode)&&e.canRun(),d=m=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,m),i==null||i(),s.resolve(m))},f=m=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,m),i==null||i(),s.reject(m))},h=()=>new Promise(m=>{var p;i=v=>{(r||c())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const p=n===0?e.initialPromise:void 0;try{m=p!=null?p:e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var E,C,k;if(r)return;const b=(E=e.retry)!=null?E:Ci?0:3,w=(C=e.retryDelay)!=null?C:j2,S=typeof w=="function"?w(n,v):w,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!x){f(v);return}n++,(k=e.onFail)==null||k.call(e,n,v),A2(S).then(()=>c()?void 0:h()).then(()=>{t?f(v):g()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():h().then(g),s)}}var D2=e=>setTimeout(e,0);function L2(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=D2;const s=a=>{t?e.push(a):i(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ct=L2(),ui,Gp,T0=(Gp=class{constructor(){re(this,ui)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wu(this.gcTime)&&G(this,ui,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:Ci?1/0:5*60*1e3)}clearGcTimeout(){T(this,ui)&&(clearTimeout(T(this,ui)),G(this,ui,void 0))}},ui=new WeakMap,Gp),rs,di,rn,fi,pt,da,hi,vn,Qn,Qp,I2=(Qp=class extends T0{constructor(t){var n;super();re(this,vn);re(this,rs);re(this,di);re(this,rn);re(this,fi);re(this,pt);re(this,da);re(this,hi);G(this,hi,!1),G(this,da,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,fi,t.client),G(this,rn,T(this,fi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,rs,R2(this.options)),this.state=(n=t.state)!=null?n:T(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,pt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,da),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,rn).remove(this)}setData(t,n){const r=Qu(this.state.data,t,this.options);return Ee(this,vn,Qn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ee(this,vn,Qn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=T(this,pt))==null?void 0:r.promise;return(i=T(this,pt))==null||i.cancel(t),n?n.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,rs))}isActive(){return this.observers.some(t=>sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Fl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ir(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!C0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,pt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=T(this,pt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,rn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(T(this,pt)&&(T(this,hi)?T(this,pt).cancel({revert:!0}):T(this,pt).cancelRetry()),this.scheduleGc()),T(this,rn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,vn,Qn).call(this,{type:"invalidate"})}fetch(t,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(T(this,pt))return T(this,pt).continueRetry(),T(this,pt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(G(this,hi,!0),r.signal)})},s=()=>{const f=_0(this.options,n),g=(()=>{const m={client:T(this,fi),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return G(this,hi,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:T(this,fi),state:this.state,fetchFn:s};return i(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),G(this,di,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Ee(this,vn,Qn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,p;nu(f)&&f.silent||Ee(this,vn,Qn).call(this,{type:"error",error:f}),nu(f)||((g=(h=T(this,rn).config).onError)==null||g.call(h,f,this),(p=(m=T(this,rn).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return G(this,pt,A0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,p;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(g=(h=T(this,rn).config).onSuccess)==null||g.call(h,f,this),(p=(m=T(this,rn).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Ee(this,vn,Qn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Ee(this,vn,Qn).call(this,{type:"pause"})},onContinue:()=>{Ee(this,vn,Qn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,pt).start()}},rs=new WeakMap,di=new WeakMap,rn=new WeakMap,fi=new WeakMap,pt=new WeakMap,da=new WeakMap,hi=new WeakMap,vn=new WeakSet,Qn=function(t){const n=r=>{var i,s;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,...P0(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return G(this,di,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return nu(o)&&o.revert&&T(this,di)?{...T(this,di),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,rn).notify({query:this,type:"updated",action:t})})},Qp);function P0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:O0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function R2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jn,Yp,F2=(Yp=class extends Rs{constructor(t={}){super();re(this,jn);this.config=t,G(this,jn,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:vf(i,n);let o=this.get(s);return o||(o=new I2({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){T(this,jn).has(t.queryHash)||(T(this,jn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=T(this,jn).get(t.queryHash);n&&(t.destroy(),n===t&&T(this,jn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,jn).get(t)}getAll(){return[...T(this,jn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Bh(t,r)):n}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},jn=new WeakMap,Yp),Dn,kt,gi,Ln,wr,Xp,N2=(Xp=class extends T0{constructor(t){super();re(this,Ln);re(this,Dn);re(this,kt);re(this,gi);this.mutationId=t.mutationId,G(this,kt,t.mutationCache),G(this,Dn,[]),this.state=t.state||$0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Dn).includes(t)||(T(this,Dn).push(t),this.clearGcTimeout(),T(this,kt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,Dn,T(this,Dn).filter(n=>n!==t)),this.scheduleGc(),T(this,kt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Dn).length||(this.state.status==="pending"?this.scheduleGc():T(this,kt).remove(this))}continue(){var t,n;return(n=(t=T(this,gi))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,c,u,d,f,h,g,m,p,v,b,w,S,x,E,C,k,_;const n=()=>{Ee(this,Ln,wr).call(this,{type:"continue"})};G(this,gi,A0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,P)=>{Ee(this,Ln,wr).call(this,{type:"failed",failureCount:O,error:P})},onPause:()=>{Ee(this,Ln,wr).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,kt).canRun(this)}));const r=this.state.status==="pending",i=!T(this,gi).canStart();try{if(r)n();else{Ee(this,Ln,wr).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=T(this,kt).config).onMutate)==null?void 0:a.call(o,t,this));const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));P!==this.state.context&&Ee(this,Ln,wr).call(this,{type:"pending",context:P,variables:t,isPaused:i})}const O=await T(this,gi).start();return await((d=(u=T(this,kt).config).onSuccess)==null?void 0:d.call(u,O,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,O,t,this.state.context)),await((m=(g=T(this,kt).config).onSettled)==null?void 0:m.call(g,O,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,O,null,t,this.state.context)),Ee(this,Ln,wr).call(this,{type:"success",data:O}),O}catch(O){try{throw await((w=(b=T(this,kt).config).onError)==null?void 0:w.call(b,O,t,this.state.context,this)),await((x=(S=this.options).onError)==null?void 0:x.call(S,O,t,this.state.context)),await((C=(E=T(this,kt).config).onSettled)==null?void 0:C.call(E,void 0,O,this.state.variables,this.state.context,this)),await((_=(k=this.options).onSettled)==null?void 0:_.call(k,void 0,O,t,this.state.context)),O}finally{Ee(this,Ln,wr).call(this,{type:"error",error:O})}}finally{T(this,kt).runNext(this)}}},Dn=new WeakMap,kt=new WeakMap,gi=new WeakMap,Ln=new WeakSet,wr=function(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"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};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"}}};this.state=n(this.state),ct.batch(()=>{T(this,Dn).forEach(r=>{r.onMutationUpdate(t)}),T(this,kt).notify({mutation:this,type:"updated",action:t})})},Xp);function $0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var er,bn,fa,Jp,B2=(Jp=class extends Rs{constructor(t={}){super();re(this,er);re(this,bn);re(this,fa);this.config=t,G(this,er,new Set),G(this,bn,new Map),G(this,fa,0)}build(t,n,r){const i=new N2({mutationCache:this,mutationId:++Ha(this,fa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){T(this,er).add(t);const n=Ka(t);if(typeof n=="string"){const r=T(this,bn).get(n);r?r.push(t):T(this,bn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,er).delete(t)){const n=Ka(t);if(typeof n=="string"){const r=T(this,bn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&T(this,bn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ka(t);if(typeof n=="string"){const r=T(this,bn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r,i;const n=Ka(t);if(typeof n=="string"){const s=(r=T(this,bn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i=s==null?void 0:s.continue())!=null?i:Promise.resolve()}else return Promise.resolve()}clear(){ct.batch(()=>{T(this,er).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,er).clear(),T(this,bn).clear()})}getAll(){return Array.from(T(this,er))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qh(n,r))}findAll(t={}){return this.getAll().filter(n=>qh(t,n))}notify(t){ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(Et))))}},er=new WeakMap,bn=new WeakMap,fa=new WeakMap,Jp);function Ka(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Uh(e){return{onFetch:(t,n)=>{var u,d,f,h,g;const r=t.options,i=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{var w;let m=!1;const p=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=_0(t.options,t.fetchOptions),b=async(S,x,E)=>{if(m)return Promise.reject();if(x==null&&S.pages.length)return Promise.resolve(S);const k=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:E?"backward":"forward",meta:t.options.meta};return p(j),j})(),_=await v(k),{maxPages:O}=t.options,P=E?P2:T2;return{pages:P(S.pages,_,O),pageParams:P(S.pageParams,x,O)}};if(i&&s.length){const S=i==="backward",x=S?q2:Kh,E={pages:s,pageParams:o},C=x(r,E);a=await b(E,C,S)}else{const S=e!=null?e:s.length;do{const x=l===0?(w=o[0])!=null?w:r.initialPageParam:Kh(r,a);if(l>0&&x==null)break;a=await b(a,x),l++}while(l<S)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Kh(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function q2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var nt,_r,kr,is,ss,Or,os,as,Zp,z2=(Zp=class{constructor(e={}){re(this,nt);re(this,_r);re(this,kr);re(this,is);re(this,ss);re(this,Or);re(this,os);re(this,as);G(this,nt,e.queryCache||new F2),G(this,_r,e.mutationCache||new B2),G(this,kr,e.defaultOptions||{}),G(this,is,new Map),G(this,ss,new Map),G(this,Or,0)}mount(){Ha(this,Or)._++,T(this,Or)===1&&(G(this,os,bf.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),G(this,as,As.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,nt).onOnline())})))}unmount(){var e,t;Ha(this,Or)._--,T(this,Or)===0&&((e=T(this,os))==null||e.call(this),G(this,os,void 0),(t=T(this,as))==null||t.call(this),G(this,as,void 0))}isFetching(e){return T(this,nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,_r).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,nt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=T(this,nt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ir(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return T(this,nt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=T(this,nt).get(r.queryHash),s=i==null?void 0:i.state.data,o=E2(t,s);if(o!==void 0)return T(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ct.batch(()=>T(this,nt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=T(this,nt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=T(this,nt);ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=T(this,nt);return ct.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ct.batch(()=>T(this,nt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Et).catch(Et)}invalidateQueries(e,t={}){return ct.batch(()=>{var n,r;return T(this,nt).findAll(e).forEach(i=>{i.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(r=(n=e==null?void 0:e.refetchType)!=null?n:e==null?void 0:e.type)!=null?r:"active"},t)})}refetchQueries(e,t={}){var i;const n={...t,cancelRefetch:(i=t.cancelRefetch)!=null?i:!0},r=ct.batch(()=>T(this,nt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Et)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=T(this,nt).build(this,t);return n.isStaleByTime(Ir(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=Uh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e.behavior=Uh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return As.isOnline()?T(this,_r).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,nt)}getMutationCache(){return T(this,_r)}getDefaultOptions(){return T(this,kr)}setDefaultOptions(e){G(this,kr,e)}setQueryDefaults(e,t){T(this,is).set(_i(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,is).values()],n={};return t.forEach(r=>{Mo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){T(this,ss).set(_i(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,ss).values()],n={};return t.forEach(r=>{Mo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=vf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Fl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,nt).clear(),T(this,_r).clear()}},nt=new WeakMap,_r=new WeakMap,kr=new WeakMap,is=new WeakMap,ss=new WeakMap,Or=new WeakMap,os=new WeakMap,as=new WeakMap,Zp),jt,$e,ha,Ot,yi,ls,Er,Ar,ga,cs,us,mi,pi,Tr,ds,ze,go,Xu,Ju,Zu,ed,td,nd,rd,M0,e0,H2=(e0=class extends Rs{constructor(t,n){super();re(this,ze);re(this,jt);re(this,$e);re(this,ha);re(this,Ot);re(this,yi);re(this,ls);re(this,Er);re(this,Ar);re(this,ga);re(this,cs);re(this,us);re(this,mi);re(this,pi);re(this,Tr);re(this,ds,new Set);this.options=n,G(this,jt,t),G(this,Ar,null),G(this,Er,Yu()),this.options.experimental_prefetchInRender||T(this,Er).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,$e).addObserver(this),Wh(T(this,$e),this.options)?Ee(this,ze,go).call(this):this.updateResult(),Ee(this,ze,ed).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return id(T(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return id(T(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ee(this,ze,td).call(this),Ee(this,ze,nd).call(this),T(this,$e).removeObserver(this)}setOptions(t){const n=this.options,r=T(this,$e);if(this.options=T(this,jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof sn(this.options.enabled,T(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ee(this,ze,rd).call(this),T(this,$e).setOptions(this.options),n._defaulted&&!Rl(this.options,n)&&T(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,$e),observer:this});const i=this.hasListeners();i&&Vh(T(this,$e),r,this.options,n)&&Ee(this,ze,go).call(this),this.updateResult(),i&&(T(this,$e)!==r||sn(this.options.enabled,T(this,$e))!==sn(n.enabled,T(this,$e))||Ir(this.options.staleTime,T(this,$e))!==Ir(n.staleTime,T(this,$e)))&&Ee(this,ze,Xu).call(this);const s=Ee(this,ze,Ju).call(this);i&&(T(this,$e)!==r||sn(this.options.enabled,T(this,$e))!==sn(n.enabled,T(this,$e))||s!==T(this,Tr))&&Ee(this,ze,Zu).call(this,s)}getOptimisticResult(t){const n=T(this,jt).getQueryCache().build(T(this,jt),t),r=this.createResult(n,t);return K2(this,r)&&(G(this,Ot,r),G(this,ls,this.options),G(this,yi,T(this,$e).state)),r}getCurrentResult(){return T(this,Ot)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){T(this,ds).add(t)}getCurrentQuery(){return T(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=T(this,jt).defaultQueryOptions(t),r=T(this,jt).getQueryCache().build(T(this,jt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return Ee(this,ze,go).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),T(this,Ot)))}createResult(t,n){var _;const r=T(this,$e),i=this.options,s=T(this,Ot),o=T(this,yi),a=T(this,ls),c=t!==r?t.state:T(this,ha),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const O=this.hasListeners(),P=!O&&Wh(t,n),j=O&&Vh(t,r,n,i);(P||j)&&(d={...d,...P0(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let O;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(O=s.data,v=!0):O=typeof n.placeholderData=="function"?n.placeholderData((_=T(this,us))==null?void 0:_.state.data,T(this,us)):n.placeholderData,O!==void 0&&(p="success",h=Qu(s==null?void 0:s.data,O,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===T(this,ga))h=T(this,cs);else try{G(this,ga,n.select),h=n.select(h),h=Qu(s==null?void 0:s.data,h,n),G(this,cs,h),G(this,Ar,null)}catch(O){G(this,Ar,O)}T(this,Ar)&&(g=T(this,Ar),h=T(this,cs),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",w=p==="pending",S=p==="error",x=w&&b,E=h!==void 0,k={status:p,fetchStatus:d.fetchStatus,isPending:w,isSuccess:p==="success",isError:S,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:S&&!E,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&E,isStale:xf(t,n),refetch:this.refetch,promise:T(this,Er),isEnabled:sn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=W=>{k.status==="error"?W.reject(k.error):k.data!==void 0&&W.resolve(k.data)},P=()=>{const W=G(this,Er,k.promise=Yu());O(W)},j=T(this,Er);switch(j.status){case"pending":t.queryHash===r.queryHash&&O(j);break;case"fulfilled":(k.status==="error"||k.data!==j.value)&&P();break;case"rejected":(k.status!=="error"||k.error!==j.reason)&&P();break}}return k}updateResult(){const t=T(this,Ot),n=this.createResult(T(this,$e),this.options);if(G(this,yi,T(this,$e).state),G(this,ls,this.options),T(this,yi).data!==void 0&&G(this,us,T(this,$e)),Rl(n,t))return;G(this,Ot,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!T(this,ds).size)return!0;const o=new Set(s!=null?s:T(this,ds));return this.options.throwOnError&&o.add("error"),Object.keys(T(this,Ot)).some(a=>{const l=a;return T(this,Ot)[l]!==t[l]&&o.has(l)})};Ee(this,ze,M0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ee(this,ze,ed).call(this)}},jt=new WeakMap,$e=new WeakMap,ha=new WeakMap,Ot=new WeakMap,yi=new WeakMap,ls=new WeakMap,Er=new WeakMap,Ar=new WeakMap,ga=new WeakMap,cs=new WeakMap,us=new WeakMap,mi=new WeakMap,pi=new WeakMap,Tr=new WeakMap,ds=new WeakMap,ze=new WeakSet,go=function(t){Ee(this,ze,rd).call(this);let n=T(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Et)),n},Xu=function(){Ee(this,ze,td).call(this);const t=Ir(this.options.staleTime,T(this,$e));if(Ci||T(this,Ot).isStale||!Wu(t))return;const r=C0(T(this,Ot).dataUpdatedAt,t)+1;G(this,mi,setTimeout(()=>{T(this,Ot).isStale||this.updateResult()},r))},Ju=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,$e)):this.options.refetchInterval)!=null?t:!1},Zu=function(t){Ee(this,ze,nd).call(this),G(this,Tr,t),!(Ci||sn(this.options.enabled,T(this,$e))===!1||!Wu(T(this,Tr))||T(this,Tr)===0)&&G(this,pi,setInterval(()=>{(this.options.refetchIntervalInBackground||bf.isFocused())&&Ee(this,ze,go).call(this)},T(this,Tr)))},ed=function(){Ee(this,ze,Xu).call(this),Ee(this,ze,Zu).call(this,Ee(this,ze,Ju).call(this))},td=function(){T(this,mi)&&(clearTimeout(T(this,mi)),G(this,mi,void 0))},nd=function(){T(this,pi)&&(clearInterval(T(this,pi)),G(this,pi,void 0))},rd=function(){const t=T(this,jt).getQueryCache().build(T(this,jt),this.options);if(t===T(this,$e))return;const n=T(this,$e);G(this,$e,t),G(this,ha,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},M0=function(t){ct.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(T(this,Ot))}),T(this,jt).getQueryCache().notify({query:T(this,$e),type:"observerResultsUpdated"})})},e0);function U2(e,t){return sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Wh(e,t){return U2(e,t)||e.state.data!==void 0&&id(e,t,t.refetchOnMount)}function id(e,t,n){if(sn(t.enabled,e)!==!1&&Ir(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&xf(e,t)}return!1}function Vh(e,t,n,r){return(e!==t||sn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&xf(e,n)}function xf(e,t){return sn(t.enabled,e)!==!1&&e.isStaleByTime(Ir(t.staleTime,e))}function K2(e,t){return!Rl(e.getCurrentResult(),t)}var Pr,$r,Dt,tr,lr,Ol,sd,t0,W2=(t0=class extends Rs{constructor(n,r){super();re(this,lr);re(this,Pr);re(this,$r);re(this,Dt);re(this,tr);G(this,Pr,n),this.setOptions(r),this.bindMethods(),Ee(this,lr,Ol).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=T(this,Pr).defaultMutationOptions(n),Rl(this.options,r)||T(this,Pr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Dt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&_i(r.mutationKey)!==_i(this.options.mutationKey)?this.reset():((i=T(this,Dt))==null?void 0:i.state.status)==="pending"&&T(this,Dt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=T(this,Dt))==null||n.removeObserver(this)}onMutationUpdate(n){Ee(this,lr,Ol).call(this),Ee(this,lr,sd).call(this,n)}getCurrentResult(){return T(this,$r)}reset(){var n;(n=T(this,Dt))==null||n.removeObserver(this),G(this,Dt,void 0),Ee(this,lr,Ol).call(this),Ee(this,lr,sd).call(this)}mutate(n,r){var i;return G(this,tr,r),(i=T(this,Dt))==null||i.removeObserver(this),G(this,Dt,T(this,Pr).getMutationCache().build(T(this,Pr),this.options)),T(this,Dt).addObserver(this),T(this,Dt).execute(n)}},Pr=new WeakMap,$r=new WeakMap,Dt=new WeakMap,tr=new WeakMap,lr=new WeakSet,Ol=function(){var r,i;const n=(i=(r=T(this,Dt))==null?void 0:r.state)!=null?i:$0();G(this,$r,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},sd=function(n){ct.batch(()=>{var r,i,s,o,a,l,c,u;if(T(this,tr)&&this.hasListeners()){const d=T(this,$r).variables,f=T(this,$r).context;(n==null?void 0:n.type)==="success"?((i=(r=T(this,tr)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=T(this,tr)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=T(this,tr)).onError)==null||l.call(a,n.error,d,f),(u=(c=T(this,tr)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(T(this,$r))})})},t0),j0=M.createContext(void 0),Hn=e=>{const t=M.useContext(j0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},V2=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(j0.Provider,{value:e,children:t})),D0=M.createContext(!1),G2=()=>M.useContext(D0);D0.Provider;function Q2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Y2=M.createContext(Q2()),X2=()=>M.useContext(Y2),J2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Z2=e=>{M.useEffect(()=>{e.clearReset()},[e])},eS=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||k0(n,[e.error,r])),tS=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r!=null?r:1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},nS=(e,t)=>e.isLoading&&e.isFetching&&!t,rS=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Gh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function iS(e,t,n){var d,f,h,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=G2(),i=X2(),s=Hn(n),o=s.defaultQueryOptions(e);(f=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=r?"isRestoring":"optimistic",tS(o),J2(o,i),Z2(i);const a=!s.getQueryCache().get(o.queryHash),[l]=M.useState(()=>new t(s,o)),c=l.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(p=>{const v=u?l.subscribe(ct.batchCalls(p)):Et;return l.updateResult(),v},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setOptions(o)},[o,l]),rS(o,c))throw Gh(o,l,i);if(eS({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((g=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,o,c),o.experimental_prefetchInRender&&!Ci&&nS(c,r)){const p=a?Gh(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(Et).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function hr(e,t){return iS(e,H2,t)}function Mi(e,t){const n=Hn(t),[r]=M.useState(()=>new W2(n,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const i=M.useSyncExternalStore(M.useCallback(o=>r.subscribe(ct.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=M.useCallback((o,a)=>{r.mutate(o,a).catch(Et)},[r]);if(i.error&&k0(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Se={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Qh(this.context.count)},getNextContextId(){return Qh(this.context.count++)}};function Qh(e){const t=String(e),n=t.length-1;return Se.context.id+(n?String.fromCharCode(96+n):"")+t}function yo(e){Se.context=e}var L0=!1,sS=(e,t)=>e===t,Nl=Symbol("solid-proxy"),I0=typeof Proxy=="function",vc=Symbol("solid-track"),Bl={equals:sS},R0=H0,gr=1,ql=2,F0={owned:null,cleanups:null,context:null,owner:null},ru={},Ie=null,iu=null,oS=null,Ve=null,St=null,or=null,bc=0;function ar(e,t){const n=Ve,r=Ie,i=e.length===0,s=t===void 0?r:t,o=i?F0:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>tt(()=>jo(o)));Ie=o,Ve=null;try{return Fn(a,!0)}finally{Ve=n,Ie=r}}function ne(e,t){t=t?Object.assign({},Bl,t):Bl;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),z0(n,i));return[q0.bind(n),r]}function N0(e,t,n){const r=xc(e,t,!0,gr);Fs(r)}function pe(e,t,n){const r=xc(e,t,!1,gr);Fs(r)}function ve(e,t,n){R0=pS;const r=xc(e,t,!1,gr);(!n||!n.render)&&(r.user=!0),or?or.push(r):Fs(r)}function q(e,t,n){n=n?Object.assign({},Bl,n):Bl;const r=xc(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Fs(r),q0.bind(r)}function aS(e){return e&&typeof e=="object"&&"then"in e}function lS(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=ru,l=null,c=!1,u="initialValue"in s,d=typeof r=="function"&&q(r);const f=new Set,[h,g]=(s.storage||ne)(s.initialValue),[m,p]=ne(void 0),[v,b]=ne(void 0,{equals:!1}),[w,S]=ne(u?"ready":"unresolved");Se.context&&(l=Se.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Se.load&&Se.has(l)&&(a=Se.load(l)));function x(_,O,P,j){return o===_&&(o=null,j!==void 0&&(u=!0),(_===a||O===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(j,{value:O})),a=ru,E(O,P)),O}function E(_,O){Fn(()=>{O===void 0&&g(()=>_),S(O!==void 0?"errored":u?"ready":"unresolved"),p(O);for(const P of f.keys())P.decrement();f.clear()},!1)}function C(){const _=gS,O=h(),P=m();if(P!==void 0&&!o)throw P;return Ve&&Ve.user,O}function k(_=!0){if(_!==!1&&c)return;c=!1;const O=d?d():r;if(O==null||O===!1){x(o,tt(h));return}const P=a!==ru?a:tt(()=>i(O,{value:h(),refetching:_}));return aS(P)?(o=P,"value"in P?(P.status==="success"?x(o,P.value,void 0,O):x(o,void 0,od(P.value),O),P):(c=!0,queueMicrotask(()=>c=!1),Fn(()=>{S(u?"refreshing":"pending"),b()},!1),P.then(j=>x(P,j,void 0,O),j=>x(P,void 0,od(j),O)))):(x(o,P,void 0,O),P)}return Object.defineProperties(C,{state:{get:()=>w()},error:{get:()=>m()},loading:{get(){const _=w();return _==="pending"||_==="refreshing"}},latest:{get(){if(!u)return C();const _=m();if(_&&!o)throw _;return h()}}}),d?N0(()=>k(!1)):k(!1),[C,{refetch:k,mutate:g}]}function cS(e){return Fn(e,!1)}function tt(e){if(Ve===null)return e();const t=Ve;Ve=null;try{return e()}finally{Ve=t}}function ur(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(s)return s=!1,o;const l=tt(()=>t(a,i,o));return i=a,l}}function dr(e){ve(()=>tt(e))}function be(e){return Ie===null||(Ie.cleanups===null?Ie.cleanups=[e]:Ie.cleanups.push(e)),e}function Yh(){return Ie}function uS(e,t){const n=Ie,r=Ve;Ie=e,Ve=null;try{return Fn(t,!0)}catch(i){wf(i)}finally{Ie=n,Ve=r}}function dS(e){const t=Ve,n=Ie;return Promise.resolve().then(()=>{Ve=t,Ie=n;let r;return Fn(e,!1),Ve=Ie=null,r?r.done:void 0})}var[fS,UF]=ne(!1);function hS(){return[fS,dS]}function yt(e,t){const n=Symbol("context");return{id:n,Provider:vS(n),defaultValue:e}}function mt(e){let t;return Ie&&Ie.context&&(t=Ie.context[e.id])!==void 0?t:e.defaultValue}function B0(e){const t=q(e),n=q(()=>ad(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var gS;function q0(){if(this.sources&&this.state)if(this.state===gr)Fs(this);else{const e=St;St=null,Fn(()=>Hl(this),!1),St=e}if(Ve){const e=this.observers?this.observers.length:0;Ve.sources?(Ve.sources.push(this),Ve.sourceSlots.push(e)):(Ve.sources=[this],Ve.sourceSlots=[e]),this.observers?(this.observers.push(Ve),this.observerSlots.push(Ve.sources.length-1)):(this.observers=[Ve],this.observerSlots=[Ve.sources.length-1])}return this.value}function z0(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Fn(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=iu&&iu.running;o&&iu.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?St.push(s):or.push(s),s.observers&&U0(s)),o||(s.state=gr)}if(St.length>1e6)throw St=[],new Error},!1)),t}function Fs(e){if(!e.fn)return;jo(e);const t=bc;yS(e,e.value,t)}function yS(e,t,n){let r;const i=Ie,s=Ve;Ve=Ie=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=gr,e.owned&&e.owned.forEach(jo),e.owned=null),e.updatedAt=n+1,wf(o)}finally{Ve=s,Ie=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?z0(e,r):e.value=r,e.updatedAt=n)}function xc(e,t,n,r=gr,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ie,context:Ie?Ie.context:null,pure:n};return Ie===null||Ie!==F0&&(Ie.owned?Ie.owned.push(s):Ie.owned=[s]),s}function zl(e){if(e.state===0)return;if(e.state===ql)return Hl(e);if(e.suspense&&tt(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<bc);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===gr)Fs(e);else if(e.state===ql){const r=St;St=null,Fn(()=>Hl(e,t[0]),!1),St=r}}function Fn(e,t){if(St)return e();let n=!1;t||(St=[]),or?n=!0:or=[],bc++;try{const r=e();return mS(n),r}catch(r){n||(or=null),St=null,wf(r)}}function mS(e){if(St&&(H0(St),St=null),e)return;const t=or;or=null,t.length&&Fn(()=>R0(t),!1)}function H0(e){for(let t=0;t<e.length;t++)zl(e[t])}function pS(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:zl(r)}if(Se.context){if(Se.count){Se.effects||(Se.effects=[]),Se.effects.push(...e.slice(0,n));return}yo()}for(Se.effects&&(Se.done||!Se.count)&&(e=[...Se.effects,...e],n+=Se.effects.length,delete Se.effects),t=0;t<n;t++)zl(e[t])}function Hl(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===gr?r!==t&&(!r.updatedAt||r.updatedAt<bc)&&zl(r):i===ql&&Hl(r,t)}}}function U0(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=ql,n.pure?St.push(n):or.push(n),n.observers&&U0(n))}}function jo(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)jo(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)jo(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function od(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function wf(e,t=Ie){throw od(e)}function ad(e){if(typeof e=="function"&&!e.length)return ad(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=ad(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function vS(e,t){return function(r){let i;return pe(()=>i=tt(()=>(Ie.context={...Ie.context,[e]:r.value},B0(()=>r.children))),void 0),i}}var ld=Symbol("fallback");function Ul(e){for(let t=0;t<e.length;t++)e[t]()}function bS(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return be(()=>Ul(s)),()=>{let l=e()||[],c=l.length,u,d;return l[vc],tt(()=>{let h,g,m,p,v,b,w,S,x;if(c===0)o!==0&&(Ul(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[ld],i[0]=ar(E=>(s[0]=E,n.fallback())),o=1);else if(o===0){for(i=new Array(c),d=0;d<c;d++)r[d]=l[d],i[d]=ar(f);o=c}else{for(m=new Array(c),p=new Array(c),a&&(v=new Array(c)),b=0,w=Math.min(o,c);b<w&&r[b]===l[b];b++);for(w=o-1,S=c-1;w>=b&&S>=b&&r[w]===l[S];w--,S--)m[S]=i[w],p[S]=s[w],a&&(v[S]=a[w]);for(h=new Map,g=new Array(S+1),d=S;d>=b;d--)x=l[d],u=h.get(x),g[d]=u===void 0?-1:u,h.set(x,d);for(u=b;u<=w;u++)x=r[u],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[u],p[d]=s[u],a&&(v[d]=a[u]),d=g[d],h.set(x,d)):s[u]();for(d=b;d<c;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=ar(f);i=i.slice(0,o=c),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[g,m]=ne(d);return a[d]=m,t(l[d],g)}return t(l[d])}}}function xS(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return be(()=>Ul(s)),()=>{const c=e()||[],u=c.length;return c[vc],tt(()=>{if(u===0)return a!==0&&(Ul(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[ld],i[0]=ar(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===ld&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<u;l++)l<r.length&&r[l]!==c[l]?o[l](()=>c[l]):l>=r.length&&(i[l]=ar(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=u,r=c.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,g]=ne(c[l]);return o[l]=g,t(h,l)}}}function $(e,t){return tt(()=>e(t||{}))}function Wa(){return!0}var cd={get(e,t,n){return t===Nl?n:e.get(t)},has(e,t){return t===Nl?!0:e.has(t)},set:Wa,deleteProperty:Wa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Wa,deleteProperty:Wa}},ownKeys(e){return e.keys()}};function su(e){return(e=typeof e=="function"?e():e)?e:{}}function wS(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function _e(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&Nl in a,e[o]=typeof a=="function"?(t=!0,q(a)):a}if(I0&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=su(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in su(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(su(e[a])));return[...new Set(o)]}},cd);const n={},r=Object.create(null);for(let o=e.length-1;o>=0;o--){const a=e[o];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:wS.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const i={},s=Object.keys(r);for(let o=s.length-1;o>=0;o--){const a=s[o],l=r[a];l&&l.get?Object.defineProperty(i,a,l):i[a]=l?l.value:void 0}return i}function He(e,...t){if(I0&&Nl in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},cd));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},cd)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const c of t)c.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function K0(e){let t,n;const r=i=>{const s=Se.context;if(s){const[a,l]=ne();Se.count||(Se.count=0),Se.count++,(n||(n=e())).then(c=>{!Se.done&&yo(s),Se.count--,l(()=>c.default),yo()}),t=a}else if(!t){const[a]=lS(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return q(()=>(o=t())?tt(()=>{if(!s||Se.done)return o(i);const a=Se.context;yo(s);const l=o(i);return yo(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var SS=0;function fn(){return Se.context?Se.getNextContextId():`cl-${SS++}`}var W0=e=>`Stale read from <${e}>.`;function CS(e){const t="fallback"in e&&{fallback:()=>e.fallback};return q(bS(()=>e.each,e.children,t||void 0))}function _S(e){const t="fallback"in e&&{fallback:()=>e.fallback};return q(xS(()=>e.each,e.children,t||void 0))}function me(e){const t=e.keyed,n=q(()=>e.when,void 0,void 0),r=t?n:q(n,void 0,{equals:(i,s)=>!i==!s});return q(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?tt(()=>s(t?i:()=>{if(!tt(r))throw W0("Show");return n()})):s}return e.fallback},void 0,void 0)}function kS(e){const t=B0(()=>e.children),n=q(()=>{const r=t(),i=Array.isArray(r)?r:[r];let s=()=>{};for(let o=0;o<i.length;o++){const a=o,l=i[o],c=s,u=q(()=>c()?void 0:l.when,void 0,void 0),d=l.keyed?u:q(u,void 0,{equals:(f,h)=>!f==!h});s=()=>c()||(d()?[a,u,l]:void 0)}return s});return q(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?tt(()=>a(o.keyed?s():()=>{var c;if(((c=tt(n)())==null?void 0:c[0])!==i)throw W0("Match");return s()})):a},void 0,void 0)}function ou(e){return e}var OS=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],ES=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...OS]),AS=new Set(["innerHTML","textContent","innerText","children"]),TS=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),PS=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function $S(e,t){const n=PS[e];return typeof n=="object"?n[t]?n.$:void 0:n}var MS=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),jS=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),DS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function LS(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,c=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const u=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],u)}else if(s===a)for(;o<i;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const u=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],u),t[i]=n[s]}else{if(!c){c=new Map;let d=a;for(;d<s;)c.set(n[d],d++)}const u=c.get(t[o]);if(u!=null)if(a<u&&u<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-a){const g=t[o];for(;a<u;)e.insertBefore(n[a++],g)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var _o="_$DX_DELEGATE";function V0(e,t,n,r={}){let i;return ar(s=>{i=s,t===document?e():U(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function de(e,t,n,r){let i;const s=()=>{const a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function wc(e,t=window.document){const n=t[_o]||(t[_o]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,Y0))}}function IS(e=window.document){if(e[_o]){for(let t of e[_o].keys())e.removeEventListener(t,Y0);delete e[_o]}}function Q(e,t,n){ji(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function RS(e,t,n,r){ji(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function FS(e,t,n){ji(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Y(e,t){ji(e)||(t==null?e.removeAttribute("class"):e.className=t)}function G0(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function NS(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Xh(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Xh(e,a,!0),n[a]=l)}return n}function BS(e,t,n){if(!t)return n?Q(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function Q0(e,t={},n,r){const i={};return r||pe(()=>i.children=Do(e,t.children,i.children)),pe(()=>typeof t.ref=="function"&&Ns(t.ref,e)),pe(()=>qS(e,t,n,!0,i,!0)),i}function Ns(e,t,n){return tt(()=>e(t,n))}function U(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Do(e,t,r,n);pe(i=>Do(e,t(),i,n),r)}function qS(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Jh(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=Jh(e,o,a,i[o],n,s,t)}}function zS(e){let t,n;return!ji()||!(t=Se.registry.get(n=US()))?e():(Se.completed&&Se.completed.add(t),Se.registry.delete(n),t)}function ji(e){return!!Se.context&&!Se.done&&(!e||e.isConnected)}function HS(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Xh(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function Jh(e,t,n,r,i,s,o){let a,l,c,u,d;if(t==="style")return BS(e,n,r);if(t==="classList")return NS(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=MS.has(f);if(!h&&r){const g=Array.isArray(r)?r[0]:r;e.removeEventListener(f,g)}(h||n)&&(G0(e,f,n,h),h&&wc([f]))}else if(t.slice(0,5)==="attr:")Q(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")FS(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=AS.has(t))||!i&&((u=$S(t,e.tagName))||(l=ES.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(d)t=t.slice(5),l=!0;else if(ji(e))return n;t==="class"||t==="className"?Y(e,n):a&&!l&&!c?e[HS(t)]=n:e[u||t]=n}else{const f=i&&t.indexOf(":")>-1&&DS[t.split(":")[0]];f?RS(e,f,t,n):Q(e,TS[t]||t,n)}return n}function Y0(e){if(Se.registry&&Se.events&&Se.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,i=e.currentTarget,s=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),o=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Se.registry&&!Se.done&&(Se.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!o());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function Do(e,t,n,r,i){const s=ji(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const o=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,o==="string"||o==="number"){if(s||o==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Fi(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||o==="boolean"){if(s)return n;n=Fi(e,n,r)}else{if(o==="function")return pe(()=>{let l=t();for(;typeof l=="function";)l=l();n=Do(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(ud(l,t,n,i))return pe(()=>n=Do(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=Fi(e,n,r),a)return n}else c?n.length===0?Zh(e,l,r):LS(e,n,l):(n&&Fi(e),Zh(e,l));n=l}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=Fi(e,n,r,t);Fi(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ud(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=ud(e,a,l)||i;else if(c==="function")if(r){for(;typeof a=="function";)a=a();i=ud(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return i}function Zh(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Fi(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function US(){return Se.getNextContextId()}var KS="http://www.w3.org/2000/svg";function X0(e,t=!1){return t?document.createElementNS(KS,e):document.createElement(e)}function J0(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Yh();let s,o=!!Se.context;return ve(()=>{o&&(Yh().user=o=!1),s||(s=uS(i,()=>q(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=ne(!1),u=()=>c(!0);ar(d=>U(a,()=>l()?d():s(),null)),be(u)}else{const l=X0(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),U(c,s),a.appendChild(l),e.ref&&e.ref(l),be(()=>a.removeChild(l))}},void 0,{render:!o}),n}function WS(e,t){const n=q(e);return q(()=>{const r=n();switch(typeof r){case"function":return tt(()=>r(t));case"string":const i=jS.has(r),s=Se.context?zS():X0(r,i);return Q0(s,t,i),s}})}function VS(e){const[,t]=He(e,["component"]);return WS(()=>e.component,t)}var GS=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Z0=class{constructor(t){this.generateIdentifier=t,this.kv=new GS}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},QS=class extends Z0{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function YS(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function XS(e,t){const n=YS(e);if("find"in n)return n.find(t);const r=n;for(let i=0;i<r.length;i++){const s=r[i];if(t(s))return s}}function Ts(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function El(e,t){return e.indexOf(t)!==-1}function eg(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var JS=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return XS(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},ZS=e=>Object.prototype.toString.call(e).slice(8,-1),ev=e=>typeof e=="undefined",eC=e=>e===null,Lo=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,dd=e=>Lo(e)&&Object.keys(e).length===0,Nr=e=>Array.isArray(e),tC=e=>typeof e=="string",nC=e=>typeof e=="number"&&!isNaN(e),rC=e=>typeof e=="boolean",iC=e=>e instanceof RegExp,Io=e=>e instanceof Map,Ro=e=>e instanceof Set,tv=e=>ZS(e)==="Symbol",sC=e=>e instanceof Date&&!isNaN(e.valueOf()),oC=e=>e instanceof Error,tg=e=>typeof e=="number"&&isNaN(e),aC=e=>rC(e)||eC(e)||ev(e)||nC(e)||tC(e)||tv(e),lC=e=>typeof e=="bigint",cC=e=>e===1/0||e===-1/0,uC=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),dC=e=>e instanceof URL,nv=e=>e.replace(/\./g,"\\."),au=e=>e.map(String).map(nv).join("."),ko=e=>{const t=[];let n="";for(let i=0;i<e.length;i++){let s=e.charAt(i);if(s==="\\"&&e.charAt(i+1)==="."){n+=".",i++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};function On(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var rv=[On(ev,"undefined",()=>null,()=>{}),On(lC,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),On(sC,"Date",e=>e.toISOString(),e=>new Date(e)),On(oC,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),On(iC,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),On(Ro,"set",e=>[...e.values()],e=>new Set(e)),On(Io,"map",e=>[...e.entries()],e=>new Map(e)),On(e=>tg(e)||cC(e),"number",e=>tg(e)?"NaN":e>0?"Infinity":"-Infinity",Number),On(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),On(dC,"URL",e=>e.toString(),e=>new URL(e))];function Sc(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var iv=Sc((e,t)=>tv(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),fC=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),sv=Sc(uC,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=fC[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function ov(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var av=Sc(ov,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(i=>{r[i]=e[i]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(r.prototype),e)}),lv=Sc((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),hC=[av,iv,lv,sv],ng=(e,t)=>{const n=eg(hC,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=eg(rv,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},cv={};rv.forEach(e=>{cv[e.annotation]=e});var gC=(e,t,n)=>{if(Nr(t))switch(t[0]){case"symbol":return iv.untransform(e,t,n);case"class":return av.untransform(e,t,n);case"custom":return lv.untransform(e,t,n);case"typed-array":return sv.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=cv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},Wi=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function uv(e){if(El(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(El(e,"prototype"))throw new Error("prototype is not allowed as a property");if(El(e,"constructor"))throw new Error("constructor is not allowed as a property")}var yC=(e,t)=>{uv(t);for(let n=0;n<t.length;n++){const r=t[n];if(Ro(e))e=Wi(e,+r);else if(Io(e)){const i=+r,s=+t[++n]==0?"key":"value",o=Wi(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},fd=(e,t,n)=>{if(uv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(Nr(r)){const a=+o;r=r[a]}else if(Lo(r))r=r[o];else if(Ro(r)){const a=+o;r=Wi(r,a)}else if(Io(r)){if(s===t.length-2)break;const l=+o,c=+t[++s]==0?"key":"value",u=Wi(r,l);switch(c){case"key":r=u;break;case"value":r=r.get(u);break}}}const i=t[t.length-1];if(Nr(r)?r[+i]=n(r[+i]):Lo(r)&&(r[i]=n(r[i])),Ro(r)){const s=Wi(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(Io(r)){const s=+t[t.length-2],o=Wi(r,s);switch(+i==0?"key":"value"){case"key":{const l=n(o);r.set(l,r.get(o)),l!==o&&r.delete(o);break}case"value":{r.set(o,n(r.get(o)));break}}}return e};function hd(e,t,n=[]){if(!e)return;if(!Nr(e)){Ts(e,(s,o)=>hd(s,t,[...n,...ko(o)]));return}const[r,i]=e;i&&Ts(i,(s,o)=>{hd(s,t,[...n,...ko(o)])}),t(r,n)}function mC(e,t,n){return hd(t,(r,i)=>{e=fd(e,i,s=>gC(s,r,n))}),e}function pC(e,t){function n(r,i){const s=yC(e,ko(i));r.map(ko).forEach(o=>{e=fd(e,o,()=>s)})}if(Nr(t)){const[r,i]=t;r.forEach(s=>{e=fd(e,ko(s),()=>e)}),i&&Ts(i,n)}else Ts(t,n);return e}var vC=(e,t)=>Lo(e)||Nr(e)||Io(e)||Ro(e)||ov(e,t);function bC(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function xC(e,t){const n={};let r;return e.forEach(i=>{if(i.length<=1)return;t||(i=i.map(a=>a.map(String)).sort((a,l)=>a.length-l.length));const[s,...o]=i;s.length===0?r=o.map(au):n[au(s)]=o.map(au)}),r?dd(n)?[r]:[r,n]:dd(n)?void 0:n}var dv=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=aC(e);if(!a){bC(e,i,t);const g=o.get(e);if(g)return r?{transformedValue:null}:g}if(!vC(e,n)){const g=ng(e,n),m=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,m),m}if(El(s,e))return{transformedValue:null};const l=ng(e,n),c=(h=l==null?void 0:l.value)!=null?h:e,u=Nr(c)?[]:{},d={};Ts(c,(g,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const p=dv(g,t,n,r,[...i,m],[...s,e],o);u[m]=p.transformedValue,Nr(p.annotations)?d[m]=p.annotations:Lo(p.annotations)&&Ts(p.annotations,(v,b)=>{d[nv(m)+"."+b]=v})});const f=dd(d)?{transformedValue:u,annotations:l?[l.type]:void 0}:{transformedValue:u,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function fv(e){return Object.prototype.toString.call(e).slice(8,-1)}function rg(e){return fv(e)==="Array"}function wC(e){if(fv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function SC(e,t,n,r,i){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),i&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function gd(e,t={}){if(rg(e))return e.map(i=>gd(i,t));if(!wC(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(rg(t.props)&&!t.props.includes(s))return i;const o=e[s],a=gd(o,t);return SC(i,s,a,e,t.nonenumerable),i},{})}var Ge=class{constructor({dedupe:e=!1}={}){this.classRegistry=new QS,this.symbolRegistry=new Z0(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new JS,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=dv(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=xC(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=gd(t);return n!=null&&n.values&&(r=mC(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=pC(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};Ge.defaultInstance=new Ge;Ge.serialize=Ge.defaultInstance.serialize.bind(Ge.defaultInstance);Ge.deserialize=Ge.defaultInstance.deserialize.bind(Ge.defaultInstance);Ge.stringify=Ge.defaultInstance.stringify.bind(Ge.defaultInstance);Ge.parse=Ge.defaultInstance.parse.bind(Ge.defaultInstance);Ge.registerClass=Ge.defaultInstance.registerClass.bind(Ge.defaultInstance);Ge.registerSymbol=Ge.defaultInstance.registerSymbol.bind(Ge.defaultInstance);Ge.registerCustom=Ge.defaultInstance.registerCustom.bind(Ge.defaultInstance);Ge.allowErrorProps=Ge.defaultInstance.allowErrorProps.bind(Ge.defaultInstance);var hv=Ge.serialize,CC=Ge.stringify;function Hi(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function _C(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function kC({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function Vi({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function OC(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var Kl=(e,t=!1)=>{const{json:n}=hv(e);return JSON.stringify(n,null,t?2:void 0)},Va=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,EC=(e,t)=>e.queryHash.localeCompare(t.queryHash),gv=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,AC=(e,t)=>Va(e)===Va(t)?gv(e,t):Va(e)>Va(t)?1:-1,yd={status:AC,"query hash":EC,"last updated":gv},Ga=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,yv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,TC=(e,t)=>Ga(e)===Ga(t)?yv(e,t):Ga(e)>Ga(t)?1:-1,md={status:TC,"last updated":yv},ig=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),mv=()=>{const[e,t]=ne("dark");return dr(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)");t(n.matches?"dark":"light");const r=i=>{t(i.matches?"dark":"light")};n.addEventListener("change",r),be(()=>n.removeEventListener("change",r))}),e},oi=(e,t,n)=>{if(t.length===0)return n;if(e instanceof Map){const r=new Map(e);if(t.length===1)return r.set(t[0],n),r;const[i,...s]=t;return r.set(i,oi(r.get(i),s,n)),r}if(e instanceof Set){const r=oi(Array.from(e),t,n);return new Set(r)}if(Array.isArray(e)){const r=[...e];if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=oi(r[i],s,n),r}if(e instanceof Object){const r={...e};if(t.length===1)return r[t[0]]=n,r;const[i,...s]=t;return r[i]=oi(r[i],s,n),r}return e},mo=(e,t)=>{if(e instanceof Map){const n=new Map(e);if(t.length===1)return n.delete(t[0]),n;const[r,...i]=t;return n.set(r,mo(n.get(r),i)),n}if(e instanceof Set){const n=mo(Array.from(e),t);return new Set(n)}if(Array.isArray(e)){const n=[...e];if(t.length===1)return n.filter((s,o)=>o.toString()!==t[0]);const[r,...i]=t;return n[r]=mo(n[r],i),n}if(e instanceof Object){const n={...e};if(t.length===1)return delete n[t[0]],n;const[r,...i]=t;return n[r]=mo(n[r],i),n}return e},pv=(e,t)=>{if(!e||document.querySelector("#_goober")||(t==null?void 0:t.querySelector("#_goober")))return;const r=document.createElement("style"),i=document.createTextNode("");r.appendChild(i),r.id="_goober",r.setAttribute("nonce",e),t?t.appendChild(r):document.head.appendChild(r)},fs,ya,ma,pa,vi,va,hs,gs,ys,ms,ps,vs,ba,n0,PC=(n0=class{constructor(e){re(this,fs);re(this,ya);re(this,ma);re(this,pa);re(this,vi,!1);re(this,va);re(this,hs);re(this,gs);re(this,ys);re(this,ms);re(this,ps);re(this,vs);re(this,ba);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u}=e;G(this,fs,ne(t)),G(this,ma,n),G(this,pa,r),G(this,ya,i),G(this,va,c),G(this,hs,u),G(this,gs,ne(s)),G(this,ys,ne(o)),G(this,ms,ne(a)),G(this,ps,ne(l))}setButtonPosition(e){T(this,gs)[1](e)}setPosition(e){T(this,ys)[1](e)}setInitialIsOpen(e){T(this,ms)[1](e)}setErrorTypes(e){T(this,ps)[1](e)}setClient(e){T(this,fs)[1](e)}mount(e){if(T(this,vi))throw new Error("Devtools is already mounted");const t=V0(()=>{const n=this,[r]=T(this,gs),[i]=T(this,ys),[s]=T(this,ms),[o]=T(this,ps),[a]=T(this,fs);let l;return T(this,vs)?l=T(this,vs):(l=K0(()=>Promise.resolve().then(()=>lR)),G(this,vs,l)),pv(T(this,va),T(this,hs)),$(l,_e({get queryFlavor(){return T(n,ma)},get version(){return T(n,pa)},get onlineManager(){return T(n,ya)},get shadowDOMTarget(){return T(n,hs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);G(this,vi,!0),G(this,ba,t)}unmount(){var e;if(!T(this,vi))throw new Error("Devtools is not mounted");(e=T(this,ba))==null||e.call(this),G(this,vi,!1)}},fs=new WeakMap,ya=new WeakMap,ma=new WeakMap,pa=new WeakMap,vi=new WeakMap,va=new WeakMap,hs=new WeakMap,gs=new WeakMap,ys=new WeakMap,ms=new WeakMap,ps=new WeakMap,vs=new WeakMap,ba=new WeakMap,n0),bs,xa,wa,Sa,bi,Ca,xs,ws,Ss,Cs,_s,ks,Os,_a,r0,$C=(r0=class{constructor(e){re(this,bs);re(this,xa);re(this,wa);re(this,Sa);re(this,bi,!1);re(this,Ca);re(this,xs);re(this,ws);re(this,Ss);re(this,Cs);re(this,_s);re(this,ks);re(this,Os);re(this,_a);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:c,shadowDOMTarget:u,onClose:d}=e;G(this,bs,ne(t)),G(this,wa,n),G(this,Sa,r),G(this,xa,i),G(this,Ca,c),G(this,xs,u),G(this,ws,ne(s)),G(this,Ss,ne(o)),G(this,Cs,ne(a)),G(this,_s,ne(l)),G(this,ks,ne(d))}setButtonPosition(e){T(this,ws)[1](e)}setPosition(e){T(this,Ss)[1](e)}setInitialIsOpen(e){T(this,Cs)[1](e)}setErrorTypes(e){T(this,_s)[1](e)}setClient(e){T(this,bs)[1](e)}setOnClose(e){T(this,ks)[1](()=>e)}mount(e){if(T(this,bi))throw new Error("Devtools is already mounted");const t=V0(()=>{const n=this,[r]=T(this,ws),[i]=T(this,Ss),[s]=T(this,Cs),[o]=T(this,_s),[a]=T(this,bs),[l]=T(this,ks);let c;return T(this,Os)?c=T(this,Os):(c=K0(()=>Promise.resolve().then(()=>dR)),G(this,Os,c)),pv(T(this,Ca),T(this,xs)),$(c,_e({get queryFlavor(){return T(n,wa)},get version(){return T(n,Sa)},get onlineManager(){return T(n,xa)},get shadowDOMTarget(){return T(n,xs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()},get onClose(){return l()}}))},e);G(this,bi,!0),G(this,_a,t)}unmount(){var e;if(!T(this,bi))throw new Error("Devtools is not mounted");(e=T(this,_a))==null||e.call(this),G(this,bi,!1)}},bs=new WeakMap,xa=new WeakMap,wa=new WeakMap,Sa=new WeakMap,bi=new WeakMap,Ca=new WeakMap,xs=new WeakMap,ws=new WeakMap,Ss=new WeakMap,Cs=new WeakMap,_s=new WeakMap,ks=new WeakMap,Os=new WeakMap,_a=new WeakMap,r0);function MC(e){const t=Hn(e.client),n=M.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[c]=M.useState(new PC({client:t,queryFlavor:"React Query",version:"5",onlineManager:As,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return M.useEffect(()=>{c.setClient(t)},[t,c]),M.useEffect(()=>{r&&c.setButtonPosition(r)},[r,c]),M.useEffect(()=>{i&&c.setPosition(i)},[i,c]),M.useEffect(()=>{c.setInitialIsOpen(s||!1)},[s,c]),M.useEffect(()=>{c.setErrorTypes(o||[])},[o,c]),M.useEffect(()=>(n.current&&c.mount(n.current),()=>{c.unmount()}),[c]),y.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function jC(e){const t=Hn(e.client),n=M.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=M.useState(new $C({client:t,queryFlavor:"React Query",version:"5",onlineManager:As,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return M.useEffect(()=>{o.setClient(t)},[t,o]),M.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),M.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),M.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),y.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var DC=process.env.NODE_ENV!=="development"?function(){return null}:MC;process.env.NODE_ENV;function vv(e,t){return function(){return e.apply(t,arguments)}}const{toString:LC}=Object.prototype,{getPrototypeOf:Sf}=Object,{iterator:Cc,toStringTag:bv}=Symbol,_c=(e=>t=>{const n=LC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kn=e=>(e=e.toLowerCase(),t=>_c(t)===e),kc=e=>t=>typeof t===e,{isArray:Bs}=Array,Fo=kc("undefined");function IC(e){return e!==null&&!Fo(e)&&e.constructor!==null&&!Fo(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xv=kn("ArrayBuffer");function RC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xv(e.buffer),t}const FC=kc("string"),Rt=kc("function"),wv=kc("number"),Oc=e=>e!==null&&typeof e=="object",NC=e=>e===!0||e===!1,Al=e=>{if(_c(e)!=="object")return!1;const t=Sf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bv in e)&&!(Cc in e)},BC=kn("Date"),qC=kn("File"),zC=kn("Blob"),HC=kn("FileList"),UC=e=>Oc(e)&&Rt(e.pipe),KC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=_c(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},WC=kn("URLSearchParams"),[VC,GC,QC,YC]=["ReadableStream","Request","Response","Headers"].map(kn),XC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ea(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),Bs(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function Sv(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ai=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Cv=e=>!Fo(e)&&e!==ai;function pd(){const{caseless:e}=Cv(this)&&this||{},t={},n=(r,i)=>{const s=e&&Sv(t,i)||i;Al(t[s])&&Al(r)?t[s]=pd(t[s],r):Al(r)?t[s]=pd({},r):Bs(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ea(arguments[r],n);return t}const JC=(e,t,n,{allOwnKeys:r}={})=>(Ea(t,(i,s)=>{n&&Rt(i)?e[s]=vv(i,n):e[s]=i},{allOwnKeys:r}),e),ZC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),e_=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},t_=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Sf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},n_=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},r_=e=>{if(!e)return null;if(Bs(e))return e;let t=e.length;if(!wv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},i_=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Sf(Uint8Array)),s_=(e,t)=>{const r=(e&&e[Cc]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},o_=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},a_=kn("HTMLFormElement"),l_=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),sg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),c_=kn("RegExp"),_v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ea(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},u_=e=>{_v(e,(t,n)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Rt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},d_=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Bs(e)?r(e):r(String(e).split(t)),n},f_=()=>{},h_=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function g_(e){return!!(e&&Rt(e.append)&&e[bv]==="FormData"&&e[Cc])}const y_=e=>{const t=new Array(10),n=(r,i)=>{if(Oc(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Bs(r)?[]:{};return Ea(r,(o,a)=>{const l=n(o,i+1);!Fo(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},m_=kn("AsyncFunction"),p_=e=>e&&(Oc(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),kv=((e,t)=>e?setImmediate:t?((n,r)=>(ai.addEventListener("message",({source:i,data:s})=>{i===ai&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ai.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rt(ai.postMessage)),v_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ai):typeof process!="undefined"&&process.nextTick||kv,b_=e=>e!=null&&Rt(e[Cc]),N={isArray:Bs,isArrayBuffer:xv,isBuffer:IC,isFormData:KC,isArrayBufferView:RC,isString:FC,isNumber:wv,isBoolean:NC,isObject:Oc,isPlainObject:Al,isReadableStream:VC,isRequest:GC,isResponse:QC,isHeaders:YC,isUndefined:Fo,isDate:BC,isFile:qC,isBlob:zC,isRegExp:c_,isFunction:Rt,isStream:UC,isURLSearchParams:WC,isTypedArray:i_,isFileList:HC,forEach:Ea,merge:pd,extend:JC,trim:XC,stripBOM:ZC,inherits:e_,toFlatObject:t_,kindOf:_c,kindOfTest:kn,endsWith:n_,toArray:r_,forEachEntry:s_,matchAll:o_,isHTMLForm:a_,hasOwnProperty:sg,hasOwnProp:sg,reduceDescriptors:_v,freezeMethods:u_,toObjectSet:d_,toCamelCase:l_,noop:f_,toFiniteNumber:h_,findKey:Sv,global:ai,isContextDefined:Cv,isSpecCompliantForm:g_,toJSONObject:y_,isAsyncFn:m_,isThenable:p_,setImmediate:kv,asap:v_,isIterable:b_};function ke(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}N.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Ov=ke.prototype,Ev={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ev[e]={value:e}});Object.defineProperties(ke,Ev);Object.defineProperty(Ov,"isAxiosError",{value:!0});ke.from=(e,t,n,r,i,s)=>{const o=Object.create(Ov);return N.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ke.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const x_=null;function vd(e){return N.isPlainObject(e)||N.isArray(e)}function Av(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function og(e,t,n){return e?e.concat(t).map(function(i,s){return i=Av(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function w_(e){return N.isArray(e)&&!e.some(vd)}const S_=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function Ec(e,t,n){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!N.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(N.isDate(g))return g.toISOString();if(N.isBoolean(g))return g.toString();if(!l&&N.isBlob(g))throw new ke("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(g)||N.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,m,p){let v=g;if(g&&!p&&typeof g=="object"){if(N.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(N.isArray(g)&&w_(g)||(N.isFileList(g)||N.endsWith(m,"[]"))&&(v=N.toArray(g)))return m=Av(m),v.forEach(function(w,S){!(N.isUndefined(w)||w===null)&&t.append(o===!0?og([m],S,s):o===null?m:m+"[]",c(w))}),!1}return vd(g)?!0:(t.append(og(p,m,s),c(g)),!1)}const d=[],f=Object.assign(S_,{defaultVisitor:u,convertValue:c,isVisitable:vd});function h(g,m){if(!N.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),N.forEach(g,function(v,b){(!(N.isUndefined(v)||v===null)&&i.call(t,v,N.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ag(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Cf(e,t){this._pairs=[],e&&Ec(e,this,t)}const Tv=Cf.prototype;Tv.append=function(t,n){this._pairs.push([t,n])};Tv.toString=function(t){const n=t?function(r){return t.call(this,r,ag)}:ag;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function C_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pv(e,t,n){if(!t)return e;const r=n&&n.encode||C_;N.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=N.isURLSearchParams(t)?t.toString():new Cf(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class lg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(r){r!==null&&t(r)})}}const $v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},__=typeof URLSearchParams!="undefined"?URLSearchParams:Cf,k_=typeof FormData!="undefined"?FormData:null,O_=typeof Blob!="undefined"?Blob:null,E_={isBrowser:!0,classes:{URLSearchParams:__,FormData:k_,Blob:O_},protocols:["http","https","file","blob","url","data"]},_f=typeof window!="undefined"&&typeof document!="undefined",bd=typeof navigator=="object"&&navigator||void 0,A_=_f&&(!bd||["ReactNative","NativeScript","NS"].indexOf(bd.product)<0),T_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",P_=_f&&window.location.href||"http://localhost",$_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_f,hasStandardBrowserEnv:A_,hasStandardBrowserWebWorkerEnv:T_,navigator:bd,origin:P_},Symbol.toStringTag,{value:"Module"})),wt={...$_,...E_};function M_(e,t){return Ec(e,new wt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return wt.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function j_(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function D_(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function Mv(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&N.isArray(i)?i.length:o,l?(N.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!N.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&N.isArray(i[o])&&(i[o]=D_(i[o])),!a)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,i)=>{t(j_(r),i,n,0)}),n}return null}function L_(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Aa={transitional:$v,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=N.isObject(t);if(s&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return i?JSON.stringify(Mv(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return M_(t,this.formSerializer).toString();if((a=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ec(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),L_(t)):t}],transformResponse:[function(t){const n=this.transitional||Aa.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?ke.from(a,ke.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wt.classes.FormData,Blob:wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Aa.headers[e]={}});const I_=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),R_=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
13
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&I_[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},cg=Symbol("internals");function to(e){return e&&String(e).trim().toLowerCase()}function Tl(e){return e===!1||e==null?e:N.isArray(e)?e.map(Tl):String(e)}function F_(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const N_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lu(e,t,n,r,i){if(N.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function B_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function q_(e,t){const n=N.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let Ft=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,c){const u=to(l);if(!u)throw new Error("header name must be a non-empty string");const d=N.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Tl(a))}const o=(a,l)=>N.forEach(a,(c,u)=>s(c,u,l));if(N.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(N.isString(t)&&(t=t.trim())&&!N_(t))o(R_(t),n);else if(N.isObject(t)&&N.isIterable(t)){let a={},l,c;for(const u of t){if(!N.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?N.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=to(t),t){const r=N.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return F_(i);if(N.isFunction(n))return n.call(this,i,r);if(N.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=to(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=to(o),o){const a=N.findKey(r,o);a&&(!n||lu(r,r[a],a,n))&&(delete r[a],i=!0)}}return N.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||lu(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return N.forEach(this,(i,s)=>{const o=N.findKey(r,s);if(o){n[o]=Tl(i),delete n[s];return}const a=t?B_(s):String(s).trim();a!==s&&delete n[s],n[a]=Tl(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return N.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&N.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
14
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[cg]=this[cg]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=to(o);r[a]||(q_(i,o),r[a]=!0)}return N.isArray(t)?t.forEach(s):s(t),this}};Ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(Ft.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});N.freezeMethods(Ft);function cu(e,t){const n=this||Aa,r=t||n,i=Ft.from(r.headers);let s=r.data;return N.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function jv(e){return!!(e&&e.__CANCEL__)}function qs(e,t,n){ke.call(this,e==null?"canceled":e,ke.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(qs,ke,{__CANCEL__:!0});function Dv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ke("Request failed with status code "+n.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function z_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function H_(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const h=u&&c-u;return h?Math.round(f*1e3/h):void 0}}function U_(e,t){let n=0,r=1e3/t,i,s;const o=(c,u=Date.now())=>{n=u,i=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?o(c,u):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const Wl=(e,t,n=3)=>{let r=0;const i=H_(50,250);return U_(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,c=i(l),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},ug=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},dg=e=>(...t)=>N.asap(()=>e(...t)),K_=wt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wt.origin),wt.navigator&&/(msie|trident)/i.test(wt.navigator.userAgent)):()=>!0,W_=wt.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];N.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),N.isString(r)&&o.push("path="+r),N.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function V_(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function G_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Lv(e,t,n){let r=!V_(t);return e&&(r||n==!1)?G_(e,t):t}const fg=e=>e instanceof Ft?{...e}:e;function ki(e,t){t=t||{};const n={};function r(c,u,d,f){return N.isPlainObject(c)&&N.isPlainObject(u)?N.merge.call({caseless:f},c,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function i(c,u,d,f){if(N.isUndefined(u)){if(!N.isUndefined(c))return r(void 0,c,d,f)}else return r(c,u,d,f)}function s(c,u){if(!N.isUndefined(u))return r(void 0,u)}function o(c,u){if(N.isUndefined(u)){if(!N.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>i(fg(c),fg(u),d,!0)};return N.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,f=d(e[u],t[u],u);N.isUndefined(f)&&d!==a||(n[u]=f)}),n}const Iv=e=>{const t=ki({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=Ft.from(o),t.url=Pv(Lv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(N.isFormData(n)){if(wt.hasStandardBrowserEnv||wt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(wt.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&K_(t.url))){const c=i&&s&&W_.read(s);c&&o.set(i,c)}return t},Q_=typeof XMLHttpRequest!="undefined",Y_=Q_&&function(e){return new Promise(function(n,r){const i=Iv(e);let s=i.data;const o=Ft.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,f,h,g;function m(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const w=Ft.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};Dv(function(C){n(C),m()},function(C){r(C),m()},x),p=null}"onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new ke("Request aborted",ke.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new ke("Network Error",ke.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||$v;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new ke(S,x.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&N.forEach(o.toJSON(),function(S,x){p.setRequestHeader(x,S)}),N.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),c&&([f,g]=Wl(c,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=Wl(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=w=>{p&&(r(!w||w.type?new qs(null,e,p):w),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=z_(i.url);if(b&&wt.protocols.indexOf(b)===-1){r(new ke("Unsupported protocol "+b+":",ke.ERR_BAD_REQUEST,e));return}p.send(s||null)})},X_=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof ke?u:new qs(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,s(new ke(`timeout ${t} of ms exceeded`,ke.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>N.asap(a),l}},J_=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Z_=async function*(e,t){for await(const n of ek(e))yield*J_(n,t)},ek=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},hg=(e,t,n,r)=>{const i=Z_(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Ac=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rv=Ac&&typeof ReadableStream=="function",tk=Ac&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fv=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},nk=Rv&&Fv(()=>{let e=!1;const t=new Request(wt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gg=64*1024,xd=Rv&&Fv(()=>N.isReadableStream(new Response("").body)),Vl={stream:xd&&(e=>e.body)};Ac&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Vl[t]&&(Vl[t]=N.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ke(`Response type '${t}' is not supported`,ke.ERR_NOT_SUPPORT,r)})})})(new Response);const rk=async e=>{if(e==null)return 0;if(N.isBlob(e))return e.size;if(N.isSpecCompliantForm(e))return(await new Request(wt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(N.isArrayBufferView(e)||N.isArrayBuffer(e))return e.byteLength;if(N.isURLSearchParams(e)&&(e=e+""),N.isString(e))return(await tk(e)).byteLength},ik=async(e,t)=>{const n=N.toFiniteNumber(e.getContentLength());return n==null?rk(t):n},sk=Ac&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Iv(e);c=c?(c+"").toLowerCase():"text";let h=X_([i,s&&s.toAbortSignal()],o),g;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&nk&&n!=="get"&&n!=="head"&&(p=await ik(u,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(N.isFormData(r)&&(E=x.headers.get("content-type"))&&u.setContentType(E),x.body){const[C,k]=ug(p,Wl(dg(l)));r=hg(x.body,gg,C,k)}}N.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(g,f);const w=xd&&(c==="stream"||c==="response");if(xd&&(a||w&&m)){const x={};["status","statusText","headers"].forEach(_=>{x[_]=b[_]});const E=N.toFiniteNumber(b.headers.get("content-length")),[C,k]=a&&ug(E,Wl(dg(a),!0))||[];b=new Response(hg(b.body,gg,C,()=>{k&&k(),m&&m()}),x)}c=c||"text";let S=await Vl[N.findKey(Vl,c)||"text"](b,e);return!w&&m&&m(),await new Promise((x,E)=>{Dv(x,E,{data:S,headers:Ft.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,e,g),{cause:v.cause||v}):ke.from(v,v&&v.code,e,g)}}),wd={http:x_,xhr:Y_,fetch:sk};N.forEach(wd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const yg=e=>`- ${e}`,ok=e=>N.isFunction(e)||e===null||e===!1,Nv={getAdapter:e=>{e=N.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!ok(n)&&(r=wd[(o=String(n)).toLowerCase()],r===void 0))throw new ke(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
|
|
15
|
+
`+s.map(yg).join(`
|
|
16
|
+
`):" "+yg(s[0]):"as no adapter specified";throw new ke("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:wd};function uu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qs(null,e)}function mg(e){return uu(e),e.headers=Ft.from(e.headers),e.data=cu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nv.getAdapter(e.adapter||Aa.adapter)(e).then(function(r){return uu(e),r.data=cu.call(e,e.transformResponse,r),r.headers=Ft.from(r.headers),r},function(r){return jv(r)||(uu(e),r&&r.response&&(r.response.data=cu.call(e,e.transformResponse,r.response),r.response.headers=Ft.from(r.response.headers))),Promise.reject(r)})}const Bv="1.10.0",Tc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pg={};Tc.transitional=function(t,n,r){function i(s,o){return"[Axios v"+Bv+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new ke(i(o," has been removed"+(n?" in "+n:"")),ke.ERR_DEPRECATED);return n&&!pg[o]&&(pg[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};Tc.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ak(e,t,n){if(typeof e!="object")throw new ke("options must be an object",ke.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new ke("option "+s+" must be "+l,ke.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ke("Unknown option "+s,ke.ERR_BAD_OPTION)}}const Pl={assertOptions:ak,validators:Tc},En=Pl.validators;let xi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new lg,response:new lg}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
17
|
+
`+s):r.stack=s}catch(o){}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ki(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Pl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean)},!1),i!=null&&(N.isFunction(i)?n.paramsSerializer={serialize:i}:Pl.assertOptions(i,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&N.merge(s.common,s[n.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=Ft.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,f;if(!l){const g=[mg.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),f=g.length,u=Promise.resolve(n);d<f;)u=u.then(g[d++],g[d++]);return u}f=a.length;let h=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(p){m.call(this,p);break}}try{u=mg.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=c.length;d<f;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ki(this.defaults,t);const n=Lv(t.baseURL,t.url,t.allowAbsoluteUrls);return Pv(n,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){xi.prototype[t]=function(n,r){return this.request(ki(r||{},{method:t,url:n,data:(r||{}).data}))}});N.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(ki(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}xi.prototype[t]=n(),xi.prototype[t+"Form"]=n(!0)});let lk=class qv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new qs(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new qv(function(i){t=i}),cancel:t}}};function ck(e){return function(n){return e.apply(null,n)}}function uk(e){return N.isObject(e)&&e.isAxiosError===!0}const Sd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sd).forEach(([e,t])=>{Sd[t]=e});function zv(e){const t=new xi(e),n=vv(xi.prototype.request,t);return N.extend(n,xi.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return zv(ki(e,i))},n}const Je=zv(Aa);Je.Axios=xi;Je.CanceledError=qs;Je.CancelToken=lk;Je.isCancel=jv;Je.VERSION=Bv;Je.toFormData=Ec;Je.AxiosError=ke;Je.Cancel=Je.CanceledError;Je.all=function(t){return Promise.all(t)};Je.spread=ck;Je.isAxiosError=uk;Je.mergeConfig=ki;Je.AxiosHeaders=Ft;Je.formToJSON=e=>Mv(N.isHTMLForm(e)?new FormData(e):e);Je.getAdapter=Nv.getAdapter;Je.HttpStatusCode=Sd;Je.default=Je;const{Axios:GF,AxiosError:QF,CanceledError:YF,isCancel:XF,CancelToken:JF,VERSION:ZF,all:eN,Cancel:tN,isAxiosError:nN,spread:rN,toFormData:iN,AxiosHeaders:sN,HttpStatusCode:oN,formToJSON:aN,getAdapter:lN,mergeConfig:cN}=Je;function No(e){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(e)}function Bo(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return qt(b,"_invoke",function(w,S,x){var E,C,k,_=0,O=x||[],P=!1,j={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:function(D,L){return E=D,C=0,k=e,j.n=L,o}};function W(I,D){for(C=I,k=D,t=0;!P&&_&&!L&&t<O.length;t++){var L,F=O[t],oe=j.p,fe=F[2];I>3?(L=fe===D)&&(k=F[(C=F[4])?5:(C=3,3)],F[4]=F[5]=e):F[0]<=oe&&((L=I<2&&oe<F[1])?(C=0,j.v=D,j.n=F[1]):oe<fe&&(L=I<3||F[0]>D||D>fe)&&(F[4]=I,F[5]=D,j.n=fe,C=0))}if(L||I>1)return o;throw P=!0,D}return function(I,D,L){if(_>1)throw TypeError("Generator is already running");for(P&&D===1&&W(D,L),C=D,k=L;(t=C<2?e:k)||!P;){E||(C?C<3?(C>1&&(j.n=-1),W(C,k)):j.n=k:j.v=k);try{if(_=2,E){if(C||(I="next"),t=E[I]){if(!(t=t.call(E,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,C<2&&(C=0)}else C===1&&(t=E.return)&&t.call(E),C<2&&(k=TypeError("The iterator does not provide a '"+I+"' method"),C=1);E=e}else if((t=(P=j.n<0)?k:w.call(S,j))!==o)break}catch(F){E=e,C=1,k=F}finally{_=1}}return{value:t,done:P}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(qt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,qt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,qt(d,"constructor",c),qt(c,"constructor",l),l.displayName="GeneratorFunction",qt(c,i,"GeneratorFunction"),qt(d),qt(d,i,"Generator"),qt(d,r,function(){return this}),qt(d,"toString",function(){return"[object Generator]"}),(Bo=function(){return{w:s,m:f}})()}function qt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}qt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){qt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},qt(e,t,n,r)}function vg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function Hv(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){vg(s,r,i,o,a,"next",l)}function a(l){vg(s,r,i,o,a,"throw",l)}o(void 0)})}}function bg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bg(Object(n),!0).forEach(function(r){dk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dk(e,t,n){return(t=fk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fk(e){var t=hk(e,"string");return No(t)=="symbol"?t:t+""}function hk(e,t){if(No(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(No(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gk(e){var t;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(e,"="));if(r.length===2)return(t=r.pop())===null||t===void 0?void 0:t.split(";").shift()}}var yk="yst-insights-token";function mk(){if(typeof window!="undefined")return localStorage.getItem(yk)||void 0}var Ps=Je.create({withCredentials:!0});Ps.interceptors.request.use(function(e){var t=gk("XSRF-TOKEN"),n=t?decodeURIComponent(t):void 0,r=mk();return e.headers=Qi(Qi(Qi({},e.headers||{}),n?{"X-XSRF-TOKEN":n}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),e},function(e){return Promise.reject(e)});Ps.interceptors.response.use(function(e){return e},function(){var e=Hv(Bo().m(function t(n){var r;return Bo().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},t)}));return function(t){return e.apply(this,arguments)}}());function _t(e){return Cd.apply(this,arguments)}function Cd(){return Cd=Hv(Bo().m(function e(t){var n;return Bo().w(function(r){for(;;)switch(r.n){case 0:return n=Qi({},t),delete n.baseURL,r.a(2,Ps.request(Qi(Qi({},n),{},{withCredentials:!0})))}},e)})),Cd.apply(this,arguments)}function Uv(e){Ps.defaults.baseURL=e}function qo(e){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qo(e)}function xg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xg(Object(n),!0).forEach(function(r){pk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pk(e,t,n){return(t=vk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vk(e){var t=bk(e,"string");return qo(t)=="symbol"?t:t+""}function bk(e,t){if(qo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xk=function(t,n){return _t({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},Kv=function(t){return["/brands/".concat(t,"/analysis")]},wk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Kv(t),a=function(c){var u=c.signal;return xk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Sk(e,t,n){var r=wk(e,t),i=hr(r,n);return i.queryKey=r.queryKey,i}var Ck=function(t){return _t({url:"/brands/".concat(t,"/analysis"),method:"DELETE"})},_k=function(t){var n=["deleteAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId;return Ck(c)};return we({mutationFn:s},i)},kk=function(t,n){var r=_k(t);return Mi(r,n)},Ok=function(t,n,r){return _t({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},Ek=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},Ak=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:Ek(t,n),l=function(u){var d=u.signal;return Ok(t,n,d)};return we({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Pc(e,t,n,r){var i=Ak(e,t,n),s=hr(i,r);return s.queryKey=i.queryKey,s}var Tk=function(t,n,r){return _t({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},Pk=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},$k=function(t,n,r){var i,s=r!=null?r:{},o=s.query,a=(i=o==null?void 0:o.queryKey)!==null&&i!==void 0?i:Pk(t,n),l=function(u){var d=u.signal;return Tk(t,n,d)};return we({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Mk(e,t,n,r){var i=$k(e,t,n),s=hr(i,r);return s.queryKey=i.queryKey,s}var jk=function(t){return _t({url:"/users/logout",method:"POST",signal:t})},Dk=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return jk()};return we({mutationFn:s},i)},Lk=function(t,n){var r=Dk(t);return Mi(r,n)},Ik=function(t,n){return _t({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},Wv=function(t){return["/brands/".concat(t,"/associated-brands")]},Rk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Wv(t),a=function(c){var u=c.signal;return Ik(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Fk(e,t,n){var r=Rk(e,t),i=hr(r,n);return i.queryKey=r.queryKey,i}var Nk=function(t,n,r){return _t({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},Bk=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return Nk(c,u)};return we({mutationFn:s},i)},qk=function(t,n){var r=Bk(t);return Mi(r,n)},zk=function(t){return _t({url:"/brands",method:"GET",signal:t})},nr=function(){return["/brands"]},Hk=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:nr(),o=function(l){var c=l.signal;return zk(c)};return we({queryKey:s,queryFn:o},i)};function zs(e,t){var n=Hk(e),r=hr(n,t);return r.queryKey=n.queryKey,r}var Uk=function(t,n){return _t({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},Kk=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.data;return Uk(c)};return we({mutationFn:s},i)},Wk=function(t,n){var r=Kk(t);return Mi(r,n)},Vk=function(t,n){return _t({url:"/brands/".concat(t),method:"GET",signal:n})},Gk=function(t){return["/brands/".concat(t)]},Qk=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Gk(t),a=function(c){var u=c.signal;return Vk(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function Vv(e,t,n){var r=Qk(e,t),i=hr(r,n);return i.queryKey=r.queryKey,i}var Yk=function(t){return _t({url:"/brands/".concat(t),method:"DELETE"})},Xk=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId;return Yk(c)};return we({mutationFn:s},i)},Jk=function(t,n){var r=Xk(t);return Mi(r,n)},Zk=function(t,n){return _t({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},eO=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return Zk(c,u)};return we({mutationFn:s},i)},Gv=function(t,n){var r=eO(t);return Mi(r,n)},tO=function(t,n){return _t({url:"/brands/".concat(t,"/queries"),method:"GET",signal:n})},nO=function(t){return["/brands/".concat(t,"/queries")]},rO=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:nO(t),a=function(c){var u=c.signal;return tO(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function iO(e,t,n){var r=rO(e,t),i=hr(r,n);return i.queryKey=r.queryKey,i}var sO=function(t,n){return _t({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},oO=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:we(we({},t),{},{mutation:we(we({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},c=l.brandId,u=l.data;return sO(c,u)};return we({mutationFn:s},i)},aO=function(t,n){var r=oO(t);return Mi(r,n)},lO=function(t,n){return _t({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},cO=function(t){return["/brands/".concat(t,"/query-suggestions")]},uO=function(t,n){var r,i=n!=null?n:{},s=i.query,o=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:cO(t),a=function(c){var u=c.signal;return lO(t,u)};return we({queryKey:o,queryFn:a,enabled:!!t},s)};function dO(e,t,n){var r=uO(e,t),i=hr(r,n);return i.queryKey=r.queryKey,i}var fO=function(t){return _t({url:"/users/current",method:"GET",signal:t})},kf=function(){return["/users/current"]},hO=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:kf(),o=function(l){var c=l.signal;return fO(c)};return we({queryKey:s,queryFn:o},i)};function $c(e,t){var n=hO(e),r=hr(n,t);return r.queryKey=n.queryKey,r}var Qv=z.createContext(void 0),gO=function(t){var n,r,i,s=t.children,o=t.brandId,a=t.analysisId,l=t.model,c=Rh("/brands/:brandId"),u=Rh("/brands/:brandId/analysis/:analysisId"),d=(u==null||(n=u.params)===null||n===void 0?void 0:n.brandId)||(c==null||(r=c.params)===null||r===void 0?void 0:r.brandId),f=u!=null&&(i=u.params)!==null&&i!==void 0&&i.analysisId?Number(u.params.analysisId):void 0,h=z.useMemo(function(){return{brandId:d||o||"",analysisId:f||a||"latest",model:l||"openai"}},[d,o,f,a,l]),g=z.useMemo(function(){return{data:h}},[h]);return y.jsx(Qv.Provider,{value:g,children:s})},Yv=z.createContext(void 0),yO=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=z.useCallback(function(d){r(d),i("latest")},[r,i]),a=z.useCallback(function(d){i(d)},[i]),l=z.useCallback(function(d){s(d)},[s]),c=z.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),u=z.useMemo(function(){return{mutations:c}},[c]);return y.jsx(Yv.Provider,{value:u,children:n})};function du(e,t){return bO(e)||vO(e,t)||pO(e,t)||mO()}function mO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pO(e,t){if(e){if(typeof e=="string")return wg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wg(e,t):void 0}}function wg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function bO(e){if(Array.isArray(e))return e}var xO=function(t){var n=t.children,r=z.useState(void 0),i=du(r,2),s=i[0],o=i[1],a=z.useState("latest"),l=du(a,2),c=l[0],u=l[1],d=z.useState(void 0),f=du(d,2),h=f[0],g=f[1];return y.jsx(yO,{brandId:s,setBrandId:o,analysisId:c,setAnalysisId:u,model:h,setModel:g,children:y.jsx(gO,{brandId:s,analysisId:c,model:h,children:n})})},Wr=function(){var t=z.useContext(Qv);if(t===void 0)throw new Error("useBrandAnalysisData must be used within a BrandAnalysisDataProvider");return t.data},Mc=function(){var t=z.useContext(Yv);if(t===void 0)throw new Error("useBrandAnalysisMutations must be used within a BrandAnalysisMutationsProvider");return t.mutations},fu={exports:{}};/*!
|
|
19
19
|
Copyright (c) 2018 Jed Watson.
|
|
20
20
|
Licensed under the MIT License (MIT), see
|
|
21
21
|
http://jedwatson.github.io/classnames
|
|
22
|
-
*/var
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
24
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LO(e,t){if(e){if(typeof e=="string")return xg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xg(e,t):void 0}}function xg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function RO(e){if(Array.isArray(e))return e}var Ho="yst-insights-token",FO=function(){var t=H.useState(Qa().ready),n=Ya(t,2),r=n[0],i=n[1],s=H.useState(Qa().error),o=Ya(s,2);o[0];var a=o[1],l=H.useState(Qa().expiresAt),c=Ya(l,2);c[0];var u=c[1],d=H.useState(Qa().refreshing),f=Ya(d,2);f[0];var h=f[1];return H.useEffect(function(){var g=TO(function(m){i(m.ready),a(m.error),u(m.expiresAt),h(m.refreshing)});return jO(),function(){return g()}},[]),r?y.jsxs(y.Fragment,{children:[!1,y.jsx(yc,{})]}):y.jsx("div",{className:"yst-p-4",children:y.jsxs(E.Alert,{appearance:"info",className:"yst-mb-4",children:[y.jsx(E.Spinner,{className:"yst-mr-2 yst-inline"})," Initializing secure session..."]})})},NO=function(){localStorage.removeItem(Ho),delete Je.defaults.headers.common.Authorization},BO=function(){var t=qn(),n=Pk({mutation:{onSettled:function(){NO(),t("/"),window.location.reload()}}});return n};function qO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"}))}const zO=M.forwardRef(qO);function HO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const UO=M.forwardRef(HO);function KO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const WO=M.forwardRef(KO);function VO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const GO=M.forwardRef(VO);function QO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const YO=M.forwardRef(QO);function XO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const JO=M.forwardRef(XO);function ZO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const eE=M.forwardRef(ZO);function tE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const nE=M.forwardRef(tE);function rE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const iE=M.forwardRef(rE);function sE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const oE=M.forwardRef(sE);function aE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const Gv=M.forwardRef(aE);function lE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const cE=M.forwardRef(lE);function uE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const dE=M.forwardRef(uE);function fE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const hE=M.forwardRef(fE);function gE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const Qv=M.forwardRef(gE);function yE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const xf=M.forwardRef(yE);function mE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const pE=M.forwardRef(mE);var vE=function(){return[{label:"Brand analysis",href:"/",Icon:dE,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:JO,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0},{label:"Query history",href:"/query-history",Icon:zO,isActive:function(n){return n.startsWith("/query-history")},showInMenu:!0}]},wg;function bE(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Sg=function(t){var n=t.className,r=un(),i=r.pathname,s=vE();return y.jsx("div",{className:ke("yst-flex yst-flex-col yst-gap-10",n),children:y.jsx(E.SidebarNavigation.Sidebar,{children:y.jsx(E.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(o){return o.showInMenu!==!1}).map(function(o){var a=o.isActive?o.isActive(i):!1;return y.jsx(E.SidebarNavigation.SubmenuItem,{className:ke("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:Ur,label:y.jsxs(y.Fragment,{children:[y.jsx(o.Icon,{className:ke(wg||(wg=bE(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const xE="data:image/svg+xml,%3csvg%20width='96'%20height='42'%20viewBox='0%200%2096%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M31.6517%2010.1419C24.3001%2010.1419%2021.3588%2015.0112%2021.3588%2020.4319C21.3588%2025.8525%2024.2564%2030.9356%2031.6517%2030.9356C39.0469%2030.9356%2041.9256%2025.8375%2041.9123%2020.7619C41.8952%2014.58%2038.7258%2010.14%2031.6517%2010.14V10.1419ZM27.1978%2020.7394C27.3764%2013.485%2033.0235%2013.4925%2034.9104%2016.0912C36.63%2018.4594%2036.9815%2026.5556%2031.6536%2026.4975C29.1986%2026.4712%2027.2719%2024.8344%2027.1997%2020.7394H27.1978ZM91.2791%2025.905V15.3956H95.0869V10.8337H91.2791V5.32312H85.3982V10.8337H82.415V15.3956H85.3982V25.3087C85.3982%2030.9431%2089.3789%2034.2919%2093.5801%2034.9856L95.3358%2030.3206C92.8866%2030.015%2091.3019%2028.2075%2091.2791%2025.9069V25.905ZM61.6088%2024.2419V16.3425C61.6088%2016.0537%2061.5898%2015.7837%2061.5613%2015.5194C61.0521%209.13687%2051.8669%209.15%2044.7529%2011.6006L46.8089%2015.6844C51.4413%2013.5131%2054.2136%2014.0737%2055.1826%2015.1425C55.2073%2015.1706%2055.232%2015.1969%2055.2548%2015.2269C55.2567%2015.2306%2055.2605%2015.2344%2055.2624%2015.2381C55.7565%2015.8962%2055.6387%2016.935%2055.6387%2017.7525C49.5849%2017.7525%2043.1416%2018.5456%2043.1416%2025.0969C43.1416%2030.0769%2049.4652%2033.2812%2056.0738%2028.5337L57.0542%2030.8681H62.7185C62.2131%2028.1269%2061.6069%2025.7794%2061.6069%2024.2419H61.6088ZM55.6843%2024.1987C51.0271%2029.3419%2046.7613%2024.5006%2051.1297%2022.3894C52.4161%2021.9562%2054.1604%2021.9375%2055.6843%2021.9375V24.1987ZM70.6477%2015.9169C70.6477%2013.9706%2073.8037%2013.0612%2078.7839%2015.3037L80.5054%2011.1769C73.8037%209.17812%2064.6509%208.99812%2064.592%2015.9169C64.5635%2019.2319%2066.7182%2021.015%2069.8211%2022.1531C71.9701%2022.9406%2075.073%2023.3494%2075.0635%2025.0387C75.0521%2027.2456%2070.241%2027.5831%2065.8632%2024.615L64.0942%2029.0906C70.0662%2032.0231%2081.1705%2032.1056%2081.1116%2024.7556C81.0527%2017.4881%2070.6457%2018.735%2070.6457%2015.9169H70.6477ZM18.8734%200.1875L10.3495%2023.5519L6.26617%2010.935H0.195312L6.99391%2028.1644C7.57346%2029.6312%207.57346%2031.2594%206.99391%2032.7262C6.23387%2034.6481%204.97029%2036.2944%201.88831%2036.7031V41.8106C7.88886%2041.8106%2011.1324%2038.1712%2014.0262%2030.1931L25.368%200.1875H18.8734Z'%20fill='%23A61E69'/%3e%3c/svg%3e";var wE=function(t){var n=t.className,r=un(),i=r.pathname,s=zv({query:{select:function(h){var g=h.data;return g==null?void 0:g.data}}}),o=s.data,a=s.isLoading,l=BO(),c=l.mutate,u=l.isPending,d=function(h){if(h.preventDefault(),!u)return c()};return y.jsxs("div",{className:ke("ystaii-sidemenu"),children:[y.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:y.jsx(E.SidebarNavigation,{activePath:i,children:y.jsx(E.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:y.jsx(Sg,{})})})}),y.jsxs("div",{className:ke("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-items-center yst-justify-between yst-px-4","lg:yst-flex-col lg:yst-items-start lg:yst-space-y-12"),children:[y.jsx(E.Title,{children:y.jsx(Ur,{className:ke("yst-outline-none"),to:"/",children:y.jsx("img",{src:xE,alt:"Yoast",className:"yst-inline-block yst-h-8"})})}),y.jsxs("div",{className:ke("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[y.jsx("div",{children:y.jsx("b",{children:(o==null?void 0:o.displayName)||y.jsx(E.SkeletonLoader,{children:"Display name"})})}),y.jsx("div",{children:(o==null?void 0:o.email)||y.jsx(E.SkeletonLoader,{children:"loading-email@address.com"})}),y.jsx("div",{children:y.jsx(E.Link,{variant:"primary",className:"yst-no-underline",onClick:d,children:a?y.jsxs(E.SkeletonLoader,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]}):u?y.jsx(y.Fragment,{children:"Signing out..."}):y.jsxs(y.Fragment,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),y.jsx("div",{className:ke("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:y.jsx(E.SidebarNavigation,{activePath:i,children:y.jsx(Sg,{className:n})})})]})},Yv=Wx.a.withConfig({displayName:"SkipLink",componentId:"sc-40h6pc-0"})(["position:absolute;top:-1000em;left:10px;z-index:100000;display:block;height:48px;min-width:150px;padding:0 15px;font-size:14px;line-height:48px;background:var(--bg-color-white);border-radius:3px;box-shadow:0px 2px 2px 2px rgba(0,0,0,0.1);text-decoration:underline;text-align:center;outline:none;&:focus{top:10px;color:var(--text-color-blue);}"]);Yv.defaultProps={href:"#content"};function du(e){var t=e.children,n=e.disable,r=n===void 0?!1:n,i=e.hideNav,s=i===void 0?!1:i,o=e.DebugInfo;return r?t:y.jsxs("div",{className:ke("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[y.jsx(Yv,{children:"Skip to main content"}),!s&&y.jsxs("div",{className:ke("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[y.jsx(wE,{}),o&&y.jsx(o,{})]}),y.jsx("main",{className:ke("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:y.jsx("div",{className:ke("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:y.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:t})})})]})}function $c(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(E.Paper.Header,{children:[r&&y.jsx(E.Title,{className:ke({"yst-mb-3":n||t}),children:r}),n&&(typeof n=="string"?y.jsx("p",{children:n}):n),t]})}var SE={HOME:"/"},CE=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo,a=un(),l=qn(),c={disable:s,hideNav:r},u=Kr(),d=u.brandId,f=Tc(),h=f.setBrandId,g=Ea({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(O){var _;return O==null||(_=O.data)===null||_===void 0?void 0:_.brands}}}),m=g.data,p=g.isLoading,v=g.error,b=g.refetch,x=H.useRef(!1),S=H.useMemo(function(){return m==null?void 0:m.find(function(C){return C.id===d})},[m,d]);H.useEffect(function(){var C;if(!(m===void 0||d)){var O=(C=m[0])===null||C===void 0?void 0:C.id;O&&h(O)}},[m,d,h,l,a.pathname]),H.useEffect(function(){!d||x.current||(x.current=!0)},[S,d,l,a.pathname,m]);var w=H.useCallback(function(){b()},[b]),P=["Loading your brands...","Preparing your dashboard...","Checking analysis status...","Almost ready!"];return a.pathname!==SE.HOME&&p?y.jsx(du,{...c,children:y.jsxs(E.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx($c,{title:y.jsx(E.SkeletonLoader,{className:"yst-h-12 yst-w-36"}),description:y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-3/4"})}),y.jsx(E.Paper.Content,{children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-start yst-justify-center",children:y.jsx("div",{className:"yst-w-full yst-space-y-4",children:y.jsx("div",{className:"yst-space-y-4",children:P.map(function(C,O){return y.jsx(E.SkeletonLoader,{children:C},O)})})})})})]})}):v?y.jsx(du,{...c,children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[y.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),y.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),y.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),y.jsx(E.Button,{variant:"primary",onClick:w,children:"Retry"})]})})}):y.jsx(du,{DebugInfo:o,...c,children:y.jsx(yc,{})})};function _E(){var e=H.useRef(!1);H.useEffect(function(){if(!e.current){e.current=!0;var t=function(){var i=Kv().replace("/api/v1","");console.log("Api base URL for CSRF cookie fetch:",i),Je.get("".concat(i,"/sanctum/csrf-cookie"),{withCredentials:!0}).then(function(){zo()}).catch(function(s){console.error("Failed to fetch CSRF cookie:",s)})};t();var n=function(){t()};return window.addEventListener("api-config-changed",n),function(){window.removeEventListener("api-config-changed",n)}}},[])}function kE(e){if(e!=null){if(typeof e=="number"){var t=1e12;return e>t?e-Date.now():e}var n=Date.parse(e);if(!Number.isNaN(n))return n-Date.now()}}function OE(e,t){var n=kE(e);return n!==void 0&&n>t*60*1e3}function EE(e){if(e==null)return"a future date";var t;if(typeof e=="number"){var n=1e12;e>n?t=e:t=Date.now()+e}else{var r=Date.parse(e);Number.isNaN(r)||(t=r)}if(t===void 0)return"a future date";var i=new Date(t),s={month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},o=i.toLocaleDateString("en-US",s),a=o.split(" ");if(a.length>=4){var l=a[0],c=a[1].replace(",",""),u=a.slice(2).join(" ");return"".concat(l," ").concat(c," at ").concat(u)}return"".concat(o)}function AE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const PE=M.forwardRef(AE);function TE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const $E=M.forwardRef(TE);function ME(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const jE=M.forwardRef(ME);function DE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const Xv=M.forwardRef(DE);function LE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),M.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const IE=M.forwardRef(LE);function RE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const FE=M.forwardRef(RE);function Uo(e){"@babel/helpers - typeof";return Uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(e)}var NE=["children","as","startColor","endColor","angle","disabled","style","className"];function Cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(n),!0).forEach(function(r){BE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BE(e,t,n){return(t=qE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qE(e){var t=zE(e,"string");return Uo(t)=="symbol"?t:t+""}function zE(e,t){if(Uo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HE(e,t){if(e==null)return{};var n,r,i=UE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Mc=function(t){var n=t.children,r=t.as,i=r===void 0?"span":r,s=t.startColor,o=s===void 0?"#A61E69":s,a=t.endColor,l=a===void 0?"#6366F1":a,c=t.angle,u=c===void 0?102:c,d=t.disabled,f=d===void 0?!1:d,h=t.style,g=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=HE(t,NE),b=_g(f?{display:"inline-block"}:{background:"linear-gradient(".concat(u,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},g);return y.jsx(i,{className:p,style:b,...v,children:n})};function wf(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return y.jsx("div",{className:ke("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:t})}var KE=function(){var t=qn();return y.jsx("form",{onSubmit:function(){return t("/setup")},children:y.jsxs(E.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[y.jsx(E.Paper.Header,{children:y.jsxs(E.Title,{size:"1",children:["Welcome to ",y.jsx(Mc,{children:"Yoast AI Brand Insights"}),"!"]})}),y.jsxs(E.Paper.Content,{className:"yst-space-y-8",children:[y.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[y.jsx("p",{children:"See how your brand is represented in AI answers"}),y.jsxs("p",{children:[y.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT and Perplexity."]}),y.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),y.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI models to see how your brand shows up."}].map(function(n,r,i){return y.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[y.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[y.jsx(E.Stepper.Step,{isActive:!0,isComplete:!1}),y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[y.jsx(E.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),y.jsx("p",{children:n.description})]})]}),r<i.length-1&&y.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),y.jsx(wf,{className:"yst-justify-end",children:y.jsxs(E.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",y.jsx($E,{})]})})]})})};function Jv(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Aa(e){var t=e.score,n=e.total,r=e.suffix,i=e.isLoading,s=i===void 0?!1:i,o=e.className,a=e.hideTotal,l=a===void 0?!1:a,c=e.delta,u=e.deltaFormat,d=u===void 0?"absolute":u,f=e.deltaSuffix,h=e.scoreFormat,g=h===void 0?"absolute":h;return y.jsxs("div",{className:ke(o,"yst-font-medium"),children:[y.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||t===void 0||t===null?"—":t,!s&&t!==void 0&&t!==null&&g==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&y.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&y.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof c=="number"&&!isNaN(c)&&y.jsxs("span",{className:ke("yst-ml-2",Jv(c)),children:[c>-1&&"+",c,d==="percentage"&&"%"," ",f]})]})}var WE=["Icon","className","children","placement","id"];function VE(e,t){return XE(e)||YE(e,t)||QE(e,t)||GE()}function GE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QE(e,t){if(e){if(typeof e=="string")return kg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kg(e,t):void 0}}function kg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function YE(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function XE(e){if(Array.isArray(e))return e}function JE(e,t){if(e==null)return{};var n,r,i=ZE(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ZE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sf(e){var t=e.Icon,n=t===void 0?oE:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.placement,a=o===void 0?"top":o,l=e.id,c=l===void 0?"":l,u=JE(e,WE),d=H.useState(!1),f=VE(d,2),h=f[0],g=f[1];return s?y.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},"aria-describedby":c?"tooltip-button-id":"tooltip-button",...u,children:[y.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&y.jsx(E.Tooltip,{placement:a,id:c||"tooltip-button",children:s})]}):null}var Pa=function(t){var n=t.title,r=t.tooltip,i=t.size,s=i===void 0?"3":i,o=t.className,a=o===void 0?"":o,l=function(d){var f=typeof d=="string"?d:"tooltip";return"tooltip-".concat(f.toLowerCase().replace(/\s+/g,"-"))},c=l(n);return y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[y.jsx(E.Title,{size:s,children:n}),y.jsx(Sf,{id:c,children:r})]})},Og=function(t){var n=t.keywords,r=t.badgeClassName;return y.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i){return i&&y.jsx(E.Badge,{className:r,children:i},i)})})},Zv=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,c=l===void 0?"":l,u=t.data,d=u==null?void 0:u.brandName,f=u==null||(n=u.positivityPercentage)===null||n===void 0?void 0:n.value,h=u==null||(r=u.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,g=u==null||(i=u.keywords)===null||i===void 0?void 0:i.positive,m=u==null||(s=u.keywords)===null||s===void 0?void 0:s.negative,p=!u||f===void 0&&h===void 0;return y.jsx(E.Card,{className:"yst-overflow-visible",children:y.jsxs(E.Card.Content,{className:"yst-space-y-8",children:[y.jsx(Pa,{title:a,tooltip:c}),y.jsx("div",{className:"yst-space-y-3",children:!p&&y.jsxs(y.Fragment,{children:[y.jsx("p",{children:d||y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),y.jsxs("div",{children:[y.jsx("div",{className:"yst-inline-flex",children:y.jsx(Aa,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),y.jsx(E.ProgressBar,{max:100,min:0,progress:f||0,className:ke({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&y.jsx(E.Alert,{variant:"info",children:"The selected AI model returned no brand sentiment data for your queries. This can happen with some queries or models."}),!!g&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Positive keywords"}),y.jsx(Og,{keywords:g,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(E.Title,{as:"h5",size:"5",children:"Negative keywords"}),y.jsx(Og,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function Ko(e){"@babel/helpers - typeof";return Ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(e)}var eA=["data"];function Eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Eg(Object(n),!0).forEach(function(r){nA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nA(e,t,n){return(t=rA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rA(e){var t=iA(e,"string");return Ko(t)=="symbol"?t:t+""}function iA(e,t){if(Ko(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ko(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sA(e,t){if(e==null)return{};var n,r,i=oA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qs=function(t,n,r){var i=Kr(),s=i.brandId,o=i.analysisId,a=i.model,l=s,c=o,u=a,d=Pc(l,c,{query:{enabled:!!l&&!!c,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=sA(d,eA),g=H.useMemo(function(){if(!f||!u)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(u)})||null},[f,u]);return tA({data:g},h)};function aA(){var e,t=qs(),n=t.data;return y.jsx(Zv,{title:"Brand Sentiment",data:n==null||(e=n.sentiment)===null||e===void 0?void 0:e.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var lA=["children","as","className"];function cA(e,t){if(e==null)return{};var n,r,i=uA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ta=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=t.reduce(function(o,a,l){return o+a+(r[l]||"")},"");return function(o){var a=o.children,l=o.as,c=l===void 0?"div":l,u=o.className,d=u===void 0?"":u,f=cA(o,lA);return y.jsx(c,{className:ke(s.trim(),d),...f,children:a})}},fu=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],Ag=function(t){if(!t)return fu[0];if(t.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%fu.length;return fu[s]};function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}var Pg;function Tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tg(Object(n),!0).forEach(function(r){dA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dA(e,t,n){return(t=fA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fA(e){var t=hA(e,"string");return Wo(t)=="symbol"?t:t+""}function hA(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gA(e){return pA(e)||mA(e)||eb(e)||yA()}function yA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
28
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
22
|
+
*/var Sg;function wO(){return Sg||(Sg=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)t.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(fu)),fu.exports}var SO=wO();const Ce=i0(SO);var _d;function CO(e){var t=_d;_d=e,t!==e&&typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("api-config-changed",{detail:{previousUrl:t,newUrl:e}}))}function kd(){return _d||void 0||"http://localhost:8000/api/v1"}function zo(e){"@babel/helpers - typeof";return zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(e)}function Ho(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return zt(b,"_invoke",function(w,S,x){var E,C,k,_=0,O=x||[],P=!1,j={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:function(D,L){return E=D,C=0,k=e,j.n=L,o}};function W(I,D){for(C=I,k=D,t=0;!P&&_&&!L&&t<O.length;t++){var L,F=O[t],oe=j.p,fe=F[2];I>3?(L=fe===D)&&(k=F[(C=F[4])?5:(C=3,3)],F[4]=F[5]=e):F[0]<=oe&&((L=I<2&&oe<F[1])?(C=0,j.v=D,j.n=F[1]):oe<fe&&(L=I<3||F[0]>D||D>fe)&&(F[4]=I,F[5]=D,j.n=fe,C=0))}if(L||I>1)return o;throw P=!0,D}return function(I,D,L){if(_>1)throw TypeError("Generator is already running");for(P&&D===1&&W(D,L),C=D,k=L;(t=C<2?e:k)||!P;){E||(C?C<3?(C>1&&(j.n=-1),W(C,k)):j.n=k:j.v=k);try{if(_=2,E){if(C||(I="next"),t=E[I]){if(!(t=t.call(E,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,C<2&&(C=0)}else C===1&&(t=E.return)&&t.call(E),C<2&&(k=TypeError("The iterator does not provide a '"+I+"' method"),C=1);E=e}else if((t=(P=j.n<0)?k:w.call(S,j))!==o)break}catch(F){E=e,C=1,k=F}finally{_=1}}return{value:t,done:P}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(zt(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,zt(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,zt(d,"constructor",c),zt(c,"constructor",l),l.displayName="GeneratorFunction",zt(c,i,"GeneratorFunction"),zt(d),zt(d,i,"Generator"),zt(d,r,function(){return this}),zt(d,"toString",function(){return"[object Generator]"}),(Ho=function(){return{w:s,m:f}})()}function zt(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}zt=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){zt(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},zt(e,t,n,r)}function Cg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function Xv(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Cg(s,r,i,o,a,"next",l)}function a(l){Cg(s,r,i,o,a,"throw",l)}o(void 0)})}}function _g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_g(Object(n),!0).forEach(function(r){_O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _O(e,t,n){return(t=kO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kO(e){var t=OO(e,"string");return zo(t)=="symbol"?t:t+""}function OO(e,t){if(zo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EO(e,t){return $O(e)||PO(e,t)||TO(e,t)||AO()}function AO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TO(e,t){if(e){if(typeof e=="string")return kg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kg(e,t):void 0}}function kg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function $O(e){if(Array.isArray(e))return e}function MO(e){var t;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(e,"="));if(r.length===2)return(t=r.pop())===null||t===void 0?void 0:t.split(";").shift()}}var Jv=function(){var e=Je.create({withCredentials:!0,baseURL:"".concat(kd())});return e.interceptors.request.use(function(t){var n=MO("XSRF-TOKEN"),r=n?decodeURIComponent(n):void 0;return r&&(t.headers["X-XSRF-TOKEN"]=r),t}),e}();function jO(e){Jv.defaults.baseURL="".concat(e)}var Od=new Set,lt={refreshing:!1,ready:!1},Qa,Ed="yst-insights-token-exp",Ad=void 0;function DO(e){e&&e.trim()&&(Ad=e.trim())}function Gl(){Od.forEach(function(e){return e(lt)})}function LO(e){return Od.add(e),e(lt),function(){Od.delete(e)}}function Ya(){return lt}function IO(e){if(e)try{var t=e.split("."),n=EO(t,2),r=n[1],i=atob(r.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(decodeURIComponent(escape(i)))}catch(s){return}}function RO(){Qa&&window.clearTimeout(Qa);var e=lt.expiresAt;if(e){var t=Date.now(),n=2*60*1e3,r=e-t-n,i=Math.max(r,5e3);r<=0?Qa=window.setTimeout(function(){return void Uo()},1e3):Qa=window.setTimeout(function(){return void Uo()},i)}}function Ql(e,t){e?localStorage.setItem(Ko,e):(localStorage.removeItem(Ko),sessionStorage.removeItem(Ed));var n=IO(e),r=n!=null&&n.exp?n.exp*1e3:void 0,i=t||r;i&&sessionStorage.setItem(Ed,String(i)),lt=In(In({},lt),{},{token:e,decoded:n,expiresAt:i}),e?Ps.defaults.headers.common.Authorization="Bearer ".concat(e):delete Ps.defaults.headers.common.Authorization,RO(),Gl()}function Uo(){return Td.apply(this,arguments)}function Td(){return Td=Xv(Ho().m(function e(){var t,n,r,i,s,o,a,l,c;return Ho().w(function(u){for(;;)switch(u.p=u.n){case 0:if(!lt.refreshing){u.n=1;break}return u.a(2,lt.token);case 1:if(lt=In(In({},lt),{},{refreshing:!0,error:void 0}),Gl(),u.p=2,Ad){u.n=3;break}throw new Error("Missing MyYoast access token (env or prop)");case 3:return u.n=4,Jv.post("/users/getToken",{},{headers:{Authorization:"Bearer ".concat(Ad)}});case 4:if(n=u.v,r=n.data,i=r.plainTextToken,i){u.n=5;break}throw new Error("Token endpoint missing plainTextToken field");case 5:return o=(t=r.accessToken)===null||t===void 0?void 0:t.expires_at,o&&(typeof o=="number"?s=o>1e10?o:o*1e3:typeof o=="string"&&(a=Date.parse(o),Number.isNaN(a)||(s=a))),Ql(i,s),u.a(2,i);case 6:return u.p=6,c=u.v,l=c instanceof Error?c:new Error("Unknown token error"),lt=In(In({},lt),{},{error:l}),Ql(void 0),u.a(2,void 0);case 7:return u.p=7,lt=In(In({},lt),{},{refreshing:!1,ready:!0}),Gl(),u.f(7);case 8:return u.a(2)}},e,null,[[2,6,7,8]])})),Td.apply(this,arguments)}function FO(){return Pd.apply(this,arguments)}function Pd(){return Pd=Xv(Ho().m(function e(){var t,n,r,i;return Ho().w(function(s){for(;;)switch(s.n){case 0:if(t=localStorage.getItem(Ko),!t){s.n=1;break}return n=sessionStorage.getItem(Ed),r=n?Number(n):void 0,Ql(t,r&&!Number.isNaN(r)?r:void 0),lt=In(In({},lt),{},{ready:!0}),Gl(),i=lt.expiresAt?lt.expiresAt-Date.now():void 0,(!i||i<=2*60*1e3)&&Uo(),s.a(2);case 1:return s.n=2,Uo();case 2:return s.a(2)}},e)})),Pd.apply(this,arguments)}window.addEventListener("storage",function(e){e.key===Ko&&e.newValue!==lt.token&&Ql(e.newValue||void 0)});function Xa(e,t){return zO(e)||qO(e,t)||BO(e,t)||NO()}function NO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BO(e,t){if(e){if(typeof e=="string")return Og(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Og(e,t):void 0}}function Og(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qO(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function zO(e){if(Array.isArray(e))return e}var Ko="yst-insights-token",HO=function(){var t=z.useState(Ya().ready),n=Xa(t,2),r=n[0],i=n[1],s=z.useState(Ya().error),o=Xa(s,2);o[0];var a=o[1],l=z.useState(Ya().expiresAt),c=Xa(l,2);c[0];var u=c[1],d=z.useState(Ya().refreshing),f=Xa(d,2);f[0];var h=f[1];return z.useEffect(function(){var g=LO(function(m){i(m.ready),a(m.error),u(m.expiresAt),h(m.refreshing)});return FO(),function(){return g()}},[]),r?y.jsxs(y.Fragment,{children:[!1,y.jsx(mc,{})]}):y.jsx("div",{className:"yst-p-4",children:y.jsxs(A.Alert,{appearance:"info",className:"yst-mb-4",children:[y.jsx(A.Spinner,{className:"yst-mr-2 yst-inline"})," Initializing secure session..."]})})},UO=function(){localStorage.removeItem(Ko),delete Je.defaults.headers.common.Authorization},KO=function(){var t=_n(),n=Lk({mutation:{onSettled:function(){UO(),t("/"),window.location.reload()}}});return n};function WO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"}))}const VO=M.forwardRef(WO);function GO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const QO=M.forwardRef(GO);function YO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const XO=M.forwardRef(YO);function JO(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const ZO=M.forwardRef(JO);function eE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const tE=M.forwardRef(eE);function nE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const rE=M.forwardRef(nE);function iE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const sE=M.forwardRef(iE);function oE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const aE=M.forwardRef(oE);function lE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const cE=M.forwardRef(lE);function uE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const dE=M.forwardRef(uE);function fE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const Zv=M.forwardRef(fE);function hE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const eb=M.forwardRef(hE);function gE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const yE=M.forwardRef(gE);function mE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const pE=M.forwardRef(mE);function vE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const tb=M.forwardRef(vE);function bE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const Of=M.forwardRef(bE);function xE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const wE=M.forwardRef(xE);var SE=function(){return[{label:"Brand analysis",href:"/",Icon:yE,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:rE,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0},{label:"Query history",href:"/query-history",Icon:VO,isActive:function(n){return n.startsWith("/query-history")},showInMenu:!0}]},Eg;function CE(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ag=function(t){var n=t.className,r=dn(),i=r.pathname,s=SE();return y.jsx("div",{className:Ce("yst-flex yst-flex-col yst-gap-10",n),children:y.jsx(A.SidebarNavigation.Sidebar,{children:y.jsx(A.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(o){return o.showInMenu!==!1}).map(function(o){var a=o.isActive?o.isActive(i):!1;return y.jsx(A.SidebarNavigation.SubmenuItem,{className:Ce("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:Kr,label:y.jsxs(y.Fragment,{children:[y.jsx(o.Icon,{className:Ce(Eg||(Eg=CE(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const _E="data:image/svg+xml,%3csvg%20width='96'%20height='42'%20viewBox='0%200%2096%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M31.6517%2010.1419C24.3001%2010.1419%2021.3588%2015.0112%2021.3588%2020.4319C21.3588%2025.8525%2024.2564%2030.9356%2031.6517%2030.9356C39.0469%2030.9356%2041.9256%2025.8375%2041.9123%2020.7619C41.8952%2014.58%2038.7258%2010.14%2031.6517%2010.14V10.1419ZM27.1978%2020.7394C27.3764%2013.485%2033.0235%2013.4925%2034.9104%2016.0912C36.63%2018.4594%2036.9815%2026.5556%2031.6536%2026.4975C29.1986%2026.4712%2027.2719%2024.8344%2027.1997%2020.7394H27.1978ZM91.2791%2025.905V15.3956H95.0869V10.8337H91.2791V5.32312H85.3982V10.8337H82.415V15.3956H85.3982V25.3087C85.3982%2030.9431%2089.3789%2034.2919%2093.5801%2034.9856L95.3358%2030.3206C92.8866%2030.015%2091.3019%2028.2075%2091.2791%2025.9069V25.905ZM61.6088%2024.2419V16.3425C61.6088%2016.0537%2061.5898%2015.7837%2061.5613%2015.5194C61.0521%209.13687%2051.8669%209.15%2044.7529%2011.6006L46.8089%2015.6844C51.4413%2013.5131%2054.2136%2014.0737%2055.1826%2015.1425C55.2073%2015.1706%2055.232%2015.1969%2055.2548%2015.2269C55.2567%2015.2306%2055.2605%2015.2344%2055.2624%2015.2381C55.7565%2015.8962%2055.6387%2016.935%2055.6387%2017.7525C49.5849%2017.7525%2043.1416%2018.5456%2043.1416%2025.0969C43.1416%2030.0769%2049.4652%2033.2812%2056.0738%2028.5337L57.0542%2030.8681H62.7185C62.2131%2028.1269%2061.6069%2025.7794%2061.6069%2024.2419H61.6088ZM55.6843%2024.1987C51.0271%2029.3419%2046.7613%2024.5006%2051.1297%2022.3894C52.4161%2021.9562%2054.1604%2021.9375%2055.6843%2021.9375V24.1987ZM70.6477%2015.9169C70.6477%2013.9706%2073.8037%2013.0612%2078.7839%2015.3037L80.5054%2011.1769C73.8037%209.17812%2064.6509%208.99812%2064.592%2015.9169C64.5635%2019.2319%2066.7182%2021.015%2069.8211%2022.1531C71.9701%2022.9406%2075.073%2023.3494%2075.0635%2025.0387C75.0521%2027.2456%2070.241%2027.5831%2065.8632%2024.615L64.0942%2029.0906C70.0662%2032.0231%2081.1705%2032.1056%2081.1116%2024.7556C81.0527%2017.4881%2070.6457%2018.735%2070.6457%2015.9169H70.6477ZM18.8734%200.1875L10.3495%2023.5519L6.26617%2010.935H0.195312L6.99391%2028.1644C7.57346%2029.6312%207.57346%2031.2594%206.99391%2032.7262C6.23387%2034.6481%204.97029%2036.2944%201.88831%2036.7031V41.8106C7.88886%2041.8106%2011.1324%2038.1712%2014.0262%2030.1931L25.368%200.1875H18.8734Z'%20fill='%23A61E69'/%3e%3c/svg%3e";var kE=function(t){var n=t.className,r=dn(),i=r.pathname,s=$c({query:{select:function(h){var g=h.data;return g==null?void 0:g.data}}}),o=s.data,a=s.isLoading,l=KO(),c=l.mutate,u=l.isPending,d=function(h){if(h.preventDefault(),!u)return c()};return y.jsxs("div",{className:Ce("ystaii-sidemenu"),children:[y.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:y.jsx(A.SidebarNavigation,{activePath:i,children:y.jsx(A.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:y.jsx(Ag,{})})})}),y.jsxs("div",{className:Ce("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-items-center yst-justify-between yst-px-4","lg:yst-flex-col lg:yst-items-start lg:yst-space-y-12"),children:[y.jsx(A.Title,{children:y.jsx(Kr,{className:Ce("yst-outline-none"),to:"/",children:y.jsx("img",{src:_E,alt:"Yoast",className:"yst-inline-block yst-h-8"})})}),y.jsxs("div",{className:Ce("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[y.jsx("div",{children:y.jsx("b",{children:(o==null?void 0:o.displayName)||y.jsx(A.SkeletonLoader,{children:"Display name"})})}),y.jsx("div",{children:(o==null?void 0:o.email)||y.jsx(A.SkeletonLoader,{children:"loading-email@address.com"})}),y.jsx("div",{children:y.jsx(A.Link,{variant:"primary",className:"yst-no-underline",onClick:d,children:a?y.jsxs(A.SkeletonLoader,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]}):u?y.jsx(y.Fragment,{children:"Signing out..."}):y.jsxs(y.Fragment,{children:["Sign out ",y.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),y.jsx("div",{className:Ce("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:y.jsx(A.SidebarNavigation,{activePath:i,children:y.jsx(Ag,{className:n})})})]})},nb=Jx.a.withConfig({displayName:"SkipLink",componentId:"sc-40h6pc-0"})(["position:absolute;top:-1000em;left:10px;z-index:100000;display:block;height:48px;min-width:150px;padding:0 15px;font-size:14px;line-height:48px;background:var(--bg-color-white);border-radius:3px;box-shadow:0px 2px 2px 2px rgba(0,0,0,0.1);text-decoration:underline;text-align:center;outline:none;&:focus{top:10px;color:var(--text-color-blue);}"]);nb.defaultProps={href:"#content"};function hu(e){var t=e.children,n=e.disable,r=n===void 0?!1:n,i=e.hideNav,s=i===void 0?!1:i,o=e.DebugInfo;return r?t:y.jsxs("div",{className:Ce("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[y.jsx(nb,{children:"Skip to main content"}),!s&&y.jsxs("div",{className:Ce("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[y.jsx(kE,{}),o&&y.jsx(o,{})]}),y.jsx("main",{className:Ce("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:y.jsx("div",{className:Ce("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:y.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:t})})})]})}function $d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Ht(b,"_invoke",function(w,S,x){var E,C,k,_=0,O=x||[],P=!1,j={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:function(D,L){return E=D,C=0,k=e,j.n=L,o}};function W(I,D){for(C=I,k=D,t=0;!P&&_&&!L&&t<O.length;t++){var L,F=O[t],oe=j.p,fe=F[2];I>3?(L=fe===D)&&(k=F[(C=F[4])?5:(C=3,3)],F[4]=F[5]=e):F[0]<=oe&&((L=I<2&&oe<F[1])?(C=0,j.v=D,j.n=F[1]):oe<fe&&(L=I<3||F[0]>D||D>fe)&&(F[4]=I,F[5]=D,j.n=fe,C=0))}if(L||I>1)return o;throw P=!0,D}return function(I,D,L){if(_>1)throw TypeError("Generator is already running");for(P&&D===1&&W(D,L),C=D,k=L;(t=C<2?e:k)||!P;){E||(C?C<3?(C>1&&(j.n=-1),W(C,k)):j.n=k:j.v=k);try{if(_=2,E){if(C||(I="next"),t=E[I]){if(!(t=t.call(E,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,C<2&&(C=0)}else C===1&&(t=E.return)&&t.call(E),C<2&&(k=TypeError("The iterator does not provide a '"+I+"' method"),C=1);E=e}else if((t=(P=j.n<0)?k:w.call(S,j))!==o)break}catch(F){E=e,C=1,k=F}finally{_=1}}return{value:t,done:P}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Ht(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Ht(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Ht(d,"constructor",c),Ht(c,"constructor",l),l.displayName="GeneratorFunction",Ht(c,i,"GeneratorFunction"),Ht(d),Ht(d,i,"Generator"),Ht(d,r,function(){return this}),Ht(d,"toString",function(){return"[object Generator]"}),($d=function(){return{w:s,m:f}})()}function Ht(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ht=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Ht(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Ht(e,t,n,r)}function Tg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function OE(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Tg(s,r,i,o,a,"next",l)}function a(l){Tg(s,r,i,o,a,"throw",l)}o(void 0)})}}function EE(e,t){return $E(e)||PE(e,t)||TE(e,t)||AE()}function AE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TE(e,t){if(e){if(typeof e=="string")return Pg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pg(e,t):void 0}}function Pg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PE(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function $E(e){if(Array.isArray(e))return e}var ME=function(t){var n,r,i=t.className,s=Hn(),o=_n(),a=z.useState(!1),l=EE(a,2),c=l[0],u=l[1],d=zs({query:{select:function(E){var C=E.data;return C==null?void 0:C.brands}}}),f=d.data,h=Gv({mutation:{onSettled:function(){s.invalidateQueries({queryKey:[nr()]})}}}),g=h.mutateAsync,m=h.isPending,p=(n=f==null?void 0:f.filter(function(x){var E;return((E=x.settings)===null||E===void 0?void 0:E.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&n!==void 0?n:[],v=function(){u(!1)},b=function(){var x=OE($d().m(function E(){var C;return $d().w(function(k){for(;;)switch(k.n){case 0:if(p.length!==0){k.n=1;break}return k.a(2);case 1:return C=p.map(function(_){return g({brandId:String(_.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),k.n=2,Promise.all(C);case 2:o("/settings"),v();case 3:return k.a(2)}},E)}));return function(){return x.apply(this,arguments)}}();z.useEffect(function(){f&&f.some(function(x){var E;return((E=x.settings)===null||E===void 0?void 0:E.showAutomaticAnalysisDisabledNotification)===!0})&&u(!0)},[f]);var w=p.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",S=p.length===1?y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsxs("p",{children:["The brand ",y.jsx("b",{children:p==null||(r=p[0])===null||r===void 0?void 0:r.name})," was deactivated, since it was the most recently analyzed."]}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),y.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),y.jsx("ul",{children:p.map(function(x){return y.jsx("li",{children:y.jsx("b",{children:x.name})},x.id)})}),y.jsxs("p",{children:["If you prefer, you can go to ",y.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return c?y.jsx(A.Modal,{isOpen:c,onClose:v,position:"center",as:"div",className:i,children:y.jsxs(A.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:w})}),y.jsx(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:S})]})}),y.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(A.Button,{variant:"secondary",onClick:v,children:"Close"}),y.jsx(A.Button,{variant:"primary",onClick:b,isLoading:m,disabled:p.length===0,children:"Go to settings"})]})]})}):null};function jc(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(A.Paper.Header,{children:[r&&y.jsx(A.Title,{className:Ce({"yst-mb-3":n||t}),children:r}),n&&(typeof n=="string"?y.jsx("p",{children:n}):n),t]})}var jE={HOME:"/"},DE=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo,a=dn(),l=_n(),c={disable:s,hideNav:r},u=Wr(),d=u.brandId,f=Mc(),h=f.setBrandId,g=zs({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(k){var _;return k==null||(_=k.data)===null||_===void 0?void 0:_.brands}}}),m=g.data,p=g.isLoading,v=g.error,b=g.refetch,w=z.useRef(!1),S=z.useMemo(function(){return m==null?void 0:m.find(function(C){return C.id===d})},[m,d]);z.useEffect(function(){var C;if(!(m===void 0||d)){var k=(C=m[0])===null||C===void 0?void 0:C.id;k&&h(k)}},[m,d,h,l,a.pathname]),z.useEffect(function(){!d||w.current||(w.current=!0)},[S,d,l,a.pathname,m]);var x=z.useCallback(function(){b()},[b]),E=["Loading your brands...","Preparing your dashboard...","Checking analysis status...","Almost ready!"];return a.pathname!==jE.HOME&&p?y.jsx(hu,{...c,children:y.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(jc,{title:y.jsx(A.SkeletonLoader,{className:"yst-h-12 yst-w-36"}),description:y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-3/4"})}),y.jsx(A.Paper.Content,{children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-start yst-justify-center",children:y.jsx("div",{className:"yst-w-full yst-space-y-4",children:y.jsx("div",{className:"yst-space-y-4",children:E.map(function(C,k){return y.jsx(A.SkeletonLoader,{children:C},k)})})})})})]})}):v?y.jsx(hu,{...c,children:y.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[y.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),y.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),y.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),y.jsx(A.Button,{variant:"primary",onClick:x,children:"Retry"})]})})}):y.jsxs(hu,{DebugInfo:o,...c,children:[y.jsx(mc,{}),y.jsx(ME,{})]})};function LE(){var e=z.useRef(!1);z.useEffect(function(){if(!e.current){e.current=!0;var t=function(){var i=kd().replace("/api/v1","");window.location.hostname===new URL(kd()).hostname&&Je.get("".concat(i,"/sanctum/csrf-cookie"),{withCredentials:!0}).then(function(){Uo()}).catch(function(s){console.error("Failed to fetch CSRF cookie:",s)})};t();var n=function(){t()};return window.addEventListener("api-config-changed",n),function(){window.removeEventListener("api-config-changed",n)}}},[])}function IE(e){if(e!=null){if(typeof e=="number"){var t=1e12;return e>t?e-Date.now():e}var n=Date.parse(e);if(!Number.isNaN(n))return n-Date.now()}}function RE(e,t){var n=IE(e);return n!==void 0&&n>t*60*1e3}function FE(e){if(e==null)return"a future date";var t;if(typeof e=="number"){var n=1e12;e>n?t=e:t=Date.now()+e}else{var r=Date.parse(e);Number.isNaN(r)||(t=r)}if(t===void 0)return"a future date";var i=new Date(t),s={month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0},o=i.toLocaleDateString("en-US",s),a=o.split(" ");if(a.length>=4){var l=a[0],c=a[1].replace(",",""),u=a.slice(2).join(" ");return"".concat(l," ").concat(c," at ").concat(u)}return"".concat(o)}function NE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const BE=M.forwardRef(NE);function qE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const zE=M.forwardRef(qE);function HE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const UE=M.forwardRef(HE);function KE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const rb=M.forwardRef(KE);function WE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),M.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const VE=M.forwardRef(WE);function GE(e,t){return M.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),M.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const QE=M.forwardRef(GE);function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}var YE=["children","as","startColor","endColor","angle","disabled","style","className"];function $g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$g(Object(n),!0).forEach(function(r){XE(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XE(e,t,n){return(t=JE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JE(e){var t=ZE(e,"string");return Wo(t)=="symbol"?t:t+""}function ZE(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eA(e,t){if(e==null)return{};var n,r,i=tA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Dc=function(t){var n=t.children,r=t.as,i=r===void 0?"span":r,s=t.startColor,o=s===void 0?"#A61E69":s,a=t.endColor,l=a===void 0?"#6366F1":a,c=t.angle,u=c===void 0?102:c,d=t.disabled,f=d===void 0?!1:d,h=t.style,g=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=eA(t,YE),b=Mg(f?{display:"inline-block"}:{background:"linear-gradient(".concat(u,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},g);return y.jsx(i,{className:p,style:b,...v,children:n})};function Ef(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return y.jsx("div",{className:Ce("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:t})}var nA=function(){var t=_n();return y.jsx("form",{onSubmit:function(){return t("/setup")},children:y.jsxs(A.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[y.jsx(A.Paper.Header,{children:y.jsxs(A.Title,{size:"1",children:["Welcome to ",y.jsx(Dc,{children:"Yoast AI Brand Insights"}),"!"]})}),y.jsxs(A.Paper.Content,{className:"yst-space-y-8",children:[y.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[y.jsx("p",{children:"See how your brand is represented in AI answers"}),y.jsxs("p",{children:[y.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT and Perplexity."]}),y.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),y.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI models to see how your brand shows up."}].map(function(n,r,i){return y.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[y.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[y.jsx(A.Stepper.Step,{isActive:!0,isComplete:!1}),y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[y.jsx(A.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),y.jsx("p",{children:n.description})]})]}),r<i.length-1&&y.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),y.jsx(Ef,{className:"yst-justify-end",children:y.jsxs(A.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",y.jsx(zE,{})]})})]})})};function ib(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Ta(e){var t=e.score,n=e.total,r=e.suffix,i=e.isLoading,s=i===void 0?!1:i,o=e.className,a=e.hideTotal,l=a===void 0?!1:a,c=e.delta,u=e.deltaFormat,d=u===void 0?"absolute":u,f=e.deltaSuffix,h=e.scoreFormat,g=h===void 0?"absolute":h;return y.jsxs("div",{className:Ce(o,"yst-font-medium"),children:[y.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||t===void 0||t===null?"—":t,!s&&t!==void 0&&t!==null&&g==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&y.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&y.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof c=="number"&&!isNaN(c)&&y.jsxs("span",{className:Ce("yst-ml-2",ib(c)),children:[c>-1&&"+",c,d==="percentage"&&"%"," ",f]})]})}var rA=["Icon","className","children","placement","id"];function iA(e,t){return lA(e)||aA(e,t)||oA(e,t)||sA()}function sA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oA(e,t){if(e){if(typeof e=="string")return jg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jg(e,t):void 0}}function jg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function lA(e){if(Array.isArray(e))return e}function cA(e,t){if(e==null)return{};var n,r,i=uA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Af(e){var t=e.Icon,n=t===void 0?dE:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.placement,a=o===void 0?"top":o,l=e.id,c=l===void 0?"":l,u=cA(e,rA),d=z.useState(!1),f=iA(d,2),h=f[0],g=f[1];return s?y.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return g(!0)},onMouseLeave:function(){return g(!1)},"aria-describedby":c?"tooltip-button-id":"tooltip-button",...u,children:[y.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&y.jsx(A.Tooltip,{placement:a,id:c||"tooltip-button",children:s})]}):null}var Pa=function(t){var n=t.title,r=t.tooltip,i=t.size,s=i===void 0?"3":i,o=t.className,a=o===void 0?"":o,l=function(d){var f=typeof d=="string"?d:"tooltip";return"tooltip-".concat(f.toLowerCase().replace(/\s+/g,"-"))},c=l(n);return y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[y.jsx(A.Title,{size:s,children:n}),y.jsx(Af,{id:c,children:r})]})},Dg=function(t){var n=t.keywords,r=t.badgeClassName;return y.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i){return i&&y.jsx(A.Badge,{className:r,children:i},i)})})},sb=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,c=l===void 0?"":l,u=t.data,d=u==null?void 0:u.brandName,f=u==null||(n=u.positivityPercentage)===null||n===void 0?void 0:n.value,h=u==null||(r=u.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,g=u==null||(i=u.keywords)===null||i===void 0?void 0:i.positive,m=u==null||(s=u.keywords)===null||s===void 0?void 0:s.negative,p=!u||f===void 0&&h===void 0;return y.jsx(A.Card,{className:"yst-overflow-visible",children:y.jsxs(A.Card.Content,{className:"yst-space-y-8",children:[y.jsx(Pa,{title:a,tooltip:c}),y.jsx("div",{className:"yst-space-y-3",children:!p&&y.jsxs(y.Fragment,{children:[y.jsx("p",{children:d||y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),y.jsxs("div",{children:[y.jsx("div",{className:"yst-inline-flex",children:y.jsx(Ta,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),y.jsx(A.ProgressBar,{max:100,min:0,progress:f||0,className:Ce({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&y.jsx(A.Alert,{variant:"info",children:"The selected AI model returned no brand sentiment data for your queries. This can happen with some queries or models."}),!!g&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(A.Title,{as:"h5",size:"5",children:"Positive keywords"}),y.jsx(Dg,{keywords:g,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(A.Title,{as:"h5",size:"5",children:"Negative keywords"}),y.jsx(Dg,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function Vo(e){"@babel/helpers - typeof";return Vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vo(e)}var dA=["data"];function Lg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lg(Object(n),!0).forEach(function(r){hA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hA(e,t,n){return(t=gA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gA(e){var t=yA(e,"string");return Vo(t)=="symbol"?t:t+""}function yA(e,t){if(Vo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mA(e,t){if(e==null)return{};var n,r,i=pA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Hs=function(t,n,r){var i=Wr(),s=i.brandId,o=i.analysisId,a=i.model,l=s,c=o,u=a,d=Pc(l,c,{query:{enabled:!!l&&!!c,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=mA(d,dA),g=z.useMemo(function(){if(!f||!u)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(u)})||null},[f,u]);return fA({data:g},h)};function vA(){var e,t=Hs(),n=t.data;return y.jsx(sb,{title:"Brand Sentiment",data:n==null||(e=n.sentiment)===null||e===void 0?void 0:e.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var bA=["children","as","className"];function xA(e,t){if(e==null)return{};var n,r,i=wA(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $a=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=t.reduce(function(o,a,l){return o+a+(r[l]||"")},"");return function(o){var a=o.children,l=o.as,c=l===void 0?"div":l,u=o.className,d=u===void 0?"":u,f=xA(o,bA);return y.jsx(c,{className:Ce(s.trim(),d),...f,children:a})}},gu=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],Ig=function(t){if(!t)return gu[0];if(t.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%gu.length;return gu[s]};function Go(e){"@babel/helpers - typeof";return Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Go(e)}var Rg;function Fg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ng(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fg(Object(n),!0).forEach(function(r){SA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SA(e,t,n){return(t=CA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CA(e){var t=_A(e,"string");return Go(t)=="symbol"?t:t+""}function _A(e,t){if(Go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Go(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kA(e){return AA(e)||EA(e)||ob(e)||OA()}function OA(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EA(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AA(e){if(Array.isArray(e))return Md(e)}function TA(e,t){return MA(e)||$A(e,t)||ob(e,t)||PA()}function PA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ob(e,t){if(e){if(typeof e=="string")return Md(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Md(e,t):void 0}}function Md(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $A(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function MA(e){if(Array.isArray(e))return e}function jA(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Ja=$a(Rg||(Rg=jA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),Bg=function(t){var n=t.data,r=t.isLoading,i=r===void 0?!1:r,s=i||!n,o=n||{},a=o.rank,l=o.url,c=o.rootDomain,u=o.category,d=o.impact,f=o.numberOfMentions.value;return y.jsxs("tr",{className:"yst-flex yst-flex-col md:yst-table-row",children:[y.jsx(A.Table.Cell,{className:"yst-pb-1 md:yst-pb-2",children:s?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[y.jsxs("span",{className:"yst-text-slate-400",children:[a!=null?a:"—","."]}),y.jsxs(A.Link,{className:"yst-flex yst-items-center yst-gap-1 yst-font-medium",href:l||"#",rel:"nofollow noreferrer",children:[y.jsx("span",{children:l!=null?l:"—"})," ",y.jsx(VE,{})]})]})}),y.jsxs(A.Table.Cell,{className:"yst-ml-2 yst-py-1 yst-font-medium md:yst-ml-0 md:yst-p-2",children:[y.jsx(Ja,{as:"span",children:"Domain:"}),s?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:c!=null?c:"—"})]}),y.jsxs(A.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[y.jsx(Ja,{as:"span",children:"Category:"}),s?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):y.jsx(A.Badge,{className:Ce(Ig(u||"").bg,Ig(u||"").text),children:u!=null?u:"—"})]}),y.jsxs(A.Table.Cell,{className:Ce("yst-ml-2 yst-py-0 md:yst-ml-0 md:yst-p-2","yst-font-medium",{"yst-text-green-600":d==="High","yst-text-yellow-600":d==="Medium","yst-text-red-600":d==="Low"}),children:[y.jsx(Ja,{as:"span",children:"Impact:"}),s?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-12"}):d!=null?d:"—"]}),y.jsxs(A.Table.Cell,{className:"yst-ml-2 yst-pt-1 md:yst-ml-0 md:yst-p-2 md:yst-text-right",children:[y.jsx(Ja,{as:"span",children:"Mentions:"}),s?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):f||"—"]})]},s?void 0:l)},DA=function(){var t,n,r,i,s=z.useState("all"),o=TA(s,2),a=o[0],l=o[1],c=Hs(),u=c.data,d=c.isLoading,f=c.isRefetching,h=u==null?void 0:u.citations,g=h==null||(t=h.list)===null||t===void 0?void 0:t.filter(function(m){return a==="all"?!0:m.category===a});return y.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(A.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx(Pa,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),y.jsx("p",{children:"This table highlights the most important sources where your brand was cited."}),y.jsx(Ta,{score:h==null||(n=h.total)===null||n===void 0?void 0:n.value,suffix:"citations",delta:h==null||(r=h.total)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,deltaSuffix:"since last scan",isLoading:d,hideTotal:!0})]}),(h==null||(i=h.list)===null||i===void 0?void 0:i.length)===0&&!d&&!f?y.jsx(A.Alert,{children:"The selected AI model returned no citations for your queries. This can happen with some queries or models."}):y.jsx(y.Fragment,{children:y.jsxs("div",{children:[y.jsx(A.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:a,onChange:function(m){l(m)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(kA(h!=null&&h.categories?h.categories.map(function(m){return{value:m,label:m}}):[]))}),y.jsxs(A.Table,{variant:"minimal",children:[y.jsx(A.Table.Head,{className:"yst-font-semibold",children:y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Cell,{className:"yst yst-hidden yst-text-slate-900 md:yst-table-cell",children:y.jsx("span",{className:"yst-hidden md:yst-inline",children:"URL"})}),y.jsx(A.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Root domain"}),y.jsx(A.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Category"}),y.jsx(A.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Impact"}),y.jsx(A.Table.Cell,{className:"yst-hidden yst-text-right yst-text-slate-900 md:yst-table-cell",children:"Mentions"})]})}),y.jsx(A.Table.Body,{children:d||f?Array.from({length:5}).map(function(m,p){return y.jsx(Bg,{isLoading:!0},"skeleton-".concat(p))}):g&&g.length>0?g.map(function(m,p){return y.jsx(Bg,{data:Ng(Ng({},m),{},{rank:p+1})},"citation-table-row-".concat(m.url,"-").concat(p))}):y.jsx(A.Table.Row,{children:y.jsxs(A.Table.Cell,{colSpan:5,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[a==="all"?"No citations found.":'No citations found for the "'.concat(a,'" category.')," ",y.jsx(A.Link,{onClick:function(){return l("all")},children:"Show all categories."})]})},"no-results")})]})]})})]})})};function LA(e,t){return NA(e)||FA(e,t)||RA(e,t)||IA()}function IA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RA(e,t){if(e){if(typeof e=="string")return qg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qg(e,t):void 0}}function qg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function FA(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function NA(e){if(Array.isArray(e))return e}var zg=function(t){var n,r=t.data,i=t.isLoading,s=i===void 0?!1:i,o=s||!r,a=r||{},l=a.rank,c=a.brand;return y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Cell,{children:o?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):y.jsx("span",{className:"yst-inline-flex yst-gap-2 yst-font-medium",children:y.jsxs("span",{className:"yst-text-slate-500",children:["# ",y.jsx("span",{className:"yst-text-slate-900",children:l==null?void 0:l.value})]})})}),y.jsx(A.Table.Cell,{children:o?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsx("span",{className:"yst-font-medium",children:c!=null&&c.isSelf?y.jsx(Dc,{children:c==null?void 0:c.name}):(n=c==null?void 0:c.name)!==null&&n!==void 0?n:"—"})})]},o||l==null?void 0:l.value)},BA=function(t){var n,r=t.className,i=z.useRef(null),s=z.useState(1),o=LA(s,2),a=o[0],l=o[1],c=Hs(),u=c.data,d=c.isLoading,f=c.isRefetching,h=u==null||(n=u.rankings)===null||n===void 0?void 0:n.list,g=5,m=(h==null?void 0:h.length)||0,p=Math.ceil(m/g),v=(a-1)*g,b=v+g,w=h==null?void 0:h.slice(v,b);return z.useEffect(function(){a>p&&p>0&&l(1)},[p,a,l]),y.jsx(A.Card,{ref:i,className:Ce("yst-overflow-visible",r),children:y.jsxs(A.Card.Content,{className:"yst-mt-0 yst-space-y-6",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Pa,{title:"Competitor ranking",tooltip:"How often competitors are mentioned in your submitted queries."}),y.jsx("p",{children:"Brands with the most mentions for your prompts."})]}),!d&&!f&&(!h||h.length===0)?y.jsx(A.Alert,{variant:"info",children:"The selected AI model returned no brands for your queries. This can happen with some queries or models."}):y.jsxs(A.Table,{variant:"minimal",children:[y.jsx(A.Table.Head,{children:y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Cell,{children:"Rank"}),y.jsx(A.Table.Cell,{children:"Brand"})]})}),y.jsx(A.Table.Body,{children:w&&Array.isArray(w)&&w.length>0?w.map(function(S){var x;return y.jsx(zg,{data:S},"rank-row-".concat((x=S.rank)===null||x===void 0?void 0:x.value))}):d||f?Array.from({length:g}).map(function(S,x){return y.jsx(zg,{isLoading:!0},"skeleton-".concat(x))}):null})]}),!d&&!f&&h&&h.length>g&&y.jsx(A.Pagination,{current:a,total:p,className:"yst-flex-row",onNavigate:l,screenReaderTextNext:"Next",screenReaderTextPrevious:"Previous",variant:"text"})]})})},qA=function(){var t,n=Hs(),r=n.data,i=r==null||(t=r.sentiment)===null||t===void 0?void 0:t.topCompetitor;return y.jsx(sb,{title:"Competitor sentiment",data:i,tooltip:"Percentage of positive versus negative keywords in your query results related to your competitor's brand."})},zA=function(t){var n=t.brand,r=_n(),i=Mc(),s=i.setBrandId;return(n==null?void 0:n.setupStatus)==="pendingQuerySelection"?y.jsx(A.Alert,{className:"yst-mt-0",children:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsxs("h3",{className:"yst-font-medium",children:["Finish your analysis for ",(n==null?void 0:n.name)||"Brand ".concat(n==null?void 0:n.id)]}),y.jsx("p",{children:"Your brand is saved, but you haven’t completed the analysis yet. Review your queries and run the analysis to get your brand insights!"})]}),y.jsxs("div",{className:"yst-flex yst-justify-start yst-gap-6",children:[y.jsx(A.Link,{onClick:function(){n.id?(s(n.id),r("/setup/".concat(n.id,"/queries"))):console.error("Brand ID is missing.")},children:"Review queries"}),y.jsx(A.Link,{onClick:function(){},children:"Dismiss"})]})]})}):null},Tf=function(t){var n=t.isOpen,r=t.onClose,i=t.onConfirm,s=t.isLoading,o=s===void 0?!1:s,a=t.title,l=t.description,c=t.disabled,u=c===void 0?!1:c,d=t.confirmText,f=d===void 0?"Yes, delete":d,h=t.cancelText,g=h===void 0?"No, go back":h,m=t.className;return y.jsx(A.Modal,{isOpen:n,onClose:r,position:"center",as:"div",className:m,children:y.jsxs(A.Modal.Panel,{children:[y.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[y.jsx("div",{children:y.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:y.jsx(cE,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:a})}),y.jsx(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:typeof l=="string"?y.jsx("p",{children:l}):l})]})]}),y.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(A.Button,{variant:"secondary",onClick:r,children:g}),y.jsx(A.Button,{variant:"error",onClick:i,isLoading:o,disabled:u,children:f})]})]})})},Za={exports:{}},el={exports:{}},Be={};/** @license React v16.13.1
|
|
29
30
|
* react-is.production.min.js
|
|
30
31
|
*
|
|
31
32
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
33
|
*
|
|
33
34
|
* This source code is licensed under the MIT license found in the
|
|
34
35
|
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var
|
|
36
|
+
*/var Hg;function HA(){if(Hg)return Be;Hg=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var E=x.$$typeof;switch(E){case t:switch(x=x.type,x){case l:case c:case r:case s:case i:case d:return x;default:switch(x=x&&x.$$typeof,x){case a:case u:case g:case h:case o:return x;default:return E}}case n:return E}}}function S(x){return w(x)===c}return Be.AsyncMode=l,Be.ConcurrentMode=c,Be.ContextConsumer=a,Be.ContextProvider=o,Be.Element=t,Be.ForwardRef=u,Be.Fragment=r,Be.Lazy=g,Be.Memo=h,Be.Portal=n,Be.Profiler=s,Be.StrictMode=i,Be.Suspense=d,Be.isAsyncMode=function(x){return S(x)||w(x)===l},Be.isConcurrentMode=S,Be.isContextConsumer=function(x){return w(x)===a},Be.isContextProvider=function(x){return w(x)===o},Be.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Be.isForwardRef=function(x){return w(x)===u},Be.isFragment=function(x){return w(x)===r},Be.isLazy=function(x){return w(x)===g},Be.isMemo=function(x){return w(x)===h},Be.isPortal=function(x){return w(x)===n},Be.isProfiler=function(x){return w(x)===s},Be.isStrictMode=function(x){return w(x)===i},Be.isSuspense=function(x){return w(x)===d},Be.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===s||x===i||x===d||x===f||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===h||x.$$typeof===o||x.$$typeof===a||x.$$typeof===u||x.$$typeof===p||x.$$typeof===v||x.$$typeof===b||x.$$typeof===m)},Be.typeOf=w,Be}var qe={};/** @license React v16.13.1
|
|
36
37
|
* react-is.development.js
|
|
37
38
|
*
|
|
38
39
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
40
|
*
|
|
40
41
|
* This source code is licensed under the MIT license found in the
|
|
41
42
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var
|
|
43
|
+
*/var Ug;function UA(){return Ug||(Ug=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===c||Z===s||Z===i||Z===d||Z===f||typeof Z=="object"&&Z!==null&&(Z.$$typeof===g||Z.$$typeof===h||Z.$$typeof===o||Z.$$typeof===a||Z.$$typeof===u||Z.$$typeof===p||Z.$$typeof===v||Z.$$typeof===b||Z.$$typeof===m)}function S(Z){if(typeof Z=="object"&&Z!==null){var it=Z.$$typeof;switch(it){case t:var Tt=Z.type;switch(Tt){case l:case c:case r:case s:case i:case d:return Tt;default:var Pt=Tt&&Tt.$$typeof;switch(Pt){case a:case u:case g:case h:case o:return Pt;default:return it}}case n:return it}}}var x=l,E=c,C=a,k=o,_=t,O=u,P=r,j=g,W=h,I=n,D=s,L=i,F=d,oe=!1;function fe(Z){return oe||(oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(Z)||S(Z)===l}function B(Z){return S(Z)===c}function V(Z){return S(Z)===a}function te(Z){return S(Z)===o}function ae(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function R(Z){return S(Z)===u}function ce(Z){return S(Z)===r}function ee(Z){return S(Z)===g}function xe(Z){return S(Z)===h}function J(Z){return S(Z)===n}function se(Z){return S(Z)===s}function le(Z){return S(Z)===i}function Ae(Z){return S(Z)===d}qe.AsyncMode=x,qe.ConcurrentMode=E,qe.ContextConsumer=C,qe.ContextProvider=k,qe.Element=_,qe.ForwardRef=O,qe.Fragment=P,qe.Lazy=j,qe.Memo=W,qe.Portal=I,qe.Profiler=D,qe.StrictMode=L,qe.Suspense=F,qe.isAsyncMode=fe,qe.isConcurrentMode=B,qe.isContextConsumer=V,qe.isContextProvider=te,qe.isElement=ae,qe.isForwardRef=R,qe.isFragment=ce,qe.isLazy=ee,qe.isMemo=xe,qe.isPortal=J,qe.isProfiler=se,qe.isStrictMode=le,qe.isSuspense=Ae,qe.isValidElementType=w,qe.typeOf=S}()),qe}var Kg;function ab(){return Kg||(Kg=1,process.env.NODE_ENV==="production"?el.exports=HA():el.exports=UA()),el.exports}/*
|
|
43
44
|
object-assign
|
|
44
45
|
(c) Sindre Sorhus
|
|
45
46
|
@license MIT
|
|
46
|
-
*/var
|
|
47
|
-
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Z=Ae(xe,ae,I,ce,ee+"."+ae,n);if(Z)return Z}return null}return p(W)}function R(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(R);if(B===null||a(B))return!0;var W=d(B);if(W){var te=W.call(B),oe;if(W!==B.entries){for(;!(oe=te.next()).done;)if(!R(oe.value))return!1}else for(;!(oe=te.next()).done;){var I=oe.value;if(I&&!R(I[1]))return!1}}else return!1;return!0;default:return!1}}function D(B,W){return B==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function L(B){var W=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":D(W,B)?"symbol":W}function N(B){if(typeof B=="undefined"||B===null)return""+B;var W=L(B);if(W==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return W}function le(B){var W=N(B);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function fe(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},pu}var vu,Hg;function RA(){if(Hg)return vu;Hg=1;var e=_f();function t(){}function n(){}return n.resetWarningCache=t,vu=function(){function r(o,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},vu}var Ug;function FA(){if(Ug)return Ja.exports;if(Ug=1,process.env.NODE_ENV!=="production"){var e=tb(),t=!0;Ja.exports=IA()(e.isElement,t)}else Ja.exports=RA()();return Ja.exports}var NA=FA();const Ad=Xp(NA);var $a=function(t){var n=t.className,r=n===void 0?"":n;return y.jsx("hr",{className:ke("yst-my-6",r)})};$a.propTypes={className:Ad.string};const rb=6048e5,BA=864e5,Kg=Symbol.for("constructDateFrom");function Yt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Kg in e?e[Kg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Nt(e,t){return Yt(t||e,e)}function ib(e,t,n){const r=Nt(e,n==null?void 0:n.in);if(isNaN(t))return Yt(e,NaN);if(!t)return r;const i=r.getDate(),s=Yt(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return i>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let qA={};function jc(){return qA}function Vo(e,t){var a,l,c,u,d,f,h,g;const n=jc(),r=(g=(h=(u=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?u:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?g:0,i=Nt(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Ql(e,t){return Vo(e,{...t,weekStartsOn:1})}function sb(e,t){const n=Nt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Yt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Ql(i),o=Yt(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Ql(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Wg(e){const t=Nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Dc(e,...t){const n=Yt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Yl(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function zA(e,t,n){const[r,i]=Dc(n==null?void 0:n.in,e,t),s=Yl(r),o=Yl(i),a=+s-Wg(s),l=+o-Wg(o);return Math.round((a-l)/BA)}function HA(e,t){const n=sb(e,t),r=Yt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ql(r)}function UA(e){return Yt(e,Date.now())}function KA(e,t,n){const[r,i]=Dc(n==null?void 0:n.in,e,t);return+Yl(r)==+Yl(i)}function WA(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VA(e){return!(!WA(e)&&typeof e!="number"||isNaN(+Nt(e)))}function GA(e,t){const n=Nt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function QA(e,t){const[n,r]=Dc(e,t.start,t.end);return{start:n,end:r}}function YA(e,t){const{start:n,end:r}=QA(t==null?void 0:t.in,e);let i=+n>+r;const s=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=s;)l.push(Yt(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function XA(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function JA(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const ZA={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"}},eP=(e,t,n)=>{let r;const i=ZA[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},nP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iP={date:bu({formats:tP,defaultWidth:"full"}),time:bu({formats:nP,defaultWidth:"full"}),dateTime:bu({formats:rP,defaultWidth:"full"})},sP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},oP=(e,t,n,r)=>sP[e];function eo(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const aP={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cP={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"]},uP={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"]},dP={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"}},fP={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"}},hP=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},gP={ordinalNumber:hP,era:eo({values:aP,defaultWidth:"wide"}),quarter:eo({values:lP,defaultWidth:"wide",argumentCallback:e=>e-1}),month:eo({values:cP,defaultWidth:"wide"}),day:eo({values:uP,defaultWidth:"wide"}),dayPeriod:eo({values:dP,defaultWidth:"wide",formattingValues:fP,defaultFormattingWidth:"wide"})};function to(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?mP(a,d=>d.test(o)):yP(a,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function yP(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mP(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function pP(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const vP=/^(\d+)(th|st|nd|rd)?/i,bP=/\d+/i,xP={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},wP={any:[/^b/i,/^(a|c)/i]},SP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CP={any:[/1/i,/2/i,/3/i,/4/i]},_P={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},kP={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]},OP={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},EP={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]},AP={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},PP={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}},TP={ordinalNumber:pP({matchPattern:vP,parsePattern:bP,valueCallback:e=>parseInt(e,10)}),era:to({matchPatterns:xP,defaultMatchWidth:"wide",parsePatterns:wP,defaultParseWidth:"any"}),quarter:to({matchPatterns:SP,defaultMatchWidth:"wide",parsePatterns:CP,defaultParseWidth:"any",valueCallback:e=>e+1}),month:to({matchPatterns:_P,defaultMatchWidth:"wide",parsePatterns:kP,defaultParseWidth:"any"}),day:to({matchPatterns:OP,defaultMatchWidth:"wide",parsePatterns:EP,defaultParseWidth:"any"}),dayPeriod:to({matchPatterns:AP,defaultMatchWidth:"any",parsePatterns:PP,defaultParseWidth:"any"})},$P={code:"en-US",formatDistance:eP,formatLong:iP,formatRelative:oP,localize:gP,match:TP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function MP(e,t){const n=Nt(e,t==null?void 0:t.in);return zA(n,JA(n))+1}function jP(e,t){const n=Nt(e,t==null?void 0:t.in),r=+Ql(n)-+HA(n);return Math.round(r/rb)+1}function ob(e,t){var u,d,f,h,g,m,p,v;const n=Nt(e,t==null?void 0:t.in),r=n.getFullYear(),i=jc(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=Yt((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=Vo(o,t),l=Yt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Vo(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function DP(e,t){var a,l,c,u,d,f,h,g;const n=jc(),r=(g=(h=(u=(c=t==null?void 0:t.firstWeekContainsDate)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?u:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,i=ob(e,t),s=Yt((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Vo(s,t)}function LP(e,t){const n=Nt(e,t==null?void 0:t.in),r=+Vo(n,t)-+DP(n,t);return Math.round(r/rb)+1}function Ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const mr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ue(n+1,2)},d(e,t){return Ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ue(i,t.length)}},Fi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Vg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return mr.y(e,t)},Y:function(e,t,n,r){const i=ob(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Ue(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ue(s,t.length)},R:function(e,t){const n=sb(e);return Ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return mr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=LP(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ue(i,t.length)},I:function(e,t,n){const r=jP(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):mr.d(e,t)},D:function(e,t,n){const r=MP(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ue(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ue(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ue(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Fi.noon:r===0?i=Fi.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Fi.evening:r>=12?i=Fi.afternoon:r>=4?i=Fi.morning:i=Fi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return mr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):mr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):mr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):mr.s(e,t)},S:function(e,t){return mr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Qg(r);case"XXXX":case"XX":return ti(r);case"XXXXX":case"XXX":default:return ti(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Qg(r);case"xxxx":case"xx":return ti(r);case"xxxxx":case"xxx":default:return ti(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Gg(r,":");case"OOOO":default:return"GMT"+ti(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Gg(r,":");case"zzzz":default:return"GMT"+ti(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ue(r,t.length)},T:function(e,t,n){return Ue(+e,t.length)}};function Gg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Ue(s,2)}function Qg(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):ti(e,t)}function ti(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ue(Math.trunc(r/60),2),s=Ue(r%60,2);return n+i+t+s}const Yg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ab=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},IP=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Yg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Yg(r,t)).replace("{{time}}",ab(i,t))},RP={p:ab,P:IP},FP=/^D+$/,NP=/^Y+$/,BP=["D","DD","YY","YYYY"];function qP(e){return FP.test(e)}function zP(e){return NP.test(e)}function HP(e,t,n){const r=UP(e,t,n);if(console.warn(r),BP.includes(e))throw new RangeError(r)}function UP(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const KP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,VP=/^'([^]*?)'?$/,GP=/''/g,QP=/[a-zA-Z]/;function yo(e,t,n){var u,d,f,h,g,m,p,v,b;const r=jc(),i=(u=r.locale)!=null?u:$P,s=(g=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,o=(b=(v=r.weekStartsOn)!=null?v:(p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)!=null?b:0,a=Nt(e,n==null?void 0:n.in);if(!VA(a))throw new RangeError("Invalid time value");let l=t.match(WP).map(x=>{const S=x[0];if(S==="p"||S==="P"){const w=RP[S];return w(x,i.formatLong)}return x}).join("").match(KP).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const S=x[0];if(S==="'")return{isToken:!1,value:YP(x)};if(Vg[S])return{isToken:!0,value:x};if(S.match(QP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:x}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(x=>{if(!x.isToken)return x.value;const S=x.value;(zP(S)||qP(S))&&HP(S,t,String(e));const w=Vg[S[0]];return w(a,S,i.localize,c)}).join("")}function YP(e){const t=e.match(VP);return t?t[1].replace(GP,"'"):e}function Xg(e,t,n){const[r,i]=Dc(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function XP(e,t){return KA(Yt(e,e),UA(e))}function JP(e,t,n){return ib(e,-1,n)}function Go(e){"@babel/helpers - typeof";return Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Go(e)}function xu(e,t,n){return(t=ZP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZP(e){var t=eT(e,"string");return Go(t)=="symbol"?t:t+""}function eT(e,t){if(Go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Go(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jg(e,t){return iT(e)||rT(e,t)||nT(e,t)||tT()}function tT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
49
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
50
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
47
|
+
*/var yu,Wg;function KA(){if(Wg)return yu;Wg=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch(u){return!1}}return yu=i()?Object.assign:function(s,o){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},yu}var mu,Vg;function Pf(){if(Vg)return mu;Vg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mu=e,mu}var pu,Gg;function lb(){return Gg||(Gg=1,pu=Function.call.bind(Object.prototype.hasOwnProperty)),pu}var vu,Qg;function WA(){if(Qg)return vu;Qg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Pf(),n={},r=lb();e=function(s){var o="Warning: "+s;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(a){}}}function i(s,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](o,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h!=null?h:""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vu=i,vu}var bu,Yg;function VA(){if(Yg)return bu;Yg=1;var e=ab(),t=KA(),n=Pf(),r=lb(),i=WA(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console!="undefined"&&console.error(l);try{throw new Error(l)}catch(c){}});function o(){return null}return bu=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(B){var V=B&&(c&&B[c]||B[u]);if(typeof V=="function")return V}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:w,element:S(),elementType:x(),instanceOf:E,node:O(),objectOf:k,oneOf:C,oneOfType:_,shape:j,exact:W};function g(B,V){return B===V?B!==0||1/B===1/V:B!==B&&V!==V}function m(B,V){this.message=B,this.data=V&&typeof V=="object"?V:{},this.stack=""}m.prototype=Error.prototype;function p(B){if(process.env.NODE_ENV!=="production")var V={},te=0;function ae(ce,ee,xe,J,se,le,Ae){if(J=J||f,le=le||xe,Ae!==n){if(l){var Z=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 Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var it=J+":"+xe;!V[it]&&te<3&&(s("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+J+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),V[it]=!0,te++)}}return ee[xe]==null?ce?ee[xe]===null?new m("The "+se+" `"+le+"` is marked as required "+("in `"+J+"`, but its value is `null`.")):new m("The "+se+" `"+le+"` is marked as required in "+("`"+J+"`, but its value is `undefined`.")):null:B(ee,xe,J,se,le)}var R=ae.bind(null,!1);return R.isRequired=ae.bind(null,!0),R}function v(B){function V(te,ae,R,ce,ee,xe){var J=te[ae],se=L(J);if(se!==B){var le=F(J);return new m("Invalid "+ce+" `"+ee+"` of type "+("`"+le+"` supplied to `"+R+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return p(V)}function b(){return p(o)}function w(B){function V(te,ae,R,ce,ee){if(typeof B!="function")return new m("Property `"+ee+"` of component `"+R+"` has invalid PropType notation inside arrayOf.");var xe=te[ae];if(!Array.isArray(xe)){var J=L(xe);return new m("Invalid "+ce+" `"+ee+"` of type "+("`"+J+"` supplied to `"+R+"`, expected an array."))}for(var se=0;se<xe.length;se++){var le=B(xe,se,R,ce,ee+"["+se+"]",n);if(le instanceof Error)return le}return null}return p(V)}function S(){function B(V,te,ae,R,ce){var ee=V[te];if(!a(ee)){var xe=L(ee);return new m("Invalid "+R+" `"+ce+"` of type "+("`"+xe+"` supplied to `"+ae+"`, expected a single ReactElement."))}return null}return p(B)}function x(){function B(V,te,ae,R,ce){var ee=V[te];if(!e.isValidElementType(ee)){var xe=L(ee);return new m("Invalid "+R+" `"+ce+"` of type "+("`"+xe+"` supplied to `"+ae+"`, expected a single ReactElement type."))}return null}return p(B)}function E(B){function V(te,ae,R,ce,ee){if(!(te[ae]instanceof B)){var xe=B.name||f,J=fe(te[ae]);return new m("Invalid "+ce+" `"+ee+"` of type "+("`"+J+"` supplied to `"+R+"`, expected ")+("instance of `"+xe+"`."))}return null}return p(V)}function C(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function V(te,ae,R,ce,ee){for(var xe=te[ae],J=0;J<B.length;J++)if(g(xe,B[J]))return null;var se=JSON.stringify(B,function(Ae,Z){var it=F(Z);return it==="symbol"?String(Z):Z});return new m("Invalid "+ce+" `"+ee+"` of value `"+String(xe)+"` "+("supplied to `"+R+"`, expected one of "+se+"."))}return p(V)}function k(B){function V(te,ae,R,ce,ee){if(typeof B!="function")return new m("Property `"+ee+"` of component `"+R+"` has invalid PropType notation inside objectOf.");var xe=te[ae],J=L(xe);if(J!=="object")return new m("Invalid "+ce+" `"+ee+"` of type "+("`"+J+"` supplied to `"+R+"`, expected an object."));for(var se in xe)if(r(xe,se)){var le=B(xe,se,R,ce,ee+"."+se,n);if(le instanceof Error)return le}return null}return p(V)}function _(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var V=0;V<B.length;V++){var te=B[V];if(typeof te!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+oe(te)+" at index "+V+"."),o}function ae(R,ce,ee,xe,J){for(var se=[],le=0;le<B.length;le++){var Ae=B[le],Z=Ae(R,ce,ee,xe,J,n);if(Z==null)return null;Z.data&&r(Z.data,"expectedType")&&se.push(Z.data.expectedType)}var it=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new m("Invalid "+xe+" `"+J+"` supplied to "+("`"+ee+"`"+it+"."))}return p(ae)}function O(){function B(V,te,ae,R,ce){return I(V[te])?null:new m("Invalid "+R+" `"+ce+"` supplied to "+("`"+ae+"`, expected a ReactNode."))}return p(B)}function P(B,V,te,ae,R){return new m((B||"React class")+": "+V+" type `"+te+"."+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+R+"`.")}function j(B){function V(te,ae,R,ce,ee){var xe=te[ae],J=L(xe);if(J!=="object")return new m("Invalid "+ce+" `"+ee+"` of type `"+J+"` "+("supplied to `"+R+"`, expected `object`."));for(var se in B){var le=B[se];if(typeof le!="function")return P(R,ce,ee,se,F(le));var Ae=le(xe,se,R,ce,ee+"."+se,n);if(Ae)return Ae}return null}return p(V)}function W(B){function V(te,ae,R,ce,ee){var xe=te[ae],J=L(xe);if(J!=="object")return new m("Invalid "+ce+" `"+ee+"` of type `"+J+"` "+("supplied to `"+R+"`, expected `object`."));var se=t({},te[ae],B);for(var le in se){var Ae=B[le];if(r(B,le)&&typeof Ae!="function")return P(R,ce,ee,le,F(Ae));if(!Ae)return new m("Invalid "+ce+" `"+ee+"` key `"+le+"` supplied to `"+R+"`.\nBad object: "+JSON.stringify(te[ae],null," ")+`
|
|
48
|
+
Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Z=Ae(xe,le,R,ce,ee+"."+le,n);if(Z)return Z}return null}return p(V)}function I(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(I);if(B===null||a(B))return!0;var V=d(B);if(V){var te=V.call(B),ae;if(V!==B.entries){for(;!(ae=te.next()).done;)if(!I(ae.value))return!1}else for(;!(ae=te.next()).done;){var R=ae.value;if(R&&!I(R[1]))return!1}}else return!1;return!0;default:return!1}}function D(B,V){return B==="symbol"?!0:V?V["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&V instanceof Symbol:!1}function L(B){var V=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":D(V,B)?"symbol":V}function F(B){if(typeof B=="undefined"||B===null)return""+B;var V=L(B);if(V==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return V}function oe(B){var V=F(B);switch(V){case"array":case"object":return"an "+V;case"boolean":case"date":case"regexp":return"a "+V;default:return V}}function fe(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},bu}var xu,Xg;function GA(){if(Xg)return xu;Xg=1;var e=Pf();function t(){}function n(){}return n.resetWarningCache=t,xu=function(){function r(o,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},xu}var Jg;function QA(){if(Jg)return Za.exports;if(Jg=1,process.env.NODE_ENV!=="production"){var e=ab(),t=!0;Za.exports=VA()(e.isElement,t)}else Za.exports=GA()();return Za.exports}var YA=QA();const jd=i0(YA);var Ma=function(t){var n=t.className,r=n===void 0?"":n;return y.jsx("hr",{className:Ce("yst-my-6",r)})};Ma.propTypes={className:jd.string};const cb=6048e5,XA=864e5,Zg=Symbol.for("constructDateFrom");function Xt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Zg in e?e[Zg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Nt(e,t){return Xt(t||e,e)}function ub(e,t,n){const r=Nt(e,n==null?void 0:n.in);if(isNaN(t))return Xt(e,NaN);if(!t)return r;const i=r.getDate(),s=Xt(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const o=s.getDate();return i>=o?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let JA={};function Lc(){return JA}function Qo(e,t){var a,l,c,u,d,f,h,g;const n=Lc(),r=(g=(h=(u=(c=t==null?void 0:t.weekStartsOn)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?u:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?g:0,i=Nt(e,t==null?void 0:t.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Yl(e,t){return Qo(e,{...t,weekStartsOn:1})}function db(e,t){const n=Nt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Xt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Yl(i),o=Xt(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Yl(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ey(e){const t=Nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ic(e,...t){const n=Xt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xl(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function ZA(e,t,n){const[r,i]=Ic(n==null?void 0:n.in,e,t),s=Xl(r),o=Xl(i),a=+s-ey(s),l=+o-ey(o);return Math.round((a-l)/XA)}function eT(e,t){const n=db(e,t),r=Xt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Yl(r)}function tT(e){return Xt(e,Date.now())}function nT(e,t,n){const[r,i]=Ic(n==null?void 0:n.in,e,t);return+Xl(r)==+Xl(i)}function rT(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iT(e){return!(!rT(e)&&typeof e!="number"||isNaN(+Nt(e)))}function sT(e,t){const n=Nt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function oT(e,t){const[n,r]=Ic(e,t.start,t.end);return{start:n,end:r}}function aT(e,t){const{start:n,end:r}=oT(t==null?void 0:t.in,e);let i=+n>+r;const s=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=s;)l.push(Xt(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function lT(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function cT(e,t){const n=Nt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const uT={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"}},dT=(e,t,n)=>{let r;const i=uT[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wu(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const fT={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hT={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gT={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yT={date:wu({formats:fT,defaultWidth:"full"}),time:wu({formats:hT,defaultWidth:"full"}),dateTime:wu({formats:gT,defaultWidth:"full"})},mT={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},pT=(e,t,n,r)=>mT[e];function no(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=e.formattingValues[a]||e.formattingValues[o]}else{const o=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const vT={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bT={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xT={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"]},wT={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"]},ST={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"}},CT={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"}},_T=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kT={ordinalNumber:_T,era:no({values:vT,defaultWidth:"wide"}),quarter:no({values:bT,defaultWidth:"wide",argumentCallback:e=>e-1}),month:no({values:xT,defaultWidth:"wide"}),day:no({values:wT,defaultWidth:"wide"}),dayPeriod:no({values:ST,defaultWidth:"wide",formattingValues:CT,defaultFormattingWidth:"wide"})};function ro(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?ET(a,d=>d.test(o)):OT(a,d=>d.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function OT(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ET(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function AT(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const TT=/^(\d+)(th|st|nd|rd)?/i,PT=/\d+/i,$T={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},MT={any:[/^b/i,/^(a|c)/i]},jT={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},DT={any:[/1/i,/2/i,/3/i,/4/i]},LT={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},IT={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]},RT={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},FT={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]},NT={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},BT={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}},qT={ordinalNumber:AT({matchPattern:TT,parsePattern:PT,valueCallback:e=>parseInt(e,10)}),era:ro({matchPatterns:$T,defaultMatchWidth:"wide",parsePatterns:MT,defaultParseWidth:"any"}),quarter:ro({matchPatterns:jT,defaultMatchWidth:"wide",parsePatterns:DT,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ro({matchPatterns:LT,defaultMatchWidth:"wide",parsePatterns:IT,defaultParseWidth:"any"}),day:ro({matchPatterns:RT,defaultMatchWidth:"wide",parsePatterns:FT,defaultParseWidth:"any"}),dayPeriod:ro({matchPatterns:NT,defaultMatchWidth:"any",parsePatterns:BT,defaultParseWidth:"any"})},zT={code:"en-US",formatDistance:dT,formatLong:yT,formatRelative:pT,localize:kT,match:qT,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HT(e,t){const n=Nt(e,t==null?void 0:t.in);return ZA(n,cT(n))+1}function UT(e,t){const n=Nt(e,t==null?void 0:t.in),r=+Yl(n)-+eT(n);return Math.round(r/cb)+1}function fb(e,t){var u,d,f,h,g,m,p,v;const n=Nt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Lc(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(g=i.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=Xt((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=Qo(o,t),l=Xt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Qo(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function KT(e,t){var a,l,c,u,d,f,h,g;const n=Lc(),r=(g=(h=(u=(c=t==null?void 0:t.firstWeekContainsDate)!=null?c:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?u:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,i=fb(e,t),s=Xt((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Qo(s,t)}function WT(e,t){const n=Nt(e,t==null?void 0:t.in),r=+Qo(n,t)-+KT(n,t);return Math.round(r/cb)+1}function Ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const vr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ue(n+1,2)},d(e,t){return Ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ue(i,t.length)}},Ni={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ty={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return vr.y(e,t)},Y:function(e,t,n,r){const i=fb(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Ue(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Ue(s,t.length)},R:function(e,t){const n=db(e);return Ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return vr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=WT(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ue(i,t.length)},I:function(e,t,n){const r=UT(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):vr.d(e,t)},D:function(e,t,n){const r=HT(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Ue(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Ue(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Ue(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ni.noon:r===0?i=Ni.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ni.evening:r>=12?i=Ni.afternoon:r>=4?i=Ni.morning:i=Ni.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return vr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):vr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):vr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):vr.s(e,t)},S:function(e,t){return vr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ry(r);case"XXXX":case"XX":return ni(r);case"XXXXX":case"XXX":default:return ni(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ry(r);case"xxxx":case"xx":return ni(r);case"xxxxx":case"xxx":default:return ni(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ny(r,":");case"OOOO":default:return"GMT"+ni(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ny(r,":");case"zzzz":default:return"GMT"+ni(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ue(r,t.length)},T:function(e,t,n){return Ue(+e,t.length)}};function ny(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Ue(s,2)}function ry(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):ni(e,t)}function ni(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ue(Math.trunc(r/60),2),s=Ue(r%60,2);return n+i+t+s}const iy=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},VT=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return iy(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",iy(r,t)).replace("{{time}}",hb(i,t))},GT={p:hb,P:VT},QT=/^D+$/,YT=/^Y+$/,XT=["D","DD","YY","YYYY"];function JT(e){return QT.test(e)}function ZT(e){return YT.test(e)}function eP(e,t,n){const r=tP(e,t,n);if(console.warn(r),XT.includes(e))throw new RangeError(r)}function tP(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const nP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,iP=/^'([^]*?)'?$/,sP=/''/g,oP=/[a-zA-Z]/;function po(e,t,n){var u,d,f,h,g,m,p,v,b;const r=Lc(),i=(u=r.locale)!=null?u:zT,s=(g=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?g:1,o=(b=(v=r.weekStartsOn)!=null?v:(p=(m=r.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)!=null?b:0,a=Nt(e,n==null?void 0:n.in);if(!iT(a))throw new RangeError("Invalid time value");let l=t.match(rP).map(w=>{const S=w[0];if(S==="p"||S==="P"){const x=GT[S];return x(w,i.formatLong)}return w}).join("").match(nP).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:aP(w)};if(ty[S])return{isToken:!0,value:w};if(S.match(oP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(ZT(S)||JT(S))&&eP(S,t,String(e));const x=ty[S[0]];return x(a,S,i.localize,c)}).join("")}function aP(e){const t=e.match(iP);return t?t[1].replace(sP,"'"):e}function sy(e,t,n){const[r,i]=Ic(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function lP(e,t){return nT(Xt(e,e),tT(e))}function cP(e,t,n){return ub(e,-1,n)}function Yo(e){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yo(e)}function Su(e,t,n){return(t=uP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uP(e){var t=dP(e,"string");return Yo(t)=="symbol"?t:t+""}function dP(e,t){if(Yo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oy(e,t){return yP(e)||gP(e,t)||hP(e,t)||fP()}function fP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hP(e,t){if(e){if(typeof e=="string")return ay(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ay(e,t):void 0}}function ay(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function yP(e){if(Array.isArray(e))return e}var pn={selected:{background:"yst-bg-primary-500",text:"yst-text-white",hover:"hover:yst-bg-primary-600"},hasAnalysis:{border:"yst-border-2 yst-border-primary-500",text:"yst-text-slate-900",hover:"hover:yst-bg-primary-50"},today:{underline:"yst-border-b-2 yst-border-slate-400"},indicator:{selected:"yst-bg-white",default:"yst-bg-blue-500"}},mP=function(t){var n=t.analyses,r=t.selectedAnalysisId,i=t.onAnalysisSelect,s=t.isLoading,o=s===void 0?!1:s,a=t.isOpen,l=a===void 0?!1:a,c=t.onClose,u=z.useState(new Date),d=oy(u,2),f=d[0],h=d[1],g=function(k){if(!k)return null;var _=k.slice(0,10),O=_.split("-"),P=oy(O,3),j=P[0],W=P[1],I=P[2],D=Number(j),L=Number(W),F=Number(I);return Number.isNaN(D)||Number.isNaN(L)||Number.isNaN(F)||L<1||L>12||F<1||F>31?null:new Date(D,L-1,F)},m=z.useMemo(function(){var C=new Map;return n.forEach(function(k){var _=g(k.createdAt),O=_?po(_,"yyyy-MM-dd"):"";O&&(C.has(O)||C.set(O,[]),C.get(O).push(k))}),C},[n]);z.useEffect(function(){if(l&&r){var C=n.find(function(P){return P.id===r});if(C){var k=g(C.createdAt);k&&h(k)}}else if(l&&n.length>0){var _=n.reduce(function(P,j){return new Date(j.createdAt)>new Date(P.createdAt)?j:P}),O=g(_.createdAt);O&&h(O)}},[l,r,n]);var p=z.useMemo(function(){return n.length===0?null:n.reduce(function(C,k){return new Date(k.createdAt)>new Date(C.createdAt)?k:C})},[n]),v=function(){if(p){var k=g(p.createdAt);k&&h(k)}},b=z.useMemo(function(){if(!p)return!1;var C=g(p.createdAt);return C?sy(C,f):!1},[p,f]),w=z.useMemo(function(){var C=lT(f),k=sT(f),_=new Date(C),O=_.getDay(),P=O===0?6:O-1;_.setDate(_.getDate()-P);var j=new Date(k),W=j.getDay(),I=W===0?0:7-W;return j.setDate(j.getDate()+I),aT({start:_,end:j}).map(function(D){var L=po(D,"yyyy-MM-dd"),F=m.get(L)||[],oe=F.find(function(fe){return String(fe.id)===String(r)});return{date:L,dateObj:D,isCurrentMonth:sy(D,f),isToday:lP(D),isSelected:!!oe,hasAnalyses:F.length>0,analyses:F}})},[f,m,r]),S=function(){h(function(k){return cP(k)})},x=function(){h(function(k){return ub(k,1)})},E=function(k){k.hasAnalyses&&(k.analyses.length,i(k.analyses[0].id),c==null||c())};return l?o?y.jsx("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:y.jsxs("div",{className:"yst-animate-pulse yst-space-y-4",children:[y.jsx("div",{className:"yst-h-6 yst-rounded yst-bg-slate-200"}),y.jsx("div",{className:"yst-h-48 yst-rounded yst-bg-slate-200"})]})}):y.jsxs("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-min-w-80 yst-max-w-sm yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:[y.jsxs("div",{className:"yst-mb-6 yst-flex yst-items-center yst-justify-between",children:[y.jsxs("button",{type:"button",onClick:S,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[y.jsx("span",{className:"yst-sr-only",children:"Previous month"}),y.jsx(ZO,{className:"yst-h-5 yst-w-5"})]}),y.jsx("h2",{className:"yst-text-sm yst-font-semibold yst-text-slate-900",children:po(f,"MMMM yyyy")}),y.jsxs("button",{type:"button",onClick:x,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[y.jsx("span",{className:"yst-sr-only",children:"Next month"}),y.jsx(tE,{className:"yst-h-5 yst-w-5"})]})]}),y.jsx("div",{className:"yst-mb-0 yst-grid yst-grid-cols-7 yst-gap-x-1",children:["M","T","W","T","F","S","S"].map(function(C,k){return y.jsx("div",{className:"yst-py-2 yst-text-center yst-text-xs yst-font-medium yst-text-slate-500",children:C},"".concat(C,"-").concat(k))})}),y.jsx("div",{className:"yst-grid yst-grid-cols-7 yst-gap-x-1",children:w.map(function(C){return y.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-py-1",children:y.jsxs("button",{type:"button",onClick:function(){return E(C)},disabled:!C.hasAnalyses,className:Ce("yst-relative yst-rounded-full yst-text-sm yst-transition-colors","yst-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center","yst-p-0",{"yst-text-slate-900":C.isCurrentMonth,"yst-text-slate-400":!C.isCurrentMonth},{"focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-blue-500":C.hasAnalyses,"yst-cursor-not-allowed":!C.hasAnalyses,"yst-cursor-pointer":C.hasAnalyses},Su({},"".concat(pn.selected.background," ").concat(pn.selected.text," ").concat(pn.selected.hover),C.isSelected),Su({},"".concat(pn.hasAnalysis.border," ").concat(pn.hasAnalysis.text," ").concat(pn.hasAnalysis.hover),C.hasAnalyses&&!C.isSelected)),children:[y.jsx("span",{className:Ce("yst-relative yst-z-10 yst-w-4",Su({},pn.today.underline,C.isToday&&!C.isSelected)),children:po(C.dateObj,"d")}),C.hasAnalyses&&C.analyses.length>1&&y.jsx("span",{className:Ce("yst-absolute yst-right-1 yst-top-1 yst-h-2 yst-w-2 yst-rounded-full",C.isSelected?pn.indicator.selected:pn.indicator.default)})]})},C.date)})}),y.jsxs("div",{className:"yst-mt-4 yst-flex yst-items-center yst-gap-4 yst-text-xs yst-text-slate-600",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(pn.hasAnalysis.border)}),y.jsx("span",{children:"Has analysis"})]}),y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(pn.selected.background)}),y.jsx("span",{children:"Selected"})]}),y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[y.jsx("div",{className:"yst-h-0.5 yst-w-4 yst-bg-slate-400"}),y.jsx("span",{children:"Today"})]})]}),p&&y.jsx("div",{className:"yst-mt-6",children:y.jsx(A.Button,{onClick:v,className:"yst-w-full",disabled:b,children:"Show latest analysis"})})]}):null};function Cu(e,t){return xP(e)||bP(e,t)||vP(e,t)||pP()}function pP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vP(e,t){if(e){if(typeof e=="string")return ly(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ly(e,t):void 0}}function ly(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bP(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function xP(e){if(Array.isArray(e))return e}var wP=function(t){var n=t.analyses,r=t.selectedAnalysisId,i=t.onAnalysisSelect,s=t.isLoading,o=s===void 0?!1:s,a=t.disabled,l=a===void 0?!1:a,c=t.id,u=c===void 0?"analysis-date-select":c,d=z.useState(!1),f=Cu(d,2),h=f[0],g=f[1],m=z.useState("latest"),p=Cu(m,2),v=p[0],b=p[1],w=z.useRef(null),S=function(D){if(!D)return null;var L=D.slice(0,10),F=L.split("-"),oe=Cu(F,3),fe=oe[0],B=oe[1],V=oe[2],te=Number(fe),ae=Number(B),R=Number(V);return Number.isNaN(te)||Number.isNaN(ae)||Number.isNaN(R)||ae<1||ae>12||R<1||R>31?null:new Date(te,ae-1,R)},x=function(D){var L=S(D.createdAt);return L?L.getTime():-1/0};z.useEffect(function(){if((r==="latest"||!r)&&n.length>0&&!o){var I=n.reduce(function(D,L){return x(L)>x(D)?L:D});i(I.id)}},[n,r,i,o]);var E=z.useMemo(function(){if(r==="latest"||!r){if(n.length>0){var I=n.reduce(function(D,L){return x(L)>x(D)?L:D});return I.id}return"latest"}return r},[r,n,x]);z.useEffect(function(){b(E)},[E]);var C=n.find(function(I){return String(I.id)===String(v)}),k=n.length>0?String(n.reduce(function(I,D){return x(D)>x(I)?D:I}).id):"",_=function(){if(C){var I=S(C.createdAt),D=I?po(I,"MMMM d, yyyy"):C.createdAt?C.createdAt.slice(0,10):"Unknown date",L=String(C.id)===k?"(latest)":"(older)";return"".concat(D," ").concat(L)}return n.length>0?"Select date...":"No analyses available"}();z.useEffect(function(){var I=function(L){w.current&&!w.current.contains(L.target)&&g(!1)};return h&&document.addEventListener("mousedown",I),function(){document.removeEventListener("mousedown",I)}},[h]);var O=function(){!l&&!o&&g(!h)},P=function(D){b(D),i(D),g(!1)},j=function(){g(!1)},W=function(D){D.key==="Enter"||D.key===" "?(D.preventDefault(),O()):D.key==="Escape"&&g(!1)};return y.jsxs("div",{ref:w,className:"yst-relative",children:[y.jsxs("div",{className:"yst-relative",children:[y.jsx(A.TextInput,{id:u,onClick:O,onKeyDown:W,disabled:l||o,readOnly:!0,value:_,"aria-expanded":h,"aria-haspopup":"true","aria-label":"Select analysis date",className:Ce("yst-pr-10",{"yst-cursor-default":!l&&!o})}),y.jsx(QO,{className:Ce("yst-pointer-events-none yst-absolute yst-right-3 yst-top-1/2 yst--translate-y-1/2 yst-transform",{"yst-text-gray-400":l||o})})]}),y.jsx(mP,{analyses:n,selectedAnalysisId:v,onAnalysisSelect:P,isLoading:o,isOpen:h,onClose:j})]})},cy;function uy(e,t){return kP(e)||_P(e,t)||CP(e,t)||SP()}function SP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
51
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CP(e,t){if(e){if(typeof e=="string")return dy(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dy(e,t):void 0}}function dy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _P(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function kP(e){if(Array.isArray(e))return e}function OP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var _u=$a(cy||(cy=OP(["yst-flex-1 yst-space-y-2"]))),EP=function(t){var n,r=t.className,i=Wr(),s=i.brandId,o=i.analysisId,a=i.model,l=Mc(),c=l.setModel,u=Hn(),d=_n(),f=$c({query:{select:function(le){var Ae=le.data;return Ae==null?void 0:Ae.data}}}),h=f.data,g=f.isLoading,m=h==null?void 0:h.displayName,p=zs({query:{select:function(le){var Ae=le.data;return Ae==null?void 0:Ae.brands}}}),v=p.data,b=p.isLoading,w=Sk(s,{query:{enabled:!!s,select:function(le){var Ae=le.data;return Ae==null?void 0:Ae.analyses}}}),S=w.data,x=w.isLoading,E=Pc(s,o,{query:{enabled:!!s&&!!o,select:function(le){var Ae=le.data;return Ae}}}),C=E.data,k=E.isLoading,_=iO(s,{query:{enabled:!!s,select:function(le){var Ae=le.data;return Ae}}}),O=_.data,P=_.isLoading,j=kk({mutation:{onSuccess:function(){u.invalidateQueries({queryKey:[Kv(s)]})}}}),W=j.mutate,I=j.isPending;z.useEffect(function(){!P&&!k&&s&&v&&(v==null?void 0:v.length)<2&&(!O||Array.isArray(O)&&O.length===0)&&(S==null?void 0:S.length)===0&&d("/setup/".concat(s,"/queries"))},[P,k,O,s,d,v,S==null?void 0:S.length]);var D=z.useState(!1),L=uy(D,2),F=L[0],oe=L[1],fe=function(){oe(!1)},B=v==null?void 0:v.find(function(se){return String(se.id)===String(s)}),V=z.useState(!0),te=uy(V,2),ae=te[0],R=te[1],ce=function(le){return"yst_legal_alert_dismissed_".concat(le||"unknown")};z.useEffect(function(){var se=window.localStorage.getItem(ce(s));R(se!=="true")},[s]);var ee=function(le){le.preventDefault(),window.localStorage.setItem(ce(s),"true"),R(!1)},xe=function(le){switch(le){case"openai":return"OpenAI";case"perplexity":return"Perplexity";case"anthropic":return"Anthropic";default:return le||"Unknown"}},J=(C==null||(n=C.analysis)===null||n===void 0||(n=n.scans)===null||n===void 0?void 0:n.map(function(se){return{value:se.aiProvider,label:xe(se.aiProvider)}}))||[{value:"",label:"Default model"}];return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[B&&y.jsx(zA,{brand:B},B.id),ae&&y.jsx(A.Alert,{children:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[y.jsx("p",{children:"Note: This content was generated by an AI model (see dropdown below) and may contain errors. Please review before acting on it."}),y.jsx("div",{className:"yst-flex yst-justify-start yst-gap-6",children:y.jsx(A.Link,{onClick:ee,variant:"default",children:"Dismiss"})})]})})]}),y.jsx(Tf,{isOpen:F,onClose:fe,onConfirm:function(){s&&W({brandId:s})},isLoading:I,title:"Delete analysis?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently delete all data associated with this analysis."}),y.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),y.jsx(A.Card,{className:Ce("yst-relative yst-overflow-visible",r),children:y.jsxs(A.Card.Content,{className:"yst-mt-0",children:[y.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-flex-wrap yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row xl:yst-items-center",children:[y.jsx("div",{className:"xl:yst-max-w-1/4",children:y.jsxs("div",{className:"yst-flex yst-flex-col xl:yst-flex-row xl:yst-items-baseline xl:yst-gap-2",children:[y.jsx(A.Title,{children:y.jsxs(y.Fragment,{children:[g||!m?y.jsx(A.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):y.jsxs(y.Fragment,{children:["Hi ",m,", "]})," "]})}),y.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),y.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end",children:[y.jsxs(A.Button,{variant:"primary",className:"yst-gap-1.5",onClick:function(){return d("/setup")},disabled:x||b,children:[y.jsx(eb,{})," Analyze a different brand"]}),y.jsx("div",{className:"yst-relative",children:y.jsxs(A.DropdownMenu,{children:[y.jsx(A.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:x||b||v&&(v==null?void 0:v.length)<1,children:y.jsx(aE,{})}),y.jsx(A.DropdownMenu.List,{className:"yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start",children:y.jsxs(A.DropdownMenu.ButtonItem,{onClick:function(){return oe(!0)},disabled:x||b,className:"yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50",children:[y.jsx(Of,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),y.jsx(Ma,{}),y.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center",children:[y.jsxs(_u,{children:[y.jsx(A.Label,{htmlFor:"brand-name",children:"Brand"}),y.jsx(A.Select,{onChange:function(se){d("/brands/".concat(se.toString()))},id:"brand-name",value:s?Number(s):"loading",options:v&&v.length>0?v.map(function(se){return{value:se.id,label:se.name}}):[{value:"loading",label:"Loading..."}],disabled:b||!v||v.length<2||!s})]}),y.jsxs(_u,{children:[y.jsx(A.Label,{htmlFor:"analysis-date",children:"Analysis date"}),y.jsx(wP,{analyses:(S==null?void 0:S.map(function(se){var le;return{id:(le=se.id)!==null&&le!==void 0?le:0,date:se.createdAt||"",createdAt:se.createdAt||""}}))||[],selectedAnalysisId:o,onAnalysisSelect:function(se){d("/brands/".concat(s,"/analysis/").concat(String(se)))},isLoading:x,disabled:x||!S||S.length<1,id:"analysis-date"})]}),y.jsxs(_u,{children:[y.jsx(A.Label,{htmlFor:"ai-tool",children:"AI model"}),y.jsx(A.Select,{onChange:function(se){c(se)},id:"ai-tool",value:a,options:k||x?[{value:a,label:"Loading..."}]:J,disabled:k||x||[{}].length<2})]})]})]})})]})},AP=function(){var t,n,r,i=Hs(),s=i.data,o=i.isLoading,a=i.isRefetching,l=s==null?void 0:s.mentions;return y.jsx(A.Card,{className:"yst-overflow-visible",children:y.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Pa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),y.jsx(Ta,{score:l==null||(t=l.mentionedInNumberOfQueries)===null||t===void 0?void 0:t.value,total:l==null||(n=l.queriesWithMentions)===null||n===void 0?void 0:n.length,suffix:"queries",isLoading:o||a})]}),!o&&l?y.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(c,u){var d=u===0,f=l.queriesWithMentions&&u===l.queriesWithMentions.length-1;return y.jsxs("li",{className:Ce("yst-flex yst-flex-row yst-items-center yst-gap-2 yst-border-l yst-border-r yst-border-slate-300 yst-p-4 yst-font-medium yst-text-slate-800",{"yst-rounded-t-lg yst-border-t":d,"yst-rounded-b-lg yst-border-b":f,"yst-border-b":!f}),children:[y.jsx("div",{className:"yst-h-4 yst-w-4",children:c!=null&&c.mentioned?y.jsx(XO,{className:"yst-text-green-500"}):y.jsx(wE,{className:"yst-text-red-500"})}),y.jsx("span",{className:"yst-justify-start",children:c.query}),y.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:c!=null&&c.mentioned?y.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):y.jsx(A.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},c.query)})}):y.jsx(A.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};/*!
|
|
51
52
|
* @kurkle/color v0.3.4
|
|
52
53
|
* https://github.com/kurkle/color#readme
|
|
53
54
|
* (c) 2024 Jukka Kurkela
|
|
54
55
|
* Released under the MIT License
|
|
55
|
-
*/function
|
|
56
|
+
*/function ja(e){return e+.5|0}const Mr=(e,t,n)=>Math.max(Math.min(e,n),t);function vo(e){return Mr(ja(e*2.55),0,255)}function Rr(e){return Mr(ja(e*255),0,255)}function Jn(e){return Mr(ja(e/2.55)/100,0,1)}function fy(e){return Mr(ja(e*100),0,100)}const Zt={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},Dd=[..."0123456789ABCDEF"],TP=e=>Dd[e&15],PP=e=>Dd[(e&240)>>4]+Dd[e&15],tl=e=>(e&240)>>4===(e&15),$P=e=>tl(e.r)&&tl(e.g)&&tl(e.b)&&tl(e.a);function MP(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Zt[e[1]]*17,g:255&Zt[e[2]]*17,b:255&Zt[e[3]]*17,a:t===5?Zt[e[4]]*17:255}:(t===7||t===9)&&(n={r:Zt[e[1]]<<4|Zt[e[2]],g:Zt[e[3]]<<4|Zt[e[4]],b:Zt[e[5]]<<4|Zt[e[6]],a:t===9?Zt[e[7]]<<4|Zt[e[8]]:255})),n}const jP=(e,t)=>e<255?t(e):"";function DP(e){var t=$P(e)?TP:PP;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jP(e.a,t):void 0}const LP=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function gb(e,t,n){const r=t*Math.min(n,1-n),i=(s,o=(s+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function IP(e,t,n){const r=(i,s=(i+e/60)%6)=>n-n*t*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function RP(e,t,n){const r=gb(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function FP(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function $f(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=(s+o)/2;let l,c,u;return s!==o&&(u=s-o,c=a>.5?u/(2-s-o):u/(s+o),l=FP(n,r,i,u,s),l=l*60+.5),[l|0,c||0,a]}function Mf(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Rr)}function jf(e,t,n){return Mf(gb,e,t,n)}function NP(e,t,n){return Mf(RP,e,t,n)}function BP(e,t,n){return Mf(IP,e,t,n)}function yb(e){return(e%360+360)%360}function qP(e){const t=LP.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?vo(+t[5]):Rr(+t[5]));const i=yb(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=NP(i,s,o):t[1]==="hsv"?r=BP(i,s,o):r=jf(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function zP(e,t){var n=$f(e);n[0]=yb(n[0]+t),n=jf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function HP(e){if(!e)return;const t=$f(e),n=t[0],r=fy(t[1]),i=fy(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Jn(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const hy={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"},gy={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 UP(){const e={},t=Object.keys(gy),n=Object.keys(hy);let r,i,s,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],i=0;i<n.length;i++)s=n[i],a=a.replace(s,hy[s]);s=parseInt(gy[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}let nl;function KP(e){nl||(nl=UP(),nl.transparent=[0,0,0,0]);const t=nl[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const WP=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function VP(e){const t=WP.exec(e);let n=255,r,i,s;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?vo(o):Mr(o*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?vo(r):Mr(r,0,255)),i=255&(t[4]?vo(i):Mr(i,0,255)),s=255&(t[6]?vo(s):Mr(s,0,255)),{r,g:i,b:s,a:n}}}function GP(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Jn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const ku=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Bi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function QP(e,t,n){const r=Bi(Jn(e.r)),i=Bi(Jn(e.g)),s=Bi(Jn(e.b));return{r:Rr(ku(r+n*(Bi(Jn(t.r))-r))),g:Rr(ku(i+n*(Bi(Jn(t.g))-i))),b:Rr(ku(s+n*(Bi(Jn(t.b))-s))),a:e.a+n*(t.a-e.a)}}function rl(e,t,n){if(e){let r=$f(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=jf(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function mb(e,t){return e&&Object.assign(t||{},e)}function yy(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Rr(e[3]))):(t=mb(e,{r:0,g:0,b:0,a:1}),t.a=Rr(t.a)),t}function YP(e){return e.charAt(0)==="r"?VP(e):qP(e)}class Xo{constructor(t){if(t instanceof Xo)return t;const n=typeof t;let r;n==="object"?r=yy(t):n==="string"&&(r=MP(t)||KP(t)||YP(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=mb(this._rgb);return t&&(t.a=Jn(t.a)),t}set rgb(t){this._rgb=yy(t)}rgbString(){return this._valid?GP(this._rgb):void 0}hexString(){return this._valid?DP(this._rgb):void 0}hslString(){return this._valid?HP(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,r.r=255&c*r.r+s*i.r+.5,r.g=255&c*r.g+s*i.g+.5,r.b=255&c*r.b+s*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=QP(this._rgb,t._rgb,n)),this}clone(){return new Xo(this.rgb)}alpha(t){return this._rgb.a=Rr(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ja(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 rl(this._rgb,2,t),this}darken(t){return rl(this._rgb,2,-t),this}saturate(t){return rl(this._rgb,1,t),this}desaturate(t){return rl(this._rgb,1,-t),this}rotate(t){return zP(this._rgb,t),this}}/*!
|
|
56
57
|
* Chart.js v4.5.0
|
|
57
58
|
* https://www.chartjs.org
|
|
58
59
|
* (c) 2025 Chart.js Contributors
|
|
59
60
|
* Released under the MIT License
|
|
60
|
-
*/function Kn(){}const BT=(()=>{let e=0;return()=>e++})();function We(e){return e==null}function et(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Me(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function On(e,t){return ht(e)?e:t}function Te(e,t){return typeof e=="undefined"?t:e}const qT=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Qe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ke(e,t,n,r){let i,s,o;if(et(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Me(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function Xl(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Jl(e){if(et(e))return e.map(Jl);if(Me(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Jl(e[n[i]]);return t}return e}function db(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function zT(e,t,n,r){if(!db(e))return;const i=t[e],s=n[e];Me(i)&&Me(s)?Yo(i,s,r):t[e]=Jl(s)}function Yo(e,t,n){const r=et(t)?t:[t],i=r.length;if(!Me(e))return e;n=n||{};const s=n.merger||zT;let o;for(let a=0;a<i;++a){if(o=r[a],!Me(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],e,o,n)}return e}function _o(e,t){return Yo(e,t,{merger:HT})}function HT(e,t,n){if(!db(e))return;const r=t[e],i=n[e];Me(r)&&Me(i)?_o(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Jl(i))}const ly={"":e=>e,x:e=>e.x,y:e=>e.y};function UT(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function KT(e){const t=UT(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Xo(e,t){return(ly[t]||(ly[t]=KT(t)))(e)}function Af(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Zl=e=>typeof e!="undefined",Nr=e=>typeof e=="function",cy=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function WT(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const at=Math.PI,Gt=2*at,VT=Gt+at,ec=Number.POSITIVE_INFINITY,GT=at/180,Vt=at/2,Yr=at/4,uy=at*2/3,fb=Math.log10,Ts=Math.sign;function ko(e,t,n){return Math.abs(e-t)<n}function dy(e){const t=Math.round(e);e=ko(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(fb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function QT(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function YT(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Jo(e){return!YT(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function XT(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function JT(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function Mr(e){return e*(at/180)}function Pf(e){return e*(180/at)}function fy(e){if(!ht(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function ZT(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*at&&(s+=Gt),{angle:s,distance:i}}function Td(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function e3(e,t){return(e-t+VT)%Gt-at}function Ut(e){return(e%Gt+Gt)%Gt}function hb(e,t,n,r){const i=Ut(e),s=Ut(t),o=Ut(n),a=Ut(s-i),l=Ut(o-i),c=Ut(i-s),u=Ut(i-o);return i===s||i===o||r&&s===o||a>l&&c<u}function sn(e,t,n){return Math.max(t,Math.min(n,e))}function t3(e){return sn(e,-32768,32767)}function Vi(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Tf(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const ai=(e,t,n,r)=>Tf(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),n3=(e,t,n)=>Tf(e,n,r=>e[r][t]>=n);function r3(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const gb=["push","pop","shift","splice","unshift"];function i3(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gb.forEach(n=>{const r="_onData"+Af(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function hy(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(gb.forEach(s=>{delete e[s]}),delete e._chartjs)}function s3(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const yb=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function mb(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,yb.call(window,()=>{r=!1,e.apply(t,n)}))}}function o3(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const $f=e=>e==="start"?"left":e==="end"?"right":"center",vt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,a3=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function l3(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:h,maxDefined:g}=o.getUserBounds();if(h){if(i=Math.min(ai(l,u,d).lo,n?r:ai(t,u,o.getPixelForValue(d)).lo),c){const m=l.slice(0,i+1).reverse().findIndex(p=>!We(p[a.axis]));i-=Math.max(0,m)}i=sn(i,0,r-1)}if(g){let m=Math.max(ai(l,o.axis,f,!0).hi+1,n?0:ai(t,u,o.getPixelForValue(f),!0).hi+1);if(c){const p=l.slice(m-1).findIndex(v=>!We(v[a.axis]));m+=Math.max(0,p)}s=sn(m,i,r)-i}else s=r-i}return{start:i,count:s}}function c3(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const rl=e=>e===0||e===1,gy=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Gt/n)),yy=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Gt/n)+1,Oo={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Vt)+1,easeOutSine:e=>Math.sin(e*Vt),easeInOutSine:e=>-.5*(Math.cos(at*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>rl(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>rl(e)?e:gy(e,.075,.3),easeOutElastic:e=>rl(e)?e:yy(e,.075,.3),easeInOutElastic(e){return rl(e)?e:e<.5?.5*gy(e*2,.1125,.45):.5+.5*yy(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Oo.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Oo.easeInBounce(e*2)*.5:Oo.easeOutBounce(e*2-1)*.5+.5};function Mf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function my(e){return Mf(e)?e:new Qo(e)}function _u(e){return Mf(e)?e:new Qo(e).saturate(.5).darken(.1).hexString()}const u3=["x","y","borderWidth","radius","tension"],d3=["color","borderColor","backgroundColor"];function f3(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:d3},numbers:{type:"number",properties:u3}}),e.describe("animations",{_fallback:"animation"}),e.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 h3(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const py=new Map;function g3(e,t){t=t||{};const n=e+JSON.stringify(t);let r=py.get(n);return r||(r=new Intl.NumberFormat(e,t),py.set(n,r)),r}function pb(e,t,n){return g3(t,n).format(e)}const y3={values(e){return et(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=m3(e,n)}const o=fb(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),pb(e,r,l)}};function m3(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var jf={formatters:y3};function p3(e){e.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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:jf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const ki=Object.create(null),$d=Object.create(null);function Eo(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function ku(e,t,n){return typeof t=="string"?Yo(Eo(e,t),n):Yo(Eo(e,""),t)}class v3{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.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=(r,i)=>_u(i.backgroundColor),this.hoverBorderColor=(r,i)=>_u(i.borderColor),this.hoverColor=(r,i)=>_u(i.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(n)}set(t,n){return ku(this,t,n)}get(t){return Eo(this,t)}describe(t,n){return ku($d,t,n)}override(t,n){return ku(ki,t,n)}route(t,n,r,i){const s=Eo(this,t),o=Eo(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return Me(l)?Object.assign({},c,l):Te(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var rt=new v3({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[f3,h3,p3]);function b3(e){return!e||We(e.size)||We(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function tc(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function x3(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!et(d))o=tc(e,i,s,o,d);else if(et(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!et(f)&&(o=tc(e,i,s,o,f));e.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return o}function Xr(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function vy(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Md(e,t,n,r){vb(e,t,n,r,null)}function vb(e,t,n,r,i){let s,o,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let p=(g||0)*GT;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(p),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:i?e.ellipse(n,r,i/2,m,0,0,Gt):e.arc(n,r,m,0,Gt),e.closePath();break;case"triangle":u=i?i/2:m,e.moveTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=uy,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=uy,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(p+Yr)*l,d=Math.cos(p+Yr)*(i?i/2-c:l),a=Math.sin(p+Yr)*l,f=Math.sin(p+Yr)*(i?i/2-c:l),e.arc(n-d,r-a,c,p-at,p-Vt),e.arc(n+f,r-o,c,p-Vt,p),e.arc(n+d,r+a,c,p,p+Vt),e.arc(n-f,r+o,c,p+Vt,p+at),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}p+=Yr;case"rectRot":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":p+=Yr;case"cross":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),p+=Yr,d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(p)*(i?i/2:m),r+Math.sin(p)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function tr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Lc(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ic(e){e.restore()}function w3(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function S3(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function C3(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),We(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function _3(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function k3(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Oi(e,t,n,r,i,s={}){const o=et(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,C3(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&k3(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),We(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,r,s.maxWidth)),e.fillText(c,n,r,s.maxWidth),_3(e,n,r,c,s),r+=Number(i.lineHeight);e.restore()}function nc(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*at,at,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,at,Vt,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,Vt,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Vt,!0),e.lineTo(n+o.topLeft,r)}const O3=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,E3=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function A3(e,t){const n=(""+e).match(O3);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const P3=e=>+e||0;function bb(e,t){const n={},r=Me(t),i=r?Object.keys(t):t,s=Me(e)?r?o=>Te(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=P3(s(o));return n}function T3(e){return bb(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Qi(e){return bb(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ct(e){const t=T3(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ut(e,t){e=e||{},t=t||rt.font;let n=Te(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Te(e.style,t.style);r&&!(""+r).match(E3)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Te(e.family,t.family),lineHeight:A3(Te(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Te(e.weight,t.weight),string:""};return i.string=b3(i),i}function il(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function $3(e,t,n){const{min:r,max:i}=e,s=qT(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function Wr(e,t){return Object.assign(Object.create(e),t)}function Df(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=Cb("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Df([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return wb(a,l,()=>N3(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return xy(a).includes(l)},ownKeys(a){return xy(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function $s(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:xb(e,r),setContext:s=>$s(e,s,n,r),override:s=>$s(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return wb(s,o,()=>j3(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function xb(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Nr(n)?n:()=>n,isIndexable:Nr(r)?r:()=>r}}const M3=(e,t)=>e?e+Af(t):t,Lf=(e,t)=>Me(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function wb(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function j3(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return Nr(a)&&o.isScriptable(t)&&(a=D3(t,a,e,n)),et(a)&&a.length&&(a=L3(t,a,e,o.isIndexable)),Lf(t,a)&&(a=$s(a,i,s&&s[t],o)),a}function D3(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),Lf(e,l)&&(l=If(i._scopes,i,e,l)),l}function L3(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&r(e))return t[s.index%t.length];if(Me(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=If(c,i,e,u);t.push($s(d,s,o&&o[e],a))}}return t}function Sb(e,t,n){return Nr(e)?e(t,n):e}const I3=(e,t)=>e===!0?t:typeof e=="string"?Xo(t,e):void 0;function R3(e,t,n,r,i){for(const s of t){const o=I3(n,s);if(o){e.add(o);const a=Sb(o._fallback,n,i);if(typeof a!="undefined"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function If(e,t,n,r){const i=t._rootScopes,s=Sb(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=by(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=by(a,o,s,l,r),l===null)?!1:Df(Array.from(a),[""],i,s,()=>F3(t,n,r))}function by(e,t,n,r,i){for(;n;)n=R3(e,t,n,r,i);return n}function F3(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return et(i)&&Me(n)?n:i||{}}function N3(e,t,n,r){let i;for(const s of t)if(i=Cb(M3(s,e),n),typeof i!="undefined")return Lf(e,i)?If(n,r,e,i):i}function Cb(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function xy(e){let t=e._keys;return t||(t=e._keys=B3(e._scopes)),t}function B3(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function q3(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],o[a]={r:i.parse(Xo(u,s),c)};return o}const z3=Number.EPSILON||1e-14,Ms=(e,t)=>t<e.length&&!e[t].skip&&e[t],_b=e=>e==="x"?"y":"x";function H3(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Td(s,i),l=Td(o,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function U3(e,t,n){const r=e.length;let i,s,o,a,l,c=Ms(e,0);for(let u=0;u<r-1;++u)if(l=c,c=Ms(e,u+1),!(!l||!c)){if(ko(t[u],0,z3)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],s=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=i*o*t[u],n[u+1]=s*o*t[u])}}function K3(e,t,n="x"){const r=_b(n),i=e.length;let s,o,a,l=Ms(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=Ms(e,c+1),!a)continue;const u=a[n],d=a[r];o&&(s=(u-o[n])/3,a[`cp1${n}`]=u-s,a[`cp1${r}`]=d-s*t[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${r}`]=d+s*t[c])}}function W3(e,t="x"){const n=_b(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,c=Ms(e,0);for(o=0;o<r;++o)if(a=l,l=c,c=Ms(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}s[o]=a?c?Ts(i[o-1])!==Ts(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}U3(e,i,s),K3(e,s,t)}function sl(e,t,n){return Math.max(Math.min(e,n),t)}function V3(e,t){let n,r,i,s,o,a=tr(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&tr(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=sl(i.cp1x,t.left,t.right),i.cp1y=sl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=sl(i.cp2x,t.left,t.right),i.cp2y=sl(i.cp2y,t.top,t.bottom)))}function G3(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")W3(e,i);else{let c=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=H3(c,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&V3(e,n)}function Rf(){return typeof window!="undefined"&&typeof document!="undefined"}function Ff(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function rc(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Rc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Q3(e,t){return Rc(e).getPropertyValue(t)}const Y3=["top","right","bottom","left"];function xi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=Y3[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const X3=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function J3(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(X3(i,s,e.target))a=i,l=s;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ni(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Rc(n),s=i.boxSizing==="border-box",o=xi(i,"padding"),a=xi(i,"border","width"),{x:l,y:c,box:u}=J3(e,n),d=o.left+(u&&a.left),f=o.top+(u&&a.top);let{width:h,height:g}=t;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/g*n.height/r)}}function Z3(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&Ff(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Rc(s),l=xi(a,"border","width"),c=xi(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=rc(a.maxWidth,s,"clientWidth"),i=rc(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||ec,maxHeight:i||ec}}const ol=e=>Math.round(e*10)/10;function e5(e,t,n,r){const i=Rc(e),s=xi(i,"margin"),o=rc(i.maxWidth,e,"clientWidth")||ec,a=rc(i.maxHeight,e,"clientHeight")||ec,l=Z3(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=xi(i,"border","width"),h=xi(i,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-s.width),u=Math.max(0,r?c/r:u-s.height),c=ol(Math.min(c,o,l.maxWidth)),u=ol(Math.min(u,a,l.maxHeight)),c&&!u&&(u=ol(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=ol(Math.floor(u*r))),{width:c,height:u}}function wy(e,t,n){const r=t||1,i=Math.floor(e.height*r),s=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const t5=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Rf()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Sy(e,t){const n=Q3(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ri(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function n5(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function r5(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=ri(e,i,n),a=ri(i,s,n),l=ri(s,t,n),c=ri(o,a,n),u=ri(a,l,n);return ri(c,u,n)}const i5=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},s5=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Yi(e,t,n){return e?i5(t,n):s5()}function kb(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Ob(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Eb(e){return e==="angle"?{between:hb,compare:e3,normalize:Ut}:{between:Vi,compare:(t,n)=>t-n,normalize:t=>t}}function Cy({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function o5(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=Eb(r),l=t.length;let{start:c,end:u,loop:d}=e,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&o(a(t[c%l][r]),i,s);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Ab(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=Eb(r),{start:u,end:d,loop:f,style:h}=o5(e,t,n),g=[];let m=!1,p=null,v,b,x;const S=()=>l(i,x,v)&&a(i,x)!==0,w=()=>a(s,v)===0||l(s,x,v),P=()=>m||S(),C=()=>!m||w();for(let O=u,_=u;O<=d;++O)b=t[O%o],!b.skip&&(v=c(b[r]),v!==x&&(m=l(v,i,s),p===null&&P()&&(p=a(v,i)===0?O:_),p!==null&&C()&&(g.push(Cy({start:p,end:O,loop:f,count:o,style:h})),p=null),_=O,x=v));return p!==null&&g.push(Cy({start:p,end:d,loop:f,count:o,style:h})),g}function Pb(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=Ab(r[i],e.points,t);s.length&&n.push(...s)}return n}function a5(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function l5(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function c5(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=a5(n,i,s,r);if(r===!0)return _y(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return _y(e,l5(n,o,l,c),n,t)}function _y(e,t,n,r){return!r||!r.setContext||!n?t:u5(e,t,n,r)}function u5(e,t,n,r){const i=e._chart.getContext(),s=ky(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let u=s,d=t[0].start,f=d;function h(g,m,p,v){const b=a?-1:1;if(g!==m){for(g+=l;n[g%l].skip;)g-=b;for(;n[m%l].skip;)m+=b;g%l!==m%l&&(c.push({start:g%l,end:m%l,loop:p,style:v}),u=v,d=m%l)}}for(const g of t){d=a?d:g.start;let m=n[d%l],p;for(f=d+1;f<=g.end;f++){const v=n[f%l];p=ky(r.setContext(Wr(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),d5(p,u)&&h(d,f-1,g.loop,u),m=v,u=p}d<f-1&&h(d,f-1,g.loop,u)}return c}function ky(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function d5(e,t){if(!t)return!1;const n=[],r=function(i,s){return Mf(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function al(e,t,n){return e.options.clip?e[n]:t[n]}function f5(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:al(n,t,"left"),right:al(n,t,"right"),top:al(r,t,"top"),bottom:al(r,t,"bottom")}:t}function Tb(e,t){const n=t._clip;if(n.disabled)return!1;const r=f5(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
61
|
+
*/function Vn(){}const XP=(()=>{let e=0;return()=>e++})();function We(e){return e==null}function et(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Me(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function An(e,t){return ht(e)?e:t}function Pe(e,t){return typeof e=="undefined"?t:e}const JP=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Qe(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ke(e,t,n,r){let i,s,o;if(et(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Me(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function Jl(e,t){let n,r,i,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],s=t[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Zl(e){if(et(e))return e.map(Zl);if(Me(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Zl(e[n[i]]);return t}return e}function pb(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function ZP(e,t,n,r){if(!pb(e))return;const i=t[e],s=n[e];Me(i)&&Me(s)?Jo(i,s,r):t[e]=Zl(s)}function Jo(e,t,n){const r=et(t)?t:[t],i=r.length;if(!Me(e))return e;n=n||{};const s=n.merger||ZP;let o;for(let a=0;a<i;++a){if(o=r[a],!Me(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)s(l[c],e,o,n)}return e}function Oo(e,t){return Jo(e,t,{merger:e3})}function e3(e,t,n){if(!pb(e))return;const r=t[e],i=n[e];Me(r)&&Me(i)?Oo(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Zl(i))}const my={"":e=>e,x:e=>e.x,y:e=>e.y};function t3(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function n3(e){const t=t3(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Zo(e,t){return(my[t]||(my[t]=n3(t)))(e)}function Df(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ec=e=>typeof e!="undefined",Br=e=>typeof e=="function",py=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function r3(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const at=Math.PI,Qt=2*at,i3=Qt+at,tc=Number.POSITIVE_INFINITY,s3=at/180,Gt=at/2,Xr=at/4,vy=at*2/3,vb=Math.log10,$s=Math.sign;function Eo(e,t,n){return Math.abs(e-t)<n}function by(e){const t=Math.round(e);e=Eo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(vb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function o3(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,s)=>i-s).pop(),t}function a3(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ea(e){return!a3(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function l3(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function c3(e,t,n){let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r][n],isNaN(s)||(t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))}function jr(e){return e*(at/180)}function Lf(e){return e*(180/at)}function xy(e){if(!ht(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function u3(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*at&&(s+=Qt),{angle:s,distance:i}}function Ld(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function d3(e,t){return(e-t+i3)%Qt-at}function Kt(e){return(e%Qt+Qt)%Qt}function bb(e,t,n,r){const i=Kt(e),s=Kt(t),o=Kt(n),a=Kt(s-i),l=Kt(o-i),c=Kt(i-s),u=Kt(i-o);return i===s||i===o||r&&s===o||a>l&&c<u}function on(e,t,n){return Math.max(t,Math.min(n,e))}function f3(e){return on(e,-32768,32767)}function Gi(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function If(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const li=(e,t,n,r)=>If(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),h3=(e,t,n)=>If(e,n,r=>e[r][t]>=n);function g3(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const xb=["push","pop","shift","splice","unshift"];function y3(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),xb.forEach(n=>{const r="_onData"+Df(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function wy(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(xb.forEach(s=>{delete e[s]}),delete e._chartjs)}function m3(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const wb=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function Sb(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,wb.call(window,()=>{r=!1,e.apply(t,n)}))}}function p3(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Rf=e=>e==="start"?"left":e==="end"?"right":"center",vt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,v3=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function b3(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:h,maxDefined:g}=o.getUserBounds();if(h){if(i=Math.min(li(l,u,d).lo,n?r:li(t,u,o.getPixelForValue(d)).lo),c){const m=l.slice(0,i+1).reverse().findIndex(p=>!We(p[a.axis]));i-=Math.max(0,m)}i=on(i,0,r-1)}if(g){let m=Math.max(li(l,o.axis,f,!0).hi+1,n?0:li(t,u,o.getPixelForValue(f),!0).hi+1);if(c){const p=l.slice(m-1).findIndex(v=>!We(v[a.axis]));m+=Math.max(0,p)}s=on(m,i,r)-i}else s=r-i}return{start:i,count:s}}function x3(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const s=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const il=e=>e===0||e===1,Sy=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Qt/n)),Cy=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Qt/n)+1,Ao={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Gt)+1,easeOutSine:e=>Math.sin(e*Gt),easeInOutSine:e=>-.5*(Math.cos(at*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>il(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>il(e)?e:Sy(e,.075,.3),easeOutElastic:e=>il(e)?e:Cy(e,.075,.3),easeInOutElastic(e){return il(e)?e:e<.5?.5*Sy(e*2,.1125,.45):.5+.5*Cy(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Ao.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Ao.easeInBounce(e*2)*.5:Ao.easeOutBounce(e*2-1)*.5+.5};function Ff(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function _y(e){return Ff(e)?e:new Xo(e)}function Ou(e){return Ff(e)?e:new Xo(e).saturate(.5).darken(.1).hexString()}const w3=["x","y","borderWidth","radius","tension"],S3=["color","borderColor","backgroundColor"];function C3(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:S3},numbers:{type:"number",properties:w3}}),e.describe("animations",{_fallback:"animation"}),e.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 _3(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ky=new Map;function k3(e,t){t=t||{};const n=e+JSON.stringify(t);let r=ky.get(n);return r||(r=new Intl.NumberFormat(e,t),ky.set(n,r)),r}function Cb(e,t,n){return k3(t,n).format(e)}const O3={values(e){return et(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,s=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=E3(e,n)}const o=vb(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Cb(e,r,l)}};function E3(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Nf={formatters:O3};function A3(e){e.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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:Nf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Oi=Object.create(null),Id=Object.create(null);function To(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function Eu(e,t,n){return typeof t=="string"?Jo(To(e,t),n):Jo(To(e,""),t)}class T3{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.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=(r,i)=>Ou(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ou(i.borderColor),this.hoverColor=(r,i)=>Ou(i.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(n)}set(t,n){return Eu(this,t,n)}get(t){return To(this,t)}describe(t,n){return Eu(Id,t,n)}override(t,n){return Eu(Oi,t,n)}route(t,n,r,i){const s=To(this,t),o=To(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[i];return Me(l)?Object.assign({},c,l):Pe(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var rt=new T3({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[C3,_3,A3]);function P3(e){return!e||We(e.size)||We(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function nc(e,t,n,r,i){let s=t[i];return s||(s=t[i]=e.measureText(i).width,n.push(i)),s>r&&(r=s),r}function $3(e,t,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},s=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const a=n.length;let l,c,u,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!et(d))o=nc(e,i,s,o,d);else if(et(d))for(c=0,u=d.length;c<u;c++)f=d[c],f!=null&&!et(f)&&(o=nc(e,i,s,o,f));e.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return o}function Jr(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function Oy(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Rd(e,t,n,r){_b(e,t,n,r,null)}function _b(e,t,n,r,i){let s,o,a,l,c,u,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let p=(g||0)*s3;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(p),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:i?e.ellipse(n,r,i/2,m,0,0,Qt):e.arc(n,r,m,0,Qt),e.closePath();break;case"triangle":u=i?i/2:m,e.moveTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=vy,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),p+=vy,e.lineTo(n+Math.sin(p)*u,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":c=m*.516,l=m-c,o=Math.cos(p+Xr)*l,d=Math.cos(p+Xr)*(i?i/2-c:l),a=Math.sin(p+Xr)*l,f=Math.sin(p+Xr)*(i?i/2-c:l),e.arc(n-d,r-a,c,p-at,p-Gt),e.arc(n+f,r-o,c,p-Gt,p),e.arc(n+d,r+a,c,p,p+Gt),e.arc(n-f,r+o,c,p+Gt,p+at),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}p+=Xr;case"rectRot":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":p+=Xr;case"cross":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),p+=Xr,d=Math.cos(p)*(i?i/2:m),o=Math.cos(p)*m,a=Math.sin(p)*m,f=Math.sin(p)*(i?i/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(p)*m,a=Math.sin(p)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(p)*(i?i/2:m),r+Math.sin(p)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function ir(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Rc(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Fc(e){e.restore()}function M3(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const s=(t.x+n.x)/2;e.lineTo(s,t.y),e.lineTo(s,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function j3(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function D3(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),We(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function L3(e,t,n,r,i){if(i.strikethrough||i.underline){const s=e.measureText(r),o=t-s.actualBoundingBoxLeft,a=t+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(a,u),e.stroke()}}function I3(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ei(e,t,n,r,i,s={}){const o=et(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,D3(e,s),l=0;l<o.length;++l)c=o[l],s.backdrop&&I3(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),We(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(c,n,r,s.maxWidth)),e.fillText(c,n,r,s.maxWidth),L3(e,n,r,c,s),r+=Number(i.lineHeight);e.restore()}function rc(e,t){const{x:n,y:r,w:i,h:s,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*at,at,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,at,Gt,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,Gt,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Gt,!0),e.lineTo(n+o.topLeft,r)}const R3=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,F3=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function N3(e,t){const n=(""+e).match(R3);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const B3=e=>+e||0;function kb(e,t){const n={},r=Me(t),i=r?Object.keys(t):t,s=Me(e)?r?o=>Pe(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=B3(s(o));return n}function q3(e){return kb(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Yi(e){return kb(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ct(e){const t=q3(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ut(e,t){e=e||{},t=t||rt.font;let n=Pe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Pe(e.style,t.style);r&&!(""+r).match(F3)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Pe(e.family,t.family),lineHeight:N3(Pe(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Pe(e.weight,t.weight),string:""};return i.string=P3(i),i}function sl(e,t,n,r){let i,s,o;for(i=0,s=e.length;i<s;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function z3(e,t,n){const{min:r,max:i}=e,s=JP(t,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function Vr(e,t){return Object.assign(Object.create(e),t)}function Bf(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=Tb("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Bf([a,...e],t,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return Eb(a,l,()=>Y3(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Ay(a).includes(l)},ownKeys(a){return Ay(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Ms(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Ob(e,r),setContext:s=>Ms(e,s,n,r),override:s=>Ms(e.override(s),t,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete e[o],!0},get(s,o,a){return Eb(s,o,()=>U3(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(s,o,a){return e[o]=a,delete s[o],!0}})}function Ob(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Br(n)?n:()=>n,isIndexable:Br(r)?r:()=>r}}const H3=(e,t)=>e?e+Df(t):t,qf=(e,t)=>Me(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Eb(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function U3(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return Br(a)&&o.isScriptable(t)&&(a=K3(t,a,e,n)),et(a)&&a.length&&(a=W3(t,a,e,o.isIndexable)),qf(t,a)&&(a=Ms(a,i,s&&s[t],o)),a}function K3(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(s,o||r);return a.delete(e),qf(e,l)&&(l=zf(i._scopes,i,e,l)),l}function W3(e,t,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index!="undefined"&&r(e))return t[s.index%t.length];if(Me(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=zf(c,i,e,u);t.push(Ms(d,s,o&&o[e],a))}}return t}function Ab(e,t,n){return Br(e)?e(t,n):e}const V3=(e,t)=>e===!0?t:typeof e=="string"?Zo(t,e):void 0;function G3(e,t,n,r,i){for(const s of t){const o=V3(n,s);if(o){e.add(o);const a=Ab(o._fallback,n,i);if(typeof a!="undefined"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function zf(e,t,n,r){const i=t._rootScopes,s=Ab(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=Ey(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=Ey(a,o,s,l,r),l===null)?!1:Bf(Array.from(a),[""],i,s,()=>Q3(t,n,r))}function Ey(e,t,n,r,i){for(;n;)n=G3(e,t,n,r,i);return n}function Q3(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return et(i)&&Me(n)?n:i||{}}function Y3(e,t,n,r){let i;for(const s of t)if(i=Tb(H3(s,e),n),typeof i!="undefined")return qf(e,i)?zf(n,r,e,i):i}function Tb(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function Ay(e){let t=e._keys;return t||(t=e._keys=X3(e._scopes)),t}function X3(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function J3(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,c,u;for(a=0,l=r;a<l;++a)c=a+n,u=t[c],o[a]={r:i.parse(Zo(u,s),c)};return o}const Z3=Number.EPSILON||1e-14,js=(e,t)=>t<e.length&&!e[t].skip&&e[t],Pb=e=>e==="x"?"y":"x";function e5(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Ld(s,i),l=Ld(o,s);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function t5(e,t,n){const r=e.length;let i,s,o,a,l,c=js(e,0);for(let u=0;u<r-1;++u)if(l=c,c=js(e,u+1),!(!l||!c)){if(Eo(t[u],0,Z3)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],s=n[u+1]/t[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[u]=i*o*t[u],n[u+1]=s*o*t[u])}}function n5(e,t,n="x"){const r=Pb(n),i=e.length;let s,o,a,l=js(e,0);for(let c=0;c<i;++c){if(o=a,a=l,l=js(e,c+1),!a)continue;const u=a[n],d=a[r];o&&(s=(u-o[n])/3,a[`cp1${n}`]=u-s,a[`cp1${r}`]=d-s*t[c]),l&&(s=(l[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${r}`]=d+s*t[c])}}function r5(e,t="x"){const n=Pb(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,c=js(e,0);for(o=0;o<r;++o)if(a=l,l=c,c=js(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[n]-l[n])/u:0}s[o]=a?c?$s(i[o-1])!==$s(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}t5(e,i,s),n5(e,s,t)}function ol(e,t,n){return Math.max(Math.min(e,n),t)}function i5(e,t){let n,r,i,s,o,a=ir(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&ir(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=ol(i.cp1x,t.left,t.right),i.cp1y=ol(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=ol(i.cp2x,t.left,t.right),i.cp2y=ol(i.cp2y,t.top,t.bottom)))}function s5(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")r5(e,i);else{let c=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=e5(c,a,e[Math.min(s+1,o-(r?0:1))%o],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&i5(e,n)}function Hf(){return typeof window!="undefined"&&typeof document!="undefined"}function Uf(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ic(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Nc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function o5(e,t){return Nc(e).getPropertyValue(t)}const a5=["top","right","bottom","left"];function wi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=a5[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const l5=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function c5(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(l5(i,s,e.target))a=i,l=s;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function ri(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Nc(n),s=i.boxSizing==="border-box",o=wi(i,"padding"),a=wi(i,"border","width"),{x:l,y:c,box:u}=c5(e,n),d=o.left+(u&&a.left),f=o.top+(u&&a.top);let{width:h,height:g}=t;return s&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((c-f)/g*n.height/r)}}function u5(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&Uf(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Nc(s),l=wi(a,"border","width"),c=wi(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=ic(a.maxWidth,s,"clientWidth"),i=ic(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||tc,maxHeight:i||tc}}const al=e=>Math.round(e*10)/10;function d5(e,t,n,r){const i=Nc(e),s=wi(i,"margin"),o=ic(i.maxWidth,e,"clientWidth")||tc,a=ic(i.maxHeight,e,"clientHeight")||tc,l=u5(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=wi(i,"border","width"),h=wi(i,"padding");c-=h.width+f.width,u-=h.height+f.height}return c=Math.max(0,c-s.width),u=Math.max(0,r?c/r:u-s.height),c=al(Math.min(c,o,l.maxWidth)),u=al(Math.min(u,a,l.maxHeight)),c&&!u&&(u=al(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=al(Math.floor(u*r))),{width:c,height:u}}function Ty(e,t,n){const r=t||1,i=Math.floor(e.height*r),s=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(e.currentDevicePixelRatio=r,o.height=i,o.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const f5=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Hf()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Py(e,t){const n=o5(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function ii(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function h5(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function g5(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=ii(e,i,n),a=ii(i,s,n),l=ii(s,t,n),c=ii(o,a,n),u=ii(a,l,n);return ii(c,u,n)}const y5=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},m5=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Xi(e,t,n){return e?y5(t,n):m5()}function $b(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Mb(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function jb(e){return e==="angle"?{between:bb,compare:d3,normalize:Kt}:{between:Gi,compare:(t,n)=>t-n,normalize:t=>t}}function $y({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function p5(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=jb(r),l=t.length;let{start:c,end:u,loop:d}=e,f,h;if(d){for(c+=l,u+=l,f=0,h=l;f<h&&o(a(t[c%l][r]),i,s);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Db(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:c}=jb(r),{start:u,end:d,loop:f,style:h}=p5(e,t,n),g=[];let m=!1,p=null,v,b,w;const S=()=>l(i,w,v)&&a(i,w)!==0,x=()=>a(s,v)===0||l(s,w,v),E=()=>m||S(),C=()=>!m||x();for(let k=u,_=u;k<=d;++k)b=t[k%o],!b.skip&&(v=c(b[r]),v!==w&&(m=l(v,i,s),p===null&&E()&&(p=a(v,i)===0?k:_),p!==null&&C()&&(g.push($y({start:p,end:k,loop:f,count:o,style:h})),p=null),_=k,w=v));return p!==null&&g.push($y({start:p,end:d,loop:f,count:o,style:h})),g}function Lb(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=Db(r[i],e.points,t);s.length&&n.push(...s)}return n}function v5(e,t,n,r){let i=0,s=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(s+=i);s>i&&e[s%t].skip;)s--;return s%=t,{start:i,end:s}}function b5(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function x5(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=v5(n,i,s,r);if(r===!0)return My(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,c=!!e._fullLoop&&o===0&&a===i-1;return My(e,b5(n,o,l,c),n,t)}function My(e,t,n,r){return!r||!r.setContext||!n?t:w5(e,t,n,r)}function w5(e,t,n,r){const i=e._chart.getContext(),s=jy(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,c=[];let u=s,d=t[0].start,f=d;function h(g,m,p,v){const b=a?-1:1;if(g!==m){for(g+=l;n[g%l].skip;)g-=b;for(;n[m%l].skip;)m+=b;g%l!==m%l&&(c.push({start:g%l,end:m%l,loop:p,style:v}),u=v,d=m%l)}}for(const g of t){d=a?d:g.start;let m=n[d%l],p;for(f=d+1;f<=g.end;f++){const v=n[f%l];p=jy(r.setContext(Vr(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),S5(p,u)&&h(d,f-1,g.loop,u),m=v,u=p}d<f-1&&h(d,f-1,g.loop,u)}return c}function jy(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function S5(e,t){if(!t)return!1;const n=[],r=function(i,s){return Ff(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function ll(e,t,n){return e.options.clip?e[n]:t[n]}function C5(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:ll(n,t,"left"),right:ll(n,t,"right"),top:ll(r,t,"top"),bottom:ll(r,t,"bottom")}:t}function Ib(e,t){const n=t._clip;if(n.disabled)return!1;const r=C5(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
61
62
|
* Chart.js v4.5.0
|
|
62
63
|
* https://www.chartjs.org
|
|
63
64
|
* (c) 2025 Chart.js Contributors
|
|
64
65
|
* Released under the MIT License
|
|
65
|
-
*/class h5{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=yb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Gn=new h5;const Oy="transparent",g5={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=my(e||Oy),i=r.valid&&my(t||Oy);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class y5{constructor(t,n,r,i){const s=n[r];i=il([t.to,i,s,t.from]);const o=il([t.from,s,i]);this._active=!0,this._fn=t.fn||g5[t.type||typeof o],this._easing=Oo[t.easing]||Oo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=il([t.to,n,i,t.from]),this._from=il([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class $b{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Me(t))return;const n=Object.keys(rt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Me(s))return;const o={};for(const a of n)o[a]=s[a];(et(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=p5(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&m5(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=s[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}s[c]=d=new y5(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Gn.add(this._chart,r),!0}}function m5(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function p5(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ey(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function v5(e,t,n){if(n===!1)return!1;const r=Ey(e,n),i=Ey(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function b5(e){let t,n,r,i;return Me(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Mb(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Ay(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,c;if(t===null)return;let u=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(u=!0,r.all)continue;break}c=e.values[l],ht(c)&&(s||t===0||Ts(t)===Ts(c))&&(t+=c)}return!u&&!r.all?0:t}function x5(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[i]:u,[s]:e[u]};return a}function Ou(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function w5(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function S5(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function C5(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Py(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Ty(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,c=o.axis,u=w5(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[c]:p}=g,v=g._stacks||(g._stacks={});f=v[c]=C5(i,u,m),f[a]=p,f._top=Py(f,o,!0,r.type),f._bottom=Py(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function Eu(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function _5(e,t){return Wr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function k5(e,t,n){return Wr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function no(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Au=e=>e==="reset"||e==="none",$y=(e,t)=>t?e:Object.assign({},e),O5=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Mb(n,!0),values:null};class Xi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=Ou(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&&no(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=Te(r.xAxisID,Eu(t,"x")),o=n.yAxisID=Te(r.yAxisID,Eu(t,"y")),a=n.rAxisID=Te(r.rAxisID,Eu(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,s,o,a),u=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&hy(this._data,this),t._stacked&&no(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Me(n)){const i=this._cachedMeta;this._data=x5(n,i)}else if(r!==n){if(r){hy(r,this);const i=this._cachedMeta;no(i),i._parsed=[]}n&&Object.isExtensible(n)&&i3(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Ou(n.vScale,n),n.stack!==r.stack&&(i=!0,no(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Ty(this,n._parsed),n._stacked=Ou(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{et(i[t])?f=this.parseArrayData(r,i,t,n):Me(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}o&&Ty(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),u=s===o,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:u||s.parse(c[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:s.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,h;for(u=0,d=i;u<d;++u)f=u+r,h=n[f],c[u]={x:s.parse(Xo(h,a),f),y:o.parse(Xo(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:Mb(i,!0),values:n._stacks[t.axis]._visualValues};return Ay(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Ay(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=O5(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=S5(a);let f,h;function g(){h=i[f];const m=h[a.axis];return!ht(h[t.axis])||u>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],ht(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=b5(Te(this.options.clip,v5(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,s,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?o.push(d):d.draw(t,s))}for(u=0;u<o.length;++u)o[u].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=k5(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=_5(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&Zl(r);if(a)return $y(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(rt.elements[t]),g=()=>this.getContext(r,i,n),m=c.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze($y(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new $b(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Au(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){Au(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Au(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&no(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ye(Xi,"defaults",{}),ye(Xi,"datasetElementType",null),ye(Xi,"dataElementType",null);class Tl extends Xi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=l3(n,i,o);this._drawStart=a,this._drawCount=l,c3(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:g,segment:m}=this.options,p=Jo(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,x=t.length;let S=n>0&&this.getParsed(n-1);for(let w=0;w<x;++w){const P=t[w],C=v?P:{};if(w<n||w>=b){C.skip=!0;continue}const O=this.getParsed(w),_=We(O[h]),k=C[f]=o.getPixelForValue(O[f],w),$=C[h]=s||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,O,l):O[h],w);C.skip=isNaN(k)||isNaN($)||_,C.stop=w>0&&Math.abs(O[f]-S[f])>p,m&&(C.parsed=O,C.raw=c.data[w]),d&&(C.options=u||this.resolveDataElementOptions(w,P.active?"active":i)),v||this.updateElement(P,w,C,i),S=O}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ye(Tl,"id","line"),ye(Tl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ye(Tl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class $l extends Xi{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return q3.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:u.x,f=o?s.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,i)}}}ye($l,"id","radar"),ye($l,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ye($l,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function Jr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Nf{constructor(t){ye(this,"options");this.options=t||{}}static override(t){Object.assign(Nf.prototype,t)}init(){}formats(){return Jr()}parse(){return Jr()}format(){return Jr()}add(){return Jr()}diff(){return Jr()}startOf(){return Jr()}endOf(){return Jr()}}var E5={_date:Nf};function A5(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const c=a._reversePixels?n3:ai;if(r){if(i._sharedOptions){const u=s[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(s,t,n-d),h=c(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(m=>!We(m[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(m=>!We(m[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:s.length-1}}function Fc(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:c,data:u}=s[a],{lo:d,hi:f}=A5(s[a],t,o,i);for(let h=d;h<=f;++h){const g=u[h];g.skip||r(g,c,h)}}}function P5(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Pu(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Fc(e,n,t,function(a,l,c){!i&&!tr(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function T5(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:d}=ZT(o,{x:t.x,y:t.y});hb(d,c,u)&&i.push({element:o,datasetIndex:a,index:l})}return Fc(e,n,t,s),i}function $5(e,t,n,r,i,s){let o=[];const a=P5(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,i);if(r&&!h)return;const g=u.getCenterPoint(i);if(!(!!s||e.isPointInArea(g))&&!h)return;const p=a(t,g);p<l?(o=[{element:u,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:u,datasetIndex:d,index:f})}return Fc(e,n,t,c),o}function Tu(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?T5(e,t,n,i):$5(e,t,n,r,i,s)}function My(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Fc(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var M5={modes:{index(e,t,n,r){const i=ni(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Pu(e,i,s,r,o):Tu(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Pu(e,i,s,r,o):Tu(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Pu(e,i,s,r,o)},nearest(e,t,n,r){const i=ni(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Tu(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=ni(t,e);return My(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=ni(t,e);return My(e,i,"y",n.intersect,r)}}};const jb=["left","top","right","bottom"];function ro(e,t){return e.filter(n=>n.pos===t)}function jy(e,t){return e.filter(n=>jb.indexOf(n.pos)===-1&&n.box.axis===t)}function io(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function j5(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function D5(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!jb.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function L5(e,t){const n=D5(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function I5(e){const t=j5(e),n=io(t.filter(c=>c.box.fullSize),!0),r=io(ro(t,"left"),!0),i=io(ro(t,"right")),s=io(ro(t,"top"),!0),o=io(ro(t,"bottom")),a=jy(t,"x"),l=jy(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:ro(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function Dy(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Db(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function R5(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Me(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[i]+=n.size}s.getPadding&&Db(o,s.getPadding());const a=Math.max(0,t.outerWidth-Dy(o,e,"left","right")),l=Math.max(0,t.outerHeight-Dy(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function F5(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function N5(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function po(e,t,n,r){const i=[];let s,o,a,l,c,u;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,N5(a.horizontal,t));const{same:d,other:f}=R5(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&po(i,t,n,r)||u}function ll(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Ly(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,c=r[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;Zl(c.start)&&(o=c.start),l.fullSize?ll(l,i.left,o,n.outerWidth-i.right-i.left,f):ll(l,t.left+c.placed,o,d,f),c.start=o,c.placed+=d,o=l.bottom}else{const d=t.h*u,f=c.size||l.width;Zl(c.start)&&(s=c.start),l.fullSize?ll(l,s,i.top,f,n.outerHeight-i.bottom-i.top):ll(l,s,t.top+c.placed,f,d),c.start=s,c.placed+=d,s=l.right}}t.x=s,t.y=o}var on={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Ct(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=I5(e.boxes),l=a.vertical,c=a.horizontal;Ke(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,p)=>p.box.options&&p.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);Db(f,Ct(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),g=L5(l.concat(c),d);po(a.fullSize,h,d,g),po(l,h,d,g),po(c,h,d,g)&&po(l,h,d,g),F5(h),Ly(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,Ly(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ke(a.chartArea,m=>{const p=m.box;Object.assign(p,e.chartArea),p.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Lb{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class B5 extends Lb{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ml="$chartjs",q5={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Iy=e=>e===null||e==="";function z5(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Ml]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Iy(i)){const s=Sy(e,"width");s!==void 0&&(e.width=s)}if(Iy(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Sy(e,"height");s!==void 0&&(e.height=s)}return e}const Ib=t5?{passive:!0}:!1;function H5(e,t,n){e&&e.addEventListener(t,n,Ib)}function U5(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Ib)}function K5(e,t){const n=q5[e.type]||e.type,{x:r,y:i}=ni(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function ic(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function W5(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||ic(a.addedNodes,r),o=o&&!ic(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function V5(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||ic(a.removedNodes,r),o=o&&!ic(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Zo=new Map;let Ry=0;function Rb(){const e=window.devicePixelRatio;e!==Ry&&(Ry=e,Zo.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function G5(e,t){Zo.size||window.addEventListener("resize",Rb),Zo.set(e,t)}function Q5(e){Zo.delete(e),Zo.size||window.removeEventListener("resize",Rb)}function Y5(e,t,n){const r=e.canvas,i=r&&Ff(r);if(!i)return;const s=mb((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(i),G5(e,s),o}function $u(e,t,n){n&&n.disconnect(),t==="resize"&&Q5(e)}function X5(e,t,n){const r=e.canvas,i=mb(s=>{e.ctx!==null&&n(K5(s,e))},e);return H5(r,t,i),i}class J5 extends Lb{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(z5(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Ml])return!1;const r=n[Ml].initial;["height","width"].forEach(s=>{const o=r[s];We(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Ml],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:W5,detach:V5,resize:Y5}[n]||X5;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:$u,detach:$u,resize:$u}[n]||U5)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return e5(t,n,r,i)}isAttached(t){const n=t&&Ff(t);return!!(n&&n.isConnected)}}function Z5(e){return!Rf()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?B5:J5}var Sl;let ji=(Sl=class{constructor(){ye(this,"x");ye(this,"y");ye(this,"active",!1);ye(this,"options");ye(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Jo(this.x)&&Jo(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},ye(Sl,"defaults",{}),ye(Sl,"defaultRoutes"),Sl);function e$(e,t){const n=e.options.ticks,r=t$(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?r$(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>i)return i$(t,c,s,o/i),c;const u=n$(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(cl(t,c,u,We(h)?0:a-h,a),d=0,f=o-1;d<f;d++)cl(t,c,u,s[d],s[d+1]);return cl(t,c,u,l,We(h)?t.length:l+h),c}return cl(t,c,u),c}function t$(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function n$(e,t,n){const r=s$(e),i=t.length/n;if(!r)return Math.max(i,1);const s=QT(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function r$(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function i$(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function cl(e,t,n,r,i){const s=Te(r,0),o=Math.min(Te(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(s+a*n))}function s$(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const o$=e=>e==="left"?"right":e==="right"?"left":e,Fy=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Ny=(e,t)=>Math.min(t||e,e);function By(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function a$(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<s-a||l>o+a)))return l}function l$(e,t){Ke(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function so(e){return e.drawTicks?e.tickLength:0}function qy(e,t){if(!e.display)return 0;const n=ut(e.font,t),r=Ct(e.padding);return(et(e.text)?e.text.length:1)*n.lineHeight+r.height}function c$(e,t){return Wr(e,{scale:t,type:"scale"})}function u$(e,t,n){return Wr(e,{tick:n,index:t,type:"tick"})}function d$(e,t,n){let r=$f(e);return(n&&t!=="right"||!n&&t==="right")&&(r=o$(r)),r}function f$(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=vt(r,s,a),Me(n)){const v=Object.keys(n)[0],b=n[v];g=u[v].getPixelForValue(b)+m-t}else n==="center"?g=(c.bottom+c.top)/2+m-t:g=Fy(e,n,t);f=a-s}else{if(Me(n)){const v=Object.keys(n)[0],b=n[v];h=u[v].getPixelForValue(b)-p+t}else n==="center"?h=(c.left+c.right)/2-p+t:h=Fy(e,n,t);g=vt(r,o,i),d=n==="left"?-Vt:Vt}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class zs extends ji{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=On(t,Number.POSITIVE_INFINITY),n=On(n,Number.NEGATIVE_INFINITY),r=On(r,Number.POSITIVE_INFINITY),i=On(i,Number.NEGATIVE_INFINITY),{min:On(t,r),max:On(n,i),minDefined:ht(t),maxDefined:ht(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:On(n,On(r,n)),max:On(r,On(n,r))}}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(){Qe(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$3(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?By(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=e$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=Qe(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Ny(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=sn(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-so(t.grid)-n.padding-qy(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),o=Pf(Math.min(Math.asin(sn((u.highest.height+6)/a,-1,1)),Math.asin(sn(l/c,-1,1))-Math.asin(sn(f/c,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=qy(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=so(s)+l):(t.height=this.maxHeight,t.width=so(s)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=Mr(this.labelRotation),m=Math.cos(g),p=Math.sin(g);if(a){const v=r.mirror?0:p*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*d.width+p*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,p,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)We(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=By(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Ny(n,r));let c=0,u=0,d,f,h,g,m,p,v,b,x,S,w;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,x=S=0,!We(g)&&!et(g))x=tc(i,v.data,v.gc,x,g),S=b;else if(et(g))for(f=0,h=g.length;f<h;++f)w=g[f],!We(w)&&!et(w)&&(x=tc(i,v.data,v.gc,x,w),S+=b);o.push(x),a.push(S),c=Math.max(x,c),u=Math.max(S,u)}l$(s,n);const P=o.indexOf(c),C=a.indexOf(u),O=_=>({width:o[_]||0,height:a[_]||0});return{first:O(0),last:O(n-1),widest:O(P),highest:O(C),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return t3(this._alignToPixels?Xr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=u$(this.getContext(),t,r))}return this.$context||(this.$context=c$(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Mr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=so(s),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,p=m/2,v=function(L){return Xr(r,L,m)};let b,x,S,w,P,C,O,_,k,$,j,Y;if(o==="top")b=v(this.bottom),C=this.bottom-f,_=b-p,$=v(t.top)+p,Y=t.bottom;else if(o==="bottom")b=v(this.top),$=t.top,Y=v(t.bottom)-p,C=b+p,_=this.top+f;else if(o==="left")b=v(this.right),P=this.right-f,O=b-p,k=v(t.left)+p,j=t.right;else if(o==="right")b=v(this.left),k=t.left,j=v(t.right)-p,P=b+p,O=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(Me(o)){const L=Object.keys(o)[0],N=o[L];b=v(this.chart.scales[L].getPixelForValue(N))}$=t.top,Y=t.bottom,C=b+p,_=C+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(Me(o)){const L=Object.keys(o)[0],N=o[L];b=v(this.chart.scales[L].getPixelForValue(N))}P=b-p,O=P-f,k=t.left,j=t.right}const R=Te(i.ticks.maxTicksLimit,d),D=Math.max(1,Math.ceil(d/R));for(x=0;x<d;x+=D){const L=this.getContext(x),N=s.setContext(L),le=a.setContext(L),fe=N.lineWidth,B=N.color,W=le.dash||[],te=le.dashOffset,oe=N.tickWidth,I=N.tickColor,ce=N.tickBorderDash||[],ee=N.tickBorderDashOffset;S=a$(this,x,l),S!==void 0&&(w=Xr(r,S,fe),c?P=O=k=j=w:C=_=$=Y=w,h.push({tx1:P,ty1:C,tx2:O,ty2:_,x1:k,y1:$,x2:j,y2:Y,width:fe,color:B,borderDash:W,borderDashOffset:te,tickWidth:oe,tickColor:I,tickBorderDash:ce,tickBorderDashOffset:ee}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,f=so(r.grid),h=f+u,g=d?-u:h,m=-Mr(this.labelRotation),p=[];let v,b,x,S,w,P,C,O,_,k,$,j,Y="middle";if(i==="top")P=this.bottom-g,C=this._getXAxisLabelAlignment();else if(i==="bottom")P=this.top+g,C=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(f);C=D.textAlign,w=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(f);C=D.textAlign,w=D.x}else if(n==="x"){if(i==="center")P=(t.top+t.bottom)/2+h;else if(Me(i)){const D=Object.keys(i)[0],L=i[D];P=this.chart.scales[D].getPixelForValue(L)+h}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(t.left+t.right)/2-h;else if(Me(i)){const D=Object.keys(i)[0],L=i[D];w=this.chart.scales[D].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?Y="top":l==="end"&&(Y="bottom"));const R=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){x=a[v],S=x.label;const D=s.setContext(this.getContext(v));O=this.getPixelForTick(v)+s.labelOffset,_=this._resolveTickFontOptions(v),k=_.lineHeight,$=et(S)?S.length:1;const L=$/2,N=D.color,le=D.textStrokeColor,fe=D.textStrokeWidth;let B=C;o?(w=O,C==="inner"&&(v===b-1?B=this.options.reverse?"left":"right":v===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||m!==0?j=-$*k+k/2:c==="center"?j=-R.highest.height/2-L*k+k:j=-R.highest.height+k/2:c==="near"||m!==0?j=k/2:c==="center"?j=R.highest.height/2-L*k:j=R.highest.height-$*k,d&&(j*=-1),m!==0&&!D.showLabelBackdrop&&(w+=k/2*Math.sin(m))):(P=O,j=(1-$)*k/2);let W;if(D.showLabelBackdrop){const te=Ct(D.backdropPadding),oe=R.heights[v],I=R.widths[v];let ce=j-te.top,ee=0-te.left;switch(Y){case"middle":ce-=oe/2;break;case"bottom":ce-=oe;break}switch(C){case"center":ee-=I/2;break;case"right":ee-=I;break;case"inner":v===b-1?ee-=I:v>0&&(ee-=I/2);break}W={left:ee,top:ce,width:I+te.width,height:oe+te.height,color:D.backdropColor}}p.push({label:S,font:_,textOffset:j,options:{rotation:m,color:N,strokeColor:le,strokeWidth:fe,textAlign:B,textBaseline:Y,translation:[w,P],backdrop:W}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Mr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Xr(t,this.left,o)-o/2,u=Xr(t,this.right,a)+a/2,d=f=l):(d=Xr(t,this.top,o)-o/2,f=Xr(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Lc(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,c=o.label,u=o.textOffset;Oi(r,c,0,u,l,a)}i&&Ic(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=ut(r.font),o=Ct(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=o.bottom,et(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=f$(this,l,n,a);Oi(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:d$(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Te(t.grid&&t.grid.z,-1),i=Te(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==zs.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ut(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ul{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;y$(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,h$(t,o,r),this.override&&rt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in rt[i]&&(delete rt[i][r],this.override&&delete ki[r])}}function h$(e,t,n){const r=Yo(Object.create(null),[n?rt.get(n):{},rt.get(t),e.defaults]);rt.set(t,r),e.defaultRoutes&&g$(t,e.defaultRoutes),e.descriptors&&rt.describe(t,e.descriptors)}function g$(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");rt.route(s,i,l,a)})}function y$(e){return"id"in e&&"defaults"in e}class m${constructor(){this.controllers=new ul(Xi,"datasets",!0),this.elements=new ul(ji,"elements"),this.plugins=new ul(Object,"plugins"),this.scales=new ul(zs,"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,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Ke(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Af(t);Qe(r["before"+i],[],r),n[t](r),Qe(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Pn=new m$;class p${constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(Qe(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){We(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Te(r.options&&r.options.plugins,{}),s=v$(r);return i===!1&&!n?[]:x$(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function v$(e){const t={},n=[],r=Object.keys(Pn.plugins.items);for(let s=0;s<r.length;s++)n.push(Pn.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function b$(e,t){return!t&&e===!1?null:e===!0?{}:e}function x$(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,c=b$(r[l],i);c!==null&&s.push({plugin:a,options:w$(e.config,{plugin:a,local:n[l]},c,o)})}return s}function w$(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function jd(e,t){const n=rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function S$(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function C$(e,t){return e===t?"_index_":"_value_"}function zy(e){if(e==="x"||e==="y"||e==="r")return e}function _$(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Dd(e,...t){if(zy(e))return e;for(const n of t){const r=n.axis||_$(n.position)||e.length>1&&zy(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Hy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function k$(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Hy(e,"x",n[0])||Hy(e,"y",n[0])}return{}}function O$(e,t){const n=ki[e.type]||{scales:{}},r=t.scales||{},i=jd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Me(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Dd(o,a,k$(o,e),rt.scales[a.type]),c=C$(l,i),u=n.scales||{};s[o]=_o(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||jd(a,t),u=(ki[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=S$(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),_o(s[h],[{axis:f},r[h],u[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];_o(a,[rt.scales[a.type],rt.scale])}),s}function Fb(e){const t=e.options||(e.options={});t.plugins=Te(t.plugins,{}),t.scales=O$(e,t)}function Nb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function E$(e){return e=e||{},e.data=Nb(e.data),Fb(e),e}const Uy=new Map,Bb=new Set;function dl(e,t){let n=Uy.get(e);return n||(n=t(),Uy.set(e,n),Bb.add(n)),n}const oo=(e,t,n)=>{const r=Xo(t,n);r!==void 0&&e.add(r)};class A${constructor(t){this._config=E$(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=Nb(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(),Fb(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return dl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return dl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return dl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>oo(l,t,d))),u.forEach(d=>oo(l,i,d)),u.forEach(d=>oo(l,ki[s]||{},d)),u.forEach(d=>oo(l,rt,d)),u.forEach(d=>oo(l,$d,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Bb.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ki[n]||{},rt.datasets[n]||{},{type:n},rt,$d]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Ky(this._resolverCache,t,i);let l=o;if(T$(o,n)){s.$shared=!1,r=Nr(r)?r():r;const c=this.createResolver(t,r,a);l=$s(o,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(t,n,r=[""],i){const{resolver:s}=Ky(this._resolverCache,t,r);return Me(n)?$s(s,n,void 0,i):s}}function Ky(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Df(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const P$=e=>Me(e)&&Object.getOwnPropertyNames(e).some(t=>Nr(e[t]));function T$(e,t){const{isScriptable:n,isIndexable:r}=xb(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(Nr(a)||P$(a))||o&&et(a))return!0}return!1}var $$="4.5.0";const M$=["top","bottom","left","right","chartArea"];function Wy(e,t){return e==="top"||e==="bottom"||M$.indexOf(e)===-1&&t==="x"}function Vy(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Gy(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[e],t)}function j$(e){const t=e.chart,n=t.options.animation;Qe(n&&n.onProgress,[e],t)}function qb(e){return Rf()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const jl={},Qy=e=>{const t=qb(e);return Object.values(jl).filter(n=>n.canvas===t).pop()};function D$(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function L$(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var vr;let Nc=(vr=class{static register(...t){Pn.add(...t),Yy()}static unregister(...t){Pn.remove(...t),Yy()}constructor(t,n){const r=this.config=new A$(n),i=qb(t),s=Qy(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Z5(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=BT(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 p$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=o3(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],jl[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Gn.listen(this,"complete",Gy),Gn.listen(this,"progress",j$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return We(t)?n&&s?s:i?r/i: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 Pn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():wy(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return vy(this.canvas,this.ctx),this}stop(){return Gn.stop(this),this}resize(t,n){Gn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,wy(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Qe(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ke(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=Dd(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ke(s,o=>{const a=o.options,l=a.id,c=Dd(l,a),u=Te(a.type,o.dtype);(a.position===void 0||Wy(a.position,c)!==Wy(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=Pn.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Ke(i,(o,a)=>{o||delete r[a]}),Ke(r,o=>{on.configure(this,o,o.options),on.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Vy("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||jd(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Pn.getController(a),{datasetElementType:c,dataElementType:u}=rt.datasets[a];Object.assign(l,{dataElementType:Pn.getElement(u),datasetElementType:c&&Pn.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ke(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Ke(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Vy("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ke(this.scales,t=>{on.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!cy(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;D$(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!cy(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;on.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ke(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Nr(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Gn.has(this)?this.attached&&!Gn.running(this)&&Gn.start(this):(this.draw(),Gy({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Tb(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Lc(n,i),t.controller.draw(),i&&Ic(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return tr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=M5.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Wr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);Zl(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Gn.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),vy(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete jl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Ke(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Ke(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ke(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Xl(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=WT(t),c=L$(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Qe(s.onHover,[t,a,this],this),l&&Qe(s.onClick,[t,a,this],this));const u=!Xl(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},ye(vr,"defaults",rt),ye(vr,"instances",jl),ye(vr,"overrides",ki),ye(vr,"registry",Pn),ye(vr,"version",$$),ye(vr,"getChart",Qy),vr);function Yy(){return Ke(Nc.instances,e=>e._plugins.invalidate())}function zb(e,t,n=t){e.lineCap=Te(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Te(n.borderDash,t.borderDash)),e.lineDashOffset=Te(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Te(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Te(n.borderWidth,t.borderWidth),e.strokeStyle=Te(n.borderColor,t.borderColor)}function I$(e,t,n){e.lineTo(n.x,n.y)}function R$(e){return e.stepped?w3:e.tension||e.cubicInterpolationMode==="monotone"?S3:I$}function Hb(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(s,a),u=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function F$(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:c}=Hb(i,n,r),u=R$(s);let{move:d=!0,reverse:f}=r||{},h,g,m;for(h=0;h<=c;++h)g=i[(a+(f?c-h:h))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,m,g,f,s.stepped),m=g);return l&&(g=i[(a+(f?c:0))%o],u(e,m,g,f,s.stepped)),!!l}function N$(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=Hb(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,g,m,p,v;const b=S=>(o+(c?a-S:S))%s,x=()=>{m!==p&&(e.lineTo(u,p),e.lineTo(u,m),e.lineTo(u,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[b(f)],h.skip)continue;const S=h.x,w=h.y,P=S|0;P===g?(w<m?m=w:w>p&&(p=w),u=(d*u+S)/++d):(x(),e.lineTo(S,w),g=P,d=0,m=p=w),v=w}x()}function Ld(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?N$:F$}function B$(e){return e.stepped?n5:e.tension||e.cubicInterpolationMode==="monotone"?r5:ri}function q$(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),zb(e,t.options),e.stroke(i)}function z$(e,t,n,r){const{segments:i,options:s}=t,o=Ld(t);for(const a of i)zb(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const H$=typeof Path2D=="function";function U$(e,t,n,r){H$&&!t.options.segment?q$(e,t,n,r):z$(e,t,n,r)}class jr extends ji{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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;G3(this._points,r,t,i,n),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=c5(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=Pb(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=B$(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:d,end:f}=o[c],h=s[d],g=s[f];if(h===g){a.push(h);continue}const m=Math.abs((i-h[n])/(g[n]-h[n])),p=l(h,g,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Ld(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Ld(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),U$(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ye(jr,"id","line"),ye(jr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ye(jr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ye(jr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Xy(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Dl extends ji{constructor(n){super();ye(this,"parsed");ye(this,"skip");ye(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Xy(this,n,"x",r)}inYRange(n,r){return Xy(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!tr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Md(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ye(Dl,"id","point"),ye(Dl,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ye(Dl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function K$(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:c}=a;c=Bc(l,c,i);const u=Id(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=Pb(t,u);for(const f of d){const h=Id(n,s[f.start],s[f.end],f.loop),g=Ab(a,i,h);for(const m of g)o.push({source:m,target:f,start:{[n]:Jy(u,h,"start",Math.max)},end:{[n]:Jy(u,h,"end",Math.min)}})}}return o}function Id(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=Ut(i),s=Ut(s)),{property:e,start:i,end:s}}function W$(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Bc(o,a,i);const l=i[o],c=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function Bc(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Jy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Ub(e,t){let n=[],r=!1;return et(e)?(r=!0,n=e):n=W$(e,t),n.length?new jr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Zy(e){return e&&e.fill!==!1}function V$(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ht(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function G$(e,t,n){const r=J$(e);if(Me(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return ht(i)&&Math.floor(i)===i?Q$(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Q$(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function Y$(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Me(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function X$(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Me(e)?r=e.value:r=t.getBaseValue(),r}function J$(e){const t=e.options,n=t.fill;let r=Te(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Z$(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=eM(t,n);a.push(Ub({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let u=c.start;u<=c.end;u++)tM(i,o[u],a)}return new jr({points:i,options:{}})}function eM(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function tM(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=nM(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function nM(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const u=s[c],d=o[u.start][n],f=o[u.end][n];if(Vi(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class Kb{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:Gt},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function rM(e){const{chart:t,fill:n,line:r}=e;if(ht(n))return iM(t,n);if(n==="stack")return Z$(e);if(n==="shape")return!0;const i=sM(e);return i instanceof Kb?i:Ub(i,r)}function iM(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function sM(e){return(e.scale||{}).getPointPositionForValue?aM(e):oM(e)}function oM(e){const{scale:t={},fill:n}=e,r=Y$(n,t);if(ht(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function aM(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=X$(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new Kb({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Mu(e,t,n){const r=rM(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,c=o.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=i.getDatasetMeta(s),m=Tb(i,g);r&&o.points.length&&(Lc(e,n),lM(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Ic(e))}function lM(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=s;s!==i&&(c==="x"?(em(e,r,o.top),ju(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),em(e,r,o.bottom)):c==="y"&&(tm(e,r,o.left),ju(e,{line:n,target:r,color:s,scale:a,property:c,clip:l}),e.restore(),e.save(),tm(e,r,o.right),u=i)),ju(e,{line:n,target:r,color:u,scale:a,property:c,clip:l}),e.restore()}function em(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Bc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function tm(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[Bc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function ju(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=K$(n,r,i);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=c,g=r!==!0;e.save(),e.fillStyle=h,cM(e,o,a,g&&Id(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,c);let p;if(g){m?e.closePath():nm(e,r,f,i);const v=!!r.pathSegment(e,u,{move:m,reverse:!0});p=m&&v,p||nm(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function cM(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,c,u,d;s==="x"?(l=o,c=i.top,u=a,d=i.bottom):(l=i.left,c=o,u=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),u=Math.min(u,n.right),c=Math.max(c,n.top),d=Math.min(d,n.bottom)),e.rect(l,c,u-l,d-c),e.clip()}}function nm(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var uM={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof jr&&(l={visible:e.isDatasetVisible(o),index:o,fill:G$(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=V$(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Mu(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;Zy(s)&&Mu(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!Zy(r)||n.drawTime!=="beforeDatasetDraw"||Mu(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const rm=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},dM=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class im extends ji{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=Qe(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ut(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=rm(r,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,m)=>{const p=r+n/2+s.measureText(g.text).width;(m===0||c[c.length-1]+p+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:p,height:i},c[c.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:x}=fM(r,n,s,p,i);v>0&&h+x+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[v]={left:g,top:h,col:m,width:b,height:x},f=Math.max(f,b),h+=x+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=Yi(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=vt(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=vt(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=vt(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=vt(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Lc(t,this),this._draw(),Ic(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=rt.color,l=Yi(t.rtl,this.left,this.width),c=ut(o.font),{padding:u}=o,d=c.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:p}=rm(o,d),v=function(P,C,O){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();const _=Te(O.lineWidth,1);if(i.fillStyle=Te(O.fillStyle,a),i.lineCap=Te(O.lineCap,"butt"),i.lineDashOffset=Te(O.lineDashOffset,0),i.lineJoin=Te(O.lineJoin,"miter"),i.lineWidth=_,i.strokeStyle=Te(O.strokeStyle,a),i.setLineDash(Te(O.lineDash,[])),o.usePointStyle){const k={radius:m*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:_},$=l.xPlus(P,g/2),j=C+f;vb(i,k,$,j,o.pointStyleWidth&&g)}else{const k=C+Math.max((d-m)/2,0),$=l.leftForLtr(P,g),j=Qi(O.borderRadius);i.beginPath(),Object.values(j).some(Y=>Y!==0)?nc(i,{x:$,y:k,w:g,h:m,radius:j}):i.rect($,k,g,m),i.fill(),_!==0&&i.stroke()}i.restore()},b=function(P,C,O){Oi(i,O.text,P,C+p/2,c,{strikethrough:O.hidden,textAlign:l.textAlign(O.textAlign)})},x=this.isHorizontal(),S=this._computeTitleHeight();x?h={x:vt(s,this.left+u,this.right-r[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:vt(s,this.top+S+u,this.bottom-n[0].height),line:0},kb(this.ctx,t.textDirection);const w=p+u;this.legendItems.forEach((P,C)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const O=i.measureText(P.text).width,_=l.textAlign(P.textAlign||(P.textAlign=o.textAlign)),k=g+f+O;let $=h.x,j=h.y;l.setWidth(this.width),x?C>0&&$+k+u>this.right&&(j=h.y+=w,h.line++,$=h.x=vt(s,this.left+u,this.right-r[h.line])):C>0&&j+w>this.bottom&&($=h.x=$+n[h.line].width+u,h.line++,j=h.y=vt(s,this.top+S+u,this.bottom-n[h.line].height));const Y=l.x($);if(v(Y,j,P),$=a3(_,$+g+f,x?$+k:this.right,t.rtl),b(l.x($),j,P),x)h.x+=k+u;else if(typeof P.text!="string"){const R=c.lineHeight;h.y+=Wb(P,R)+u}else h.y+=w}),Ob(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ut(n.font),i=Ct(n.padding);if(!n.display)return;const s=Yi(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=vt(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);u=c+vt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=vt(a,d,d+f);o.textAlign=s.textAlign($f(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Oi(o,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=ut(t.font),r=Ct(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(Vi(t,this.left,this.right)&&Vi(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Vi(t,i.left,i.left+i.width)&&Vi(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!yM(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=dM(i,r);i&&!s&&Qe(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&Qe(n.onHover,[t,r,this],this)}else r&&Qe(n.onClick,[t,r,this],this)}}function fM(e,t,n,r,i){const s=hM(r,e,t,n),o=gM(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function hM(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function gM(e,t,n){let r=e;return typeof t.text!="string"&&(r=Wb(t,n)),r}function Wb(e,t){const n=e.text?e.text.length:0;return t*n}function yM(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var mM={id:"legend",_element:im,start(e,t,n){const r=e.legend=new im({ctx:e.ctx,options:n,chart:e});on.configure(e,r,n),on.addBox(e,r)},stop(e){on.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;on.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Ct(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Vb extends ji{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=et(r.text)?r.text.length:1;this._padding=Ct(r.padding);const s=i*ut(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=vt(a,r,s),d=n+t,c=s-r):(o.position==="left"?(u=r+t,d=vt(a,i,n),l=at*-.5):(u=s-t,d=vt(a,n,i),l=at*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ut(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Oi(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:$f(n.align),textBaseline:"middle",translation:[o,a]})}}function pM(e,t){const n=new Vb({ctx:e.ctx,options:t,chart:e});on.configure(e,n,t),on.addBox(e,n),e.titleBlock=n}var vM={id:"title",_element:Vb,start(e,t,n){pM(e,n)},stop(e){const t=e.titleBlock;on.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;on.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const vo={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Td(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function An(e,t){return t&&(et(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Qn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
66
|
+
*/class _5{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=wb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),s.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=s.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Yn=new _5;const Dy="transparent",k5={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=_y(e||Dy),i=r.valid&&_y(t||Dy);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class O5{constructor(t,n,r,i){const s=n[r];i=sl([t.to,i,s,t.from]);const o=sl([t.from,s,i]);this._active=!0,this._fn=t.fn||k5[t.type||typeof o],this._easing=Ao[t.easing]||Ao.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=sl([t.to,n,i,t.from]),this._from=sl([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Rb{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Me(t))return;const n=Object.keys(rt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Me(s))return;const o={};for(const a of n)o[a]=s[a];(et(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=A5(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&E5(t.options.$animations,r).then(()=>{t.options=r},()=>{}),s}_createAnimations(t,n){const r=this._properties,i=[],s=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=s[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}s[c]=d=new O5(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Yn.add(this._chart,r),!0}}function E5(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const s=e[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function A5(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Ly(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,s=n.max===void 0?t:0;return{start:r?s:i,end:r?i:s}}function T5(e,t,n){if(n===!1)return!1;const r=Ly(e,n),i=Ly(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function P5(e){let t,n,r,i;return Me(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Fb(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Iy(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,c;if(t===null)return;let u=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(u=!0,r.all)continue;break}c=e.values[l],ht(c)&&(s||t===0||$s(t)===$s(c))&&(t+=c)}return!u&&!r.all?0:t}function $5(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],a[l]={[i]:u,[s]:e[u]};return a}function Au(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function M5(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function j5(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function D5(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Ry(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const s=e[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Fy(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,c=o.axis,u=M5(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[c]:p}=g,v=g._stacks||(g._stacks={});f=v[c]=D5(i,u,m),f[a]=p,f._top=Ry(f,o,!0,r.type),f._bottom=Ry(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function Tu(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function L5(e,t){return Vr(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function I5(e,t,n){return Vr(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function io(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Pu=e=>e==="reset"||e==="none",Ny=(e,t)=>t?e:Object.assign({},e),R5=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Fb(n,!0),values:null};class Ji{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=Au(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&&io(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,s=n.xAxisID=Pe(r.xAxisID,Tu(t,"x")),o=n.yAxisID=Pe(r.yAxisID,Tu(t,"y")),a=n.rAxisID=Pe(r.rAxisID,Tu(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,s,o,a),u=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&wy(this._data,this),t._stacked&&io(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Me(n)){const i=this._cachedMeta;this._data=$5(n,i)}else if(r!==n){if(r){wy(r,this);const i=this._cachedMeta;io(i),i._parsed=[]}n&&Object.isExtensible(n)&&y3(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Au(n.vScale,n),n.stack!==r.stack&&(i=!0,io(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Fy(this,n._parsed),n._stacked=Au(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{et(i[t])?f=this.parseArrayData(r,i,t,n):Me(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||c&&d[a]<c[a];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}o&&Fy(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,c=s.getLabels(),u=s===o,d=new Array(i);let f,h,g;for(f=0,h=i;f<h;++f)g=f+r,d[f]={[a]:u||s.parse(c[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],a[l]={x:s.parse(d[0],u),y:o.parse(d[1],u)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,h;for(u=0,d=i;u<d;++u)f=u+r,h=n[f],c[u]={x:s.parse(Zo(h,a),f),y:o.parse(Zo(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,s=this._cachedMeta,o=n[t.axis],a={keys:Fb(i,!0),values:n._stacks[t.axis]._visualValues};return Iy(a,o,s.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Iy(i,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&t===r.iScale,o=i.length,a=this._getOtherScale(t),l=R5(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=j5(a);let f,h;function g(){h=i[f];const m=h[a.axis];return!ht(h[t.axis])||u>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(c,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][t.axis],ht(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(t);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=P5(Pe(this.options.clip,T5(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,s,a,l),u=a;u<a+l;++u){const d=i[u];d.hidden||(d.active&&c?o.push(d):d.draw(t,s))}for(u=0;u<o.length;++u)o[u].draw(t,s)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];s=o.$context||(o.$context=I5(this.getContext(),t,o)),s.parsed=this.getParsed(t),s.raw=i.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=L5(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=t+"-"+n,a=s[o],l=this.enableOptionSharing&&ec(r);if(a)return Ny(a,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(rt.elements[t]),g=()=>this.getContext(r,i,n),m=c.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(Ny(m,l))),m}_resolveAnimations(t,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new Rb(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Pu(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(t,n,r,i){Pu(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Pu(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,t):s<i&&this._removeElements(s,i-s)}_insertElements(t,n,r=!0){const i=this._cachedMeta,s=i.data,o=t+n;let a;const l=c=>{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(s),a=t;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(s,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&io(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ye(Ji,"defaults",{}),ye(Ji,"datasetElementType",null),ye(Ji,"dataElementType",null);class $l extends Ji{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=b3(n,i,o);this._drawStart=a,this._drawCount=l,x3(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:g,segment:m}=this.options,p=ea(g)?g:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,w=t.length;let S=n>0&&this.getParsed(n-1);for(let x=0;x<w;++x){const E=t[x],C=v?E:{};if(x<n||x>=b){C.skip=!0;continue}const k=this.getParsed(x),_=We(k[h]),O=C[f]=o.getPixelForValue(k[f],x),P=C[h]=s||_?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[h],x);C.skip=isNaN(O)||isNaN(P)||_,C.stop=x>0&&Math.abs(k[f]-S[f])>p,m&&(C.parsed=k,C.raw=c.data[x]),d&&(C.options=u||this.resolveDataElementOptions(x,E.active?"active":i)),v||this.updateElement(E,x,C,i),S=k}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ye($l,"id","line"),ye($l,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ye($l,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ml extends Ji{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return J3.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:o};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const s=this._cachedMeta.rScale,o=i==="reset";for(let a=n;a<n+r;a++){const l=t[a],c=this.resolveDataElementOptions(a,l.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:u.x,f=o?s.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,a,h,i)}}}ye(Ml,"id","radar"),ye(Ml,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),ye(Ml,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function Zr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kf{constructor(t){ye(this,"options");this.options=t||{}}static override(t){Object.assign(Kf.prototype,t)}init(){}formats(){return Zr()}parse(){return Zr()}format(){return Zr()}add(){return Zr()}diff(){return Zr()}startOf(){return Zr()}endOf(){return Zr()}}var F5={_date:Kf};function N5(e,t,n,r){const{controller:i,data:s,_sorted:o}=e,a=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){const c=a._reversePixels?h3:li;if(r){if(i._sharedOptions){const u=s[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(s,t,n-d),h=c(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const u=c(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,u.lo+1).reverse().findIndex(m=>!We(m[d.axis]));u.lo-=Math.max(0,h);const g=f.slice(u.hi).findIndex(m=>!We(m[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:s.length-1}}function Bc(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:c,data:u}=s[a],{lo:d,hi:f}=N5(s[a],t,o,i);for(let h=d;h<=f;++h){const g=u[h];g.skip||r(g,c,h)}}}function B5(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const s=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function $u(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Bc(e,n,t,function(a,l,c){!i&&!ir(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:c})},!0),s}function q5(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],r),{angle:d}=u3(o,{x:t.x,y:t.y});bb(d,c,u)&&i.push({element:o,datasetIndex:a,index:l})}return Bc(e,n,t,s),i}function z5(e,t,n,r,i,s){let o=[];const a=B5(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,i);if(r&&!h)return;const g=u.getCenterPoint(i);if(!(!!s||e.isPointInArea(g))&&!h)return;const p=a(t,g);p<l?(o=[{element:u,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:u,datasetIndex:d,index:f})}return Bc(e,n,t,c),o}function Mu(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?q5(e,t,n,i):z5(e,t,n,r,i,s)}function By(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Bc(e,n,t,(l,c,u)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var H5={modes:{index(e,t,n,r){const i=ri(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?$u(e,i,s,r,o):Mu(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=ri(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?$u(e,i,s,r,o):Mu(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:l,index:u})}return a},point(e,t,n,r){const i=ri(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return $u(e,i,s,r,o)},nearest(e,t,n,r){const i=ri(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Mu(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=ri(t,e);return By(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=ri(t,e);return By(e,i,"y",n.intersect,r)}}};const Nb=["left","top","right","bottom"];function so(e,t){return e.filter(n=>n.pos===t)}function qy(e,t){return e.filter(n=>Nb.indexOf(n.pos)===-1&&n.box.axis===t)}function oo(e,t){return e.sort((n,r)=>{const i=t?r:n,s=t?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function U5(e){const t=[];let n,r,i,s,o,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return t}function K5(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!Nb.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return t}function W5(e,t){const n=K5(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let s,o,a;for(s=0,o=e.length;s<o;++s){a=e[s];const{fullSize:l}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=u?u*i:l&&t.availableHeight)}return n}function V5(e){const t=U5(e),n=oo(t.filter(c=>c.box.fullSize),!0),r=oo(so(t,"left"),!0),i=oo(so(t,"right")),s=oo(so(t,"top"),!0),o=oo(so(t,"bottom")),a=qy(t,"x"),l=qy(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:so(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function zy(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Bb(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function G5(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Me(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,e[i]+=n.size}s.getPadding&&Bb(o,s.getPadding());const a=Math.max(0,t.outerWidth-zy(o,e,"left","right")),l=Math.max(0,t.outerHeight-zy(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Q5(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Y5(e,t){const n=t.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(t[o],n[o])}),s}return r(e?["left","right"]:["top","bottom"])}function bo(e,t,n,r){const i=[];let s,o,a,l,c,u;for(s=0,o=e.length,c=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,Y5(a.horizontal,t));const{same:d,other:f}=G5(t,n,a,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(a)}return c&&bo(i,t,n,r)||u}function cl(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function Hy(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,c=r[a.stack]||{placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*u,f=c.size||l.height;ec(c.start)&&(o=c.start),l.fullSize?cl(l,i.left,o,n.outerWidth-i.right-i.left,f):cl(l,t.left+c.placed,o,d,f),c.start=o,c.placed+=d,o=l.bottom}else{const d=t.h*u,f=c.size||l.width;ec(c.start)&&(s=c.start),l.fullSize?cl(l,s,i.top,f,n.outerHeight-i.bottom-i.top):cl(l,s,t.top+c.placed,f,d),c.start=s,c.placed+=d,s=l.right}}t.x=s,t.y=o}var an={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Ct(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=V5(e.boxes),l=a.vertical,c=a.horizontal;Ke(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,p)=>p.box.options&&p.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);Bb(f,Ct(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),g=W5(l.concat(c),d);bo(a.fullSize,h,d,g),bo(l,h,d,g),bo(c,h,d,g)&&bo(l,h,d,g),Q5(h),Hy(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,Hy(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ke(a.chartArea,m=>{const p=m.box;Object.assign(p,e.chartArea),p.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class qb{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class X5 extends qb{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const jl="$chartjs",J5={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Uy=e=>e===null||e==="";function Z5(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[jl]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Uy(i)){const s=Py(e,"width");s!==void 0&&(e.width=s)}if(Uy(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Py(e,"height");s!==void 0&&(e.height=s)}return e}const zb=f5?{passive:!0}:!1;function e$(e,t,n){e&&e.addEventListener(t,n,zb)}function t$(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,zb)}function n$(e,t){const n=J5[e.type]||e.type,{x:r,y:i}=ri(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function sc(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function r$(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||sc(a.addedNodes,r),o=o&&!sc(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function i$(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||sc(a.removedNodes,r),o=o&&!sc(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ta=new Map;let Ky=0;function Hb(){const e=window.devicePixelRatio;e!==Ky&&(Ky=e,ta.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function s$(e,t){ta.size||window.addEventListener("resize",Hb),ta.set(e,t)}function o$(e){ta.delete(e),ta.size||window.removeEventListener("resize",Hb)}function a$(e,t,n){const r=e.canvas,i=r&&Uf(r);if(!i)return;const s=Sb((a,l)=>{const c=i.clientWidth;n(a,l),c<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(i),s$(e,s),o}function ju(e,t,n){n&&n.disconnect(),t==="resize"&&o$(e)}function l$(e,t,n){const r=e.canvas,i=Sb(s=>{e.ctx!==null&&n(n$(s,e))},e);return e$(r,t,i),i}class c$ extends qb{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Z5(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[jl])return!1;const r=n[jl].initial;["height","width"].forEach(s=>{const o=r[s];We(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[jl],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:r$,detach:i$,resize:a$}[n]||l$;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:ju,detach:ju,resize:ju}[n]||t$)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return d5(t,n,r,i)}isAttached(t){const n=t&&Uf(t);return!!(n&&n.isConnected)}}function u$(e){return!Hf()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?X5:c$}var Cl;let Di=(Cl=class{constructor(){ye(this,"x");ye(this,"y");ye(this,"active",!1);ye(this,"options");ye(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ea(this.x)&&ea(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}},ye(Cl,"defaults",{}),ye(Cl,"defaultRoutes"),Cl);function d$(e,t){const n=e.options.ticks,r=f$(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?g$(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>i)return y$(t,c,s,o/i),c;const u=h$(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(ul(t,c,u,We(h)?0:a-h,a),d=0,f=o-1;d<f;d++)ul(t,c,u,s[d],s[d+1]);return ul(t,c,u,l,We(h)?t.length:l+h),c}return ul(t,c,u),c}function f$(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function h$(e,t,n){const r=m$(e),i=t.length/n;if(!r)return Math.max(i,1);const s=o3(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function g$(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function y$(e,t,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===s&&(t.push(e[o]),i++,s=n[i*r])}function ul(e,t,n,r,i){const s=Pe(r,0),o=Math.min(Pe(i,e.length),e.length);let a=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<o;c++)c===u&&(t.push(e[c]),a++,u=Math.round(s+a*n))}function m$(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const p$=e=>e==="left"?"right":e==="right"?"left":e,Wy=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Vy=(e,t)=>Math.min(t||e,e);function Gy(e,t){const n=[],r=e.length/t,i=e.length;let s=0;for(;s<i;s+=r)n.push(e[Math.floor(s)]);return n}function v$(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),s=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-s,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<s-a||l>o+a)))return l}function b$(e,t){Ke(e,n=>{const r=n.gc,i=r.length/2;let s;if(i>t){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function ao(e){return e.drawTicks?e.tickLength:0}function Qy(e,t){if(!e.display)return 0;const n=ut(e.font,t),r=Ct(e.padding);return(et(e.text)?e.text.length:1)*n.lineHeight+r.height}function x$(e,t){return Vr(e,{scale:t,type:"scale"})}function w$(e,t,n){return Vr(e,{tick:n,index:t,type:"tick"})}function S$(e,t,n){let r=Rf(e);return(n&&t!=="right"||!n&&t==="right")&&(r=p$(r)),r}function C$(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,g;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=vt(r,s,a),Me(n)){const v=Object.keys(n)[0],b=n[v];g=u[v].getPixelForValue(b)+m-t}else n==="center"?g=(c.bottom+c.top)/2+m-t:g=Wy(e,n,t);f=a-s}else{if(Me(n)){const v=Object.keys(n)[0],b=n[v];h=u[v].getPixelForValue(b)-p+t}else n==="center"?h=(c.left+c.right)/2-p+t:h=Wy(e,n,t);g=vt(r,o,i),d=n==="left"?-Gt:Gt}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class Us extends Di{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=An(t,Number.POSITIVE_INFINITY),n=An(n,Number.NEGATIVE_INFINITY),r=An(r,Number.POSITIVE_INFINITY),i=An(i,Number.NEGATIVE_INFINITY),{min:An(t,r),max:An(n,i),minDefined:ht(t),maxDefined:ht(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)o=a[l].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:An(n,An(r,n)),max:An(r,An(n,r))}}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(){Qe(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=z3(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Gy(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=d$(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qe(this.options.afterUpdate,[this])}beforeSetDimensions(){Qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r],s.label=Qe(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){Qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Vy(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,c;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=on(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-ao(t.grid)-n.padding-Qy(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),o=Lf(Math.min(Math.asin(on((u.highest.height+6)/a,-1,1)),Math.asin(on(l/c,-1,1))-Math.asin(on(f/c,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Qy(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=ao(s)+l):(t.height=this.maxHeight,t.width=ao(s)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=jr(this.labelRotation),m=Math.cos(g),p=Math.sin(g);if(a){const v=r.mirror?0:p*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:m*d.width+p*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,p,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=t.width:s!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_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(){Qe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)We(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Gy(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/Vy(n,r));let c=0,u=0,d,f,h,g,m,p,v,b,w,S,x;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,w=S=0,!We(g)&&!et(g))w=nc(i,v.data,v.gc,w,g),S=b;else if(et(g))for(f=0,h=g.length;f<h;++f)x=g[f],!We(x)&&!et(x)&&(w=nc(i,v.data,v.gc,w,x),S+=b);o.push(w),a.push(S),c=Math.max(w,c),u=Math.max(S,u)}b$(s,n);const E=o.indexOf(c),C=a.indexOf(u),k=_=>({width:o[_]||0,height:a[_]||0});return{first:k(0),last:k(n-1),widest:k(E),highest:k(C),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return f3(this._alignToPixels?Jr(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=w$(this.getContext(),t,r))}return this.$context||(this.$context=x$(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=jr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=ao(s),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,p=m/2,v=function(L){return Jr(r,L,m)};let b,w,S,x,E,C,k,_,O,P,j,W;if(o==="top")b=v(this.bottom),C=this.bottom-f,_=b-p,P=v(t.top)+p,W=t.bottom;else if(o==="bottom")b=v(this.top),P=t.top,W=v(t.bottom)-p,C=b+p,_=this.top+f;else if(o==="left")b=v(this.right),E=this.right-f,k=b-p,O=v(t.left)+p,j=t.right;else if(o==="right")b=v(this.left),O=t.left,j=v(t.right)-p,E=b+p,k=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(Me(o)){const L=Object.keys(o)[0],F=o[L];b=v(this.chart.scales[L].getPixelForValue(F))}P=t.top,W=t.bottom,C=b+p,_=C+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(Me(o)){const L=Object.keys(o)[0],F=o[L];b=v(this.chart.scales[L].getPixelForValue(F))}E=b-p,k=E-f,O=t.left,j=t.right}const I=Pe(i.ticks.maxTicksLimit,d),D=Math.max(1,Math.ceil(d/I));for(w=0;w<d;w+=D){const L=this.getContext(w),F=s.setContext(L),oe=a.setContext(L),fe=F.lineWidth,B=F.color,V=oe.dash||[],te=oe.dashOffset,ae=F.tickWidth,R=F.tickColor,ce=F.tickBorderDash||[],ee=F.tickBorderDashOffset;S=v$(this,w,l),S!==void 0&&(x=Jr(r,S,fe),c?E=k=O=j=x:C=_=P=W=x,h.push({tx1:E,ty1:C,tx2:k,ty2:_,x1:O,y1:P,x2:j,y2:W,width:fe,color:B,borderDash:V,borderDashOffset:te,tickWidth:ae,tickColor:R,tickBorderDash:ce,tickBorderDashOffset:ee}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=s,f=ao(r.grid),h=f+u,g=d?-u:h,m=-jr(this.labelRotation),p=[];let v,b,w,S,x,E,C,k,_,O,P,j,W="middle";if(i==="top")E=this.bottom-g,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+g,C=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(f);C=D.textAlign,x=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(f);C=D.textAlign,x=D.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+h;else if(Me(i)){const D=Object.keys(i)[0],L=i[D];E=this.chart.scales[D].getPixelForValue(L)+h}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(Me(i)){const D=Object.keys(i)[0],L=i[D];x=this.chart.scales[D].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const I=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){w=a[v],S=w.label;const D=s.setContext(this.getContext(v));k=this.getPixelForTick(v)+s.labelOffset,_=this._resolveTickFontOptions(v),O=_.lineHeight,P=et(S)?S.length:1;const L=P/2,F=D.color,oe=D.textStrokeColor,fe=D.textStrokeWidth;let B=C;o?(x=k,C==="inner"&&(v===b-1?B=this.options.reverse?"left":"right":v===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||m!==0?j=-P*O+O/2:c==="center"?j=-I.highest.height/2-L*O+O:j=-I.highest.height+O/2:c==="near"||m!==0?j=O/2:c==="center"?j=I.highest.height/2-L*O:j=I.highest.height-P*O,d&&(j*=-1),m!==0&&!D.showLabelBackdrop&&(x+=O/2*Math.sin(m))):(E=k,j=(1-P)*O/2);let V;if(D.showLabelBackdrop){const te=Ct(D.backdropPadding),ae=I.heights[v],R=I.widths[v];let ce=j-te.top,ee=0-te.left;switch(W){case"middle":ce-=ae/2;break;case"bottom":ce-=ae;break}switch(C){case"center":ee-=R/2;break;case"right":ee-=R;break;case"inner":v===b-1?ee-=R:v>0&&(ee-=R/2);break}V={left:ee,top:ce,width:R+te.width,height:ae+te.height,color:D.backdropColor}}p.push({label:S,font:_,textOffset:j,options:{rotation:m,color:F,strokeColor:oe,strokeWidth:fe,textAlign:B,textBaseline:W,translation:[x,E],backdrop:V}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-jr(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width;let c,u;return n==="left"?i?(u=this.right+s,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,s,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const a=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=Jr(t,this.left,o)-o/2,u=Jr(t,this.right,a)+a/2,d=f=l):(d=Jr(t,this.top,o)-o/2,f=Jr(t,this.bottom,a)+a/2,c=u=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Rc(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,c=o.label,u=o.textOffset;Ei(r,c,0,u,l,a)}i&&Fc(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=ut(r.font),o=Ct(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Me(n)?(l+=o.bottom,et(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=C$(this,l,n,a);Ei(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:S$(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Pe(t.grid&&t.grid.z,-1),i=Pe(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Us.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ut(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class dl{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;O$(n)&&(r=this.register(n));const i=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in i||(i[s]=t,_$(t,o,r),this.override&&rt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in rt[i]&&(delete rt[i][r],this.override&&delete Oi[r])}}function _$(e,t,n){const r=Jo(Object.create(null),[n?rt.get(n):{},rt.get(t),e.defaults]);rt.set(t,r),e.defaultRoutes&&k$(t,e.defaultRoutes),e.descriptors&&rt.describe(t,e.descriptors)}function k$(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),s=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");rt.route(s,i,l,a)})}function O$(e){return"id"in e&&"defaults"in e}class E${constructor(){this.controllers=new dl(Ji,"datasets",!0),this.elements=new dl(Di,"elements"),this.plugins=new dl(Object,"plugins"),this.scales=new dl(Us,"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,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(t,s,i):Ke(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Df(t);Qe(r["before"+i],[],r),n[t](r),Qe(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var $n=new E$;class A${constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const s=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(s,t,n,r);return n==="afterDestroy"&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,i){i=i||{};for(const s of t){const o=s.plugin,a=o[r],l=[n,i,s.options];if(Qe(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){We(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Pe(r.options&&r.options.plugins,{}),s=T$(r);return i===!1&&!n?[]:$$(t,s,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function T$(e){const t={},n=[],r=Object.keys($n.plugins.items);for(let s=0;s<r.length;s++)n.push($n.getPlugin(r[s]));const i=e.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function P$(e,t){return!t&&e===!1?null:e===!0?{}:e}function $$(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,c=P$(r[l],i);c!==null&&s.push({plugin:a,options:M$(e.config,{plugin:a,local:n[l]},c,o)})}return s}function M$(e,{plugin:t,local:n},r,i){const s=e.pluginScopeKeys(t),o=e.getOptionScopes(r,s);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Fd(e,t){const n=rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function j$(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function D$(e,t){return e===t?"_index_":"_value_"}function Yy(e){if(e==="x"||e==="y"||e==="r")return e}function L$(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Nd(e,...t){if(Yy(e))return e;for(const n of t){const r=n.axis||L$(n.position)||e.length>1&&Yy(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Xy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function I$(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Xy(e,"x",n[0])||Xy(e,"y",n[0])}return{}}function R$(e,t){const n=Oi[e.type]||{scales:{}},r=t.scales||{},i=Fd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Me(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Nd(o,a,I$(o,e),rt.scales[a.type]),c=D$(l,i),u=n.scales||{};s[o]=Oo(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Fd(a,t),u=(Oi[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=j$(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Oo(s[h],[{axis:f},r[h],u[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];Oo(a,[rt.scales[a.type],rt.scale])}),s}function Ub(e){const t=e.options||(e.options={});t.plugins=Pe(t.plugins,{}),t.scales=R$(e,t)}function Kb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function F$(e){return e=e||{},e.data=Kb(e.data),Ub(e),e}const Jy=new Map,Wb=new Set;function fl(e,t){let n=Jy.get(e);return n||(n=t(),Jy.set(e,n),Wb.add(n)),n}const lo=(e,t,n)=>{const r=Zo(t,n);r!==void 0&&e.add(r)};class N${constructor(t){this._config=F$(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=Kb(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(),Ub(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return fl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return fl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return fl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return fl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:s}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>lo(l,t,d))),u.forEach(d=>lo(l,i,d)),u.forEach(d=>lo(l,Oi[s]||{},d)),u.forEach(d=>lo(l,rt,d)),u.forEach(d=>lo(l,Id,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Wb.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Oi[n]||{},rt.datasets[n]||{},{type:n},rt,Id]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=Zy(this._resolverCache,t,i);let l=o;if(q$(o,n)){s.$shared=!1,r=Br(r)?r():r;const c=this.createResolver(t,r,a);l=Ms(o,r,c)}for(const c of n)s[c]=l[c];return s}createResolver(t,n,r=[""],i){const{resolver:s}=Zy(this._resolverCache,t,r);return Me(n)?Ms(s,n,void 0,i):s}}function Zy(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let s=r.get(i);return s||(s={resolver:Bf(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const B$=e=>Me(e)&&Object.getOwnPropertyNames(e).some(t=>Br(e[t]));function q$(e,t){const{isScriptable:n,isIndexable:r}=Ob(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(Br(a)||B$(a))||o&&et(a))return!0}return!1}var z$="4.5.0";const H$=["top","bottom","left","right","chartArea"];function em(e,t){return e==="top"||e==="bottom"||H$.indexOf(e)===-1&&t==="x"}function tm(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function nm(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Qe(n&&n.onComplete,[e],t)}function U$(e){const t=e.chart,n=t.options.animation;Qe(n&&n.onProgress,[e],t)}function Vb(e){return Hf()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Dl={},rm=e=>{const t=Vb(e);return Object.values(Dl).filter(n=>n.canvas===t).pop()};function K$(e,t,n){const r=Object.keys(e);for(const i of r){const s=+i;if(s>=t){const o=e[i];delete e[i],(n>0||s>t)&&(e[s+n]=o)}}}function W$(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var xr;let qc=(xr=class{static register(...t){$n.add(...t),im()}static unregister(...t){$n.remove(...t),im()}constructor(t,n){const r=this.config=new N$(n),i=Vb(t),s=rm(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||u$(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=XP(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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=p3(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Dl[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Yn.listen(this,"complete",nm),Yn.listen(this,"progress",U$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return We(t)?n&&s?s:i?r/i: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 $n}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ty(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Oy(this.canvas,this.ctx),this}stop(){return Yn.stop(this),this}resize(t,n){Yn.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Ty(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Qe(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ke(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=Nd(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ke(s,o=>{const a=o.options,l=a.id,c=Nd(l,a),u=Pe(a.type,o.dtype);(a.position===void 0||em(a.position,c)!==em(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=$n.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Ke(i,(o,a)=>{o||delete r[a]}),Ke(r,o=>{an.configure(this,o,o.options),an.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(tm("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||Fd(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=$n.getController(a),{datasetElementType:c,dataElementType:u}=rt.datasets[a];Object.assign(l,{dataElementType:$n.getElement(u),datasetElementType:c&&$n.getElement(c)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ke(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||Ke(s,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(tm("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ke(this.scales,t=>{an.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!py(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;K$(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(t.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!py(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;an.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ke(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Br(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Yn.has(this)?this.attached&&!Yn.running(this)&&Yn.start(this):(this.draw(),nm({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Ib(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Rc(n,i),t.controller.draw(),i&&Fc(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ir(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=H5.modes[n];return typeof s=="function"?s(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Vr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,i);ec(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Yn.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Oy(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Dl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),t[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};Ke(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},s=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Ke(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ke(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Jl(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,s=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=s(n,t),a=r?t:s(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(t,i,r,o),l=r3(t),c=W$(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Qe(s.onHover,[t,a,this],this),l&&Qe(s.onClick,[t,a,this],this));const u=!Jl(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,i)}},ye(xr,"defaults",rt),ye(xr,"instances",Dl),ye(xr,"overrides",Oi),ye(xr,"registry",$n),ye(xr,"version",z$),ye(xr,"getChart",rm),xr);function im(){return Ke(qc.instances,e=>e._plugins.invalidate())}function Gb(e,t,n=t){e.lineCap=Pe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Pe(n.borderDash,t.borderDash)),e.lineDashOffset=Pe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Pe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Pe(n.borderWidth,t.borderWidth),e.strokeStyle=Pe(n.borderColor,t.borderColor)}function V$(e,t,n){e.lineTo(n.x,n.y)}function G$(e){return e.stepped?M3:e.tension||e.cubicInterpolationMode==="monotone"?j3:V$}function Qb(e,t,n={}){const r=e.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=t,l=Math.max(i,o),c=Math.min(s,a),u=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Q$(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:c}=Qb(i,n,r),u=G$(s);let{move:d=!0,reverse:f}=r||{},h,g,m;for(h=0;h<=c;++h)g=i[(a+(f?c-h:h))%o],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,m,g,f,s.stepped),m=g);return l&&(g=i[(a+(f?c:0))%o],u(e,m,g,f,s.stepped)),!!l}function Y$(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=Qb(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,g,m,p,v;const b=S=>(o+(c?a-S:S))%s,w=()=>{m!==p&&(e.lineTo(u,p),e.lineTo(u,m),e.lineTo(u,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[b(f)],h.skip)continue;const S=h.x,x=h.y,E=S|0;E===g?(x<m?m=x:x>p&&(p=x),u=(d*u+S)/++d):(w(),e.lineTo(S,x),g=E,d=0,m=p=x),v=x}w()}function Bd(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Y$:Q$}function X$(e){return e.stepped?h5:e.tension||e.cubicInterpolationMode==="monotone"?g5:ii}function J$(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Gb(e,t.options),e.stroke(i)}function Z$(e,t,n,r){const{segments:i,options:s}=t,o=Bd(t);for(const a of i)Gb(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const eM=typeof Path2D=="function";function tM(e,t,n,r){eM&&!t.options.segment?J$(e,t,n,r):Z$(e,t,n,r)}class Dr extends Di{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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;s5(this._points,r,t,i,n),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=x5(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],s=this.points,o=Lb(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=X$(r);let c,u;for(c=0,u=o.length;c<u;++c){const{start:d,end:f}=o[c],h=s[d],g=s[f];if(h===g){a.push(h);continue}const m=Math.abs((i-h[n])/(g[n]-h[n])),p=l(h,g,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Bd(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Bd(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(t,this,a,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),tM(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ye(Dr,"id","line"),ye(Dr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ye(Dr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ye(Dr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function sm(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Ll extends Di{constructor(n){super();ye(this,"parsed");ye(this,"skip");ye(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return sm(this,n,"x",r)}inYRange(n,r){return sm(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!ir(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Rd(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ye(Ll,"id","point"),ye(Ll,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ye(Ll,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function nM(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:c}=a;c=zc(l,c,i);const u=qd(n,i[l],i[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=Lb(t,u);for(const f of d){const h=qd(n,s[f.start],s[f.end],f.loop),g=Db(a,i,h);for(const m of g)o.push({source:m,target:f,start:{[n]:om(u,h,"start",Math.max)},end:{[n]:om(u,h,"end",Math.min)}})}}return o}function qd(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=Kt(i),s=Kt(s)),{property:e,start:i,end:s}}function rM(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=zc(o,a,i);const l=i[o],c=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:c.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:c.y}))}),s}function zc(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function om(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Yb(e,t){let n=[],r=!1;return et(e)?(r=!0,n=e):n=rM(e,t),n.length?new Dr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function am(e){return e&&e.fill!==!1}function iM(e,t,n){let i=e[t].fill;const s=[t];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!ht(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function sM(e,t,n){const r=cM(e);if(Me(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return ht(i)&&Math.floor(i)===i?oM(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function oM(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function aM(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Me(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function lM(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Me(e)?r=e.value:r=t.getBaseValue(),r}function cM(e){const t=e.options,n=t.fill;let r=Pe(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function uM(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=dM(t,n);a.push(Yb({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const c=s[l];for(let u=c.start;u<=c.end;u++)fM(i,o[u],a)}return new Dr({points:i,options:{}})}function dM(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===t)break;s.hidden||n.unshift(s.dataset)}return n}function fM(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=hM(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function hM(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],s=e.segments,o=e.points;let a=!1,l=!1;for(let c=0;c<s.length;c++){const u=s[c],d=o[u.start][n],f=o[u.end][n];if(Gi(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class Xb{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:Qt},t.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,s=t.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function gM(e){const{chart:t,fill:n,line:r}=e;if(ht(n))return yM(t,n);if(n==="stack")return uM(e);if(n==="shape")return!0;const i=mM(e);return i instanceof Xb?i:Yb(i,r)}function yM(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function mM(e){return(e.scale||{}).getPointPositionForValue?vM(e):pM(e)}function pM(e){const{scale:t={},fill:n}=e,r=aM(n,t);if(ht(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function vM(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=lM(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new Xb({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(t.getPointPositionForValue(l,o));return a}function Du(e,t,n){const r=gM(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,c=o.options,u=c.fill,d=c.backgroundColor,{above:f=d,below:h=d}=u||{},g=i.getDatasetMeta(s),m=Ib(i,g);r&&o.points.length&&(Rc(e,n),bM(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Fc(e))}function bM(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,c=n._loop?"angle":t.axis;e.save();let u=s;s!==i&&(c==="x"?(lm(e,r,o.top),Lu(e,{line:n,target:r,color:i,scale:a,property:c,clip:l}),e.restore(),e.save(),lm(e,r,o.bottom)):c==="y"&&(cm(e,r,o.left),Lu(e,{line:n,target:r,color:s,scale:a,property:c,clip:l}),e.restore(),e.save(),cm(e,r,o.right),u=i)),Lu(e,{line:n,target:r,color:u,scale:a,property:c,clip:l}),e.restore()}function lm(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[zc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function cm(e,t,n){const{segments:r,points:i}=t;let s=!0,o=!1;e.beginPath();for(const a of r){const{start:l,end:c}=a,u=i[l],d=i[zc(l,c,i)];s?(e.moveTo(u.x,u.y),s=!1):(e.lineTo(n,u.y),e.lineTo(u.x,u.y)),o=!!t.pathSegment(e,a,{move:o}),o?e.closePath():e.lineTo(n,d.y)}e.lineTo(n,t.first().y),e.closePath(),e.clip()}function Lu(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=nM(n,r,i);for(const{source:c,target:u,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=c,g=r!==!0;e.save(),e.fillStyle=h,xM(e,o,a,g&&qd(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,c);let p;if(g){m?e.closePath():um(e,r,f,i);const v=!!r.pathSegment(e,u,{move:m,reverse:!0});p=m&&v,p||um(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function xM(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,c,u,d;s==="x"?(l=o,c=i.top,u=a,d=i.bottom):(l=i.left,c=o,u=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),u=Math.min(u,n.right),c=Math.max(c,n.top),d=Math.min(d,n.bottom)),e.rect(l,c,u-l,d-c),e.clip()}}function um(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var wM={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=e.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Dr&&(l={visible:e.isDatasetVisible(o),index:o,fill:sM(a,o,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=iM(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Du(e.ctx,a,s))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;am(s)&&Du(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!am(r)||n.drawTime!=="beforeDatasetDraw"||Du(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const dm=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},SM=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class fm extends Di{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=Qe(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ut(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=dm(r,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((g,m)=>{const p=r+n/2+s.measureText(g.text).width;(m===0||c[c.length-1]+p+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:p,height:i},c[c.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:w}=CM(r,n,s,p,i);v>0&&h+w+2*a>u&&(d+=f+a,c.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[v]={left:g,top:h,col:m,width:b,height:w},f=Math.max(f,b),h+=w+a}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=Xi(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=vt(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=vt(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let a=0,l=vt(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=vt(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Rc(t,this),this._draw(),Fc(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=rt.color,l=Xi(t.rtl,this.left,this.width),c=ut(o.font),{padding:u}=o,d=c.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:p}=dm(o,d),v=function(E,C,k){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;i.save();const _=Pe(k.lineWidth,1);if(i.fillStyle=Pe(k.fillStyle,a),i.lineCap=Pe(k.lineCap,"butt"),i.lineDashOffset=Pe(k.lineDashOffset,0),i.lineJoin=Pe(k.lineJoin,"miter"),i.lineWidth=_,i.strokeStyle=Pe(k.strokeStyle,a),i.setLineDash(Pe(k.lineDash,[])),o.usePointStyle){const O={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:_},P=l.xPlus(E,g/2),j=C+f;_b(i,O,P,j,o.pointStyleWidth&&g)}else{const O=C+Math.max((d-m)/2,0),P=l.leftForLtr(E,g),j=Yi(k.borderRadius);i.beginPath(),Object.values(j).some(W=>W!==0)?rc(i,{x:P,y:O,w:g,h:m,radius:j}):i.rect(P,O,g,m),i.fill(),_!==0&&i.stroke()}i.restore()},b=function(E,C,k){Ei(i,k.text,E,C+p/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},w=this.isHorizontal(),S=this._computeTitleHeight();w?h={x:vt(s,this.left+u,this.right-r[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:vt(s,this.top+S+u,this.bottom-n[0].height),line:0},$b(this.ctx,t.textDirection);const x=p+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const k=i.measureText(E.text).width,_=l.textAlign(E.textAlign||(E.textAlign=o.textAlign)),O=g+f+k;let P=h.x,j=h.y;l.setWidth(this.width),w?C>0&&P+O+u>this.right&&(j=h.y+=x,h.line++,P=h.x=vt(s,this.left+u,this.right-r[h.line])):C>0&&j+x>this.bottom&&(P=h.x=P+n[h.line].width+u,h.line++,j=h.y=vt(s,this.top+S+u,this.bottom-n[h.line].height));const W=l.x(P);if(v(W,j,E),P=v3(_,P+g+f,w?P+O:this.right,t.rtl),b(l.x(P),j,E),w)h.x+=O+u;else if(typeof E.text!="string"){const I=c.lineHeight;h.y+=Jb(E,I)+u}else h.y+=x}),Mb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ut(n.font),i=Ct(n.padding);if(!n.display)return;const s=Xi(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=vt(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);u=c+vt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=vt(a,d,d+f);o.textAlign=s.textAlign(Rf(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Ei(o,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=ut(t.font),r=Ct(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(Gi(t,this.left,this.right)&&Gi(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Gi(t,i.left,i.left+i.width)&&Gi(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!OM(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=SM(i,r);i&&!s&&Qe(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&Qe(n.onHover,[t,r,this],this)}else r&&Qe(n.onClick,[t,r,this],this)}}function CM(e,t,n,r,i){const s=_M(r,e,t,n),o=kM(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function _M(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),t+n.size/2+r.measureText(i).width}function kM(e,t,n){let r=e;return typeof t.text!="string"&&(r=Jb(t,n)),r}function Jb(e,t){const n=e.text?e.text.length:0;return t*n}function OM(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var EM={id:"legend",_element:fm,start(e,t,n){const r=e.legend=new fm({ctx:e.ctx,options:n,chart:e});an.configure(e,r,n),an.addBox(e,r)},stop(e){an.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;an.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Ct(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Zb extends Di{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=et(r.text)?r.text.length:1;this._padding=Ct(r.padding);const s=i*ut(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:s,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=vt(a,r,s),d=n+t,c=s-r):(o.position==="left"?(u=r+t,d=vt(a,i,n),l=at*-.5):(u=s-t,d=vt(a,n,i),l=at*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ut(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);Ei(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Rf(n.align),textBaseline:"middle",translation:[o,a]})}}function AM(e,t){const n=new Zb({ctx:e.ctx,options:t,chart:e});an.configure(e,n,t),an.addBox(e,n),e.titleBlock=n}var TM={id:"title",_element:Zb,start(e,t,n){AM(e,n)},stop(e){const t=e.titleBlock;an.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;an.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const xo={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,s=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=e.length;s<o;++s){const l=e[s].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ld(t,c);u<i&&(i=u,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Pn(e,t){return t&&(et(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Xn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
66
67
|
`)>-1?e.split(`
|
|
67
|
-
`):e}function bM(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function sm(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=ut(t.bodyFont),c=ut(t.titleFont),u=ut(t.footerFont),d=s.length,f=i.length,h=r.length,g=Ct(t.padding);let m=g.height,p=0,v=r.reduce((S,w)=>S+w.before.length+w.lines.length+w.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const S=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*S+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let b=0;const x=function(S){p=Math.max(p,n.measureText(S).width+b)};return n.save(),n.font=c.string,Ke(e.title,x),n.font=l.string,Ke(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?o+2+t.boxPadding:0,Ke(r,S=>{Ke(S.before,x),Ke(S.lines,x),Ke(S.after,x)}),b=0,n.font=u.string,Ke(e.footer,x),n.restore(),p+=g.width,{width:p,height:m}}function xM(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function wM(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function SM(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=s/2?c="left":i>=o-s/2&&(c="right"),wM(c,e,t,n)&&(c="center"),c}function om(e,t,n){const r=n.yAlign||t.yAlign||xM(e,n);return{xAlign:n.xAlign||t.xAlign||SM(e,t,n,r),yAlign:r}}function CM(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function _M(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function am(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+s,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Qi(o);let g=CM(t,a);const m=_M(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+i:a==="right"&&(g+=Math.max(d,h)+i),{x:sn(g,0,r.width-t.width),y:sn(m,0,r.height-t.height)}}function fl(e,t,n){const r=Ct(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function lm(e){return An([],Qn(e))}function kM(e,t,n){return Wr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function cm(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Gb={beforeTitle:Kn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Kn,beforeBody:Kn,beforeLabel:Kn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return We(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Kn,afterBody:Kn,beforeFooter:Kn,footer:Kn,afterFooter:Kn};function $t(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?Gb[t].call(n,r):i}class Rd extends ji{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new $b(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=kM(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=$t(r,"beforeTitle",this,t),s=$t(r,"title",this,t),o=$t(r,"afterTitle",this,t);let a=[];return a=An(a,Qn(i)),a=An(a,Qn(s)),a=An(a,Qn(o)),a}getBeforeBody(t,n){return lm($t(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ke(t,s=>{const o={before:[],lines:[],after:[]},a=cm(r,s);An(o.before,Qn($t(a,"beforeLabel",this,s))),An(o.lines,$t(a,"label",this,s)),An(o.after,Qn($t(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return lm($t(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=$t(r,"beforeFooter",this,t),s=$t(r,"footer",this,t),o=$t(r,"afterFooter",this,t);let a=[];return a=An(a,Qn(i)),a=An(a,Qn(s)),a=An(a,Qn(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(bM(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),Ke(a,u=>{const d=cm(t.callbacks,u);i.push($t(d,"labelColor",this,u)),s.push($t(d,"labelPointStyle",this,u)),o.push($t(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=vo[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=sm(this,r),c=Object.assign({},a,l),u=om(this.chart,r,c),d=am(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Qi(a),{x:f,y:h}=t,{width:g,height:m}=n;let p,v,b,x,S,w;return s==="center"?(S=h+m/2,i==="left"?(p=f,v=p-o,x=S+o,w=S-o):(p=f+g,v=p+o,x=S-o,w=S+o),b=p):(i==="left"?v=f+Math.max(l,u)+o:i==="right"?v=f+g-Math.max(c,d)-o:v=this.caretX,s==="top"?(x=h,S=x-o,p=v-o,b=v+o):(x=h+m,S=x+o,p=v+o,b=v-o),w=x),{x1:p,x2:v,x3:b,y1:x,y2:S,y3:w}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const c=Yi(r.rtl,this.x,this.width);for(t.x=fl(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=ut(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,u=ut(s.bodyFont),d=fl(this,"left",s),f=i.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(s.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,c)+c/2,v=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Md(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Md(t,m,p,v)}else{t.lineWidth=Me(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(f,c),p=i.leftForLtr(i.xPlus(f,1),c-2),v=Qi(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,nc(t,{x:m,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),nc(t,{x:p,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(p,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=ut(r.bodyFont);let f=d.lineHeight,h=0;const g=Yi(r.rtl,this.x,this.width),m=function(O){n.fillText(O,g.x(t.x+h),t.y+f/2),t.y+=f+s},p=g.textAlign(o);let v,b,x,S,w,P,C;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=fl(this,p,r),n.fillStyle=r.bodyColor,Ke(this.beforeBody,m),h=a&&p!=="right"?o==="center"?c/2+u:c+2+u:0,S=0,P=i.length;S<P;++S){for(v=i[S],b=this.labelTextColors[S],n.fillStyle=b,Ke(v.before,m),x=v.lines,a&&x.length&&(this._drawColorBox(n,t,S,g,r),f=Math.max(d.lineHeight,l)),w=0,C=x.length;w<C;++w)m(x[w]),f=d.lineHeight;Ke(v.after,m)}h=0,f=d.lineHeight,Ke(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=Yi(r.rtl,this.x,this.width);for(t.x=fl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=ut(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=Qi(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=vo[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=sm(this,t),l=Object.assign({},o,this._size),c=om(n,t,l),u=am(t,l,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Ct(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),kb(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),Ob(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Xl(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!Xl(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=vo[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}ye(Rd,"positioners",vo);var OM={id:"tooltip",_element:Rd,positioners:vo,afterInit(e,t,n){n&&(e.tooltip=new Rd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Gb},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const EM=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function AM(e,t,n,r){const i=e.indexOf(t);if(i===-1)return EM(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const PM=(e,t)=>e===null?null:sn(Math.round(e),0,t);function um(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Fd extends zs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(We(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:AM(r,t,Te(n,t),this._addedLabels),PM(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return um.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ye(Fd,"id","category"),ye(Fd,"defaults",{ticks:{callback:um}});function TM(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=s||1,g=u-1,{min:m,max:p}=t,v=!We(o),b=!We(a),x=!We(c),S=(p-m)/(d+1);let w=dy((p-m)/g/h)*h,P,C,O,_;if(w<1e-14&&!v&&!b)return[{value:m},{value:p}];_=Math.ceil(p/w)-Math.floor(m/w),_>g&&(w=dy(_*w/g/h)*h),We(l)||(P=Math.pow(10,l),w=Math.ceil(w*P)/P),i==="ticks"?(C=Math.floor(m/w)*w,O=Math.ceil(p/w)*w):(C=m,O=p),v&&b&&s&&XT((a-o)/s,w/1e3)?(_=Math.round(Math.min((a-o)/w,u)),w=(a-o)/_,C=o,O=a):x?(C=v?o:C,O=b?a:O,_=c-1,w=(O-C)/_):(_=(O-C)/w,ko(_,Math.round(_),w/1e3)?_=Math.round(_):_=Math.ceil(_));const k=Math.max(fy(w),fy(C));P=Math.pow(10,We(l)?k:l),C=Math.round(C*P)/P,O=Math.round(O*P)/P;let $=0;for(v&&(f&&C!==o?(n.push({value:o}),C<o&&$++,ko(Math.round((C+$*w)*P)/P,o,dm(o,S,e))&&$++):C<o&&$++);$<_;++$){const j=Math.round((C+$*w)*P)/P;if(b&&j>a)break;n.push({value:j})}return b&&f&&O!==a?n.length&&ko(n[n.length-1].value,a,dm(a,S,e))?n[n.length-1].value=a:n.push({value:a}):(!b||O===a)&&n.push({value:O}),n}function dm(e,t,{horizontal:n,minRotation:r}){const i=Mr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Nd extends zs{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,n){return We(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=Ts(i),c=Ts(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=TM(i,s);return t.bounds==="ticks"&&JT(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return pb(t,this.chart.options.locale,this.options.ticks.format)}}class Bd extends Nd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ht(t)?t:0,this.max=ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Mr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ye(Bd,"id","linear"),ye(Bd,"defaults",{ticks:{callback:jf.formatters.numeric}});function qd(e){const t=e.ticks;if(t.display&&e.display){const n=Ct(t.backdropPadding);return Te(t.font&&t.font.size,rt.font.size)+n.height}return 0}function $M(e,t,n){return n=et(n)?n:[n],{w:x3(e,t.string,n),h:n.length*t.lineHeight}}function fm(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function MM(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?at/s:0;for(let l=0;l<s;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=ut(c.font),f=$M(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=Ut(e.getIndexAngle(l)+a),g=Math.round(Pf(h)),m=fm(g,u.x,f.w,0,180),p=fm(g,u.y,f.h,90,270);jM(n,t,h,m,p)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=IM(e,r,i)}function jM(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function DM(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),c=Math.round(Pf(Ut(l.angle+Vt))),u=NM(l.y,a.h,c),d=RM(c),f=FM(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function LM(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(tr({x:n,y:r},t)||tr({x:n,y:s},t)||tr({x:i,y:r},t)||tr({x:i,y:s},t))}function IM(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:qd(s)/2,additionalAngle:o?at/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=DM(e,u,l);r.push(d),a==="auto"&&(d.visible=LM(d,c),d.visible&&(c=d))}return r}function RM(e){return e===0||e===180?"center":e<180?"left":"right"}function FM(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function NM(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function BM(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!We(a)){const l=Qi(t.borderRadius),c=Ct(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,f=s-r+c.width,h=o-i+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),nc(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function qM(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));BM(n,o,s);const a=ut(o.font),{x:l,y:c,textAlign:u}=s;Oi(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function Qb(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Gt);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function zM(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),Qb(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function HM(e,t,n){return Wr(e,{label:n,index:t,type:"pointLabel"})}class bo extends Nd{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Ct(qd(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ht(t)&&!isNaN(t)?t:0,this.max=ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/qd(this.options))}generateTickLabels(t){Nd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Qe(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?MM(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Gt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Ut(t*n+Mr(r))}getDistanceFromCenterForValue(t){if(We(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(We(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return HM(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Vt+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Qb(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&qM(this,o),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=i.setContext(f),g=s.setContext(f);zM(this,h,l,o,g)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.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,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=ut(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Ct(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}Oi(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}ye(bo,"id","radialLinear"),ye(bo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:jf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ye(bo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ye(bo,"descriptors",{angleLines:{_fallback:"grid"}});const qc={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}},It=Object.keys(qc);function hm(e,t){return e-t}function gm(e,t){if(We(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),ht(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Jo(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function ym(e,t,n,r){const i=It.length;for(let s=It.indexOf(e);s<i-1;++s){const o=qc[It[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return It[s]}return It[i-1]}function UM(e,t,n,r,i){for(let s=It.length-1;s>=It.indexOf(n);s--){const o=It[s];if(qc[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return It[n?It.indexOf(n):0]}function KM(e){for(let t=It.indexOf(e)+1,n=It.length;t<n;++t)if(qc[It[t]].common)return It[t]}function mm(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Tf(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function WM(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function pm(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:WM(e,r,i,n)}class sc extends zs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new E5._date(t.adapters.date);i.init(n),_o(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:gm(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=ht(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=ht(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=r3(i,s,o);return this._unit=n.unit||(r.autoSkip?ym(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):UM(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:KM(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),pm(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=sn(n,0,o),r=sn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||ym(s.minUnit,n,r,this._getLabelCapacity(n)),a=Te(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=Jo(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)mm(u,f,g);return(f===r||i.bounds==="ticks"||h===1)&&mm(u,f,g),Object.keys(u).sort(hm).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return Qe(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Mr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,pm(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(gm(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return s3(t.sort(hm))}}ye(sc,"id","time"),ye(sc,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function hl(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ai(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ai(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const c=o-s;return c?a+(l-a)*(t-s)/c:a}class vm extends sc{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=hl(n,this.min),this._tableRange=hl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(hl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return hl(this._table,r*this._tableRange+this._minPos,!0)}}ye(vm,"id","timeseries"),ye(vm,"defaults",sc.defaults);const Yb="label";function bm(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function VM(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Xb(e,t){e.labels=t}function Jb(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yb;const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function GM(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yb;const n={labels:[],datasets:[]};return Xb(n,e.labels),Jb(n,e.datasets,t),n}function QM(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=H.useRef(null),g=H.useRef(null),m=()=>{h.current&&(g.current=new Nc(h.current,{type:o,data:GM(a,s),options:l&&{...l},plugins:c}),bm(t,g.current))},p=()=>{bm(t,null),g.current&&(g.current.destroy(),g.current=null)};return H.useEffect(()=>{!i&&g.current&&l&&VM(g.current,l)},[i,l]),H.useEffect(()=>{!i&&g.current&&Xb(g.current.config.data,a.labels)},[i,a.labels]),H.useEffect(()=>{!i&&g.current&&a.datasets&&Jb(g.current.config.data,a.datasets,s)},[i,a.datasets]),H.useEffect(()=>{g.current&&(i?(p(),setTimeout(m)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),H.useEffect(()=>{g.current&&(p(),setTimeout(m))},[o]),H.useEffect(()=>(m(),()=>p()),[]),H.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},u)}const YM=H.forwardRef(QM);function Zb(e,t){return Nc.register(t),H.forwardRef((n,r)=>H.createElement(YM,{...n,ref:r,type:e}))}const XM=Zb("line",Tl),JM=Zb("radar",$l);Nc.register(Fd,Bd,bo,jr,Dl,uM,vM,OM,mM);var zd={elements:{line:{backgroundColor:"rgba(166, 30, 105, 0.2)",borderColor:"rgba(166, 30, 105, 1)",borderWidth:4},point:{backgroundColor:"rgba(166, 30, 105, 1)",borderColor:"rgba(255,255,255, .9)",borderWidth:2,radius:5,hoverRadius:6,hoverBorderWidth:3}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1}},ZM=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.2)";var i=n.createLinearGradient(0,r.top,0,r.bottom);return i.addColorStop(0,"rgba(166, 30, 105, 0.6)"),i.addColorStop(1,"rgba(255, 255, 255, 0.1)"),i},ej=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.1)";var i=(r.left+r.right)/2,s=(r.top+r.bottom)/2,o=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2),a=n.createRadialGradient(i,s,0,i,s,o);return a.addColorStop(0,"rgba(255, 255, 255, 0.4)"),a.addColorStop(.3,"rgba(255, 255, 255, 0.4)"),a.addColorStop(1,"rgba(166, 30, 105, 0.2)"),a};function tj(e){return sj(e)||ij(e)||rj(e)||nj()}function nj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rj(e,t){if(e){if(typeof e=="string")return Hd(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hd(e,t):void 0}}function ij(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sj(e){if(Array.isArray(e))return Hd(e)}function Hd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xm(Object(n),!0).forEach(function(r){oj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oj(e,t,n){return(t=aj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aj(e){var t=lj(e,"string");return Ei(t)=="symbol"?t:t+""}function lj(e,t){if(Ei(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ei(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ei(e){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(e)}function cj(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var uj=function(){var t,n,r,i,s,o,a=qs(),l=a.data,c=a.isLoading,u=a.isRefetching,d=l==null?void 0:l.mentions,f=d==null||(t=d.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,h=d==null?void 0:d.chart,g=Array.isArray(h==null?void 0:h.labels)?h.labels:h!=null&&h.labels&&Ei(h.labels)==="object"?Object.values(h.labels):[],m=g.map(function(b){return cj(String(b))}),p=Array.isArray(h==null?void 0:h.datasets)?h.datasets:h!=null&&h.datasets&&Ei(h.datasets)==="object"?Object.values(h.datasets):[],v=gl(gl({},zd),{},{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!0,title:{display:!1,text:"Date"},grid:{display:!1}},y:{display:!0,title:{display:!1,text:"Number of Mentions"},beginAtZero:!0,max:Array.isArray(h==null||(n=h.datasets)===null||n===void 0||(n=n[0])===null||n===void 0?void 0:n.data)?Math.max.apply(Math,tj(h.datasets[0].data).concat([0]))+2:2,ticks:{stepSize:1}}}});return y.jsx(E.Card,{className:"yst-overflow-visible",children:y.jsxs(E.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Pa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),y.jsx(Aa,{score:d==null||(r=d.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value,total:d==null||(i=d.mentionedInNumberOfQueries)===null||i===void 0?void 0:i.value,delta:f,deltaSuffix:"since last scan",suffix:"queries",isLoading:c||u})]}),Array.isArray(h==null||(s=h.datasets)===null||s===void 0?void 0:s.data)&&(h==null||(o=h.datasets)===null||o===void 0?void 0:o.data.length)<2?y.jsx(E.Alert,{variant:"info",children:"Needs multiple analyses before info can be shown."}):y.jsx("div",{className:"yst-h-72",children:y.jsx(XM,{data:function(){var b={labels:m,datasets:p.map(function(x){return gl(gl({},x),{},{backgroundColor:ZM,pointBackgroundColor:"rgba(166, 30, 105, 1)"})})};return b}(),options:v})})]})})};function yl(e){var t=e.value,n=t===void 0?"—":t,r=e.label,i=e.tooltip,s=e.className,o=e.borderBottom,a=o===void 0?!1:o,l=e.borderRight,c=l===void 0?!1:l,u=e.delta;return y.jsxs("div",{className:ke("yst-relative yst-flex yst-flex-col yst-items-center yst-gap-1 yst-p-4 yst-text-center",a&&"yst-border-b yst-border-slate-200",c&&"yst-border-r yst-border-slate-200",s),children:[y.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),y.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof u=="number"&&y.jsxs("p",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",Jv(u)),children:[u>0?y.jsx(jE,{}):u<0?y.jsx(PE,{}):null,u>-1&&"+",u]}),i&&y.jsx(Sf,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",children:i})]})}function dj(e){var t=e.children,n=e.className;return y.jsx("div",{className:ke("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}function wm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ml(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wm(Object(n),!0).forEach(function(r){fj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fj(e,t,n){return(t=hj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hj(e){var t=gj(e,"string");return ea(t)=="symbol"?t:t+""}function gj(e,t){if(ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yj(){var e,t,n,r,i,s,o,a,l,c,u,d,f,h,g,m,p,v,b=Kr(),x=b.brandId,S=b.analysisId,w=Pc(x,S,{query:{select:function(te){var oe=te.data;return oe},enabled:!!x&&!!S}}),P=w.data,C=w.isLoading,O=P==null||(e=P.analysis)===null||e===void 0?void 0:e.scans,_=Array.isArray(O)&&O.length>0?O.find(function(W){return W.id===Number(S)}):void 0,k=_==null||(t=_.scores)===null||t===void 0?void 0:t.raw,$=_==null||(n=_.scores)===null||n===void 0?void 0:n.standardized,j=(r=_==null||(i=_.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0?void 0:i.value)!==null&&r!==void 0?r:0,Y=(s=_==null||(o=_.citations)===null||o===void 0||(o=o.total)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,R=_==null||(a=_.rankings)===null||a===void 0||(a=a.list)===null||a===void 0?void 0:a.find(function(W){var te;return((te=W.brand)===null||te===void 0?void 0:te.isSelf)===!0}),D=(l=R==null||(c=R.rank)===null||c===void 0?void 0:c.value)!==null&&l!==void 0?l:null,L=100-(D!=null?D:100),N=(u=_==null||(d=_.scores)===null||d===void 0||(d=d.standardized)===null||d===void 0||(d=d.sentiment)===null||d===void 0?void 0:d.value)!==null&&u!==void 0?u:0,le=(f=_==null||(h=_.scores)===null||h===void 0||(h=h.standardized)===null||h===void 0||(h=h.visibility)===null||h===void 0?void 0:h.value)!==null&&f!==void 0?f:0,fe={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[j,L,Y,N],backgroundColor:ej,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},B=ml(ml({},zd),{},{plugins:ml(ml({},zd.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(te){var oe=te.label||"",I=te.parsed.r||0;return"".concat(oe,": ").concat(I,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}});return y.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(E.Card.Content,{children:[y.jsx(E.Title,{size:"3",className:"yst-mb-2",children:"AI visibility score"}),y.jsx(Aa,{score:le,total:100,isLoading:C}),y.jsxs("div",{className:"yst-flex yst-flex-col yst-items-center yst-justify-around yst-justify-items-center yst-gap-8 md:yst-flex-row",children:[y.jsxs("div",{className:"yst-radar-chart-container yst-relative yst-aspect-square yst-h-full yst-w-full md:yst-flex md:yst-w-1/2 md:yst-items-center md:yst-justify-center",children:[y.jsx(JM,{data:fe,options:B}),y.jsx(Sf,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",placement:"left",children:"The AI Visibility Index (AIVI) shows how visible your brand is across major AI platforms like ChatGPT, based on mentions, citations, sentiment, and rankings."})]}),y.jsx("div",{className:"yst-mt-6 yst-w-full md:yst-mt-0 md:yst-flex md:yst-w-1/2 md:yst-items-center",children:y.jsxs(dj,{children:[y.jsx(yl,{value:j,label:"Mentions",tooltip:"Mentions show how often your brand appears in AI-generated answers to the questions we send to LLMs.",borderBottom:!0,borderRight:!0,delta:k==null||(g=k.mentions)===null||g===void 0||(g=g.previous)===null||g===void 0?void 0:g.value}),y.jsx(yl,{value:D&&y.jsxs(y.Fragment,{children:[D,D===1&&" 🏆"]}),label:"Competitor ranking",tooltip:"Ranking shows the position your brand is mentioned in AI-generated answers—whether in a numbered list or the order of appearance in full-text responses.",borderBottom:!0,delta:k==null||(m=k.ranking)===null||m===void 0||(m=m.previous)===null||m===void 0?void 0:m.value}),y.jsx(yl,{value:Y,label:"Citations",tooltip:"Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",borderRight:!0,delta:k==null||(p=k.citations)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value}),y.jsx(yl,{value:N?"".concat(N,"%"):"—%",label:"Positive sentiment",tooltip:"Sentiment reflects how positively, neutrally, or negatively your brand is mentioned in AI-generated answers, based on the cited sources.",delta:$==null||(v=$.sentiment)===null||v===void 0||(v=v.previous)===null||v===void 0?void 0:v.percentageChange})]})})]})]})})}var Zr={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},Du=function(){var t=Kr(),n=t.brandId,r=t.analysisId,i=Ea({query:{select:function(w){var P=w.data;return P==null?void 0:P.brands}}}),s=i.data,o=i.isLoading,a=Bv(n,{query:{enabled:!!n,select:function(w){var P=w.data;return P}}}),l=a.data,c=a.isLoading,u=Pc(n,r,{query:{enabled:!!n&&!!r,select:function(w){var P=w.data;return P==null?void 0:P.analysis}}}),d=u.data,f=u.isLoading,h=(l==null?void 0:l.name)||"your brand",g=EE(l==null?void 0:l.nextScheduledAnalysis),m=d==null?void 0:d.status,p=function(){switch(m){case Zr.pending:return{alertContent:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[y.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),y.jsxs("p",{children:["You've completed the setup for"," ",y.jsx("b",{className:"yst-font-medium",children:h}),". The analysis is scheduled to run on"," ",y.jsx("b",{className:"yst-font-medium",children:g}),". You'll see the results here once it's ready, and we'll also notify you by email."]})]}),alertVariant:"info"};case Zr.processing:return{alertContent:y.jsxs(y.Fragment,{children:["You've completed the setup for ",h,". The analysis is now processing. You'll see the results here once it's ready, and we'll also notify you by email."]}),alertVariant:"info"};case Zr.failed:return{alertContent:y.jsx(y.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"};case Zr.cancelled:return{alertContent:y.jsx(y.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"};case Zr.completed:return{alertContent:null};default:return{alertContent:null,alertVariant:"info"}}}(),v=p.alertContent,b=p.alertVariant,x=o||c||f;return x||s&&(s==null?void 0:s.length)>0?y.jsxs("div",{className:"yst-space-y-8",children:[y.jsx(mT,{}),m!==Zr.completed&&v&&y.jsx(E.Alert,{className:"md:yst-col-span-2",variant:b,children:v}),x||[Zr.completed].includes(m)&&y.jsxs("div",{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsx(E.Title,{size:"2",children:"Your brand analysis"}),y.jsxs(E.Button,{as:Ur,variant:"secondary",to:"/brand-list",className:ke("yst-gap-1.5"),disabled:!n,children:[y.jsx(Gv,{})," Edit brand list"]})]}),y.jsx("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:y.jsxs(y.Fragment,{children:[y.jsx(yj,{}),y.jsx(pT,{}),y.jsx(uj,{}),y.jsx(PA,{}),y.jsx(CA,{}),y.jsx(aA,{}),y.jsx(TA,{})]})})]})]}):y.jsx(KE,{})};function e1(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(E.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&y.jsx(E.Title,{className:ke({"yst-mb-3":n||t}),children:r}),n&&y.jsx("p",{children:n}),t]})}var mj=function(){return y.jsx(E.Card,{className:"yst-mb-4",children:y.jsxs(E.Card.Content,{className:"yst-flex yst-flex-col yst-gap-8",children:[y.jsx(E.Title,{size:"2",children:"Query - Best fish restaurant in Nijmegen"}),y.jsxs("div",{children:[y.jsx("p",{children:"AI Response:"}),y.jsx(E.Link,{href:"#todo",children:"Show more"})]}),y.jsxs("div",{children:[y.jsx("p",{children:"Extracted brands:"}),y.jsx(E.Badge,{children:"Example"}),y.jsx(E.Badge,{children:"Example"}),y.jsx(E.Badge,{children:"Example"}),y.jsx(E.Badge,{children:"Example"}),y.jsx(E.Badge,{children:"Example"})]}),y.jsxs(E.Table,{children:[y.jsx(E.Table.Head,{children:y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Header,{children:"URL"}),y.jsx(E.Table.Header,{children:"Associated brand"})]})}),y.jsxs(E.Table.Body,{children:[y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{children:y.jsx(E.Link,{href:"https://example.com",target:"_blank",children:"https://example.com"})}),y.jsx(E.Table.Cell,{children:"Example Brand"})]}),y.jsxs(E.Table.Row,{children:[y.jsx(E.Table.Cell,{children:y.jsx(E.Link,{href:"https://example2.com",target:"_blank",children:"https://example2.com"})}),y.jsx(E.Table.Cell,{children:"Example Brand 2"})]})]})]})]})})},pj=function(){return y.jsxs(E.Card,{children:[y.jsx(e1,{title:"Query history"}),y.jsx(E.Card,{className:"yst-mb-4",children:y.jsxs(E.Card.Content,{children:[y.jsxs("p",{className:"yst-mb-8",children:["Manna Fish Restaurant - Analysis performed on:"," ",y.jsx(E.Badge,{children:"2025-04-08 12:31:21"})]}),[0,1,2,3,4].map(function(t){return y.jsx(mj,{},t)})]})})]})},vj=H.lazy(function(){return Promise.resolve().then(()=>wR)}),bj=H.lazy(function(){return Promise.resolve().then(()=>GR)}),xj=H.lazy(function(){return Promise.resolve().then(()=>XR)}),wj=H.lazy(function(){return Promise.resolve().then(()=>fF)}),Sj=H.lazy(function(){return Promise.resolve().then(()=>EF)}),Cj=H.lazy(function(){return Promise.resolve().then(()=>TF)}),_j=new I2({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),ei=function(){return y.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[y.jsx(E.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),y.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},kj=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo;return y.jsx(Bw,{children:y.jsx(Mt,{element:y.jsx(FO,{}),children:y.jsxs(Mt,{element:y.jsx(CE,{hideNav:r,disableLayout:s,DebugInfo:o}),children:[y.jsxs(Mt,{path:"/",element:y.jsx(yc,{}),children:[y.jsx(Mt,{index:!0,element:y.jsx(Du,{})}),y.jsx(Mt,{path:"brands/:brandId",element:y.jsx(Du,{})}),y.jsx(Mt,{path:"brands/:brandId/analysis/:analysisId",element:y.jsx(Du,{})}),y.jsx(Mt,{path:"/brand-list",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(vj,{})})}),y.jsxs(Mt,{path:"/setup",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(xj,{})}),children:[y.jsx(Mt,{index:!0,element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(wj,{})})}),y.jsx(Mt,{path:":brandId/queries",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(Sj,{})})})]}),y.jsx(Mt,{path:"/setup/:brandId/analysis",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(Cj,{})})})]}),y.jsx(Mt,{path:"/settings",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(bj,{})})}),y.jsx(Mt,{path:"/query-history",element:y.jsx(H.Suspense,{fallback:y.jsx(ei,{}),children:y.jsx(pj,{})})})]})})})},Oj=function(t){var n=t.DebugInfo;return _E(),y.jsxs(q2,{client:_j,children:[y.jsx(yO,{children:y.jsx(kj,{DebugInfo:n})}),y.jsx(AC,{initialIsOpen:!1})]})},Ej=function(t){var n=t.routerType,r=n===void 0?"memory":n,i=t.initialRoute,s=i===void 0?"/":i,o=t.isRtl,a=o===void 0?!1:o,l=t.className,c=t.style,u=t.token,d=u===void 0?"":u,f=t.apiUrl,h=t.DebugInfo;H.useEffect(function(){f&&(Rv(f),vO(f),AO(f)),PO(d)},[f,d]);var g=H.useMemo(function(){switch(r){case"browser":return u2;case"hash":return d2;case"memory":default:return Nw}},[r]),m=r==="memory"?{initialEntries:[s]}:{};return y.jsx("div",{className:l,style:c,children:y.jsx(g,{...m,children:y.jsx(E.Root,{context:{isRtl:a},children:y.jsx(Oj,{DebugInfo:h})})})})},Aj=e=>e!=null,Pj=e=>e.filter(Aj);function Tj(e){return(...t)=>{for(const n of e)n&&n(...t)}}var K=e=>typeof e=="function"&&!e.length?e():e,Ud=e=>Array.isArray(e)?e:e?[e]:[];function $j(e,...t){return typeof e=="function"?e(...t):e}var Mj=be;function jj(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<s;o++)r(t[o]);return}for(;o<s&&t[o]===e[o];o++);let a,l;t=t.slice(o),e=e.slice(o);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function Dj(e){const[t,n]=ne(),r=e!=null&&e.throw?(f,h)=>{throw n(f instanceof Error?f:new Error(h)),f}:(f,h)=>{n(f instanceof Error?f:new Error(h))},i=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",o=new Map,a=new Proxy({},{get(f,h){let g=o.get(h);g||(g=ne(void 0,{equals:!1}),o.set(h,g)),g[0]();const m=i.reduce((p,v)=>{if(p!==null||!v)return p;try{return v.getItem(`${s}${h}`)}catch(b){return r(b,`Error reading ${s}${h} from ${v.name}`),null}},null);return m!==null&&(e!=null&&e.deserializer)?e.deserializer(m,h,e.options):m}}),l=(f,h,g)=>{const m=e!=null&&e.serializer?e.serializer(h,f,g!=null?g:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(x){r(x,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},c=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(g){r(g,`Error removing ${s}${f} from ${h.name}`)}}),u=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(g,m)=>{if(!f.hasOwnProperty(g)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,g,e.options):m;p&&(f[g]=p)}};return i.forEach(g=>{if(typeof g.getAll=="function"){let m;try{m=g.getAll()}catch(p){r(p,`Error getting all values from in ${g.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=g.key(m++);)f.hasOwnProperty(p)||h(p,g.getItem(p))}catch(v){r(v,`Error getting all values from ${g.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&lr(()=>{const f=h=>{var m;let g=!1;i.forEach(p=>{try{p!==h.storageArea&&h.key&&h.newValue!==p.getItem(h.key)&&(h.newValue?p.setItem(h.key,h.newValue):p.removeItem(h.key),g=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),g&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),be(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var g;return(g=h.addEventListener)==null?void 0:g.call(h,"storage",f)}),be(()=>i.forEach(h=>{var g;return(g=h.removeEventListener)==null?void 0:g.call(h,"storage",f)})))}),[a,l,{clear:u,error:t,remove:c,toJSON:d}]}var t1=Dj,Lj=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),Sm=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},Zt=Lj({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=Zt._cookies[0][Zt._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=Zt.getItem(e);Zt._cookies[0][Zt._cookies[1]]=`${e}=${t}${Sm(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:Zt});window.dispatchEvent(i)},removeItem:e=>{Zt._cookies[0][Zt._cookies[1]]=`${e}=deleted${Sm({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return Zt._cookies[0][Zt._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return Zt._cookies[0][Zt._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),Ij=1024,Ai=796,Bf=700,Rj="bottom-right",Kd="bottom",n1="system",Fj=!1,r1=500,Nj=500,i1=500,Bj=Object.keys(fd)[0],Cm=1,qj=Object.keys(hd)[0],qf=yt({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function he(){return mt(qf)}var s1=yt(void 0),o1=e=>{const[t,n]=ne(null),r=()=>{const o=t();o!=null&&(o.close(),n(null))},i=(o,a)=>{if(t()!=null)return;const l=window.open("","TSQD-Devtools-Panel",`width=${o},height=${a},popup`);if(!l)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");l.document.head.innerHTML="",l.document.body.innerHTML="",TS(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(he().shadowDOMTarget||document).styleSheets].forEach(c=>{try{const u=[...c.cssRules].map(g=>g.cssText).join(""),d=document.createElement("style"),f=c.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=u,l.document.head.appendChild(d)}catch(u){const d=document.createElement("link");if(c.href==null)return;d.rel="stylesheet",d.type=c.type,d.media=c.media.toString(),d.href=c.href,l.document.head.appendChild(d)}}),xc(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};ve(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||Nj))}),ve(()=>{const o=(he().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const c=(he().shadowDOMTarget||a.document).querySelector("#_goober");c&&(c.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),be(()=>{l.disconnect()})}});const s=q(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return T(s1.Provider,{value:s,get children(){return e.children}})},zf=()=>q(()=>{const t=mt(s1);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),Hf=yt(()=>"dark");function gt(){return mt(Hf)}var a1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},zj=Object.keys(a1).join("|"),Hj=new RegExp(zj,"g");function Uj(e){return e.replace(Hj,t=>a1[t])}var Lt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function _m(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Lt.MATCHES,!n.accessors){const o=km(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=Gj(e,n.accessors),s={rankedValue:e,rank:Lt.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=km(a.itemValue,t,n);const{minRanking:c,maxRanking:u,threshold:d=n.threshold}=a.attributes;l<c&&l>=Lt.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function km(e,t,n){return e=Om(e,n),t=Om(t,n),t.length>e.length?Lt.NO_MATCH:e===t?Lt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Lt.EQUAL:e.startsWith(t)?Lt.STARTS_WITH:e.includes(` ${t}`)?Lt.WORD_STARTS_WITH:e.includes(t)?Lt.CONTAINS:t.length===1?Lt.NO_MATCH:Kj(e).includes(t)?Lt.ACRONYM:Wj(e,t))}function Kj(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function Wj(e,t){let n=0,r=0;function i(l,c,u){for(let d=u,f=c.length;d<f;d++)if(c[d]===l)return n+=1,d+1;return-1}function s(l){const c=1/l,u=n/t.length;return Lt.MATCHES+u*c}const o=i(t[0],e,0);if(o<0)return Lt.NO_MATCH;r=o;for(let l=1,c=t.length;l<c;l++){const u=t[l];if(r=i(u,e,r),!(r>-1))return Lt.NO_MATCH}const a=r-o;return s(a)}function Om(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=Uj(e)),e}function Vj(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function Gj(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=Qj(s),a=Vj(e,s);for(let l=0,c=a.length;l<c;l++)n.push({itemValue:a[l],attributes:o})}return n}var Em={maxRanking:1/0,minRanking:-1/0};function Qj(e){return typeof e=="function"?Em:{...Em,...e}}var Yj={data:""},Xj=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Yj,Jj=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Zj=/\/\*[^]*?\*\/| +/g,Am=/\n+/g,ii=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?ii(o,s):s+"{"+ii(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=ii(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ii.p?ii.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Wn={},l1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+l1(e[n]);return t}return e},e4=(e,t,n,r,i)=>{let s=l1(e),o=Wn[s]||(Wn[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!Wn[o]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Jj.exec(c.replace(Zj,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Am," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Am," ").trim();return f[0]})(e);Wn[o]=ii(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Wn.g?Wn.g:null;return n&&(Wn.g=Wn[o]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Wn[o],t,r,a),o},t4=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":ii(a,""):a===!1?"":a}return r+i+(o==null?"":o)},"");function Pe(e){let t=this||{},n=e.call?e(t.p):e;return e4(n.unshift?n.raw?t4(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Xj(t.target),t.g,t.o,t.k)}Pe.bind({g:1});Pe.bind({k:1});function c1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=c1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ie(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=c1(e))&&(r&&(r+=" "),r+=t);return r}function n4(e,t){const n=tt(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=ne([],{equals:!1}),[l]=aS(),c=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},u=(d,f,h)=>d.splice(h,0,f);return q(d=>{const f=o(),h=e();if(h[pc],tt(l))return l(),d;if(f.length){const g=d.filter(m=>!f.includes(m));return f.length=0,r({list:g,added:[],removed:[],unchanged:g,finishRemoved:c}),g}return tt(()=>{const g=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const S of h)(i.has(S)?b:p).push(S);let x=!p.length;for(let S=0;S<d.length;S++){const w=d[S];g.has(w)||(s.has(w)||(v.push(w),s.add(w)),u(m,w,S)),x&&w!==m[S]&&(x=!1)}return!v.length&&x?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:c}),i=g,m)})},t.appear?[]:n.slice())}function At(...e){return Tj(e)}var Pm=e=>e instanceof Element;function Wd(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return Wd(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=Wd(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function r4(e,t=Pm,n=Pm){const r=q(e),i=q(()=>Wd(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function i4(e){return q(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function u1(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function s4(e,t,n,r){const{onBeforeEnter:i,onEnter:s,onAfterEnter:o}=t;i==null||i(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r==null?void 0:r();s==null||s(n,()=>a())}),u1(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),o==null||o(n))}}function o4(e,t,n,r){const{onBeforeExit:i,onExit:s,onAfterExit:o}=t;if(!n.parentNode)return r==null?void 0:r();i==null||i(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),s==null||s(n,()=>a()),u1(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(r==null||r(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),o==null||o(n))}}var Tm=e=>{const t=i4(e);return n4(r4(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)s4(o,e,l);const a=[];for(const l of s)l.isConnected&&(l instanceof HTMLElement||l instanceof SVGElement)&&a.push({el:l,rect:l.getBoundingClientRect()});queueMicrotask(()=>{const l=[];for(const{el:c,rect:u}of a)if(c.isConnected){const d=c.getBoundingClientRect(),f=u.left-d.left,h=u.top-d.top;(f||h)&&(c.style.transform=`translate(${f}px, ${h}px)`,c.style.transitionDuration="0s",l.push(c))}document.body.offsetHeight;for(const c of l){let u=function(d){(d.target===c||/transform$/.test(d.propertyName))&&(c.removeEventListener("transitionend",u),c.classList.remove(...o.move))};c.classList.add(...o.move),c.style.transform=c.style.transitionDuration="",c.addEventListener("transitionend",u)}});for(const l of r)o4(o,e,l,()=>i([l]))}})},Lu=Symbol("fallback");function $m(e){for(const t of e)t.dispose()}function a4(e,t,n,r={}){const i=new Map;return be(()=>$m(i.values())),()=>{const o=e()||[];return o[pc],tt(()=>{var u,d;if(!o.length)return $m(i.values()),i.clear(),r.fallback?[ir(h=>(i.set(Lu,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(Lu);if(!i.size||l){l==null||l.dispose(),i.delete(Lu);for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);s(a,h,f,g)}return a}const c=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);c.delete(g);const m=i.get(g);m?(a[f]=m.mapped,(u=m.setIndex)==null||u.call(m,f),m.setItem(()=>h)):s(a,h,f,g)}for(const f of c)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,c){ir(u=>{const[d,f]=ne(a),h={setItem:f,dispose:u};if(n.length>1){const[g,m]=ne(l);h.setIndex=m,h.mapped=n(d,g)}else h.mapped=n(d);i.set(c,h),o[l]=h.mapped})}}function oc(e){const{by:t}=e;return q(a4(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function l4(e,t,n,r){return e.addEventListener(t,n,r),Mj(e.removeEventListener.bind(e,t,n,r))}function c4(e,t,n,r){const i=()=>{Ud(K(e)).forEach(s=>{s&&Ud(K(t)).forEach(o=>l4(s,o,n,r))})};typeof e=="function"?ve(i):pe(i)}function u4(e,t){const n=new ResizeObserver(e);return be(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function d1(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=u4(o=>{for(const a of o){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),f=r.get(c);(!f||f.width!==u||f.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);ve(o=>{const a=Pj(Ud(K(e)));return jj(a,o,i,s),a},[])}var d4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Mm(e){const t={};let n;for(;n=d4.exec(e);)t[n[1]]=n[2];return t}function zc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Mm(e)}else typeof t=="string"&&(t=Mm(t));return{...e,...t}}function f4(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Vd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function h4(e){return typeof e=="number"}function Hi(e){return Object.prototype.toString.call(e)==="[object String]"}function g4(e){return typeof e=="function"}function ja(e){return t=>`${e()}-${t}`}function an(e,t){return e?e===t||e.contains(t):!1}function xo(e,t=!1){const{activeElement:n}=Rn(e);if(!(n!=null&&n.nodeName))return null;if(f1(n)&&n.contentDocument)return xo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Rn(n).getElementById(r);if(i)return i}}return n}function y4(e){return Rn(e).defaultView||window}function Rn(e){return e?e.ownerDocument||e:document}function f1(e){return e.tagName==="IFRAME"}var Uf=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Uf||{});function Kf(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function Hc(){return Kf(/^Mac/i)}function m4(){return Kf(/^iPhone/i)}function p4(){return Kf(/^iPad/i)||Hc()&&navigator.maxTouchPoints>1}function v4(){return m4()||p4()}function b4(){return Hc()||v4()}function Ye(e,t){return t&&(g4(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function ft(e){return t=>{for(const n of e)Ye(t,n)}}function x4(e){return Hc()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function xt(e){if(e)if(w4())e.focus({preventScroll:!0});else{const t=S4(e);e.focus(),C4(t)}}var pl=null;function w4(){if(pl==null){pl=!1;try{document.createElement("div").focus({get preventScroll(){return pl=!0,!0}})}catch(e){}}return pl}function S4(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function C4(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var h1=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],_4=[...h1,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Wf=h1.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",k4=_4.join(':not([hidden]):not([tabindex="-1"]),');function g1(e,t){const r=Array.from(e.querySelectorAll(Wf)).filter(jm);return t&&jm(e)&&r.unshift(e),r.forEach((i,s)=>{if(f1(i)&&i.contentDocument){const o=i.contentDocument.body,a=g1(o,!1);r.splice(s,1,...a)}}),r}function jm(e){return y1(e)&&!O4(e)}function y1(e){return e.matches(Wf)&&Vf(e)}function O4(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Vf(e,t){return e.nodeName!=="#comment"&&E4(e)&&A4(e,t)&&(!e.parentElement||Vf(e.parentElement,e))}function E4(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function A4(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function P4(e,t,n){const r=t!=null&&t.tabbable?k4:Wf,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return(o=t==null?void 0:t.from)!=null&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Vf(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Dm(e){for(;e&&!T4(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function T4(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function $4(){}function M4(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a<o;l=a++){const[c,u]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],g=(u-f)*(n-c)-(c-d)*(r-u);if(f<u){if(r>=f&&r<u){if(g===0)return!0;g>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(u<f){if(r>u&&r<=f){if(g===0)return!0;g<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return i}function je(e,t){return Ce(e,t)}var ao=new Map,Lm=new Set;function Im(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=ao.get(n.target);r||(r=new Set,ao.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=ao.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ao.delete(n.target)),ao.size===0)){for(const i of Lm)i();Lm.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Im():document.addEventListener("DOMContentLoaded",Im));function Gd(e,t){const n=Rm(e,t,"left"),r=Rm(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,c=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>c&&(a+=r+s-c),e.scrollLeft=o,e.scrollTop=a}function Rm(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function j4(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=Dm(e);for(;e&&o&&e!==i&&o!==i;)Gd(o,e),e=o,o=Dm(e)}else{const{left:o,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:c}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var m1={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function ln(e){return t=>(e(t),()=>e(void 0))}function Uc(e,t){const[n,r]=ne(Fm(t==null?void 0:t()));return ve(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||Fm(t==null?void 0:t()))}),n}function Fm(e){return Hi(e)?e:void 0}function Ze(e){const[t,n]=He(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return T(qS,Ce(n,{get component(){return t.as}}))}var D4=["id","name","validationState","required","disabled","readOnly"];function L4(e){const t=`form-control-${dn()}`,n=je({id:t},e),[r,i]=ne(),[s,o]=ne(),[a,l]=ne(),[c,u]=ne(),d=(m,p,v)=>{const b=v!=null||r()!=null;return[v,r(),b&&p!=null?m:void 0].filter(Boolean).join(" ")||void 0},f=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,h=q(()=>({"data-valid":K(n.validationState)==="valid"?"":void 0,"data-invalid":K(n.validationState)==="invalid"?"":void 0,"data-required":K(n.required)?"":void 0,"data-disabled":K(n.disabled)?"":void 0,"data-readonly":K(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=K(n.name))!=null?m:K(n.id)},dataset:h,validationState:()=>K(n.validationState),isRequired:()=>K(n.required),isDisabled:()=>K(n.disabled),isReadOnly:()=>K(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:ja(()=>K(n.id)),registerLabel:ln(i),registerField:ln(o),registerDescription:ln(l),registerErrorMessage:ln(u)}}}var p1=yt();function Da(){const e=mt(p1);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function v1(e){const t=Da(),n=je({id:t.generateId("description")},e);return ve(()=>be(t.registerDescription(n.id))),T(Ze,Ce({as:"div"},()=>t.dataset(),n))}function b1(e){const t=Da(),n=je({id:t.generateId("error-message")},e),[r,i]=He(n,["forceMount"]),s=()=>t.validationState()==="invalid";return ve(()=>{s()&&be(t.registerErrorMessage(i.id))}),T(me,{get when(){return r.forceMount||s()},get children(){return T(Ze,Ce({as:"div"},()=>t.dataset(),i))}})}function I4(e){let t;const n=Da(),r=je({id:n.generateId("label")},e),[i,s]=He(r,["ref"]),o=Uc(()=>t,()=>"label");return ve(()=>be(n.registerLabel(s.id))),T(Ze,Ce({as:"label",ref(a){const l=At(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return q(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function R4(e,t){ve(ar(e,n=>{if(n==null)return;const r=F4(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),be(()=>{r.removeEventListener("reset",t)}))}))}function F4(e){return N4(e)?e.form:e.closest("form")}function N4(e){return e.matches("textarea, input, select, button")}function La(e){var o;const[t,n]=ne((o=e.defaultValue)==null?void 0:o.call(e)),r=q(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=q(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{tt(()=>{var c;const l=$j(a,i());return Object.is(l,i())||(r()||n(l),(c=e.onChange)==null||c.call(e,l)),l})}]}function x1(e){const[t,n]=La(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function B4(e){const[t,n]=La(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function q4(e={}){const[t,n]=x1({value:()=>K(e.isSelected),defaultValue:()=>!!K(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!K(e.isReadOnly)&&!K(e.isDisabled)&&n(s)},toggle:()=>{!K(e.isReadOnly)&&!K(e.isDisabled)&&n(!t())}}}var z4=Object.defineProperty,Kc=(e,t)=>{for(var n in t)z4(e,n,{get:t[n],enumerable:!0})},w1=yt();function S1(){return mt(w1)}function H4(){const e=S1();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function C1(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function U4(e,t){var i;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(i=e[r])==null?void 0:i.ref();if(s&&C1(s,n))return r+1}return 0}function K4(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[s,o])=>{const a=i.ref(),l=o.ref();return a===l||!a||!l?0:C1(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function _1(e,t){const n=K4(e);e!==n&&t(n)}function W4(e){var i,s;const t=e[0],n=(i=e[e.length-1])==null?void 0:i.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Rn(r).body}function V4(e,t){ve(()=>{const n=setTimeout(()=>{_1(e(),t)});be(()=>clearTimeout(n))})}function G4(e,t){if(typeof IntersectionObserver!="function"){V4(e,t);return}let n=[];ve(()=>{const r=()=>{const o=!!n.length;n=e(),o&&_1(e(),t)},i=W4(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}be(()=>s.disconnect())})}function Q4(e={}){const[t,n]=B4({value:()=>K(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});G4(t,n);const r=s=>(n(o=>{const a=U4(o,s);return f4(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>T(w1.Provider,{value:{registerItem:r},get children(){return s.children}})}}function Y4(e){const t=H4(),n=je({shouldRegisterItem:!0},e);ve(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());be(r)})}function k1(e){var l,c,u;let t=(l=e.startIndex)!=null?l:0;const n=(c=e.startLevel)!=null?c:0,r=[],i=d=>{var g;if(d==null)return"";const f=(g=e.getKey)!=null?g:"key",h=Hi(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var g;if(d==null)return"";const f=(g=e.getTextValue)!=null?g:"textValue",h=Hi(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,g;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(g=Hi(f)?d[f]:f(d))!=null?g:!1},a=d=>{var f;if(d!=null)return Hi(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(Hi(d)||h4(d)){r.push({type:"item",rawValue:d,key:String(d),textValue:String(d),disabled:o(d),level:n,index:t}),t++;continue}if(a(d)!=null){r.push({type:"section",rawValue:d,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const f=(u=a(d))!=null?u:[];if(f.length>0){const h=k1({dataSource:f,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...h),t+=h.length}}else r.push({type:"item",rawValue:d,key:i(d),textValue:s(d),disabled:o(d),level:n,index:t}),t++}return r}function X4(e,t=[]){return q(()=>{const n=k1({dataSource:K(e.dataSource),getKey:K(e.getKey),getTextValue:K(e.getTextValue),getDisabled:K(e.getDisabled),getSectionChildren:K(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var J4=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Z4=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function eD(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return J4.has(r)}const t=e.split("-")[0];return Z4.has(t)}function tD(e){return eD(e)?"rtl":"ltr"}function O1(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:tD(e)}}var Qd=O1(),wo=new Set;function Nm(){Qd=O1();for(const e of wo)e(Qd)}function nD(){const[e,t]=ne(Qd),n=q(()=>e());return lr(()=>{wo.size===0&&window.addEventListener("languagechange",Nm),wo.add(t),be(()=>{wo.delete(t),wo.size===0&&window.removeEventListener("languagechange",Nm)})}),{locale:()=>n().locale,direction:()=>n().direction}}var rD=yt();function Vr(){const e=nD();return mt(rD)||e}var Iu=new Map;function iD(e){const{locale:t}=Vr(),n=q(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return q(()=>{const r=n();let i;return Iu.has(r)&&(i=Iu.get(r)),i||(i=new Intl.Collator(t(),e),Iu.set(r,i)),i})}var Xn=class E1 extends Set{constructor(n,r,i){super(n);ye(this,"anchorKey");ye(this,"currentKey");n instanceof E1?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function sD(e){const[t,n]=La(e);return[()=>{var i;return(i=t())!=null?i:new Xn},n]}function A1(e){return b4()?e.altKey:e.ctrlKey}function Ui(e){return Hc()?e.metaKey:e.ctrlKey}function Bm(e){return new Xn(e)}function oD(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function aD(e){const t=je({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=ne(!1),[i,s]=ne(),o=q(()=>{const m=K(t.selectedKeys);return m!=null?Bm(m):m}),a=q(()=>{const m=K(t.defaultSelectedKeys);return m!=null?Bm(m):new Xn}),[l,c]=sD({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[u,d]=ne(K(t.selectionBehavior)),f=()=>K(t.selectionMode),h=()=>{var m;return(m=K(t.disallowEmptySelection))!=null?m:!1},g=m=>{(K(t.allowDuplicateSelectionEvents)||!oD(m,l()))&&c(m)};return ve(()=>{const m=l();K(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),ve(()=>{var m;d((m=K(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:g}}function lD(e){const[t,n]=ne(""),[r,i]=ne(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,g;if(K(e.isDisabled))return;const a=K(e.keyboardDelegate),l=K(e.selectionManager);if(!a.getKeyForSearch)return;const c=cD(o.key);if(!c||o.ctrlKey||o.metaKey)return;c===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let u=n(m=>m+c),d=(f=a.getKeyForSearch(u,l.focusedKey()))!=null?f:a.getKeyForSearch(u);d==null&&uD(u)&&(u=u[0],d=(h=a.getKeyForSearch(u,l.focusedKey()))!=null?h:a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),(g=e.onTypeSelect)==null||g.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function cD(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function uD(e){return e.split("").every(t=>t===e[0])}function dD(e,t,n){const i=Ce({selectOnFocus:()=>K(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=Vr();let a={top:0,left:0};c4(()=>K(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=lD({isDisabled:()=>K(i.disallowTypeAhead),keyboardDelegate:()=>K(i.keyboardDelegate),selectionManager:()=>K(i.selectionManager)}),c=()=>{var p;return(p=K(i.orientation))!=null?p:"vertical"},u=p=>{var O,_,k,$,j,Y,R,D;Ye(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=K(i.selectionManager),x=K(i.selectOnFocus),S=L=>{L!=null&&(b.setFocusedKey(L),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):x&&!A1(p)&&b.replaceSelection(L))},w=K(i.keyboardDelegate),P=K(i.shouldFocusWrap),C=b.focusedKey();switch(p.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(w.getKeyBelow){p.preventDefault();let L;C!=null?L=w.getKeyBelow(C):L=(O=w.getFirstKey)==null?void 0:O.call(w),L==null&&P&&(L=(_=w.getFirstKey)==null?void 0:_.call(w,C)),S(L)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(w.getKeyAbove){p.preventDefault();let L;C!=null?L=w.getKeyAbove(C):L=(k=w.getLastKey)==null?void 0:k.call(w),L==null&&P&&(L=($=w.getLastKey)==null?void 0:$.call(w,C)),S(L)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(w.getKeyLeftOf){p.preventDefault();const L=o()==="rtl";let N;C!=null?N=w.getKeyLeftOf(C):N=L?(j=w.getFirstKey)==null?void 0:j.call(w):(Y=w.getLastKey)==null?void 0:Y.call(w),S(N)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(w.getKeyRightOf){p.preventDefault();const L=o()==="rtl";let N;C!=null?N=w.getKeyRightOf(C):N=L?(R=w.getLastKey)==null?void 0:R.call(w):(D=w.getFirstKey)==null?void 0:D.call(w),S(N)}break}case"Home":if(w.getFirstKey){p.preventDefault();const L=w.getFirstKey(C,Ui(p));L!=null&&(b.setFocusedKey(L),Ui(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):x&&b.replaceSelection(L))}break;case"End":if(w.getLastKey){p.preventDefault();const L=w.getLastKey(C,Ui(p));L!=null&&(b.setFocusedKey(L),Ui(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):x&&b.replaceSelection(L))}break;case"PageDown":if(w.getKeyPageBelow&&C!=null){p.preventDefault();const L=w.getKeyPageBelow(C);S(L)}break;case"PageUp":if(w.getKeyPageAbove&&C!=null){p.preventDefault();const L=w.getKeyPageAbove(C);S(L)}break;case"a":Ui(p)&&b.selectionMode()==="multiple"&&K(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),K(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!K(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const L=P4(v,{tabbable:!0});let N,le;do le=L.lastChild(),le&&(N=le);while(le);N&&!N.contains(document.activeElement)&&xt(N)}break}}},d=p=>{var S,w,P,C;const v=K(i.selectionManager),b=K(i.keyboardDelegate),x=K(i.selectOnFocus);if(v.isFocused()){p.currentTarget.contains(p.target)||v.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(v.setFocused(!0),v.focusedKey()==null){const O=k=>{k!=null&&(v.setFocusedKey(k),x&&v.replaceSelection(k))},_=p.relatedTarget;_&&p.currentTarget.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?O((w=v.lastSelectedKey())!=null?w:(S=b.getLastKey)==null?void 0:S.call(b)):O((C=v.firstSelectedKey())!=null?C:(P=b.getFirstKey)==null?void 0:P.call(b))}else if(!K(i.isVirtualized)){const O=s();if(O){O.scrollTop=a.top,O.scrollLeft=a.left;const _=O.querySelector(`[data-key="${v.focusedKey()}"]`);_&&(xt(_),Gd(O,_))}}}},f=p=>{const v=K(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},g=()=>{var P,C;const p=K(i.autoFocus);if(!p)return;const v=K(i.selectionManager),b=K(i.keyboardDelegate);let x;p==="first"&&(x=(P=b.getFirstKey)==null?void 0:P.call(b)),p==="last"&&(x=(C=b.getLastKey)==null?void 0:C.call(b));const S=v.selectedKeys();S.size&&(x=S.values().next().value),v.setFocused(!0),v.setFocusedKey(x);const w=t();w&&x==null&&!K(i.shouldUseVirtualFocus)&&xt(w)};return lr(()=>{i.deferAutoFocus?setTimeout(g,0):g()}),ve(ar([s,()=>K(i.isVirtualized),()=>K(i.selectionManager).focusedKey()],p=>{var S;const[v,b,x]=p;if(b)x&&((S=i.scrollToKey)==null||S.call(i,x));else if(x&&v){const w=v.querySelector(`[data-key="${x}"]`);w&&Gd(v,w)}})),{tabIndex:q(()=>{if(!K(i.shouldUseVirtualFocus))return K(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function P1(e,t){const n=()=>K(e.selectionManager),r=()=>K(e.key),i=()=>K(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Ui(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>K(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=b=>{l()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!K(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&K(e.shouldSelectOnPressUp)&&K(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(K(e.shouldSelectOnPressUp)&&!K(e.allowsDifferentPressOrigin)||c!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(A1(b)?n().toggleSelection(r()):s(b))},g=b=>{a()&&b.preventDefault()},m=b=>{const x=t();i()||a()||!x||b.target===x&&n().setFocusedKey(r())},p=q(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=q(()=>K(e.virtualized)?void 0:r());return ve(ar([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,x,S,w,P])=>{b&&x===w&&P&&!S&&document.activeElement!==b&&(e.focus?e.focus():xt(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:g,onFocus:m}}var fD=class{constructor(e,t){ye(this,"collection");ye(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new Xn(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))i.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Xn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Xn([t],t,t):new Xn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Xn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Xn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},qm=class{constructor(e){ye(this,"keyMap",new Map);ye(this,"iterable");ye(this,"firstKey");ye(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function hD(e){const t=aD(e),r=X4({dataSource:()=>K(e.dataSource),getKey:()=>K(e.getKey),getTextValue:()=>K(e.getTextValue),getDisabled:()=>K(e.getDisabled),getSectionChildren:()=>K(e.getSectionChildren),factory:s=>e.filter?new qm(e.filter(s)):new qm(s)},[()=>e.filter]),i=new fD(r,t);return M0(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var bt=e=>typeof e=="function"?e():e,gD=e=>{const t=q(()=>{const o=bt(e.element);if(o)return getComputedStyle(o)}),n=()=>{var o,a;return(a=(o=t())==null?void 0:o.animationName)!=null?a:"none"},[r,i]=ne(bt(e.show)?"present":"hidden");let s="none";return ve(o=>{const a=bt(e.show);return tt(()=>{var u;if(o===a)return a;const l=s,c=n();a?i("present"):c==="none"||((u=t())==null?void 0:u.display)==="none"?i("hidden"):i(o===!0&&l!==c?"hiding":"hidden")}),a}),ve(()=>{const o=bt(e.element);if(!o)return;const a=c=>{c.target===o&&(s=n())},l=c=>{const d=n().includes(c.animationName);c.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),be(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},yD=gD,T1=yD,ac="data-kb-top-layer",$1,Yd=!1,cr=[];function ta(e){return cr.findIndex(t=>t.node===e)}function mD(e){return cr[ta(e)]}function pD(e){return cr[cr.length-1].node===e}function M1(){return cr.filter(e=>e.isPointerBlocking)}function vD(){return[...M1()].slice(-1)[0]}function Gf(){return M1().length>0}function j1(e){var n;const t=ta((n=vD())==null?void 0:n.node);return ta(e)<t}function bD(e){cr.push(e)}function xD(e){const t=ta(e);t<0||cr.splice(t,1)}function wD(){for(const{node:e}of cr)e.style.pointerEvents=j1(e)?"none":"auto"}function SD(e){if(Gf()&&!Yd){const t=Rn(e);$1=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Yd=!0}}function CD(e){if(Gf())return;const t=Rn(e);t.body.style.pointerEvents=$1,t.body.style.length===0&&t.body.removeAttribute("style"),Yd=!1}var Bt={layers:cr,isTopMostLayer:pD,hasPointerBlockingLayer:Gf,isBelowPointerBlockingLayer:j1,addLayer:bD,removeLayer:xD,indexOf:ta,find:mD,assignPointerEventToLayers:wD,disableBodyPointerEvents:SD,restoreBodyPointerEvents:CD},_D={};Kc(_D,{Button:()=>ED,Root:()=>Qf});var kD=["button","color","file","image","reset","submit"];function OD(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?kD.indexOf(e.type)!==-1:!1}function Qf(e){let t;const n=je({type:"button"},e),[r,i]=He(n,["ref","type","disabled"]),s=Uc(()=>t,()=>"button"),o=q(()=>{const c=s();return c==null?!1:OD({tagName:c,type:r.type})}),a=q(()=>s()==="input"),l=q(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return T(Ze,Ce({as:"button",ref(c){const u=At(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return o()||a()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return o()||a()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var ED=Qf,AD=["top","right","bottom","left"],Ln=Math.min,Wt=Math.max,lc=Math.round,vl=Math.floor,Br=e=>({x:e,y:e}),PD={left:"right",right:"left",bottom:"top",top:"bottom"},TD={start:"end",end:"start"};function Xd(e,t,n){return Wt(e,Ln(t,n))}function Di(e,t){return typeof e=="function"?e(t):e}function qr(e){return e.split("-")[0]}function Hs(e){return e.split("-")[1]}function D1(e){return e==="x"?"y":"x"}function Yf(e){return e==="y"?"height":"width"}function Pi(e){return["top","bottom"].includes(qr(e))?"y":"x"}function Xf(e){return D1(Pi(e))}function $D(e,t,n){n===void 0&&(n=!1);const r=Hs(e),i=Xf(e),s=Yf(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=cc(o)),[o,cc(o)]}function MD(e){const t=cc(e);return[Jd(e),t,Jd(t)]}function Jd(e){return e.replace(/start|end/g,t=>TD[t])}function jD(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function DD(e,t,n,r){const i=Hs(e);let s=jD(qr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Jd)))),s}function cc(e){return e.replace(/left|right|bottom|top/g,t=>PD[t])}function LD(e){return{top:0,right:0,bottom:0,left:0,...e}}function L1(e){return typeof e!="number"?LD(e):{top:e,right:e,bottom:e,left:e}}function uc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function zm(e,t,n){let{reference:r,floating:i}=e;const s=Pi(t),o=Xf(t),a=Yf(o),l=qr(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Hs(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}var ID=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=zm(c,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:x,data:S,reset:w}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b!=null?b:u,d=x!=null?x:d,h={...h,[p]:{...h[p],...S}},w&&g<=50&&(g++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):w.rects),{x:u,y:d}=zm(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function na(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Di(t,e),g=L1(h),p=a[f?d==="floating"?"reference":"floating":d],v=uc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},w=uc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-w.top+g.top)/S.y,bottom:(w.bottom-v.bottom+g.bottom)/S.y,left:(v.left-w.left+g.left)/S.x,right:(w.right-v.right+g.right)/S.x}}var RD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Di(e,t)||{};if(c==null)return{};const d=L1(u),f={x:n,y:r},h=Xf(i),g=Yf(h),m=await o.getDimensions(c),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",x=p?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[h]-f[h]-s.floating[g],w=f[h]-s.reference[h],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=P?P[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(P)))&&(C=a.floating[x]||s.floating[g]);const O=S/2-w/2,_=C/2-m[g]/2-1,k=Ln(d[v],_),$=Ln(d[b],_),j=k,Y=C-m[g]-$,R=C/2-m[g]/2+O,D=Xd(j,R,Y),L=!l.arrow&&Hs(i)!=null&&R!==D&&s.reference[g]/2-(R<j?k:$)-m[g]/2<0,N=L?R<j?R-j:R-Y:0;return{[h]:f[h]+N,data:{[h]:D,centerOffset:R-D-N,...L&&{alignmentOffset:N}},reset:L}}}),FD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...p}=Di(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=qr(i),b=Pi(a),x=qr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(x||!m?[cc(a)]:MD(a)),P=g!=="none";!f&&P&&w.push(...DD(a,m,g,S));const C=[a,...w],O=await na(t,p),_=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&_.push(O[v]),d){const R=$D(i,o,S);_.push(O[R[0]],O[R[1]])}if(k=[...k,{placement:i,overflows:_}],!_.every(R=>R<=0)){var $,j;const R=((($=s.flip)==null?void 0:$.index)||0)+1,D=C[R];if(D)return{data:{index:R,overflows:k},reset:{placement:D}};let L=(j=k.filter(N=>N.overflows[0]<=0).sort((N,le)=>N.overflows[1]-le.overflows[1])[0])==null?void 0:j.placement;if(!L)switch(h){case"bestFit":{var Y;const N=(Y=k.filter(le=>{if(P){const fe=Pi(le.placement);return fe===b||fe==="y"}return!0}).map(le=>[le.placement,le.overflows.filter(fe=>fe>0).reduce((fe,B)=>fe+B,0)]).sort((le,fe)=>le[1]-fe[1])[0])==null?void 0:Y[0];N&&(L=N);break}case"initialPlacement":L=a;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function Hm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Um(e){return AD.some(t=>e[t]>=0)}var ND=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Di(e,t);switch(r){case"referenceHidden":{const s=await na(t,{...i,elementContext:"reference"}),o=Hm(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Um(o)}}}case"escaped":{const s=await na(t,{...i,altBoundary:!0}),o=Hm(s,n.floating);return{data:{escapedOffsets:o,escaped:Um(o)}}}default:return{}}}}};async function BD(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qr(n),a=Hs(n),l=Pi(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,d=Di(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}var qD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await BD(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},zD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...l}=Di(e,t),c={x:n,y:r},u=await na(t,l),d=Pi(qr(i)),f=D1(d);let h=c[f],g=c[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[p],x=h-u[v];h=Xd(b,h,x)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=g+u[p],x=g-u[v];g=Xd(b,g,x)}const m=a.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},HD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=Di(e,t),l=await na(t,a),c=qr(n),u=Hs(n),d=Pi(n)==="y",{width:f,height:h}=r.floating;let g,m;c==="top"||c==="bottom"?(g=c,m=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,g=u==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=Ln(h-l[g],p),x=Ln(f-l[m],v),S=!t.middlewareData.shift;let w=b,P=x;if(d?P=u||S?Ln(x,v):v:w=u||S?Ln(b,p):p,S&&!u){const O=Wt(l.left,0),_=Wt(l.right,0),k=Wt(l.top,0),$=Wt(l.bottom,0);d?P=f-2*(O!==0||_!==0?O+_:Wt(l.left,l.right)):w=h-2*(k!==0||$!==0?k+$:Wt(l.top,l.bottom))}await o({...t,availableWidth:P,availableHeight:w});const C=await i.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Us(e){return I1(e)?(e.nodeName||"").toLowerCase():"#document"}function Qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(I1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function I1(e){return e instanceof Node||e instanceof Qt(e).Node}function wn(e){return e instanceof Element||e instanceof Qt(e).Element}function Fn(e){return e instanceof HTMLElement||e instanceof Qt(e).HTMLElement}function Km(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Qt(e).ShadowRoot}function Ia(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function UD(e){return["table","td","th"].includes(Us(e))}function Wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function Jf(e){const t=Zf(),n=wn(e)?Sn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function KD(e){let t=zr(e);for(;Fn(t)&&!js(t);){if(Jf(t))return t;if(Wc(t))return null;t=zr(t)}return null}function Zf(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function js(e){return["html","body","#document"].includes(Us(e))}function Sn(e){return Qt(e).getComputedStyle(e)}function Vc(e){return wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zr(e){if(Us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Km(e)&&e.host||hr(e);return Km(t)?t.host:t}function R1(e){const t=zr(e);return js(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fn(t)&&Ia(t)?t:R1(t)}function ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=R1(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Qt(i);return s?t.concat(o,o.visualViewport||[],Ia(i)?i:[],o.frameElement&&n?ra(o.frameElement):[]):t.concat(i,ra(i,[],n))}function F1(e){const t=Sn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Fn(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=lc(n)!==s||lc(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function eh(e){return wn(e)?e:e.contextElement}function Ji(e){const t=eh(e);if(!Fn(t))return Br(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=F1(t);let o=(s?lc(n.width):n.width)/r,a=(s?lc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var WD=Br(0);function N1(e){const t=Qt(e);return!Zf()||!t.visualViewport?WD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Qt(e)?!1:t}function Ti(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=eh(e);let o=Br(1);t&&(r?wn(r)&&(o=Ji(r)):o=Ji(e));const a=VD(s,n,r)?N1(s):Br(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=Qt(s),h=r&&wn(r)?Qt(r):r;let g=f,m=g.frameElement;for(;m&&r&&h!==g;){const p=Ji(m),v=m.getBoundingClientRect(),b=Sn(m),x=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=x,c+=S,g=Qt(m),m=g.frameElement}}return uc({width:u,height:d,x:l,y:c})}function GD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=hr(r),a=t?Wc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Br(1);const u=Br(0),d=Fn(r);if((d||!d&&!s)&&((Us(r)!=="body"||Ia(o))&&(l=Vc(r)),Fn(r))){const f=Ti(r);c=Ji(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function QD(e){return Array.from(e.getClientRects())}function B1(e){return Ti(hr(e)).left+Vc(e).scrollLeft}function YD(e){const t=hr(e),n=Vc(e),r=e.ownerDocument.body,i=Wt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Wt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+B1(e);const a=-n.scrollTop;return Sn(r).direction==="rtl"&&(o+=Wt(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function XD(e,t){const n=Qt(e),r=hr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=Zf();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function JD(e,t){const n=Ti(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Fn(e)?Ji(e):Br(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function Wm(e,t,n){let r;if(t==="viewport")r=XD(e,n);else if(t==="document")r=YD(hr(e));else if(wn(t))r=JD(t,n);else{const i=N1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return uc(r)}function q1(e,t){const n=zr(e);return n===t||!wn(n)||js(n)?!1:Sn(n).position==="fixed"||q1(n,t)}function ZD(e,t){const n=t.get(e);if(n)return n;let r=ra(e,[],!1).filter(a=>wn(a)&&Us(a)!=="body"),i=null;const s=Sn(e).position==="fixed";let o=s?zr(e):e;for(;wn(o)&&!js(o);){const a=Sn(o),l=Jf(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ia(o)&&!l&&q1(e,o))?r=r.filter(u=>u!==o):i=a,o=zr(o)}return t.set(e,r),r}function e6(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Wc(t)?[]:ZD(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=Wm(t,u,i);return c.top=Wt(d.top,c.top),c.right=Ln(d.right,c.right),c.bottom=Ln(d.bottom,c.bottom),c.left=Wt(d.left,c.left),c},Wm(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function t6(e){const{width:t,height:n}=F1(e);return{width:t,height:n}}function n6(e,t,n){const r=Fn(t),i=hr(t),s=n==="fixed",o=Ti(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Br(0);if(r||!r&&!s)if((Us(t)!=="body"||Ia(i))&&(a=Vc(t)),r){const d=Ti(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=B1(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function Ru(e){return Sn(e).position==="static"}function Vm(e,t){return!Fn(e)||Sn(e).position==="fixed"?null:t?t(e):e.offsetParent}function z1(e,t){const n=Qt(e);if(Wc(e))return n;if(!Fn(e)){let i=zr(e);for(;i&&!js(i);){if(wn(i)&&!Ru(i))return i;i=zr(i)}return n}let r=Vm(e,t);for(;r&&UD(r)&&Ru(r);)r=Vm(r,t);return r&&js(r)&&Ru(r)&&!Jf(r)?n:r||KD(e)||n}var r6=async function(e){const t=this.getOffsetParent||z1,n=this.getDimensions,r=await n(e.floating);return{reference:n6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function i6(e){return Sn(e).direction==="rtl"}var H1={convertOffsetParentRelativeRectToViewportRelativeRect:GD,getDocumentElement:hr,getClippingRect:e6,getOffsetParent:z1,getElementRects:r6,getClientRects:QD,getDimensions:t6,getScale:Ji,isElement:wn,isRTL:i6};function s6(e,t){let n=null,r;const i=hr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=vl(u),g=vl(i.clientWidth-(c+d)),m=vl(i.clientHeight-(u+f)),p=vl(c),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-p+"px",threshold:Wt(0,Ln(1,l))||1};let x=!0;function S(w){const P=w[0].intersectionRatio;if(P!==l){if(!x)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch(w){n=new IntersectionObserver(S,b)}n.observe(e)}return o(!0),s}function o6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=eh(e),u=i||s?[...c?ra(c):[],...ra(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?s6(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,m=l?Ti(e):null;l&&p();function p(){const v=Ti(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(p)}return n(),()=>{var v;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var a6=qD,l6=zD,c6=FD,u6=HD,d6=ND,f6=RD,h6=(e,t,n)=>{const r=new Map,i={platform:H1,...n},s={...i.platform,_c:r};return ID(e,t,{...i,platform:s})},th=yt();function nh(){const e=mt(th);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var g6=de('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),Zd=30,Gm=Zd/2,y6={top:180,right:-90,bottom:0,left:90};function rh(e){const t=nh(),n=je({size:Zd},e),[r,i]=He(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=m6(t.contentRef),a=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-color`))||"none"},c=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},u=()=>Number.parseInt(c())*2*(Zd/r.size),d=()=>`rotate(${y6[s()]} ${Gm} ${Gm}) translate(0 2)`;return T(Ze,Ce({as:"div",ref(f){const h=At(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return zc({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},i,{get children(){const f=g6(),h=f.firstChild;return pe(()=>G(h,"transform",d())),f}}))}function m6(e){const[t,n]=ne();return ve(()=>{const r=e();r&&n(y4(r).getComputedStyle(r))}),t}function p6(e){const t=nh(),[n,r]=He(e,["ref","style"]);return T(Ze,Ce({as:"div",ref(i){const s=At(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return zc({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Qm(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e!=null?e:{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const s={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...s,toJSON:()=>s}}function v6(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Qm(r):e?e.getBoundingClientRect():Qm()}}}function b6(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var x6={top:"bottom",right:"left",bottom:"top",left:"right"};function w6(e,t){const[n,r]=e.split("-"),i=x6[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function S6(e){const t=je({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=ne(),[i,s]=ne(),[o,a]=ne(t.placement),l=()=>{var f;return v6((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:c}=Vr();async function u(){var P,C,O;const f=l(),h=n(),g=i();if(!f||!h)return;const m=((g==null?void 0:g.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(P=t.gutter)!=null?P:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[a6(({placement:_})=>{const k=!!_.split("-")[1];return{mainAxis:p,crossAxis:k?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const _=typeof t.flip=="string"?t.flip.split(" "):void 0;if(_!==void 0&&!_.every(b6))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(c6({padding:t.overflowPadding,fallbackPlacements:_}))}(t.slide||t.overlap)&&v.push(l6({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(u6({padding:t.overflowPadding,apply({availableWidth:_,availableHeight:k,rects:$}){const j=Math.round($.reference.width);_=Math.floor(_),k=Math.floor(k),h.style.setProperty("--kb-popper-anchor-width",`${j}px`),h.style.setProperty("--kb-popper-content-available-width",`${_}px`),h.style.setProperty("--kb-popper-content-available-height",`${k}px`),t.sameWidth&&(h.style.width=`${j}px`),t.fitViewport&&(h.style.maxWidth=`${_}px`,h.style.maxHeight=`${k}px`)}})),t.hideWhenDetached&&v.push(d6({padding:t.detachedPadding})),g&&v.push(f6({element:g,padding:t.arrowPadding}));const b=await h6(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...H1,isRTL:()=>c()==="rtl"}});if(a(b.placement),(C=t.onCurrentPlacementChange)==null||C.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",w6(b.placement,c()));const x=Math.round(b.x),S=Math.round(b.y);let w;if(t.hideWhenDetached&&(w=(O=b.middlewareData.hide)!=null&&O.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${x}px, ${S}px, 0)`,visibility:w}),g&&b.middlewareData.arrow){const{x:_,y:k}=b.middlewareData.arrow,$=b.placement.split("-")[0];Object.assign(g.style,{left:_!=null?`${_}px`:"",top:k!=null?`${k}px`:"",[$]:"100%"})}}ve(()=>{const f=l(),h=n();if(!f||!h)return;const g=o6(f,h,u,{elementResize:typeof ResizeObserver=="function"});be(g)}),ve(()=>{var g;const f=n(),h=(g=t.contentRef)==null?void 0:g.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:o,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:s};return T(th.Provider,{value:d,get children(){return t.children}})}var U1=Object.assign(S6,{Arrow:rh,Context:th,usePopperContext:nh,Positioner:p6});function C6(e){const t=n=>{var r;n.key===Uf.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};ve(()=>{var r,i;if(K(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:Rn();n.addEventListener("keydown",t),be(()=>{n.removeEventListener("keydown",t)})})}var Ym="interactOutside.pointerDownOutside",Xm="interactOutside.focusOutside";function _6(e,t){let n,r=$4;const i=()=>Rn(t()),s=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},o=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${ac}]`)||!an(i(),f)||an(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},c=d=>{function f(){const h=t(),g=d.target;if(!h||!g||!l(d))return;const m=ft([s,a]);g.addEventListener(Ym,m,{once:!0});const p=new CustomEvent(Ym,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||x4(d)&&d.button===0}});g.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const g=ft([o,a]);h.addEventListener(Xm,g,{once:!0});const m=new CustomEvent(Xm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};ve(()=>{K(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),be(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}var K1=yt();function k6(){return mt(K1)}function O6(e){let t;const n=k6(),[r,i]=He(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{s.delete(d),f==null||f()}};_6({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>an(h(),d)))||[...s].some(h=>an(h,d)):!1},onPointerDownOutside:d=>{var f,h,g;!t||Bt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Bt.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r))},onFocusOutside:d=>{var f,h,g;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r)}},()=>t),C6({ownerDocument:()=>Rn(t),onEscapeKeyDown:d=>{var f;!t||!Bt.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),lr(()=>{if(!t)return;Bt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);Bt.assignPointerEventToLayers(),Bt.disableBodyPointerEvents(t),be(()=>{t&&(Bt.removeLayer(t),d==null||d(),Bt.assignPointerEventToLayers(),Bt.restoreBodyPointerEvents(t))})}),ve(ar([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Bt.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Bt.assignPointerEventToLayers()),f&&Bt.disableBodyPointerEvents(d),be(()=>{Bt.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return T(K1.Provider,{value:u,get children(){return T(Ze,Ce({as:"div",ref(d){const f=At(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function W1(e={}){const[t,n]=x1({value:()=>K(e.open),defaultValue:()=>!!K(e.defaultOpen),onChange:o=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,o)}}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}var tn={};Kc(tn,{Description:()=>v1,ErrorMessage:()=>b1,Item:()=>Y1,ItemControl:()=>X1,ItemDescription:()=>J1,ItemIndicator:()=>Z1,ItemInput:()=>ex,ItemLabel:()=>tx,Label:()=>nx,RadioGroup:()=>E6,Root:()=>rx});var V1=yt();function G1(){const e=mt(V1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var Q1=yt();function Ra(){const e=mt(Q1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function Y1(e){const t=Da(),n=G1(),r=`${t.generateId("item")}-${dn()}`,i=je({id:r},e),[s,o]=He(i,["value","disabled","onPointerDown"]),[a,l]=ne(),[c,u]=ne(),[d,f]=ne(),[h,g]=ne(),[m,p]=ne(!1),v=q(()=>n.isSelectedValue(s.value)),b=q(()=>s.disabled||t.isDisabled()||!1),x=P=>{Ye(P,s.onPointerDown),m()&&P.preventDefault()},S=q(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),w={value:()=>s.value,dataset:S,isSelected:v,isDisabled:b,inputId:a,labelId:c,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:ja(()=>o.id),registerInput:ln(l),registerLabel:ln(u),registerDescription:ln(f),setIsFocused:p,setInputRef:g};return T(Q1.Provider,{value:w,get children(){return T(Ze,Ce({as:"div",role:"group",onPointerDown:x},S,o))}})}function X1(e){const t=Ra(),n=je({id:t.generateId("control")},e),[r,i]=He(n,["onClick","onKeyDown"]);return T(Ze,Ce({as:"div",onClick:a=>{var l;Ye(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;Ye(a,r.onKeyDown),a.key===Uf.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function J1(e){const t=Ra(),n=je({id:t.generateId("description")},e);return ve(()=>be(t.registerDescription(n.id))),T(Ze,Ce({as:"div"},()=>t.dataset(),n))}function Z1(e){const t=Ra(),n=je({id:t.generateId("indicator")},e),[r,i]=He(n,["ref","forceMount"]),[s,o]=ne(),{present:a}=T1({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return T(me,{get when(){return a()},get children(){return T(Ze,Ce({as:"div",ref(l){const c=At(o,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function ex(e){const t=Da(),n=G1(),r=Ra(),i=je({id:r.generateId("input")},e),[s,o]=He(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&o["aria-label"]!=null?o.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=ne(!1),d=g=>{if(Ye(g,s.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=g.target;m.checked=r.isSelected()}u(!1)},f=g=>{Ye(g,s.onFocus),r.setIsFocused(!0)},h=g=>{Ye(g,s.onBlur),r.setIsFocused(!1)};return ve(ar([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;u(!0);const m=r.inputRef();m==null||m.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m==null||m.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),ve(()=>be(r.registerInput(o.id))),T(Ze,Ce({as:"input",ref(g){const m=At(r.setInputRef,s.ref);typeof m=="function"&&m(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return zc({...m1},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function tx(e){const t=Ra(),n=je({id:t.generateId("label")},e);return ve(()=>be(t.registerLabel(n.id))),T(Ze,Ce({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function nx(e){return T(I4,Ce({as:"span"},e))}function rx(e){let t;const n=`radiogroup-${dn()}`,r=je({id:n,orientation:"vertical"},e),[i,s,o]=He(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],D4),[a,l]=La({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>{var m;return(m=i.onChange)==null?void 0:m.call(i,g)}}),{formControlContext:c}=L4(s);R4(()=>t,()=>{var g;return l((g=i.defaultValue)!=null?g:"")});const u=()=>c.getAriaLabelledBy(K(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),f=g=>g===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:g=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(g),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return T(p1.Provider,{value:c,get children(){return T(V1.Provider,{value:h,get children(){return T(Ze,Ce({as:"div",ref(g){const m=At(p=>t=p,i.ref);typeof m=="function"&&m(g)},role:"radiogroup",get id(){return K(s.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),o))}})}})}var E6=Object.assign(rx,{Description:v1,ErrorMessage:b1,Item:Y1,ItemControl:X1,ItemDescription:J1,ItemIndicator:Z1,ItemInput:ex,ItemLabel:tx,Label:nx}),A6=class{constructor(e,t,n){ye(this,"collection");ye(this,"ref");ye(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n,r;return(r=(n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))!=null?r:null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){var i;const n=(i=this.collator)==null?void 0:i.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const o=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function P6(e,t,n){const r=iD({usage:"search",sensitivity:"base"}),i=q(()=>{const s=K(e.keyboardDelegate);return s||new A6(e.collection,t,r)});return dD({selectionManager:()=>K(e.selectionManager),keyboardDelegate:i,autoFocus:()=>K(e.autoFocus),deferAutoFocus:()=>K(e.deferAutoFocus),shouldFocusWrap:()=>K(e.shouldFocusWrap),disallowEmptySelection:()=>K(e.disallowEmptySelection),selectOnFocus:()=>K(e.selectOnFocus),disallowTypeAhead:()=>K(e.disallowTypeAhead),shouldUseVirtualFocus:()=>K(e.shouldUseVirtualFocus),allowsTabNavigation:()=>K(e.allowsTabNavigation),isVirtualized:()=>K(e.isVirtualized),scrollToKey:s=>{var o;return(o=K(e.scrollToKey))==null?void 0:o(s)},orientation:()=>K(e.orientation)},t)}var Fu="focusScope.autoFocusOnMount",Nu="focusScope.autoFocusOnUnmount",Jm={bubbles:!1,cancelable:!0},Zm={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Vd(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Vd(this.stack,e),(t=this.active())==null||t.resume()}};function T6(e,t){const[n,r]=ne(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=g=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,g)},a=g=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,g)},l=()=>Rn(t()),c=()=>{const g=l().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,m1),g},u=()=>{const g=t();return g?g1(g,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const g=u();return g.length>0?g[0]:null},f=()=>{const g=u();return g.length>0?g[g.length-1]:null},h=()=>{const g=t();if(!g)return!1;const m=xo(g);return!m||an(g,m)?!1:y1(m)};ve(()=>{const g=t();if(!g)return;Zm.add(i);const m=xo(g);if(!an(g,m)){const v=new CustomEvent(Fu,Jm);g.addEventListener(Fu,o),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{xt(d()),xo(g)===m&&xt(g)},0)}be(()=>{g.removeEventListener(Fu,o),setTimeout(()=>{const v=new CustomEvent(Nu,Jm);h()&&v.preventDefault(),g.addEventListener(Nu,a),g.dispatchEvent(v),v.defaultPrevented||xt(m!=null?m:l().body),g.removeEventListener(Nu,a),Zm.remove(i)},0)})}),ve(()=>{const g=t();if(!g||!K(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${ac}]`)||(an(g,b)?s=b:xt(s))},p=v=>{const b=v.relatedTarget,x=b!=null?b:xo(g);x!=null&&x.closest(`[${ac}]`)||an(g,x)||xt(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),be(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),ve(()=>{const g=t();if(!g||!K(e.trapFocus)||n())return;const m=c();g.insertAdjacentElement("afterbegin",m);const p=c();g.insertAdjacentElement("beforeend",p);function v(x){const S=d(),w=f();x.relatedTarget===S?xt(w):xt(S)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(x=>{for(const S of x)S.previousSibling===p&&(p.remove(),g.insertAdjacentElement("beforeend",p)),S.nextSibling===m&&(m.remove(),g.insertAdjacentElement("afterbegin",m))});b.observe(g,{childList:!0,subtree:!1}),be(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var $6="data-live-announcer";function M6(e){ve(()=>{K(e.isDisabled)||be(j6(K(e.targets),K(e.root)))})}var lo=new WeakMap,en=[];function j6(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${$6}], [${ac}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)s(f),f=u.nextNode()}},s=l=>{var u;const c=(u=lo.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),lo.set(l,c+1))};en.length&&en[en.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return en.push(a),()=>{o.disconnect();for(const l of r){const c=lo.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),lo.delete(l)):lo.set(l,c-1)}a===en[en.length-1]?(en.pop(),en.length&&en[en.length-1].observe()):en.splice(en.indexOf(a),1)}}var bl=new Map,D6=e=>{ve(()=>{var s,o;const t=(s=bt(e.style))!=null?s:{},n=(o=bt(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=bl.get(e.key);i?i.activeCount++:bl.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(a=>a.key)}),Object.assign(e.element.style,e.style);for(const a of n)e.element.style.setProperty(a.key,a.value);be(()=>{var l;const a=bl.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}bl.delete(e.key);for(const[c,u]of Object.entries(a.originalStyles))e.element.style[c]=u;for(const c of a.properties)e.element.style.removeProperty(c);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},ep=D6,L6=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},I6=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},R6=(e,t,n)=>{var l;const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[c,u,d]=L6(i,t),f=d-c-r*u;(u!==0||f!==0)&&I6(i,t)&&(s+=f,o+=u),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[tp,np]=ne([]),F6=e=>tp().indexOf(e)===tp().length-1,N6=e=>{const t=Ce({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=dn();let r=[0,0],i=null,s=null;ve(()=>{bt(t.enabled)&&(np(c=>[...c,n]),be(()=>{np(c=>c.filter(u=>u!==n))}))}),ve(()=>{if(!bt(t.enabled)||!bt(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(bt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(bt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,g=window.scrollX;ep({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{bt(t.restoreScrollPosition)&&u>0&&window.scrollTo(g,h)}})}else ep({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),ve(()=>{!F6(n)||!bt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),be(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=rp(c),i=null,s=null},a=c=>{const u=c.target,d=bt(t.element),f=B6(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=h==="x"?f[0]:f[1],m=ip(u,h,g,d);let p;d&&ef(d,u)?p=!m:p=!0,p&&c.cancelable&&c.preventDefault()},l=c=>{const u=bt(t.element),d=c.target;let f;if(c.touches.length===2)f=!bt(t.allowPinchZoom);else{if(i==null||s===null){const h=rp(c).map((m,p)=>r[p]-m),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=g,s=g==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=ip(d,i,s,u);u&&ef(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},B6=e=>[e.deltaX,e.deltaY],rp=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],ip=(e,t,n,r)=>{const i=r!==null&&ef(r,e),[s,o]=R6(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},ef=(e,t)=>{var r;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=(r=n._$host)!=null?r:n.parentElement}return!1},q6=N6,z6=q6,ix=yt();function sx(){return mt(ix)}function gr(){const e=sx();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var ox=yt();function ih(){const e=mt(ox);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var ax=yt();function zn(){const e=mt(ax);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function sh(e){let t;const n=zn(),r=gr(),i=je({id:n.generateId(`item-${dn()}`)},e),[s,o]=He(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=ne(),[c,u]=ne(),[d,f]=ne(),h=()=>r.listState().selectionManager(),g=()=>o.id,m=()=>h().focusedKey()===g(),p=()=>{var _;(_=s.onSelect)==null||_.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};Y4({getItem:()=>{var _,k,$,j,Y;return{ref:()=>t,type:"item",key:g(),textValue:(j=($=(k=s.textValue)!=null?k:(_=d())==null?void 0:_.textContent)!=null?$:t==null?void 0:t.textContent)!=null?j:"",disabled:(Y=s.disabled)!=null?Y:!1}}});const v=P1({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=_=>{Ye(_,s.onPointerMove),_.pointerType==="mouse"&&(s.disabled?r.onItemLeave(_):(r.onItemEnter(_),_.defaultPrevented||(xt(_.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},x=_=>{Ye(_,s.onPointerLeave),_.pointerType==="mouse"&&r.onItemLeave(_)},S=_=>{Ye(_,s.onPointerUp),!s.disabled&&_.button===0&&p()},w=_=>{if(Ye(_,s.onKeyDown),!_.repeat&&!s.disabled)switch(_.key){case"Enter":case" ":p();break}},P=q(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),C=q(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":m()?"":void 0})),O={isChecked:()=>s.checked,dataset:C,setLabelRef:f,generateId:ja(()=>o.id),registerLabel:ln(l),registerDescription:ln(u)};return T(ox.Provider,{value:O,get children(){return T(Ze,Ce({as:"div",ref(_){const k=At($=>t=$,s.ref);typeof k=="function"&&k(_)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return P()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return ft([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return ft([S,v.onPointerUp])},get onClick(){return ft([s.onClick,v.onClick])},get onKeyDown(){return ft([w,v.onKeyDown])},get onMouseDown(){return ft([s.onMouseDown,v.onMouseDown])},get onFocus(){return ft([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:x},C,o))}})}function lx(e){const t=je({closeOnSelect:!1},e),[n,r]=He(t,["checked","defaultChecked","onChange","onSelect"]),i=q4({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:o=>{var a;return(a=n.onChange)==null?void 0:a.call(n,o)},isDisabled:()=>r.disabled});return T(sh,Ce({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var H6=yt();function Gc(){return mt(H6)}var ia={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>ia.next(e==="ltr"?"rtl":"ltr",t)},sp={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function cx(e){const t=zn(),n=gr(),r=Gc(),{direction:i}=Vr(),s=je({id:t.generateId("trigger")},e),[o,a]=He(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>{var v;return(v=t.value())!=null?v:o.id},r.lastValue()===void 0&&r.setLastValue(l));const c=Uc(()=>n.triggerRef(),()=>"button"),u=q(()=>{var v;return c()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});ve(ar(()=>r==null?void 0:r.value(),v=>{var b;u()&&v===l()&&((b=n.triggerRef())==null||b.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=v=>{Ye(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{Ye(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},g=v=>{if(Ye(v,o.onKeyDown),!o.disabled){if(u())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case sp.first(t.orientation()):v.stopPropagation(),v.preventDefault(),j4(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case sp.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case ia.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case ia.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;Ye(v,o.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!o.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},p=v=>{Ye(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return ve(()=>be(n.registerTriggerId(o.id))),T(Qf,Ce({ref(v){const b=At(n.setTriggerRef,o.ref);typeof b=="function"&&b(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return o.id},get disabled(){return o.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return q(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:m,onClick:h,onKeyDown:g,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var U6=yt();function ux(){return mt(U6)}function dx(e){let t;const n=zn(),r=gr(),i=Gc(),s=ux(),{direction:o}=Vr(),a=je({id:n.generateId(`content-${dn()}`)},e),[l,c]=He(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=P6({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);T6({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:x=>{var S;i===void 0&&((S=l.onOpenAutoFocus)==null||S.call(l,x))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=x=>{if(an(x.currentTarget,x.target)&&(x.key==="Tab"&&r.isOpen()&&x.preventDefault(),i!==void 0&&x.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(x.key){case ia.next(o(),n.orientation()):x.stopPropagation(),x.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case ia.previous(o(),n.orientation()):if(x.currentTarget.hasAttribute("data-closed"))break;x.stopPropagation(),x.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},g=x=>{var S;(S=l.onEscapeKeyDown)==null||S.call(l,x),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=x=>{var S;(S=l.onFocusOutside)==null||S.call(l,x),n.isModal()&&x.preventDefault()},p=x=>{var S,w;Ye(x,l.onPointerEnter),r.isOpen()&&((S=r.parentMenuContext())==null||S.listState().selectionManager().setFocused(!1),(w=r.parentMenuContext())==null||w.listState().selectionManager().setFocusedKey(void 0))},v=x=>{if(Ye(x,l.onPointerMove),x.pointerType!=="mouse")return;const S=x.target,w=u!==x.clientX;an(x.currentTarget,S)&&w&&(r.setPointerDir(x.clientX>u?"right":"left"),u=x.clientX)};ve(()=>be(r.registerContentId(l.id)));const b={ref:At(x=>{r.setContentRef(x),t=x},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:ft([l.onKeyDown,f.onKeyDown,h]),onMouseDown:ft([l.onMouseDown,f.onMouseDown]),onFocusIn:ft([l.onFocusIn,f.onFocusIn]),onFocusOut:ft([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return T(me,{get when(){return r.contentPresent()},get children(){return T(me,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return T(Ze,Ce({as:"div"},()=>r.dataset(),b,c))},get children(){return T(U1.Positioner,{get children(){return T(O6,Ce({get disableOutsidePointerEvents(){return q(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return zc({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:g,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function K6(e){let t;const n=zn(),r=gr(),[i,s]=He(e,["ref"]);return z6({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),T(dx,Ce({ref(o){const a=At(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var fx=yt();function W6(){const e=mt(fx);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function oh(e){const t=zn(),n=je({id:t.generateId(`group-${dn()}`)},e),[r,i]=ne(),s={generateId:ja(()=>n.id),registerLabelId:ln(i)};return T(fx.Provider,{value:s,get children(){return T(Ze,Ce({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function hx(e){const t=W6(),n=je({id:t.generateId("label")},e),[r,i]=He(n,["id"]);return ve(()=>be(t.registerLabelId(r.id))),T(Ze,Ce({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function gx(e){const t=gr(),n=je({children:"▼"},e);return T(Ze,Ce({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function yx(e){return T(sh,Ce({role:"menuitem",closeOnSelect:!0},e))}function mx(e){const t=ih(),n=je({id:t.generateId("description")},e),[r,i]=He(n,["id"]);return ve(()=>be(t.registerDescription(r.id))),T(Ze,Ce({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function px(e){const t=ih(),n=je({id:t.generateId("indicator")},e),[r,i]=He(n,["forceMount"]);return T(me,{get when(){return r.forceMount||t.isChecked()},get children(){return T(Ze,Ce({as:"div"},()=>t.dataset(),i))}})}function vx(e){const t=ih(),n=je({id:t.generateId("label")},e),[r,i]=He(n,["ref","id"]);return ve(()=>be(t.registerLabel(r.id))),T(Ze,Ce({as:"div",ref(s){const o=At(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function bx(e){const t=gr();return T(me,{get when(){return t.contentPresent()},get children(){return T(K0,e)}})}var xx=yt();function V6(){const e=mt(xx);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function wx(e){const n=zn().generateId(`radiogroup-${dn()}`),r=je({id:n},e),[i,s]=He(r,["value","defaultValue","onChange","disabled"]),[o,a]=La({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:c=>{var u;return(u=i.onChange)==null?void 0:u.call(i,c)}}),l={isDisabled:()=>i.disabled,isSelectedValue:c=>c===o(),setSelectedValue:a};return T(xx.Provider,{value:l,get children(){return T(oh,s)}})}function Sx(e){const t=V6(),n=je({closeOnSelect:!1},e),[r,i]=He(n,["value","onSelect"]);return T(sh,Ce({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var o;(o=r.onSelect)==null||o.call(r),t.setSelectedValue(r.value)}},i))}function G6(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),s=[],o=t.clientX,a=t.clientY;switch(r){case"top":s.push([o,a+5]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]);break;case"right":s.push([o-5,a]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]);break;case"bottom":s.push([o,a-5]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]);break;case"left":s.push([o+5,a]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]);break}return s}function Q6(e,t){return t?M4([e.clientX,e.clientY],t):!1}function Cx(e){const t=zn(),n=S1(),r=sx(),i=Gc(),s=ux(),o=je({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=He(o,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[f,h]=ne(),[g,m]=ne(),[p,v]=ne(),[b,x]=ne(),[S,w]=ne(!0),[P,C]=ne(l.placement),[O,_]=ne([]),[k,$]=ne([]),{DomCollectionProvider:j}=Q4({items:k,onItemsChange:$}),Y=W1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>{var se;return(se=a.onOpenChange)==null?void 0:se.call(a,J)}}),{present:R}=T1({show:()=>t.forceMount()||Y.isOpen(),element:()=>{var J;return(J=b())!=null?J:null}}),D=hD({selectionMode:"none",dataSource:k}),L=J=>{w(J),Y.open()},N=(J=!1)=>{Y.close(),J&&r&&r.close(!0)},le=J=>{w(J),Y.toggle()},fe=()=>{const J=b();J&&(xt(J),D.selectionManager().setFocused(!0),D.selectionManager().setFocusedKey(void 0))},B=()=>{s!=null?setTimeout(()=>fe()):fe()},W=J=>{_(ae=>[...ae,J]);const se=r==null?void 0:r.registerNestedMenu(J);return()=>{_(ae=>Vd(ae,J)),se==null||se()}},te=J=>d===(u==null?void 0:u.side)&&Q6(J,u==null?void 0:u.area),oe=J=>{te(J)&&J.preventDefault()},I=J=>{te(J)||B()},ce=J=>{te(J)&&J.preventDefault()};M6({isDisabled:()=>!(r==null&&Y.isOpen()&&t.isModal()),targets:()=>[b(),...O()].filter(Boolean)}),ve(()=>{const J=b();if(!J||!r)return;const se=r.registerNestedMenu(J);be(()=>{se()})}),ve(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),...O()]))}),ve(()=>{var J;r!==void 0||i===void 0||(i.value()===t.value()?((J=p())==null||J.focus(),i.autoFocusMenu()&&L(!0)):N())}),ve(()=>{r!==void 0||i===void 0||Y.isOpen()&&i.setValue(t.value())}),be(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const xe={dataset:q(()=>({"data-expanded":Y.isOpen()?"":void 0,"data-closed":Y.isOpen()?void 0:""})),isOpen:Y.isOpen,contentPresent:R,nestedMenus:O,currentPlacement:P,pointerGraceTimeoutId:()=>c,autoFocus:S,listState:()=>D,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:g,setTriggerRef:v,setContentRef:x,open:L,close:N,toggle:le,focusContent:B,onItemEnter:oe,onItemLeave:I,onTriggerLeave:ce,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>c=J,setPointerGraceIntent:J=>u=J,registerNestedMenu:W,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:ln(h),registerContentId:ln(m)};return T(j,{get children(){return T(ix.Provider,{value:xe,get children(){return T(me,{when:s===void 0,get fallback(){return l.children},get children(){return T(U1,Ce({anchorRef:p,contentRef:b,onCurrentPlacementChange:C},l))}})}})}})}function _x(e){const{direction:t}=Vr();return T(Cx,Ce({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var Y6={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function kx(e){const t=gr(),n=zn(),[r,i]=He(e,["onFocusOutside","onKeyDown"]),{direction:s}=Vr();return T(dx,Ce({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{var f;(f=r.onFocusOutside)==null||f.call(r,u);const d=u.target;an(t.triggerRef(),d)||t.close()},onKeyDown:u=>{Ye(u,r.onKeyDown);const d=an(u.currentTarget,u.target),f=Y6.close(s(),n.orientation()).includes(u.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),xt(t.triggerRef()))}},i))}var op=["Enter"," "],X6={open:(e,t)=>e==="ltr"?[...op,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...op,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Ox(e){let t;const n=zn(),r=gr(),i=je({id:n.generateId(`sub-trigger-${dn()}`)},e),[s,o]=He(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Vr(),u=()=>s.id,d=()=>{const x=r.parentMenuContext();if(x==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return x.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===u(),g=P1({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=x=>{Ye(x,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=x=>{var w;if(Ye(x,s.onPointerMove),x.pointerType!=="mouse")return;const S=r.parentMenuContext();if(S==null||S.onItemEnter(x),!x.defaultPrevented){if(s.disabled){S==null||S.onItemLeave(x);return}!r.isOpen()&&!a&&((w=r.parentMenuContext())==null||w.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),S==null||S.onItemEnter(x),x.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),xt(x.currentTarget),S==null||S.listState().selectionManager().setFocused(!0),S==null||S.listState().selectionManager().setFocusedKey(u()))}},v=x=>{if(Ye(x,s.onPointerLeave),x.pointerType!=="mouse")return;l();const S=r.parentMenuContext(),w=r.contentRef();if(w){S==null||S.setPointerGraceIntent({area:G6(r.currentPlacement(),x,w),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(S==null?void 0:S.pointerGraceTimeoutId());const P=window.setTimeout(()=>{S==null||S.setPointerGraceIntent(null)},300);S==null||S.setPointerGraceTimeoutId(P)}else{if(S==null||S.onTriggerLeave(x),x.defaultPrevented)return;S==null||S.setPointerGraceIntent(null)}S==null||S.onItemLeave(x)},b=x=>{Ye(x,s.onKeyDown),!x.repeat&&(s.disabled||X6.open(c(),n.orientation()).includes(x.key)&&(x.stopPropagation(),x.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return ve(()=>{var S,w,P;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const x=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:(w=(S=s.textValue)!=null?S:t==null?void 0:t.textContent)!=null?w:"",disabled:(P=s.disabled)!=null?P:!1});be(x)}),ve(ar(()=>{var x;return(x=r.parentMenuContext())==null?void 0:x.pointerGraceTimeoutId()},x=>{be(()=>{var S;window.clearTimeout(x),(S=r.parentMenuContext())==null||S.setPointerGraceIntent(null)})})),ve(()=>be(r.registerTriggerId(s.id))),be(()=>{l()}),T(Ze,Ce({as:"div",ref(x){const S=At(w=>{r.setTriggerRef(w),t=w},s.ref);typeof S=="function"&&S(x)},get id(){return s.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return q(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return ft([s.onPointerDown,g.onPointerDown])},get onPointerUp(){return ft([s.onPointerUp,g.onPointerUp])},get onClick(){return ft([m,g.onClick])},get onKeyDown(){return ft([b,g.onKeyDown])},get onMouseDown(){return ft([s.onMouseDown,g.onMouseDown])},get onFocus(){return ft([s.onFocus,g.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function J6(e){const t=Gc(),n=`menu-${dn()}`,r=je({id:n,modal:!0},e),[i,s]=He(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=W1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var c;return(c=i.onOpenChange)==null?void 0:c.call(i,l)}}),a={isModal:()=>{var l;return(l=i.modal)!=null?l:!0},preventScroll:()=>{var l;return(l=i.preventScroll)!=null?l:a.isModal()},forceMount:()=>{var l;return(l=i.forceMount)!=null?l:!1},generateId:ja(()=>i.id),value:()=>i.value,orientation:()=>{var l,c;return(c=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?c:"horizontal"}};return T(ax.Provider,{value:a,get children(){return T(Cx,Ce({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var Z6={};Kc(Z6,{Root:()=>Qc,Separator:()=>eL});function Qc(e){let t;const n=je({orientation:"horizontal"},e),[r,i]=He(n,["ref","orientation"]),s=Uc(()=>t,()=>"hr");return T(Ze,Ce({as:"hr",ref(o){const a=At(l=>t=l,r.ref);typeof a=="function"&&a(o)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var eL=Qc,ot={};Kc(ot,{Arrow:()=>rh,CheckboxItem:()=>lx,Content:()=>Ex,DropdownMenu:()=>tL,Group:()=>oh,GroupLabel:()=>hx,Icon:()=>gx,Item:()=>yx,ItemDescription:()=>mx,ItemIndicator:()=>px,ItemLabel:()=>vx,Portal:()=>bx,RadioGroup:()=>wx,RadioItem:()=>Sx,Root:()=>Ax,Separator:()=>Qc,Sub:()=>_x,SubContent:()=>kx,SubTrigger:()=>Ox,Trigger:()=>cx});function Ex(e){const t=zn(),n=gr(),[r,i]=He(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return T(K6,Ce({onCloseAutoFocus:l=>{var c;(c=r.onCloseAutoFocus)==null||c.call(r,l),s||xt(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var c;(c=r.onInteractOutside)==null||c.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function Ax(e){const t=`dropdownmenu-${dn()}`,n=je({id:t},e);return T(J6,n)}var tL=Object.assign(Ax,{Arrow:rh,CheckboxItem:lx,Content:Ex,Group:oh,GroupLabel:hx,Icon:gx,Item:yx,ItemDescription:mx,ItemIndicator:px,ItemLabel:vx,Portal:bx,RadioGroup:wx,RadioItem:Sx,Separator:Qc,Sub:_x,SubContent:kx,SubTrigger:Ox,Trigger:cx}),z={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},nL=de('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),rL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),iL=de('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),sL=de('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),ah=de('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),oL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),aL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),lL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),cL=de('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),uL=de('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),dL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),fL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),hL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),gL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Px=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),yL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),mL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),pL=de('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),vL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),bL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),xL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),wL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),SL=de('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function CL(){return nL()}function Tx(){return rL()}function Ao(){return iL()}function ap(){return sL()}function lp(){return ah()}function _L(){return(()=>{var e=ah();return e.style.setProperty("transform","rotate(90deg)"),e})()}function kL(){return(()=>{var e=ah();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function OL(){return oL()}function EL(){return aL()}function AL(){return lL()}function PL(){return cL()}function TL(){return uL()}function $L(){return dL()}function ML(){return fL()}function jL(){return hL()}function DL(){return gL()}function LL(e){return(()=>{var t=Px(),n=t.firstChild;return pe(()=>G(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function IL(){return yL()}function RL(){return mL()}function FL(e){return[T(me,{get when(){return e.checked},get children(){var t=Px(),n=t.firstChild;return pe(()=>G(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),T(me,{get when(){return!e.checked},get children(){var t=pL(),n=t.firstChild;return pe(()=>G(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function NL(){return vL()}function BL(){return bL()}function qL(){return xL()}function zL(){return wL()}function cp(){const e=dn();return(()=>{var t=SL(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,c=l.nextSibling,u=c.firstChild,d=c.nextSibling,f=d.firstChild,h=d.nextSibling,g=h.nextSibling,m=g.firstChild,p=g.nextSibling,v=p.firstChild,b=p.nextSibling,x=b.nextSibling,S=x.firstChild,w=x.nextSibling,P=w.firstChild,C=w.nextSibling,O=C.nextSibling,_=O.firstChild,k=O.nextSibling,$=k.firstChild,j=k.nextSibling,Y=j.nextSibling,R=Y.firstChild,D=Y.nextSibling,L=D.firstChild,N=D.nextSibling,le=N.nextSibling,fe=le.firstChild,B=le.nextSibling,W=B.firstChild,te=B.nextSibling,oe=te.firstChild,I=oe.nextSibling,ce=I.nextSibling,ee=ce.nextSibling,xe=ee.nextSibling,J=te.nextSibling,se=J.firstChild,ae=J.nextSibling,Ae=ae.firstChild,Z=ae.nextSibling,it=Z.firstChild,Pt=it.nextSibling,Tt=Pt.nextSibling,Xt=Tt.firstChild,gn=Xt.nextSibling,X=gn.nextSibling,De=X.nextSibling,st=De.nextSibling,Re=st.nextSibling,Fe=Re.nextSibling,Ne=Fe.nextSibling,ge=Ne.nextSibling,ue=ge.nextSibling,Oe=ue.nextSibling,Le=Oe.nextSibling,yn=Z.nextSibling,Gr=yn.firstChild,Hn=yn.nextSibling,Qr=Hn.firstChild,Un=Hn.nextSibling,yr=Un.firstChild,Na=yr.nextSibling,Vs=Un.nextSibling,Ba=Vs.firstChild,Li=Vs.nextSibling,qa=Li.firstChild,Gs=Li.nextSibling,Qs=Gs.firstChild,Ys=Qs.nextSibling,Ii=Ys.nextSibling,fh=Ii.nextSibling,hh=fh.nextSibling,gh=hh.nextSibling,yh=gh.nextSibling,mh=yh.nextSibling,ph=mh.nextSibling,vh=ph.nextSibling,bh=vh.nextSibling,xh=bh.nextSibling,wh=xh.nextSibling,Sh=wh.nextSibling,Ch=Sh.nextSibling,_h=Ch.nextSibling,kh=_h.nextSibling,Hx=kh.nextSibling;return G(n,"id",`a-${e}`),G(r,"fill",`url(#a-${e})`),G(s,"id",`am-${e}`),G(o,"id",`b-${e}`),G(a,"filter",`url(#am-${e})`),G(l,"mask",`url(#b-${e})`),G(u,"id",`ah-${e}`),G(d,"id",`k-${e}`),G(f,"filter",`url(#ah-${e})`),G(h,"mask",`url(#k-${e})`),G(m,"id",`ae-${e}`),G(p,"id",`j-${e}`),G(v,"filter",`url(#ae-${e})`),G(b,"mask",`url(#j-${e})`),G(S,"id",`ai-${e}`),G(w,"id",`i-${e}`),G(P,"filter",`url(#ai-${e})`),G(C,"mask",`url(#i-${e})`),G(_,"id",`aj-${e}`),G(k,"id",`h-${e}`),G($,"filter",`url(#aj-${e})`),G(j,"mask",`url(#h-${e})`),G(R,"id",`ag-${e}`),G(D,"id",`g-${e}`),G(L,"filter",`url(#ag-${e})`),G(N,"mask",`url(#g-${e})`),G(fe,"id",`af-${e}`),G(B,"id",`f-${e}`),G(W,"filter",`url(#af-${e})`),G(te,"mask",`url(#f-${e})`),G(ee,"id",`m-${e}`),G(xe,"fill",`url(#m-${e})`),G(se,"id",`ak-${e}`),G(ae,"id",`e-${e}`),G(Ae,"filter",`url(#ak-${e})`),G(Z,"mask",`url(#e-${e})`),G(it,"id",`n-${e}`),G(Pt,"fill",`url(#n-${e})`),G(Xt,"id",`r-${e}`),G(gn,"fill",`url(#r-${e})`),G(X,"id",`s-${e}`),G(De,"fill",`url(#s-${e})`),G(st,"id",`q-${e}`),G(Re,"fill",`url(#q-${e})`),G(Fe,"id",`p-${e}`),G(Ne,"fill",`url(#p-${e})`),G(ge,"id",`o-${e}`),G(ue,"fill",`url(#o-${e})`),G(Oe,"id",`l-${e}`),G(Le,"fill",`url(#l-${e})`),G(Gr,"id",`al-${e}`),G(Hn,"id",`d-${e}`),G(Qr,"filter",`url(#al-${e})`),G(Un,"mask",`url(#d-${e})`),G(yr,"id",`u-${e}`),G(Na,"fill",`url(#u-${e})`),G(Ba,"id",`ad-${e}`),G(Li,"id",`c-${e}`),G(qa,"filter",`url(#ad-${e})`),G(Gs,"mask",`url(#c-${e})`),G(Qs,"id",`t-${e}`),G(Ys,"fill",`url(#t-${e})`),G(Ii,"id",`v-${e}`),G(fh,"stroke",`url(#v-${e})`),G(hh,"id",`aa-${e}`),G(gh,"stroke",`url(#aa-${e})`),G(yh,"id",`w-${e}`),G(mh,"stroke",`url(#w-${e})`),G(ph,"id",`ac-${e}`),G(vh,"stroke",`url(#ac-${e})`),G(bh,"id",`ab-${e}`),G(xh,"stroke",`url(#ab-${e})`),G(wh,"id",`y-${e}`),G(Sh,"stroke",`url(#y-${e})`),G(Ch,"id",`x-${e}`),G(_h,"stroke",`url(#x-${e})`),G(kh,"id",`z-${e}`),G(Hx,"stroke",`url(#z-${e})`),t})()}var HL=de('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),UL=de('<button title="Copy object to clipboard">'),KL=de('<button title="Remove all items"aria-label="Remove all items">'),WL=de('<button title="Delete item"aria-label="Delete item">'),VL=de('<button title="Toggle value"aria-label="Toggle value">'),GL=de('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),co=de("<div>"),QL=de("<div><button> <span></span> <span> "),YL=de("<input>"),up=de("<span>"),XL=de("<div><span>:"),JL=de("<div><div><button> [<!>...<!>]");function ZL(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var dp=e=>{const t=gt(),n=he().shadowDOMTarget?Pe.bind({target:he().shadowDOMTarget}):Pe,r=q(()=>t()==="dark"?Ws(n):Ks(n));return(()=>{var i=HL();return pe(()=>Q(i,ie(r().expander,n`
|
|
68
|
+
`):e}function PM(e,t){const{element:n,datasetIndex:r,index:i}=t,s=e.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:e,label:o,parsed:s.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function hm(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=ut(t.bodyFont),c=ut(t.titleFont),u=ut(t.footerFont),d=s.length,f=i.length,h=r.length,g=Ct(t.padding);let m=g.height,p=0,v=r.reduce((S,x)=>S+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const S=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*S+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let b=0;const w=function(S){p=Math.max(p,n.measureText(S).width+b)};return n.save(),n.font=c.string,Ke(e.title,w),n.font=l.string,Ke(e.beforeBody.concat(e.afterBody),w),b=t.displayColors?o+2+t.boxPadding:0,Ke(r,S=>{Ke(S.before,w),Ke(S.lines,w),Ke(S.after,w)}),b=0,n.font=u.string,Ke(e.footer,w),n.restore(),p+=g.width,{width:p,height:m}}function $M(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function MM(e,t,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+s+o>t.width||e==="right"&&i-s-o<0)return!0}function jM(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=s/2?c="left":i>=o-s/2&&(c="right"),MM(c,e,t,n)&&(c="center"),c}function gm(e,t,n){const r=n.yAlign||t.yAlign||$M(e,n);return{xAlign:n.xAlign||t.xAlign||jM(e,t,n,r),yAlign:r}}function DM(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function LM(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function ym(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=i+s,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Yi(o);let g=DM(t,a);const m=LM(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,f)+i:a==="right"&&(g+=Math.max(d,h)+i),{x:on(g,0,r.width-t.width),y:on(m,0,r.height-t.height)}}function hl(e,t,n){const r=Ct(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function mm(e){return Pn([],Xn(e))}function IM(e,t,n){return Vr(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function pm(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const e1={beforeTitle:Vn,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Vn,beforeBody:Vn,beforeLabel:Vn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return We(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Vn,afterBody:Vn,beforeFooter:Vn,footer:Vn,afterFooter:Vn};function $t(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?e1[t].call(n,r):i}class zd extends Di{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new Rb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=IM(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=$t(r,"beforeTitle",this,t),s=$t(r,"title",this,t),o=$t(r,"afterTitle",this,t);let a=[];return a=Pn(a,Xn(i)),a=Pn(a,Xn(s)),a=Pn(a,Xn(o)),a}getBeforeBody(t,n){return mm($t(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ke(t,s=>{const o={before:[],lines:[],after:[]},a=pm(r,s);Pn(o.before,Xn($t(a,"beforeLabel",this,s))),Pn(o.lines,$t(a,"label",this,s)),Pn(o.after,Xn($t(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return mm($t(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=$t(r,"beforeFooter",this,t),s=$t(r,"footer",this,t),o=$t(r,"afterFooter",this,t);let a=[];return a=Pn(a,Xn(i)),a=Pn(a,Xn(s)),a=Pn(a,Xn(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,c;for(l=0,c=n.length;l<c;++l)a.push(PM(this.chart,n[l]));return t.filter&&(a=a.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(a=a.sort((u,d)=>t.itemSort(u,d,r))),Ke(a,u=>{const d=pm(t.callbacks,u);i.push($t(d,"labelColor",this,u)),s.push($t(d,"labelPointStyle",this,u)),o.push($t(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=xo[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=hm(this,r),c=Object.assign({},a,l),u=gm(this.chart,r,c),d=ym(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const s=this.getCaretPosition(t,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Yi(a),{x:f,y:h}=t,{width:g,height:m}=n;let p,v,b,w,S,x;return s==="center"?(S=h+m/2,i==="left"?(p=f,v=p-o,w=S+o,x=S-o):(p=f+g,v=p+o,w=S-o,x=S+o),b=p):(i==="left"?v=f+Math.max(l,u)+o:i==="right"?v=f+g-Math.max(c,d)-o:v=this.caretX,s==="top"?(w=h,S=w-o,p=v-o,b=v+o):(w=h+m,S=w+o,p=v+o,b=v-o),x=w),{x1:p,x2:v,x3:b,y1:w,y2:S,y3:x}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const c=Xi(r.rtl,this.x,this.width);for(t.x=hl(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",o=ut(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===s&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=s,u=ut(s.bodyFont),d=hl(this,"left",s),f=i.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+h;if(s.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,c)+c/2,v=g+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Rd(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Rd(t,m,p,v)}else{t.lineWidth=Me(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=i.leftForLtr(f,c),p=i.leftForLtr(i.xPlus(f,1),c-2),v=Yi(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,rc(t,{x:m,y:g,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),rc(t,{x:p,y:g+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=o.backgroundColor,t.fillRect(p,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=ut(r.bodyFont);let f=d.lineHeight,h=0;const g=Xi(r.rtl,this.x,this.width),m=function(k){n.fillText(k,g.x(t.x+h),t.y+f/2),t.y+=f+s},p=g.textAlign(o);let v,b,w,S,x,E,C;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=hl(this,p,r),n.fillStyle=r.bodyColor,Ke(this.beforeBody,m),h=a&&p!=="right"?o==="center"?c/2+u:c+2+u:0,S=0,E=i.length;S<E;++S){for(v=i[S],b=this.labelTextColors[S],n.fillStyle=b,Ke(v.before,m),w=v.lines,a&&w.length&&(this._drawColorBox(n,t,S,g,r),f=Math.max(d.lineHeight,l)),x=0,C=w.length;x<C;++x)m(w[x]),f=d.lineHeight;Ke(v.after,m)}h=0,f=d.lineHeight,Ke(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=Xi(r.rtl,this.x,this.width);for(t.x=hl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=ut(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=Yi(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+c-f,l),n.quadraticCurveTo(a+c,l,a+c,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+c,l+u-g),n.quadraticCurveTo(a+c,l+u,a+c-g,l+u),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+u),n.quadraticCurveTo(a,l+u,a,l+u-h),o==="center"&&s==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=xo[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=hm(this,t),l=Object.assign({},o,this._size),c=gm(n,t,l),u=ym(t,l,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Ct(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(s,t,i,n),$b(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),Mb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),s=!Jl(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(t,s,n,r),a=this._positionChanged(o,t),l=n||!Jl(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const s=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:s}=this,o=xo[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}ye(zd,"positioners",xo);var RM={id:"tooltip",_element:zd,positioners:xo,afterInit(e,t,n){n&&(e.tooltip=new zd({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:e1},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const FM=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function NM(e,t,n,r){const i=e.indexOf(t);if(i===-1)return FM(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const BM=(e,t)=>e===null?null:on(Math.round(e),0,t);function vm(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Hd extends Us{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(We(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:NM(r,t,Pe(n,t),this._addedLabels),BM(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=t===0&&n===s.length-1?s:s.slice(t,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){return vm.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ye(Hd,"id","category"),ye(Hd,"defaults",{ticks:{callback:vm}});function qM(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=s||1,g=u-1,{min:m,max:p}=t,v=!We(o),b=!We(a),w=!We(c),S=(p-m)/(d+1);let x=by((p-m)/g/h)*h,E,C,k,_;if(x<1e-14&&!v&&!b)return[{value:m},{value:p}];_=Math.ceil(p/x)-Math.floor(m/x),_>g&&(x=by(_*x/g/h)*h),We(l)||(E=Math.pow(10,l),x=Math.ceil(x*E)/E),i==="ticks"?(C=Math.floor(m/x)*x,k=Math.ceil(p/x)*x):(C=m,k=p),v&&b&&s&&l3((a-o)/s,x/1e3)?(_=Math.round(Math.min((a-o)/x,u)),x=(a-o)/_,C=o,k=a):w?(C=v?o:C,k=b?a:k,_=c-1,x=(k-C)/_):(_=(k-C)/x,Eo(_,Math.round(_),x/1e3)?_=Math.round(_):_=Math.ceil(_));const O=Math.max(xy(x),xy(C));E=Math.pow(10,We(l)?O:l),C=Math.round(C*E)/E,k=Math.round(k*E)/E;let P=0;for(v&&(f&&C!==o?(n.push({value:o}),C<o&&P++,Eo(Math.round((C+P*x)*E)/E,o,bm(o,S,e))&&P++):C<o&&P++);P<_;++P){const j=Math.round((C+P*x)*E)/E;if(b&&j>a)break;n.push({value:j})}return b&&f&&k!==a?n.length&&Eo(n[n.length-1].value,a,bm(a,S,e))?n[n.length-1].value=a:n.push({value:a}):(!b||k===a)&&n.push({value:k}),n}function bm(e,t,{horizontal:n,minRotation:r}){const i=jr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Ud extends Us{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,n){return We(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(t){const l=$s(i),c=$s(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(i-l)}this.min=i,this.max=s}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=qM(i,s);return t.bounds==="ticks"&&c3(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Cb(t,this.chart.options.locale,this.options.ticks.format)}}class Kd extends Ud{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ht(t)?t:0,this.max=ht(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=jr(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ye(Kd,"id","linear"),ye(Kd,"defaults",{ticks:{callback:Nf.formatters.numeric}});function Wd(e){const t=e.ticks;if(t.display&&e.display){const n=Ct(t.backdropPadding);return Pe(t.font&&t.font.size,rt.font.size)+n.height}return 0}function zM(e,t,n){return n=et(n)?n:[n],{w:$3(e,t.string,n),h:n.length*t.lineHeight}}function xm(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function HM(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],s=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?at/s:0;for(let l=0;l<s;l++){const c=o.setContext(e.getPointLabelContext(l));i[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+i[l],a),d=ut(c.font),f=zM(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=Kt(e.getIndexAngle(l)+a),g=Math.round(Lf(h)),m=xm(g,u.x,f.w,0,180),p=xm(g,u.y,f.h,90,270);UM(n,t,h,m,p)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=VM(e,r,i)}function UM(e,t,n,r,i){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;r.start<t.l?(a=(t.l-r.start)/s,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/s,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(l=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function KM(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),c=Math.round(Lf(Kt(l.angle+Gt))),u=YM(l.y,a.h,c),d=GM(c),f=QM(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function WM(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(ir({x:n,y:r},t)||ir({x:n,y:s},t)||ir({x:i,y:r},t)||ir({x:i,y:s},t))}function VM(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:Wd(s)/2,additionalAngle:o?at/i:0};let c;for(let u=0;u<i;u++){l.padding=n[u],l.size=t[u];const d=KM(e,u,l);r.push(d),a==="auto"&&(d.visible=WM(d,c),d.visible&&(c=d))}return r}function GM(e){return e===0||e===180?"center":e<180?"left":"right"}function QM(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function YM(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function XM(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!We(a)){const l=Yi(t.borderRadius),c=Ct(t.backdropPadding);e.fillStyle=a;const u=r-c.left,d=i-c.top,f=s-r+c.width,h=o-i+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),rc(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function JM(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const s=e._pointLabelItems[i];if(!s.visible)continue;const o=r.setContext(e.getPointLabelContext(i));XM(n,o,s);const a=ut(o.font),{x:l,y:c,textAlign:u}=s;Ei(n,e._pointLabels[i],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function t1(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Qt);else{let s=e.getPointPosition(0,t);i.moveTo(s.x,s.y);for(let o=1;o<r;o++)s=e.getPointPosition(o,t),i.lineTo(s.x,s.y)}}function ZM(e,t,n,r,i){const s=e.ctx,o=t.circular,{color:a,lineWidth:l}=t;!o&&!r||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),t1(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function ej(e,t,n){return Vr(e,{label:n,index:t,type:"pointLabel"})}class wo extends Ud{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Ct(Wd(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ht(t)&&!isNaN(t)?t:0,this.max=ht(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Wd(this.options))}generateTickLabels(t){Ud.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Qe(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?HM(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Qt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Kt(t*n+jr(r))}getDistanceFromCenterForValue(t){if(We(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(We(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return ej(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Gt+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),t1(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,o=this._pointLabels.length;let a,l,c;if(n.pointLabels.display&&JM(this,o),i.display&&this.ticks.forEach((u,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=i.setContext(f),g=s.setContext(f);ZM(this,h,l,o,g)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const u=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.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,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=ut(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const d=Ct(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}Ei(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}}ye(wo,"id","radialLinear"),ye(wo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Nf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ye(wo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ye(wo,"descriptors",{angleLines:{_fallback:"grid"}});const Hc={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}},It=Object.keys(Hc);function wm(e,t){return e-t}function Sm(e,t){if(We(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:s}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),ht(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(ea(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Cm(e,t,n,r){const i=It.length;for(let s=It.indexOf(e);s<i-1;++s){const o=Hc[It[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return It[s]}return It[i-1]}function tj(e,t,n,r,i){for(let s=It.length-1;s>=It.indexOf(n);s--){const o=It[s];if(Hc[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return It[n?It.indexOf(n):0]}function nj(e){for(let t=It.indexOf(e)+1,n=It.length;t<n;++t)if(Hc[It[t]].common)return It[t]}function _m(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=If(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function rj(e,t,n,r){const i=e._adapter,s=+i.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function km(e,t,n){const r=[],i={},s=t.length;let o,a;for(o=0;o<s;++o)a=t[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:rj(e,r,i,n)}class oc extends Us{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new F5._date(t.adapters.date);i.init(n),Oo(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:Sm(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=ht(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=ht(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=g3(i,s,o);return this._unit=n.unit||(r.autoSkip?Cm(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):tj(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:nj(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),km(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,s;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,s=this.getDecimalForValue(t[t.length-1]),t.length===1?r=s:r=(s-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=on(n,0,o),r=on(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Cm(s.minUnit,n,r,this._getLabelCapacity(n)),a=Pe(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,c=ea(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)_m(u,f,g);return(f===r||i.bounds==="ticks"||h===1)&&_m(u,f,g),Object.keys(u).sort(wm).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return Qe(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=jr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(t,0,km(this,[t],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(Sm(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return m3(t.sort(wm))}}ye(oc,"id","time"),ye(oc,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function gl(e,t,n){let r=0,i=e.length-1,s,o,a,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=li(e,"pos",t)),{pos:s,time:a}=e[r],{pos:o,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=li(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const c=o-s;return c?a+(l-a)*(t-s)/c:a}class Om extends oc{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=gl(n,this.min),this._tableRange=gl(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,c,u;for(o=0,a=t.length;o<a;++o)c=t[o],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&s.push({time:c,pos:o/(a-1)});return s}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(gl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return gl(this._table,r*this._tableRange+this._minPos,!0)}}ye(Om,"id","timeseries"),ye(Om,"defaults",oc.defaults);const n1="label";function Em(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function ij(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function r1(e,t){e.labels=t}function i1(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n1;const r=[];e.datasets=t.map(i=>{const s=e.datasets.find(o=>o[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function sj(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n1;const n={labels:[],datasets:[]};return r1(n,e.labels),i1(n,e.datasets,t),n}function oj(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,h=z.useRef(null),g=z.useRef(null),m=()=>{h.current&&(g.current=new qc(h.current,{type:o,data:sj(a,s),options:l&&{...l},plugins:c}),Em(t,g.current))},p=()=>{Em(t,null),g.current&&(g.current.destroy(),g.current=null)};return z.useEffect(()=>{!i&&g.current&&l&&ij(g.current,l)},[i,l]),z.useEffect(()=>{!i&&g.current&&r1(g.current.config.data,a.labels)},[i,a.labels]),z.useEffect(()=>{!i&&g.current&&a.datasets&&i1(g.current.config.data,a.datasets,s)},[i,a.datasets]),z.useEffect(()=>{g.current&&(i?(p(),setTimeout(m)):g.current.update(d))},[i,l,a.labels,a.datasets,d]),z.useEffect(()=>{g.current&&(p(),setTimeout(m))},[o]),z.useEffect(()=>(m(),()=>p()),[]),z.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},u)}const aj=z.forwardRef(oj);function s1(e,t){return qc.register(t),z.forwardRef((n,r)=>z.createElement(aj,{...n,ref:r,type:e}))}const lj=s1("line",$l),cj=s1("radar",Ml);qc.register(Hd,Kd,wo,Dr,Ll,wM,TM,RM,EM);var Vd={elements:{line:{backgroundColor:"rgba(166, 30, 105, 0.2)",borderColor:"rgba(166, 30, 105, 1)",borderWidth:4},point:{backgroundColor:"rgba(166, 30, 105, 1)",borderColor:"rgba(255,255,255, .9)",borderWidth:2,radius:5,hoverRadius:6,hoverBorderWidth:3}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1}},uj=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.2)";var i=n.createLinearGradient(0,r.top,0,r.bottom);return i.addColorStop(0,"rgba(166, 30, 105, 0.6)"),i.addColorStop(1,"rgba(255, 255, 255, 0.1)"),i},dj=function(t){var n=t.chart.ctx,r=t.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.1)";var i=(r.left+r.right)/2,s=(r.top+r.bottom)/2,o=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2),a=n.createRadialGradient(i,s,0,i,s,o);return a.addColorStop(0,"rgba(255, 255, 255, 0.4)"),a.addColorStop(.3,"rgba(255, 255, 255, 0.4)"),a.addColorStop(1,"rgba(166, 30, 105, 0.2)"),a};function fj(e){return mj(e)||yj(e)||gj(e)||hj()}function hj(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gj(e,t){if(e){if(typeof e=="string")return Gd(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gd(e,t):void 0}}function yj(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mj(e){if(Array.isArray(e))return Gd(e)}function Gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Am(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Am(Object(n),!0).forEach(function(r){pj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Am(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pj(e,t,n){return(t=vj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vj(e){var t=bj(e,"string");return Ai(t)=="symbol"?t:t+""}function bj(e,t){if(Ai(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ai(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ai(e){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(e)}function xj(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var wj=function(){var t,n,r,i,s,o,a=Hs(),l=a.data,c=a.isLoading,u=a.isRefetching,d=l==null?void 0:l.mentions,f=d==null||(t=d.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,h=d==null?void 0:d.chart,g=Array.isArray(h==null?void 0:h.labels)?h.labels:h!=null&&h.labels&&Ai(h.labels)==="object"?Object.values(h.labels):[],m=g.map(function(b){return xj(String(b))}),p=Array.isArray(h==null?void 0:h.datasets)?h.datasets:h!=null&&h.datasets&&Ai(h.datasets)==="object"?Object.values(h.datasets):[],v=yl(yl({},Vd),{},{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!0,title:{display:!1,text:"Date"},grid:{display:!1}},y:{display:!0,title:{display:!1,text:"Number of Mentions"},beginAtZero:!0,max:Array.isArray(h==null||(n=h.datasets)===null||n===void 0||(n=n[0])===null||n===void 0?void 0:n.data)?Math.max.apply(Math,fj(h.datasets[0].data).concat([0]))+2:2,ticks:{stepSize:1}}}});return y.jsx(A.Card,{className:"yst-overflow-visible",children:y.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(Pa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),y.jsx(Ta,{score:d==null||(r=d.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value,total:d==null||(i=d.mentionedInNumberOfQueries)===null||i===void 0?void 0:i.value,delta:f,deltaSuffix:"since last scan",suffix:"queries",isLoading:c||u})]}),Array.isArray(h==null||(s=h.datasets)===null||s===void 0?void 0:s.data)&&(h==null||(o=h.datasets)===null||o===void 0?void 0:o.data.length)<2?y.jsx(A.Alert,{variant:"info",children:"Needs multiple analyses before info can be shown."}):y.jsx("div",{className:"yst-h-72",children:y.jsx(lj,{data:function(){var b={labels:m,datasets:p.map(function(w){return yl(yl({},w),{},{backgroundColor:uj,pointBackgroundColor:"rgba(166, 30, 105, 1)"})})};return b}(),options:v})})]})})};function ml(e){var t=e.value,n=t===void 0?"—":t,r=e.label,i=e.tooltip,s=e.className,o=e.borderBottom,a=o===void 0?!1:o,l=e.borderRight,c=l===void 0?!1:l,u=e.delta;return y.jsxs("div",{className:Ce("yst-relative yst-flex yst-flex-col yst-items-center yst-gap-1 yst-p-4 yst-text-center",a&&"yst-border-b yst-border-slate-200",c&&"yst-border-r yst-border-slate-200",s),children:[y.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),y.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof u=="number"&&y.jsxs("p",{className:Ce("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",ib(u)),children:[u>0?y.jsx(UE,{}):u<0?y.jsx(BE,{}):null,u>-1&&"+",u]}),i&&y.jsx(Af,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",children:i})]})}function Sj(e){var t=e.children,n=e.className;return y.jsx("div",{className:Ce("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function na(e){"@babel/helpers - typeof";return na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(e)}function Tm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tm(Object(n),!0).forEach(function(r){Cj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cj(e,t,n){return(t=_j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _j(e){var t=kj(e,"string");return na(t)=="symbol"?t:t+""}function kj(e,t){if(na(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(na(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oj(){var e,t,n,r,i,s,o,a,l,c,u,d,f,h,g,m,p,v,b=Wr(),w=b.brandId,S=b.analysisId,x=Pc(w,S,{query:{select:function(te){var ae=te.data;return ae},enabled:!!w&&!!S}}),E=x.data,C=x.isLoading,k=E==null||(e=E.analysis)===null||e===void 0?void 0:e.scans,_=Array.isArray(k)&&k.length>0?k.find(function(V){return V.id===Number(S)}):void 0,O=_==null||(t=_.scores)===null||t===void 0?void 0:t.raw,P=_==null||(n=_.scores)===null||n===void 0?void 0:n.standardized,j=(r=_==null||(i=_.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0?void 0:i.value)!==null&&r!==void 0?r:0,W=(s=_==null||(o=_.citations)===null||o===void 0||(o=o.total)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,I=_==null||(a=_.rankings)===null||a===void 0||(a=a.list)===null||a===void 0?void 0:a.find(function(V){var te;return((te=V.brand)===null||te===void 0?void 0:te.isSelf)===!0}),D=(l=I==null||(c=I.rank)===null||c===void 0?void 0:c.value)!==null&&l!==void 0?l:null,L=100-(D!=null?D:100),F=(u=_==null||(d=_.scores)===null||d===void 0||(d=d.standardized)===null||d===void 0||(d=d.sentiment)===null||d===void 0?void 0:d.value)!==null&&u!==void 0?u:0,oe=(f=_==null||(h=_.scores)===null||h===void 0||(h=h.standardized)===null||h===void 0||(h=h.visibility)===null||h===void 0?void 0:h.value)!==null&&f!==void 0?f:0,fe={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[j,L,W,F],backgroundColor:dj,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},B=pl(pl({},Vd),{},{plugins:pl(pl({},Vd.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(te){var ae=te.label||"",R=te.parsed.r||0;return"".concat(ae,": ").concat(R,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}});return y.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:y.jsxs(A.Card.Content,{children:[y.jsx(A.Title,{size:"3",className:"yst-mb-2",children:"AI visibility score"}),y.jsx(Ta,{score:oe,total:100,isLoading:C}),y.jsxs("div",{className:"yst-flex yst-flex-col yst-items-center yst-justify-around yst-justify-items-center yst-gap-8 md:yst-flex-row",children:[y.jsxs("div",{className:"yst-radar-chart-container yst-relative yst-aspect-square yst-h-full yst-w-full md:yst-flex md:yst-w-1/2 md:yst-items-center md:yst-justify-center",children:[y.jsx(cj,{data:fe,options:B}),y.jsx(Af,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",placement:"left",children:"The AI Visibility Index (AIVI) shows how visible your brand is across major AI platforms like ChatGPT, based on mentions, citations, sentiment, and rankings."})]}),y.jsx("div",{className:"yst-mt-6 yst-w-full md:yst-mt-0 md:yst-flex md:yst-w-1/2 md:yst-items-center",children:y.jsxs(Sj,{children:[y.jsx(ml,{value:j,label:"Mentions",tooltip:"Mentions show how often your brand appears in AI-generated answers to the questions we send to LLMs.",borderBottom:!0,borderRight:!0,delta:O==null||(g=O.mentions)===null||g===void 0||(g=g.previous)===null||g===void 0?void 0:g.value}),y.jsx(ml,{value:D&&y.jsxs(y.Fragment,{children:[D,D===1&&" 🏆"]}),label:"Competitor ranking",tooltip:"Ranking shows the position your brand is mentioned in AI-generated answers—whether in a numbered list or the order of appearance in full-text responses.",borderBottom:!0,delta:O==null||(m=O.ranking)===null||m===void 0||(m=m.previous)===null||m===void 0?void 0:m.value}),y.jsx(ml,{value:W,label:"Citations",tooltip:"Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",borderRight:!0,delta:O==null||(p=O.citations)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value}),y.jsx(ml,{value:F?"".concat(F,"%"):"—%",label:"Positive sentiment",tooltip:"Sentiment reflects how positively, neutrally, or negatively your brand is mentioned in AI-generated answers, based on the cited sources.",delta:P==null||(v=P.sentiment)===null||v===void 0||(v=v.previous)===null||v===void 0?void 0:v.percentageChange})]})})]})]})})}var ei={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},Iu=function(){var t=Wr(),n=t.brandId,r=t.analysisId,i=zs({query:{select:function(x){var E=x.data;return E==null?void 0:E.brands}}}),s=i.data,o=i.isLoading,a=Vv(n,{query:{enabled:!!n,select:function(x){var E=x.data;return E}}}),l=a.data,c=a.isLoading,u=Pc(n,r,{query:{enabled:!!n&&!!r,select:function(x){var E=x.data;return E==null?void 0:E.analysis}}}),d=u.data,f=u.isLoading,h=(l==null?void 0:l.name)||"your brand",g=FE(l==null?void 0:l.nextScheduledAnalysis),m=d==null?void 0:d.status,p=function(){switch(m){case ei.pending:return{alertContent:y.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[y.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),y.jsxs("p",{children:["You've completed the setup for"," ",y.jsx("b",{className:"yst-font-medium",children:h}),". The analysis is scheduled to run on"," ",y.jsx("b",{className:"yst-font-medium",children:g}),". You'll see the results here once it's ready, and we'll also notify you by email."]})]}),alertVariant:"info"};case ei.processing:return{alertContent:y.jsxs(y.Fragment,{children:["You've completed the setup for ",h,". The analysis is now processing. You'll see the results here once it's ready, and we'll also notify you by email."]}),alertVariant:"info"};case ei.failed:return{alertContent:y.jsx(y.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"};case ei.cancelled:return{alertContent:y.jsx(y.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"};case ei.completed:return{alertContent:null};default:return{alertContent:null,alertVariant:"info"}}}(),v=p.alertContent,b=p.alertVariant,w=o||c||f;return w||s&&(s==null?void 0:s.length)>0?y.jsxs("div",{className:"yst-space-y-8",children:[y.jsx(EP,{}),m!==ei.completed&&v&&y.jsx(A.Alert,{className:"md:yst-col-span-2",variant:b,children:v}),w||[ei.completed].includes(m)&&y.jsxs("div",{className:"yst-space-y-4",children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsx(A.Title,{size:"2",children:"Your brand analysis"}),y.jsxs(A.Button,{as:Kr,variant:"secondary",to:"/brand-list",className:Ce("yst-gap-1.5"),disabled:!n,children:[y.jsx(Zv,{})," Edit brand list"]})]}),y.jsx("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:y.jsxs(y.Fragment,{children:[y.jsx(Oj,{}),y.jsx(AP,{}),y.jsx(wj,{}),y.jsx(BA,{}),y.jsx(DA,{}),y.jsx(vA,{}),y.jsx(qA,{})]})})]})]}):y.jsx(nA,{})};function o1(e){var t=e.children,n=e.description,r=e.title;return y.jsxs(A.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&y.jsx(A.Title,{className:Ce({"yst-mb-3":n||t}),children:r}),n&&y.jsx("p",{children:n}),t]})}var Ej=function(){return y.jsx(A.Card,{className:"yst-mb-4",children:y.jsxs(A.Card.Content,{className:"yst-flex yst-flex-col yst-gap-8",children:[y.jsx(A.Title,{size:"2",children:"Query - Best fish restaurant in Nijmegen"}),y.jsxs("div",{children:[y.jsx("p",{children:"AI Response:"}),y.jsx(A.Link,{href:"#todo",children:"Show more"})]}),y.jsxs("div",{children:[y.jsx("p",{children:"Extracted brands:"}),y.jsx(A.Badge,{children:"Example"}),y.jsx(A.Badge,{children:"Example"}),y.jsx(A.Badge,{children:"Example"}),y.jsx(A.Badge,{children:"Example"}),y.jsx(A.Badge,{children:"Example"})]}),y.jsxs(A.Table,{children:[y.jsx(A.Table.Head,{children:y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Header,{children:"URL"}),y.jsx(A.Table.Header,{children:"Associated brand"})]})}),y.jsxs(A.Table.Body,{children:[y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Cell,{children:y.jsx(A.Link,{href:"https://example.com",target:"_blank",children:"https://example.com"})}),y.jsx(A.Table.Cell,{children:"Example Brand"})]}),y.jsxs(A.Table.Row,{children:[y.jsx(A.Table.Cell,{children:y.jsx(A.Link,{href:"https://example2.com",target:"_blank",children:"https://example2.com"})}),y.jsx(A.Table.Cell,{children:"Example Brand 2"})]})]})]})]})})},Aj=function(){return y.jsxs(A.Card,{children:[y.jsx(o1,{title:"Query history"}),y.jsx(A.Card,{className:"yst-mb-4",children:y.jsxs(A.Card.Content,{children:[y.jsxs("p",{className:"yst-mb-8",children:["Manna Fish Restaurant - Analysis performed on:"," ",y.jsx(A.Badge,{children:"2025-04-08 12:31:21"})]}),[0,1,2,3,4].map(function(t){return y.jsx(Ej,{},t)})]})})]})},Tj=z.lazy(function(){return Promise.resolve().then(()=>MR)}),Pj=z.lazy(function(){return Promise.resolve().then(()=>sF)}),$j=z.lazy(function(){return Promise.resolve().then(()=>lF)}),Mj=z.lazy(function(){return Promise.resolve().then(()=>CF)}),jj=z.lazy(function(){return Promise.resolve().then(()=>FF)}),Dj=z.lazy(function(){return Promise.resolve().then(()=>qF)}),Lj=new z2({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),ti=function(){return y.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:y.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[y.jsx(A.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},Ij=function(t){var n=t.hideNav,r=n===void 0?!1:n,i=t.disableLayout,s=i===void 0?!1:i,o=t.DebugInfo;return y.jsx(Ww,{children:y.jsx(Mt,{element:y.jsx(HO,{}),children:y.jsxs(Mt,{element:y.jsx(DE,{hideNav:r,disableLayout:s,DebugInfo:o}),children:[y.jsxs(Mt,{path:"/",element:y.jsx(mc,{}),children:[y.jsx(Mt,{index:!0,element:y.jsx(Iu,{})}),y.jsx(Mt,{path:"brands/:brandId",element:y.jsx(Iu,{})}),y.jsx(Mt,{path:"brands/:brandId/analysis/:analysisId",element:y.jsx(Iu,{})}),y.jsx(Mt,{path:"/brand-list",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(Tj,{})})}),y.jsxs(Mt,{path:"/setup",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx($j,{})}),children:[y.jsx(Mt,{index:!0,element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(Mj,{})})}),y.jsx(Mt,{path:":brandId/queries",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(jj,{})})})]}),y.jsx(Mt,{path:"/setup/:brandId/analysis",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(Dj,{})})})]}),y.jsx(Mt,{path:"/settings",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(Pj,{})})}),y.jsx(Mt,{path:"/query-history",element:y.jsx(z.Suspense,{fallback:y.jsx(ti,{}),children:y.jsx(Aj,{})})})]})})})},Rj=function(t){var n=t.DebugInfo;return LE(),y.jsxs(V2,{client:Lj,children:[y.jsx(xO,{children:y.jsx(Ij,{DebugInfo:n})}),y.jsx(DC,{initialIsOpen:!1})]})},Fj=function(t){var n=t.routerType,r=n===void 0?"memory":n,i=t.initialRoute,s=i===void 0?"/":i,o=t.isRtl,a=o===void 0?!1:o,l=t.className,c=t.style,u=t.token,d=u===void 0?"":u,f=t.apiUrl,h=t.DebugInfo;z.useEffect(function(){f&&(Uv(f),CO(f),jO(f)),DO(d)},[f,d]);var g=z.useMemo(function(){switch(r){case"browser":return m2;case"hash":return p2;case"memory":default:return Kw}},[r]),m=r==="memory"?{initialEntries:[s]}:{};return y.jsx("div",{className:l,style:c,children:y.jsx(g,{...m,children:y.jsx(A.Root,{context:{isRtl:a},children:y.jsx(Rj,{DebugInfo:h})})})})},Nj=e=>e!=null,Bj=e=>e.filter(Nj);function qj(e){return(...t)=>{for(const n of e)n&&n(...t)}}var K=e=>typeof e=="function"&&!e.length?e():e,Qd=e=>Array.isArray(e)?e:e?[e]:[];function zj(e,...t){return typeof e=="function"?e(...t):e}var Hj=be;function Uj(e,t,n,r){const i=e.length,s=t.length;let o=0;if(!s){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<s;o++)r(t[o]);return}for(;o<s&&t[o]===e[o];o++);let a,l;t=t.slice(o),e=e.slice(o);for(a of t)e.includes(a)||r(a);for(l of e)t.includes(l)||n(l)}function Kj(e){const[t,n]=ne(),r=e!=null&&e.throw?(f,h)=>{throw n(f instanceof Error?f:new Error(h)),f}:(f,h)=>{n(f instanceof Error?f:new Error(h))},i=e!=null&&e.api?Array.isArray(e.api)?e.api:[e.api]:[globalThis.localStorage].filter(Boolean),s=e!=null&&e.prefix?`${e.prefix}.`:"",o=new Map,a=new Proxy({},{get(f,h){let g=o.get(h);g||(g=ne(void 0,{equals:!1}),o.set(h,g)),g[0]();const m=i.reduce((p,v)=>{if(p!==null||!v)return p;try{return v.getItem(`${s}${h}`)}catch(b){return r(b,`Error reading ${s}${h} from ${v.name}`),null}},null);return m!==null&&(e!=null&&e.deserializer)?e.deserializer(m,h,e.options):m}}),l=(f,h,g)=>{const m=e!=null&&e.serializer?e.serializer(h,f,g!=null?g:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(w){r(w,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},c=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(g){r(g,`Error removing ${s}${f} from ${h.name}`)}}),u=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(g,m)=>{if(!f.hasOwnProperty(g)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,g,e.options):m;p&&(f[g]=p)}};return i.forEach(g=>{if(typeof g.getAll=="function"){let m;try{m=g.getAll()}catch(p){r(p,`Error getting all values from in ${g.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=g.key(m++);)f.hasOwnProperty(p)||h(p,g.getItem(p))}catch(v){r(v,`Error getting all values from ${g.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&dr(()=>{const f=h=>{var m;let g=!1;i.forEach(p=>{try{p!==h.storageArea&&h.key&&h.newValue!==p.getItem(h.key)&&(h.newValue?p.setItem(h.key,h.newValue):p.removeItem(h.key),g=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),g&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),be(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var g;return(g=h.addEventListener)==null?void 0:g.call(h,"storage",f)}),be(()=>i.forEach(h=>{var g;return(g=h.removeEventListener)==null?void 0:g.call(h,"storage",f)})))}),[a,l,{clear:u,error:t,remove:c,toJSON:d}]}var a1=Kj,Wj=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),Pm=e=>{if(!e)return"";let t="";for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];t+=r instanceof Date?`; ${n}=${r.toUTCString()}`:typeof r=="boolean"?`; ${n}`:`; ${n}=${r}`}return t},en=Wj({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=en._cookies[0][en._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=en.getItem(e);en._cookies[0][en._cookies[1]]=`${e}=${t}${Pm(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:en});window.dispatchEvent(i)},removeItem:e=>{en._cookies[0][en._cookies[1]]=`${e}=deleted${Pm({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return en._cookies[0][en._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return en._cookies[0][en._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),Vj=1024,Ti=796,Wf=700,Gj="bottom-right",Yd="bottom",l1="system",Qj=!1,c1=500,Yj=500,u1=500,Xj=Object.keys(yd)[0],$m=1,Jj=Object.keys(md)[0],Vf=yt({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function he(){return mt(Vf)}var d1=yt(void 0),f1=e=>{const[t,n]=ne(null),r=()=>{const o=t();o!=null&&(o.close(),n(null))},i=(o,a)=>{if(t()!=null)return;const l=window.open("","TSQD-Devtools-Panel",`width=${o},height=${a},popup`);if(!l)throw new Error("Failed to open popup. Please allow popups for this site to view the devtools in picture-in-picture mode.");l.document.head.innerHTML="",l.document.body.innerHTML="",IS(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(he().shadowDOMTarget||document).styleSheets].forEach(c=>{try{const u=[...c.cssRules].map(g=>g.cssText).join(""),d=document.createElement("style"),f=c.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=u,l.document.head.appendChild(d)}catch(u){const d=document.createElement("link");if(c.href==null)return;d.rel="stylesheet",d.type=c.type,d.media=c.media.toString(),d.href=c.href,l.document.head.appendChild(d)}}),wc(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};ve(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||Yj))}),ve(()=>{const o=(he().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const c=(he().shadowDOMTarget||a.document).querySelector("#_goober");c&&(c.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),be(()=>{l.disconnect()})}});const s=q(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return $(d1.Provider,{value:s,get children(){return e.children}})},Gf=()=>q(()=>{const t=mt(d1);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),Qf=yt(()=>"dark");function gt(){return mt(Qf)}var h1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},Zj=Object.keys(h1).join("|"),e4=new RegExp(Zj,"g");function t4(e){return e.replace(e4,t=>h1[t])}var Lt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Mm(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Lt.MATCHES,!n.accessors){const o=jm(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=s4(e,n.accessors),s={rankedValue:e,rank:Lt.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=jm(a.itemValue,t,n);const{minRanking:c,maxRanking:u,threshold:d=n.threshold}=a.attributes;l<c&&l>=Lt.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function jm(e,t,n){return e=Dm(e,n),t=Dm(t,n),t.length>e.length?Lt.NO_MATCH:e===t?Lt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Lt.EQUAL:e.startsWith(t)?Lt.STARTS_WITH:e.includes(` ${t}`)?Lt.WORD_STARTS_WITH:e.includes(t)?Lt.CONTAINS:t.length===1?Lt.NO_MATCH:n4(e).includes(t)?Lt.ACRONYM:r4(e,t))}function n4(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function r4(e,t){let n=0,r=0;function i(l,c,u){for(let d=u,f=c.length;d<f;d++)if(c[d]===l)return n+=1,d+1;return-1}function s(l){const c=1/l,u=n/t.length;return Lt.MATCHES+u*c}const o=i(t[0],e,0);if(o<0)return Lt.NO_MATCH;r=o;for(let l=1,c=t.length;l<c;l++){const u=t[l];if(r=i(u,e,r),!(r>-1))return Lt.NO_MATCH}const a=r-o;return s(a)}function Dm(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=t4(e)),e}function i4(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function s4(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=o4(s),a=i4(e,s);for(let l=0,c=a.length;l<c;l++)n.push({itemValue:a[l],attributes:o})}return n}var Lm={maxRanking:1/0,minRanking:-1/0};function o4(e){return typeof e=="function"?Lm:{...Lm,...e}}var a4={data:""},l4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||a4,c4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,u4=/\/\*[^]*?\*\/| +/g,Im=/\n+/g,si=(e,t)=>{let n="",r="",i="";for(let s in e){let o=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+o+";":r+=s[1]=="f"?si(o,s):s+"{"+si(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=si(o,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):o!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=si.p?si.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Gn={},g1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+g1(e[n]);return t}return e},d4=(e,t,n,r,i)=>{let s=g1(e),o=Gn[s]||(Gn[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!Gn[o]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=c4.exec(c.replace(u4,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Im," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Im," ").trim();return f[0]})(e);Gn[o]=si(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&Gn.g?Gn.g:null;return n&&(Gn.g=Gn[o]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Gn[o],t,r,a),o},f4=(e,t,n)=>e.reduce((r,i,s)=>{let o=t[s];if(o&&o.call){let a=o(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=l?"."+l:a&&typeof a=="object"?a.props?"":si(a,""):a===!1?"":a}return r+i+(o==null?"":o)},"");function Te(e){let t=this||{},n=e.call?e(t.p):e;return d4(n.unshift?n.raw?f4(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,l4(t.target),t.g,t.o,t.k)}Te.bind({g:1});Te.bind({k:1});function y1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=y1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ie(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=y1(e))&&(r&&(r+=" "),r+=t);return r}function h4(e,t){const n=tt(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=ne([],{equals:!1}),[l]=hS(),c=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},u=(d,f,h)=>d.splice(h,0,f);return q(d=>{const f=o(),h=e();if(h[vc],tt(l))return l(),d;if(f.length){const g=d.filter(m=>!f.includes(m));return f.length=0,r({list:g,added:[],removed:[],unchanged:g,finishRemoved:c}),g}return tt(()=>{const g=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const S of h)(i.has(S)?b:p).push(S);let w=!p.length;for(let S=0;S<d.length;S++){const x=d[S];g.has(x)||(s.has(x)||(v.push(x),s.add(x)),u(m,x,S)),w&&x!==m[S]&&(w=!1)}return!v.length&&w?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:c}),i=g,m)})},t.appear?[]:n.slice())}function At(...e){return qj(e)}var Rm=e=>e instanceof Element;function Xd(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return Xd(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=Xd(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function g4(e,t=Rm,n=Rm){const r=q(e),i=q(()=>Xd(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function y4(e){return q(()=>{const t=e.name||"s";return{enterActive:(e.enterActiveClass||t+"-enter-active").split(" "),enter:(e.enterClass||t+"-enter").split(" "),enterTo:(e.enterToClass||t+"-enter-to").split(" "),exitActive:(e.exitActiveClass||t+"-exit-active").split(" "),exit:(e.exitClass||t+"-exit").split(" "),exitTo:(e.exitToClass||t+"-exit-to").split(" "),move:(e.moveClass||t+"-move").split(" ")}})}function m1(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function m4(e,t,n,r){const{onBeforeEnter:i,onEnter:s,onAfterEnter:o}=t;i==null||i(n),n.classList.add(...e.enter),n.classList.add(...e.enterActive),queueMicrotask(()=>{if(!n.parentNode)return r==null?void 0:r();s==null||s(n,()=>a())}),m1(()=>{n.classList.remove(...e.enter),n.classList.add(...e.enterTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.enterActive),n.classList.remove(...e.enterTo),o==null||o(n))}}function p4(e,t,n,r){const{onBeforeExit:i,onExit:s,onAfterExit:o}=t;if(!n.parentNode)return r==null?void 0:r();i==null||i(n),n.classList.add(...e.exit),n.classList.add(...e.exitActive),s==null||s(n,()=>a()),m1(()=>{n.classList.remove(...e.exit),n.classList.add(...e.exitTo),(!s||s.length<2)&&(n.addEventListener("transitionend",a),n.addEventListener("animationend",a))});function a(l){(!l||l.target===n)&&(r==null||r(),n.removeEventListener("transitionend",a),n.removeEventListener("animationend",a),n.classList.remove(...e.exitActive),n.classList.remove(...e.exitTo),o==null||o(n))}}var Fm=e=>{const t=y4(e);return h4(g4(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)m4(o,e,l);const a=[];for(const l of s)l.isConnected&&(l instanceof HTMLElement||l instanceof SVGElement)&&a.push({el:l,rect:l.getBoundingClientRect()});queueMicrotask(()=>{const l=[];for(const{el:c,rect:u}of a)if(c.isConnected){const d=c.getBoundingClientRect(),f=u.left-d.left,h=u.top-d.top;(f||h)&&(c.style.transform=`translate(${f}px, ${h}px)`,c.style.transitionDuration="0s",l.push(c))}document.body.offsetHeight;for(const c of l){let u=function(d){(d.target===c||/transform$/.test(d.propertyName))&&(c.removeEventListener("transitionend",u),c.classList.remove(...o.move))};c.classList.add(...o.move),c.style.transform=c.style.transitionDuration="",c.addEventListener("transitionend",u)}});for(const l of r)p4(o,e,l,()=>i([l]))}})},Ru=Symbol("fallback");function Nm(e){for(const t of e)t.dispose()}function v4(e,t,n,r={}){const i=new Map;return be(()=>Nm(i.values())),()=>{const o=e()||[];return o[vc],tt(()=>{var u,d;if(!o.length)return Nm(i.values()),i.clear(),r.fallback?[ar(h=>(i.set(Ru,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(Ru);if(!i.size||l){l==null||l.dispose(),i.delete(Ru);for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);s(a,h,f,g)}return a}const c=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],g=t(h,f);c.delete(g);const m=i.get(g);m?(a[f]=m.mapped,(u=m.setIndex)==null||u.call(m,f),m.setItem(()=>h)):s(a,h,f,g)}for(const f of c)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,c){ar(u=>{const[d,f]=ne(a),h={setItem:f,dispose:u};if(n.length>1){const[g,m]=ne(l);h.setIndex=m,h.mapped=n(d,g)}else h.mapped=n(d);i.set(c,h),o[l]=h.mapped})}}function ac(e){const{by:t}=e;return q(v4(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function b4(e,t,n,r){return e.addEventListener(t,n,r),Hj(e.removeEventListener.bind(e,t,n,r))}function x4(e,t,n,r){const i=()=>{Qd(K(e)).forEach(s=>{s&&Qd(K(t)).forEach(o=>b4(s,o,n,r))})};typeof e=="function"?ve(i):pe(i)}function w4(e,t){const n=new ResizeObserver(e);return be(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function p1(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=w4(o=>{for(const a of o){const{contentRect:l,target:c}=a,u=Math.round(l.width),d=Math.round(l.height),f=r.get(c);(!f||f.width!==u||f.height!==d)&&(t(l,c,a),r.set(c,{width:u,height:d}))}},n);ve(o=>{const a=Bj(Qd(K(e)));return Uj(a,o,i,s),a},[])}var S4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function Bm(e){const t={};let n;for(;n=S4.exec(e);)t[n[1]]=n[2];return t}function Uc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=Bm(e)}else typeof t=="string"&&(t=Bm(t));return{...e,...t}}function C4(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Jd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _4(e){return typeof e=="number"}function Ui(e){return Object.prototype.toString.call(e)==="[object String]"}function k4(e){return typeof e=="function"}function Da(e){return t=>`${e()}-${t}`}function ln(e,t){return e?e===t||e.contains(t):!1}function So(e,t=!1){const{activeElement:n}=Nn(e);if(!(n!=null&&n.nodeName))return null;if(v1(n)&&n.contentDocument)return So(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Nn(n).getElementById(r);if(i)return i}}return n}function O4(e){return Nn(e).defaultView||window}function Nn(e){return e?e.ownerDocument||e:document}function v1(e){return e.tagName==="IFRAME"}var Yf=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Yf||{});function Xf(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function Kc(){return Xf(/^Mac/i)}function E4(){return Xf(/^iPhone/i)}function A4(){return Xf(/^iPad/i)||Kc()&&navigator.maxTouchPoints>1}function T4(){return E4()||A4()}function P4(){return Kc()||T4()}function Ye(e,t){return t&&(k4(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function ft(e){return t=>{for(const n of e)Ye(t,n)}}function $4(e){return Kc()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function xt(e){if(e)if(M4())e.focus({preventScroll:!0});else{const t=j4(e);e.focus(),D4(t)}}var vl=null;function M4(){if(vl==null){vl=!1;try{document.createElement("div").focus({get preventScroll(){return vl=!0,!0}})}catch(e){}}return vl}function j4(e){let t=e.parentNode;const n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function D4(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var b1=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],L4=[...b1,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Jf=b1.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",I4=L4.join(':not([hidden]):not([tabindex="-1"]),');function x1(e,t){const r=Array.from(e.querySelectorAll(Jf)).filter(qm);return t&&qm(e)&&r.unshift(e),r.forEach((i,s)=>{if(v1(i)&&i.contentDocument){const o=i.contentDocument.body,a=x1(o,!1);r.splice(s,1,...a)}}),r}function qm(e){return w1(e)&&!R4(e)}function w1(e){return e.matches(Jf)&&Zf(e)}function R4(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function Zf(e,t){return e.nodeName!=="#comment"&&F4(e)&&N4(e,t)&&(!e.parentElement||Zf(e.parentElement,e))}function F4(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:i}=e.ownerDocument.defaultView,{display:s,visibility:o}=i(e);r=s!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function N4(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function B4(e,t,n){const r=t!=null&&t.tabbable?I4:Jf,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var o;return(o=t==null?void 0:t.from)!=null&&o.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&Zf(s)&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function zm(e){for(;e&&!q4(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function q4(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function z4(){}function H4(e,t){const[n,r]=e;let i=!1;const s=t.length;for(let o=s,a=0,l=o-1;a<o;l=a++){const[c,u]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],g=(u-f)*(n-c)-(c-d)*(r-u);if(f<u){if(r>=f&&r<u){if(g===0)return!0;g>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(u<f){if(r>u&&r<=f){if(g===0)return!0;g<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return i}function je(e,t){return _e(e,t)}var co=new Map,Hm=new Set;function Um(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=co.get(n.target);r||(r=new Set,co.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=co.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),co.delete(n.target)),co.size===0)){for(const i of Hm)i();Hm.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?Um():document.addEventListener("DOMContentLoaded",Um));function Zd(e,t){const n=Km(e,t,"left"),r=Km(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,c=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>c&&(a+=r+s-c),e.scrollLeft=o,e.scrollTop=a}function Km(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function U4(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=zm(e);for(;e&&o&&e!==i&&o!==i;)Zd(o,e),e=o,o=zm(e)}else{const{left:o,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:c}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var S1={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function cn(e){return t=>(e(t),()=>e(void 0))}function Wc(e,t){const[n,r]=ne(Wm(t==null?void 0:t()));return ve(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||Wm(t==null?void 0:t()))}),n}function Wm(e){return Ui(e)?e:void 0}function Ze(e){const[t,n]=He(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return $(VS,_e(n,{get component(){return t.as}}))}var K4=["id","name","validationState","required","disabled","readOnly"];function W4(e){const t=`form-control-${fn()}`,n=je({id:t},e),[r,i]=ne(),[s,o]=ne(),[a,l]=ne(),[c,u]=ne(),d=(m,p,v)=>{const b=v!=null||r()!=null;return[v,r(),b&&p!=null?m:void 0].filter(Boolean).join(" ")||void 0},f=m=>[a(),c(),m].filter(Boolean).join(" ")||void 0,h=q(()=>({"data-valid":K(n.validationState)==="valid"?"":void 0,"data-invalid":K(n.validationState)==="invalid"?"":void 0,"data-required":K(n.required)?"":void 0,"data-disabled":K(n.disabled)?"":void 0,"data-readonly":K(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=K(n.name))!=null?m:K(n.id)},dataset:h,validationState:()=>K(n.validationState),isRequired:()=>K(n.required),isDisabled:()=>K(n.disabled),isReadOnly:()=>K(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Da(()=>K(n.id)),registerLabel:cn(i),registerField:cn(o),registerDescription:cn(l),registerErrorMessage:cn(u)}}}var C1=yt();function La(){const e=mt(C1);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function _1(e){const t=La(),n=je({id:t.generateId("description")},e);return ve(()=>be(t.registerDescription(n.id))),$(Ze,_e({as:"div"},()=>t.dataset(),n))}function k1(e){const t=La(),n=je({id:t.generateId("error-message")},e),[r,i]=He(n,["forceMount"]),s=()=>t.validationState()==="invalid";return ve(()=>{s()&&be(t.registerErrorMessage(i.id))}),$(me,{get when(){return r.forceMount||s()},get children(){return $(Ze,_e({as:"div"},()=>t.dataset(),i))}})}function V4(e){let t;const n=La(),r=je({id:n.generateId("label")},e),[i,s]=He(r,["ref"]),o=Wc(()=>t,()=>"label");return ve(()=>be(n.registerLabel(s.id))),$(Ze,_e({as:"label",ref(a){const l=At(c=>t=c,i.ref);typeof l=="function"&&l(a)},get for(){return q(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function G4(e,t){ve(ur(e,n=>{if(n==null)return;const r=Q4(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),be(()=>{r.removeEventListener("reset",t)}))}))}function Q4(e){return Y4(e)?e.form:e.closest("form")}function Y4(e){return e.matches("textarea, input, select, button")}function Ia(e){var o;const[t,n]=ne((o=e.defaultValue)==null?void 0:o.call(e)),r=q(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=q(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{tt(()=>{var c;const l=zj(a,i());return Object.is(l,i())||(r()||n(l),(c=e.onChange)==null||c.call(e,l)),l})}]}function O1(e){const[t,n]=Ia(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function X4(e){const[t,n]=Ia(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function J4(e={}){const[t,n]=O1({value:()=>K(e.isSelected),defaultValue:()=>!!K(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!K(e.isReadOnly)&&!K(e.isDisabled)&&n(s)},toggle:()=>{!K(e.isReadOnly)&&!K(e.isDisabled)&&n(!t())}}}var Z4=Object.defineProperty,Vc=(e,t)=>{for(var n in t)Z4(e,n,{get:t[n],enumerable:!0})},E1=yt();function A1(){return mt(E1)}function eD(){const e=A1();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function T1(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function tD(e,t){var i;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const s=(i=e[r])==null?void 0:i.ref();if(s&&T1(s,n))return r+1}return 0}function nD(e){const t=e.map((r,i)=>[i,r]);let n=!1;return t.sort(([r,i],[s,o])=>{const a=i.ref(),l=o.ref();return a===l||!a||!l?0:T1(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function P1(e,t){const n=nD(e);e!==n&&t(n)}function rD(e){var i,s;const t=e[0],n=(i=e[e.length-1])==null?void 0:i.ref();let r=(s=t==null?void 0:t.ref())==null?void 0:s.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return Nn(r).body}function iD(e,t){ve(()=>{const n=setTimeout(()=>{P1(e(),t)});be(()=>clearTimeout(n))})}function sD(e,t){if(typeof IntersectionObserver!="function"){iD(e,t);return}let n=[];ve(()=>{const r=()=>{const o=!!n.length;n=e(),o&&P1(e(),t)},i=rD(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}be(()=>s.disconnect())})}function oD(e={}){const[t,n]=X4({value:()=>K(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});sD(t,n);const r=s=>(n(o=>{const a=tD(o,s);return C4(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>$(E1.Provider,{value:{registerItem:r},get children(){return s.children}})}}function aD(e){const t=eD(),n=je({shouldRegisterItem:!0},e);ve(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());be(r)})}function $1(e){var l,c,u;let t=(l=e.startIndex)!=null?l:0;const n=(c=e.startLevel)!=null?c:0,r=[],i=d=>{var g;if(d==null)return"";const f=(g=e.getKey)!=null?g:"key",h=Ui(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var g;if(d==null)return"";const f=(g=e.getTextValue)!=null?g:"textValue",h=Ui(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,g;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(g=Ui(f)?d[f]:f(d))!=null?g:!1},a=d=>{var f;if(d!=null)return Ui(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(Ui(d)||_4(d)){r.push({type:"item",rawValue:d,key:String(d),textValue:String(d),disabled:o(d),level:n,index:t}),t++;continue}if(a(d)!=null){r.push({type:"section",rawValue:d,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const f=(u=a(d))!=null?u:[];if(f.length>0){const h=$1({dataSource:f,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...h),t+=h.length}}else r.push({type:"item",rawValue:d,key:i(d),textValue:s(d),disabled:o(d),level:n,index:t}),t++}return r}function lD(e,t=[]){return q(()=>{const n=$1({dataSource:K(e.dataSource),getKey:K(e.getKey),getTextValue:K(e.getTextValue),getDisabled:K(e.getDisabled),getSectionChildren:K(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var cD=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),uD=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function dD(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return cD.has(r)}const t=e.split("-")[0];return uD.has(t)}function fD(e){return dD(e)?"rtl":"ltr"}function M1(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:fD(e)}}var ef=M1(),Co=new Set;function Vm(){ef=M1();for(const e of Co)e(ef)}function hD(){const[e,t]=ne(ef),n=q(()=>e());return dr(()=>{Co.size===0&&window.addEventListener("languagechange",Vm),Co.add(t),be(()=>{Co.delete(t),Co.size===0&&window.removeEventListener("languagechange",Vm)})}),{locale:()=>n().locale,direction:()=>n().direction}}var gD=yt();function Gr(){const e=hD();return mt(gD)||e}var Fu=new Map;function yD(e){const{locale:t}=Gr(),n=q(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return q(()=>{const r=n();let i;return Fu.has(r)&&(i=Fu.get(r)),i||(i=new Intl.Collator(t(),e),Fu.set(r,i)),i})}var Zn=class j1 extends Set{constructor(n,r,i){super(n);ye(this,"anchorKey");ye(this,"currentKey");n instanceof j1?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function mD(e){const[t,n]=Ia(e);return[()=>{var i;return(i=t())!=null?i:new Zn},n]}function D1(e){return P4()?e.altKey:e.ctrlKey}function Ki(e){return Kc()?e.metaKey:e.ctrlKey}function Gm(e){return new Zn(e)}function pD(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function vD(e){const t=je({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=ne(!1),[i,s]=ne(),o=q(()=>{const m=K(t.selectedKeys);return m!=null?Gm(m):m}),a=q(()=>{const m=K(t.defaultSelectedKeys);return m!=null?Gm(m):new Zn}),[l,c]=mD({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[u,d]=ne(K(t.selectionBehavior)),f=()=>K(t.selectionMode),h=()=>{var m;return(m=K(t.disallowEmptySelection))!=null?m:!1},g=m=>{(K(t.allowDuplicateSelectionEvents)||!pD(m,l()))&&c(m)};return ve(()=>{const m=l();K(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),ve(()=>{var m;d((m=K(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:g}}function bD(e){const[t,n]=ne(""),[r,i]=ne(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,g;if(K(e.isDisabled))return;const a=K(e.keyboardDelegate),l=K(e.selectionManager);if(!a.getKeyForSearch)return;const c=xD(o.key);if(!c||o.ctrlKey||o.metaKey)return;c===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let u=n(m=>m+c),d=(f=a.getKeyForSearch(u,l.focusedKey()))!=null?f:a.getKeyForSearch(u);d==null&&wD(u)&&(u=u[0],d=(h=a.getKeyForSearch(u,l.focusedKey()))!=null?h:a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),(g=e.onTypeSelect)==null||g.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function xD(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function wD(e){return e.split("").every(t=>t===e[0])}function SD(e,t,n){const i=_e({selectOnFocus:()=>K(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=Gr();let a={top:0,left:0};x4(()=>K(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=bD({isDisabled:()=>K(i.disallowTypeAhead),keyboardDelegate:()=>K(i.keyboardDelegate),selectionManager:()=>K(i.selectionManager)}),c=()=>{var p;return(p=K(i.orientation))!=null?p:"vertical"},u=p=>{var k,_,O,P,j,W,I,D;Ye(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=K(i.selectionManager),w=K(i.selectOnFocus),S=L=>{L!=null&&(b.setFocusedKey(L),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):w&&!D1(p)&&b.replaceSelection(L))},x=K(i.keyboardDelegate),E=K(i.shouldFocusWrap),C=b.focusedKey();switch(p.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){p.preventDefault();let L;C!=null?L=x.getKeyBelow(C):L=(k=x.getFirstKey)==null?void 0:k.call(x),L==null&&E&&(L=(_=x.getFirstKey)==null?void 0:_.call(x,C)),S(L)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){p.preventDefault();let L;C!=null?L=x.getKeyAbove(C):L=(O=x.getLastKey)==null?void 0:O.call(x),L==null&&E&&(L=(P=x.getLastKey)==null?void 0:P.call(x,C)),S(L)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){p.preventDefault();const L=o()==="rtl";let F;C!=null?F=x.getKeyLeftOf(C):F=L?(j=x.getFirstKey)==null?void 0:j.call(x):(W=x.getLastKey)==null?void 0:W.call(x),S(F)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){p.preventDefault();const L=o()==="rtl";let F;C!=null?F=x.getKeyRightOf(C):F=L?(I=x.getLastKey)==null?void 0:I.call(x):(D=x.getFirstKey)==null?void 0:D.call(x),S(F)}break}case"Home":if(x.getFirstKey){p.preventDefault();const L=x.getFirstKey(C,Ki(p));L!=null&&(b.setFocusedKey(L),Ki(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):w&&b.replaceSelection(L))}break;case"End":if(x.getLastKey){p.preventDefault();const L=x.getLastKey(C,Ki(p));L!=null&&(b.setFocusedKey(L),Ki(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(L):w&&b.replaceSelection(L))}break;case"PageDown":if(x.getKeyPageBelow&&C!=null){p.preventDefault();const L=x.getKeyPageBelow(C);S(L)}break;case"PageUp":if(x.getKeyPageAbove&&C!=null){p.preventDefault();const L=x.getKeyPageAbove(C);S(L)}break;case"a":Ki(p)&&b.selectionMode()==="multiple"&&K(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),K(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!K(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const L=B4(v,{tabbable:!0});let F,oe;do oe=L.lastChild(),oe&&(F=oe);while(oe);F&&!F.contains(document.activeElement)&&xt(F)}break}}},d=p=>{var S,x,E,C;const v=K(i.selectionManager),b=K(i.keyboardDelegate),w=K(i.selectOnFocus);if(v.isFocused()){p.currentTarget.contains(p.target)||v.setFocused(!1);return}if(p.currentTarget.contains(p.target)){if(v.setFocused(!0),v.focusedKey()==null){const k=O=>{O!=null&&(v.setFocusedKey(O),w&&v.replaceSelection(O))},_=p.relatedTarget;_&&p.currentTarget.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_FOLLOWING?k((x=v.lastSelectedKey())!=null?x:(S=b.getLastKey)==null?void 0:S.call(b)):k((C=v.firstSelectedKey())!=null?C:(E=b.getFirstKey)==null?void 0:E.call(b))}else if(!K(i.isVirtualized)){const k=s();if(k){k.scrollTop=a.top,k.scrollLeft=a.left;const _=k.querySelector(`[data-key="${v.focusedKey()}"]`);_&&(xt(_),Zd(k,_))}}}},f=p=>{const v=K(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},g=()=>{var E,C;const p=K(i.autoFocus);if(!p)return;const v=K(i.selectionManager),b=K(i.keyboardDelegate);let w;p==="first"&&(w=(E=b.getFirstKey)==null?void 0:E.call(b)),p==="last"&&(w=(C=b.getLastKey)==null?void 0:C.call(b));const S=v.selectedKeys();S.size&&(w=S.values().next().value),v.setFocused(!0),v.setFocusedKey(w);const x=t();x&&w==null&&!K(i.shouldUseVirtualFocus)&&xt(x)};return dr(()=>{i.deferAutoFocus?setTimeout(g,0):g()}),ve(ur([s,()=>K(i.isVirtualized),()=>K(i.selectionManager).focusedKey()],p=>{var S;const[v,b,w]=p;if(b)w&&((S=i.scrollToKey)==null||S.call(i,w));else if(w&&v){const x=v.querySelector(`[data-key="${w}"]`);x&&Zd(v,x)}})),{tabIndex:q(()=>{if(!K(i.shouldUseVirtualFocus))return K(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function L1(e,t){const n=()=>K(e.selectionManager),r=()=>K(e.key),i=()=>K(e.shouldUseVirtualFocus),s=b=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):b!=null&&b.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Ki(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>K(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=b=>{l()&&(c=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!K(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&K(e.shouldSelectOnPressUp)&&K(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(K(e.shouldSelectOnPressUp)&&!K(e.allowsDifferentPressOrigin)||c!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(D1(b)?n().toggleSelection(r()):s(b))},g=b=>{a()&&b.preventDefault()},m=b=>{const w=t();i()||a()||!w||b.target===w&&n().setFocusedKey(r())},p=q(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=q(()=>K(e.virtualized)?void 0:r());return ve(ur([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,w,S,x,E])=>{b&&w===x&&E&&!S&&document.activeElement!==b&&(e.focus?e.focus():xt(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:g,onFocus:m}}var CD=class{constructor(e,t){ye(this,"collection");ye(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,i=new Zn(n,r,t);for(const s of this.getKeyRange(r,n.currentKey||t))i.delete(s);for(const s of this.getKeyRange(t,r))this.canSelectItem(s)&&i.add(s);this.state.setSelectedKeys(i)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const i=this.collection().getItem(r);if(i&&i.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new Zn(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new Zn([t],t,t):new Zn;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new Zn;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Zn)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Qm=class{constructor(e){ye(this,"keyMap",new Map);ye(this,"iterable");ye(this,"firstKey");ye(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,i]of this.keyMap)t?(t.nextKey=r,i.prevKey=t.key):(this.firstKey=r,i.prevKey=void 0),i.type==="item"&&(i.index=n++),t=i,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function _D(e){const t=vD(e),r=lD({dataSource:()=>K(e.dataSource),getKey:()=>K(e.getKey),getTextValue:()=>K(e.getTextValue),getDisabled:()=>K(e.getDisabled),getSectionChildren:()=>K(e.getSectionChildren),factory:s=>e.filter?new Qm(e.filter(s)):new Qm(s)},[()=>e.filter]),i=new CD(r,t);return N0(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var bt=e=>typeof e=="function"?e():e,kD=e=>{const t=q(()=>{const o=bt(e.element);if(o)return getComputedStyle(o)}),n=()=>{var o,a;return(a=(o=t())==null?void 0:o.animationName)!=null?a:"none"},[r,i]=ne(bt(e.show)?"present":"hidden");let s="none";return ve(o=>{const a=bt(e.show);return tt(()=>{var u;if(o===a)return a;const l=s,c=n();a?i("present"):c==="none"||((u=t())==null?void 0:u.display)==="none"?i("hidden"):i(o===!0&&l!==c?"hiding":"hidden")}),a}),ve(()=>{const o=bt(e.element);if(!o)return;const a=c=>{c.target===o&&(s=n())},l=c=>{const d=n().includes(c.animationName);c.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),be(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},OD=kD,I1=OD,lc="data-kb-top-layer",R1,tf=!1,fr=[];function ra(e){return fr.findIndex(t=>t.node===e)}function ED(e){return fr[ra(e)]}function AD(e){return fr[fr.length-1].node===e}function F1(){return fr.filter(e=>e.isPointerBlocking)}function TD(){return[...F1()].slice(-1)[0]}function eh(){return F1().length>0}function N1(e){var n;const t=ra((n=TD())==null?void 0:n.node);return ra(e)<t}function PD(e){fr.push(e)}function $D(e){const t=ra(e);t<0||fr.splice(t,1)}function MD(){for(const{node:e}of fr)e.style.pointerEvents=N1(e)?"none":"auto"}function jD(e){if(eh()&&!tf){const t=Nn(e);R1=document.body.style.pointerEvents,t.body.style.pointerEvents="none",tf=!0}}function DD(e){if(eh())return;const t=Nn(e);t.body.style.pointerEvents=R1,t.body.style.length===0&&t.body.removeAttribute("style"),tf=!1}var Bt={layers:fr,isTopMostLayer:AD,hasPointerBlockingLayer:eh,isBelowPointerBlockingLayer:N1,addLayer:PD,removeLayer:$D,indexOf:ra,find:ED,assignPointerEventToLayers:MD,disableBodyPointerEvents:jD,restoreBodyPointerEvents:DD},LD={};Vc(LD,{Button:()=>FD,Root:()=>th});var ID=["button","color","file","image","reset","submit"];function RD(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?ID.indexOf(e.type)!==-1:!1}function th(e){let t;const n=je({type:"button"},e),[r,i]=He(n,["ref","type","disabled"]),s=Wc(()=>t,()=>"button"),o=q(()=>{const c=s();return c==null?!1:RD({tagName:c,type:r.type})}),a=q(()=>s()==="input"),l=q(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return $(Ze,_e({as:"button",ref(c){const u=At(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return o()||a()?r.type:void 0},get role(){return!o()&&!l()?"button":void 0},get tabIndex(){return!o()&&!l()&&!r.disabled?0:void 0},get disabled(){return o()||a()?r.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},i))}var FD=th,ND=["top","right","bottom","left"],Rn=Math.min,Vt=Math.max,cc=Math.round,bl=Math.floor,qr=e=>({x:e,y:e}),BD={left:"right",right:"left",bottom:"top",top:"bottom"},qD={start:"end",end:"start"};function nf(e,t,n){return Vt(e,Rn(t,n))}function Li(e,t){return typeof e=="function"?e(t):e}function zr(e){return e.split("-")[0]}function Ks(e){return e.split("-")[1]}function B1(e){return e==="x"?"y":"x"}function nh(e){return e==="y"?"height":"width"}function Pi(e){return["top","bottom"].includes(zr(e))?"y":"x"}function rh(e){return B1(Pi(e))}function zD(e,t,n){n===void 0&&(n=!1);const r=Ks(e),i=rh(e),s=nh(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=uc(o)),[o,uc(o)]}function HD(e){const t=uc(e);return[rf(e),t,rf(t)]}function rf(e){return e.replace(/start|end/g,t=>qD[t])}function UD(e,t,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?s:o;default:return[]}}function KD(e,t,n,r){const i=Ks(e);let s=UD(zr(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(rf)))),s}function uc(e){return e.replace(/left|right|bottom|top/g,t=>BD[t])}function WD(e){return{top:0,right:0,bottom:0,left:0,...e}}function q1(e){return typeof e!="number"?WD(e):{top:e,right:e,bottom:e,left:e}}function dc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ym(e,t,n){let{reference:r,floating:i}=e;const s=Pi(t),o=rh(t),a=nh(o),l=zr(t),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ks(t)){case"start":h[o]-=f*(n&&c?-1:1);break;case"end":h[o]+=f*(n&&c?-1:1);break}return h}var VD=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ym(c,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:w,data:S,reset:x}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:o,elements:{reference:e,floating:t}});u=b!=null?b:u,d=w!=null?w:d,h={...h,[p]:{...h[p],...S}},x&&g<=50&&(g++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ym(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function ia(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Li(t,e),g=q1(h),p=a[f?d==="floating"?"reference":"floating":d],v=dc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},x=dc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:l}):b);return{top:(v.top-x.top+g.top)/S.y,bottom:(x.bottom-v.bottom+g.bottom)/S.y,left:(v.left-x.left+g.left)/S.x,right:(x.right-v.right+g.right)/S.x}}var GD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Li(e,t)||{};if(c==null)return{};const d=q1(u),f={x:n,y:r},h=rh(i),g=nh(h),m=await o.getDimensions(c),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",w=p?"clientHeight":"clientWidth",S=s.reference[g]+s.reference[h]-f[h]-s.floating[g],x=f[h]-s.reference[h],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=E?E[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement(E)))&&(C=a.floating[w]||s.floating[g]);const k=S/2-x/2,_=C/2-m[g]/2-1,O=Rn(d[v],_),P=Rn(d[b],_),j=O,W=C-m[g]-P,I=C/2-m[g]/2+k,D=nf(j,I,W),L=!l.arrow&&Ks(i)!=null&&I!==D&&s.reference[g]/2-(I<j?O:P)-m[g]/2<0,F=L?I<j?I-j:I-W:0;return{[h]:f[h]+F,data:{[h]:D,centerOffset:I-D-F,...L&&{alignmentOffset:F}},reset:L}}}),QD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...p}=Li(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=zr(i),b=Pi(a),w=zr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(w||!m?[uc(a)]:HD(a)),E=g!=="none";!f&&E&&x.push(...KD(a,m,g,S));const C=[a,...x],k=await ia(t,p),_=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&_.push(k[v]),d){const I=zD(i,o,S);_.push(k[I[0]],k[I[1]])}if(O=[...O,{placement:i,overflows:_}],!_.every(I=>I<=0)){var P,j;const I=(((P=s.flip)==null?void 0:P.index)||0)+1,D=C[I];if(D)return{data:{index:I,overflows:O},reset:{placement:D}};let L=(j=O.filter(F=>F.overflows[0]<=0).sort((F,oe)=>F.overflows[1]-oe.overflows[1])[0])==null?void 0:j.placement;if(!L)switch(h){case"bestFit":{var W;const F=(W=O.filter(oe=>{if(E){const fe=Pi(oe.placement);return fe===b||fe==="y"}return!0}).map(oe=>[oe.placement,oe.overflows.filter(fe=>fe>0).reduce((fe,B)=>fe+B,0)]).sort((oe,fe)=>oe[1]-fe[1])[0])==null?void 0:W[0];F&&(L=F);break}case"initialPlacement":L=a;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function Xm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jm(e){return ND.some(t=>e[t]>=0)}var YD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Li(e,t);switch(r){case"referenceHidden":{const s=await ia(t,{...i,elementContext:"reference"}),o=Xm(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Jm(o)}}}case"escaped":{const s=await ia(t,{...i,altBoundary:!0}),o=Xm(s,n.floating);return{data:{escapedOffsets:o,escaped:Jm(o)}}}default:return{}}}}};async function XD(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=zr(n),a=Ks(n),l=Pi(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,d=Li(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}var JD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await XD(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},ZD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:p=>{let{x:v,y:b}=p;return{x:v,y:b}}},...l}=Li(e,t),c={x:n,y:r},u=await ia(t,l),d=Pi(zr(i)),f=B1(d);let h=c[f],g=c[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+u[p],w=h-u[v];h=nf(b,h,w)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=g+u[p],w=g-u[v];g=nf(b,g,w)}const m=a.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},e6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:s}=t,{apply:o=()=>{},...a}=Li(e,t),l=await ia(t,a),c=zr(n),u=Ks(n),d=Pi(n)==="y",{width:f,height:h}=r.floating;let g,m;c==="top"||c==="bottom"?(g=c,m=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,g=u==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=Rn(h-l[g],p),w=Rn(f-l[m],v),S=!t.middlewareData.shift;let x=b,E=w;if(d?E=u||S?Rn(w,v):v:x=u||S?Rn(b,p):p,S&&!u){const k=Vt(l.left,0),_=Vt(l.right,0),O=Vt(l.top,0),P=Vt(l.bottom,0);d?E=f-2*(k!==0||_!==0?k+_:Vt(l.left,l.right)):x=h-2*(O!==0||P!==0?O+P:Vt(l.top,l.bottom))}await o({...t,availableWidth:E,availableHeight:x});const C=await i.getDimensions(s.floating);return f!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function Ws(e){return z1(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yr(e){var t;return(t=(z1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z1(e){return e instanceof Node||e instanceof Yt(e).Node}function Sn(e){return e instanceof Element||e instanceof Yt(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof Yt(e).HTMLElement}function Zm(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}function Ra(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function t6(e){return["table","td","th"].includes(Ws(e))}function Gc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function ih(e){const t=sh(),n=Sn(e)?Cn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function n6(e){let t=Hr(e);for(;Bn(t)&&!Ds(t);){if(ih(t))return t;if(Gc(t))return null;t=Hr(t)}return null}function sh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ds(e){return["html","body","#document"].includes(Ws(e))}function Cn(e){return Yt(e).getComputedStyle(e)}function Qc(e){return Sn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hr(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zm(e)&&e.host||yr(e);return Zm(t)?t.host:t}function H1(e){const t=Hr(e);return Ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&Ra(t)?t:H1(t)}function sa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=H1(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Yt(i);return s?t.concat(o,o.visualViewport||[],Ra(i)?i:[],o.frameElement&&n?sa(o.frameElement):[]):t.concat(i,sa(i,[],n))}function U1(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bn(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=cc(n)!==s||cc(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function oh(e){return Sn(e)?e:e.contextElement}function Zi(e){const t=oh(e);if(!Bn(t))return qr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=U1(t);let o=(s?cc(n.width):n.width)/r,a=(s?cc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var r6=qr(0);function K1(e){const t=Yt(e);return!sh()||!t.visualViewport?r6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function $i(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=oh(e);let o=qr(1);t&&(r?Sn(r)&&(o=Zi(r)):o=Zi(e));const a=i6(s,n,r)?K1(s):qr(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(s){const f=Yt(s),h=r&&Sn(r)?Yt(r):r;let g=f,m=g.frameElement;for(;m&&r&&h!==g;){const p=Zi(m),v=m.getBoundingClientRect(),b=Cn(m),w=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,S=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=w,c+=S,g=Yt(m),m=g.frameElement}}return dc({width:u,height:d,x:l,y:c})}function s6(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=yr(r),a=t?Gc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=qr(1);const u=qr(0),d=Bn(r);if((d||!d&&!s)&&((Ws(r)!=="body"||Ra(o))&&(l=Qc(r)),Bn(r))){const f=$i(r);c=Zi(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function o6(e){return Array.from(e.getClientRects())}function W1(e){return $i(yr(e)).left+Qc(e).scrollLeft}function a6(e){const t=yr(e),n=Qc(e),r=e.ownerDocument.body,i=Vt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+W1(e);const a=-n.scrollTop;return Cn(r).direction==="rtl"&&(o+=Vt(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function l6(e,t){const n=Yt(e),r=yr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=sh();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function c6(e,t){const n=$i(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Bn(e)?Zi(e):qr(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function ep(e,t,n){let r;if(t==="viewport")r=l6(e,n);else if(t==="document")r=a6(yr(e));else if(Sn(t))r=c6(t,n);else{const i=K1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return dc(r)}function V1(e,t){const n=Hr(e);return n===t||!Sn(n)||Ds(n)?!1:Cn(n).position==="fixed"||V1(n,t)}function u6(e,t){const n=t.get(e);if(n)return n;let r=sa(e,[],!1).filter(a=>Sn(a)&&Ws(a)!=="body"),i=null;const s=Cn(e).position==="fixed";let o=s?Hr(e):e;for(;Sn(o)&&!Ds(o);){const a=Cn(o),l=ih(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ra(o)&&!l&&V1(e,o))?r=r.filter(u=>u!==o):i=a,o=Hr(o)}return t.set(e,r),r}function d6(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Gc(t)?[]:u6(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=ep(t,u,i);return c.top=Vt(d.top,c.top),c.right=Rn(d.right,c.right),c.bottom=Rn(d.bottom,c.bottom),c.left=Vt(d.left,c.left),c},ep(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function f6(e){const{width:t,height:n}=U1(e);return{width:t,height:n}}function h6(e,t,n){const r=Bn(t),i=yr(t),s=n==="fixed",o=$i(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=qr(0);if(r||!r&&!s)if((Ws(t)!=="body"||Ra(i))&&(a=Qc(t)),r){const d=$i(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=W1(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function Nu(e){return Cn(e).position==="static"}function tp(e,t){return!Bn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function G1(e,t){const n=Yt(e);if(Gc(e))return n;if(!Bn(e)){let i=Hr(e);for(;i&&!Ds(i);){if(Sn(i)&&!Nu(i))return i;i=Hr(i)}return n}let r=tp(e,t);for(;r&&t6(r)&&Nu(r);)r=tp(r,t);return r&&Ds(r)&&Nu(r)&&!ih(r)?n:r||n6(e)||n}var g6=async function(e){const t=this.getOffsetParent||G1,n=this.getDimensions,r=await n(e.floating);return{reference:h6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function y6(e){return Cn(e).direction==="rtl"}var Q1={convertOffsetParentRelativeRectToViewportRelativeRect:s6,getDocumentElement:yr,getClippingRect:d6,getOffsetParent:G1,getElementRects:g6,getClientRects:o6,getDimensions:f6,getScale:Zi,isElement:Sn,isRTL:y6};function m6(e,t){let n=null,r;const i=yr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=bl(u),g=bl(i.clientWidth-(c+d)),m=bl(i.clientHeight-(u+f)),p=bl(c),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-p+"px",threshold:Vt(0,Rn(1,l))||1};let w=!0;function S(x){const E=x[0].intersectionRatio;if(E!==l){if(!w)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch(x){n=new IntersectionObserver(S,b)}n.observe(e)}return o(!0),s}function p6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=oh(e),u=i||s?[...c?sa(c):[],...sa(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=c&&a?m6(c,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,m=l?$i(e):null;l&&p();function p(){const v=$i(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(p)}return n(),()=>{var v;u.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}var v6=JD,b6=ZD,x6=QD,w6=e6,S6=YD,C6=GD,_6=(e,t,n)=>{const r=new Map,i={platform:Q1,...n},s={...i.platform,_c:r};return VD(e,t,{...i,platform:s})},ah=yt();function lh(){const e=mt(ah);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var k6=de('<svg display="block" viewBox="0 0 30 30" style="transform:scale(1.02)"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),sf=30,np=sf/2,O6={top:180,right:-90,bottom:0,left:90};function ch(e){const t=lh(),n=je({size:sf},e),[r,i]=He(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=E6(t.contentRef),a=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-color`))||"none"},c=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},u=()=>Number.parseInt(c())*2*(sf/r.size),d=()=>`rotate(${O6[s()]} ${np} ${np}) translate(0 2)`;return $(Ze,_e({as:"div",ref(f){const h=At(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return Uc({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},i,{get children(){const f=k6(),h=f.firstChild;return pe(()=>Q(h,"transform",d())),f}}))}function E6(e){const[t,n]=ne();return ve(()=>{const r=e();r&&n(O4(r).getComputedStyle(r))}),t}function A6(e){const t=lh(),[n,r]=He(e,["ref","style"]);return $(Ze,_e({as:"div",ref(i){const s=At(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return Uc({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function rp(e){const{x:t=0,y:n=0,width:r=0,height:i=0}=e!=null?e:{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,i);const s={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...s,toJSON:()=>s}}function T6(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?rp(r):e?e.getBoundingClientRect():rp()}}}function P6(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var $6={top:"bottom",right:"left",bottom:"top",left:"right"};function M6(e,t){const[n,r]=e.split("-"),i=$6[n];return r?n==="left"||n==="right"?`${i} ${r==="start"?"top":"bottom"}`:r==="start"?`${i} ${t==="rtl"?"right":"left"}`:`${i} ${t==="rtl"?"left":"right"}`:`${i} center`}function j6(e){const t=je({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=ne(),[i,s]=ne(),[o,a]=ne(t.placement),l=()=>{var f;return T6((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:c}=Gr();async function u(){var E,C,k;const f=l(),h=n(),g=i();if(!f||!h)return;const m=((g==null?void 0:g.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(E=t.gutter)!=null?E:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[v6(({placement:_})=>{const O=!!_.split("-")[1];return{mainAxis:p,crossAxis:O?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const _=typeof t.flip=="string"?t.flip.split(" "):void 0;if(_!==void 0&&!_.every(P6))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(x6({padding:t.overflowPadding,fallbackPlacements:_}))}(t.slide||t.overlap)&&v.push(b6({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(w6({padding:t.overflowPadding,apply({availableWidth:_,availableHeight:O,rects:P}){const j=Math.round(P.reference.width);_=Math.floor(_),O=Math.floor(O),h.style.setProperty("--kb-popper-anchor-width",`${j}px`),h.style.setProperty("--kb-popper-content-available-width",`${_}px`),h.style.setProperty("--kb-popper-content-available-height",`${O}px`),t.sameWidth&&(h.style.width=`${j}px`),t.fitViewport&&(h.style.maxWidth=`${_}px`,h.style.maxHeight=`${O}px`)}})),t.hideWhenDetached&&v.push(S6({padding:t.detachedPadding})),g&&v.push(C6({element:g,padding:t.arrowPadding}));const b=await _6(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...Q1,isRTL:()=>c()==="rtl"}});if(a(b.placement),(C=t.onCurrentPlacementChange)==null||C.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",M6(b.placement,c()));const w=Math.round(b.x),S=Math.round(b.y);let x;if(t.hideWhenDetached&&(x=(k=b.middlewareData.hide)!=null&&k.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${S}px, 0)`,visibility:x}),g&&b.middlewareData.arrow){const{x:_,y:O}=b.middlewareData.arrow,P=b.placement.split("-")[0];Object.assign(g.style,{left:_!=null?`${_}px`:"",top:O!=null?`${O}px`:"",[P]:"100%"})}}ve(()=>{const f=l(),h=n();if(!f||!h)return;const g=p6(f,h,u,{elementResize:typeof ResizeObserver=="function"});be(g)}),ve(()=>{var g;const f=n(),h=(g=t.contentRef)==null?void 0:g.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:o,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:s};return $(ah.Provider,{value:d,get children(){return t.children}})}var Y1=Object.assign(j6,{Arrow:ch,Context:ah,usePopperContext:lh,Positioner:A6});function D6(e){const t=n=>{var r;n.key===Yf.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};ve(()=>{var r,i;if(K(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:Nn();n.addEventListener("keydown",t),be(()=>{n.removeEventListener("keydown",t)})})}var ip="interactOutside.pointerDownOutside",sp="interactOutside.focusOutside";function L6(e,t){let n,r=z4;const i=()=>Nn(t()),s=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},o=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${lc}]`)||!ln(i(),f)||ln(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},c=d=>{function f(){const h=t(),g=d.target;if(!h||!g||!l(d))return;const m=ft([s,a]);g.addEventListener(ip,m,{once:!0});const p=new CustomEvent(ip,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||$4(d)&&d.button===0}});g.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const g=ft([o,a]);h.addEventListener(sp,g,{once:!0});const m=new CustomEvent(sp,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};ve(()=>{K(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",c,!0)},0),i().addEventListener("focusin",u,!0),be(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",c,!0),i().removeEventListener("focusin",u,!0)}))})}var X1=yt();function I6(){return mt(X1)}function R6(e){let t;const n=I6(),[r,i]=He(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),s=new Set([]),o=d=>{s.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{s.delete(d),f==null||f()}};L6({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>ln(h(),d)))||[...s].some(h=>ln(h,d)):!1},onPointerDownOutside:d=>{var f,h,g;!t||Bt.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!Bt.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r))},onFocusOutside:d=>{var f,h,g;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(g=r.onDismiss)==null||g.call(r)}},()=>t),D6({ownerDocument:()=>Nn(t),onEscapeKeyDown:d=>{var f;!t||!Bt.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),dr(()=>{if(!t)return;Bt.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);Bt.assignPointerEventToLayers(),Bt.disableBodyPointerEvents(t),be(()=>{t&&(Bt.removeLayer(t),d==null||d(),Bt.assignPointerEventToLayers(),Bt.restoreBodyPointerEvents(t))})}),ve(ur([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=Bt.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,Bt.assignPointerEventToLayers()),f&&Bt.disableBodyPointerEvents(d),be(()=>{Bt.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:o};return $(X1.Provider,{value:u,get children(){return $(Ze,_e({as:"div",ref(d){const f=At(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function J1(e={}){const[t,n]=O1({value:()=>K(e.open),defaultValue:()=>!!K(e.defaultOpen),onChange:o=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,o)}}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}var nn={};Vc(nn,{Description:()=>_1,ErrorMessage:()=>k1,Item:()=>nx,ItemControl:()=>rx,ItemDescription:()=>ix,ItemIndicator:()=>sx,ItemInput:()=>ox,ItemLabel:()=>ax,Label:()=>lx,RadioGroup:()=>F6,Root:()=>cx});var Z1=yt();function ex(){const e=mt(Z1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var tx=yt();function Fa(){const e=mt(tx);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function nx(e){const t=La(),n=ex(),r=`${t.generateId("item")}-${fn()}`,i=je({id:r},e),[s,o]=He(i,["value","disabled","onPointerDown"]),[a,l]=ne(),[c,u]=ne(),[d,f]=ne(),[h,g]=ne(),[m,p]=ne(!1),v=q(()=>n.isSelectedValue(s.value)),b=q(()=>s.disabled||t.isDisabled()||!1),w=E=>{Ye(E,s.onPointerDown),m()&&E.preventDefault()},S=q(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),x={value:()=>s.value,dataset:S,isSelected:v,isDisabled:b,inputId:a,labelId:c,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Da(()=>o.id),registerInput:cn(l),registerLabel:cn(u),registerDescription:cn(f),setIsFocused:p,setInputRef:g};return $(tx.Provider,{value:x,get children(){return $(Ze,_e({as:"div",role:"group",onPointerDown:w},S,o))}})}function rx(e){const t=Fa(),n=je({id:t.generateId("control")},e),[r,i]=He(n,["onClick","onKeyDown"]);return $(Ze,_e({as:"div",onClick:a=>{var l;Ye(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;Ye(a,r.onKeyDown),a.key===Yf.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function ix(e){const t=Fa(),n=je({id:t.generateId("description")},e);return ve(()=>be(t.registerDescription(n.id))),$(Ze,_e({as:"div"},()=>t.dataset(),n))}function sx(e){const t=Fa(),n=je({id:t.generateId("indicator")},e),[r,i]=He(n,["ref","forceMount"]),[s,o]=ne(),{present:a}=I1({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return $(me,{get when(){return a()},get children(){return $(Ze,_e({as:"div",ref(l){const c=At(o,r.ref);typeof c=="function"&&c(l)}},()=>t.dataset(),i))}})}function ox(e){const t=La(),n=ex(),r=Fa(),i=je({id:r.generateId("input")},e),[s,o]=He(i,["ref","style","aria-labelledby","aria-describedby","onChange","onFocus","onBlur"]),a=()=>[s["aria-labelledby"],r.labelId(),s["aria-labelledby"]!=null&&o["aria-label"]!=null?o.id:void 0].filter(Boolean).join(" ")||void 0,l=()=>[s["aria-describedby"],r.descriptionId(),n.ariaDescribedBy()].filter(Boolean).join(" ")||void 0,[c,u]=ne(!1),d=g=>{if(Ye(g,s.onChange),g.stopPropagation(),!c()){n.setSelectedValue(r.value());const m=g.target;m.checked=r.isSelected()}u(!1)},f=g=>{Ye(g,s.onFocus),r.setIsFocused(!0)},h=g=>{Ye(g,s.onBlur),r.setIsFocused(!1)};return ve(ur([()=>r.isSelected(),()=>r.value()],g=>{if(!g[0]&&g[1]===r.value())return;u(!0);const m=r.inputRef();m==null||m.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!0})),m==null||m.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},{defer:!0})),ve(()=>be(r.registerInput(o.id))),$(Ze,_e({as:"input",ref(g){const m=At(r.setInputRef,s.ref);typeof m=="function"&&m(g)},type:"radio",get name(){return t.name()},get value(){return r.value()},get checked(){return r.isSelected()},get required(){return t.isRequired()},get disabled(){return r.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return Uc({...S1},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function ax(e){const t=Fa(),n=je({id:t.generateId("label")},e);return ve(()=>be(t.registerLabel(n.id))),$(Ze,_e({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function lx(e){return $(V4,_e({as:"span"},e))}function cx(e){let t;const n=`radiogroup-${fn()}`,r=je({id:n,orientation:"vertical"},e),[i,s,o]=He(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],K4),[a,l]=Ia({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:g=>{var m;return(m=i.onChange)==null?void 0:m.call(i,g)}}),{formControlContext:c}=W4(s);G4(()=>t,()=>{var g;return l((g=i.defaultValue)!=null?g:"")});const u=()=>c.getAriaLabelledBy(K(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>c.getAriaDescribedBy(i["aria-describedby"]),f=g=>g===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:g=>{if(!(c.isReadOnly()||c.isDisabled())&&(l(g),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return $(C1.Provider,{value:c,get children(){return $(Z1.Provider,{value:h,get children(){return $(Ze,_e({as:"div",ref(g){const m=At(p=>t=p,i.ref);typeof m=="function"&&m(g)},role:"radiogroup",get id(){return K(s.id)},get"aria-invalid"(){return c.validationState()==="invalid"||void 0},get"aria-required"(){return c.isRequired()||void 0},get"aria-disabled"(){return c.isDisabled()||void 0},get"aria-readonly"(){return c.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return u()},get"aria-describedby"(){return d()}},()=>c.dataset(),o))}})}})}var F6=Object.assign(cx,{Description:_1,ErrorMessage:k1,Item:nx,ItemControl:rx,ItemDescription:ix,ItemIndicator:sx,ItemInput:ox,ItemLabel:ax,Label:lx}),N6=class{constructor(e,t,n){ye(this,"collection");ye(this,"ref");ye(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n,r;return(r=(n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))!=null?r:null}getKeyPageAbove(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i!=null?this.getItem(i):null;return i}getKeyPageBelow(e){var s;const t=(s=this.ref)==null?void 0:s.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i!=null?this.getItem(i):null;return i}getKeyForSearch(e,t){var i;const n=(i=this.collator)==null?void 0:i.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const s=this.collection().getItem(r);if(s){const o=s.textValue.slice(0,e.length);if(s.textValue&&n.compare(o,e)===0)return r}r=this.getKeyBelow(r)}}};function B6(e,t,n){const r=yD({usage:"search",sensitivity:"base"}),i=q(()=>{const s=K(e.keyboardDelegate);return s||new N6(e.collection,t,r)});return SD({selectionManager:()=>K(e.selectionManager),keyboardDelegate:i,autoFocus:()=>K(e.autoFocus),deferAutoFocus:()=>K(e.deferAutoFocus),shouldFocusWrap:()=>K(e.shouldFocusWrap),disallowEmptySelection:()=>K(e.disallowEmptySelection),selectOnFocus:()=>K(e.selectOnFocus),disallowTypeAhead:()=>K(e.disallowTypeAhead),shouldUseVirtualFocus:()=>K(e.shouldUseVirtualFocus),allowsTabNavigation:()=>K(e.allowsTabNavigation),isVirtualized:()=>K(e.isVirtualized),scrollToKey:s=>{var o;return(o=K(e.scrollToKey))==null?void 0:o(s)},orientation:()=>K(e.orientation)},t)}var Bu="focusScope.autoFocusOnMount",qu="focusScope.autoFocusOnUnmount",op={bubbles:!1,cancelable:!0},ap={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Jd(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Jd(this.stack,e),(t=this.active())==null||t.resume()}};function q6(e,t){const[n,r]=ne(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=g=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,g)},a=g=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,g)},l=()=>Nn(t()),c=()=>{const g=l().createElement("span");return g.setAttribute("data-focus-trap",""),g.tabIndex=0,Object.assign(g.style,S1),g},u=()=>{const g=t();return g?x1(g,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const g=u();return g.length>0?g[0]:null},f=()=>{const g=u();return g.length>0?g[g.length-1]:null},h=()=>{const g=t();if(!g)return!1;const m=So(g);return!m||ln(g,m)?!1:w1(m)};ve(()=>{const g=t();if(!g)return;ap.add(i);const m=So(g);if(!ln(g,m)){const v=new CustomEvent(Bu,op);g.addEventListener(Bu,o),g.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{xt(d()),So(g)===m&&xt(g)},0)}be(()=>{g.removeEventListener(Bu,o),setTimeout(()=>{const v=new CustomEvent(qu,op);h()&&v.preventDefault(),g.addEventListener(qu,a),g.dispatchEvent(v),v.defaultPrevented||xt(m!=null?m:l().body),g.removeEventListener(qu,a),ap.remove(i)},0)})}),ve(()=>{const g=t();if(!g||!K(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${lc}]`)||(ln(g,b)?s=b:xt(s))},p=v=>{const b=v.relatedTarget,w=b!=null?b:So(g);w!=null&&w.closest(`[${lc}]`)||ln(g,w)||xt(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),be(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),ve(()=>{const g=t();if(!g||!K(e.trapFocus)||n())return;const m=c();g.insertAdjacentElement("afterbegin",m);const p=c();g.insertAdjacentElement("beforeend",p);function v(w){const S=d(),x=f();w.relatedTarget===S?xt(x):xt(S)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(w=>{for(const S of w)S.previousSibling===p&&(p.remove(),g.insertAdjacentElement("beforeend",p)),S.nextSibling===m&&(m.remove(),g.insertAdjacentElement("afterbegin",m))});b.observe(g,{childList:!0,subtree:!1}),be(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var z6="data-live-announcer";function H6(e){ve(()=>{K(e.isDisabled)||be(U6(K(e.targets),K(e.root)))})}var uo=new WeakMap,tn=[];function U6(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${z6}], [${lc}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)s(f),f=u.nextNode()}},s=l=>{var u;const c=(u=uo.get(l))!=null?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),uo.set(l,c+1))};tn.length&&tn[tn.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&i(u)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return tn.push(a),()=>{o.disconnect();for(const l of r){const c=uo.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),uo.delete(l)):uo.set(l,c-1)}a===tn[tn.length-1]?(tn.pop(),tn.length&&tn[tn.length-1].observe()):tn.splice(tn.indexOf(a),1)}}var xl=new Map,K6=e=>{ve(()=>{var s,o;const t=(s=bt(e.style))!=null?s:{},n=(o=bt(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=xl.get(e.key);i?i.activeCount++:xl.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(a=>a.key)}),Object.assign(e.element.style,e.style);for(const a of n)e.element.style.setProperty(a.key,a.value);be(()=>{var l;const a=xl.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}xl.delete(e.key);for(const[c,u]of Object.entries(a.originalStyles))e.element.style[c]=u;for(const c of a.properties)e.element.style.removeProperty(c);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},lp=K6,W6=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},V6=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},G6=(e,t,n)=>{var l;const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let i=e,s=0,o=0,a=!1;do{const[c,u,d]=W6(i,t),f=d-c-r*u;(u!==0||f!==0)&&V6(i,t)&&(s+=f,o+=u),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[cp,up]=ne([]),Q6=e=>cp().indexOf(e)===cp().length-1,Y6=e=>{const t=_e({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=fn();let r=[0,0],i=null,s=null;ve(()=>{bt(t.enabled)&&(up(c=>[...c,n]),be(()=>{up(c=>c.filter(u=>u!==n))}))}),ve(()=>{if(!bt(t.enabled)||!bt(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(bt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(bt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,g=window.scrollX;lp({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{bt(t.restoreScrollPosition)&&u>0&&window.scrollTo(g,h)}})}else lp({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),ve(()=>{!Q6(n)||!bt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),be(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=c=>{r=dp(c),i=null,s=null},a=c=>{const u=c.target,d=bt(t.element),f=X6(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",g=h==="x"?f[0]:f[1],m=fp(u,h,g,d);let p;d&&of(d,u)?p=!m:p=!0,p&&c.cancelable&&c.preventDefault()},l=c=>{const u=bt(t.element),d=c.target;let f;if(c.touches.length===2)f=!bt(t.allowPinchZoom);else{if(i==null||s===null){const h=dp(c).map((m,p)=>r[p]-m),g=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=g,s=g==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=fp(d,i,s,u);u&&of(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},X6=e=>[e.deltaX,e.deltaY],dp=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],fp=(e,t,n,r)=>{const i=r!==null&&of(r,e),[s,o]=G6(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},of=(e,t)=>{var r;if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=(r=n._$host)!=null?r:n.parentElement}return!1},J6=Y6,Z6=J6,ux=yt();function dx(){return mt(ux)}function mr(){const e=dx();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var fx=yt();function uh(){const e=mt(fx);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var hx=yt();function Un(){const e=mt(hx);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function dh(e){let t;const n=Un(),r=mr(),i=je({id:n.generateId(`item-${fn()}`)},e),[s,o]=He(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=ne(),[c,u]=ne(),[d,f]=ne(),h=()=>r.listState().selectionManager(),g=()=>o.id,m=()=>h().focusedKey()===g(),p=()=>{var _;(_=s.onSelect)==null||_.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};aD({getItem:()=>{var _,O,P,j,W;return{ref:()=>t,type:"item",key:g(),textValue:(j=(P=(O=s.textValue)!=null?O:(_=d())==null?void 0:_.textContent)!=null?P:t==null?void 0:t.textContent)!=null?j:"",disabled:(W=s.disabled)!=null?W:!1}}});const v=L1({key:g,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=_=>{Ye(_,s.onPointerMove),_.pointerType==="mouse"&&(s.disabled?r.onItemLeave(_):(r.onItemEnter(_),_.defaultPrevented||(xt(_.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(g()))))},w=_=>{Ye(_,s.onPointerLeave),_.pointerType==="mouse"&&r.onItemLeave(_)},S=_=>{Ye(_,s.onPointerUp),!s.disabled&&_.button===0&&p()},x=_=>{if(Ye(_,s.onKeyDown),!_.repeat&&!s.disabled)switch(_.key){case"Enter":case" ":p();break}},E=q(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),C=q(()=>({"data-indeterminate":s.indeterminate?"":void 0,"data-checked":s.checked&&!s.indeterminate?"":void 0,"data-disabled":s.disabled?"":void 0,"data-highlighted":m()?"":void 0})),k={isChecked:()=>s.checked,dataset:C,setLabelRef:f,generateId:Da(()=>o.id),registerLabel:cn(l),registerDescription:cn(u)};return $(fx.Provider,{value:k,get children(){return $(Ze,_e({as:"div",ref(_){const O=At(P=>t=P,s.ref);typeof O=="function"&&O(_)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return E()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return v.dataKey()},get onPointerDown(){return ft([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return ft([S,v.onPointerUp])},get onClick(){return ft([s.onClick,v.onClick])},get onKeyDown(){return ft([x,v.onKeyDown])},get onMouseDown(){return ft([s.onMouseDown,v.onMouseDown])},get onFocus(){return ft([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:w},C,o))}})}function gx(e){const t=je({closeOnSelect:!1},e),[n,r]=He(t,["checked","defaultChecked","onChange","onSelect"]),i=J4({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:o=>{var a;return(a=n.onChange)==null?void 0:a.call(n,o)},isDisabled:()=>r.disabled});return $(dh,_e({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var eL=yt();function Yc(){return mt(eL)}var oa={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>oa.next(e==="ltr"?"rtl":"ltr",t)},hp={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function yx(e){const t=Un(),n=mr(),r=Yc(),{direction:i}=Gr(),s=je({id:t.generateId("trigger")},e),[o,a]=He(s,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>{var v;return(v=t.value())!=null?v:o.id},r.lastValue()===void 0&&r.setLastValue(l));const c=Wc(()=>n.triggerRef(),()=>"button"),u=q(()=>{var v;return c()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});ve(ur(()=>r==null?void 0:r.value(),v=>{var b;u()&&v===l()&&((b=n.triggerRef())==null||b.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=v=>{Ye(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{Ye(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},g=v=>{if(Ye(v,o.onKeyDown),!o.disabled){if(u())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case hp.first(t.orientation()):v.stopPropagation(),v.preventDefault(),U4(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case hp.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case oa.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case oa.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;Ye(v,o.onMouseOver),((b=n.triggerRef())==null?void 0:b.dataset.pointerType)!=="touch"&&!o.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},p=v=>{Ye(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return ve(()=>be(n.registerTriggerId(o.id))),$(th,_e({ref(v){const b=At(n.setTriggerRef,o.ref);typeof b=="function"&&b(v)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return o.id},get disabled(){return o.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return q(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:m,onClick:h,onKeyDown:g,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var tL=yt();function mx(){return mt(tL)}function px(e){let t;const n=Un(),r=mr(),i=Yc(),s=mx(),{direction:o}=Gr(),a=je({id:n.generateId(`content-${fn()}`)},e),[l,c]=He(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=B6({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);q6({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{var S;i===void 0&&((S=l.onOpenAutoFocus)==null||S.call(l,w))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=w=>{if(ln(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),i!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case oa.next(o(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case oa.previous(o(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},g=w=>{var S;(S=l.onEscapeKeyDown)==null||S.call(l,w),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=w=>{var S;(S=l.onFocusOutside)==null||S.call(l,w),n.isModal()&&w.preventDefault()},p=w=>{var S,x;Ye(w,l.onPointerEnter),r.isOpen()&&((S=r.parentMenuContext())==null||S.listState().selectionManager().setFocused(!1),(x=r.parentMenuContext())==null||x.listState().selectionManager().setFocusedKey(void 0))},v=w=>{if(Ye(w,l.onPointerMove),w.pointerType!=="mouse")return;const S=w.target,x=u!==w.clientX;ln(w.currentTarget,S)&&x&&(r.setPointerDir(w.clientX>u?"right":"left"),u=w.clientX)};ve(()=>be(r.registerContentId(l.id)));const b={ref:At(w=>{r.setContentRef(w),t=w},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:ft([l.onKeyDown,f.onKeyDown,h]),onMouseDown:ft([l.onMouseDown,f.onMouseDown]),onFocusIn:ft([l.onFocusIn,f.onFocusIn]),onFocusOut:ft([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return $(me,{get when(){return r.contentPresent()},get children(){return $(me,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return $(Ze,_e({as:"div"},()=>r.dataset(),b,c))},get children(){return $(Y1.Positioner,{get children(){return $(R6,_e({get disableOutsidePointerEvents(){return q(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return Uc({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:g,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,c))}})}})}})}function nL(e){let t;const n=Un(),r=mr(),[i,s]=He(e,["ref"]);return Z6({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),$(px,_e({ref(o){const a=At(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var vx=yt();function rL(){const e=mt(vx);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function fh(e){const t=Un(),n=je({id:t.generateId(`group-${fn()}`)},e),[r,i]=ne(),s={generateId:Da(()=>n.id),registerLabelId:cn(i)};return $(vx.Provider,{value:s,get children(){return $(Ze,_e({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function bx(e){const t=rL(),n=je({id:t.generateId("label")},e),[r,i]=He(n,["id"]);return ve(()=>be(t.registerLabelId(r.id))),$(Ze,_e({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function xx(e){const t=mr(),n=je({children:"▼"},e);return $(Ze,_e({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function wx(e){return $(dh,_e({role:"menuitem",closeOnSelect:!0},e))}function Sx(e){const t=uh(),n=je({id:t.generateId("description")},e),[r,i]=He(n,["id"]);return ve(()=>be(t.registerDescription(r.id))),$(Ze,_e({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function Cx(e){const t=uh(),n=je({id:t.generateId("indicator")},e),[r,i]=He(n,["forceMount"]);return $(me,{get when(){return r.forceMount||t.isChecked()},get children(){return $(Ze,_e({as:"div"},()=>t.dataset(),i))}})}function _x(e){const t=uh(),n=je({id:t.generateId("label")},e),[r,i]=He(n,["ref","id"]);return ve(()=>be(t.registerLabel(r.id))),$(Ze,_e({as:"div",ref(s){const o=At(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function kx(e){const t=mr();return $(me,{get when(){return t.contentPresent()},get children(){return $(J0,e)}})}var Ox=yt();function iL(){const e=mt(Ox);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Ex(e){const n=Un().generateId(`radiogroup-${fn()}`),r=je({id:n},e),[i,s]=He(r,["value","defaultValue","onChange","disabled"]),[o,a]=Ia({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:c=>{var u;return(u=i.onChange)==null?void 0:u.call(i,c)}}),l={isDisabled:()=>i.disabled,isSelectedValue:c=>c===o(),setSelectedValue:a};return $(Ox.Provider,{value:l,get children(){return $(fh,s)}})}function Ax(e){const t=iL(),n=je({closeOnSelect:!1},e),[r,i]=He(n,["value","onSelect"]);return $(dh,_e({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var o;(o=r.onSelect)==null||o.call(r),t.setSelectedValue(r.value)}},i))}function sL(e,t,n){const r=e.split("-")[0],i=n.getBoundingClientRect(),s=[],o=t.clientX,a=t.clientY;switch(r){case"top":s.push([o,a+5]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]);break;case"right":s.push([o-5,a]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]);break;case"bottom":s.push([o,a-5]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]);break;case"left":s.push([o+5,a]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]);break}return s}function oL(e,t){return t?H4([e.clientX,e.clientY],t):!1}function Tx(e){const t=Un(),n=A1(),r=dx(),i=Yc(),s=mx(),o=je({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=He(o,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[f,h]=ne(),[g,m]=ne(),[p,v]=ne(),[b,w]=ne(),[S,x]=ne(!0),[E,C]=ne(l.placement),[k,_]=ne([]),[O,P]=ne([]),{DomCollectionProvider:j}=oD({items:O,onItemsChange:P}),W=J1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:J=>{var se;return(se=a.onOpenChange)==null?void 0:se.call(a,J)}}),{present:I}=I1({show:()=>t.forceMount()||W.isOpen(),element:()=>{var J;return(J=b())!=null?J:null}}),D=_D({selectionMode:"none",dataSource:O}),L=J=>{x(J),W.open()},F=(J=!1)=>{W.close(),J&&r&&r.close(!0)},oe=J=>{x(J),W.toggle()},fe=()=>{const J=b();J&&(xt(J),D.selectionManager().setFocused(!0),D.selectionManager().setFocusedKey(void 0))},B=()=>{s!=null?setTimeout(()=>fe()):fe()},V=J=>{_(le=>[...le,J]);const se=r==null?void 0:r.registerNestedMenu(J);return()=>{_(le=>Jd(le,J)),se==null||se()}},te=J=>d===(u==null?void 0:u.side)&&oL(J,u==null?void 0:u.area),ae=J=>{te(J)&&J.preventDefault()},R=J=>{te(J)||B()},ce=J=>{te(J)&&J.preventDefault()};H6({isDisabled:()=>!(r==null&&W.isOpen()&&t.isModal()),targets:()=>[b(),...k()].filter(Boolean)}),ve(()=>{const J=b();if(!J||!r)return;const se=r.registerNestedMenu(J);be(()=>{se()})}),ve(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),...k()]))}),ve(()=>{var J;r!==void 0||i===void 0||(i.value()===t.value()?((J=p())==null||J.focus(),i.autoFocusMenu()&&L(!0)):F())}),ve(()=>{r!==void 0||i===void 0||W.isOpen()&&i.setValue(t.value())}),be(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const xe={dataset:q(()=>({"data-expanded":W.isOpen()?"":void 0,"data-closed":W.isOpen()?void 0:""})),isOpen:W.isOpen,contentPresent:I,nestedMenus:k,currentPlacement:E,pointerGraceTimeoutId:()=>c,autoFocus:S,listState:()=>D,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:g,setTriggerRef:v,setContentRef:w,open:L,close:F,toggle:oe,focusContent:B,onItemEnter:ae,onItemLeave:R,onTriggerLeave:ce,setPointerDir:J=>d=J,setPointerGraceTimeoutId:J=>c=J,setPointerGraceIntent:J=>u=J,registerNestedMenu:V,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:cn(h),registerContentId:cn(m)};return $(j,{get children(){return $(ux.Provider,{value:xe,get children(){return $(me,{when:s===void 0,get fallback(){return l.children},get children(){return $(Y1,_e({anchorRef:p,contentRef:b,onCurrentPlacementChange:C},l))}})}})}})}function Px(e){const{direction:t}=Gr();return $(Tx,_e({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var aL={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function $x(e){const t=mr(),n=Un(),[r,i]=He(e,["onFocusOutside","onKeyDown"]),{direction:s}=Gr();return $(px,_e({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{var f;(f=r.onFocusOutside)==null||f.call(r,u);const d=u.target;ln(t.triggerRef(),d)||t.close()},onKeyDown:u=>{Ye(u,r.onKeyDown);const d=ln(u.currentTarget,u.target),f=aL.close(s(),n.orientation()).includes(u.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),xt(t.triggerRef()))}},i))}var gp=["Enter"," "],lL={open:(e,t)=>e==="ltr"?[...gp,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...gp,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function Mx(e){let t;const n=Un(),r=mr(),i=je({id:n.generateId(`sub-trigger-${fn()}`)},e),[s,o]=He(i,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Gr(),u=()=>s.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===u(),g=L1({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=w=>{Ye(w,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=w=>{var x;if(Ye(w,s.onPointerMove),w.pointerType!=="mouse")return;const S=r.parentMenuContext();if(S==null||S.onItemEnter(w),!w.defaultPrevented){if(s.disabled){S==null||S.onItemLeave(w);return}!r.isOpen()&&!a&&((x=r.parentMenuContext())==null||x.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),S==null||S.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),xt(w.currentTarget),S==null||S.listState().selectionManager().setFocused(!0),S==null||S.listState().selectionManager().setFocusedKey(u()))}},v=w=>{if(Ye(w,s.onPointerLeave),w.pointerType!=="mouse")return;l();const S=r.parentMenuContext(),x=r.contentRef();if(x){S==null||S.setPointerGraceIntent({area:sL(r.currentPlacement(),w,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(S==null?void 0:S.pointerGraceTimeoutId());const E=window.setTimeout(()=>{S==null||S.setPointerGraceIntent(null)},300);S==null||S.setPointerGraceTimeoutId(E)}else{if(S==null||S.onTriggerLeave(w),w.defaultPrevented)return;S==null||S.setPointerGraceIntent(null)}S==null||S.onItemLeave(w)},b=w=>{Ye(w,s.onKeyDown),!w.repeat&&(s.disabled||lL.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return ve(()=>{var S,x,E;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:(x=(S=s.textValue)!=null?S:t==null?void 0:t.textContent)!=null?x:"",disabled:(E=s.disabled)!=null?E:!1});be(w)}),ve(ur(()=>{var w;return(w=r.parentMenuContext())==null?void 0:w.pointerGraceTimeoutId()},w=>{be(()=>{var S;window.clearTimeout(w),(S=r.parentMenuContext())==null||S.setPointerGraceIntent(null)})})),ve(()=>be(r.registerTriggerId(s.id))),be(()=>{l()}),$(Ze,_e({as:"div",ref(w){const S=At(x=>{r.setTriggerRef(x),t=x},s.ref);typeof S=="function"&&S(w)},get id(){return s.id},role:"menuitem",get tabIndex(){return g.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return q(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return g.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return ft([s.onPointerDown,g.onPointerDown])},get onPointerUp(){return ft([s.onPointerUp,g.onPointerUp])},get onClick(){return ft([m,g.onClick])},get onKeyDown(){return ft([b,g.onKeyDown])},get onMouseDown(){return ft([s.onMouseDown,g.onMouseDown])},get onFocus(){return ft([s.onFocus,g.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function cL(e){const t=Yc(),n=`menu-${fn()}`,r=je({id:n,modal:!0},e),[i,s]=He(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=J1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var c;return(c=i.onOpenChange)==null?void 0:c.call(i,l)}}),a={isModal:()=>{var l;return(l=i.modal)!=null?l:!0},preventScroll:()=>{var l;return(l=i.preventScroll)!=null?l:a.isModal()},forceMount:()=>{var l;return(l=i.forceMount)!=null?l:!1},generateId:Da(()=>i.id),value:()=>i.value,orientation:()=>{var l,c;return(c=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?c:"horizontal"}};return $(hx.Provider,{value:a,get children(){return $(Tx,_e({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var uL={};Vc(uL,{Root:()=>Xc,Separator:()=>dL});function Xc(e){let t;const n=je({orientation:"horizontal"},e),[r,i]=He(n,["ref","orientation"]),s=Wc(()=>t,()=>"hr");return $(Ze,_e({as:"hr",ref(o){const a=At(l=>t=l,r.ref);typeof a=="function"&&a(o)},get role(){return s()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},i))}var dL=Xc,ot={};Vc(ot,{Arrow:()=>ch,CheckboxItem:()=>gx,Content:()=>jx,DropdownMenu:()=>fL,Group:()=>fh,GroupLabel:()=>bx,Icon:()=>xx,Item:()=>wx,ItemDescription:()=>Sx,ItemIndicator:()=>Cx,ItemLabel:()=>_x,Portal:()=>kx,RadioGroup:()=>Ex,RadioItem:()=>Ax,Root:()=>Dx,Separator:()=>Xc,Sub:()=>Px,SubContent:()=>$x,SubTrigger:()=>Mx,Trigger:()=>yx});function jx(e){const t=Un(),n=mr(),[r,i]=He(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return $(nL,_e({onCloseAutoFocus:l=>{var c;(c=r.onCloseAutoFocus)==null||c.call(r,l),s||xt(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var c;(c=r.onInteractOutside)==null||c.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function Dx(e){const t=`dropdownmenu-${fn()}`,n=je({id:t},e);return $(cL,n)}var fL=Object.assign(Dx,{Arrow:ch,CheckboxItem:gx,Content:jx,Group:fh,GroupLabel:bx,Icon:xx,Item:wx,ItemDescription:Sx,ItemIndicator:Cx,ItemLabel:_x,Portal:kx,RadioGroup:Ex,RadioItem:Ax,Separator:Xc,Sub:Px,SubContent:$x,SubTrigger:Mx,Trigger:yx}),H={colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000000",white:"#ffffff",neutral:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},darkGray:{50:"#525c7a",100:"#49536e",200:"#414962",300:"#394056",400:"#313749",500:"#292e3d",600:"#212530",700:"#191c24",800:"#111318",900:"#0b0d10"},gray:{50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#344054",800:"#1d2939",900:"#101828"},blue:{25:"#F5FAFF",50:"#EFF8FF",100:"#D1E9FF",200:"#B2DDFF",300:"#84CAFF",400:"#53B1FD",500:"#2E90FA",600:"#1570EF",700:"#175CD3",800:"#1849A9",900:"#194185"},green:{25:"#F6FEF9",50:"#ECFDF3",100:"#D1FADF",200:"#A6F4C5",300:"#6CE9A6",400:"#32D583",500:"#12B76A",600:"#039855",700:"#027A48",800:"#05603A",900:"#054F31"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},yellow:{25:"#FFFCF5",50:"#FFFAEB",100:"#FEF0C7",200:"#FEDF89",300:"#FEC84B",400:"#FDB022",500:"#F79009",600:"#DC6803",700:"#B54708",800:"#93370D",900:"#7A2E0E"},purple:{25:"#FAFAFF",50:"#F4F3FF",100:"#EBE9FE",200:"#D9D6FE",300:"#BDB4FE",400:"#9B8AFB",500:"#7A5AF8",600:"#6938EF",700:"#5925DC",800:"#4A1FB8",900:"#3E1C96"},teal:{25:"#F6FEFC",50:"#F0FDF9",100:"#CCFBEF",200:"#99F6E0",300:"#5FE9D0",400:"#2ED3B7",500:"#15B79E",600:"#0E9384",700:"#107569",800:"#125D56",900:"#134E48"},pink:{25:"#fdf2f8",50:"#fce7f3",100:"#fbcfe8",200:"#f9a8d4",300:"#f472b6",400:"#ec4899",500:"#db2777",600:"#be185d",700:"#9d174d",800:"#831843",900:"#500724"},cyan:{25:"#ecfeff",50:"#cffafe",100:"#a5f3fc",200:"#67e8f9",300:"#22d3ee",400:"#06b6d4",500:"#0891b2",600:"#0e7490",700:"#155e75",800:"#164e63",900:"#083344"}},alpha:{90:"e5",80:"cc"},font:{size:{xs:"calc(var(--tsqd-font-size) * 0.75)",sm:"calc(var(--tsqd-font-size) * 0.875)",md:"var(--tsqd-font-size)"},lineHeight:{xs:"calc(var(--tsqd-font-size) * 1)",sm:"calc(var(--tsqd-font-size) * 1.25)",md:"calc(var(--tsqd-font-size) * 1.5)"},weight:{medium:"500",semibold:"600",bold:"700"}},border:{radius:{xs:"calc(var(--tsqd-font-size) * 0.125)",sm:"calc(var(--tsqd-font-size) * 0.25)",full:"9999px"}},size:{.25:"calc(var(--tsqd-font-size) * 0.0625)",.5:"calc(var(--tsqd-font-size) * 0.125)",1:"calc(var(--tsqd-font-size) * 0.25)",1.5:"calc(var(--tsqd-font-size) * 0.375)",2:"calc(var(--tsqd-font-size) * 0.5)",2.5:"calc(var(--tsqd-font-size) * 0.625)",3:"calc(var(--tsqd-font-size) * 0.75)",3.5:"calc(var(--tsqd-font-size) * 0.875)",4:"calc(var(--tsqd-font-size) * 1)",4.5:"calc(var(--tsqd-font-size) * 1.125)",5:"calc(var(--tsqd-font-size) * 1.25)",6:"calc(var(--tsqd-font-size) * 1.5)",6.5:"calc(var(--tsqd-font-size) * 1.625)",14:"calc(var(--tsqd-font-size) * 3.5)"},shadow:{xs:(e="rgb(0 0 0 / 0.1)")=>"0 1px 2px 0 rgb(0 0 0 / 0.05)",sm:(e="rgb(0 0 0 / 0.1)")=>`0 1px 3px 0 ${e}, 0 1px 2px -1px ${e}`,md:(e="rgb(0 0 0 / 0.1)")=>`0 4px 6px -1px ${e}, 0 2px 4px -2px ${e}`,lg:(e="rgb(0 0 0 / 0.1)")=>`0 10px 15px -3px ${e}, 0 4px 6px -4px ${e}`,xl:(e="rgb(0 0 0 / 0.1)")=>`0 20px 25px -5px ${e}, 0 8px 10px -6px ${e}`,"2xl":(e="rgb(0 0 0 / 0.25)")=>`0 25px 50px -12px ${e}`,inner:(e="rgb(0 0 0 / 0.05)")=>`inset 0 2px 4px 0 ${e}`,none:()=>"none"}},hL=de('<svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),gL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),yL=de('<svg width=10 height=6 viewBox="0 0 10 6"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1L5 5L9 1"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),mL=de('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),hh=de('<svg width=12 height=12 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333"stroke=currentColor stroke-width=1.66667 stroke-linecap=round stroke-linejoin=round>'),pL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2v2m0 16v2M4 12H2m4.314-5.686L4.9 4.9m12.786 1.414L19.1 4.9M6.314 17.69 4.9 19.104m12.786-1.414 1.414 1.414M22 12h-2m-3 0a5 5 0 1 1-10 0 5 5 0 0 1 10 0Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),vL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M22 15.844a10.424 10.424 0 0 1-4.306.925c-5.779 0-10.463-4.684-10.463-10.462 0-1.536.33-2.994.925-4.307A10.464 10.464 0 0 0 2 11.538C2 17.316 6.684 22 12.462 22c4.243 0 7.896-2.526 9.538-6.156Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),bL=de('<svg viewBox="0 0 24 24"height=12 width=12 fill=none xmlns=http://www.w3.org/2000/svg><path d="M8 21h8m-4-4v4m-5.2-4h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 14.72 22 13.88 22 12.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 17 5.12 17 6.8 17Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),xL=de('<svg stroke=currentColor fill=currentColor stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z">'),wL=de('<svg stroke-width=0 viewBox="0 0 24 24"height=1em width=1em xmlns=http://www.w3.org/2000/svg><path fill=none d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z">'),SL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),CL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M16 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M11.5 12.5L17 7M17 7H12M17 7V12M6.2 21H8.8C9.9201 21 10.4802 21 10.908 20.782C11.2843 20.5903 11.5903 20.2843 11.782 19.908C12 19.4802 12 18.9201 12 17.8V15.2C12 14.0799 12 13.5198 11.782 13.092C11.5903 12.7157 11.2843 12.4097 10.908 12.218C10.4802 12 9.92011 12 8.8 12H6.2C5.0799 12 4.51984 12 4.09202 12.218C3.71569 12.4097 3.40973 12.7157 3.21799 13.092C3 13.5198 3 14.0799 3 15.2V17.8C3 18.9201 3 19.4802 3.21799 19.908C3.40973 20.2843 3.71569 20.5903 4.09202 20.782C4.51984 21 5.07989 21 6.2 21Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),_L=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path class=copier d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round stroke=currentColor>'),kL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M2.5 21.4998L8.04927 19.3655C8.40421 19.229 8.58168 19.1607 8.74772 19.0716C8.8952 18.9924 9.0358 18.901 9.16804 18.7984C9.31692 18.6829 9.45137 18.5484 9.72028 18.2795L21 6.99982C22.1046 5.89525 22.1046 4.10438 21 2.99981C19.8955 1.89525 18.1046 1.89524 17 2.99981L5.72028 14.2795C5.45138 14.5484 5.31692 14.6829 5.20139 14.8318C5.09877 14.964 5.0074 15.1046 4.92823 15.2521C4.83911 15.4181 4.77085 15.5956 4.63433 15.9506L2.5 21.4998ZM2.5 21.4998L4.55812 16.1488C4.7054 15.7659 4.77903 15.5744 4.90534 15.4867C5.01572 15.4101 5.1523 15.3811 5.2843 15.4063C5.43533 15.4351 5.58038 15.5802 5.87048 15.8703L8.12957 18.1294C8.41967 18.4195 8.56472 18.5645 8.59356 18.7155C8.61877 18.8475 8.58979 18.9841 8.51314 19.0945C8.42545 19.2208 8.23399 19.2944 7.85107 19.4417L2.5 21.4998Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),Lx=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),OL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z"stroke=#F04438 stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),EL=de('<svg width=24 height=24 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 xmlns=http://www.w3.org/2000/svg><rect class=list width=20 height=20 y=2 x=2 rx=2></rect><line class=list-item y1=7 y2=7 x1=6 x2=18></line><line class=list-item y2=12 y1=12 x1=6 x2=18></line><line class=list-item y1=17 y2=17 x1=6 x2=18>'),AL=de('<svg viewBox="0 0 24 24"height=20 width=20 fill=none xmlns=http://www.w3.org/2000/svg><path d="M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),TL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),PL=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round></path><animateTransform attributeName=transform attributeType=XML type=rotate from=0 to=360 dur=2s repeatCount=indefinite>'),$L=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),ML=de('<svg width=14 height=14 viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg><path d="M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),jL=de('<svg version=1.0 viewBox="0 0 633 633"><linearGradient x1=-666.45 x2=-666.45 y1=163.28 y2=163.99 gradientTransform="matrix(633 0 0 633 422177 -103358)"gradientUnits=userSpaceOnUse><stop stop-color=#6BDAFF offset=0></stop><stop stop-color=#F9FFB5 offset=.32></stop><stop stop-color=#FFA770 offset=.71></stop><stop stop-color=#FF7373 offset=1></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5></circle><defs><filter x=-137.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=316.5 y=412 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=412 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=610.5 rx=214.5 ry=186 fill=#015064 stroke=#00CFE2 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=316.5 y=450 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=450 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=648.5 rx=214.5 ry=186 fill=#015064 stroke=#00A8B8 stroke-width=25></ellipse></g><defs><filter x=-137.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=-137.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=89.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=316.5 y=486 width=454 height=396.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=316.5 y=486 width=454 height=396.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><ellipse cx=543.5 cy=684.5 rx=214.5 ry=186 fill=#015064 stroke=#007782 stroke-width=25></ellipse></g><defs><filter x=272.2 y=308 width=176.9 height=129.3 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=272.2 y=308 width=176.9 height=129.3 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><line x1=436 x2=431 y1=403.2 y2=431.8 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=291 x2=280 y1=341.5 y2=403.5 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><line x1=332.9 x2=328.6 y1=384.1 y2=411.2 fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11></line><linearGradient x1=-670.75 x2=-671.59 y1=164.4 y2=164.49 gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)"gradientUnits=userSpaceOnUse><stop stop-color=#EE2700 offset=0></stop><stop stop-color=#FF008E offset=1></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd fill-rule=evenodd></path><line x1=428.2 x2=429.1 y1=384.5 y2=378 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=395.2 x2=396.1 y1=379.5 y2=373 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=362.2 x2=363.1 y1=373.5 y2=367.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=324.2 x2=328.4 y1=351.3 y2=347.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line><line x1=303.2 x2=307.4 y1=331.3 y2=327.4 fill=none stroke=#fff stroke-linecap=round stroke-linejoin=bevel stroke-width=7></line></g><defs><filter x=73.2 y=113.8 width=280.6 height=317.4 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=73.2 y=113.8 width=280.6 height=317.4 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-672.16 x2=-672.16 y1=165.03 y2=166.03 gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)"gradientUnits=userSpaceOnUse><stop stop-color=#A17500 offset=0></stop><stop stop-color=#5D2100 offset=1></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6"clip-rule=evenodd fill-rule=evenodd></path><g stroke=#2F8A00><linearGradient x1=-660.23 x2=-660.23 y1=166.72 y2=167.72 gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-661.36 x2=-661.36 y1=164.18 y2=165.18 gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.79 x2=-656.79 y1=165.15 y2=166.15 gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-663.07 x2=-663.07 y1=165.44 y2=166.44 gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-662.57 x2=-662.57 y1=164.44 y2=165.44 gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><linearGradient x1=-656.43 x2=-656.43 y1=163.86 y2=164.86 gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)"gradientUnits=userSpaceOnUse><stop stop-color=#2F8A00 offset=0></stop><stop stop-color=#90FF57 offset=1></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z"clip-rule=evenodd fill-rule=evenodd stroke-width=13></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1"fill=none stroke-linecap=round stroke-width=8></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8"fill=none stroke-linecap=round stroke-width=8></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9"fill=none stroke-linecap=round stroke-width=8></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32"fill=none stroke-linecap=round stroke-width=8></path></g></g><defs><filter x=50.5 y=399 width=532 height=633 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=50.5 y=399 width=532 height=633 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-666.06 x2=-666.23 y1=163.36 y2=163.75 gradientTransform="matrix(532 0 0 633 354760 -102959)"gradientUnits=userSpaceOnUse><stop stop-color=#FFF400 offset=0></stop><stop stop-color=#3C8700 offset=1></stop></linearGradient><ellipse cx=316.5 cy=715.5 rx=266 ry=316.5></ellipse></g><defs><filter x=391 y=-24 width=288 height=283 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask x=391 y=-24 width=288 height=283 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#fff></circle></g></mask><g><linearGradient x1=-664.56 x2=-664.56 y1=163.79 y2=164.79 gradientTransform="matrix(227 0 0 227 151421 -37204)"gradientUnits=userSpaceOnUse><stop stop-color=#FFDF00 offset=0></stop><stop stop-color=#FF9D00 offset=1></stop></linearGradient><circle cx=565.5 cy=89.5 r=113.5></circle><linearGradient x1=-644.5 x2=-645.77 y1=342 y2=342 gradientTransform="matrix(30 0 0 1 19770 -253)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=427 x2=397 y1=89 y2=89 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-641.56 x2=-642.83 y1=196.02 y2=196.07 gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=430.5 x2=404 y1=55.5 y2=50 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-643.73 x2=-645 y1=185.83 y2=185.9 gradientTransform="matrix(29 0 0 8 19107 -1361)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=431 x2=402 y1=122 y2=130 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-638.94 x2=-640.22 y1=177.09 y2=177.39 gradientTransform="matrix(24 0 0 13 15783 -2145)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=442 x2=418 y1=153 y2=166 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-633.42 x2=-634.7 y1=172.41 y2=173.31 gradientTransform="matrix(20 0 0 19 13137 -3096)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=464 x2=444 y1=180 y2=199 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-619.05 x2=-619.52 y1=170.82 y2=171.82 gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=491.4 x2=477.5 y1=203 y2=225.9 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=-578.5 x2=-578.63 y1=170.31 y2=171.31 gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=524.5 x2=517 y1=219.5 y2=244 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12></line><linearGradient x1=666.5 x2=666.5 y1=170.31 y2=171.31 gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)"gradientUnits=userSpaceOnUse><stop stop-color=#FFA400 offset=0></stop><stop stop-color=#FF5E00 offset=1></stop></linearGradient><line x1=564.5 x2=565 y1=228.5 y2=253 fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12>');function DL(){return hL()}function Ix(){return gL()}function Po(){return yL()}function yp(){return mL()}function mp(){return hh()}function LL(){return(()=>{var e=hh();return e.style.setProperty("transform","rotate(90deg)"),e})()}function IL(){return(()=>{var e=hh();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function RL(){return pL()}function FL(){return vL()}function NL(){return bL()}function BL(){return xL()}function qL(){return wL()}function zL(){return SL()}function HL(){return CL()}function UL(){return _L()}function KL(){return kL()}function WL(e){return(()=>{var t=Lx(),n=t.firstChild;return pe(()=>Q(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function VL(){return OL()}function GL(){return EL()}function QL(e){return[$(me,{get when(){return e.checked},get children(){var t=Lx(),n=t.firstChild;return pe(()=>Q(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),$(me,{get when(){return!e.checked},get children(){var t=AL(),n=t.firstChild;return pe(()=>Q(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function YL(){return TL()}function XL(){return PL()}function JL(){return $L()}function ZL(){return ML()}function pp(){const e=fn();return(()=>{var t=jL(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,c=l.nextSibling,u=c.firstChild,d=c.nextSibling,f=d.firstChild,h=d.nextSibling,g=h.nextSibling,m=g.firstChild,p=g.nextSibling,v=p.firstChild,b=p.nextSibling,w=b.nextSibling,S=w.firstChild,x=w.nextSibling,E=x.firstChild,C=x.nextSibling,k=C.nextSibling,_=k.firstChild,O=k.nextSibling,P=O.firstChild,j=O.nextSibling,W=j.nextSibling,I=W.firstChild,D=W.nextSibling,L=D.firstChild,F=D.nextSibling,oe=F.nextSibling,fe=oe.firstChild,B=oe.nextSibling,V=B.firstChild,te=B.nextSibling,ae=te.firstChild,R=ae.nextSibling,ce=R.nextSibling,ee=ce.nextSibling,xe=ee.nextSibling,J=te.nextSibling,se=J.firstChild,le=J.nextSibling,Ae=le.firstChild,Z=le.nextSibling,it=Z.firstChild,Tt=it.nextSibling,Pt=Tt.nextSibling,Jt=Pt.firstChild,yn=Jt.nextSibling,X=yn.nextSibling,De=X.nextSibling,st=De.nextSibling,Re=st.nextSibling,Fe=Re.nextSibling,Ne=Fe.nextSibling,ge=Ne.nextSibling,ue=ge.nextSibling,Oe=ue.nextSibling,Le=Oe.nextSibling,mn=Z.nextSibling,Qr=mn.firstChild,Kn=mn.nextSibling,Yr=Kn.firstChild,Wn=Kn.nextSibling,pr=Wn.firstChild,Ba=pr.nextSibling,Qs=Wn.nextSibling,qa=Qs.firstChild,Ii=Qs.nextSibling,za=Ii.firstChild,Ys=Ii.nextSibling,Xs=Ys.firstChild,Js=Xs.nextSibling,Ri=Js.nextSibling,vh=Ri.nextSibling,bh=vh.nextSibling,xh=bh.nextSibling,wh=xh.nextSibling,Sh=wh.nextSibling,Ch=Sh.nextSibling,_h=Ch.nextSibling,kh=_h.nextSibling,Oh=kh.nextSibling,Eh=Oh.nextSibling,Ah=Eh.nextSibling,Th=Ah.nextSibling,Ph=Th.nextSibling,$h=Ph.nextSibling,Qx=$h.nextSibling;return Q(n,"id",`a-${e}`),Q(r,"fill",`url(#a-${e})`),Q(s,"id",`am-${e}`),Q(o,"id",`b-${e}`),Q(a,"filter",`url(#am-${e})`),Q(l,"mask",`url(#b-${e})`),Q(u,"id",`ah-${e}`),Q(d,"id",`k-${e}`),Q(f,"filter",`url(#ah-${e})`),Q(h,"mask",`url(#k-${e})`),Q(m,"id",`ae-${e}`),Q(p,"id",`j-${e}`),Q(v,"filter",`url(#ae-${e})`),Q(b,"mask",`url(#j-${e})`),Q(S,"id",`ai-${e}`),Q(x,"id",`i-${e}`),Q(E,"filter",`url(#ai-${e})`),Q(C,"mask",`url(#i-${e})`),Q(_,"id",`aj-${e}`),Q(O,"id",`h-${e}`),Q(P,"filter",`url(#aj-${e})`),Q(j,"mask",`url(#h-${e})`),Q(I,"id",`ag-${e}`),Q(D,"id",`g-${e}`),Q(L,"filter",`url(#ag-${e})`),Q(F,"mask",`url(#g-${e})`),Q(fe,"id",`af-${e}`),Q(B,"id",`f-${e}`),Q(V,"filter",`url(#af-${e})`),Q(te,"mask",`url(#f-${e})`),Q(ee,"id",`m-${e}`),Q(xe,"fill",`url(#m-${e})`),Q(se,"id",`ak-${e}`),Q(le,"id",`e-${e}`),Q(Ae,"filter",`url(#ak-${e})`),Q(Z,"mask",`url(#e-${e})`),Q(it,"id",`n-${e}`),Q(Tt,"fill",`url(#n-${e})`),Q(Jt,"id",`r-${e}`),Q(yn,"fill",`url(#r-${e})`),Q(X,"id",`s-${e}`),Q(De,"fill",`url(#s-${e})`),Q(st,"id",`q-${e}`),Q(Re,"fill",`url(#q-${e})`),Q(Fe,"id",`p-${e}`),Q(Ne,"fill",`url(#p-${e})`),Q(ge,"id",`o-${e}`),Q(ue,"fill",`url(#o-${e})`),Q(Oe,"id",`l-${e}`),Q(Le,"fill",`url(#l-${e})`),Q(Qr,"id",`al-${e}`),Q(Kn,"id",`d-${e}`),Q(Yr,"filter",`url(#al-${e})`),Q(Wn,"mask",`url(#d-${e})`),Q(pr,"id",`u-${e}`),Q(Ba,"fill",`url(#u-${e})`),Q(qa,"id",`ad-${e}`),Q(Ii,"id",`c-${e}`),Q(za,"filter",`url(#ad-${e})`),Q(Ys,"mask",`url(#c-${e})`),Q(Xs,"id",`t-${e}`),Q(Js,"fill",`url(#t-${e})`),Q(Ri,"id",`v-${e}`),Q(vh,"stroke",`url(#v-${e})`),Q(bh,"id",`aa-${e}`),Q(xh,"stroke",`url(#aa-${e})`),Q(wh,"id",`w-${e}`),Q(Sh,"stroke",`url(#w-${e})`),Q(Ch,"id",`ac-${e}`),Q(_h,"stroke",`url(#ac-${e})`),Q(kh,"id",`ab-${e}`),Q(Oh,"stroke",`url(#ab-${e})`),Q(Eh,"id",`y-${e}`),Q(Ah,"stroke",`url(#y-${e})`),Q(Th,"id",`x-${e}`),Q(Ph,"stroke",`url(#x-${e})`),Q($h,"id",`z-${e}`),Q(Qx,"stroke",`url(#z-${e})`),t})()}var eI=de('<span><svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg><path d="M6 12L10 8L6 4"stroke-width=2 stroke-linecap=round stroke-linejoin=round>'),tI=de('<button title="Copy object to clipboard">'),nI=de('<button title="Remove all items"aria-label="Remove all items">'),rI=de('<button title="Delete item"aria-label="Delete item">'),iI=de('<button title="Toggle value"aria-label="Toggle value">'),sI=de('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),fo=de("<div>"),oI=de("<div><button> <span></span> <span> "),aI=de("<input>"),vp=de("<span>"),lI=de("<div><span>:"),cI=de("<div><div><button> [<!>...<!>]");function uI(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var bp=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n));return(()=>{var i=eI();return pe(()=>Y(i,ie(r().expander,n`
|
|
69
70
|
transform: rotate(${e.expanded?90:0}deg);
|
|
70
71
|
`,e.expanded&&n`
|
|
71
72
|
& svg {
|
|
72
73
|
top: -1px;
|
|
73
74
|
}
|
|
74
|
-
`))),i})()},
|
|
75
|
-
width: ${
|
|
76
|
-
height: ${
|
|
77
|
-
`))),s})()};function
|
|
75
|
+
`))),i})()},dI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n)),[i,s]=ne("NoCopy");return(()=>{var o=tI();return G0(o,"click",i()==="NoCopy"?()=>{navigator.clipboard.writeText(CC(e.value)).then(()=>{s("SuccessCopy"),setTimeout(()=>{s("NoCopy")},1500)},a=>{s("ErrorCopy"),setTimeout(()=>{s("NoCopy")},1500)})}:void 0,!0),U(o,$(kS,{get children(){return[$(ou,{get when(){return i()==="NoCopy"},get children(){return $(UL,{})}}),$(ou,{get when(){return i()==="SuccessCopy"},get children(){return $(WL,{get theme(){return t()}})}}),$(ou,{get when(){return i()==="ErrorCopy"},get children(){return $(VL,{})}})]}})),pe(a=>{var l=r().actionButton,c=`${i()==="NoCopy"?"Copy object to clipboard":i()==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard"}`;return l!==a.e&&Y(o,a.e=l),c!==a.t&&Q(o,"aria-label",a.t=c),a},{e:void 0,t:void 0}),o})()},fI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n)),i=he().client;return(()=>{var s=nI();return s.$$click=()=>{const o=e.activeQuery.state.data,a=oi(o,e.dataPath,[]);i.setQueryData(e.activeQuery.queryKey,a)},U(s,$(GL,{})),pe(()=>Y(s,r().actionButton)),s})()},xp=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n)),i=he().client;return(()=>{var s=rI();return s.$$click=()=>{const o=e.activeQuery.state.data,a=mo(o,e.dataPath);i.setQueryData(e.activeQuery.queryKey,a)},U(s,$(Ix,{})),pe(()=>Y(s,ie(r().actionButton))),s})()},hI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n)),i=he().client;return(()=>{var s=iI();return s.$$click=()=>{const o=e.activeQuery.state.data,a=oi(o,e.dataPath,!e.value);i.setQueryData(e.activeQuery.queryKey,a)},U(s,$(QL,{get theme(){return t()},get checked(){return e.value}})),pe(()=>Y(s,ie(r().actionButton,n`
|
|
76
|
+
width: ${H.size[3.5]};
|
|
77
|
+
height: ${H.size[3.5]};
|
|
78
|
+
`))),s})()};function wp(e){return Symbol.iterator in e}function Lr(e){var g;const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?Gs(n):Vs(n)),i=he().client,[s,o]=ne((e.defaultExpanded||[]).includes(e.label)),a=()=>o(m=>!m),[l,c]=ne([]),u=q(()=>Array.isArray(e.value)?e.value.map((m,p)=>({label:p.toString(),value:m})):e.value!==null&&typeof e.value=="object"&&wp(e.value)&&typeof e.value[Symbol.iterator]=="function"?e.value instanceof Map?Array.from(e.value,([m,p])=>({label:m,value:p})):Array.from(e.value,(m,p)=>({label:p.toString(),value:m})):typeof e.value=="object"&&e.value!==null?Object.entries(e.value).map(([m,p])=>({label:m,value:p})):[]),d=q(()=>Array.isArray(e.value)?"array":e.value!==null&&typeof e.value=="object"&&wp(e.value)&&typeof e.value[Symbol.iterator]=="function"?"Iterable":typeof e.value=="object"&&e.value!==null?"object":typeof e.value),f=q(()=>uI(u(),100)),h=(g=e.dataPath)!=null?g:[];return(()=>{var m=fo();return U(m,$(me,{get when(){return f().length},get children(){return[(()=>{var p=oI(),v=p.firstChild,b=v.firstChild,w=b.nextSibling,S=w.nextSibling,x=S.nextSibling,E=x.firstChild;return v.$$click=()=>a(),U(v,$(bp,{get expanded(){return s()}}),b),U(w,()=>e.label),U(x,()=>String(d()).toLowerCase()==="iterable"?"(Iterable) ":"",E),U(x,()=>u().length,E),U(x,()=>u().length>1?"items":"item",null),U(p,$(me,{get when(){return e.editable},get children(){var C=fo();return U(C,$(dI,{get value(){return e.value}}),null),U(C,$(me,{get when(){return e.itemsDeletable&&e.activeQuery!==void 0},get children(){return $(xp,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),U(C,$(me,{get when(){return d()==="array"&&e.activeQuery!==void 0},get children(){return $(fI,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),U(C,$(me,{get when(){return q(()=>!!e.onEdit)()&&!hv(e.value).meta},get children(){var k=sI();return k.$$click=()=>{var _;(_=e.onEdit)==null||_.call(e)},U(k,$(KL,{})),pe(()=>Y(k,r().actionButton)),k}}),null),pe(()=>Y(C,r().actions)),C}}),null),pe(C=>{var k=r().expanderButtonContainer,_=r().expanderButton,O=r().info;return k!==C.e&&Y(p,C.e=k),_!==C.t&&Y(v,C.t=_),O!==C.a&&Y(x,C.a=O),C},{e:void 0,t:void 0,a:void 0}),p})(),$(me,{get when(){return s()},get children(){return[$(me,{get when(){return f().length===1},get children(){var p=fo();return U(p,$(ac,{get each(){return u()},by:v=>v.label,children:v=>$(Lr,{get defaultExpanded(){return e.defaultExpanded},get label(){return v().label},get value(){return v().value},get editable(){return e.editable},get dataPath(){return[...h,v().label]},get activeQuery(){return e.activeQuery},get itemsDeletable(){return d()==="array"||d()==="Iterable"||d()==="object"}})})),pe(()=>Y(p,r().subEntry)),p}}),$(me,{get when(){return f().length>1},get children(){var p=fo();return U(p,$(_S,{get each(){return f()},children:(v,b)=>(()=>{var w=cI(),S=w.firstChild,x=S.firstChild,E=x.firstChild,C=E.nextSibling,k=C.nextSibling,_=k.nextSibling;return _.nextSibling,x.$$click=()=>c(O=>O.includes(b)?O.filter(P=>P!==b):[...O,b]),U(x,$(bp,{get expanded(){return l().includes(b)}}),E),U(x,b*100,C),U(x,b*100+100-1,_),U(S,$(me,{get when(){return l().includes(b)},get children(){var O=fo();return U(O,$(ac,{get each(){return v()},by:P=>P.label,children:P=>$(Lr,{get defaultExpanded(){return e.defaultExpanded},get label(){return P().label},get value(){return P().value},get editable(){return e.editable},get dataPath(){return[...h,P().label]},get activeQuery(){return e.activeQuery}})})),pe(()=>Y(O,r().subEntry)),O}}),null),pe(O=>{var P=r().entry,j=r().expanderButton;return P!==O.e&&Y(S,O.e=P),j!==O.t&&Y(x,O.t=j),O},{e:void 0,t:void 0}),w})()})),pe(()=>Y(p,r().subEntry)),p}})]}})]}}),null),U(m,$(me,{get when(){return f().length===0},get children(){var p=lI(),v=p.firstChild,b=v.firstChild;return U(v,()=>e.label,b),U(p,$(me,{get when(){return q(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number"||d()==="boolean")},get fallback(){return(()=>{var w=vp();return U(w,()=>Kl(e.value)),pe(()=>Y(w,r().value)),w})()},get children(){return[$(me,{get when(){return q(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number")},get children(){var w=aI();return w.addEventListener("change",S=>{const x=e.activeQuery.state.data,E=oi(x,h,d()==="number"?S.target.valueAsNumber:S.target.value);i.setQueryData(e.activeQuery.queryKey,E)}),pe(S=>{var x=d()==="number"?"number":"text",E=ie(r().value,r().editableInput);return x!==S.e&&Q(w,"type",S.e=x),E!==S.t&&Y(w,S.t=E),S},{e:void 0,t:void 0}),pe(()=>w.value=e.value),w}}),$(me,{get when(){return d()==="boolean"},get children(){var w=vp();return U(w,$(hI,{get activeQuery(){return e.activeQuery},dataPath:h,get value(){return e.value}}),null),U(w,()=>Kl(e.value),null),pe(()=>Y(w,ie(r().value,r().actions,r().editableInput))),w}})]}}),null),U(p,$(me,{get when(){return e.editable&&e.itemsDeletable&&e.activeQuery!==void 0},get children(){return $(xp,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),pe(w=>{var S=r().row,x=r().label;return S!==w.e&&Y(p,w.e=S),x!==w.t&&Y(v,w.t=x),w},{e:void 0,t:void 0}),p}}),null),pe(()=>Y(m,r().entry)),m})()}var Rx=(e,t)=>{const{colors:n,font:r,size:i,border:s}=H,o=(a,l)=>e==="light"?a:l;return{entry:t`
|
|
78
79
|
& * {
|
|
79
80
|
font-size: ${r.size.xs};
|
|
80
81
|
font-family:
|
|
@@ -186,7 +187,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
186
187
|
outline: 2px solid ${n.blue[800]};
|
|
187
188
|
outline-offset: 2px;
|
|
188
189
|
}
|
|
189
|
-
`}},
|
|
190
|
+
`}},Vs=e=>Rx("light",e),Gs=e=>Rx("dark",e);wc(["click"]);var gI=de('<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>'),Na=de("<div>"),yI=de('<aside aria-label="Tanstack query devtools"><div></div><button aria-label="Close tanstack query devtools">'),mI=de("<select name=tsqd-queries-filter-sort>"),pI=de("<select name=tsqd-mutations-filter-sort>"),vI=de("<span>Asc"),bI=de("<span>Desc"),xI=de('<button aria-label="Open in picture-in-picture mode"title="Open in picture-in-picture mode">'),wI=de("<div>Settings"),SI=de("<span>Position"),CI=de("<span>Top"),_I=de("<span>Bottom"),kI=de("<span>Left"),OI=de("<span>Right"),EI=de("<span>Theme"),AI=de("<span>Light"),TI=de("<span>Dark"),PI=de("<span>System"),$I=de("<div><div class=tsqd-queries-container>"),MI=de("<div><div class=tsqd-mutations-container>"),jI=de('<div><div><div><button aria-label="Close Tanstack query devtools"><span>TANSTACK</span><span> v</span></button></div></div><div><div><div><input aria-label="Filter queries by query key"type=text placeholder=Filter name=tsqd-query-filter-input></div><div></div><button class=tsqd-query-filter-sort-order-btn></button></div><div><button aria-label="Clear query cache"></button><button>'),Sp=de("<option>Sort by "),DI=de("<div class=tsqd-query-disabled-indicator>disabled"),LI=de("<div class=tsqd-query-static-indicator>static"),Fx=de("<button><div></div><code class=tsqd-query-hash>"),II=de("<div role=tooltip id=tsqd-status-tooltip>"),RI=de("<span>"),FI=de("<button><span></span><span>"),NI=de("<button><span></span> Error"),BI=de('<div><span></span>Trigger Error<select><option value=""disabled selected>'),qI=de('<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">'),zI=de("<form><textarea name=data></textarea><div><span></span><div><button type=button>Cancel</button><button>Save"),HI=de('<div><div>Query Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-observers-count><span>Observers:</span><span></span></div><div class=tsqd-query-details-last-updated><span>Last Updated:</span><span></span></div></div><div>Actions</div><div><button><span></span>Refetch</button><button><span></span>Invalidate</button><button><span></span>Reset</button><button><span></span>Remove</button><button><span></span> Loading</button></div><div>Data </div><div>Query Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),UI=de("<option>"),KI=de('<div><div>Mutation Details</div><div><div class=tsqd-query-details-summary><pre><code></code></pre><span></span></div><div class=tsqd-query-details-last-updated><span>Submitted At:</span><span></span></div></div><div>Variables Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Context Details</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Data Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"></div><div>Mutations Explorer</div><div class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer">'),[Wt,Jc]=ne(null),[Fr,Nx]=ne(null),[wn,gh]=ne(0),[ho,WI]=ne(!1),VI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n)),i=q(()=>he().onlineManager);dr(()=>{const d=i().subscribe(f=>{WI(!f)});be(()=>{d()})});const s=Gf(),o=q(()=>he().buttonPosition||Gj),a=q(()=>e.localStore.open==="true"?!0:e.localStore.open==="false"?!1:he().initialIsOpen||Qj),l=q(()=>e.localStore.position||he().position||Yd);let c;ve(()=>{const d=c.parentElement,f=e.localStore.height||c1,h=e.localStore.width||u1,g=l();d.style.setProperty("--tsqd-panel-height",`${g==="top"?"-":""}${f}px`),d.style.setProperty("--tsqd-panel-width",`${g==="left"?"-":""}${h}px`)}),dr(()=>{const d=()=>{const f=c.parentElement,h=getComputedStyle(f).fontSize;f.style.setProperty("--tsqd-font-size",h)};d(),window.addEventListener("focus",d),be(()=>{window.removeEventListener("focus",d)})});const u=q(()=>{var d;return(d=e.localStore.pip_open)!=null?d:"false"});return[$(me,{get when(){return q(()=>!!s().pipWindow)()&&u()=="true"},get children(){return $(J0,{get mount(){var d;return(d=s().pipWindow)==null?void 0:d.document.body},get children(){return $(GI,{get children(){return $(yh,e)}})}})}}),(()=>{var d=Na(),f=c;return typeof f=="function"?Ns(f,d):c=d,U(d,$(Fm,{name:"tsqd-panel-transition",get children(){return $(me,{get when(){return q(()=>!!(a()&&!s().pipWindow))()&&u()=="false"},get children(){return $(YI,{get localStore(){return e.localStore},get setLocalStore(){return e.setLocalStore}})}})}}),null),U(d,$(Fm,{name:"tsqd-button-transition",get children(){return $(me,{get when(){return!a()},get children(){var h=gI(),g=h.firstChild,m=g.nextSibling;return U(g,$(pp,{})),m.$$click=()=>e.setLocalStore("open","true"),U(m,$(pp,{})),pe(()=>Y(h,ie(r().devtoolsBtn,r()[`devtoolsBtn-position-${o()}`],"tsqd-open-btn-container"))),h}})}}),null),pe(()=>Y(d,ie(n`
|
|
190
191
|
& .tsqd-panel-transition-exit-active,
|
|
191
192
|
& .tsqd-panel-transition-enter-active {
|
|
192
193
|
transition:
|
|
@@ -212,62 +213,62 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
212
213
|
transform: ${o()==="relative"?"none;":o()==="top-left"?"translateX(-72px);":o()==="top-right"?"translateX(72px);":"translateY(72px);"};
|
|
213
214
|
opacity: 0;
|
|
214
215
|
}
|
|
215
|
-
`,"tsqd-transitions-container"))),d})()]},
|
|
216
|
+
`,"tsqd-transitions-container"))),d})()]},GI=e=>{const t=Gf(),n=gt(),r=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,i=q(()=>n()==="dark"?gn(r):hn(r)),s=()=>{const{colors:o}=H,a=(l,c)=>n()==="dark"?c:l;return wn()<Ti?r`
|
|
216
217
|
flex-direction: column;
|
|
217
218
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
218
219
|
`:r`
|
|
219
220
|
flex-direction: row;
|
|
220
221
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
221
|
-
`};return ve(()=>{const o=t().pipWindow,a=()=>{o&&
|
|
222
|
+
`};return ve(()=>{const o=t().pipWindow,a=()=>{o&&gh(o.innerWidth)};o&&(o.addEventListener("resize",a),a()),be(()=>{o&&o.removeEventListener("resize",a)})}),(()=>{var o=Na();return o.style.setProperty("--tsqd-font-size","16px"),o.style.setProperty("max-height","100vh"),o.style.setProperty("height","100vh"),o.style.setProperty("width","100vw"),U(o,()=>e.children),pe(()=>Y(o,ie(i().panel,s(),{[r`
|
|
222
223
|
min-width: min-content;
|
|
223
|
-
`]:
|
|
224
|
+
`]:wn()<Wf},"tsqd-main-panel"))),o})()},QI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n));let i;dr(()=>{p1(i,({width:o},a)=>{a===i&&gh(o)})});const s=()=>{const{colors:o}=H,a=(l,c)=>t()==="dark"?c:l;return wn()<Ti?n`
|
|
224
225
|
flex-direction: column;
|
|
225
226
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
226
227
|
`:n`
|
|
227
228
|
flex-direction: row;
|
|
228
229
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
229
|
-
`};return(()=>{var o=
|
|
230
|
+
`};return(()=>{var o=Na(),a=i;return typeof a=="function"?Ns(a,o):i=o,o.style.setProperty("--tsqd-font-size","16px"),U(o,()=>e.children),pe(()=>Y(o,ie(r().parentPanel,s(),{[n`
|
|
230
231
|
min-width: min-content;
|
|
231
|
-
`]:
|
|
232
|
+
`]:wn()<Wf},"tsqd-main-panel"))),o})()},YI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n)),[i,s]=ne(!1),o=q(()=>e.localStore.position||he().position||Yd),a=u=>{const d=u.currentTarget.parentElement;if(!d)return;s(!0);const{height:f,width:h}=d.getBoundingClientRect(),g=u.clientX,m=u.clientY;let p=0;const v=ig(3.5),b=ig(12),w=x=>{if(x.preventDefault(),o()==="left"||o()==="right"){const E=o()==="right"?g-x.clientX:x.clientX-g;p=Math.round(h+E),p<b&&(p=b),e.setLocalStore("width",String(Math.round(p)));const C=d.getBoundingClientRect().width;Number(e.localStore.width)<C&&e.setLocalStore("width",String(C))}else{const E=o()==="bottom"?m-x.clientY:x.clientY-m;p=Math.round(f+E),p<v&&(p=v,Jc(null)),e.setLocalStore("height",String(Math.round(p)))}},S=()=>{i()&&s(!1),document.removeEventListener("mousemove",w,!1),document.removeEventListener("mouseUp",S,!1)};document.addEventListener("mousemove",w,!1),document.addEventListener("mouseup",S,!1)};let l;dr(()=>{p1(l,({width:u},d)=>{d===l&&gh(u)})}),ve(()=>{var m,p;const u=(p=(m=l.parentElement)==null?void 0:m.parentElement)==null?void 0:p.parentElement;if(!u)return;const d=e.localStore.position||Yd,f=_C("padding",d),h=e.localStore.position==="left"||e.localStore.position==="right",g=(({padding:v,paddingTop:b,paddingBottom:w,paddingLeft:S,paddingRight:x})=>({padding:v,paddingTop:b,paddingBottom:w,paddingLeft:S,paddingRight:x}))(u.style);u.style[f]=`${h?e.localStore.width:e.localStore.height}px`,be(()=>{Object.entries(g).forEach(([v,b])=>{u.style[v]=b})})});const c=()=>{const{colors:u}=H,d=(f,h)=>t()==="dark"?h:f;return wn()<Ti?n`
|
|
232
233
|
flex-direction: column;
|
|
233
234
|
background-color: ${d(u.gray[300],u.gray[600])};
|
|
234
235
|
`:n`
|
|
235
236
|
flex-direction: row;
|
|
236
237
|
background-color: ${d(u.gray[200],u.darkGray[900])};
|
|
237
|
-
`};return(()=>{var u=
|
|
238
|
+
`};return(()=>{var u=yI(),d=u.firstChild,f=d.nextSibling,h=l;return typeof h=="function"?Ns(h,u):l=u,d.$$mousedown=a,f.$$click=()=>e.setLocalStore("open","false"),U(f,$(Po,{})),U(u,$(yh,e),null),pe(g=>{var m=ie(r().panel,r()[`panel-position-${o()}`],c(),{[n`
|
|
238
239
|
min-width: min-content;
|
|
239
|
-
`]:
|
|
240
|
+
`]:wn()<Wf&&(o()==="right"||o()==="left")},"tsqd-main-panel"),p=o()==="bottom"||o()==="top"?`${e.localStore.height||c1}px`:"auto",v=o()==="right"||o()==="left"?`${e.localStore.width||u1}px`:"auto",b=ie(r().dragHandle,r()[`dragHandle-position-${o()}`],"tsqd-drag-handle"),w=ie(r().closeBtn,r()[`closeBtn-position-${o()}`],"tsqd-minimize-btn");return m!==g.e&&Y(u,g.e=m),p!==g.t&&((g.t=p)!=null?u.style.setProperty("height",p):u.style.removeProperty("height")),v!==g.a&&((g.a=v)!=null?u.style.setProperty("width",v):u.style.removeProperty("width")),b!==g.o&&Y(d,g.o=b),w!==g.i&&Y(f,g.i=w),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),u})()},yh=e=>{rR(),iR();let t;const n=gt(),r=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,i=q(()=>n()==="dark"?gn(r):hn(r)),s=Gf(),[o,a]=ne("queries"),l=q(()=>e.localStore.sort||Xj),c=q(()=>Number(e.localStore.sortOrder)||$m),u=q(()=>e.localStore.mutationSort||Jj),d=q(()=>Number(e.localStore.mutationSortOrder)||$m),f=q(()=>yd[l()]),h=q(()=>md[u()]),g=q(()=>he().onlineManager),m=q(()=>he().client.getQueryCache()),p=q(()=>he().client.getMutationCache()),v=dt(C=>C().getAll().length,!1),b=q(ur(()=>[v(),e.localStore.filter,l(),c()],()=>{const C=m().getAll(),k=e.localStore.filter?C.filter(O=>Mm(O.queryHash,e.localStore.filter||"").passed):[...C];return f()?k.sort((O,P)=>f()(O,P)*c()):k})),w=xn(C=>C().getAll().length,!1),S=q(ur(()=>[w(),e.localStore.mutationFilter,u(),d()],()=>{const C=p().getAll(),k=e.localStore.mutationFilter?C.filter(O=>{const P=`${O.options.mutationKey?JSON.stringify(O.options.mutationKey)+" - ":""}${new Date(O.state.submittedAt).toLocaleString()}`;return Mm(P,e.localStore.mutationFilter||"").passed}):[...C];return h()?k.sort((O,P)=>h()(O,P)*d()):k})),x=C=>{e.setLocalStore("position",C)},E=C=>{const _=getComputedStyle(t).getPropertyValue("--tsqd-font-size");C.style.setProperty("--tsqd-font-size",_)};return[(()=>{var C=jI(),k=C.firstChild,_=k.firstChild,O=_.firstChild,P=O.firstChild,j=P.nextSibling,W=j.firstChild,I=k.nextSibling,D=I.firstChild,L=D.firstChild,F=L.firstChild,oe=L.nextSibling,fe=oe.nextSibling,B=D.nextSibling,V=B.firstChild,te=V.nextSibling,ae=t;return typeof ae=="function"?Ns(ae,C):t=C,O.$$click=()=>{if(!s().pipWindow&&!e.showPanelViewOnly){e.setLocalStore("open","false");return}e.onClose&&e.onClose()},U(j,()=>he().queryFlavor,W),U(j,()=>he().version,null),U(_,$(nn.Root,{get class(){return ie(i().viewToggle)},get value(){return o()},onChange:R=>{a(R),Jc(null),Nx(null)},get children(){return[$(nn.Item,{value:"queries",class:"tsqd-radio-toggle",get children(){return[$(nn.ItemInput,{}),$(nn.ItemControl,{get children(){return $(nn.ItemIndicator,{})}}),$(nn.ItemLabel,{title:"Toggle Queries View",children:"Queries"})]}}),$(nn.Item,{value:"mutations",class:"tsqd-radio-toggle",get children(){return[$(nn.ItemInput,{}),$(nn.ItemControl,{get children(){return $(nn.ItemIndicator,{})}}),$(nn.ItemLabel,{title:"Toggle Mutations View",children:"Mutations"})]}})]}}),null),U(k,$(me,{get when(){return o()==="queries"},get children(){return $(ZI,{})}}),null),U(k,$(me,{get when(){return o()==="mutations"},get children(){return $(eR,{})}}),null),U(L,$(DL,{}),F),F.$$input=R=>{o()==="queries"?e.setLocalStore("filter",R.currentTarget.value):e.setLocalStore("mutationFilter",R.currentTarget.value)},U(oe,$(me,{get when(){return o()==="queries"},get children(){var R=mI();return R.addEventListener("change",ce=>{e.setLocalStore("sort",ce.currentTarget.value)}),U(R,()=>Object.keys(yd).map(ce=>(()=>{var ee=Sp();return ee.firstChild,ee.value=ce,U(ee,ce,null),ee})())),pe(()=>R.value=l()),R}}),null),U(oe,$(me,{get when(){return o()==="mutations"},get children(){var R=pI();return R.addEventListener("change",ce=>{e.setLocalStore("mutationSort",ce.currentTarget.value)}),U(R,()=>Object.keys(md).map(ce=>(()=>{var ee=Sp();return ee.firstChild,ee.value=ce,U(ee,ce,null),ee})())),pe(()=>R.value=u()),R}}),null),U(oe,$(Po,{}),null),fe.$$click=()=>{o()==="queries"?e.setLocalStore("sortOrder",String(c()*-1)):e.setLocalStore("mutationSortOrder",String(d()*-1))},U(fe,$(me,{get when(){return(o()==="queries"?c():d())===1},get children(){return[vI(),$(yp,{})]}}),null),U(fe,$(me,{get when(){return(o()==="queries"?c():d())===-1},get children(){return[bI(),$(mp,{})]}}),null),V.$$click=()=>{o()==="queries"?(Mn({type:"CLEAR_QUERY_CACHE"}),m().clear()):(Mn({type:"CLEAR_MUTATION_CACHE"}),p().clear())},U(V,$(Ix,{})),te.$$click=()=>{g().setOnline(!g().isOnline())},U(te,(()=>{var R=q(()=>!!ho());return()=>R()?$(qL,{}):$(BL,{})})()),U(B,$(me,{get when(){return q(()=>!s().pipWindow)()&&!s().disabled},get children(){var R=xI();return R.$$click=()=>{var ce;s().requestPipWindow(Number(window.innerWidth),Number((ce=e.localStore.height)!=null?ce:500))},U(R,$(HL,{})),pe(()=>Y(R,ie(i().actionsBtn,"tsqd-actions-btn","tsqd-action-open-pip"))),R}}),null),U(B,$(ot.Root,{gutter:4,get children(){return[$(ot.Trigger,{get class(){return ie(i().actionsBtn,"tsqd-actions-btn","tsqd-action-settings")},get children(){return $(zL,{})}}),$(ot.Portal,{ref:R=>E(R),get mount(){return q(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return $(ot.Content,{get class(){return ie(i().settingsMenu,"tsqd-settings-menu")},get children(){return[(()=>{var R=wI();return pe(()=>Y(R,ie(i().settingsMenuHeader,"tsqd-settings-menu-header"))),R})(),$(me,{get when(){return!e.showPanelViewOnly},get children(){return $(ot.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[$(ot.SubTrigger,{get class(){return ie(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[SI(),$(Po,{})]}}),$(ot.Portal,{ref:R=>E(R),get mount(){return q(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return $(ot.SubContent,{get class(){return ie(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[$(ot.Item,{onSelect:()=>{x("top")},as:"button",get class(){return ie(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[CI(),$(yp,{})]}}),$(ot.Item,{onSelect:()=>{x("bottom")},as:"button",get class(){return ie(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[_I(),$(mp,{})]}}),$(ot.Item,{onSelect:()=>{x("left")},as:"button",get class(){return ie(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[kI(),$(LL,{})]}}),$(ot.Item,{onSelect:()=>{x("right")},as:"button",get class(){return ie(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-right")},get children(){return[OI(),$(IL,{})]}})]}})}})]}})}}),$(ot.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[$(ot.SubTrigger,{get class(){return ie(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[EI(),$(Po,{})]}}),$(ot.Portal,{ref:R=>E(R),get mount(){return q(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return $(ot.SubContent,{get class(){return ie(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[$(ot.Item,{onSelect:()=>{e.setLocalStore("theme_preference","light")},as:"button",get class(){return ie(i().settingsSubButton,e.localStore.theme_preference==="light"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[AI(),$(RL,{})]}}),$(ot.Item,{onSelect:()=>{e.setLocalStore("theme_preference","dark")},as:"button",get class(){return ie(i().settingsSubButton,e.localStore.theme_preference==="dark"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[TI(),$(FL,{})]}}),$(ot.Item,{onSelect:()=>{e.setLocalStore("theme_preference","system")},as:"button",get class(){return ie(i().settingsSubButton,e.localStore.theme_preference==="system"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[PI(),$(NL,{})]}})]}})}})]}})]}})}})]}}),null),U(C,$(me,{get when(){return o()==="queries"},get children(){var R=$I(),ce=R.firstChild;return U(ce,$(ac,{by:ee=>ee.queryHash,get each(){return b()},children:ee=>$(XI,{get query(){return ee()}})})),pe(()=>Y(R,ie(i().overflowQueryContainer,"tsqd-queries-overflow-container"))),R}}),null),U(C,$(me,{get when(){return o()==="mutations"},get children(){var R=MI(),ce=R.firstChild;return U(ce,$(ac,{by:ee=>ee.mutationId,get each(){return S()},children:ee=>$(JI,{get mutation(){return ee()}})})),pe(()=>Y(R,ie(i().overflowQueryContainer,"tsqd-mutations-overflow-container"))),R}}),null),pe(R=>{var ce=ie(i().queriesContainer,wn()<Ti&&(Wt()||Fr())&&r`
|
|
240
241
|
height: 50%;
|
|
241
242
|
max-height: 50%;
|
|
242
|
-
`,
|
|
243
|
+
`,wn()<Ti&&!(Wt()||Fr())&&r`
|
|
243
244
|
height: 100%;
|
|
244
245
|
max-height: 100%;
|
|
245
|
-
`,"tsqd-queries-container"),ee=ie(i().row,"tsqd-header"),xe=i().logoAndToggleContainer,J=ie(i().logo,"tsqd-text-logo-container"),se=ie(i().tanstackLogo,"tsqd-text-logo-tanstack"),
|
|
246
|
+
`,"tsqd-queries-container"),ee=ie(i().row,"tsqd-header"),xe=i().logoAndToggleContainer,J=ie(i().logo,"tsqd-text-logo-container"),se=ie(i().tanstackLogo,"tsqd-text-logo-tanstack"),le=ie(i().queryFlavorLogo,"tsqd-text-logo-query-flavor"),Ae=ie(i().row,"tsqd-filters-actions-container"),Z=ie(i().filtersContainer,"tsqd-filters-container"),it=ie(i().filterInput,"tsqd-query-filter-textfield-container"),Tt=ie("tsqd-query-filter-textfield"),Pt=ie(i().filterSelect,"tsqd-query-filter-sort-container"),Jt=`Sort order ${(o()==="queries"?c():d())===-1?"descending":"ascending"}`,yn=(o()==="queries"?c():d())===-1,X=ie(i().actionsContainer,"tsqd-actions-container"),De=ie(i().actionsBtn,"tsqd-actions-btn","tsqd-action-clear-cache"),st=`Clear ${o()} cache`,Re=ie(i().actionsBtn,ho()&&i().actionsBtnOffline,"tsqd-actions-btn","tsqd-action-mock-offline-behavior"),Fe=`${ho()?"Unset offline mocking behavior":"Mock offline behavior"}`,Ne=ho(),ge=`${ho()?"Unset offline mocking behavior":"Mock offline behavior"}`;return ce!==R.e&&Y(C,R.e=ce),ee!==R.t&&Y(k,R.t=ee),xe!==R.a&&Y(_,R.a=xe),J!==R.o&&Y(O,R.o=J),se!==R.i&&Y(P,R.i=se),le!==R.n&&Y(j,R.n=le),Ae!==R.s&&Y(I,R.s=Ae),Z!==R.h&&Y(D,R.h=Z),it!==R.r&&Y(L,R.r=it),Tt!==R.d&&Y(F,R.d=Tt),Pt!==R.l&&Y(oe,R.l=Pt),Jt!==R.u&&Q(fe,"aria-label",R.u=Jt),yn!==R.c&&Q(fe,"aria-pressed",R.c=yn),X!==R.w&&Y(B,R.w=X),De!==R.m&&Y(V,R.m=De),st!==R.f&&Q(V,"title",R.f=st),Re!==R.y&&Y(te,R.y=Re),Fe!==R.g&&Q(te,"aria-label",R.g=Fe),Ne!==R.p&&Q(te,"aria-pressed",R.p=Ne),ge!==R.b&&Q(te,"title",R.b=ge),R},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0}),pe(()=>F.value=o()==="queries"?e.localStore.filter||"":e.localStore.mutationFilter||""),C})(),$(me,{get when(){return q(()=>o()==="queries")()&&Wt()},get children(){return $(tR,{})}}),$(me,{get when(){return q(()=>o()==="mutations")()&&Fr()},get children(){return $(nR,{})}})]},XI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n)),{colors:i,alpha:s}=H,o=(g,m)=>t()==="dark"?m:g,a=dt(g=>{var m;return(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.state},!0,g=>g.query.queryHash===e.query.queryHash),l=dt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isDisabled())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),c=dt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isStatic())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),u=dt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.isStale())!=null?p:!1},!0,g=>g.query.queryHash===e.query.queryHash),d=dt(g=>{var m,p;return(p=(m=g().find({queryKey:e.query.queryKey}))==null?void 0:m.getObserversCount())!=null?p:0},!0,g=>g.query.queryHash===e.query.queryHash),f=q(()=>kC({queryState:a(),observerCount:d(),isStale:u()})),h=()=>f()==="gray"?n`
|
|
246
247
|
background-color: ${o(i[f()][200],i[f()][700])};
|
|
247
248
|
color: ${o(i[f()][700],i[f()][300])};
|
|
248
249
|
`:n`
|
|
249
250
|
background-color: ${o(i[f()][200]+s[80],i[f()][900])};
|
|
250
251
|
color: ${o(i[f()][800],i[f()][300])};
|
|
251
|
-
`;return
|
|
252
|
+
`;return $(me,{get when(){return a()},get children(){var g=Fx(),m=g.firstChild,p=m.nextSibling;return g.$$click=()=>Jc(e.query.queryHash===Wt()?null:e.query.queryHash),U(m,d),U(p,()=>e.query.queryHash),U(g,$(me,{get when(){return l()},get children(){return DI()}}),null),U(g,$(me,{get when(){return c()},get children(){return LI()}}),null),pe(v=>{var b=ie(r().queryRow,Wt()===e.query.queryHash&&r().selectedQueryRow,"tsqd-query-row"),w=`Query key ${e.query.queryHash}`,S=ie(h(),"tsqd-query-observer-count");return b!==v.e&&Y(g,v.e=b),w!==v.t&&Q(g,"aria-label",v.t=w),S!==v.a&&Y(m,v.a=S),v},{e:void 0,t:void 0,a:void 0}),g}})},JI=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n)),{colors:i,alpha:s}=H,o=(f,h)=>t()==="dark"?h:f,a=xn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g==null?void 0:g.state}),l=xn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g?g.state.isPaused:!1}),c=xn(f=>{const g=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return g?g.state.status:"idle"}),u=q(()=>Vi({isPaused:l(),status:c()})),d=()=>u()==="gray"?n`
|
|
252
253
|
background-color: ${o(i[u()][200],i[u()][700])};
|
|
253
254
|
color: ${o(i[u()][700],i[u()][300])};
|
|
254
255
|
`:n`
|
|
255
256
|
background-color: ${o(i[u()][200]+s[80],i[u()][900])};
|
|
256
257
|
color: ${o(i[u()][800],i[u()][300])};
|
|
257
|
-
`;return
|
|
258
|
+
`;return $(me,{get when(){return a()},get children(){var f=Fx(),h=f.firstChild,g=h.nextSibling;return f.$$click=()=>{Nx(e.mutation.mutationId===Fr()?null:e.mutation.mutationId)},U(h,$(me,{get when(){return u()==="purple"},get children(){return $(ZL,{})}}),null),U(h,$(me,{get when(){return u()==="green"},get children(){return $(YL,{})}}),null),U(h,$(me,{get when(){return u()==="red"},get children(){return $(JL,{})}}),null),U(h,$(me,{get when(){return u()==="yellow"},get children(){return $(XL,{})}}),null),U(g,$(me,{get when(){return e.mutation.options.mutationKey},get children(){return[q(()=>JSON.stringify(e.mutation.options.mutationKey))," -"," "]}}),null),U(g,()=>new Date(e.mutation.state.submittedAt).toLocaleString(),null),pe(m=>{var p=ie(r().queryRow,Fr()===e.mutation.mutationId&&r().selectedQueryRow,"tsqd-query-row"),v=`Mutation submitted at ${new Date(e.mutation.state.submittedAt).toLocaleString()}`,b=ie(d(),"tsqd-query-observer-count");return p!==m.e&&Y(f,m.e=p),v!==m.t&&Q(f,"aria-label",m.t=v),b!==m.a&&Y(h,m.a=b),m},{e:void 0,t:void 0,a:void 0}),f}})},ZI=()=>{const e=dt(l=>l().getAll().filter(c=>Hi(c)==="stale").length),t=dt(l=>l().getAll().filter(c=>Hi(c)==="fresh").length),n=dt(l=>l().getAll().filter(c=>Hi(c)==="fetching").length),r=dt(l=>l().getAll().filter(c=>Hi(c)==="paused").length),i=dt(l=>l().getAll().filter(c=>Hi(c)==="inactive").length),s=gt(),o=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,a=q(()=>s()==="dark"?gn(o):hn(o));return(()=>{var l=Na();return U(l,$(rr,{label:"Fresh",color:"green",get count(){return t()}}),null),U(l,$(rr,{label:"Fetching",color:"blue",get count(){return n()}}),null),U(l,$(rr,{label:"Paused",color:"purple",get count(){return r()}}),null),U(l,$(rr,{label:"Stale",color:"yellow",get count(){return e()}}),null),U(l,$(rr,{label:"Inactive",color:"gray",get count(){return i()}}),null),pe(()=>Y(l,ie(a().queryStatusContainer,"tsqd-query-status-container"))),l})()},eR=()=>{const e=xn(a=>a().getAll().filter(l=>Vi({isPaused:l.state.isPaused,status:l.state.status})==="green").length),t=xn(a=>a().getAll().filter(l=>Vi({isPaused:l.state.isPaused,status:l.state.status})==="yellow").length),n=xn(a=>a().getAll().filter(l=>Vi({isPaused:l.state.isPaused,status:l.state.status})==="purple").length),r=xn(a=>a().getAll().filter(l=>Vi({isPaused:l.state.isPaused,status:l.state.status})==="red").length),i=gt(),s=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,o=q(()=>i()==="dark"?gn(s):hn(s));return(()=>{var a=Na();return U(a,$(rr,{label:"Paused",color:"purple",get count(){return n()}}),null),U(a,$(rr,{label:"Pending",color:"yellow",get count(){return t()}}),null),U(a,$(rr,{label:"Success",color:"green",get count(){return e()}}),null),U(a,$(rr,{label:"Error",color:"red",get count(){return r()}}),null),pe(()=>Y(a,ie(o().queryStatusContainer,"tsqd-query-status-container"))),a})()},rr=e=>{const t=gt(),n=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,r=q(()=>t()==="dark"?gn(n):hn(n)),{colors:i,alpha:s}=H,o=(h,g)=>t()==="dark"?g:h;let a;const[l,c]=ne(!1),[u,d]=ne(!1),f=q(()=>!(Wt()&&wn()<Vj&&wn()>Ti||wn()<Ti));return(()=>{var h=FI(),g=h.firstChild,m=g.nextSibling,p=a;return typeof p=="function"?Ns(p,h):a=h,h.addEventListener("mouseleave",()=>{c(!1),d(!1)}),h.addEventListener("mouseenter",()=>c(!0)),h.addEventListener("blur",()=>d(!1)),h.addEventListener("focus",()=>d(!0)),Q0(h,_e({get disabled(){return f()},get class(){return ie(r().queryStatusTag,!f()&&n`
|
|
258
259
|
cursor: pointer;
|
|
259
260
|
&:hover {
|
|
260
261
|
background: ${o(i.gray[200],i.darkGray[400])}${s[80]};
|
|
261
262
|
}
|
|
262
|
-
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||u()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),U(h
|
|
263
|
-
width: ${
|
|
264
|
-
height: ${
|
|
265
|
-
border-radius: ${
|
|
266
|
-
background-color: ${
|
|
267
|
-
`,"tsqd-query-status-tag-dot"),
|
|
263
|
+
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||u()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),U(h,$(me,{get when(){return q(()=>!f())()&&(l()||u())},get children(){var v=II();return U(v,()=>e.label),pe(()=>Y(v,ie(r().statusTooltip,"tsqd-query-status-tooltip"))),v}}),g),U(h,$(me,{get when(){return f()},get children(){var v=RI();return U(v,()=>e.label),pe(()=>Y(v,ie(r().queryStatusTagLabel,"tsqd-query-status-tag-label"))),v}}),m),U(m,()=>e.count),pe(v=>{var b=ie(n`
|
|
264
|
+
width: ${H.size[1.5]};
|
|
265
|
+
height: ${H.size[1.5]};
|
|
266
|
+
border-radius: ${H.border.radius.full};
|
|
267
|
+
background-color: ${H.colors[e.color][500]};
|
|
268
|
+
`,"tsqd-query-status-tag-dot"),w=ie(r().queryStatusCount,e.count>0&&e.color!=="gray"&&n`
|
|
268
269
|
background-color: ${o(i[e.color][100],i[e.color][900])};
|
|
269
270
|
color: ${o(i[e.color][700],i[e.color][300])};
|
|
270
|
-
`,"tsqd-query-status-tag-count");return b!==v.e&&
|
|
271
|
+
`,"tsqd-query-status-tag-count");return b!==v.e&&Y(g,v.e=b),w!==v.t&&Y(m,v.t=w),v},{e:void 0,t:void 0}),h})()},tR=()=>{const e=gt(),t=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,n=q(()=>e()==="dark"?gn(t):hn(t)),{colors:r}=H,i=(_,O)=>e()==="dark"?O:_,s=he().client,[o,a]=ne(!1),[l,c]=ne("view"),[u,d]=ne(!1),f=q(()=>he().errorTypes||[]),h=dt(_=>_().getAll().find(O=>O.queryHash===Wt()),!1),g=dt(_=>_().getAll().find(O=>O.queryHash===Wt()),!1),m=dt(_=>{var O;return(O=_().getAll().find(P=>P.queryHash===Wt()))==null?void 0:O.state},!1),p=dt(_=>{var O;return(O=_().getAll().find(P=>P.queryHash===Wt()))==null?void 0:O.state.data},!1),v=dt(_=>{const O=_().getAll().find(P=>P.queryHash===Wt());return O?Hi(O):"inactive"}),b=dt(_=>{const O=_().getAll().find(P=>P.queryHash===Wt());return O?O.state.status:"pending"}),w=dt(_=>{var O,P;return(P=(O=_().getAll().find(j=>j.queryHash===Wt()))==null?void 0:O.getObserversCount())!=null?P:0}),S=q(()=>OC(v())),x=()=>{var O,P;Mn({type:"REFETCH",queryHash:(O=h())==null?void 0:O.queryHash});const _=(P=h())==null?void 0:P.fetch();_==null||_.catch(()=>{})},E=_=>{var W;const O=h();if(!O)return;Mn({type:"TRIGGER_ERROR",queryHash:O.queryHash,metadata:{error:_==null?void 0:_.name}});const P=(W=_==null?void 0:_.initializer(O))!=null?W:new Error("Unknown error from devtools"),j=O.options;O.setState({status:"error",error:P,fetchMeta:{...O.state.fetchMeta,__previousQueryOptions:j}})},C=()=>{const _=h();if(!_)return;Mn({type:"RESTORE_LOADING",queryHash:_.queryHash});const O=_.state,P=_.state.fetchMeta?_.state.fetchMeta.__previousQueryOptions:null;_.cancel({silent:!0}),_.setState({...O,fetchStatus:"idle",fetchMeta:null}),P&&_.fetch(P)};ve(()=>{v()!=="fetching"&&a(!1)});const k=()=>S()==="gray"?t`
|
|
271
272
|
background-color: ${i(r[S()][200],r[S()][700])};
|
|
272
273
|
color: ${i(r[S()][700],r[S()][300])};
|
|
273
274
|
border-color: ${i(r[S()][400],r[S()][600])};
|
|
@@ -275,37 +276,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
275
276
|
background-color: ${i(r[S()][100],r[S()][900])};
|
|
276
277
|
color: ${i(r[S()][700],r[S()][300])};
|
|
277
278
|
border-color: ${i(r[S()][400],r[S()][600])};
|
|
278
|
-
`;return
|
|
279
|
+
`;return $(me,{get when(){return q(()=>!!h())()&&m()},get children(){var _=HI(),O=_.firstChild,P=O.nextSibling,j=P.firstChild,W=j.firstChild,I=W.firstChild,D=W.nextSibling,L=j.nextSibling,F=L.firstChild,oe=F.nextSibling,fe=L.nextSibling,B=fe.firstChild,V=B.nextSibling,te=P.nextSibling,ae=te.nextSibling,R=ae.firstChild,ce=R.firstChild,ee=R.nextSibling,xe=ee.firstChild,J=ee.nextSibling,se=J.firstChild,le=J.nextSibling,Ae=le.firstChild,Z=le.nextSibling,it=Z.firstChild,Tt=it.nextSibling,Pt=ae.nextSibling;Pt.firstChild;var Jt=Pt.nextSibling,yn=Jt.nextSibling;return U(I,()=>Kl(h().queryKey,!0)),U(D,v),U(oe,w),U(V,()=>new Date(m().dataUpdatedAt).toLocaleTimeString()),R.$$click=x,ee.$$click=()=>{var X;Mn({type:"INVALIDATE",queryHash:(X=h())==null?void 0:X.queryHash}),s.invalidateQueries(h())},J.$$click=()=>{var X;Mn({type:"RESET",queryHash:(X=h())==null?void 0:X.queryHash}),s.resetQueries(h())},le.$$click=()=>{var X;Mn({type:"REMOVE",queryHash:(X=h())==null?void 0:X.queryHash}),s.removeQueries(h()),Jc(null)},Z.$$click=()=>{var X;if(((X=h())==null?void 0:X.state.data)===void 0)a(!0),C();else{const De=h();if(!De)return;Mn({type:"TRIGGER_LOADING",queryHash:De.queryHash});const st=De.options;De.fetch({...st,queryFn:()=>new Promise(()=>{}),gcTime:-1}),De.setState({data:void 0,status:"pending",fetchMeta:{...De.state.fetchMeta,__previousQueryOptions:st}})}},U(Z,()=>b()==="pending"?"Restore":"Trigger",Tt),U(ae,$(me,{get when(){return f().length===0||b()==="error"},get children(){var X=NI(),De=X.firstChild,st=De.nextSibling;return X.$$click=()=>{var Re;h().state.error?(Mn({type:"RESTORE_ERROR",queryHash:(Re=h())==null?void 0:Re.queryHash}),s.resetQueries(h())):E()},U(X,()=>b()==="error"?"Restore":"Trigger",st),pe(Re=>{var Fe=ie(t`
|
|
279
280
|
color: ${i(r.red[500],r.red[400])};
|
|
280
281
|
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),Ne=b()==="pending",ge=t`
|
|
281
282
|
background-color: ${i(r.red[500],r.red[400])};
|
|
282
|
-
`;return Fe!==Re.e&&
|
|
283
|
-
background-color: ${
|
|
284
|
-
`,ue=b()==="pending";return Ne!==Fe.e&&
|
|
283
|
+
`;return Fe!==Re.e&&Y(X,Re.e=Fe),Ne!==Re.t&&(X.disabled=Re.t=Ne),ge!==Re.a&&Y(De,Re.a=ge),Re},{e:void 0,t:void 0,a:void 0}),X}}),null),U(ae,$(me,{get when(){return!(f().length===0||b()==="error")},get children(){var X=BI(),De=X.firstChild,st=De.nextSibling,Re=st.nextSibling;return Re.firstChild,Re.addEventListener("change",Fe=>{const Ne=f().find(ge=>ge.name===Fe.currentTarget.value);E(Ne)}),U(Re,$(CS,{get each(){return f()},children:Fe=>(()=>{var Ne=UI();return U(Ne,()=>Fe.name),pe(()=>Ne.value=Fe.name),Ne})()}),null),U(X,$(Po,{}),null),pe(Fe=>{var Ne=ie(n().actionsSelect,"tsqd-query-details-actions-btn","tsqd-query-details-action-error-multiple"),ge=t`
|
|
284
|
+
background-color: ${H.colors.red[400]};
|
|
285
|
+
`,ue=b()==="pending";return Ne!==Fe.e&&Y(X,Fe.e=Ne),ge!==Fe.t&&Y(De,Fe.t=ge),ue!==Fe.a&&(Re.disabled=Fe.a=ue),Fe},{e:void 0,t:void 0,a:void 0}),X}}),null),U(Pt,()=>l()==="view"?"Explorer":"Editor",null),U(_,$(me,{get when(){return l()==="view"},get children(){var X=qI();return U(X,$(Lr,{label:"Data",defaultExpanded:["Data"],get value(){return p()},editable:!0,onEdit:()=>c("edit"),get activeQuery(){return h()}})),pe(De=>(De=H.size[2])!=null?X.style.setProperty("padding",De):X.style.removeProperty("padding")),X}}),Jt),U(_,$(me,{get when(){return l()==="edit"},get children(){var X=zI(),De=X.firstChild,st=De.nextSibling,Re=st.firstChild,Fe=Re.nextSibling,Ne=Fe.firstChild,ge=Ne.nextSibling;return X.addEventListener("submit",ue=>{ue.preventDefault();const Le=new FormData(ue.currentTarget).get("data");try{const mn=JSON.parse(Le);h().setState({...h().state,data:mn}),c("view")}catch(mn){d(!0)}}),De.addEventListener("focus",()=>d(!1)),U(Re,()=>u()?"Invalid Value":""),Ne.$$click=()=>c("view"),pe(ue=>{var Oe=ie(n().devtoolsEditForm,"tsqd-query-details-data-editor"),Le=n().devtoolsEditTextarea,mn=u(),Qr=n().devtoolsEditFormActions,Kn=n().devtoolsEditFormError,Yr=n().devtoolsEditFormActionContainer,Wn=ie(n().devtoolsEditFormAction,t`
|
|
285
286
|
color: ${i(r.gray[600],r.gray[300])};
|
|
286
|
-
`),
|
|
287
|
+
`),pr=ie(n().devtoolsEditFormAction,t`
|
|
287
288
|
color: ${i(r.blue[600],r.blue[400])};
|
|
288
|
-
`);return Oe!==ue.e&&
|
|
289
|
+
`);return Oe!==ue.e&&Y(X,ue.e=Oe),Le!==ue.t&&Y(De,ue.t=Le),mn!==ue.a&&Q(De,"data-error",ue.a=mn),Qr!==ue.o&&Y(st,ue.o=Qr),Kn!==ue.i&&Y(Re,ue.i=Kn),Yr!==ue.n&&Y(Fe,ue.n=Yr),Wn!==ue.s&&Y(Ne,ue.s=Wn),pr!==ue.h&&Y(ge,ue.h=pr),ue},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),pe(()=>De.value=JSON.stringify(p(),null,2)),X}}),Jt),U(yn,$(Lr,{label:"Query",defaultExpanded:["Query","queryKey"],get value(){return g()}})),pe(X=>{var De=ie(n().detailsContainer,"tsqd-query-details-container"),st=ie(n().detailsHeader,"tsqd-query-details-header"),Re=ie(n().detailsBody,"tsqd-query-details-summary-container"),Fe=ie(n().queryDetailsStatus,k()),Ne=ie(n().detailsHeader,"tsqd-query-details-header"),ge=ie(n().actionsBody,"tsqd-query-details-actions-container"),ue=ie(t`
|
|
289
290
|
color: ${i(r.blue[600],r.blue[400])};
|
|
290
291
|
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),Oe=v()==="fetching",Le=t`
|
|
291
292
|
background-color: ${i(r.blue[600],r.blue[400])};
|
|
292
|
-
`,
|
|
293
|
+
`,mn=ie(t`
|
|
293
294
|
color: ${i(r.yellow[600],r.yellow[400])};
|
|
294
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),
|
|
295
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),Qr=b()==="pending",Kn=t`
|
|
295
296
|
background-color: ${i(r.yellow[600],r.yellow[400])};
|
|
296
|
-
`,
|
|
297
|
+
`,Yr=ie(t`
|
|
297
298
|
color: ${i(r.gray[600],r.gray[300])};
|
|
298
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),
|
|
299
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),Wn=b()==="pending",pr=t`
|
|
299
300
|
background-color: ${i(r.gray[600],r.gray[400])};
|
|
300
|
-
`,
|
|
301
|
+
`,Ba=ie(t`
|
|
301
302
|
color: ${i(r.pink[500],r.pink[400])};
|
|
302
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),
|
|
303
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),Qs=v()==="fetching",qa=t`
|
|
303
304
|
background-color: ${i(r.pink[500],r.pink[400])};
|
|
304
|
-
`,
|
|
305
|
+
`,Ii=ie(t`
|
|
305
306
|
color: ${i(r.cyan[500],r.cyan[400])};
|
|
306
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),
|
|
307
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),za=o(),Ys=t`
|
|
307
308
|
background-color: ${i(r.cyan[500],r.cyan[400])};
|
|
308
|
-
`,
|
|
309
|
+
`,Xs=ie(n().detailsHeader,"tsqd-query-details-header"),Js=ie(n().detailsHeader,"tsqd-query-details-header"),Ri=H.size[2];return De!==X.e&&Y(_,X.e=De),st!==X.t&&Y(O,X.t=st),Re!==X.a&&Y(P,X.a=Re),Fe!==X.o&&Y(D,X.o=Fe),Ne!==X.i&&Y(te,X.i=Ne),ge!==X.n&&Y(ae,X.n=ge),ue!==X.s&&Y(R,X.s=ue),Oe!==X.h&&(R.disabled=X.h=Oe),Le!==X.r&&Y(ce,X.r=Le),mn!==X.d&&Y(ee,X.d=mn),Qr!==X.l&&(ee.disabled=X.l=Qr),Kn!==X.u&&Y(xe,X.u=Kn),Yr!==X.c&&Y(J,X.c=Yr),Wn!==X.w&&(J.disabled=X.w=Wn),pr!==X.m&&Y(se,X.m=pr),Ba!==X.f&&Y(le,X.f=Ba),Qs!==X.y&&(le.disabled=X.y=Qs),qa!==X.g&&Y(Ae,X.g=qa),Ii!==X.p&&Y(Z,X.p=Ii),za!==X.b&&(Z.disabled=X.b=za),Ys!==X.T&&Y(it,X.T=Ys),Xs!==X.A&&Y(Pt,X.A=Xs),Js!==X.O&&Y(Jt,X.O=Js),Ri!==X.I&&((X.I=Ri)!=null?yn.style.setProperty("padding",Ri):yn.style.removeProperty("padding")),X},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0,y:void 0,g:void 0,p:void 0,b:void 0,T:void 0,A:void 0,O:void 0,I:void 0}),_}})},nR=()=>{const e=gt(),t=he().shadowDOMTarget?Te.bind({target:he().shadowDOMTarget}):Te,n=q(()=>e()==="dark"?gn(t):hn(t)),{colors:r}=H,i=(u,d)=>e()==="dark"?d:u,s=xn(u=>{const f=u().getAll().find(h=>h.mutationId===Fr());return f?f.state.isPaused:!1}),o=xn(u=>{const f=u().getAll().find(h=>h.mutationId===Fr());return f?f.state.status:"idle"}),a=q(()=>Vi({isPaused:s(),status:o()})),l=xn(u=>u().getAll().find(d=>d.mutationId===Fr()),!1),c=()=>a()==="gray"?t`
|
|
309
310
|
background-color: ${i(r[a()][200],r[a()][700])};
|
|
310
311
|
color: ${i(r[a()][700],r[a()][300])};
|
|
311
312
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
@@ -313,7 +314,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
313
314
|
background-color: ${i(r[a()][100],r[a()][900])};
|
|
314
315
|
color: ${i(r[a()][700],r[a()][300])};
|
|
315
316
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
316
|
-
`;return
|
|
317
|
+
`;return $(me,{get when(){return l()},get children(){var u=KI(),d=u.firstChild,f=d.nextSibling,h=f.firstChild,g=h.firstChild,m=g.firstChild,p=g.nextSibling,v=h.nextSibling,b=v.firstChild,w=b.nextSibling,S=f.nextSibling,x=S.nextSibling,E=x.nextSibling,C=E.nextSibling,k=C.nextSibling,_=k.nextSibling,O=_.nextSibling,P=O.nextSibling;return U(m,$(me,{get when(){return l().options.mutationKey},fallback:"No mutationKey found",get children(){return Kl(l().options.mutationKey,!0)}})),U(p,$(me,{get when(){return a()==="purple"},children:"pending"}),null),U(p,$(me,{get when(){return a()!=="purple"},get children(){return o()}}),null),U(w,()=>new Date(l().state.submittedAt).toLocaleTimeString()),U(x,$(Lr,{label:"Variables",defaultExpanded:["Variables"],get value(){return l().state.variables}})),U(C,$(Lr,{label:"Context",defaultExpanded:["Context"],get value(){return l().state.context}})),U(_,$(Lr,{label:"Data",defaultExpanded:["Data"],get value(){return l().state.data}})),U(P,$(Lr,{label:"Mutation",defaultExpanded:["Mutation"],get value(){return l()}})),pe(j=>{var W=ie(n().detailsContainer,"tsqd-query-details-container"),I=ie(n().detailsHeader,"tsqd-query-details-header"),D=ie(n().detailsBody,"tsqd-query-details-summary-container"),L=ie(n().queryDetailsStatus,c()),F=ie(n().detailsHeader,"tsqd-query-details-header"),oe=H.size[2],fe=ie(n().detailsHeader,"tsqd-query-details-header"),B=H.size[2],V=ie(n().detailsHeader,"tsqd-query-details-header"),te=H.size[2],ae=ie(n().detailsHeader,"tsqd-query-details-header"),R=H.size[2];return W!==j.e&&Y(u,j.e=W),I!==j.t&&Y(d,j.t=I),D!==j.a&&Y(f,j.a=D),L!==j.o&&Y(p,j.o=L),F!==j.i&&Y(S,j.i=F),oe!==j.n&&((j.n=oe)!=null?x.style.setProperty("padding",oe):x.style.removeProperty("padding")),fe!==j.s&&Y(E,j.s=fe),B!==j.h&&((j.h=B)!=null?C.style.setProperty("padding",B):C.style.removeProperty("padding")),V!==j.r&&Y(k,j.r=V),te!==j.d&&((j.d=te)!=null?_.style.setProperty("padding",te):_.style.removeProperty("padding")),ae!==j.l&&Y(O,j.l=ae),R!==j.u&&((j.u=R)!=null?P.style.setProperty("padding",R):P.style.removeProperty("padding")),j},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0}),u}})},fc=new Map,rR=()=>{const e=q(()=>he().client.getQueryCache()),t=e().subscribe(n=>{cS(()=>{for(const[r,i]of fc.entries())i.shouldUpdate(n)&&i.setter(r(e))})});return be(()=>{fc.clear(),t()}),t},dt=(e,t=!0,n=()=>!0)=>{const r=q(()=>he().client.getQueryCache()),[i,s]=ne(e(r),t?void 0:{equals:!1});return ve(()=>{s(e(r))}),fc.set(e,{setter:s,shouldUpdate:n}),be(()=>{fc.delete(e)}),i},hc=new Map,iR=()=>{const e=q(()=>he().client.getMutationCache()),t=e().subscribe(()=>{for(const[n,r]of hc.entries())queueMicrotask(()=>{r(n(e))})});return be(()=>{hc.clear(),t()}),t},xn=(e,t=!0)=>{const n=q(()=>he().client.getMutationCache()),[r,i]=ne(e(n),t?void 0:{equals:!1});return ve(()=>{i(e(n))}),hc.set(e,i),be(()=>{hc.delete(e)}),r},sR="@tanstack/query-devtools-event",Mn=({type:e,queryHash:t,metadata:n})=>{const r=new CustomEvent(sR,{detail:{type:e,queryHash:t,metadata:n},bubbles:!0,cancelable:!0});window.dispatchEvent(r)},Bx=(e,t)=>{const{colors:n,font:r,size:i,alpha:s,shadow:o,border:a}=H,l=(c,u)=>e==="light"?c:u;return{devtoolsBtn:t`
|
|
317
318
|
z-index: 100000;
|
|
318
319
|
position: fixed;
|
|
319
320
|
padding: 4px;
|
|
@@ -370,7 +371,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
370
371
|
position: fixed;
|
|
371
372
|
z-index: 9999;
|
|
372
373
|
display: flex;
|
|
373
|
-
gap: ${
|
|
374
|
+
gap: ${H.size[.5]};
|
|
374
375
|
& * {
|
|
375
376
|
box-sizing: border-box;
|
|
376
377
|
text-transform: none;
|
|
@@ -395,7 +396,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
395
396
|
z-index: 9999;
|
|
396
397
|
display: flex;
|
|
397
398
|
height: 100%;
|
|
398
|
-
gap: ${
|
|
399
|
+
gap: ${H.size[.5]};
|
|
399
400
|
& * {
|
|
400
401
|
box-sizing: border-box;
|
|
401
402
|
text-transform: none;
|
|
@@ -601,8 +602,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
601
602
|
display: flex;
|
|
602
603
|
justify-content: space-between;
|
|
603
604
|
align-items: center;
|
|
604
|
-
padding: ${
|
|
605
|
-
gap: ${
|
|
605
|
+
padding: ${H.size[2]} ${H.size[2.5]};
|
|
606
|
+
gap: ${H.size[2.5]};
|
|
606
607
|
border-bottom: ${l(n.gray[300],n.darkGray[500])} 1px solid;
|
|
607
608
|
align-items: center;
|
|
608
609
|
& > button {
|
|
@@ -615,7 +616,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
615
616
|
}
|
|
616
617
|
`,logoAndToggleContainer:t`
|
|
617
618
|
display: flex;
|
|
618
|
-
gap: ${
|
|
619
|
+
gap: ${H.size[3]};
|
|
619
620
|
align-items: center;
|
|
620
621
|
`,logo:t`
|
|
621
622
|
cursor: pointer;
|
|
@@ -623,7 +624,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
623
624
|
flex-direction: column;
|
|
624
625
|
background-color: transparent;
|
|
625
626
|
border: none;
|
|
626
|
-
gap: ${
|
|
627
|
+
gap: ${H.size[.5]};
|
|
627
628
|
padding: 0px;
|
|
628
629
|
&:hover {
|
|
629
630
|
opacity: 0.7;
|
|
@@ -653,19 +654,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
653
654
|
white-space: nowrap;
|
|
654
655
|
`,queryStatusContainer:t`
|
|
655
656
|
display: flex;
|
|
656
|
-
gap: ${
|
|
657
|
+
gap: ${H.size[2]};
|
|
657
658
|
height: min-content;
|
|
658
659
|
`,queryStatusTag:t`
|
|
659
660
|
display: flex;
|
|
660
|
-
gap: ${
|
|
661
|
+
gap: ${H.size[1.5]};
|
|
661
662
|
box-sizing: border-box;
|
|
662
|
-
height: ${
|
|
663
|
+
height: ${H.size[6.5]};
|
|
663
664
|
background: ${l(n.gray[50],n.darkGray[500])};
|
|
664
665
|
color: ${l(n.gray[700],n.gray[300])};
|
|
665
|
-
border-radius: ${
|
|
666
|
+
border-radius: ${H.border.radius.sm};
|
|
666
667
|
font-size: ${r.size.sm};
|
|
667
|
-
padding: ${
|
|
668
|
-
padding-left: ${
|
|
668
|
+
padding: ${H.size[1]};
|
|
669
|
+
padding-left: ${H.size[1.5]};
|
|
669
670
|
align-items: center;
|
|
670
671
|
font-weight: ${r.weight.medium};
|
|
671
672
|
border: ${l("1px solid "+n.gray[300],"1px solid transparent")};
|
|
@@ -687,16 +688,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
687
688
|
background-color: ${l(n.gray[200],n.darkGray[300])};
|
|
688
689
|
border-radius: 2px;
|
|
689
690
|
font-variant-numeric: tabular-nums;
|
|
690
|
-
height: ${
|
|
691
|
+
height: ${H.size[4.5]};
|
|
691
692
|
`,statusTooltip:t`
|
|
692
693
|
position: absolute;
|
|
693
694
|
z-index: 1;
|
|
694
695
|
background-color: ${l(n.gray[50],n.darkGray[500])};
|
|
695
696
|
top: 100%;
|
|
696
697
|
left: 50%;
|
|
697
|
-
transform: translate(-50%, calc(${
|
|
698
|
-
padding: ${
|
|
699
|
-
border-radius: ${
|
|
698
|
+
transform: translate(-50%, calc(${H.size[2]}));
|
|
699
|
+
padding: ${H.size[.5]} ${H.size[2]};
|
|
700
|
+
border-radius: ${H.border.radius.sm};
|
|
700
701
|
font-size: ${r.size.xs};
|
|
701
702
|
border: 1px solid ${l(n.gray[400],n.gray[600])};
|
|
702
703
|
color: ${l(n.gray[600],n.gray[300])};
|
|
@@ -729,12 +730,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
729
730
|
}
|
|
730
731
|
`,filtersContainer:t`
|
|
731
732
|
display: flex;
|
|
732
|
-
gap: ${
|
|
733
|
+
gap: ${H.size[2]};
|
|
733
734
|
& > button {
|
|
734
735
|
cursor: pointer;
|
|
735
|
-
padding: ${
|
|
736
|
-
${
|
|
737
|
-
border-radius: ${
|
|
736
|
+
padding: ${H.size[.5]} ${H.size[1.5]} ${H.size[.5]}
|
|
737
|
+
${H.size[2]};
|
|
738
|
+
border-radius: ${H.border.radius.sm};
|
|
738
739
|
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
739
740
|
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
740
741
|
color: ${l(n.gray[700],n.gray[300])};
|
|
@@ -742,7 +743,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
742
743
|
display: flex;
|
|
743
744
|
align-items: center;
|
|
744
745
|
line-height: ${r.lineHeight.sm};
|
|
745
|
-
gap: ${
|
|
746
|
+
gap: ${H.size[1.5]};
|
|
746
747
|
max-width: 160px;
|
|
747
748
|
&:focus-visible {
|
|
748
749
|
outline-offset: 2px;
|
|
@@ -750,19 +751,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
750
751
|
outline: 2px solid ${n.blue[800]};
|
|
751
752
|
}
|
|
752
753
|
& svg {
|
|
753
|
-
width: ${
|
|
754
|
-
height: ${
|
|
754
|
+
width: ${H.size[3]};
|
|
755
|
+
height: ${H.size[3]};
|
|
755
756
|
color: ${l(n.gray[500],n.gray[400])};
|
|
756
757
|
}
|
|
757
758
|
}
|
|
758
759
|
`,filterInput:t`
|
|
759
760
|
padding: ${i[.5]} ${i[2]};
|
|
760
|
-
border-radius: ${
|
|
761
|
+
border-radius: ${H.border.radius.sm};
|
|
761
762
|
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
762
763
|
display: flex;
|
|
763
764
|
box-sizing: content-box;
|
|
764
765
|
align-items: center;
|
|
765
|
-
gap: ${
|
|
766
|
+
gap: ${H.size[1.5]};
|
|
766
767
|
max-width: 160px;
|
|
767
768
|
min-width: 100px;
|
|
768
769
|
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
@@ -794,20 +795,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
794
795
|
outline: 2px solid ${n.blue[800]};
|
|
795
796
|
}
|
|
796
797
|
`,filterSelect:t`
|
|
797
|
-
padding: ${
|
|
798
|
-
border-radius: ${
|
|
798
|
+
padding: ${H.size[.5]} ${H.size[2]};
|
|
799
|
+
border-radius: ${H.border.radius.sm};
|
|
799
800
|
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
800
801
|
display: flex;
|
|
801
802
|
align-items: center;
|
|
802
|
-
gap: ${
|
|
803
|
+
gap: ${H.size[1.5]};
|
|
803
804
|
box-sizing: content-box;
|
|
804
805
|
max-width: 160px;
|
|
805
806
|
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
806
807
|
height: min-content;
|
|
807
808
|
& > svg {
|
|
808
809
|
color: ${l(n.gray[600],n.gray[400])};
|
|
809
|
-
width: ${
|
|
810
|
-
height: ${
|
|
810
|
+
width: ${H.size[2]};
|
|
811
|
+
height: ${H.size[2]};
|
|
811
812
|
}
|
|
812
813
|
& > select {
|
|
813
814
|
appearance: none;
|
|
@@ -828,17 +829,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
828
829
|
}
|
|
829
830
|
`,actionsContainer:t`
|
|
830
831
|
display: flex;
|
|
831
|
-
gap: ${
|
|
832
|
+
gap: ${H.size[2]};
|
|
832
833
|
`,actionsBtn:t`
|
|
833
|
-
border-radius: ${
|
|
834
|
+
border-radius: ${H.border.radius.sm};
|
|
834
835
|
background-color: ${l(n.gray[100],n.darkGray[400])};
|
|
835
836
|
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
836
|
-
width: ${
|
|
837
|
-
height: ${
|
|
837
|
+
width: ${H.size[6.5]};
|
|
838
|
+
height: ${H.size[6.5]};
|
|
838
839
|
justify-content: center;
|
|
839
840
|
display: flex;
|
|
840
841
|
align-items: center;
|
|
841
|
-
gap: ${
|
|
842
|
+
gap: ${H.size[1.5]};
|
|
842
843
|
max-width: 160px;
|
|
843
844
|
cursor: pointer;
|
|
844
845
|
padding: 0;
|
|
@@ -847,8 +848,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
847
848
|
}
|
|
848
849
|
& svg {
|
|
849
850
|
color: ${l(n.gray[700],n.gray[300])};
|
|
850
|
-
width: ${
|
|
851
|
-
height: ${
|
|
851
|
+
width: ${H.size[3]};
|
|
852
|
+
height: ${H.size[3]};
|
|
852
853
|
}
|
|
853
854
|
&:focus-visible {
|
|
854
855
|
outline-offset: 2px;
|
|
@@ -889,9 +890,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
889
890
|
}
|
|
890
891
|
|
|
891
892
|
& .tsqd-query-observer-count {
|
|
892
|
-
padding: 0 ${
|
|
893
|
+
padding: 0 ${H.size[1]};
|
|
893
894
|
user-select: none;
|
|
894
|
-
min-width: ${
|
|
895
|
+
min-width: ${H.size[6.5]};
|
|
895
896
|
align-self: stretch;
|
|
896
897
|
display: flex;
|
|
897
898
|
align-items: center;
|
|
@@ -907,9 +908,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
907
908
|
font-size: ${r.size.xs};
|
|
908
909
|
display: flex;
|
|
909
910
|
align-items: center;
|
|
910
|
-
min-height: ${
|
|
911
|
+
min-height: ${H.size[6]};
|
|
911
912
|
flex: 1;
|
|
912
|
-
padding: ${
|
|
913
|
+
padding: ${H.size[1]} ${H.size[2]};
|
|
913
914
|
font-family:
|
|
914
915
|
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
915
916
|
'Liberation Mono', 'Courier New', monospace;
|
|
@@ -923,7 +924,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
923
924
|
align-self: stretch;
|
|
924
925
|
display: flex;
|
|
925
926
|
align-items: center;
|
|
926
|
-
padding: 0 ${
|
|
927
|
+
padding: 0 ${H.size[2]};
|
|
927
928
|
color: ${l(n.gray[800],n.gray[300])};
|
|
928
929
|
background-color: ${l(n.gray[300],n.darkGray[600])};
|
|
929
930
|
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
@@ -934,7 +935,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
934
935
|
align-self: stretch;
|
|
935
936
|
display: flex;
|
|
936
937
|
align-items: center;
|
|
937
|
-
padding: 0 ${
|
|
938
|
+
padding: 0 ${H.size[2]};
|
|
938
939
|
color: ${l(n.teal[800],n.teal[300])};
|
|
939
940
|
background-color: ${l(n.teal[100],n.teal[900])};
|
|
940
941
|
border-bottom: 1px solid ${l(n.teal[300],n.teal[700])};
|
|
@@ -958,17 +959,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
958
959
|
top: 0;
|
|
959
960
|
z-index: 2;
|
|
960
961
|
background-color: ${l(n.gray[200],n.darkGray[600])};
|
|
961
|
-
padding: ${
|
|
962
|
+
padding: ${H.size[1.5]} ${H.size[2]};
|
|
962
963
|
font-weight: ${r.weight.medium};
|
|
963
964
|
font-size: ${r.size.xs};
|
|
964
965
|
line-height: ${r.lineHeight.xs};
|
|
965
966
|
text-align: left;
|
|
966
967
|
`,detailsBody:t`
|
|
967
|
-
margin: ${
|
|
968
|
+
margin: ${H.size[1.5]} 0px ${H.size[2]} 0px;
|
|
968
969
|
& > div {
|
|
969
970
|
display: flex;
|
|
970
971
|
align-items: stretch;
|
|
971
|
-
padding: 0 ${
|
|
972
|
+
padding: 0 ${H.size[2]};
|
|
972
973
|
line-height: ${r.lineHeight.sm};
|
|
973
974
|
justify-content: space-between;
|
|
974
975
|
& > span {
|
|
@@ -980,7 +981,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
980
981
|
}
|
|
981
982
|
|
|
982
983
|
& > div:first-child {
|
|
983
|
-
margin-bottom: ${
|
|
984
|
+
margin-bottom: ${H.size[1.5]};
|
|
984
985
|
}
|
|
985
986
|
|
|
986
987
|
& code {
|
|
@@ -999,25 +1000,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
999
1000
|
}
|
|
1000
1001
|
`,queryDetailsStatus:t`
|
|
1001
1002
|
border: 1px solid ${n.darkGray[200]};
|
|
1002
|
-
border-radius: ${
|
|
1003
|
+
border-radius: ${H.border.radius.sm};
|
|
1003
1004
|
font-weight: ${r.weight.medium};
|
|
1004
|
-
padding: ${
|
|
1005
|
+
padding: ${H.size[1]} ${H.size[2.5]};
|
|
1005
1006
|
`,actionsBody:t`
|
|
1006
1007
|
flex-wrap: wrap;
|
|
1007
|
-
margin: ${
|
|
1008
|
+
margin: ${H.size[2]} 0px ${H.size[2]} 0px;
|
|
1008
1009
|
display: flex;
|
|
1009
|
-
gap: ${
|
|
1010
|
-
padding: 0px ${
|
|
1010
|
+
gap: ${H.size[2]};
|
|
1011
|
+
padding: 0px ${H.size[2]};
|
|
1011
1012
|
& > button {
|
|
1012
1013
|
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
1013
1014
|
font-size: ${r.size.xs};
|
|
1014
|
-
padding: ${
|
|
1015
|
+
padding: ${H.size[1]} ${H.size[2]};
|
|
1015
1016
|
display: flex;
|
|
1016
|
-
border-radius: ${
|
|
1017
|
+
border-radius: ${H.border.radius.sm};
|
|
1017
1018
|
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
1018
1019
|
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1019
1020
|
align-items: center;
|
|
1020
|
-
gap: ${
|
|
1021
|
+
gap: ${H.size[2]};
|
|
1021
1022
|
font-weight: ${r.weight.medium};
|
|
1022
1023
|
line-height: ${r.lineHeight.xs};
|
|
1023
1024
|
cursor: pointer;
|
|
@@ -1038,19 +1039,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1038
1039
|
& > span {
|
|
1039
1040
|
width: ${i[1.5]};
|
|
1040
1041
|
height: ${i[1.5]};
|
|
1041
|
-
border-radius: ${
|
|
1042
|
+
border-radius: ${H.border.radius.full};
|
|
1042
1043
|
}
|
|
1043
1044
|
}
|
|
1044
1045
|
`,actionsSelect:t`
|
|
1045
1046
|
font-size: ${r.size.xs};
|
|
1046
|
-
padding: ${
|
|
1047
|
+
padding: ${H.size[.5]} ${H.size[2]};
|
|
1047
1048
|
display: flex;
|
|
1048
|
-
border-radius: ${
|
|
1049
|
+
border-radius: ${H.border.radius.sm};
|
|
1049
1050
|
overflow: hidden;
|
|
1050
1051
|
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
1051
1052
|
border: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1052
1053
|
align-items: center;
|
|
1053
|
-
gap: ${
|
|
1054
|
+
gap: ${H.size[2]};
|
|
1054
1055
|
font-weight: ${r.weight.medium};
|
|
1055
1056
|
line-height: ${r.lineHeight.sm};
|
|
1056
1057
|
color: ${l(n.red[500],n.red[400])};
|
|
@@ -1062,7 +1063,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1062
1063
|
& > span {
|
|
1063
1064
|
width: ${i[1.5]};
|
|
1064
1065
|
height: ${i[1.5]};
|
|
1065
|
-
border-radius: ${
|
|
1066
|
+
border-radius: ${H.border.radius.full};
|
|
1066
1067
|
}
|
|
1067
1068
|
&:focus-within {
|
|
1068
1069
|
outline-offset: 2px;
|
|
@@ -1083,11 +1084,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1083
1084
|
}
|
|
1084
1085
|
|
|
1085
1086
|
& svg path {
|
|
1086
|
-
stroke: ${
|
|
1087
|
+
stroke: ${H.colors.red[400]};
|
|
1087
1088
|
}
|
|
1088
1089
|
& svg {
|
|
1089
|
-
width: ${
|
|
1090
|
-
height: ${
|
|
1090
|
+
width: ${H.size[2]};
|
|
1091
|
+
height: ${H.size[2]};
|
|
1091
1092
|
}
|
|
1092
1093
|
`,settingsMenu:t`
|
|
1093
1094
|
display: flex;
|
|
@@ -1096,7 +1097,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1096
1097
|
}
|
|
1097
1098
|
flex-direction: column;
|
|
1098
1099
|
gap: ${i[.5]};
|
|
1099
|
-
border-radius: ${
|
|
1100
|
+
border-radius: ${H.border.radius.sm};
|
|
1100
1101
|
border: 1px solid ${l(n.gray[300],n.gray[700])};
|
|
1101
1102
|
background-color: ${l(n.gray[50],n.darkGray[600])};
|
|
1102
1103
|
font-size: ${r.size.xs};
|
|
@@ -1108,8 +1109,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1108
1109
|
display: flex;
|
|
1109
1110
|
align-items: center;
|
|
1110
1111
|
justify-content: space-between;
|
|
1111
|
-
border-radius: ${
|
|
1112
|
-
padding: ${
|
|
1112
|
+
border-radius: ${H.border.radius.xs};
|
|
1113
|
+
padding: ${H.size[1]} ${H.size[1]};
|
|
1113
1114
|
cursor: pointer;
|
|
1114
1115
|
background-color: transparent;
|
|
1115
1116
|
border: none;
|
|
@@ -1117,8 +1118,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1117
1118
|
& svg {
|
|
1118
1119
|
color: ${l(n.gray[600],n.gray[400])};
|
|
1119
1120
|
transform: rotate(-90deg);
|
|
1120
|
-
width: ${
|
|
1121
|
-
height: ${
|
|
1121
|
+
width: ${H.size[2]};
|
|
1122
|
+
height: ${H.size[2]};
|
|
1122
1123
|
}
|
|
1123
1124
|
&:hover {
|
|
1124
1125
|
background-color: ${l(n.gray[200],n.darkGray[500])};
|
|
@@ -1132,7 +1133,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1132
1133
|
cursor: not-allowed;
|
|
1133
1134
|
}
|
|
1134
1135
|
`,settingsMenuHeader:t`
|
|
1135
|
-
padding: ${
|
|
1136
|
+
padding: ${H.size[1]} ${H.size[1]};
|
|
1136
1137
|
font-weight: ${r.weight.medium};
|
|
1137
1138
|
border-bottom: 1px solid ${l(n.gray[300],n.darkGray[400])};
|
|
1138
1139
|
color: ${l(n.gray[500],n.gray[400])};
|
|
@@ -1143,8 +1144,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1143
1144
|
justify-content: space-between;
|
|
1144
1145
|
color: ${l(n.gray[700],n.gray[300])};
|
|
1145
1146
|
font-size: ${r.size.xs};
|
|
1146
|
-
border-radius: ${
|
|
1147
|
-
padding: ${
|
|
1147
|
+
border-radius: ${H.border.radius.xs};
|
|
1148
|
+
padding: ${H.size[1]} ${H.size[1]};
|
|
1148
1149
|
cursor: pointer;
|
|
1149
1150
|
background-color: transparent;
|
|
1150
1151
|
border: none;
|
|
@@ -1168,7 +1169,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1168
1169
|
background-color: ${l(n.purple[100],n.purple[900])};
|
|
1169
1170
|
}
|
|
1170
1171
|
`,viewToggle:t`
|
|
1171
|
-
border-radius: ${
|
|
1172
|
+
border-radius: ${H.border.radius.sm};
|
|
1172
1173
|
background-color: ${l(n.gray[200],n.darkGray[600])};
|
|
1173
1174
|
border: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
1174
1175
|
display: flex;
|
|
@@ -1206,14 +1207,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1206
1207
|
|
|
1207
1208
|
& .tsqd-radio-toggle:first-child {
|
|
1208
1209
|
& label {
|
|
1209
|
-
padding: 0 ${
|
|
1210
|
+
padding: 0 ${H.size[1.5]} 0 ${H.size[2]};
|
|
1210
1211
|
}
|
|
1211
1212
|
border-right: 1px solid ${l(n.gray[300],n.darkGray[200])};
|
|
1212
1213
|
}
|
|
1213
1214
|
|
|
1214
1215
|
& .tsqd-radio-toggle:nth-child(2) {
|
|
1215
1216
|
& label {
|
|
1216
|
-
padding: 0 ${
|
|
1217
|
+
padding: 0 ${H.size[2]} 0 ${H.size[1.5]};
|
|
1217
1218
|
}
|
|
1218
1219
|
}
|
|
1219
1220
|
`,devtoolsEditForm:t`
|
|
@@ -1255,7 +1256,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1255
1256
|
`,devtoolsEditFormAction:t`
|
|
1256
1257
|
font-family: ui-sans-serif, Inter, system-ui, sans-serif, sans-serif;
|
|
1257
1258
|
font-size: ${r.size.xs};
|
|
1258
|
-
padding: ${i[1]} ${
|
|
1259
|
+
padding: ${i[1]} ${H.size[2]};
|
|
1259
1260
|
display: flex;
|
|
1260
1261
|
border-radius: ${a.radius.sm};
|
|
1261
1262
|
background-color: ${l(n.gray[100],n.darkGray[600])};
|
|
@@ -1278,19 +1279,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1278
1279
|
opacity: 0.6;
|
|
1279
1280
|
cursor: not-allowed;
|
|
1280
1281
|
}
|
|
1281
|
-
`}},
|
|
1282
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1283
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1284
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1285
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1286
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1287
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1288
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1289
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UR(e,t){if(e){if(typeof e=="string")return Tp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tp(e,t):void 0}}function Tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function WR(e){if(Array.isArray(e))return e}function uh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var $p=Ta(Ep||(Ep=uh(["xl:yst-w-1/3"]))),Mp=Ta(Ap||(Ap=uh(["xl:yst-w-2/3"]))),jp=Ta(Pp||(Pp=uh(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),VR=function(){var t,n=H.useState(!1),r=Bu(n,2),i=r[0],s=r[1],o=H.useState(!1),a=Bu(o,2),l=a[0],c=a[1],u=H.useState(null),d=Bu(u,2),f=d[0],h=d[1],g=Ea({query:{select:function(b){var x=b.data;return x==null?void 0:x.brands}}}),m=g.data,p=m==null?void 0:m.find(function(v){return v.id===f});return y.jsxs("form",{children:[y.jsxs(E.Card,{children:[y.jsx(e1,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),y.jsxs(E.Card.Content,{children:[y.jsxs(jp,{children:[y.jsxs($p,{className:"yst-space-y-2",children:[y.jsx(E.Title,{size:"4",children:"Brands"}),y.jsxs("p",{children:["You have ",y.jsx("b",{children:"3 active subscriptions"}),". This gives you up to"," ",y.jsx("b",{children:"3 active brands"}),", for which we’ll automatically run a weekly analysis."]}),y.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),y.jsxs(Mp,{children:[m&&y.jsx("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:"Active brands: X of Y"}),m&&m.length===0&&y.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",y.jsx(E.Link,{as:Ur,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),((t=m)!==null&&t!==void 0?t:[{id:"loading",name:"Loading..."}]).map(function(v,b,x){return y.jsx(zR,{brand:v,isLast:b===x.length-1,showHeader:b===0,headerText:"Active brands: 3 of 3",onDelete:function(S){h(S),s(!0)}},v.id)})]})]}),y.jsx($a,{}),y.jsxs(jp,{children:[y.jsxs($p,{className:"yst-space-y-2",children:[y.jsx(E.Title,{size:"4",children:"Delete all data"}),y.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),y.jsxs(Mp,{className:"yst-space-y-4",children:[y.jsxs(E.Button,{variant:"error",onClick:function(){c(!0)},children:[y.jsx(xf,{})," Delete all data"]}),y.jsx("p",{children:y.jsxs("i",{children:[y.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),y.jsx(MR,{isOpen:i,onClose:function(){s(!1),h(null)},brandId:f,brandName:p==null?void 0:p.name}),y.jsx(OR,{isOpen:l,onClose:function(){c(!1)}})]})};const GR=Object.freeze(Object.defineProperty({__proto__:null,default:VR},Symbol.toStringTag,{value:"Module"}));function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}var rf=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI models like ChatGPT and Perplexity. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI models that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT and Perplexity. This process should take around 5 minutes."}],QR=function(t){return rf.find(function(n){return!!Os(n.path,t)})||rf[0]};function YR(){var e=un(),t=QR(e.pathname);return y.jsxs(E.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx($c,{title:y.jsx(dh,{currentStep:t,steps:rf}),description:t.description}),y.jsx(E.Paper.Content,{children:y.jsx(yc,{})})]})}var dh=function(t){var n=t.title,r=t.currentStep,i=t.steps;return y.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[y.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[y.jsx("span",{className:"yst-text-slate-900",children:hc(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),y.jsx("span",{children:hc(r)==="object"?r.title:n||"Step ".concat(r)})]})};const XR=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:dh,default:YR},Symbol.toStringTag,{value:"Module"}));var Rx=function(t){var n=t.onBack,r=t.variant,i=r===void 0?"ai":r,s=t.buttonText,o=t.onButtonClick,a=t.isButtonDisabled,l=a===void 0?!1:a,c=t.isLoading,u=c===void 0?!1:c;return y.jsx(wf,{nestedInPaperContent:!0,children:y.jsxs("div",{className:ke({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&y.jsx(E.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),y.jsx("div",{className:ke("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:y.jsxs(E.Button,{onClick:o,variant:i==="ai"?"primary":i,className:"yst-gap-1.5",style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:u,children:[i==="ai"&&y.jsx(Qv,{}),s]})})]})})},JR=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],ZR=[{value:"AR",label:"Argentina"},{value:"BE",label:"Belgium"},{value:"BR",label:"Brazil"},{value:"CN",label:"China"},{value:"EG",label:"Egypt"},{value:"ID",label:"Indonesia"},{value:"IE",label:"Ireland"},{value:"IL",label:"Israel"},{value:"IN",label:"India"},{value:"IT",label:"Italy"},{value:"JP",label:"Japan"},{value:"KR",label:"South Korea"},{value:"MX",label:"Mexico"},{value:"NG",label:"Nigeria"},{value:"PL",label:"Poland"},{value:"RU",label:"Russia"},{value:"SA",label:"Saudi Arabia"},{value:"SE",label:"Sweden"},{value:"ES",label:"Spain"},{value:"TH",label:"Thailand"},{value:"TR",label:"Turkey"},{value:"TW",label:"Taiwan"},{value:"ZA",label:"South Africa"}],xl=[].concat(JR,ZR,[{value:"OTHER",label:"Other"}]),eF=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh",label:"Chinese (Mandarin)"},{value:"ja",label:"Japanese"}],tF=[{value:"ar",label:"Arabic"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"fi",label:"Finnish"},{value:"hi",label:"Hindi"},{value:"it",label:"Italian"},{value:"ko",label:"Korean"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"ru",label:"Russian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"}],nF=[].concat(eF,tF),Dp=["Software","SaaS","Mobile Apps","Web Development","Cybersecurity","AI/Machine Learning","Cloud Computing","Data Analytics","IT Services","Gaming","E-commerce","Online Retail","Fashion Retail","Electronics Retail","Home Goods","Sporting Goods","Jewelry","Beauty Products","Automotive Parts","Books & Media","Consulting","Legal Services","Accounting","Marketing Agency","Public Relations","HR Services","Business Coaching","Financial Advisory","Real Estate","Insurance","Healthcare","Dental","Mental Health","Fitness","Spa & Wellness","Nutrition","Medical Device","Pharmacy","Veterinary","Alternative Medicine","Photography","Graphic Design","Video Production","Marketing","Advertising","Content Creation","Music","Art & Design","Entertainment","Publishing","Restaurant","Cafe","Food Delivery","Catering","Bakery","Brewery","Wine","Food Production","Grocery","Food Truck","Education","Online Learning","Training","Coaching","Tutoring","Language Learning","Professional Development","Childcare","University","Certification","Manufacturing","Construction","Engineering","Automotive","Aerospace","Chemical","Textile","Furniture","Packaging","Industrial Equipment","Travel","Hotel","Tourism","Event Planning","Transportation","Airline","Cruise","Car Rental","Vacation Rental","Adventure Tours","Non-Profit","Charity","Government","Religious Organization","Community Service","Environmental","Political","Social Services","Foundation","Advocacy"];function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function Lp(e){return sF(e)||iF(e)||Nx(e)||rF()}function rF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1290
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1291
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1292
|
-
example: California, Bavaria, or Paris.`})]}),y.jsx(
|
|
1293
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1282
|
+
`}},hn=e=>Bx("light",e),gn=e=>Bx("dark",e);wc(["click","mousedown","input"]);var oR=e=>{const[t,n]=a1({prefix:"TanstackQueryDevtools"}),r=mv(),i=q(()=>{const s=t.theme_preference||l1;return s!=="system"?s:r()});return $(Vf.Provider,{value:e,get children(){return $(f1,{localStore:t,setLocalStore:n,get children(){return $(Qf.Provider,{value:i,get children(){return $(VI,{localStore:t,setLocalStore:n})}})}})}})},aR=oR;const lR=Object.freeze(Object.defineProperty({__proto__:null,default:aR},Symbol.toStringTag,{value:"Module"}));var cR=e=>{const[t,n]=a1({prefix:"TanstackQueryDevtools"}),r=mv(),i=q(()=>{const s=t.theme_preference||l1;return s!=="system"?s:r()});return $(Vf.Provider,{value:e,get children(){return $(f1,{disabled:!0,localStore:t,setLocalStore:n,get children(){return $(Qf.Provider,{value:i,get children(){return $(QI,{get children(){return $(yh,{localStore:t,setLocalStore:n,get onClose(){return e.onClose},showPanelViewOnly:!0})}})}})}})}})},uR=cR;const dR=Object.freeze(Object.defineProperty({__proto__:null,default:uR},Symbol.toStringTag,{value:"Module"}));function Cp(e,t){return yR(e)||gR(e,t)||hR(e,t)||fR()}function fR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1283
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hR(e,t){if(e){if(typeof e=="string")return _p(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_p(e,t):void 0}}function _p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function yR(e){if(Array.isArray(e))return e}var mR=function(t){var n=t.isOpen,r=t.onClose,i=t.groupToEdit,s=t.allBrands,o=t.onGroupUpdated,a=z.useState(""),l=Cp(a,2),c=l[0],u=l[1],d=z.useState([]),f=Cp(d,2),h=f[0],g=f[1];z.useEffect(function(){if(n&&i&&i.type==="group"){var b,w=i;u(w.name||"");var S=((b=w.groupedBrands)===null||b===void 0?void 0:b.map(function(x){return String(x.id||"")}))||[];g(S)}},[n,i]);var m=function(){!c.trim()||!(i!=null&&i.id)||(console.log("Would update group:",{groupId:i.id,newName:c.trim(),brandIds:h.map(function(w){return Number(w)})}),window.alert("NOTE: this is not implemented yet. Would update group: ".concat(JSON.stringify({groupId:i.id,newName:c.trim(),brandIds:h.map(function(w){return Number(w)})}))),p(),o==null||o())},p=function(){u(""),g([]),r()},v=function(){return h.map(function(w){if(i&&i.type==="group"){var S,x=i,E=(S=x.groupedBrands)===null||S===void 0?void 0:S.find(function(k){return String(k.id)===w});if(E)return E.name||""}var C=s.find(function(k){return String(k.id)===w});return C?C.type==="group"?"Group: ".concat(C.name):C.name||"":""}).filter(Boolean)};return!i||i.type!=="group"?null:y.jsx(A.Modal,{isOpen:n,onClose:p,children:y.jsx(A.Modal.Panel,{children:y.jsxs(A.Modal.Container,{children:[y.jsx(A.Modal.Container.Header,{className:"yst-mb-4",children:y.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Edit brand group"})}),y.jsxs(A.Modal.Container.Content,{className:"yst-mb-8 yst-space-y-4",children:[y.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"Update the group name or ungroup brands by removing their tags."}),y.jsxs("div",{children:[y.jsx("label",{htmlFor:"editGroupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),y.jsx(A.TextInput,{id:"editGroupName",value:c,onChange:function(b){return u(b.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),y.jsxs("div",{children:[y.jsx(A.TagField,{id:"editGroupedBrands",label:"Grouped brands",tags:v(),onRemoveTag:function(b){g(function(w){return w.filter(function(S,x){return x!==b})})},onAddTag:function(){}}),h.length===0&&y.jsx("p",{className:"yst-mt-2 yst-text-sm yst-italic yst-text-gray-500",children:"No brands in this group"})]})]}),y.jsx(A.Modal.Container.Footer,{children:y.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[y.jsx(A.Button,{variant:"secondary",onClick:p,children:"Cancel"}),y.jsx(A.Button,{variant:"primary",onClick:m,disabled:!c.trim(),children:"Save changes"})]})})]})})})};function kp(e,t){return xR(e)||bR(e,t)||vR(e,t)||pR()}function pR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1284
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vR(e,t){if(e){if(typeof e=="string")return Op(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Op(e,t):void 0}}function Op(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function xR(e){if(Array.isArray(e))return e}var wR=function(t){var n=t.isOpen,r=t.onClose,i=t.brandId,s=t.brandsToGroup,o=t.onGroupCreated,a=Hn(),l=z.useState(""),c=kp(l,2),u=c[0],d=c[1],f=z.useState([]),h=kp(f,2),g=h[0],m=h[1];z.useEffect(function(){if(n&&s.length>0){var E,C=(E=s[0])===null||E===void 0?void 0:E.name;d(C||"New Group"),m(s.map(function(k){var _;return String((_=k.id)!==null&&_!==void 0?_:"")}))}},[n,s]);var p=qk({mutation:{onSuccess:function(){a.invalidateQueries({queryKey:Wv(i)}),o==null||o(),w()},onError:function(C){console.error("Error creating group:",C)}}}),v=p.mutate,b=p.isPending,w=function(){d(""),m([]),r()},S=function(){if(!(!u.trim()||g.length===0)){var C=g.flatMap(function(k){var _=s.find(function(O){return String(O.id)===k});return _&&_.type==="group"&&Array.isArray(_.groupedBrands)?_.groupedBrands.map(function(O){return String(O.id)}):k});v({brandId:i,data:{groupName:u.trim(),brandIds:C.filter(function(k){return k!==""}).map(function(k){return Number(k)})}})}},x=function(C){m(function(k){return k.filter(function(_){return _!==C})})};return y.jsx(A.Modal,{isOpen:n,onClose:w,children:y.jsx(A.Modal.Panel,{children:y.jsxs(A.Modal.Container,{children:[y.jsx(A.Modal.Container.Header,{children:y.jsx(A.Modal.Title,{children:"Edit brand group"})}),y.jsxs(A.Modal.Container.Content,{className:"yst-space-y-4",children:[y.jsxs("div",{children:[y.jsx("label",{htmlFor:"groupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),y.jsx(A.TextInput,{id:"groupName",value:u,onChange:function(E){return d(E.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),y.jsxs("div",{children:[y.jsx(A.TagField,{id:"groupedBrands",label:"Brands in group (".concat(g.length,")"),tags:g.map(function(E){var C=s.find(function(k){return String(k.id)===E});return C?C.type==="group"?"Group: ".concat(C.name):C.name||"":""}).filter(Boolean),onRemoveTag:function(E){var C=g.find(function(k){var _=s.find(function(P){return String(P.id)===k});if(!_)return!1;var O=_.type==="group"?"Group: ".concat(_.name):_.name||"";return O===E});C&&x(C)},onAddTag:function(){}}),g.length===0&&y.jsx("p",{className:"yst-text-sm yst-italic yst-text-gray-500",children:"No brands selected"})]})]}),y.jsx(A.Modal.Container.Footer,{children:y.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[y.jsx(A.Button,{variant:"secondary",onClick:w,disabled:b,children:"Cancel"}),y.jsx(A.Button,{variant:"primary",onClick:S,disabled:!u.trim()||g.length===0||b,children:b?"Saving...":"Save group"})]})})]})})})};function aa(e){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},aa(e)}function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(n),!0).forEach(function(r){qx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qx(e,t,n){return(t=SR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SR(e){var t=CR(e,"string");return aa(t)=="symbol"?t:t+""}function CR(e,t){if(aa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(aa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _R(e){return ER(e)||OR(e)||zx(e)||kR()}function kR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1285
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OR(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ER(e){if(Array.isArray(e))return af(e)}function Tn(e,t){return PR(e)||TR(e,t)||zx(e,t)||AR()}function AR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1286
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zx(e,t){if(e){if(typeof e=="string")return af(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}function af(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function PR(e){if(Array.isArray(e))return e}var $R=function(){var t,n=_n(),r=z.useState(!1),i=Tn(r,2),s=i[0],o=i[1],a=z.useState({}),l=Tn(a,2),c=l[0],u=l[1],d=z.useState(""),f=Tn(d,2),h=f[0],g=f[1],m=z.useState(1),p=Tn(m,2),v=p[0],b=p[1],w=z.useState({}),S=Tn(w,2),x=S[0],E=S[1],C=z.useState(!1),k=Tn(C,2),_=k[0],O=k[1],P=z.useState(!1),j=Tn(P,2),W=j[0],I=j[1],D=z.useState(null),L=Tn(D,2),F=L[0],oe=L[1],fe=Wr(),B=fe.brandId;function V(ge){var ue;if(!ge)return"";if(typeof ge=="string")return ge;var Oe=(ue=ge.id)!==null&&ue!==void 0?ue:"";return String(Oe)}var te=Fk(B,{query:{enabled:!!B}}),ae=te.data,R=te.isLoading,ce=10,ee=(ae==null||(t=ae.data)===null||t===void 0||(t=t.associatedBrands)===null||t===void 0?void 0:t.filter(function(ge){var ue,Oe;return h?((ue=(Oe=ge.name)===null||Oe===void 0?void 0:Oe.toLowerCase())!==null&&ue!==void 0?ue:"").includes(h.toLowerCase()):!0}))||[],xe=Math.ceil(ee.length/ce),J=(v-1)*ce,se=_R(ee).sort(function(ge,ue){return ge.type==="group"&&ue.type!=="group"?-1:ge.type!=="group"&&ue.type==="group"?1:0}),le=se.slice(J,J+ce),Ae=function(ue){var Oe=ee.find(function(Le){return V(Le)===ue});Oe&&Oe.type==="group"?(oe(Oe),I(!0)):console.log("Individual brand edit not implemented yet")},Z=Object.entries(x).filter(function(ge){var ue=Tn(ge,2),Oe=ue[1];return Oe}).map(function(ge){var ue=Tn(ge,1),Oe=ue[0];return Oe}),it=function(){console.log("Group brands:",Z),O(!0)},Tt=function(ue){g(ue.target.value),b(1)},Pt=function(ue){E(function(Oe){return Ap(Ap({},Oe),{},qx({},ue,!Oe[ue]))})},Jt=function(){n("/")},yn=function(){E({}),u({}),o(!1)},X=function(){O(!1)},De=function(){E({}),b(1),g("")},st=function(){I(!1),oe(null)},Re=function(){console.log("Group updated successfully")},Fe=function(ue,Oe){return ue in c?!!c[ue]:Oe.isHidden!==!0},Ne=[{Header:"Brand name",accessor:"name",Cell:function(ue){var Oe=ue.value,Le=ue.row;return y.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:y.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[y.jsx(A.Checkbox,{id:"brand-checkbox-".concat(Le.id),checked:!!x[V(Le)],onChange:function(){return Pt(V(Le))},value:V(Le),label:Le.isSelf?y.jsx(Dc,{children:Oe}):Oe,name:"brand-checkbox-".concat(Le.id),disabled:!Fe(V(Le),Le)}),Le.type==="group"&&y.jsx(QE,{className:"yst-h-4 yst-w-4 yst-text-slate-400"})]})})},LoadingComponent:function(ue){var Oe=ue.id,Le=Oe===void 0?"":Oe;return y.jsxs("div",{className:"yst-flex",children:[y.jsx(A.Checkbox,{id:"loading-row-checkbox-".concat(Le),value:"loading...",label:"Loading...",disabled:!0,name:"brand-checkbox-".concat(Le)})," ",y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-32",id:"loading-row-skeleton-".concat(Le)})]})}},{Header:"Actions",accessor:"id",Cell:function(ue){var Oe=ue.value,Le=ue.row;return y.jsx(y.Fragment,{children:Le.type==="group"?y.jsxs(A.Button,{variant:"tertiary",size:"small",onClick:function(){return Ae(String(Oe!=null?Oe:""))},className:"yst-gap-1.5 yst-px-0",disabled:!Fe(V(Le),Le),children:[y.jsx(Zv,{className:"yst-h-4 yst-w-4"}),"Edit group"]}):void 0})},LoadingComponent:function(){return y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"})}}];return y.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(jc,{title:"Brand list ".concat(""),children:y.jsx("p",{children:"These are the brands found in responses to your example prompts. Group related brands to improve your analysis. You can rename or exclude irrelevant brands, and new brands will be added automatically if they appear in future analysis runs."})}),y.jsxs(A.Paper.Content,{children:[y.jsx("div",{className:"yst-mb-6",children:y.jsx(A.TextInput,{id:"brand-search",label:"Search brands",placeholder:"Search brands",value:h,onChange:Tt})}),y.jsx("div",{className:"yst-mb-6",children:y.jsxs(A.Table,{columns:Ne,className:"yst-w-full",variant:"minimal",children:[y.jsx(A.Table.Head,{children:y.jsx(A.Table.Row,{children:Ne.map(function(ge){return y.jsx(A.Table.Header,{children:ge.Header},ge.accessor)})})}),y.jsx(A.Table.Body,{children:R?[1,2,3].map(function(ge,ue){return y.jsx(A.Table.Row,{children:Ne.map(function(Oe,Le){return y.jsx(A.Table.Cell,{children:y.jsx(Oe.LoadingComponent,{id:"skeleton-".concat(ue,"-").concat(Le)},Oe.accessor)},"cell-".concat(Le))})},ue)}):le.length===0?y.jsx(A.Table.Row,{children:y.jsx(A.Table.Cell,{colSpan:Ne.length,children:y.jsxs("div",{className:"yst-py-12 yst-text-center",children:[y.jsx("h3",{className:"yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900",children:"No brands found"}),y.jsx("p",{className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:h?'No brands match "'.concat(h,'". Try a different search term.'):"No brands have been found yet. Run an analysis to discover brands."}),h&&y.jsx(A.Button,{variant:"secondary",size:"small",onClick:function(){g(""),b(1)},className:"yst-mt-4",children:"Clear search"})]})})}):le.map(function(ge){return y.jsx(A.Table.Row,{children:Ne.map(function(ue){return y.jsx(A.Table.Cell,{children:ue.Cell?ue.Cell({value:ge[ue.accessor],row:ge}):ge[ue.accessor]},ue.accessor)})},ge.id)})})]})}),y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[y.jsxs(A.Button,{variant:"secondary",onClick:it,className:"yst-mb-0 yst-gap-2",disabled:Z.length<2,children:[y.jsx(pE,{})," Group brands"]}),y.jsx(A.Pagination,{variant:"text",current:v,total:xe,onNavigate:b,className:"yst-flex-row",screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]}),y.jsx(Ef,{children:y.jsx("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:s?y.jsxs(y.Fragment,{children:[y.jsx(A.Button,{variant:"secondary",className:"yst-mb-0",onClick:yn,children:"Discard changes"}),y.jsx(A.Button,{variant:"primary",className:"yst-mb-0",onClick:Jt,children:"Save changes"})]}):y.jsx(A.Button,{as:Kr,to:"/",variant:"primary",className:"yst-mb-0",children:"Show analysis →"})})}),y.jsx(wR,{isOpen:_,onClose:X,brandId:B,brandsToGroup:ee.filter(function(ge){return Z.includes(V(ge))}),onGroupCreated:De}),y.jsx(mR,{isOpen:W,onClose:st,groupToEdit:F,allBrands:ee,onGroupUpdated:Re})]})};const MR=Object.freeze(Object.defineProperty({__proto__:null,default:$R},Symbol.toStringTag,{value:"Module"}));function Tp(e,t){return IR(e)||LR(e,t)||DR(e,t)||jR()}function jR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1287
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DR(e,t){if(e){if(typeof e=="string")return Pp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pp(e,t):void 0}}function Pp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function IR(e){if(Array.isArray(e))return e}var RR=function(t){var n=t.isOpen,r=t.onClose,i=z.useState(""),s=Tp(i,2),o=s[0],a=s[1],l=z.useState({mutate:function(){},isLoading:!1}),c=Tp(l,1),u=c[0],d=u.mutate,f=u.isLoading;return z.useEffect(function(){n&&a("")},[n]),y.jsx(Tf,{isOpen:n,onClose:r,onConfirm:function(){d(),console.log("Deleting all data"),r()},isLoading:f,disabled:o!=="DELETE ALL",title:"Delete all data?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently erase all brands, analysis results, and queries from your account."}),y.jsx("p",{children:"This action cannot be undone."}),y.jsx(A.TextField,{id:"delete-all-confirmation",label:"To confirm, please type DELETE ALL:",value:o,onChange:function(h){return a(h.target.value)}}),y.jsx("p",{children:y.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete all data",cancelText:"No, go back"})};function FR(e,t){return zR(e)||qR(e,t)||BR(e,t)||NR()}function NR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1288
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BR(e,t){if(e){if(typeof e=="string")return $p(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$p(e,t):void 0}}function $p(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function zR(e){if(Array.isArray(e))return e}var HR=function(t){var n=t.isOpen,r=t.brandId,i=t.onClose,s=t.brandName,o=Hn(),a=z.useState(""),l=FR(a,2),c=l[0],u=l[1],d=Jk({mutation:{onSuccess:function(){o.invalidateQueries({queryKey:nr()}),console.log("Brand data deleted"),i()}}}),f=d.mutate,h=d.isPending;return z.useEffect(function(){n&&u("")},[n]),y.jsx(Tf,{isOpen:n,onClose:i,onConfirm:function(){if(!s){console.error("Brand name is required for deletion confirmation");return}f({brandId:r})},isLoading:h,disabled:c.toLowerCase()!==(s==null?void 0:s.toLowerCase()),title:"Delete brand?",description:y.jsxs(y.Fragment,{children:[y.jsx("p",{children:"This will permanently delete all data associated with this brand, including past analyses and query history."}),y.jsx("p",{children:"This action cannot be undone."}),y.jsx(A.TextField,{id:"delete-modal-brand-name-confirmation",label:"To confirm, please type your brand name ".concat(s,":"),value:c,onChange:function(g){return u(g.target.value)}}),y.jsx("p",{children:y.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete brand",cancelText:"No, go back"})};function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}function lf(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,g,m,p){var v=g&&g.prototype instanceof a?g:a,b=Object.create(v.prototype);return Ut(b,"_invoke",function(w,S,x){var E,C,k,_=0,O=x||[],P=!1,j={p:0,n:0,v:e,a:W,f:W.bind(e,4),d:function(D,L){return E=D,C=0,k=e,j.n=L,o}};function W(I,D){for(C=I,k=D,t=0;!P&&_&&!L&&t<O.length;t++){var L,F=O[t],oe=j.p,fe=F[2];I>3?(L=fe===D)&&(k=F[(C=F[4])?5:(C=3,3)],F[4]=F[5]=e):F[0]<=oe&&((L=I<2&&oe<F[1])?(C=0,j.v=D,j.n=F[1]):oe<fe&&(L=I<3||F[0]>D||D>fe)&&(F[4]=I,F[5]=D,j.n=fe,C=0))}if(L||I>1)return o;throw P=!0,D}return function(I,D,L){if(_>1)throw TypeError("Generator is already running");for(P&&D===1&&W(D,L),C=D,k=L;(t=C<2?e:k)||!P;){E||(C?C<3?(C>1&&(j.n=-1),W(C,k)):j.n=k:j.v=k);try{if(_=2,E){if(C||(I="next"),t=E[I]){if(!(t=t.call(E,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,C<2&&(C=0)}else C===1&&(t=E.return)&&t.call(E),C<2&&(k=TypeError("The iterator does not provide a '"+I+"' method"),C=1);E=e}else if((t=(P=j.n<0)?k:w.call(S,j))!==o)break}catch(F){E=e,C=1,k=F}finally{_=1}}return{value:t,done:P}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Ut(t={},r,function(){return this}),t),d=c.prototype=a.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,Ut(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,Ut(d,"constructor",c),Ut(c,"constructor",l),l.displayName="GeneratorFunction",Ut(c,i,"GeneratorFunction"),Ut(d),Ut(d,i,"Generator"),Ut(d,r,function(){return this}),Ut(d,"toString",function(){return"[object Generator]"}),(lf=function(){return{w:s,m:f}})()}function Ut(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ut=function(o,a,l,c){if(a)i?i(o,a,{value:l,enumerable:!c,configurable:!c,writable:!c}):o[a]=l;else{var u=function(f,h){Ut(o,f,function(g){return this._invoke(f,h,g)})};u("next",0),u("throw",1),u("return",2)}},Ut(e,t,n,r)}function Mp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mp(Object(n),!0).forEach(function(r){UR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UR(e,t,n){return(t=KR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KR(e){var t=WR(e,"string");return la(t)=="symbol"?t:t+""}function WR(e,t){if(la(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(la(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jp(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(r,i)}function VR(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){jp(s,r,i,o,a,"next",l)}function a(l){jp(s,r,i,o,a,"throw",l)}o(void 0)})}}function GR(e,t){return JR(e)||XR(e,t)||YR(e,t)||QR()}function QR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1289
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YR(e,t){if(e){if(typeof e=="string")return Dp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dp(e,t):void 0}}function Dp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XR(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function JR(e){if(Array.isArray(e))return e}var ZR=function(t){var n,r=t.brand,i=t.isLast,s=t.onDelete,o=r.id,a=z.useState(!1),l=GR(a,2),c=l[0],u=l[1],d=Hn(),f=$c({query:{select:function(S){var x=S.data;return x}}}),h=f.data,g=Gv({mutation:{onMutate:function(){var w=VR(lf().m(function x(E){var C,k,_;return lf().w(function(O){for(;;)switch(O.n){case 0:return C=E.brandId,k=E.data,O.n=1,d.cancelQueries({queryKey:nr()});case 1:return _=d.getQueryData(nr()),d.setQueryData(nr(),function(P){var j,W;return P&&br(br({},P),{},{data:br(br({},P.data),{},{brands:((j=(W=P.data)===null||W===void 0?void 0:W.brands)!==null&&j!==void 0?j:[]).map(function(I){return I.id===C?br(br({},I),{},{settings:br(br({},I.settings),{},{enableAutomaticAnalysis:k.enableAutomaticAnalysis})}):I})})})}),O.a(2,{previous:_})}},x)}));function S(x){return w.apply(this,arguments)}return S}(),onError:function(S,x,E){E!=null&&E.previous&&d.setQueryData(nr(),E.previous)},onSettled:function(){d.invalidateQueries({queryKey:[nr(),kf()]})}}}),m=g.mutate,p=function(S){m({brandId:o,data:{enableAutomaticAnalysis:S}})},v=function(S){S?u(!0):p(!1)},b=(h==null?void 0:h.maxNumberOfActiveBrands)&&(h==null?void 0:h.activeSubscriptions)&&(h==null?void 0:h.maxNumberOfActiveBrands)-(h==null?void 0:h.activeSubscriptions)>0;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Ce("yst-flex yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-4 yst-py-4 yst-text-slate-800",{"yst-border-b-[1px] yst-border-b-slate-200":!i}),children:[y.jsx(A.Toggle,{id:"toggle-brand-".concat(r==null?void 0:r.id),checked:r==null||(n=r.settings)===null||n===void 0?void 0:n.enableAutomaticAnalysis,screenReaderLabel:"Enable or disable automatic analysis for this brand",onChange:v}),y.jsx("div",{className:"yst-font-medium",children:(r==null?void 0:r.id)==="loading"?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-32"}):r==null?void 0:r.name}),y.jsx("div",{className:"yst-ml-auto yst-flex yst-flex-row yst-items-center yst-justify-end yst-gap-2 yst-text-slate-800",children:(r==null?void 0:r.id)==="loading"?y.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):y.jsxs(A.Button,{size:"small",variant:"tertiary",className:"yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700",onClick:function(){r!=null&&r.id&&s(r.id)},disabled:(r==null?void 0:r.id)==="loading",children:[y.jsx(Of,{})," Delete brand"]})})]}),y.jsx(A.Modal,{isOpen:c,onClose:function(){return u(!1)},position:"center",as:"div",className:Ce({"yst-mx-auto yst-max-w-xl":b}),children:b?y.jsxs(A.Modal.Panel,{children:[y.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Start brand analysis now?"})}),y.jsxs(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[y.jsx("p",{children:"Activating this brand will immediately start a new analysis."}),y.jsx("p",{children:"This will use one of your weekly analyses included in your subscription."})]}),y.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[y.jsx(A.Button,{variant:"secondary",onClick:function(){return u(!1)},children:"Cancel"}),y.jsx(A.Button,{variant:"primary",onClick:function(){p(!0),u(!1)},children:"Yes, start analysis"})]})]}):y.jsxs(A.Modal.Panel,{children:[y.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:y.jsx(A.Modal.Title,{as:"h3",className:"yst-text-center yst-text-lg yst-font-medium",children:"You've reached your active brand limit"})}),y.jsx(A.Modal.Container.Content,{className:"yst-mb-8 yst-space-y-3",children:y.jsx("p",{className:"yst-text-center",children:"Each subscription lets you activate 1 brand. Add another subscription or deactivate an existing brand to activate this brand."})})]})}),y.jsx(A.Modal.Container.Footer,{children:y.jsxs("div",{className:"yst-flex yst-flex-col yst-justify-stretch yst-gap-2",children:[y.jsxs(A.Button,{variant:"upsell",className:"yst-flex yst-gap-1",onClick:function(){return window.alert("tk open upsell link")},children:[y.jsx(eb,{}),"Add a subscription"]}),y.jsx(A.Button,{variant:"tertiary",className:"",onClick:function(){return u(!1)},children:"Deactivate an existing brand"})]})})]})})]})},Lp,Ip,Rp;function zu(e,t){return rF(e)||nF(e,t)||tF(e,t)||eF()}function eF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1290
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tF(e,t){if(e){if(typeof e=="string")return Fp(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fp(e,t):void 0}}function Fp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nF(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function rF(e){if(Array.isArray(e))return e}function mh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Np=$a(Lp||(Lp=mh(["xl:yst-w-1/3"]))),Bp=$a(Ip||(Ip=mh(["xl:yst-w-2/3"]))),qp=$a(Rp||(Rp=mh(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),iF=function(){var t,n=z.useState(!1),r=zu(n,2),i=r[0],s=r[1],o=z.useState(!1),a=zu(o,2),l=a[0],c=a[1],u=z.useState(null),d=zu(u,2),f=d[0],h=d[1],g=$c({query:{select:function(S){var x=S.data;return x}}}),m=g.data,p=zs({query:{select:function(S){var x=S.data;return x==null?void 0:x.brands}}}),v=p.data,b=v==null?void 0:v.find(function(w){return w.id===f});return y.jsxs("form",{children:[y.jsxs(A.Card,{children:[y.jsx(o1,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),y.jsxs(A.Card.Content,{children:[y.jsxs(qp,{children:[y.jsxs(Np,{className:"yst-space-y-2",children:[y.jsx(A.Title,{size:"4",children:"Brands"}),y.jsxs("p",{children:["You have"," ",y.jsxs("b",{children:[(m==null?void 0:m.activeSubscriptions)||"—"," active subscriptions"]}),". This gives you up to"," ",y.jsxs("b",{children:[(m==null?void 0:m.activeSubscriptions)||"—"," active brands"]}),", for which we’ll automatically run a weekly analysis."]}),y.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),y.jsxs(Bp,{children:[v&&y.jsxs("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:["Active brands: ",(m==null?void 0:m.activeSubscriptions)||"—"," of"," ",(m==null?void 0:m.maxNumberOfActiveBrands)||"—"]}),v&&v.length===0&&y.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",y.jsx(A.Link,{as:Kr,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),((t=v)!==null&&t!==void 0?t:[{id:"loading",name:"Loading..."}]).map(function(w,S,x){return y.jsx(ZR,{brand:w,isLast:S===x.length-1,showHeader:S===0,headerText:"Active brands: 3 of 3",onDelete:function(E){h(E),s(!0)}},w.id)})]})]}),y.jsx(Ma,{}),y.jsxs(qp,{children:[y.jsxs(Np,{className:"yst-space-y-2",children:[y.jsx(A.Title,{size:"4",children:"Delete all data"}),y.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),y.jsxs(Bp,{className:"yst-space-y-4",children:[y.jsxs(A.Button,{variant:"error",onClick:function(){c(!0)},children:[y.jsx(Of,{})," Delete all data"]}),y.jsx("p",{children:y.jsxs("i",{children:[y.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),y.jsx(HR,{isOpen:i,onClose:function(){s(!1),h(null)},brandId:f,brandName:b==null?void 0:b.name}),y.jsx(RR,{isOpen:l,onClose:function(){c(!1)}})]})};const sF=Object.freeze(Object.defineProperty({__proto__:null,default:iF},Symbol.toStringTag,{value:"Module"}));function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}var cf=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI models like ChatGPT and Perplexity. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI models that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT and Perplexity. This process should take around 5 minutes."}],oF=function(t){return cf.find(function(n){return!!Es(n.path,t)})||cf[0]};function aF(){var e=dn(),t=oF(e.pathname);return y.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[y.jsx(jc,{title:y.jsx(ph,{currentStep:t,steps:cf}),description:t.description}),y.jsx(A.Paper.Content,{children:y.jsx(mc,{})})]})}var ph=function(t){var n=t.title,r=t.currentStep,i=t.steps;return y.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[y.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[y.jsx("span",{className:"yst-text-slate-900",children:gc(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),y.jsx("span",{children:gc(r)==="object"?r.title:n||"Step ".concat(r)})]})};const lF=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:ph,default:aF},Symbol.toStringTag,{value:"Module"}));var Hx=function(t){var n=t.onBack,r=t.variant,i=r===void 0?"ai":r,s=t.buttonText,o=t.onButtonClick,a=t.isButtonDisabled,l=a===void 0?!1:a,c=t.isLoading,u=c===void 0?!1:c;return y.jsx(Ef,{nestedInPaperContent:!0,children:y.jsxs("div",{className:Ce({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&y.jsx(A.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),y.jsx("div",{className:Ce("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:y.jsxs(A.Button,{onClick:o,variant:i==="ai"?"primary":i,className:"yst-gap-1.5",style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:u,children:[i==="ai"&&y.jsx(tb,{}),s]})})]})})},cF=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],uF=[{value:"AR",label:"Argentina"},{value:"BE",label:"Belgium"},{value:"BR",label:"Brazil"},{value:"CN",label:"China"},{value:"EG",label:"Egypt"},{value:"ID",label:"Indonesia"},{value:"IE",label:"Ireland"},{value:"IL",label:"Israel"},{value:"IN",label:"India"},{value:"IT",label:"Italy"},{value:"JP",label:"Japan"},{value:"KR",label:"South Korea"},{value:"MX",label:"Mexico"},{value:"NG",label:"Nigeria"},{value:"PL",label:"Poland"},{value:"RU",label:"Russia"},{value:"SA",label:"Saudi Arabia"},{value:"SE",label:"Sweden"},{value:"ES",label:"Spain"},{value:"TH",label:"Thailand"},{value:"TR",label:"Turkey"},{value:"TW",label:"Taiwan"},{value:"ZA",label:"South Africa"}],wl=[].concat(cF,uF,[{value:"OTHER",label:"Other"}]),dF=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh",label:"Chinese (Mandarin)"},{value:"ja",label:"Japanese"}],fF=[{value:"ar",label:"Arabic"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"fi",label:"Finnish"},{value:"hi",label:"Hindi"},{value:"it",label:"Italian"},{value:"ko",label:"Korean"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"ru",label:"Russian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"}],hF=[].concat(dF,fF),zp=["Software","SaaS","Mobile Apps","Web Development","Cybersecurity","AI/Machine Learning","Cloud Computing","Data Analytics","IT Services","Gaming","E-commerce","Online Retail","Fashion Retail","Electronics Retail","Home Goods","Sporting Goods","Jewelry","Beauty Products","Automotive Parts","Books & Media","Children Toys","Consulting","Legal Services","Accounting","Marketing Agency","Public Relations","HR Services","Business Coaching","Financial Advisory","Real Estate","Insurance","Healthcare","Dental","Mental Health","Fitness","Spa & Wellness","Nutrition","Medical Device","Pharmacy","Veterinary","Alternative Medicine","Photography","Graphic Design","Video Production","Marketing","Advertising","Content Creation","Music","Art & Design","Entertainment","Publishing","Restaurant","Cafe","Food Delivery","Catering","Bakery","Brewery","Wine","Food Production","Grocery","Food Truck","Education","Online Learning","Training","Coaching","Tutoring","Language Learning","Professional Development","Childcare","University","Certification","Manufacturing","Construction","Engineering","Automotive","Aerospace","Chemical","Textile","Furniture","Packaging","Industrial Equipment","Travel","Hotel","Tourism","Event Planning","Transportation","Airline","Cruise","Car Rental","Vacation Rental","Adventure Tours","Non-Profit","Charity","Government","Religious Organization","Community Service","Environmental","Political","Social Services","Foundation","Advocacy"];function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function Hp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Up(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hp(Object(n),!0).forEach(function(r){Ux(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ux(e,t,n){return(t=gF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gF(e){var t=yF(e,"string");return ca(t)=="symbol"?t:t+""}function yF(e,t){if(ca(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ca(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hu(e){return vF(e)||pF(e)||Kx(e)||mF()}function mF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1291
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pF(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vF(e){if(Array.isArray(e))return uf(e)}function Sl(e,t){return wF(e)||xF(e,t)||Kx(e,t)||bF()}function bF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1292
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kx(e,t){if(e){if(typeof e=="string")return uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uf(e,t):void 0}}function uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xF(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function wF(e){if(Array.isArray(e))return e}var SF=function(){var t,n=_n(),r=Mc(),i=Hn(),s=z.useState(),o=Sl(s,2),a=o[0],l=o[1],c=z.useState({name:"",url:"",industry:"",language:"en",isLocal:!1,country:"",region:""}),u=Sl(c,2),d=u[0],f=u[1],h=z.useState(Hu(zp).sort(function(_,O){return _.localeCompare(O)})),g=Sl(h,2),m=g[0],p=g[1],v=Wk({mutation:{onSuccess:function(O){var P=O.data.id;i.invalidateQueries({queryKey:[kf(),nr()]}),P&&r.setBrandId(P),O!=null&&O.status&&O.status>=200&&O.status<300&&P&&(r.setBrandId(P),l(P))},onError:function(O){console.log("Error creating brand:",O)}}}),b=v.mutate,w=v.isPending,S=v.error,x=zs({query:{enabled:!!a,select:function(O){var P=O.data;return P==null?void 0:P.brands},refetchInterval:function(O){var P;return((O==null||(P=O.state)===null||P===void 0||(P=P.data)===null||P===void 0||(P=P.data)===null||P===void 0?void 0:P.brands)||[]).find(function(j){return j.id===a})?!1:2*1e3}}}),E=x.data;z.useEffect(function(){a&&E!==null&&E!==void 0&&E.find(function(_){return _.id===a})&&n("/setup/".concat(a,"/queries"))},[a,E,n]);var C=function(O,P){f(function(j){return Up(Up({},j),{},Ux({},O,P))})},k=function(O){O.preventDefault();var P=d.url;P&&!/^https?:\/\//i.test(P)&&(P="https://".concat(P)),b({data:{name:d.name,url:P,industry:d.industry,focusLanguage:d.language,country:d.country,regionOrCity:d.region}})};return y.jsxs("form",{onSubmit:k,children:[y.jsxs("div",{className:"yst-space-y-6",children:[y.jsx(A.Title,{size:"2",children:"Brand info"}),!!S&&y.jsx(A.Alert,{variant:"error",title:"Error",isVisible:!!S,children:y.jsx("ul",{children:S?Object.entries(S).flatMap(function(_){var O=Sl(_,2),P=O[0],j=O[1];return Array.isArray(j)?j.map(function(W,I){return y.jsx("li",{children:W},"".concat(P,"-").concat(I))}):null}):"There was an error creating the brand."})}),y.jsx(A.TextField,{id:"name",label:"Brand name",value:d.name,onChange:function(_){return C("name",_.target.value)}}),y.jsx(A.TextField,{id:"url",label:"Website URL (optional)",placeholder:"Example: https://yourwebsite.com",value:d.url,onChange:function(_){return C("url",_.target.value)}}),y.jsxs(A.Autocomplete,{className:"yst-max-w-sm",id:"industry",label:"Industry",labelProps:{className:"yst-text-slate-800 yst-font-medium"},onChange:function(_){return C("industry",_)},onQueryChange:function(_){p([_.target.value].concat(Hu(zp.filter(function(O){return O.toLowerCase().includes(_.target.value.toLowerCase())}))))},placeholder:"Select or type your industry...",selectedLabel:d.industry,value:d.industry,children:[!m.find(function(_){return _===d.industry})&&d.industry&&y.jsx(A.Autocomplete.Option,{value:d.industry,children:d.industry}),m.map(function(_){return y.jsx(A.Autocomplete.Option,{value:_,children:_},_)})]}),y.jsxs("div",{className:"yst-space-y-2",children:[y.jsx(A.Select,{className:"yst-max-w-sm",id:"language-select",label:"Target language",value:d.language,onChange:function(_){return C("language",_)},options:hF.map(function(_){return{label:_.label,value:_.value}})}),y.jsx("p",{children:"The main language your brand uses to communicate or create content."})]})]}),y.jsx(Ma,{}),y.jsxs("div",{className:"yst-space-y-6",children:[y.jsx(A.Title,{size:"2",children:"Location info"}),y.jsx("p",{children:"You can specify a location to help focus the analysis."}),y.jsx(A.Select,{className:"yst-max-w-sm",id:"language-select",label:"Target country (optional)",value:d.country,placeholder:"Select...",onChange:function(_){return C("country",_)},options:[{label:"Select...",value:"none"}].concat(Hu(wl)).map(function(_){return{label:_.label,value:_.value}})}),y.jsxs(A.Autocomplete,{className:"yst-hidden yst-max-w-sm",clearButtonScreenReaderText:"Clear selection",id:"country",label:"Which country do you operate in?",nullable:!0,onChange:function(_){return C("country",_)},onQueryChange:function(_){return C("country",_.target.value)},placeholder:"Select or type your country...",selectedLabel:((t=wl.find(function(_){return _.value===d.country}))===null||t===void 0?void 0:t.label)||d.country,value:d.country,children:[!wl.find(function(_){return _.value===d.country})&&d.country&&y.jsx(A.Autocomplete.Option,{value:d.country,children:d.country}),wl.map(function(_){return y.jsx(A.Autocomplete.Option,{value:_.value,children:_.label},_.value)})]}),d.country&&y.jsx(A.TextField,{id:"region",label:"Target city, state, or region (optional)",value:d.region,onChange:function(_){return C("region",_.target.value)},description:`Enter a city, state, or region to narrow down the analysis. For
|
|
1293
|
+
example: California, Bavaria, or Paris.`})]}),y.jsx(Hx,{onBack:function(){return n(-1)},buttonText:"Generate queries",isButtonDisabled:w,isLoading:w||!!a})]})};const CF=Object.freeze(Object.defineProperty({__proto__:null,default:SF},Symbol.toStringTag,{value:"Module"}));function ua(e){"@babel/helpers - typeof";return ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ua(e)}function _F(e){return EF(e)||OF(e)||Wx(e)||kF()}function kF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1294
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OF(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EF(e){if(Array.isArray(e))return df(e)}function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kp(Object(n),!0).forEach(function(r){AF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AF(e,t,n){return(t=TF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TF(e){var t=PF(e,"string");return ua(t)=="symbol"?t:t+""}function PF(e,t){if(ua(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ua(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uu(e,t){return jF(e)||MF(e,t)||Wx(e,t)||$F()}function $F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1295
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wx(e,t){if(e){if(typeof e=="string")return df(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?df(e,t):void 0}}function df(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MF(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function jF(e){if(Array.isArray(e))return e}var Il=5,Vx="Generating...",DF="Re-generating...",LF=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],IF=Array.from({length:Il},function(e,t){return{id:"query-".concat(t),text:Vx,isRegenerating:!0}}),RF=function(){var t=Wr(),n=t.brandId,r="/setup/".concat(n,"/analysis"),i=_n(),s=z.useState(IF),o=Uu(s,2),a=o[0],l=o[1],c=z.useState(!1),u=Uu(c,2),d=u[0],f=u[1],h=z.useState([]),g=Uu(h,2),m=g[0],p=g[1],v=dO(n,{query:{enabled:!!n}}),b=v.data,w=v.isRefetching,S=v.refetch,x=aO({mutation:{onSuccess:function(D){D!=null&&D.status&&D.status>=200&&D.status<300&&i(r)},onError:function(D){i(r),console.error("Error saving queries:",D)}}}),E=x.mutate,C=x.isPending;z.useEffect(function(){var I;if(b!=null&&(I=b.data)!==null&&I!==void 0&&I.queries&&Array.isArray(b.data.queries)&&a.every(function(L){return L.text===Vx})){var D=b.data.queries.slice(0,Il);l(D.map(function(L,F){return{id:"query-".concat(F),text:L,isRegenerating:!1}}))}},[b,a]),z.useEffect(function(){var I;if(b!=null&&(I=b.data)!==null&&I!==void 0&&I.queries&&Array.isArray(b.data.queries)&&!w&&m.length>0){var D=b.data.queries.slice(0,Il),L=m.map(Number);l(function(F){return F.map(function(oe,fe){var B=L.indexOf(fe);return qi(qi({},oe),{},{text:B>=0&&D[B]?D[B]:oe.text,isRegenerating:!1})})})}},[b,w,m]);var k=z.useMemo(function(){return w||a.length===0},[w,a.length]),_=z.useCallback(function(I){var D=I.toString();p(function(L){return L.includes(D)?L.filter(function(F){return F!==D}):[].concat(_F(L),[D])})},[]),O=z.useCallback(function(I,D){l(function(L){return L.map(function(F,oe){return oe===I?qi(qi({},F),{},{text:D}):F})})},[]),P=function(){f(!d),p([])},j=z.useCallback(function(){w||m.length===0||(l(function(I){return I.map(function(D,L){return qi(qi({},D),{},{isRegenerating:m.includes(L.toString())})})}),S())},[w,m,S]),W=z.useCallback(function(I){I.preventDefault(),n&&E({brandId:n,data:{queries:a.map(function(D){return D.text})}})},[n,a,E]);return y.jsxs("form",{onSubmit:W,children:[y.jsxs("div",{className:"yst-mb-8",children:[y.jsx(A.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),y.jsxs("div",{className:"yst-space-y-4",children:[y.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),y.jsx("div",{className:Ce("yst-flex yst-gap-3",d?"yst-justify-end":"yst-justify-start"),children:d?y.jsxs(y.Fragment,{children:[y.jsx(A.Button,{size:"small",variant:"secondary",onClick:P,children:"Cancel"}),y.jsxs(A.Button,{size:"small",onClick:j,className:"yst-gap-1.5",isLoading:w,disabled:w||m.length===0,children:[y.jsx(tb,{}),"Re-generate selected prompts"]})]}):y.jsxs(A.Button,{size:"small",variant:"secondary",onClick:P,className:"yst-gap-1.5",children:[y.jsx(sE,{}),"Select prompts to regenerate"]})})]})]}),y.jsx("div",{className:"yst-mb-8",children:a.length===0?LF.map(function(I,D){return y.jsx("div",{className:Ce("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:y.jsx(A.SkeletonLoader,{children:I||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(D))}):a.slice(0,Il).map(function(I,D){var L=I.isRegenerating?DF:I.text;return y.jsx("div",{className:Ce("yst-mb-4"),children:y.jsxs("div",{className:"yst-flex yst-gap-2",children:[d&&y.jsx("div",{className:"yst-flex yst-items-center",children:y.jsx(A.Checkbox,{id:"query-regenerate-".concat(D),name:"query-regenerate-".concat(D),value:D.toString(),checked:m.includes(D.toString()),onChange:function(){return _(D)},disabled:w})}),y.jsxs("div",{className:"yst-flex-1",children:[y.jsx(A.Label,{htmlFor:"query-text-".concat(D),className:"yst-mb-2 yst-block yst-text-sm yst-font-medium yst-text-slate-700",children:"Prompt ".concat(D+1)}),y.jsx(A.TextInput,{id:"query-text-".concat(D),type:"text",value:L,onChange:function(F){I.isRegenerating||O(D,F.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:I.isRegenerating})]})]})},I.id)})}),y.jsx(Hx,{buttonText:"Start analysis (~ 5 minutes)",isButtonDisabled:k,isLoading:C})]})};const FF=Object.freeze(Object.defineProperty({__proto__:null,default:RF},Symbol.toStringTag,{value:"Module"}));var zi=[{labelAbove:"Running queries...",label:"Running queries",threshold:99},{labelAbove:"Done!",label:"Building analysis",threshold:100}],Gx=function(t){var n=t.progress,r=n===void 0?0:n,i=t.className,s=i===void 0?"":i,o=function(){for(var c=0;c<zi.length;c++)if(r<=zi[c].threshold)return zi[c];return zi[zi.length-1]},a=o();return y.jsxs("div",{className:Ce("yst-font-medium yst-text-slate-800",s),children:[y.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?y.jsx(A.Spinner,{}):y.jsx(rb,{className:"yst-text-green-400"}),y.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:a.labelAbove})]}),y.jsx(A.ProgressBar,{className:"yst-mt-3",progress:r,min:0,max:100}),y.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:zi.map(function(l){return y.jsx("span",{children:y.jsx(Dc,{disabled:a.label!==l.label,children:l.label})},l.label)})})]})};Gx.propTypes={progress:jd.number,className:jd.string};var NF=function(t){switch(t){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},BF=function(){var t,n,r,i=Wr(),s=i.brandId,o=_n(),a=[{title:"SEO Fundamentals: A Complete Guide",url:"https://yoast.com/seo-fundamentals/",image:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=400&h=200&fit=crop"},{title:"Content Marketing Best Practices",url:"https://yoast.com/content-marketing/",image:"https://images.unsplash.com/photo-1552664730-d307ca884978?w=400&h=200&fit=crop"}],l=Vv(s,{query:{enabled:!!s,select:function(b){var w=b.data;return w}}}),c=l.data,u=Mk(s,"latest",{query:{enabled:!!s,select:function(b){var w=b.data;return w},refetchInterval:function(b){var w,S=b==null||(w=b.state)===null||w===void 0||(w=w.data)===null||w===void 0?void 0:w.data;return NF(S==null?void 0:S.status)}}}),d=u.data;z.useEffect(function(){RE(c==null?void 0:c.nextScheduledAnalysis,5)&&o("/brands/".concat(s))},[c==null?void 0:c.nextScheduledAnalysis,s,o]);var f=d==null?void 0:d.id,h=f?"/brands/".concat(s,"/analysis/").concat(f):"/brands/".concat(s),g=c==null||(t=c.queries)===null||t===void 0?void 0:t.length,m=(d==null||(n=d.completedQueries)===null||n===void 0?void 0:n.length)||0,p=g&&g>0?Math.round(m/g*100):0;return y.jsxs("div",{className:"yst-mx-auto yst-max-w-2xl yst-space-y-12",children:[y.jsxs(A.Paper,{children:[y.jsx(jc,{title:y.jsx(ph,{title:"Analyzing...",currentStep:3,steps:3}),description:`We’re checking how your brand shows up in AI. Your queries
|
|
1295
1296
|
will now be tested in ChatGPT and Perplexity. This process should
|
|
1296
|
-
take around 5 minutes.`}),y.jsxs(
|
|
1297
|
+
take around 5 minutes.`}),y.jsxs(A.Paper.Content,{className:"yst-space-y-8",children:[y.jsx(Gx,{progress:p}),y.jsx(Ma,{}),y.jsx("div",{className:"yst-space-y-8",children:c==null||(r=c.queries)===null||r===void 0?void 0:r.map(function(v){var b,w=v.id,S=v.query,x=w&&(d==null||(b=d.completedQueries)===null||b===void 0?void 0:b.includes(w));return y.jsxs("div",{className:Ce("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[x===!0?y.jsx(rb,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):y.jsx(A.Spinner,{}),y.jsx("span",{className:"yst-flex-1 yst-text-sm",children:S})]},"result-item-".concat(S))})})]}),y.jsx(A.Paper.Content,{className:"yst-flex yst-justify-end yst-gap-4 yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",children:y.jsx(A.Button,{as:Kr,to:h,children:p===100?"Continue →":"Skip for now"})})]}),y.jsxs("div",{className:"yst-space-y-6",children:[y.jsx(A.Title,{size:"2",children:"Want to read while you wait? Based on your input, we think you'll like these articles:"}),y.jsx("div",{className:"yst-flex yst-flex-col yst-gap-6 md:yst-flex-row",children:a.map(function(v,b){return y.jsxs(A.Card,{className:"yst-overflow-hidden yst-shadow-md md:yst-w-1/3",children:[v.image&&y.jsx(A.Card.Header,{className:"min-h-[12rem] bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(".concat(v.image,")")},children:y.jsx("span",{className:"yst-hidden",children:"Article preview image"})}),y.jsxs(A.Card.Content,{className:"yst-mb-2",children:[y.jsx(A.Title,{size:"2",className:"yst-mb-4",children:v.title}),y.jsx("p",{className:"yst-text-right",children:y.jsx(A.Link,{href:v.url,className:"yst-text-right",target:"_blank",rel:"noopener noreferrer",children:y.jsx("span",{children:"Read article »"})})})]})]},b)})})]})]})};const qF=Object.freeze(Object.defineProperty({__proto__:null,default:BF},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=Fj;exports.setApiBaseUrl=Uv;
|