@yoast/ai-insights-client 1.4.63 → 1.4.65
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var wx=Object.defineProperty;var Gh=e=>{throw TypeError(e)};var Sx=(e,t,n)=>t in e?wx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var be=(e,t,n)=>Sx(e,typeof t!="symbol"?t+"":t,n),fc=(e,t,n)=>t.has(e)||Gh("Cannot "+n);var $=(e,t,n)=>(fc(e,t,"read from private field"),n?n.call(e):t.get(e)),le=(e,t,n)=>t.has(e)?Gh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),te=(e,t,n,r)=>(fc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),De=(e,t,n)=>(fc(e,t,"access private method"),n);var sl=(e,t,n,r)=>({set _(i){te(e,t,i,n)},get _(){return $(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),E=require("@yoast/ui-library"),F=require("react"),Ap=require("react-dom");function Cx(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 D=Cx(F);function Tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mo={},Kh;function _x(){if(Kh)return mo;Kh=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.parse=o,mo.serialize=u;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 y=new s,m=f.length;if(m<2)return y;const p=(h==null?void 0:h.decode)||c;let v=0;do{const b=f.indexOf("=",v);if(b===-1)break;const S=f.indexOf(";",v),C=S===-1?m:S;if(b>C){v=f.lastIndexOf(";",b-1)+1;continue}const x=a(f,v,b),k=l(f,b,x),w=f.slice(x,k);if(y[w]===void 0){let _=a(f,b+1,C),O=l(f,C,_);const A=p(f.slice(_,O));y[w]=A}v=C+1}while(v<m);return y}function a(f,h,y){do{const m=f.charCodeAt(h);if(m!==32&&m!==9)return h}while(++h<y);return y}function l(f,h,y){for(;h>y;){const m=f.charCodeAt(--h);if(m!==32&&m!==9)return h+1}return y}function u(f,h,y){const m=(y==null?void 0:y.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(!y)return v;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);v+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);v+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);v+="; Path="+y.path}if(y.expires){if(!d(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invalid: ${y.expires}`);v+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(v+="; HttpOnly"),y.secure&&(v+="; Secure"),y.partitioned&&(v+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.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: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.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: ${y.sameSite}`)}return v}function c(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 mo}_x();/**
|
|
2
2
|
* react-router v7.6.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
@@ -7,78 +7,78 @@
|
|
|
7
7
|
* LICENSE.md file in the root directory of this source tree.
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/function Cx(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===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 u(){return i[s]}function c(h,y=null,m){let p=kx(i?u().pathname:"/",h,y,m);return jn(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:Gl(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?Yi(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){o="PUSH";let m=c(h,y);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,y){o="REPLACE";let m=c(h,y);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let y=l(s+h),m=i[y];s=y,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function ut(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function jn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function _x(){return Math.random().toString(36).substring(2,10)}function kx(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Yi(t):t,state:n,key:t&&t.key||r||_x()}}function Gl({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 Yi(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 Ap(e,t,n="/"){return Ox(e,t,n,!1)}function Ox(e,t,n,r){let i=typeof t=="string"?Yi(t):t,s=Ar(i.pathname||"/",n);if(s==null)return null;let o=Tp(e);Ex(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=jp(s);a=Ix(o[l],u,r)}return a}function Tp(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("/")&&(ut(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=_r([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Tp(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:Lx(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Pp(s.path))i(s,o,l)}),t}function Pp(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=Pp(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 Ex(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Ax=/^:[\w-]+$/,Tx=3,Px=2,jx=1,Mx=10,$x=-2,Gh=e=>e==="*";function Lx(e,t){let n=e.split("/"),r=n.length;return n.some(Gh)&&(r+=$x),t&&(r+=Px),n.filter(i=>!Gh(i)).reduce((i,s)=>i+(Ax.test(s)?Tx:s===""?jx:Mx),r)}function Dx(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 Ix(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=Ks({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Ks({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:_r([s,d.pathname]),pathnameBase:qx(_r([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=_r([s,d.pathnameBase]))}return o}function Ks(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Rx(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((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let y=a[f]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function Rx(e,t=!1,n=!0){jn(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 jp(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jn(!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 Ar(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 Nx(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Yi(e):e;return{pathname:n?n.startsWith("/")?n:Fx(n,t):t,search:zx(r),hash:Hx(i)}}function Fx(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 dc(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 Bx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sf(e){let t=Bx(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Cf(e,t,n,r=!1){let i;typeof e=="string"?i=Yi(e):(i={...e},ut(!i.pathname||!i.pathname.includes("?"),dc("?","pathname","search",i)),ut(!i.pathname||!i.pathname.includes("#"),dc("#","pathname","hash",i)),ut(!i.search||!i.search.includes("#"),dc("#","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=Nx(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var _r=e=>e.join("/").replace(/\/\/+/g,"/"),qx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ux(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Mp=["POST","PUT","PATCH","DELETE"];new Set(Mp);var Gx=["GET",...Mp];new Set(Gx);var to=D.createContext(null);to.displayName="DataRouter";var _u=D.createContext(null);_u.displayName="DataRouterState";var $p=D.createContext({isTransitioning:!1});$p.displayName="ViewTransition";var Kx=D.createContext(new Map);Kx.displayName="Fetchers";var Vx=D.createContext(null);Vx.displayName="Await";var Hn=D.createContext(null);Hn.displayName="Navigation";var za=D.createContext(null);za.displayName="Location";var Mn=D.createContext({outlet:null,matches:[],isDataRoute:!1});Mn.displayName="Route";var _f=D.createContext(null);_f.displayName="RouteError";function Wx(e,{relative:t}={}){ut(Xi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=D.useContext(Hn),{hash:i,pathname:s,search:o}=Ha(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:_r([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Xi(){return D.useContext(za)!=null}function zt(){return ut(Xi(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(za).location}function sl(e){ut(Xi(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=zt();return D.useMemo(()=>Ks(e,jp(t)),[t,e])}var Lp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dp(e){D.useContext(Hn).static||D.useLayoutEffect(e)}function vn(){let{isDataRoute:e}=D.useContext(Mn);return e?uw():Qx()}function Qx(){ut(Xi(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(to),{basename:t,navigator:n}=D.useContext(Hn),{matches:r}=D.useContext(Mn),{pathname:i}=zt(),s=JSON.stringify(Sf(r)),o=D.useRef(!1);return Dp(()=>{o.current=!0}),D.useCallback((l,u={})=>{if(jn(o.current,Lp),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=Cf(l,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:_r([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}var Yx=D.createContext(null);function Xx(e){let t=D.useContext(Mn).outlet;return t&&D.createElement(Yx.Provider,{value:e},t)}function ku(){let{matches:e}=D.useContext(Mn),t=e[e.length-1];return t?t.params:{}}function Ha(e,{relative:t}={}){let{matches:n}=D.useContext(Mn),{pathname:r}=zt(),i=JSON.stringify(Sf(n));return D.useMemo(()=>Cf(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Zx(e,t){return Ip(e,t)}function Ip(e,t,n,r){var v;ut(Xi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=D.useContext(Hn),{matches:s}=D.useContext(Mn),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let b=c&&c.path||"";Rp(l,!c||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
|
+
*/function kx(e={}){let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((h,y)=>c(h,typeof h=="string"?null:h.state,y===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 u(){return i[s]}function c(h,y=null,m){let p=Ex(i?u().pathname:"/",h,y,m);return Mn(p.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(h)}`),p}function d(h){return typeof h=="string"?h:Vl(h)}return{get index(){return s},get action(){return o},get location(){return u()},createHref:d,createURL(h){return new URL(d(h),"http://localhost")},encodeLocation(h){let y=typeof h=="string"?Xi(h):h;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(h,y){o="PUSH";let m=c(h,y);s+=1,i.splice(s,i.length,m),r&&a&&a({action:o,location:m,delta:1})},replace(h,y){o="REPLACE";let m=c(h,y);i[s]=m,r&&a&&a({action:o,location:m,delta:0})},go(h){o="POP";let y=l(s+h),m=i[y];s=y,a&&a({action:o,location:m,delta:h})},listen(h){return a=h,()=>{a=null}}}}function ut(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function Mn(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Ox(){return Math.random().toString(36).substring(2,10)}function Ex(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Xi(t):t,state:n,key:t&&t.key||r||Ox()}}function Vl({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 Xi(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 Pp(e,t,n="/"){return Ax(e,t,n,!1)}function Ax(e,t,n,r){let i=typeof t=="string"?Xi(t):t,s=Ar(i.pathname||"/",n);if(s==null)return null;let o=jp(e);Tx(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=$p(s);a=Nx(o[l],u,r)}return a}function jp(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("/")&&(ut(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=_r([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(ut(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),jp(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:Ix(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Mp(s.path))i(s,o,l)}),t}function Mp(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=Mp(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 Tx(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Rx(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Px=/^:[\w-]+$/,jx=3,Mx=2,$x=1,Lx=10,Dx=-2,Vh=e=>e==="*";function Ix(e,t){let n=e.split("/"),r=n.length;return n.some(Vh)&&(r+=Dx),t&&(r+=Mx),n.filter(i=>!Vh(i)).reduce((i,s)=>i+(Px.test(s)?jx:s===""?$x:Lx),r)}function Rx(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 Nx(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=Vs({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Vs({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:_r([s,d.pathname]),pathnameBase:Hx(_r([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=_r([s,d.pathnameBase]))}return o}function Vs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Fx(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((u,{paramName:c,isOptional:d},f)=>{if(c==="*"){let y=a[f]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const h=a[f];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function Fx(e,t=!1,n=!0){Mn(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 $p(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Mn(!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 Ar(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 Bx(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Xi(e):e;return{pathname:n?n.startsWith("/")?n:qx(n,t):t,search:Ux(r),hash:Gx(i)}}function qx(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 hc(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 zx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _f(e){let t=zx(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function kf(e,t,n,r=!1){let i;typeof e=="string"?i=Xi(e):(i={...e},ut(!i.pathname||!i.pathname.includes("?"),hc("?","pathname","search",i)),ut(!i.pathname||!i.pathname.includes("#"),hc("#","pathname","hash",i)),ut(!i.search||!i.search.includes("#"),hc("#","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=Bx(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var _r=e=>e.join("/").replace(/\/\/+/g,"/"),Hx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ux=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Gx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Kx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Lp=["POST","PUT","PATCH","DELETE"];new Set(Lp);var Vx=["GET",...Lp];new Set(Vx);var no=D.createContext(null);no.displayName="DataRouter";var Ou=D.createContext(null);Ou.displayName="DataRouterState";var Dp=D.createContext({isTransitioning:!1});Dp.displayName="ViewTransition";var Wx=D.createContext(new Map);Wx.displayName="Fetchers";var Qx=D.createContext(null);Qx.displayName="Await";var Hn=D.createContext(null);Hn.displayName="Navigation";var Ha=D.createContext(null);Ha.displayName="Location";var $n=D.createContext({outlet:null,matches:[],isDataRoute:!1});$n.displayName="Route";var Of=D.createContext(null);Of.displayName="RouteError";function Yx(e,{relative:t}={}){ut(Zi(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=D.useContext(Hn),{hash:i,pathname:s,search:o}=Ua(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:_r([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Zi(){return D.useContext(Ha)!=null}function qt(){return ut(Zi(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(Ha).location}function ol(e){ut(Zi(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=qt();return D.useMemo(()=>Vs(e,$p(t)),[t,e])}var Ip="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rp(e){D.useContext(Hn).static||D.useLayoutEffect(e)}function xn(){let{isDataRoute:e}=D.useContext($n);return e?dw():Xx()}function Xx(){ut(Zi(),"useNavigate() may be used only in the context of a <Router> component.");let e=D.useContext(no),{basename:t,navigator:n}=D.useContext(Hn),{matches:r}=D.useContext($n),{pathname:i}=qt(),s=JSON.stringify(_f(r)),o=D.useRef(!1);return Rp(()=>{o.current=!0}),D.useCallback((l,u={})=>{if(Mn(o.current,Ip),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=kf(l,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:_r([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}var Zx=D.createContext(null);function Jx(e){let t=D.useContext($n).outlet;return t&&D.createElement(Zx.Provider,{value:e},t)}function Eu(){let{matches:e}=D.useContext($n),t=e[e.length-1];return t?t.params:{}}function Ua(e,{relative:t}={}){let{matches:n}=D.useContext($n),{pathname:r}=qt(),i=JSON.stringify(_f(n));return D.useMemo(()=>kf(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function ew(e,t){return Np(e,t)}function Np(e,t,n,r){var v;ut(Zi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=D.useContext(Hn),{matches:s}=D.useContext($n),o=s[s.length-1],a=o?o.params:{},l=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let b=c&&c.path||"";Fp(l,!c||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=zt(),f;if(t){let b=typeof t=="string"?Yi(t):t;ut(u==="/"||((v=b.pathname)==null?void 0:v.startsWith(u)),`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 "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",y=h;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=Ap(e,{pathname:y});jn(c||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),jn(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:_r([u,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:_r([u,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?D.createElement(za.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function Jx(){let e=lw(),t=Ux(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=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),n?D.createElement("pre",{style:i},n):null,o)}var ew=D.createElement(Jx,null),tw=class extends D.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?D.createElement(Mn.Provider,{value:this.props.routeContext},D.createElement(_f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function nw({routeContext:e,match:t,children:n}){let r=D.useContext(to);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(Mn.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(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);ut(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 u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:d}=n,f=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!d||d[u.route.id]===void 0);if(u.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,u,c)=>{let d,f=!1,h=null,y=null;n&&(d=s&&u.route.id?s[u.route.id]:void 0,h=u.route.errorElement||ew,o&&(a<0&&c===0?(Rp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,y=null):a===c&&(f=!0,y=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),p=()=>{let v;return d?v=h:f?v=y:u.route.Component?v=D.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=l,D.createElement(nw,{match:u,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?D.createElement(tw,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function kf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iw(e){let t=D.useContext(to);return ut(t,kf(e)),t}function sw(e){let t=D.useContext(_u);return ut(t,kf(e)),t}function ow(e){let t=D.useContext(Mn);return ut(t,kf(e)),t}function Of(e){let t=ow(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function aw(){return Of("useRouteId")}function lw(){var r;let e=D.useContext(_f),t=sw("useRouteError"),n=Of("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function uw(){let{router:e}=iw("useNavigate"),t=Of("useNavigate"),n=D.useRef(!1);return Dp(()=>{n.current=!0}),D.useCallback(async(i,s={})=>{jn(n.current,Lp),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Kh={};function Rp(e,t,n){!t&&!Kh[e]&&(Kh[e]=!0,jn(!1,n))}D.memo(cw);function cw({routes:e,future:t,state:n}){return Ip(e,void 0,n,t)}function dw({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=D.useRef();i.current==null&&(i.current=Cx({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=D.useState({action:s.action,location:s.location}),l=D.useCallback(u=>{D.startTransition(()=>a(u))},[a]);return D.useLayoutEffect(()=>s.listen(l),[s,l]),D.createElement(fw,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function Ci({to:e,replace:t,state:n,relative:r}){ut(Xi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=D.useContext(Hn);jn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=D.useContext(Mn),{pathname:o}=zt(),a=vn(),l=Cf(e,Sf(s),o,r==="path"),u=JSON.stringify(l);return D.useEffect(()=>{a(JSON.parse(u),{replace:t,state:n,relative:r})},[a,u,r,t,n]),null}function Vs(e){return Xx(e.context)}function Tt(e){ut(!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 fw({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){ut(!Xi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=D.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Yi(n));let{pathname:l="/",search:u="",hash:c="",state:d=null,key:f="default"}=n,h=D.useMemo(()=>{let y=Ar(l,o);return y==null?null:{location:{pathname:y,search:u,hash:c,state:d,key:f},navigationType:r}},[o,l,u,c,d,f,r]);return jn(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:D.createElement(Hn.Provider,{value:a},D.createElement(za.Provider,{children:t,value:h}))}function hw({children:e,location:t}){return Zx(nd(e),t)}function nd(e,t=[]){let n=[];return D.Children.forEach(e,(r,i)=>{if(!D.isValidElement(r))return;let s=[...t,i];if(r.type===D.Fragment){n.push.apply(n,nd(r.props.children,s));return}ut(r.type===Tt,`[${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>`),ut(!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=nd(r.props.children,s)),n.push(o)}),n}var $l="get",Ll="application/x-www-form-urlencoded";function Ou(e){return e!=null&&typeof e.tagName=="string"}function gw(e){return Ou(e)&&e.tagName.toLowerCase()==="button"}function yw(e){return Ou(e)&&e.tagName.toLowerCase()==="form"}function mw(e){return Ou(e)&&e.tagName.toLowerCase()==="input"}function pw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vw(e,t){return e.button===0&&(!t||t==="_self")&&!pw(e)}var ol=null;function bw(){if(ol===null)try{new FormData(document.createElement("form"),0),ol=!1}catch(e){ol=!0}return ol}var xw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fc(e){return e!=null&&!xw.has(e)?(jn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ll}"`),null):e}function ww(e,t){let n,r,i,s,o;if(yw(e)){let a=e.getAttribute("action");r=a?Ar(a,t):null,n=e.getAttribute("method")||$l,i=fc(e.getAttribute("enctype"))||Ll,s=new FormData(e)}else if(gw(e)||mw(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?Ar(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||$l,i=fc(e.getAttribute("formenctype"))||fc(a.getAttribute("enctype"))||Ll,s=new FormData(a,e),!bw()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else u&&s.append(u,d)}}else{if(Ou(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$l,r=null,i=Ll,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function Ef(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function Sw(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 Cw(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 _w(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await Sw(s,n);return o.links?o.links():[]}return[]}));return Aw(r.flat(1).filter(Cw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Vh(e,t,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))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 kw(e,t,{includeHydrateFallback:n}={}){return Ow(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 Ow(e){return[...new Set(e)]}function Ew(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Aw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(Ew(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tw=new Set([100,101,204,205]);function Pw(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&&Ar(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function Np(){let e=D.useContext(to);return Ef(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function jw(){let e=D.useContext(_u);return Ef(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Af=D.createContext(void 0);Af.displayName="FrameworkContext";function Fp(){let e=D.useContext(Af);return Ef(e,"You must render this element inside a <HydratedRouter> element"),e}function Mw(e,t){let n=D.useContext(Af),[r,i]=D.useState(!1),[s,o]=D.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=D.useRef(null);D.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]),D.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},y=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:po(a,h),onBlur:po(l,y),onMouseEnter:po(u,h),onMouseLeave:po(c,y),onTouchStart:po(d,h)}]:[!1,f,{}]}function po(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function $w({page:e,...t}){let{router:n}=Np(),r=D.useMemo(()=>Ap(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?D.createElement(Dw,{page:e,matches:r,...t}):null}function Lw(e){let{manifest:t,routeModules:n}=Fp(),[r,i]=D.useState([]);return D.useEffect(()=>{let s=!1;return _w(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function Dw({page:e,matches:t,...n}){let r=zt(),{manifest:i,routeModules:s}=Fp(),{basename:o}=Np(),{loaderData:a,matches:l}=jw(),u=D.useMemo(()=>Vh(e,t,l,i,r,"data"),[e,t,l,i,r]),c=D.useMemo(()=>Vh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=D.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,m=!1;if(t.forEach(v=>{var S;let b=i.routes[v.route.id];!b||!b.hasLoader||(!u.some(C=>C.route.id===v.route.id)&&v.route.id in a&&((S=s[v.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?m=!0:y.add(v.route.id))}),y.size===0)return[];let p=Pw(e,o);return m&&y.size>0&&p.searchParams.set("_routes",t.filter(v=>y.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,u,t,e,s]),f=D.useMemo(()=>kw(c,i),[c,i]),h=Lw(c);return D.createElement(D.Fragment,null,d.map(y=>D.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),f.map(y=>D.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),h.map(({key:y,link:m})=>D.createElement("link",{key:y,...m})))}function Iw(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Bp=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{Bp&&(window.__reactRouterVersion="7.6.3")}catch(e){}var qp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ci=D.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d,...f},h){let{basename:y}=D.useContext(Hn),m=typeof u=="string"&&qp.test(u),p,v=!1;if(typeof u=="string"&&m&&(p=u,Bp))try{let O=new URL(window.location.href),E=u.startsWith("//")?new URL(O.protocol+u):new URL(u),T=Ar(E.pathname,y);E.origin===O.origin&&T!=null?u=T+E.search+E.hash:v=!0}catch(O){jn(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Wx(u,{relative:i}),[S,C,x]=Mw(r,f),k=Bw(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:d});function w(O){t&&t(O),O.defaultPrevented||k(O)}let _=D.createElement("a",{...f,...x,href:p||b,onClick:v||s?t:w,ref:Iw(h,C),target:l,"data-discover":!m&&n==="render"?"true":void 0});return S&&!m?D.createElement(D.Fragment,null,_,D.createElement($w,{page:b})):_});ci.displayName="Link";var Rw=D.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},c){let d=Ha(o,{relative:u.relative}),f=zt(),h=D.useContext(_u),{navigator:y,basename:m}=D.useContext(Hn),p=h!=null&&Gw(d)&&a===!0,v=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,b=f.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&m&&(S=Ar(S,m)||S);const C=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=b===v||!i&&b.startsWith(v)&&b.charAt(C)==="/",k=S!=null&&(S===v||!i&&S.startsWith(v)&&S.charAt(v.length)==="/"),w={isActive:x,isPending:k,isTransitioning:p},_=x?t:void 0,O;typeof r=="function"?O=r(w):O=[r,x?"active":null,k?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let E=typeof s=="function"?s(w):s;return D.createElement(ci,{...u,"aria-current":_,className:O,ref:c,style:E,to:o,viewTransition:a},typeof l=="function"?l(w):l)});Rw.displayName="NavLink";var Nw=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=$l,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,...f},h)=>{let y=Hw(),m=Uw(a,{relative:u}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&qp.test(a),b=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let C=S.nativeEvent.submitter,x=(C==null?void 0:C.getAttribute("formmethod"))||o;y(C||S.currentTarget,{fetcherKey:t,method:x,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d})};return D.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});Nw.displayName="Form";function Fw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zp(e){let t=D.useContext(to);return ut(t,Fw(e)),t}function Bw(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=vn(),l=zt(),u=Ha(e,{relative:s});return D.useCallback(c=>{if(vw(c,t)){c.preventDefault();let d=n!==void 0?n:Gl(l)===Gl(u);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,u,n,r,t,e,i,s,o])}var qw=0,zw=()=>`__${String(++qw)}__`;function Hw(){let{router:e}=zp("useSubmit"),{basename:t}=D.useContext(Hn),n=aw();return D.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:u}=ww(r,t);if(i.navigate===!1){let c=i.fetcherKey||zw();await e.fetch(c,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,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 Uw(e,{relative:t}={}){let{basename:n}=D.useContext(Hn),r=D.useContext(Mn);ut(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Ha(e||".",{relative:t})},o=zt();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:_r([n,s.pathname])),Gl(s)}function Gw(e,t={}){let n=D.useContext($p);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=zp("useViewTransitionState"),i=Ha(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Ar(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ar(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ks(i.pathname,o)!=null||Ks(i.pathname,s)!=null}[...Tw];var no=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(){}},qi=typeof window=="undefined"||"Deno"in globalThis;function Bt(){}function Kw(e,t){return typeof e=="function"?e(t):e}function rd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ti(e,t){return typeof e=="function"?e(t):e}function On(e,t){return typeof e=="function"?e(t):e}function Wh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Tf(o,t.options))return!1}else if(!ea(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(zi(t.options.mutationKey)!==zi(s))return!1}else if(!ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Tf(e,t){return((t==null?void 0:t.queryKeyHashFn)||zi)(e)}function zi(e){return JSON.stringify(e,(t,n)=>sd(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ea(e[n],t[n])):!1}function id(e,t){if(e===t)return e;const n=Yh(e)&&Yh(t);if(n||sd(e)&&sd(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 u=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=id(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return i===o&&u===i?e:a}return t}function Kl(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 Yh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sd(e){if(!Xh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Xh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Xh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vw(e){return new Promise(t=>{setTimeout(t,e)})}function od(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 id(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 id(e,t)}return t}function Ww(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Qw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vl=Symbol();function Up(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Vl&&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===Vl?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gp(e,t){return typeof e=="function"?e(...t):!!e}var Ei,qr,bs,gp,Yw=(gp=class extends no{constructor(){super();ae(this,Ei);ae(this,qr);ae(this,bs);ne(this,bs,t=>{if(!qi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){$(this,qr)||this.setEventListener($(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,qr))==null||t.call(this),ne(this,qr,void 0))}setEventListener(t){var n;ne(this,bs,t),(n=$(this,qr))==null||n.call(this),ne(this,qr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Ei)!==t&&(ne(this,Ei,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof $(this,Ei)=="boolean"?$(this,Ei):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ei=new WeakMap,qr=new WeakMap,bs=new WeakMap,gp),Pf=new Yw,xs,zr,ws,yp,Xw=(yp=class extends no{constructor(){super();ae(this,xs,!0);ae(this,zr);ae(this,ws);ne(this,ws,t=>{if(!qi&&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(){$(this,zr)||this.setEventListener($(this,ws))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,zr))==null||t.call(this),ne(this,zr,void 0))}setEventListener(t){var n;ne(this,ws,t),(n=$(this,zr))==null||n.call(this),ne(this,zr,t(this.setOnline.bind(this)))}setOnline(t){$(this,xs)!==t&&(ne(this,xs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,xs)}},xs=new WeakMap,zr=new WeakMap,ws=new WeakMap,yp),Ws=new Xw;function ad(){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 Zw(e){return Math.min(1e3*2**e,3e4)}function Kp(e){return(e!=null?e:"online")==="online"?Ws.isOnline():!0}var Vp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function hc(e){return e instanceof Vp}function Wp(e){let t=!1,n=0,r=!1,i;const s=ad(),o=m=>{var p;r||(f(new Vp(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Pf.isFocused()&&(e.networkMode==="always"||Ws.isOnline())&&e.canRun(),c=()=>Kp(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||u())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),y=()=>{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 k,w,_;if(r)return;const b=(k=e.retry)!=null?k:qi?0:3,S=(w=e.retryDelay)!=null?w:Zw,C=typeof S=="function"?S(n,v):S,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!x){f(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),Vw(C).then(()=>u()?void 0:h()).then(()=>{t?f(v):y()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():h().then(y),s)}}var Jw=e=>setTimeout(e,0);function e3(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Jw;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 bt=e3(),Ai,mp,Qp=(mp=class{constructor(){ae(this,Ai)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rd(this.gcTime)&&ne(this,Ai,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:qi?1/0:5*60*1e3)}clearGcTimeout(){$(this,Ai)&&(clearTimeout($(this,Ai)),ne(this,Ai,void 0))}},Ai=new WeakMap,mp),Ss,Ti,kn,Pi,Pt,Aa,ji,Rn,gr,pp,t3=(pp=class extends Qp{constructor(t){var n;super();ae(this,Rn);ae(this,Ss);ae(this,Ti);ae(this,kn);ae(this,Pi);ae(this,Pt);ae(this,Aa);ae(this,ji);ne(this,ji,!1),ne(this,Aa,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,Pi,t.client),ne(this,kn,$(this,Pi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,Ss,n3(this.options)),this.state=(n=t.state)!=null?n:$(this,Ss),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,Pt))==null?void 0:t.promise}setOptions(t){this.options={...$(this,Aa),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,kn).remove(this)}setData(t,n){const r=od(this.state.data,t,this.options);return Le(this,Rn,gr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Le(this,Rn,gr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=$(this,Pt))==null?void 0:r.promise;return(i=$(this,Pt))==null||i.cancel(t),n?n.then(Bt).catch(Bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Ss))}isActive(){return this.observers.some(t=>On(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vl||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ti(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:!Hp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Pt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Pt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,kn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||($(this,Pt)&&($(this,ji)?$(this,Pt).cancel({revert:!0}):$(this,Pt).cancelRetry()),this.scheduleGc()),$(this,kn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Le(this,Rn,gr).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if($(this,Pt))return $(this,Pt).continueRetry(),$(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:()=>(ne(this,ji,!0),r.signal)})},s=()=>{const f=Up(this.options,n),y=(()=>{const m={client:$(this,Pi),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return ne(this,ji,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:$(this,Pi),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),ne(this,Ti,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Le(this,Rn,gr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,y,m,p;hc(f)&&f.silent||Le(this,Rn,gr).call(this,{type:"error",error:f}),hc(f)||((y=(h=$(this,kn).config).onError)==null||y.call(h,f,this),(p=(m=$(this,kn).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return ne(this,Pt,Wp({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,y,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}(y=(h=$(this,kn).config).onSuccess)==null||y.call(h,f,this),(p=(m=$(this,kn).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Le(this,Rn,gr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Le(this,Rn,gr).call(this,{type:"pause"})},onContinue:()=>{Le(this,Rn,gr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),$(this,Pt).start()}},Ss=new WeakMap,Ti=new WeakMap,kn=new WeakMap,Pi=new WeakMap,Pt=new WeakMap,Aa=new WeakMap,ji=new WeakMap,Rn=new WeakSet,gr=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,...Yp(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return ne(this,Ti,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 hc(o)&&o.revert&&$(this,Ti)?{...$(this,Ti),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),bt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,kn).notify({query:this,type:"updated",action:t})})},pp);function Yp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function n3(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 er,vp,r3=(vp=class extends no{constructor(t={}){super();ae(this,er);this.config=t,ne(this,er,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:Tf(i,n);let o=this.get(s);return o||(o=new t3({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,er).has(t.queryHash)||($(this,er).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=$(this,er).get(t.queryHash);n&&(t.destroy(),n===t&&$(this,er).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){bt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,er).get(t)}getAll(){return[...$(this,er).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Wh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Wh(t,r)):n}notify(t){bt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){bt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){bt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},er=new WeakMap,vp),tr,Nt,Mi,nr,Br,bp,i3=(bp=class extends Qp{constructor(t){super();ae(this,nr);ae(this,tr);ae(this,Nt);ae(this,Mi);this.mutationId=t.mutationId,ne(this,Nt,t.mutationCache),ne(this,tr,[]),this.state=t.state||Xp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,tr).includes(t)||($(this,tr).push(t),this.clearGcTimeout(),$(this,Nt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,tr,$(this,tr).filter(n=>n!==t)),this.scheduleGc(),$(this,Nt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,tr).length||(this.state.status==="pending"?this.scheduleGc():$(this,Nt).remove(this))}continue(){var t,n;return(n=(t=$(this,Mi))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,c,d,f,h,y,m,p,v,b,S,C,x,k,w,_,O;const n=()=>{Le(this,nr,Br).call(this,{type:"continue"})};ne(this,Mi,Wp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{Le(this,nr,Br).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Le(this,nr,Br).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Nt).canRun(this)}));const r=this.state.status==="pending",i=!$(this,Mi).canStart();try{if(r)n();else{Le(this,nr,Br).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=$(this,Nt).config).onMutate)==null?void 0:a.call(o,t,this));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t));T!==this.state.context&&Le(this,nr,Br).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await $(this,Mi).start();return await((d=(c=$(this,Nt).config).onSuccess)==null?void 0:d.call(c,E,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context)),await((m=(y=$(this,Nt).config).onSettled)==null?void 0:m.call(y,E,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,E,null,t,this.state.context)),Le(this,nr,Br).call(this,{type:"success",data:E}),E}catch(E){try{throw await((S=(b=$(this,Nt).config).onError)==null?void 0:S.call(b,E,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,E,t,this.state.context)),await((w=(k=$(this,Nt).config).onSettled)==null?void 0:w.call(k,void 0,E,this.state.variables,this.state.context,this)),await((O=(_=this.options).onSettled)==null?void 0:O.call(_,void 0,E,t,this.state.context)),E}finally{Le(this,nr,Br).call(this,{type:"error",error:E})}}finally{$(this,Nt).runNext(this)}}},tr=new WeakMap,Nt=new WeakMap,Mi=new WeakMap,nr=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),bt.batch(()=>{$(this,tr).forEach(r=>{r.onMutationUpdate(t)}),$(this,Nt).notify({mutation:this,type:"updated",action:t})})},bp);function Xp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var br,Nn,Ta,xp,s3=(xp=class extends no{constructor(t={}){super();ae(this,br);ae(this,Nn);ae(this,Ta);this.config=t,ne(this,br,new Set),ne(this,Nn,new Map),ne(this,Ta,0)}build(t,n,r){const i=new i3({mutationCache:this,mutationId:++il(this,Ta)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){$(this,br).add(t);const n=al(t);if(typeof n=="string"){const r=$(this,Nn).get(n);r?r.push(t):$(this,Nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,br).delete(t)){const n=al(t);if(typeof n=="string"){const r=$(this,Nn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&$(this,Nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=al(t);if(typeof n=="string"){const r=$(this,Nn).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=al(t);if(typeof n=="string"){const s=(r=$(this,Nn).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(){bt.batch(()=>{$(this,br).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,br).clear(),$(this,Nn).clear()})}getAll(){return Array.from($(this,br))}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){bt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return bt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Bt))))}},br=new WeakMap,Nn=new WeakMap,Ta=new WeakMap,xp);function al(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Zh(e){return{onFetch:(t,n)=>{var c,d,f,h,y;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{var S;let m=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=Up(t.options,t.fetchOptions),b=async(C,x,k)=>{if(m)return Promise.reject();if(x==null&&C.pages.length)return Promise.resolve(C);const _=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:x,direction:k?"backward":"forward",meta:t.options.meta};return p(M),M})(),O=await v(_),{maxPages:E}=t.options,T=k?Qw:Ww;return{pages:T(C.pages,O,E),pageParams:T(C.pageParams,x,E)}};if(i&&s.length){const C=i==="backward",x=C?o3:Jh,k={pages:s,pageParams:o},w=x(r,k);a=await b(k,w,C)}else{const C=e!=null?e:s.length;do{const x=l===0?(S=o[0])!=null?S:r.initialPageParam:Jh(r,a);if(l>0&&x==null)break;a=await b(a,x),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Jh(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 o3(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 yt,Hr,Ur,Cs,_s,Gr,ks,Os,wp,a3=(wp=class{constructor(e={}){ae(this,yt);ae(this,Hr);ae(this,Ur);ae(this,Cs);ae(this,_s);ae(this,Gr);ae(this,ks);ae(this,Os);ne(this,yt,e.queryCache||new r3),ne(this,Hr,e.mutationCache||new s3),ne(this,Ur,e.defaultOptions||{}),ne(this,Cs,new Map),ne(this,_s,new Map),ne(this,Gr,0)}mount(){il(this,Gr)._++,$(this,Gr)===1&&(ne(this,ks,Pf.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,yt).onFocus())})),ne(this,Os,Ws.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,yt).onOnline())})))}unmount(){var e,t;il(this,Gr)._--,$(this,Gr)===0&&((e=$(this,ks))==null||e.call(this),ne(this,ks,void 0),(t=$(this,Os))==null||t.call(this),ne(this,Os,void 0))}isFetching(e){return $(this,yt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Hr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,yt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=$(this,yt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ti(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,yt).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=$(this,yt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Kw(t,s);if(o!==void 0)return $(this,yt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return bt.batch(()=>$(this,yt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,yt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=$(this,yt);bt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=$(this,yt);return bt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=bt.batch(()=>$(this,yt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Bt).catch(Bt)}invalidateQueries(e,t={}){return bt.batch(()=>{var n,r;return $(this,yt).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=bt.batch(()=>$(this,yt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Bt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=$(this,yt).build(this,t);return n.isStaleByTime(ti(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bt).catch(Bt)}fetchInfiniteQuery(e){return e.behavior=Zh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bt).catch(Bt)}ensureInfiniteQueryData(e){return e.behavior=Zh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ws.isOnline()?$(this,Hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,yt)}getMutationCache(){return $(this,Hr)}getDefaultOptions(){return $(this,Ur)}setDefaultOptions(e){ne(this,Ur,e)}setQueryDefaults(e,t){$(this,Cs).set(zi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,Cs).values()],n={};return t.forEach(r=>{ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){$(this,_s).set(zi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,_s).values()],n={};return t.forEach(r=>{ea(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ur).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Tf(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===Vl&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ur).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,yt).clear(),$(this,Hr).clear()}},yt=new WeakMap,Hr=new WeakMap,Ur=new WeakMap,Cs=new WeakMap,_s=new WeakMap,Gr=new WeakMap,ks=new WeakMap,Os=new WeakMap,wp),Gt,qe,Pa,Ft,$i,Es,Kr,Vr,ja,As,Ts,Li,Di,Wr,Ps,Xe,$o,ld,ud,cd,dd,fd,hd,gd,Zp,Sp,l3=(Sp=class extends no{constructor(t,n){super();ae(this,Xe);ae(this,Gt);ae(this,qe);ae(this,Pa);ae(this,Ft);ae(this,$i);ae(this,Es);ae(this,Kr);ae(this,Vr);ae(this,ja);ae(this,As);ae(this,Ts);ae(this,Li);ae(this,Di);ae(this,Wr);ae(this,Ps,new Set);this.options=n,ne(this,Gt,t),ne(this,Vr,null),ne(this,Kr,ad()),this.options.experimental_prefetchInRender||$(this,Kr).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&&($(this,qe).addObserver(this),e0($(this,qe),this.options)?Le(this,Xe,$o).call(this):this.updateResult(),Le(this,Xe,dd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yd($(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yd($(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Le(this,Xe,fd).call(this),Le(this,Xe,hd).call(this),$(this,qe).removeObserver(this)}setOptions(t){const n=this.options,r=$(this,qe);if(this.options=$(this,Gt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof On(this.options.enabled,$(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Le(this,Xe,gd).call(this),$(this,qe).setOptions(this.options),n._defaulted&&!Kl(this.options,n)&&$(this,Gt).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,qe),observer:this});const i=this.hasListeners();i&&t0($(this,qe),r,this.options,n)&&Le(this,Xe,$o).call(this),this.updateResult(),i&&($(this,qe)!==r||On(this.options.enabled,$(this,qe))!==On(n.enabled,$(this,qe))||ti(this.options.staleTime,$(this,qe))!==ti(n.staleTime,$(this,qe)))&&Le(this,Xe,ld).call(this);const s=Le(this,Xe,ud).call(this);i&&($(this,qe)!==r||On(this.options.enabled,$(this,qe))!==On(n.enabled,$(this,qe))||s!==$(this,Wr))&&Le(this,Xe,cd).call(this,s)}getOptimisticResult(t){const n=$(this,Gt).getQueryCache().build($(this,Gt),t),r=this.createResult(n,t);return c3(this,r)&&(ne(this,Ft,r),ne(this,Es,this.options),ne(this,$i,$(this,qe).state)),r}getCurrentResult(){return $(this,Ft)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){$(this,Ps).add(t)}getCurrentQuery(){return $(this,qe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=$(this,Gt).defaultQueryOptions(t),r=$(this,Gt).getQueryCache().build($(this,Gt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return Le(this,Xe,$o).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),$(this,Ft)))}createResult(t,n){var O;const r=$(this,qe),i=this.options,s=$(this,Ft),o=$(this,$i),a=$(this,Es),u=t!==r?t.state:$(this,Pa),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const E=this.hasListeners(),T=!E&&e0(t,n),M=E&&t0(t,r,n,i);(T||M)&&(d={...d,...Yp(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let E;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(E=s.data,v=!0):E=typeof n.placeholderData=="function"?n.placeholderData((O=$(this,Ts))==null?void 0:O.state.data,$(this,Ts)):n.placeholderData,E!==void 0&&(p="success",h=od(s==null?void 0:s.data,E,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===$(this,ja))h=$(this,As);else try{ne(this,ja,n.select),h=n.select(h),h=od(s==null?void 0:s.data,h,n),ne(this,As,h),ne(this,Vr,null)}catch(E){ne(this,Vr,E)}$(this,Vr)&&(y=$(this,Vr),h=$(this,As),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",S=p==="pending",C=p==="error",x=S&&b,k=h!==void 0,_={status:p,fetchStatus:d.fetchStatus,isPending:S,isSuccess:p==="success",isError:C,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:C&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&k,isStale:jf(t,n),refetch:this.refetch,promise:$(this,Kr),isEnabled:On(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const E=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},T=()=>{const B=ne(this,Kr,_.promise=ad());E(B)},M=$(this,Kr);switch(M.status){case"pending":t.queryHash===r.queryHash&&E(M);break;case"fulfilled":(_.status==="error"||_.data!==M.value)&&T();break;case"rejected":(_.status!=="error"||_.error!==M.reason)&&T();break}}return _}updateResult(){const t=$(this,Ft),n=this.createResult($(this,qe),this.options);if(ne(this,$i,$(this,qe).state),ne(this,Es,this.options),$(this,$i).data!==void 0&&ne(this,Ts,$(this,qe)),Kl(n,t))return;ne(this,Ft,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!$(this,Ps).size)return!0;const o=new Set(s!=null?s:$(this,Ps));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Ft)).some(a=>{const l=a;return $(this,Ft)[l]!==t[l]&&o.has(l)})};Le(this,Xe,Zp).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Le(this,Xe,dd).call(this)}},Gt=new WeakMap,qe=new WeakMap,Pa=new WeakMap,Ft=new WeakMap,$i=new WeakMap,Es=new WeakMap,Kr=new WeakMap,Vr=new WeakMap,ja=new WeakMap,As=new WeakMap,Ts=new WeakMap,Li=new WeakMap,Di=new WeakMap,Wr=new WeakMap,Ps=new WeakMap,Xe=new WeakSet,$o=function(t){Le(this,Xe,gd).call(this);let n=$(this,qe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Bt)),n},ld=function(){Le(this,Xe,fd).call(this);const t=ti(this.options.staleTime,$(this,qe));if(qi||$(this,Ft).isStale||!rd(t))return;const r=Hp($(this,Ft).dataUpdatedAt,t)+1;ne(this,Li,setTimeout(()=>{$(this,Ft).isStale||this.updateResult()},r))},ud=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,qe)):this.options.refetchInterval)!=null?t:!1},cd=function(t){Le(this,Xe,hd).call(this),ne(this,Wr,t),!(qi||On(this.options.enabled,$(this,qe))===!1||!rd($(this,Wr))||$(this,Wr)===0)&&ne(this,Di,setInterval(()=>{(this.options.refetchIntervalInBackground||Pf.isFocused())&&Le(this,Xe,$o).call(this)},$(this,Wr)))},dd=function(){Le(this,Xe,ld).call(this),Le(this,Xe,cd).call(this,Le(this,Xe,ud).call(this))},fd=function(){$(this,Li)&&(clearTimeout($(this,Li)),ne(this,Li,void 0))},hd=function(){$(this,Di)&&(clearInterval($(this,Di)),ne(this,Di,void 0))},gd=function(){const t=$(this,Gt).getQueryCache().build($(this,Gt),this.options);if(t===$(this,qe))return;const n=$(this,qe);ne(this,qe,t),ne(this,Pa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Zp=function(t){bt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n($(this,Ft))}),$(this,Gt).getQueryCache().notify({query:$(this,qe),type:"observerResultsUpdated"})})},Sp);function u3(e,t){return On(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function e0(e,t){return u3(e,t)||e.state.data!==void 0&&yd(e,t,t.refetchOnMount)}function yd(e,t,n){if(On(t.enabled,e)!==!1&&ti(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&jf(e,t)}return!1}function t0(e,t,n,r){return(e!==t||On(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&jf(e,n)}function jf(e,t){return On(t.enabled,e)!==!1&&e.isStaleByTime(ti(t.staleTime,e))}function c3(e,t){return!Kl(e.getCurrentResult(),t)}var Qr,Yr,Kt,xr,Er,Dl,md,Cp,d3=(Cp=class extends no{constructor(n,r){super();ae(this,Er);ae(this,Qr);ae(this,Yr);ae(this,Kt);ae(this,xr);ne(this,Qr,n),this.setOptions(r),this.bindMethods(),Le(this,Er,Dl).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=$(this,Qr).defaultMutationOptions(n),Kl(this.options,r)||$(this,Qr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:$(this,Kt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&zi(r.mutationKey)!==zi(this.options.mutationKey)?this.reset():((i=$(this,Kt))==null?void 0:i.state.status)==="pending"&&$(this,Kt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=$(this,Kt))==null||n.removeObserver(this)}onMutationUpdate(n){Le(this,Er,Dl).call(this),Le(this,Er,md).call(this,n)}getCurrentResult(){return $(this,Yr)}reset(){var n;(n=$(this,Kt))==null||n.removeObserver(this),ne(this,Kt,void 0),Le(this,Er,Dl).call(this),Le(this,Er,md).call(this)}mutate(n,r){var i;return ne(this,xr,r),(i=$(this,Kt))==null||i.removeObserver(this),ne(this,Kt,$(this,Qr).getMutationCache().build($(this,Qr),this.options)),$(this,Kt).addObserver(this),$(this,Kt).execute(n)}},Qr=new WeakMap,Yr=new WeakMap,Kt=new WeakMap,xr=new WeakMap,Er=new WeakSet,Dl=function(){var r,i;const n=(i=(r=$(this,Kt))==null?void 0:r.state)!=null?i:Xp();ne(this,Yr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},md=function(n){bt.batch(()=>{var r,i,s,o,a,l,u,c;if($(this,xr)&&this.hasListeners()){const d=$(this,Yr).variables,f=$(this,Yr).context;(n==null?void 0:n.type)==="success"?((i=(r=$(this,xr)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=$(this,xr)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=$(this,xr)).onError)==null||l.call(a,n.error,d,f),(c=(u=$(this,xr)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d($(this,Yr))})})},Cp),Jp=D.createContext(void 0),Xt=e=>{const t=D.useContext(Jp);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},f3=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Jp.Provider,{value:e,children:t})),ev=D.createContext(!1),h3=()=>D.useContext(ev);ev.Provider;function g3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var y3=D.createContext(g3()),m3=()=>D.useContext(y3),p3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},v3=e=>{D.useEffect(()=>{e.clearReset()},[e])},b3=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Gp(n,[e.error,r])),x3=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))}},w3=(e,t)=>e.isLoading&&e.isFetching&&!t,S3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,n0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function C3(e,t,n){var d,f,h,y,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=h3(),i=m3(),s=Xt(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",x3(o),p3(o,i),v3(i);const a=!s.getQueryCache().get(o.queryHash),[l]=D.useState(()=>new t(s,o)),u=l.getOptimisticResult(o),c=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(p=>{const v=c?l.subscribe(bt.batchCalls(p)):Bt;return l.updateResult(),v},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),D.useEffect(()=>{l.setOptions(o)},[o,l]),S3(o,u))throw n0(o,l,i);if(b3({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,u),o.experimental_prefetchInRender&&!qi&&w3(u,r)){const p=a?n0(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(Bt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function di(e,t){return C3(e,l3,t)}function Mr(e,t){const n=Xt(t),[r]=D.useState(()=>new d3(n,e));D.useEffect(()=>{r.setOptions(e)},[r,e]);const i=D.useSyncExternalStore(D.useCallback(o=>r.subscribe(bt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=D.useCallback((o,a)=>{r.mutate(o,a).catch(Bt)},[r]);if(i.error&&Gp(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Te={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return r0(this.context.count)},getNextContextId(){return r0(this.context.count++)}};function r0(e){const t=String(e),n=t.length-1;return Te.context.id+(n?String.fromCharCode(96+n):"")+t}function Lo(e){Te.context=e}var tv=!1,_3=(e,t)=>e===t,Wl=Symbol("solid-proxy"),nv=typeof Proxy=="function",Eu=Symbol("solid-track"),Ql={equals:_3},rv=uv,$r=1,Yl=2,iv={owned:null,cleanups:null,context:null,owner:null},gc={},We=null,yc=null,k3=null,it=null,Dt=null,kr=null,Au=0;function Or(e,t){const n=it,r=We,i=e.length===0,s=t===void 0?r:t,o=i?iv:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>gt(()=>ta(o)));We=o,it=null;try{return or(a,!0)}finally{it=n,We=r}}function oe(e,t){t=t?Object.assign({},Ql,t):Ql;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),lv(n,i));return[av.bind(n),r]}function sv(e,t,n){const r=Tu(e,t,!0,$r);ro(r)}function we(e,t,n){const r=Tu(e,t,!1,$r);ro(r)}function Se(e,t,n){rv=I3;const r=Tu(e,t,!1,$r);(!n||!n.render)&&(r.user=!0),kr?kr.push(r):ro(r)}function V(e,t,n){n=n?Object.assign({},Ql,n):Ql;const r=Tu(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,ro(r),av.bind(r)}function O3(e){return e&&typeof e=="object"&&"then"in e}function E3(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=gc,l=null,u=!1,c="initialValue"in s,d=typeof r=="function"&&V(r);const f=new Set,[h,y]=(s.storage||oe)(s.initialValue),[m,p]=oe(void 0),[v,b]=oe(void 0,{equals:!1}),[S,C]=oe(c?"ready":"unresolved");Te.context&&(l=Te.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Te.load&&Te.has(l)&&(a=Te.load(l)));function x(O,E,T,M){return o===O&&(o=null,M!==void 0&&(c=!0),(O===a||E===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(M,{value:E})),a=gc,k(E,T)),E}function k(O,E){or(()=>{E===void 0&&y(()=>O),C(E!==void 0?"errored":c?"ready":"unresolved"),p(E);for(const T of f.keys())T.decrement();f.clear()},!1)}function w(){const O=$3,E=h(),T=m();if(T!==void 0&&!o)throw T;return it&&it.user,E}function _(O=!0){if(O!==!1&&u)return;u=!1;const E=d?d():r;if(E==null||E===!1){x(o,gt(h));return}const T=a!==gc?a:gt(()=>i(E,{value:h(),refetching:O}));return O3(T)?(o=T,"value"in T?(T.status==="success"?x(o,T.value,void 0,E):x(o,void 0,pd(T.value),E),T):(u=!0,queueMicrotask(()=>u=!1),or(()=>{C(c?"refreshing":"pending"),b()},!1),T.then(M=>x(T,M,void 0,E),M=>x(T,void 0,pd(M),E)))):(x(o,T,void 0,E),T)}return Object.defineProperties(w,{state:{get:()=>S()},error:{get:()=>m()},loading:{get(){const O=S();return O==="pending"||O==="refreshing"}},latest:{get(){if(!c)return w();const O=m();if(O&&!o)throw O;return h()}}}),d?sv(()=>_(!1)):_(!1),[w,{refetch:_,mutate:y}]}function A3(e){return or(e,!1)}function gt(e){if(it===null)return e();const t=it;it=null;try{return e()}finally{it=t}}function Tr(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 u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s)return s=!1,o;const l=gt(()=>t(a,i,o));return i=a,l}}function Pr(e){Se(()=>gt(e))}function Ce(e){return We===null||(We.cleanups===null?We.cleanups=[e]:We.cleanups.push(e)),e}function i0(){return We}function T3(e,t){const n=We,r=it;We=e,it=null;try{return or(t,!0)}catch(i){Mf(i)}finally{We=n,it=r}}function P3(e){const t=it,n=We;return Promise.resolve().then(()=>{it=t,We=n;let r;return or(e,!1),it=We=null,r?r.done:void 0})}var[j3,TI]=oe(!1);function M3(){return[j3,P3]}function Ot(e,t){const n=Symbol("context");return{id:n,Provider:R3(n),defaultValue:e}}function Et(e){let t;return We&&We.context&&(t=We.context[e.id])!==void 0?t:e.defaultValue}function ov(e){const t=V(e),n=V(()=>vd(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var $3;function av(){if(this.sources&&this.state)if(this.state===$r)ro(this);else{const e=Dt;Dt=null,or(()=>Zl(this),!1),Dt=e}if(it){const e=this.observers?this.observers.length:0;it.sources?(it.sources.push(this),it.sourceSlots.push(e)):(it.sources=[this],it.sourceSlots=[e]),this.observers?(this.observers.push(it),this.observerSlots.push(it.sources.length-1)):(this.observers=[it],this.observerSlots=[it.sources.length-1])}return this.value}function lv(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&or(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=yc&&yc.running;o&&yc.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Dt.push(s):kr.push(s),s.observers&&cv(s)),o||(s.state=$r)}if(Dt.length>1e6)throw Dt=[],new Error},!1)),t}function ro(e){if(!e.fn)return;ta(e);const t=Au;L3(e,e.value,t)}function L3(e,t,n){let r;const i=We,s=it;it=We=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=$r,e.owned&&e.owned.forEach(ta),e.owned=null),e.updatedAt=n+1,Mf(o)}finally{it=s,We=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?lv(e,r):e.value=r,e.updatedAt=n)}function Tu(e,t,n,r=$r,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:We,context:We?We.context:null,pure:n};return We===null||We!==iv&&(We.owned?We.owned.push(s):We.owned=[s]),s}function Xl(e){if(e.state===0)return;if(e.state===Yl)return Zl(e);if(e.suspense&>(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Au);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===$r)ro(e);else if(e.state===Yl){const r=Dt;Dt=null,or(()=>Zl(e,t[0]),!1),Dt=r}}function or(e,t){if(Dt)return e();let n=!1;t||(Dt=[]),kr?n=!0:kr=[],Au++;try{const r=e();return D3(n),r}catch(r){n||(kr=null),Dt=null,Mf(r)}}function D3(e){if(Dt&&(uv(Dt),Dt=null),e)return;const t=kr;kr=null,t.length&&or(()=>rv(t),!1)}function uv(e){for(let t=0;t<e.length;t++)Xl(e[t])}function I3(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Xl(r)}if(Te.context){if(Te.count){Te.effects||(Te.effects=[]),Te.effects.push(...e.slice(0,n));return}Lo()}for(Te.effects&&(Te.done||!Te.count)&&(e=[...Te.effects,...e],n+=Te.effects.length,delete Te.effects),t=0;t<n;t++)Xl(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===$r?r!==t&&(!r.updatedAt||r.updatedAt<Au)&&Xl(r):i===Yl&&Zl(r,t)}}}function cv(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Yl,n.pure?Dt.push(n):kr.push(n),n.observers&&cv(n))}}function ta(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--)ta(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ta(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 pd(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Mf(e,t=We){throw pd(e)}function vd(e){if(typeof e=="function"&&!e.length)return vd(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=vd(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function R3(e,t){return function(r){let i;return we(()=>i=gt(()=>(We.context={...We.context,[e]:r.value},ov(()=>r.children))),void 0),i}}var bd=Symbol("fallback");function Jl(e){for(let t=0;t<e.length;t++)e[t]()}function N3(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Ce(()=>Jl(s)),()=>{let l=e()||[],u=l.length,c,d;return l[Eu],gt(()=>{let h,y,m,p,v,b,S,C,x;if(u===0)o!==0&&(Jl(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[bd],i[0]=Or(k=>(s[0]=k,n.fallback())),o=1);else if(o===0){for(i=new Array(u),d=0;d<u;d++)r[d]=l[d],i[d]=Or(f);o=u}else{for(m=new Array(u),p=new Array(u),a&&(v=new Array(u)),b=0,S=Math.min(o,u);b<S&&r[b]===l[b];b++);for(S=o-1,C=u-1;S>=b&&C>=b&&r[S]===l[C];S--,C--)m[C]=i[S],p[C]=s[S],a&&(v[C]=a[S]);for(h=new Map,y=new Array(C+1),d=C;d>=b;d--)x=l[d],c=h.get(x),y[d]=c===void 0?-1:c,h.set(x,d);for(c=b;c<=S;c++)x=r[c],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[c],p[d]=s[c],a&&(v[d]=a[c]),d=y[d],h.set(x,d)):s[c]();for(d=b;d<u;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=Or(f);i=i.slice(0,o=u),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[y,m]=oe(d);return a[d]=m,t(l[d],y)}return t(l[d])}}}function F3(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return Ce(()=>Jl(s)),()=>{const u=e()||[],c=u.length;return u[Eu],gt(()=>{if(c===0)return a!==0&&(Jl(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[bd],i[0]=Or(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===bd&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<c;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=Or(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=c,r=u.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,y]=oe(u[l]);return o[l]=y,t(h,l)}}}function L(e,t){return gt(()=>e(t||{}))}function ll(){return!0}var xd={get(e,t,n){return t===Wl?n:e.get(t)},has(e,t){return t===Wl?!0:e.has(t)},set:ll,deleteProperty:ll,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ll,deleteProperty:ll}},ownKeys(e){return e.keys()}};function mc(e){return(e=typeof e=="function"?e():e)?e:{}}function B3(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Pe(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&Wl in a,e[o]=typeof a=="function"?(t=!0,V(a)):a}if(nv&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=mc(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in mc(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(mc(e[a])));return[...new Set(o)]}},xd);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 u=l.length-1;u>=0;u--){const c=l[u];if(c==="__proto__"||c==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,c);if(!r[c])r[c]=d.get?{enumerable:!0,configurable:!0,get:B3.bind(n[c]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[c];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 Ze(e,...t){if(nv&&Wl 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)}},xd));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))}},xd)),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 u of t)u.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 dv(e){let t,n;const r=i=>{const s=Te.context;if(s){const[a,l]=oe();Te.count||(Te.count=0),Te.count++,(n||(n=e())).then(u=>{!Te.done&&Lo(s),Te.count--,l(()=>u.default),Lo()}),t=a}else if(!t){const[a]=E3(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return V(()=>(o=t())?gt(()=>{if(!s||Te.done)return o(i);const a=Te.context;Lo(s);const l=o(i);return Lo(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var q3=0;function $n(){return Te.context?Te.getNextContextId():`cl-${q3++}`}var fv=e=>`Stale read from <${e}>.`;function z3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return V(N3(()=>e.each,e.children,t||void 0))}function H3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return V(F3(()=>e.each,e.children,t||void 0))}function xe(e){const t=e.keyed,n=V(()=>e.when,void 0,void 0),r=t?n:V(n,void 0,{equals:(i,s)=>!i==!s});return V(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?gt(()=>s(t?i:()=>{if(!gt(r))throw fv("Show");return n()})):s}return e.fallback},void 0,void 0)}function U3(e){const t=ov(()=>e.children),n=V(()=>{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],u=s,c=V(()=>u()?void 0:l.when,void 0,void 0),d=l.keyed?c:V(c,void 0,{equals:(f,h)=>!f==!h});s=()=>u()||(d()?[a,c,l]:void 0)}return s});return V(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?gt(()=>a(o.keyed?s():()=>{var u;if(((u=gt(n)())==null?void 0:u[0])!==i)throw fv("Match");return s()})):a},void 0,void 0)}function pc(e){return e}var G3=["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"],K3=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...G3]),V3=new Set(["innerHTML","textContent","innerText","children"]),W3=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Q3=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 Y3(e,t){const n=Q3[e];return typeof n=="object"?n[t]?n.$:void 0:n}var X3=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Z3=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"]),J3={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function eS(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,u=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 c=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],c)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],c),t[i]=n[s]}else{if(!u){u=new Map;let d=a;for(;d<s;)u.set(n[d],d++)}const c=u.get(t[o]);if(c!=null)if(a<c&&c<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=u.get(t[d]))==null||h!==c+f);)f++;if(f>c-a){const y=t[o];for(;a<c;)e.insertBefore(n[a++],y)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var Vo="_$DX_DELEGATE";function hv(e,t,n,r={}){let i;return Or(s=>{i=s,t===document?e():Q(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function ue(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 Pu(e,t=window.document){const n=t[Vo]||(t[Vo]=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,mv))}}function tS(e=window.document){if(e[Vo]){for(let t of e[Vo].keys())e.removeEventListener(t,mv);delete e[Vo]}}function re(e,t,n){Zi(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function nS(e,t,n,r){Zi(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function rS(e,t,n){Zi(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ie(e,t){Zi(e)||(t==null?e.removeAttribute("class"):e.className=t)}function gv(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 iS(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]||(s0(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||(s0(e,a,!0),n[a]=l)}return n}function sS(e,t,n){if(!t)return n?re(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 yv(e,t={},n,r){const i={};return r||we(()=>i.children=na(e,t.children,i.children)),we(()=>typeof t.ref=="function"&&io(t.ref,e)),we(()=>oS(e,t,n,!0,i,!0)),i}function io(e,t,n){return gt(()=>e(t,n))}function Q(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return na(e,t,r,n);we(i=>na(e,t(),i,n),r)}function oS(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=o0(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=o0(e,o,a,i[o],n,s,t)}}function aS(e){let t,n;return!Zi()||!(t=Te.registry.get(n=uS()))?e():(Te.completed&&Te.completed.add(t),Te.registry.delete(n),t)}function Zi(e){return!!Te.context&&!Te.done&&(!e||e.isConnected)}function lS(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function s0(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 o0(e,t,n,r,i,s,o){let a,l,u,c,d;if(t==="style")return sS(e,n,r);if(t==="classList")return iS(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=X3.has(f);if(!h&&r){const y=Array.isArray(r)?r[0]:r;e.removeEventListener(f,y)}(h||n)&&(gv(e,f,n,h),h&&Pu([f]))}else if(t.slice(0,5)==="attr:")re(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")rS(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(u=V3.has(t))||!i&&((c=Y3(t,e.tagName))||(l=K3.has(t)))||(a=e.nodeName.includes("-")||"is"in o)){if(d)t=t.slice(5),l=!0;else if(Zi(e))return n;t==="class"||t==="className"?ie(e,n):a&&!l&&!u?e[lS(t)]=n:e[c||t]=n}else{const f=i&&t.indexOf(":")>-1&&J3[t.split(":")[0]];f?nS(e,f,t,n):re(e,W3[t]||t,n)}return n}function mv(e){if(Te.registry&&Te.events&&Te.events.find(([l,u])=>u===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 u=t[`${n}Data`];if(u!==void 0?l.call(t,u,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}}),Te.registry&&!Te.done&&(Te.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!o());u++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function na(e,t,n,r,i){const s=Zi(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let u=0;u<n.length;u++){const c=n[u];c.nodeType===8&&c.data.slice(0,2)==="!$"?c.remove():l.push(c)}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=rs(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=rs(e,n,r)}else{if(o==="function")return we(()=>{let l=t();for(;typeof l=="function";)l=l();n=na(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],u=n&&Array.isArray(n);if(wd(l,t,n,i))return we(()=>n=na(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let c=l[0];if(c.parentNode!==e)return n;const d=[c];for(;(c=c.nextSibling)!==r;)d.push(c);return n=d}if(l.length===0){if(n=rs(e,n,r),a)return n}else u?n.length===0?a0(e,l,r):eS(e,n,l):(n&&rs(e),a0(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=rs(e,n,r,t);rs(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function wd(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],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=wd(e,a,l)||i;else if(u==="function")if(r){for(;typeof a=="function";)a=a();i=wd(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return i}function a0(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function rs(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 Te.getNextContextId()}var cS="http://www.w3.org/2000/svg";function pv(e,t=!1){return t?document.createElementNS(cS,e):document.createElement(e)}function vv(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=i0();let s,o=!!Te.context;return Se(()=>{o&&(i0().user=o=!1),s||(s=T3(i,()=>V(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,u]=oe(!1),c=()=>u(!0);Or(d=>Q(a,()=>l()?d():s(),null)),Ce(c)}else{const l=pv(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),Q(u,s),a.appendChild(l),e.ref&&e.ref(l),Ce(()=>a.removeChild(l))}},void 0,{render:!o}),n}function dS(e,t){const n=V(e);return V(()=>{const r=n();switch(typeof r){case"function":return gt(()=>r(t));case"string":const i=Z3.has(r),s=Te.context?aS():pv(r,i);return yv(s,t,i),s}})}function fS(e){const[,t]=Ze(e,["component"]);return dS(()=>e.component,t)}var hS=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()}},bv=class{constructor(t){this.generateIdentifier=t,this.kv=new hS}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)}},gS=class extends bv{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 mS(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 Qs(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Il(e,t){return e.indexOf(t)!==-1}function l0(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var pS=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return mS(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},vS=e=>Object.prototype.toString.call(e).slice(8,-1),xv=e=>typeof e=="undefined",bS=e=>e===null,ra=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Sd=e=>ra(e)&&Object.keys(e).length===0,si=e=>Array.isArray(e),xS=e=>typeof e=="string",wS=e=>typeof e=="number"&&!isNaN(e),SS=e=>typeof e=="boolean",CS=e=>e instanceof RegExp,ia=e=>e instanceof Map,sa=e=>e instanceof Set,wv=e=>vS(e)==="Symbol",_S=e=>e instanceof Date&&!isNaN(e.valueOf()),kS=e=>e instanceof Error,u0=e=>typeof e=="number"&&isNaN(e),OS=e=>SS(e)||bS(e)||xv(e)||wS(e)||xS(e)||wv(e),ES=e=>typeof e=="bigint",AS=e=>e===1/0||e===-1/0,TS=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),PS=e=>e instanceof URL,Sv=e=>e.replace(/\./g,"\\."),vc=e=>e.map(String).map(Sv).join("."),Wo=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 Kn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Cv=[Kn(xv,"undefined",()=>null,()=>{}),Kn(ES,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),Kn(_S,"Date",e=>e.toISOString(),e=>new Date(e)),Kn(kS,"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}),Kn(CS,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Kn(sa,"set",e=>[...e.values()],e=>new Set(e)),Kn(ia,"map",e=>[...e.entries()],e=>new Map(e)),Kn(e=>u0(e)||AS(e),"number",e=>u0(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Kn(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Kn(PS,"URL",e=>e.toString(),e=>new URL(e))];function ju(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var _v=ju((e,t)=>wv(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}),jS=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),kv=ju(TS,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=jS[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 Ev=ju(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)}),Av=ju((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)}),MS=[Ev,_v,Av,kv],c0=(e,t)=>{const n=l0(MS,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=l0(Cv,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Tv={};Cv.forEach(e=>{Tv[e.annotation]=e});var $S=(e,t,n)=>{if(si(t))switch(t[0]){case"symbol":return _v.untransform(e,t,n);case"class":return Ev.untransform(e,t,n);case"custom":return Av.untransform(e,t,n);case"typed-array":return kv.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Tv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},fs=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Pv(e){if(Il(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Il(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Il(e,"constructor"))throw new Error("constructor is not allowed as a property")}var LS=(e,t)=>{Pv(t);for(let n=0;n<t.length;n++){const r=t[n];if(sa(e))e=fs(e,+r);else if(ia(e)){const i=+r,s=+t[++n]==0?"key":"value",o=fs(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(Pv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(si(r)){const a=+o;r=r[a]}else if(ra(r))r=r[o];else if(sa(r)){const a=+o;r=fs(r,a)}else if(ia(r)){if(s===t.length-2)break;const l=+o,u=+t[++s]==0?"key":"value",c=fs(r,l);switch(u){case"key":r=c;break;case"value":r=r.get(c);break}}}const i=t[t.length-1];if(si(r)?r[+i]=n(r[+i]):ra(r)&&(r[i]=n(r[i])),sa(r)){const s=fs(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(ia(r)){const s=+t[t.length-2],o=fs(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 _d(e,t,n=[]){if(!e)return;if(!si(e)){Qs(e,(s,o)=>_d(s,t,[...n,...Wo(o)]));return}const[r,i]=e;i&&Qs(i,(s,o)=>{_d(s,t,[...n,...Wo(o)])}),t(r,n)}function DS(e,t,n){return _d(t,(r,i)=>{e=Cd(e,i,s=>$S(s,r,n))}),e}function IS(e,t){function n(r,i){const s=LS(e,Wo(i));r.map(Wo).forEach(o=>{e=Cd(e,o,()=>s)})}if(si(t)){const[r,i]=t;r.forEach(s=>{e=Cd(e,Wo(s),()=>e)}),i&&Qs(i,n)}else Qs(t,n);return e}var RS=(e,t)=>ra(e)||si(e)||ia(e)||sa(e)||Ov(e,t);function NS(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function FS(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(vc):n[vc(s)]=o.map(vc)}),r?Sd(n)?[r]:[r,n]:Sd(n)?void 0:n}var jv=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=OS(e);if(!a){NS(e,i,t);const y=o.get(e);if(y)return r?{transformedValue:null}:y}if(!RS(e,n)){const y=c0(e,n),m=y?{transformedValue:y.value,annotations:[y.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Il(s,e))return{transformedValue:null};const l=c0(e,n),u=(h=l==null?void 0:l.value)!=null?h:e,c=si(u)?[]:{},d={};Qs(u,(y,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=jv(y,t,n,r,[...i,m],[...s,e],o);c[m]=p.transformedValue,si(p.annotations)?d[m]=p.annotations:ra(p.annotations)&&Qs(p.annotations,(v,b)=>{d[Sv(m)+"."+b]=v})});const f=Sd(d)?{transformedValue:c,annotations:l?[l.type]:void 0}:{transformedValue:c,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function Mv(e){return Object.prototype.toString.call(e).slice(8,-1)}function d0(e){return Mv(e)==="Array"}function BS(e){if(Mv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function qS(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 kd(e,t={}){if(d0(e))return e.map(i=>kd(i,t));if(!BS(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(d0(t.props)&&!t.props.includes(s))return i;const o=e[s],a=kd(o,t);return qS(i,s,a,e,t.nonenumerable),i},{})}var st=class{constructor({dedupe:e=!1}={}){this.classRegistry=new gS,this.symbolRegistry=new bv(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new pS,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=jv(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=FS(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=kd(t);return n!=null&&n.values&&(r=DS(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=IS(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)}};st.defaultInstance=new st;st.serialize=st.defaultInstance.serialize.bind(st.defaultInstance);st.deserialize=st.defaultInstance.deserialize.bind(st.defaultInstance);st.stringify=st.defaultInstance.stringify.bind(st.defaultInstance);st.parse=st.defaultInstance.parse.bind(st.defaultInstance);st.registerClass=st.defaultInstance.registerClass.bind(st.defaultInstance);st.registerSymbol=st.defaultInstance.registerSymbol.bind(st.defaultInstance);st.registerCustom=st.defaultInstance.registerCustom.bind(st.defaultInstance);st.allowErrorProps=st.defaultInstance.allowErrorProps.bind(st.defaultInstance);var $v=st.serialize,zS=st.stringify;function ls(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function HS(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function US({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function hs({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function GS(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var eu=(e,t=!1)=>{const{json:n}=$v(e);return JSON.stringify(n,null,t?2:void 0)},ul=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,KS=(e,t)=>e.queryHash.localeCompare(t.queryHash),Lv=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,VS=(e,t)=>ul(e)===ul(t)?Lv(e,t):ul(e)>ul(t)?1:-1,Od={status:VS,"query hash":KS,"last updated":Lv},cl=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,Dv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,WS=(e,t)=>cl(e)===cl(t)?Dv(e,t):cl(e)>cl(t)?1:-1,Ed={status:WS,"last updated":Dv},f0=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),Iv=()=>{const[e,t]=oe("dark");return Pr(()=>{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),Ce(()=>n.removeEventListener("change",r))}),e},_i=(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,_i(r.get(i),s,n)),r}if(e instanceof Set){const r=_i(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]=_i(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]=_i(r[i],s,n),r}return e},Do=(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,Do(n.get(r),i)),n}if(e instanceof Set){const n=Do(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]=Do(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]=Do(n[r],i),n}return e},Rv=(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)},js,Ma,$a,La,Ii,Da,Ms,$s,Ls,Ds,Is,Rs,Ia,_p,QS=(_p=class{constructor(e){ae(this,js);ae(this,Ma);ae(this,$a);ae(this,La);ae(this,Ii,!1);ae(this,Da);ae(this,Ms);ae(this,$s);ae(this,Ls);ae(this,Ds);ae(this,Is);ae(this,Rs);ae(this,Ia);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c}=e;ne(this,js,oe(t)),ne(this,$a,n),ne(this,La,r),ne(this,Ma,i),ne(this,Da,u),ne(this,Ms,c),ne(this,$s,oe(s)),ne(this,Ls,oe(o)),ne(this,Ds,oe(a)),ne(this,Is,oe(l))}setButtonPosition(e){$(this,$s)[1](e)}setPosition(e){$(this,Ls)[1](e)}setInitialIsOpen(e){$(this,Ds)[1](e)}setErrorTypes(e){$(this,Is)[1](e)}setClient(e){$(this,js)[1](e)}mount(e){if($(this,Ii))throw new Error("Devtools is already mounted");const t=hv(()=>{const n=this,[r]=$(this,$s),[i]=$(this,Ls),[s]=$(this,Ds),[o]=$(this,Is),[a]=$(this,js);let l;return $(this,Rs)?l=$(this,Rs):(l=dv(()=>Promise.resolve().then(()=>BL)),ne(this,Rs,l)),Rv($(this,Da),$(this,Ms)),L(l,Pe({get queryFlavor(){return $(n,$a)},get version(){return $(n,La)},get onlineManager(){return $(n,Ma)},get shadowDOMTarget(){return $(n,Ms)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);ne(this,Ii,!0),ne(this,Ia,t)}unmount(){var e;if(!$(this,Ii))throw new Error("Devtools is not mounted");(e=$(this,Ia))==null||e.call(this),ne(this,Ii,!1)}},js=new WeakMap,Ma=new WeakMap,$a=new WeakMap,La=new WeakMap,Ii=new WeakMap,Da=new WeakMap,Ms=new WeakMap,$s=new WeakMap,Ls=new WeakMap,Ds=new WeakMap,Is=new WeakMap,Rs=new WeakMap,Ia=new WeakMap,_p),Ns,Ra,Na,Fa,Ri,Ba,Fs,Bs,qs,zs,Hs,Us,Gs,qa,kp,YS=(kp=class{constructor(e){ae(this,Ns);ae(this,Ra);ae(this,Na);ae(this,Fa);ae(this,Ri,!1);ae(this,Ba);ae(this,Fs);ae(this,Bs);ae(this,qs);ae(this,zs);ae(this,Hs);ae(this,Us);ae(this,Gs);ae(this,qa);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c,onClose:d}=e;ne(this,Ns,oe(t)),ne(this,Na,n),ne(this,Fa,r),ne(this,Ra,i),ne(this,Ba,u),ne(this,Fs,c),ne(this,Bs,oe(s)),ne(this,qs,oe(o)),ne(this,zs,oe(a)),ne(this,Hs,oe(l)),ne(this,Us,oe(d))}setButtonPosition(e){$(this,Bs)[1](e)}setPosition(e){$(this,qs)[1](e)}setInitialIsOpen(e){$(this,zs)[1](e)}setErrorTypes(e){$(this,Hs)[1](e)}setClient(e){$(this,Ns)[1](e)}setOnClose(e){$(this,Us)[1](()=>e)}mount(e){if($(this,Ri))throw new Error("Devtools is already mounted");const t=hv(()=>{const n=this,[r]=$(this,Bs),[i]=$(this,qs),[s]=$(this,zs),[o]=$(this,Hs),[a]=$(this,Ns),[l]=$(this,Us);let u;return $(this,Gs)?u=$(this,Gs):(u=dv(()=>Promise.resolve().then(()=>HL)),ne(this,Gs,u)),Rv($(this,Ba),$(this,Fs)),L(u,Pe({get queryFlavor(){return $(n,Na)},get version(){return $(n,Fa)},get onlineManager(){return $(n,Ra)},get shadowDOMTarget(){return $(n,Fs)}},{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);ne(this,Ri,!0),ne(this,qa,t)}unmount(){var e;if(!$(this,Ri))throw new Error("Devtools is not mounted");(e=$(this,qa))==null||e.call(this),ne(this,Ri,!1)}},Ns=new WeakMap,Ra=new WeakMap,Na=new WeakMap,Fa=new WeakMap,Ri=new WeakMap,Ba=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,qs=new WeakMap,zs=new WeakMap,Hs=new WeakMap,Us=new WeakMap,Gs=new WeakMap,qa=new WeakMap,kp);function XS(e){const t=Xt(e.client),n=D.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[u]=D.useState(new QS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Ws,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return D.useEffect(()=>{u.setClient(t)},[t,u]),D.useEffect(()=>{r&&u.setButtonPosition(r)},[r,u]),D.useEffect(()=>{i&&u.setPosition(i)},[i,u]),D.useEffect(()=>{u.setInitialIsOpen(s||!1)},[s,u]),D.useEffect(()=>{u.setErrorTypes(o||[])},[o,u]),D.useEffect(()=>(n.current&&u.mount(n.current),()=>{u.unmount()}),[u]),g.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function ZS(e){const t=Xt(e.client),n=D.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=D.useState(new YS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Ws,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return D.useEffect(()=>{o.setClient(t)},[t,o]),D.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),D.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),D.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),g.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var JS=process.env.NODE_ENV!=="development"?function(){return null}:XS;process.env.NODE_ENV;function Nv(e,t){return function(){return e.apply(t,arguments)}}const{toString:eC}=Object.prototype,{getPrototypeOf:$f}=Object,{iterator:Mu,toStringTag:Fv}=Symbol,$u=(e=>t=>{const n=eC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Un=e=>(e=e.toLowerCase(),t=>$u(t)===e),Lu=e=>t=>typeof t===e,{isArray:so}=Array,oa=Lu("undefined");function tC(e){return e!==null&&!oa(e)&&e.constructor!==null&&!oa(e.constructor)&&Qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bv=Un("ArrayBuffer");function nC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bv(e.buffer),t}const rC=Lu("string"),Qt=Lu("function"),qv=Lu("number"),Du=e=>e!==null&&typeof e=="object",iC=e=>e===!0||e===!1,Rl=e=>{if($u(e)!=="object")return!1;const t=$f(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Fv in e)&&!(Mu in e)},sC=Un("Date"),oC=Un("File"),aC=Un("Blob"),lC=Un("FileList"),uC=e=>Du(e)&&Qt(e.pipe),cC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qt(e.append)&&((t=$u(e))==="formdata"||t==="object"&&Qt(e.toString)&&e.toString()==="[object FormData]"))},dC=Un("URLSearchParams"),[fC,hC,gC,yC]=["ReadableStream","Request","Response","Headers"].map(Un),mC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ua(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),so(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 zv(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 ki=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Hv=e=>!oa(e)&&e!==ki;function Ad(){const{caseless:e}=Hv(this)&&this||{},t={},n=(r,i)=>{const s=e&&zv(t,i)||i;Rl(t[s])&&Rl(r)?t[s]=Ad(t[s],r):Rl(r)?t[s]=Ad({},r):so(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ua(arguments[r],n);return t}const pC=(e,t,n,{allOwnKeys:r}={})=>(Ua(t,(i,s)=>{n&&Qt(i)?e[s]=Nv(i,n):e[s]=i},{allOwnKeys:r}),e),vC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bC=(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)},xC=(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&&$f(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},wC=(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},SC=e=>{if(!e)return null;if(so(e))return e;let t=e.length;if(!qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},CC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&$f(Uint8Array)),_C=(e,t)=>{const r=(e&&e[Mu]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},kC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},OC=Un("HTMLFormElement"),EC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),h0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),AC=Un("RegExp"),Uv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ua(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},TC=e=>{Uv(e,(t,n)=>{if(Qt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qt(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+"'")})}})},PC=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return so(e)?r(e):r(String(e).split(t)),n},jC=()=>{},MC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function $C(e){return!!(e&&Qt(e.append)&&e[Fv]==="FormData"&&e[Mu])}const LC=e=>{const t=new Array(10),n=(r,i)=>{if(Du(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=so(r)?[]:{};return Ua(r,(o,a)=>{const l=n(o,i+1);!oa(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},DC=Un("AsyncFunction"),IC=e=>e&&(Du(e)||Qt(e))&&Qt(e.then)&&Qt(e.catch),Gv=((e,t)=>e?setImmediate:t?((n,r)=>(ki.addEventListener("message",({source:i,data:s})=>{i===ki&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ki.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qt(ki.postMessage)),RC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ki):typeof process!="undefined"&&process.nextTick||Gv,NC=e=>e!=null&&Qt(e[Mu]),H={isArray:so,isArrayBuffer:Bv,isBuffer:tC,isFormData:cC,isArrayBufferView:nC,isString:rC,isNumber:qv,isBoolean:iC,isObject:Du,isPlainObject:Rl,isReadableStream:fC,isRequest:hC,isResponse:gC,isHeaders:yC,isUndefined:oa,isDate:sC,isFile:oC,isBlob:aC,isRegExp:AC,isFunction:Qt,isStream:uC,isURLSearchParams:dC,isTypedArray:CC,isFileList:lC,forEach:Ua,merge:Ad,extend:pC,trim:mC,stripBOM:vC,inherits:bC,toFlatObject:xC,kindOf:$u,kindOfTest:Un,endsWith:wC,toArray:SC,forEachEntry:_C,matchAll:kC,isHTMLForm:OC,hasOwnProperty:h0,hasOwnProp:h0,reduceDescriptors:Uv,freezeMethods:TC,toObjectSet:PC,toCamelCase:EC,noop:jC,toFiniteNumber:MC,findKey:zv,global:ki,isContextDefined:Hv,isSpecCompliantForm:$C,toJSONObject:LC,isAsyncFn:DC,isThenable:IC,setImmediate:Gv,asap:RC,isIterable:NC};function je(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)}H.inherits(je,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Kv=je.prototype,Vv={};["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=>{Vv[e]={value:e}});Object.defineProperties(je,Vv);Object.defineProperty(Kv,"isAxiosError",{value:!0});je.from=(e,t,n,r,i,s)=>{const o=Object.create(Kv);return H.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),je.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const FC=null;function Td(e){return H.isPlainObject(e)||H.isArray(e)}function Wv(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function g0(e,t,n){return e?e.concat(t).map(function(i,s){return i=Wv(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function BC(e){return H.isArray(e)&&!e.some(Td)}const qC=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Iu(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!H.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(H.isDate(y))return y.toISOString();if(H.isBoolean(y))return y.toString();if(!l&&H.isBlob(y))throw new je("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(y)||H.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function c(y,m,p){let v=y;if(y&&!p&&typeof y=="object"){if(H.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=JSON.stringify(y);else if(H.isArray(y)&&BC(y)||(H.isFileList(y)||H.endsWith(m,"[]"))&&(v=H.toArray(y)))return m=Wv(m),v.forEach(function(S,C){!(H.isUndefined(S)||S===null)&&t.append(o===!0?g0([m],C,s):o===null?m:m+"[]",u(S))}),!1}return Td(y)?!0:(t.append(g0(p,m,s),u(y)),!1)}const d=[],f=Object.assign(qC,{defaultVisitor:c,convertValue:u,isVisitable:Td});function h(y,m){if(!H.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(y),H.forEach(y,function(v,b){(!(H.isUndefined(v)||v===null)&&i.call(t,v,H.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return h(e),t}function y0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lf(e,t){this._pairs=[],e&&Iu(e,this,t)}const Qv=Lf.prototype;Qv.append=function(t,n){this._pairs.push([t,n])};Qv.toString=function(t){const n=t?function(r){return t.call(this,r,y0)}:y0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function zC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yv(e,t,n){if(!t)return e;const r=n&&n.encode||zC;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=H.isURLSearchParams(t)?t.toString():new Lf(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class m0{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){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},HC=typeof URLSearchParams!="undefined"?URLSearchParams:Lf,UC=typeof FormData!="undefined"?FormData:null,GC=typeof Blob!="undefined"?Blob:null,KC={isBrowser:!0,classes:{URLSearchParams:HC,FormData:UC,Blob:GC},protocols:["http","https","file","blob","url","data"]},Df=typeof window!="undefined"&&typeof document!="undefined",Pd=typeof navigator=="object"&&navigator||void 0,VC=Df&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),WC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QC=Df&&window.location.href||"http://localhost",YC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Df,hasStandardBrowserEnv:VC,hasStandardBrowserWebWorkerEnv:WC,navigator:Pd,origin:QC},Symbol.toStringTag,{value:"Module"})),Lt={...YC,...KC};function XC(e,t){return Iu(e,new Lt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Lt.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function ZC(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function JC(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 Zv(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&&H.isArray(i)?i.length:o,l?(H.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!H.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&H.isArray(i[o])&&(i[o]=JC(i[o])),!a)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(ZC(r),i,n,0)}),n}return null}function e5(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ga={transitional:Xv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=H.isObject(t);if(s&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(Zv(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 XC(t,this.formSerializer).toString();if((a=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Iu(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),e5(t)):t}],transformResponse:[function(t){const n=this.transitional||Ga.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.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"?je.from(a,je.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:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{Ga.headers[e]={}});const t5=H.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"]),n5=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[p0]=this[p0]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=vo(o);r[a]||(o5(i,o),r[a]=!0)}return H.isArray(t)?t.forEach(s):s(t),this}};Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Yt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});H.freezeMethods(Yt);function xc(e,t){const n=this||Ga,r=t||n,i=Yt.from(r.headers);let s=r.data;return H.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 oo(e,t,n){je.call(this,e==null?"canceled":e,je.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(oo,je,{__CANCEL__:!0});function e2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new je("Request failed with status code "+n.status,[je.ERR_BAD_REQUEST,je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function a5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function l5(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 u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;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),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function u5(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const tu=(e,t,n=3)=>{let r=0;const i=l5(50,250);return u5(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},v0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},b0=e=>(...t)=>H.asap(()=>e(...t)),c5=Lt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Lt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Lt.origin),Lt.navigator&&/(msie|trident)/i.test(Lt.navigator.userAgent)):()=>!0,d5=Lt.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),H.isString(r)&&o.push("path="+r),H.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 f5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function h5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function t2(e,t,n){let r=!f5(t);return e&&(r||n==!1)?h5(e,t):t}const x0=e=>e instanceof Yt?{...e}:e;function Hi(e,t){t=t||{};const n={};function r(u,c,d,f){return H.isPlainObject(u)&&H.isPlainObject(c)?H.merge.call({caseless:f},u,c):H.isPlainObject(c)?H.merge({},c):H.isArray(c)?c.slice():c}function i(u,c,d,f){if(H.isUndefined(c)){if(!H.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function s(u,c){if(!H.isUndefined(c))return r(void 0,c)}function o(u,c){if(H.isUndefined(c)){if(!H.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}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:(u,c,d)=>i(x0(u),x0(c),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);H.isUndefined(f)&&d!==a||(n[c]=f)}),n}const n2=e=>{const t=Hi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=Yt.from(o),t.url=Yv(t2(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(H.isFormData(n)){if(Lt.hasStandardBrowserEnv||Lt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Lt.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&c5(t.url))){const u=i&&s&&d5.read(s);u&&o.set(i,u)}return t},g5=typeof XMLHttpRequest!="undefined",y5=g5&&function(e){return new Promise(function(n,r){const i=n2(e);let s=i.data;const o=Yt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,y;function m(){h&&h(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const S=Yt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};e2(function(w){n(w),m()},function(w){r(w),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 je("Request aborted",je.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new je("Network Error",je.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Xv;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new je(C,x.clarifyTimeoutError?je.ETIMEDOUT:je.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&H.forEach(o.toJSON(),function(C,x){p.setRequestHeader(x,C)}),H.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),u&&([f,y]=tu(u,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=tu(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=S=>{p&&(r(!S||S.type?new oo(null,e,p):S),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=a5(i.url);if(b&&Lt.protocols.indexOf(b)===-1){r(new je("Unsupported protocol "+b+":",je.ERR_BAD_REQUEST,e));return}p.send(s||null)})},m5=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof je?c:new oo(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new je(`timeout ${t} of ms exceeded`,je.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>H.asap(a),l}},p5=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},v5=async function*(e,t){for await(const n of b5(e))yield*p5(n,t)},b5=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()}},w0=(e,t,n,r)=>{const i=v5(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r2=Ru&&typeof ReadableStream=="function",x5=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),i2=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},w5=r2&&i2(()=>{let e=!1;const t=new Request(Lt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),S0=64*1024,jd=r2&&i2(()=>H.isReadableStream(new Response("").body)),nu={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!nu[t]&&(nu[t]=H.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new je(`Response type '${t}' is not supported`,je.ERR_NOT_SUPPORT,r)})})})(new Response);const S5=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request(Lt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await x5(e)).byteLength},C5=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return n==null?S5(t):n},_5=Ru&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=n2(e);u=u?(u+"").toLowerCase():"text";let h=m5([i,s&&s.toAbortSignal()],o),y;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&w5&&n!=="get"&&n!=="head"&&(p=await C5(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(H.isFormData(r)&&(k=x.headers.get("content-type"))&&c.setContentType(k),x.body){const[w,_]=v0(p,tu(b0(l)));r=w0(x.body,S0,w,_)}}H.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;y=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(y,f);const S=jd&&(u==="stream"||u==="response");if(jd&&(a||S&&m)){const x={};["status","statusText","headers"].forEach(O=>{x[O]=b[O]});const k=H.toFiniteNumber(b.headers.get("content-length")),[w,_]=a&&v0(k,tu(b0(a),!0))||[];b=new Response(w0(b.body,S0,w,()=>{_&&_(),m&&m()}),x)}u=u||"text";let C=await nu[H.findKey(nu,u)||"text"](b,e);return!S&&m&&m(),await new Promise((x,k)=>{e2(x,k,{data:C,headers:Yt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:y})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new je("Network Error",je.ERR_NETWORK,e,y),{cause:v.cause||v}):je.from(v,v&&v.code,e,y)}}),Md={http:FC,xhr:y5,fetch:_5};H.forEach(Md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const C0=e=>`- ${e}`,k5=e=>H.isFunction(e)||e===null||e===!1,s2={getAdapter:e=>{e=H.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,!k5(n)&&(r=Md[(o=String(n)).toLowerCase()],r===void 0))throw new je(`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=Hi(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Fl.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:Fl.assertOptions(i,{encode:Vn.function,serialize:Vn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Fl.assertOptions(n,{baseUrl:Vn.spelling("baseURL"),withXsrfToken:Vn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&H.merge(s.common,s[n.method]);s&&H.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Yt.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 u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const y=[_0.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),f=y.length,c=Promise.resolve(n);d<f;)c=c.then(y[d++],y[d++]);return c}f=a.length;let h=n;for(d=0;d<f;){const y=a[d++],m=a[d++];try{h=y(h)}catch(p){m.call(this,p);break}}try{c=_0.call(this,h)}catch(y){return Promise.reject(y)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Hi(this.defaults,t);const n=t2(t.baseURL,t.url,t.allowAbsoluteUrls);return Yv(n,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Ni.prototype[t]=function(n,r){return this.request(Hi(r||{},{method:t,url:n,data:(r||{}).data}))}});H.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Hi(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Ni.prototype[t]=n(),Ni.prototype[t+"Form"]=n(!0)});let E5=class a2{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 oo(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 a2(function(i){t=i}),cancel:t}}};function A5(e){return function(n){return e.apply(null,n)}}function T5(e){return H.isObject(e)&&e.isAxiosError===!0}const $d={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($d).forEach(([e,t])=>{$d[t]=e});function l2(e){const t=new Ni(e),n=Nv(Ni.prototype.request,t);return H.extend(n,Ni.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return l2(Hi(e,i))},n}const ct=l2(Ga);ct.Axios=Ni;ct.CanceledError=oo;ct.CancelToken=E5;ct.isCancel=Jv;ct.VERSION=o2;ct.toFormData=Iu;ct.AxiosError=je;ct.Cancel=ct.CanceledError;ct.all=function(t){return Promise.all(t)};ct.spread=A5;ct.isAxiosError=T5;ct.mergeConfig=Hi;ct.AxiosHeaders=Yt;ct.formToJSON=e=>Zv(H.isHTMLForm(e)?new FormData(e):e);ct.getAdapter=s2.getAdapter;ct.HttpStatusCode=$d;ct.default=ct;const{Axios:$I,AxiosError:LI,CanceledError:DI,isCancel:II,CancelToken:RI,VERSION:NI,all:FI,Cancel:BI,isAxiosError:P5,spread:qI,toFormData:zI,AxiosHeaders:HI,HttpStatusCode:UI,formToJSON:GI,getAdapter:KI,mergeConfig:VI}=ct,j5={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};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 qt(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return tn(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,M={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,j){return k=P,w=0,_=e,M.n=j,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!j&&t<E.length;t++){var j,I=E[t],G=M.p,Y=I[2];R>3?(j=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((j=R<2&&G<I[1])?(w=0,M.v=P,M.n=I[1]):G<Y&&(j=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,M.n=Y,w=0))}if(j||R>1)return o;throw T=!0,P}return function(R,P,j){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,j),w=P,_=j;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(M.n=-1),B(w,_)):M.n=_:M.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=M.n<0)?_:S.call(C,M))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(tn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,tn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,tn(d,"constructor",u),tn(u,"constructor",l),l.displayName="GeneratorFunction",tn(u,i,"GeneratorFunction"),tn(d),tn(d,i,"Generator"),tn(d,r,function(){return this}),tn(d,"toString",function(){return"[object Generator]"}),(qt=function(){return{w:s,m:f}})()}function tn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}tn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){tn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},tn(e,t,n,r)}function O0(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 Fi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(n),!0).forEach(function(r){M5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M5(e,t,n){return(t=$5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $5(e){var t=L5(e,"string");return aa(t)=="symbol"?t:t+""}function L5(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 E0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function Ui(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){E0(s,r,i,o,a,"next",l)}function a(l){E0(s,r,i,o,a,"throw",l)}o(void 0)})}}var u2=function(){var t;return((t=j5)===null||t===void 0?void 0:t.VITE_MYYOAST_ACCESS_TOKEN)||""};function A0(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 D5="yst-insights-token",ao=ct.create({withCredentials:!0});ao.interceptors.request.use(function(){var e=Ui(qt().m(function t(n){var r,i;return qt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,R5();case 1:return r=s.v,s.n=2,d2();case 2:return i=s.v,n.headers=Fi(Fi(Fi({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},t)}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)},{synchronous:!1});ao.interceptors.response.use(function(e){return e},function(){var e=Ui(qt().m(function t(n){var r;return qt().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 At(e){return Ld.apply(this,arguments)}function Ld(){return Ld=Ui(qt().m(function e(t){var n;return qt().w(function(r){for(;;)switch(r.n){case 0:return n=Fi({},t),delete n.baseURL,r.a(2,ao.request(Fi(Fi({},n),{},{withCredentials:!0})))}},e)})),Ld.apply(this,arguments)}function c2(e){ao.defaults.baseURL=e}function T0(){return ao.defaults.baseURL}function I5(e){u2=e}var bo=null;function R5(){return Dd.apply(this,arguments)}function Dd(){return Dd=Ui(qt().m(function e(){var t,n,r,i,s;return qt().w(function(o){for(;;)switch(o.p=o.n){case 0:if(t=u2(),n=ao.defaults.baseURL,r=N5(t,n),i=sessionStorage.getItem(r),!i){o.n=4;break}if(o.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){o.n=2;break}return o.a(2,String(s.value));case 2:o.n=4;break;case 3:o.p=3,o.v;case 4:if(!bo){o.n=5;break}return o.a(2,bo);case 5:return bo=Ui(qt().m(function a(){var l,u,c,d,f;return qt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,d2();case 1:return l=h.v,h.n=2,ct.post(n+"/users/getToken",{},{headers:Fi({Authorization:"Bearer "+t},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(u=h.v,c=u.data,!(c!=null&&c.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:c.plainTextToken,validUntil:Date.parse(((d=c.accessToken)===null||d===void 0?void 0:d.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,c.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,f=h.v,ct.isAxiosError(f)?f.response?console.error("Login failed with status",f.response.status,f.response.data):f.request?console.error("Login request made but no response received",f.request):console.error("Error setting up login request",f.message):console.error("Non-Axios error during login",f);case 5:return h.p=5,bo=null,h.f(5);case 6:return h.a(2,"")}},a,null,[[0,4,5,6]])}))(),o.a(2,bo)}},e,null,[[1,3]])})),Dd.apply(this,arguments)}function N5(e,t){var n=Array.from(e+t).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return D5+":"+n}var xo=null;function d2(){return Id.apply(this,arguments)}function Id(){return Id=Ui(qt().m(function e(){var t;return qt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(T0()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(t=A0("XSRF-TOKEN"),!t){n.n=2;break}return n.a(2,decodeURIComponent(t));case 2:if(!xo){n.n=3;break}return n.a(2,xo);case 3:return xo=Ui(qt().m(function r(){var i;return qt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,ct.get(((i=T0())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(A0("XSRF-TOKEN")||""));case 2:return s.p=2,xo=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,xo)}},e)})),Id.apply(this,arguments)}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 P0(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 _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(n),!0).forEach(function(r){F5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F5(e,t,n){return(t=B5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B5(e){var t=q5(e,"string");return la(t)=="symbol"?t:t+""}function q5(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)}var z5=function(t,n){return At({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},If=function(t){return["/brands/".concat(t,"/analysis")]},H5=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:If(t),a=function(u){var c=u.signal;return z5(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function f2(e,t,n){var r=H5(e,t),i=di(r,n);return i.queryKey=r.queryKey,i}var U5=function(t,n,r){return At({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},ir=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},G5=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:ir(t,n),l=function(c){var d=c.signal;return U5(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function Fu(e,t,n,r){var i=G5(e,t,n),s=di(i,r);return s.queryKey=i.queryKey,s}var K5=function(t,n){return At({url:"/brands/".concat(t,"/analysis/").concat(n),method:"DELETE"})},V5=function(t){var n=["deleteSingleAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.analysisId;return K5(u,c)};return _e({mutationFn:s},i)},W5=function(t,n){var r=V5(t);return Mr(r,n)},Q5=function(t,n,r){return At({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},Sr=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},Y5=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:Sr(t,n),l=function(c){var d=c.signal;return Q5(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function X5(e,t,n,r){var i=Y5(e,t,n),s=di(i,r);return s.queryKey=i.queryKey,s}var Z5=function(t){return At({url:"/users/logout",method:"POST",signal:t})},J5=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return Z5()};return _e({mutationFn:s},i)},e4=function(t,n){var r=J5(t);return Mr(r,n)},t4=function(t,n){return At({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},ru=function(t){return["/brands/".concat(t,"/associated-brands")]},n4=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:ru(t),a=function(u){var c=u.signal;return t4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function r4(e,t,n){var r=n4(e,t),i=di(r,n);return i.queryKey=r.queryKey,i}var i4=function(t,n,r){return At({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},s4=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return i4(u,c)};return _e({mutationFn:s},i)},h2=function(t,n){var r=s4(t);return Mr(r,n)},o4=function(t,n){return At({url:"/brands/".concat(t,"/associated-brand-groups/").concat(n),method:"DELETE"})},a4=function(t){var n=["deleteBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.brandGroupId;return o4(u,c)};return _e({mutationFn:s},i)},l4=function(t,n){var r=a4(t);return Mr(r,n)},u4=function(t){return At({url:"/brands",method:"GET",signal:t})},rr=function(){return["/brands"]},c4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:rr(),o=function(l){var u=l.signal;return u4(u)};return _e({queryKey:s,queryFn:o},i)};function Ji(e,t){var n=c4(e),r=di(n,t);return r.queryKey=n.queryKey,r}var d4=function(t,n){return At({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},f4=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.data;return d4(u)};return _e({mutationFn:s},i)},h4=function(t,n){var r=f4(t);return Mr(r,n)},g4=function(t,n){return At({url:"/brands/".concat(t),method:"GET",signal:n})},Bu=function(t){return["/brands/".concat(t)]},y4=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:Bu(t),a=function(u){var c=u.signal;return g4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function iu(e,t,n){var r=y4(e,t),i=di(r,n);return i.queryKey=r.queryKey,i}var m4=function(t){return At({url:"/brands/".concat(t),method:"DELETE"})},p4=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId;return m4(u)};return _e({mutationFn:s},i)},v4=function(t,n){var r=p4(t);return Mr(r,n)},b4=function(t,n){return At({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},x4=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return b4(u,c)};return _e({mutationFn:s},i)},g2=function(t,n){var r=x4(t);return Mr(r,n)},w4=function(t,n){return At({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},S4=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return w4(u,c)};return _e({mutationFn:s},i)},C4=function(t,n){var r=S4(t);return Mr(r,n)},_4=function(t,n){return At({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},k4=function(t){return["/brands/".concat(t,"/query-suggestions")]},O4=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:k4(t),a=function(u){var c=u.signal;return _4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function E4(e,t,n){var r=O4(e,t),i=di(r,n);return i.queryKey=r.queryKey,i}var A4=function(t){return At({url:"/users/current",method:"GET",signal:t})},qu=function(){return["/users/current"]},T4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:qu(),o=function(l){var u=l.signal;return A4(u)};return _e({queryKey:s,queryFn:o},i)};function zu(e,t){var n=T4(e),r=di(n,t);return r.queryKey=n.queryKey,r}var P4=function(){return At({url:"/users/data",method:"DELETE"})},j4=function(t){var n=["deleteUserData"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return P4()};return _e({mutationFn:s},i)},M4=function(t,n){var r=j4(t);return Mr(r,n)},y2=F.createContext(void 0),$4=function(t){var n,r,i,s,o,a,l,u,c=t.children,d=t.brandId,f=t.analysisId,h=t.model,y=t.hostAppProps,m=y===void 0?{}:y,p=sl("/brands/:brandId"),v=sl("/brands/:brandId/*"),b=sl("/brands/:brandId/analysis/:analysisId"),S=sl("/brands/:brandId/analysis/:analysisId/*"),C=(b==null||(n=b.params)===null||n===void 0?void 0:n.brandId)||(S==null||(r=S.params)===null||r===void 0?void 0:r.brandId)||(v==null||(i=v.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),x=b!=null&&(o=b.params)!==null&&o!==void 0&&o.analysisId||S!=null&&(a=S.params)!==null&&a!==void 0&&a.analysisId?Number((b==null||(l=b.params)===null||l===void 0?void 0:l.analysisId)||(S==null||(u=S.params)===null||u===void 0?void 0:u.analysisId)):void 0,k=F.useMemo(function(){return{brandId:C||d||"",analysisId:x||f||"latest",model:h||"openai",hostAppProps:m}},[C,d,x,f,h,m]),w=F.useMemo(function(){return{data:k}},[k]);return g.jsx(y2.Provider,{value:w,children:c})},m2=F.createContext(void 0),L4=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=F.useCallback(function(d){r(d),i("latest")},[r,i]),a=F.useCallback(function(d){i(d)},[i]),l=F.useCallback(function(d){s(d)},[s]),u=F.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),c=F.useMemo(function(){return{mutations:u}},[u]);return g.jsx(m2.Provider,{value:c,children:n})};function Sc(e,t){return N4(e)||R4(e,t)||I4(e,t)||D4()}function D4(){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=qt(),f;if(t){let b=typeof t=="string"?Xi(t):t;ut(u==="/"||((v=b.pathname)==null?void 0:v.startsWith(u)),`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 "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),f=b}else f=d;let h=f.pathname||"/",y=h;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=Pp(e,{pathname:y});Mn(c||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Mn(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=sw(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:_r([u,i.encodeLocation?i.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:_r([u,i.encodeLocation?i.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n,r);return t&&p?D.createElement(Ha.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},p):p}function tw(){let e=cw(),t=Kx(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=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:s},"ErrorBoundary")," or"," ",D.createElement("code",{style:s},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},t),n?D.createElement("pre",{style:i},n):null,o)}var nw=D.createElement(tw,null),rw=class extends D.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?D.createElement($n.Provider,{value:this.props.routeContext},D.createElement(Of.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function iw({routeContext:e,match:t,children:n}){let r=D.useContext(no);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement($n.Provider,{value:e},n)}function sw(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(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);ut(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 u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:d}=n,f=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!d||d[u.route.id]===void 0);if(u.route.lazy||f){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,u,c)=>{let d,f=!1,h=null,y=null;n&&(d=s&&u.route.id?s[u.route.id]:void 0,h=u.route.errorElement||nw,o&&(a<0&&c===0?(Fp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,y=null):a===c&&(f=!0,y=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),p=()=>{let v;return d?v=h:f?v=y:u.route.Component?v=D.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=l,D.createElement(iw,{match:u,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?D.createElement(rw,{location:n.location,revalidation:n.revalidation,component:h,error:d,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}function Ef(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ow(e){let t=D.useContext(no);return ut(t,Ef(e)),t}function aw(e){let t=D.useContext(Ou);return ut(t,Ef(e)),t}function lw(e){let t=D.useContext($n);return ut(t,Ef(e)),t}function Af(e){let t=lw(e),n=t.matches[t.matches.length-1];return ut(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function uw(){return Af("useRouteId")}function cw(){var r;let e=D.useContext(Of),t=aw("useRouteError"),n=Af("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function dw(){let{router:e}=ow("useNavigate"),t=Af("useNavigate"),n=D.useRef(!1);return Rp(()=>{n.current=!0}),D.useCallback(async(i,s={})=>{Mn(n.current,Ip),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var Wh={};function Fp(e,t,n){!t&&!Wh[e]&&(Wh[e]=!0,Mn(!1,n))}D.memo(fw);function fw({routes:e,future:t,state:n}){return Np(e,void 0,n,t)}function hw({basename:e,children:t,initialEntries:n,initialIndex:r}){let i=D.useRef();i.current==null&&(i.current=kx({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[o,a]=D.useState({action:s.action,location:s.location}),l=D.useCallback(u=>{D.startTransition(()=>a(u))},[a]);return D.useLayoutEffect(()=>s.listen(l),[s,l]),D.createElement(gw,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}function _i({to:e,replace:t,state:n,relative:r}){ut(Zi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=D.useContext(Hn);Mn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=D.useContext($n),{pathname:o}=qt(),a=xn(),l=kf(e,_f(s),o,r==="path"),u=JSON.stringify(l);return D.useEffect(()=>{a(JSON.parse(u),{replace:t,state:n,relative:r})},[a,u,r,t,n]),null}function Ws(e){return Jx(e.context)}function At(e){ut(!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 gw({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){ut(!Zi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=D.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Xi(n));let{pathname:l="/",search:u="",hash:c="",state:d=null,key:f="default"}=n,h=D.useMemo(()=>{let y=Ar(l,o);return y==null?null:{location:{pathname:y,search:u,hash:c,state:d,key:f},navigationType:r}},[o,l,u,c,d,f,r]);return Mn(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:D.createElement(Hn.Provider,{value:a},D.createElement(Ha.Provider,{children:t,value:h}))}function yw({children:e,location:t}){return ew(id(e),t)}function id(e,t=[]){let n=[];return D.Children.forEach(e,(r,i)=>{if(!D.isValidElement(r))return;let s=[...t,i];if(r.type===D.Fragment){n.push.apply(n,id(r.props.children,s));return}ut(r.type===At,`[${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>`),ut(!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=id(r.props.children,s)),n.push(o)}),n}var Dl="get",Il="application/x-www-form-urlencoded";function Au(e){return e!=null&&typeof e.tagName=="string"}function mw(e){return Au(e)&&e.tagName.toLowerCase()==="button"}function pw(e){return Au(e)&&e.tagName.toLowerCase()==="form"}function vw(e){return Au(e)&&e.tagName.toLowerCase()==="input"}function bw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xw(e,t){return e.button===0&&(!t||t==="_self")&&!bw(e)}var al=null;function ww(){if(al===null)try{new FormData(document.createElement("form"),0),al=!1}catch(e){al=!0}return al}var Sw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gc(e){return e!=null&&!Sw.has(e)?(Mn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Il}"`),null):e}function Cw(e,t){let n,r,i,s,o;if(pw(e)){let a=e.getAttribute("action");r=a?Ar(a,t):null,n=e.getAttribute("method")||Dl,i=gc(e.getAttribute("enctype"))||Il,s=new FormData(e)}else if(mw(e)||vw(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?Ar(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Dl,i=gc(e.getAttribute("formenctype"))||gc(a.getAttribute("enctype"))||Il,s=new FormData(a,e),!ww()){let{name:u,type:c,value:d}=e;if(c==="image"){let f=u?`${u}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else u&&s.append(u,d)}}else{if(Au(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Dl,r=null,i=Il,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function Tf(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}async function _w(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 kw(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 Ow(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await _w(s,n);return o.links?o.links():[]}return[]}));return Pw(r.flat(1).filter(kw).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Qh(e,t,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?t.filter((l,u)=>{var d;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))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 Ew(e,t,{includeHydrateFallback:n}={}){return Aw(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 Aw(e){return[...new Set(e)]}function Tw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Pw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(Tw(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var jw=new Set([100,101,204,205]);function Mw(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&&Ar(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function Bp(){let e=D.useContext(no);return Tf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function $w(){let e=D.useContext(Ou);return Tf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pf=D.createContext(void 0);Pf.displayName="FrameworkContext";function qp(){let e=D.useContext(Pf);return Tf(e,"You must render this element inside a <HydratedRouter> element"),e}function Lw(e,t){let n=D.useContext(Pf),[r,i]=D.useState(!1),[s,o]=D.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=D.useRef(null);D.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]),D.useEffect(()=>{if(r){let m=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(m)}}},[r]);let h=()=>{i(!0)},y=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:po(a,h),onBlur:po(l,y),onMouseEnter:po(u,h),onMouseLeave:po(c,y),onTouchStart:po(d,h)}]:[!1,f,{}]}function po(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Dw({page:e,...t}){let{router:n}=Bp(),r=D.useMemo(()=>Pp(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?D.createElement(Rw,{page:e,matches:r,...t}):null}function Iw(e){let{manifest:t,routeModules:n}=qp(),[r,i]=D.useState([]);return D.useEffect(()=>{let s=!1;return Ow(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function Rw({page:e,matches:t,...n}){let r=qt(),{manifest:i,routeModules:s}=qp(),{basename:o}=Bp(),{loaderData:a,matches:l}=$w(),u=D.useMemo(()=>Qh(e,t,l,i,r,"data"),[e,t,l,i,r]),c=D.useMemo(()=>Qh(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=D.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,m=!1;if(t.forEach(v=>{var S;let b=i.routes[v.route.id];!b||!b.hasLoader||(!u.some(C=>C.route.id===v.route.id)&&v.route.id in a&&((S=s[v.route.id])!=null&&S.shouldRevalidate)||b.hasClientLoader?m=!0:y.add(v.route.id))}),y.size===0)return[];let p=Mw(e,o);return m&&y.size>0&&p.searchParams.set("_routes",t.filter(v=>y.has(v.route.id)).map(v=>v.route.id).join(",")),[p.pathname+p.search]},[o,a,r,i,u,t,e,s]),f=D.useMemo(()=>Ew(c,i),[c,i]),h=Iw(c);return D.createElement(D.Fragment,null,d.map(y=>D.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),f.map(y=>D.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),h.map(({key:y,link:m})=>D.createElement("link",{key:y,...m})))}function Nw(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var zp=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";try{zp&&(window.__reactRouterVersion="7.6.3")}catch(e){}var Hp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,di=D.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d,...f},h){let{basename:y}=D.useContext(Hn),m=typeof u=="string"&&Hp.test(u),p,v=!1;if(typeof u=="string"&&m&&(p=u,zp))try{let O=new URL(window.location.href),A=u.startsWith("//")?new URL(O.protocol+u):new URL(u),T=Ar(A.pathname,y);A.origin===O.origin&&T!=null?u=T+A.search+A.hash:v=!0}catch(O){Mn(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let b=Yx(u,{relative:i}),[S,C,x]=Lw(r,f),k=zw(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:d});function w(O){t&&t(O),O.defaultPrevented||k(O)}let _=D.createElement("a",{...f,...x,href:p||b,onClick:v||s?t:w,ref:Nw(h,C),target:l,"data-discover":!m&&n==="render"?"true":void 0});return S&&!m?D.createElement(D.Fragment,null,_,D.createElement(Dw,{page:b})):_});di.displayName="Link";var Fw=D.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},c){let d=Ua(o,{relative:u.relative}),f=qt(),h=D.useContext(Ou),{navigator:y,basename:m}=D.useContext(Hn),p=h!=null&&Vw(d)&&a===!0,v=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,b=f.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(b=b.toLowerCase(),S=S?S.toLowerCase():null,v=v.toLowerCase()),S&&m&&(S=Ar(S,m)||S);const C=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let x=b===v||!i&&b.startsWith(v)&&b.charAt(C)==="/",k=S!=null&&(S===v||!i&&S.startsWith(v)&&S.charAt(v.length)==="/"),w={isActive:x,isPending:k,isTransitioning:p},_=x?t:void 0,O;typeof r=="function"?O=r(w):O=[r,x?"active":null,k?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let A=typeof s=="function"?s(w):s;return D.createElement(di,{...u,"aria-current":_,className:O,ref:c,style:A,to:o,viewTransition:a},typeof l=="function"?l(w):l)});Fw.displayName="NavLink";var Bw=D.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Dl,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:d,...f},h)=>{let y=Gw(),m=Kw(a,{relative:u}),p=o.toLowerCase()==="get"?"get":"post",v=typeof a=="string"&&Hp.test(a),b=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let C=S.nativeEvent.submitter,x=(C==null?void 0:C.getAttribute("formmethod"))||o;y(C||S.currentTarget,{fetcherKey:t,method:x,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d})};return D.createElement("form",{ref:h,method:p,action:m,onSubmit:r?l:b,...f,"data-discover":!v&&e==="render"?"true":void 0})});Bw.displayName="Form";function qw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Up(e){let t=D.useContext(no);return ut(t,qw(e)),t}function zw(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=xn(),l=qt(),u=Ua(e,{relative:s});return D.useCallback(c=>{if(xw(c,t)){c.preventDefault();let d=n!==void 0?n:Vl(l)===Vl(u);a(e,{replace:d,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,u,n,r,t,e,i,s,o])}var Hw=0,Uw=()=>`__${String(++Hw)}__`;function Gw(){let{router:e}=Up("useSubmit"),{basename:t}=D.useContext(Hn),n=uw();return D.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:u}=Cw(r,t);if(i.navigate===!1){let c=i.fetcherKey||Uw();await e.fetch(c,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,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 Kw(e,{relative:t}={}){let{basename:n}=D.useContext(Hn),r=D.useContext($n);ut(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Ua(e||".",{relative:t})},o=qt();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:_r([n,s.pathname])),Vl(s)}function Vw(e,t={}){let n=D.useContext(Dp);ut(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Up("useViewTransitionState"),i=Ua(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Ar(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ar(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Vs(i.pathname,o)!=null||Vs(i.pathname,s)!=null}[...jw];var ro=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(){}},zi=typeof window=="undefined"||"Deno"in globalThis;function Ft(){}function Ww(e,t){return typeof e=="function"?e(t):e}function sd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Gp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ni(e,t){return typeof e=="function"?e(t):e}function En(e,t){return typeof e=="function"?e(t):e}function Yh(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==jf(o,t.options))return!1}else if(!ea(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 Xh(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Hi(t.options.mutationKey)!==Hi(s))return!1}else if(!ea(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function jf(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hi)(e)}function Hi(e){return JSON.stringify(e,(t,n)=>ad(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ea(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ea(e[n],t[n])):!1}function od(e,t){if(e===t)return e;const n=Zh(e)&&Zh(t);if(n||ad(e)&&ad(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 u=0;for(let c=0;c<o;c++){const d=n?c:s[c];(!n&&l.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=od(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return i===o&&u===i?e:a}return t}function Wl(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 ad(e){if(!Jh(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Jh(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Jh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Qw(e){return new Promise(t=>{setTimeout(t,e)})}function ld(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 od(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 od(e,t)}return t}function Yw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Xw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ql=Symbol();function Kp(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Ql&&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===Ql?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vp(e,t){return typeof e=="function"?e(...t):!!e}var Ai,zr,xs,mp,Zw=(mp=class extends ro{constructor(){super();le(this,Ai);le(this,zr);le(this,xs);te(this,xs,t=>{if(!zi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){$(this,zr)||this.setEventListener($(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,zr))==null||t.call(this),te(this,zr,void 0))}setEventListener(t){var n;te(this,xs,t),(n=$(this,zr))==null||n.call(this),te(this,zr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Ai)!==t&&(te(this,Ai,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof $(this,Ai)=="boolean"?$(this,Ai):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ai=new WeakMap,zr=new WeakMap,xs=new WeakMap,mp),Mf=new Zw,ws,Hr,Ss,pp,Jw=(pp=class extends ro{constructor(){super();le(this,ws,!0);le(this,Hr);le(this,Ss);te(this,Ss,t=>{if(!zi&&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(){$(this,Hr)||this.setEventListener($(this,Ss))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Hr))==null||t.call(this),te(this,Hr,void 0))}setEventListener(t){var n;te(this,Ss,t),(n=$(this,Hr))==null||n.call(this),te(this,Hr,t(this.setOnline.bind(this)))}setOnline(t){$(this,ws)!==t&&(te(this,ws,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,ws)}},ws=new WeakMap,Hr=new WeakMap,Ss=new WeakMap,pp),Qs=new Jw;function ud(){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 e3(e){return Math.min(1e3*2**e,3e4)}function Wp(e){return(e!=null?e:"online")==="online"?Qs.isOnline():!0}var Qp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yc(e){return e instanceof Qp}function Yp(e){let t=!1,n=0,r=!1,i;const s=ud(),o=m=>{var p;r||(f(new Qp(m)),(p=e.abort)==null||p.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Mf.isFocused()&&(e.networkMode==="always"||Qs.isOnline())&&e.canRun(),c=()=>Wp(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||u())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),y=()=>{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 k,w,_;if(r)return;const b=(k=e.retry)!=null?k:zi?0:3,S=(w=e.retryDelay)!=null?w:e3,C=typeof S=="function"?S(n,v):S,x=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!x){f(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),Qw(C).then(()=>u()?void 0:h()).then(()=>{t?f(v):y()})})};return{promise:s,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?y():h().then(y),s)}}var t3=e=>setTimeout(e,0);function n3(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=t3;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 vt=n3(),Ti,vp,Xp=(vp=class{constructor(){le(this,Ti)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sd(this.gcTime)&&te(this,Ti,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e!=null?e:zi?1/0:5*60*1e3)}clearGcTimeout(){$(this,Ti)&&(clearTimeout($(this,Ti)),te(this,Ti,void 0))}},Ti=new WeakMap,vp),Cs,Pi,On,ji,Tt,Ta,Mi,Rn,gr,bp,r3=(bp=class extends Xp{constructor(t){var n;super();le(this,Rn);le(this,Cs);le(this,Pi);le(this,On);le(this,ji);le(this,Tt);le(this,Ta);le(this,Mi);te(this,Mi,!1),te(this,Ta,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,ji,t.client),te(this,On,$(this,ji).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,Cs,i3(this.options)),this.state=(n=t.state)!=null?n:$(this,Cs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=$(this,Tt))==null?void 0:t.promise}setOptions(t){this.options={...$(this,Ta),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,On).remove(this)}setData(t,n){const r=ld(this.state.data,t,this.options);return De(this,Rn,gr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){De(this,Rn,gr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=$(this,Tt))==null?void 0:r.promise;return(i=$(this,Tt))==null||i.cancel(t),n?n.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState($(this,Cs))}isActive(){return this.observers.some(t=>En(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ql||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ni(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:!Gp(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=$(this,Tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,On).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||($(this,Tt)&&($(this,Mi)?$(this,Tt).cancel({revert:!0}):$(this,Tt).cancelRetry()),this.scheduleGc()),$(this,On).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||De(this,Rn,gr).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if($(this,Tt))return $(this,Tt).continueRetry(),$(this,Tt).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:()=>(te(this,Mi,!0),r.signal)})},s=()=>{const f=Kp(this.options,n),y=(()=>{const m={client:$(this,ji),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return te(this,Mi,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:$(this,ji),state:this.state,fetchFn:s};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),te(this,Pi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&De(this,Rn,gr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,y,m,p;yc(f)&&f.silent||De(this,Rn,gr).call(this,{type:"error",error:f}),yc(f)||((y=(h=$(this,On).config).onError)==null||y.call(h,f,this),(p=(m=$(this,On).config).onSettled)==null||p.call(m,this.state.data,f,this)),this.scheduleGc()};return te(this,Tt,Yp({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,y,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}(y=(h=$(this,On).config).onSuccess)==null||y.call(h,f,this),(p=(m=$(this,On).config).onSettled)==null||p.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{De(this,Rn,gr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{De(this,Rn,gr).call(this,{type:"pause"})},onContinue:()=>{De(this,Rn,gr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),$(this,Tt).start()}},Cs=new WeakMap,Pi=new WeakMap,On=new WeakMap,ji=new WeakMap,Tt=new WeakMap,Ta=new WeakMap,Mi=new WeakMap,Rn=new WeakSet,gr=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,...Zp(r.data,this.options),fetchMeta:(i=t.meta)!=null?i:null};case"success":return te(this,Pi,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 yc(o)&&o.revert&&$(this,Pi)?{...$(this,Pi),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),vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,On).notify({query:this,type:"updated",action:t})})},bp);function Zp(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Wp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function i3(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 er,xp,s3=(xp=class extends ro{constructor(t={}){super();le(this,er);this.config=t,te(this,er,new Map)}build(t,n,r){var a;const i=n.queryKey,s=(a=n.queryHash)!=null?a:jf(i,n);let o=this.get(s);return o||(o=new r3({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){$(this,er).has(t.queryHash)||($(this,er).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=$(this,er).get(t.queryHash);n&&(t.destroy(),n===t&&$(this,er).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,er).get(t)}getAll(){return[...$(this,er).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yh(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yh(t,r)):n}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},er=new WeakMap,xp),tr,Rt,$i,nr,Br,wp,o3=(wp=class extends Xp{constructor(t){super();le(this,nr);le(this,tr);le(this,Rt);le(this,$i);this.mutationId=t.mutationId,te(this,Rt,t.mutationCache),te(this,tr,[]),this.state=t.state||Jp(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,tr).includes(t)||($(this,tr).push(t),this.clearGcTimeout(),$(this,Rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,tr,$(this,tr).filter(n=>n!==t)),this.scheduleGc(),$(this,Rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,tr).length||(this.state.status==="pending"?this.scheduleGc():$(this,Rt).remove(this))}continue(){var t,n;return(n=(t=$(this,$i))==null?void 0:t.continue())!=null?n:this.execute(this.state.variables)}async execute(t){var s,o,a,l,u,c,d,f,h,y,m,p,v,b,S,C,x,k,w,_,O;const n=()=>{De(this,nr,Br).call(this,{type:"continue"})};te(this,$i,Yp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(A,T)=>{De(this,nr,Br).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{De(this,nr,Br).call(this,{type:"pause"})},onContinue:n,retry:(s=this.options.retry)!=null?s:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,Rt).canRun(this)}));const r=this.state.status==="pending",i=!$(this,$i).canStart();try{if(r)n();else{De(this,nr,Br).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=$(this,Rt).config).onMutate)==null?void 0:a.call(o,t,this));const T=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t));T!==this.state.context&&De(this,nr,Br).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const A=await $(this,$i).start();return await((d=(c=$(this,Rt).config).onSuccess)==null?void 0:d.call(c,A,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,A,t,this.state.context)),await((m=(y=$(this,Rt).config).onSettled)==null?void 0:m.call(y,A,null,this.state.variables,this.state.context,this)),await((v=(p=this.options).onSettled)==null?void 0:v.call(p,A,null,t,this.state.context)),De(this,nr,Br).call(this,{type:"success",data:A}),A}catch(A){try{throw await((S=(b=$(this,Rt).config).onError)==null?void 0:S.call(b,A,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,A,t,this.state.context)),await((w=(k=$(this,Rt).config).onSettled)==null?void 0:w.call(k,void 0,A,this.state.variables,this.state.context,this)),await((O=(_=this.options).onSettled)==null?void 0:O.call(_,void 0,A,t,this.state.context)),A}finally{De(this,nr,Br).call(this,{type:"error",error:A})}}finally{$(this,Rt).runNext(this)}}},tr=new WeakMap,Rt=new WeakMap,$i=new WeakMap,nr=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),vt.batch(()=>{$(this,tr).forEach(r=>{r.onMutationUpdate(t)}),$(this,Rt).notify({mutation:this,type:"updated",action:t})})},wp);function Jp(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var br,Nn,Pa,Sp,a3=(Sp=class extends ro{constructor(t={}){super();le(this,br);le(this,Nn);le(this,Pa);this.config=t,te(this,br,new Set),te(this,Nn,new Map),te(this,Pa,0)}build(t,n,r){const i=new o3({mutationCache:this,mutationId:++sl(this,Pa)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){$(this,br).add(t);const n=ll(t);if(typeof n=="string"){const r=$(this,Nn).get(n);r?r.push(t):$(this,Nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,br).delete(t)){const n=ll(t);if(typeof n=="string"){const r=$(this,Nn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&$(this,Nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ll(t);if(typeof n=="string"){const r=$(this,Nn).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=ll(t);if(typeof n=="string"){const s=(r=$(this,Nn).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(){vt.batch(()=>{$(this,br).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,br).clear(),$(this,Nn).clear()})}getAll(){return Array.from($(this,br))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xh(n,r))}findAll(t={}){return this.getAll().filter(n=>Xh(t,n))}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ft))))}},br=new WeakMap,Nn=new WeakMap,Pa=new WeakMap,Sp);function ll(e){var t;return(t=e.options.scope)==null?void 0:t.id}function e0(e){return{onFetch:(t,n)=>{var c,d,f,h,y;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{var S;let m=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=Kp(t.options,t.fetchOptions),b=async(C,x,k)=>{if(m)return Promise.reject();if(x==null&&C.pages.length)return Promise.resolve(C);const _=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:x,direction:k?"backward":"forward",meta:t.options.meta};return p(j),j})(),O=await v(_),{maxPages:A}=t.options,T=k?Xw:Yw;return{pages:T(C.pages,O,A),pageParams:T(C.pageParams,x,A)}};if(i&&s.length){const C=i==="backward",x=C?l3:t0,k={pages:s,pageParams:o},w=x(r,k);a=await b(k,w,C)}else{const C=e!=null?e:s.length;do{const x=l===0?(S=o[0])!=null?S:r.initialPageParam:t0(r,a);if(l>0&&x==null)break;a=await b(a,x),l++}while(l<C)}return a};t.options.persister?t.fetchFn=()=>{var m,p;return(p=(m=t.options).persister)==null?void 0:p.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function t0(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 l3(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 gt,Ur,Gr,_s,ks,Kr,Os,Es,Cp,u3=(Cp=class{constructor(e={}){le(this,gt);le(this,Ur);le(this,Gr);le(this,_s);le(this,ks);le(this,Kr);le(this,Os);le(this,Es);te(this,gt,e.queryCache||new s3),te(this,Ur,e.mutationCache||new a3),te(this,Gr,e.defaultOptions||{}),te(this,_s,new Map),te(this,ks,new Map),te(this,Kr,0)}mount(){sl(this,Kr)._++,$(this,Kr)===1&&(te(this,Os,Mf.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,gt).onFocus())})),te(this,Es,Qs.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,gt).onOnline())})))}unmount(){var e,t;sl(this,Kr)._--,$(this,Kr)===0&&((e=$(this,Os))==null||e.call(this),te(this,Os,void 0),(t=$(this,Es))==null||t.call(this),te(this,Es,void 0))}isFetching(e){return $(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ur).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,gt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=$(this,gt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ni(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,gt).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=$(this,gt).get(r.queryHash),s=i==null?void 0:i.state.data,o=Ww(t,s);if(o!==void 0)return $(this,gt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return vt.batch(()=>$(this,gt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=$(this,gt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=$(this,gt);vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=$(this,gt);return vt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=vt.batch(()=>$(this,gt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ft).catch(Ft)}invalidateQueries(e,t={}){return vt.batch(()=>{var n,r;return $(this,gt).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=vt.batch(()=>$(this,gt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ft)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=$(this,gt).build(this,t);return n.isStaleByTime(ni(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ft).catch(Ft)}fetchInfiniteQuery(e){return e.behavior=e0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ft).catch(Ft)}ensureInfiniteQueryData(e){return e.behavior=e0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qs.isOnline()?$(this,Ur).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,gt)}getMutationCache(){return $(this,Ur)}getDefaultOptions(){return $(this,Gr)}setDefaultOptions(e){te(this,Gr,e)}setQueryDefaults(e,t){$(this,_s).set(Hi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,_s).values()],n={};return t.forEach(r=>{ea(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){$(this,ks).set(Hi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,ks).values()],n={};return t.forEach(r=>{ea(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Gr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jf(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===Ql&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Gr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,gt).clear(),$(this,Ur).clear()}},gt=new WeakMap,Ur=new WeakMap,Gr=new WeakMap,_s=new WeakMap,ks=new WeakMap,Kr=new WeakMap,Os=new WeakMap,Es=new WeakMap,Cp),Ut,qe,ja,Nt,Li,As,Vr,Wr,Ma,Ts,Ps,Di,Ii,Qr,js,Xe,$o,cd,dd,fd,hd,gd,yd,md,ev,_p,c3=(_p=class extends ro{constructor(t,n){super();le(this,Xe);le(this,Ut);le(this,qe);le(this,ja);le(this,Nt);le(this,Li);le(this,As);le(this,Vr);le(this,Wr);le(this,Ma);le(this,Ts);le(this,Ps);le(this,Di);le(this,Ii);le(this,Qr);le(this,js,new Set);this.options=n,te(this,Ut,t),te(this,Wr,null),te(this,Vr,ud()),this.options.experimental_prefetchInRender||$(this,Vr).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&&($(this,qe).addObserver(this),n0($(this,qe),this.options)?De(this,Xe,$o).call(this):this.updateResult(),De(this,Xe,hd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pd($(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pd($(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,De(this,Xe,gd).call(this),De(this,Xe,yd).call(this),$(this,qe).removeObserver(this)}setOptions(t){const n=this.options,r=$(this,qe);if(this.options=$(this,Ut).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof En(this.options.enabled,$(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");De(this,Xe,md).call(this),$(this,qe).setOptions(this.options),n._defaulted&&!Wl(this.options,n)&&$(this,Ut).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,qe),observer:this});const i=this.hasListeners();i&&r0($(this,qe),r,this.options,n)&&De(this,Xe,$o).call(this),this.updateResult(),i&&($(this,qe)!==r||En(this.options.enabled,$(this,qe))!==En(n.enabled,$(this,qe))||ni(this.options.staleTime,$(this,qe))!==ni(n.staleTime,$(this,qe)))&&De(this,Xe,cd).call(this);const s=De(this,Xe,dd).call(this);i&&($(this,qe)!==r||En(this.options.enabled,$(this,qe))!==En(n.enabled,$(this,qe))||s!==$(this,Qr))&&De(this,Xe,fd).call(this,s)}getOptimisticResult(t){const n=$(this,Ut).getQueryCache().build($(this,Ut),t),r=this.createResult(n,t);return f3(this,r)&&(te(this,Nt,r),te(this,As,this.options),te(this,Li,$(this,qe).state)),r}getCurrentResult(){return $(this,Nt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){$(this,js).add(t)}getCurrentQuery(){return $(this,qe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=$(this,Ut).defaultQueryOptions(t),r=$(this,Ut).getQueryCache().build($(this,Ut),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return De(this,Xe,$o).call(this,{...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),$(this,Nt)))}createResult(t,n){var O;const r=$(this,qe),i=this.options,s=$(this,Nt),o=$(this,Li),a=$(this,As),u=t!==r?t.state:$(this,ja),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const A=this.hasListeners(),T=!A&&n0(t,n),j=A&&r0(t,r,n,i);(T||j)&&(d={...d,...Zp(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:m,status:p}=d;h=d.data;let v=!1;if(n.placeholderData!==void 0&&h===void 0&&p==="pending"){let A;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(A=s.data,v=!0):A=typeof n.placeholderData=="function"?n.placeholderData((O=$(this,Ps))==null?void 0:O.state.data,$(this,Ps)):n.placeholderData,A!==void 0&&(p="success",h=ld(s==null?void 0:s.data,A,n),f=!0)}if(n.select&&h!==void 0&&!v)if(s&&h===(o==null?void 0:o.data)&&n.select===$(this,Ma))h=$(this,Ts);else try{te(this,Ma,n.select),h=n.select(h),h=ld(s==null?void 0:s.data,h,n),te(this,Ts,h),te(this,Wr,null)}catch(A){te(this,Wr,A)}$(this,Wr)&&(y=$(this,Wr),h=$(this,Ts),m=Date.now(),p="error");const b=d.fetchStatus==="fetching",S=p==="pending",C=p==="error",x=S&&b,k=h!==void 0,_={status:p,fetchStatus:d.fetchStatus,isPending:S,isSuccess:p==="success",isError:C,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!S,isLoadingError:C&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:C&&k,isStale:$f(t,n),refetch:this.refetch,promise:$(this,Vr),isEnabled:En(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=B=>{_.status==="error"?B.reject(_.error):_.data!==void 0&&B.resolve(_.data)},T=()=>{const B=te(this,Vr,_.promise=ud());A(B)},j=$(this,Vr);switch(j.status){case"pending":t.queryHash===r.queryHash&&A(j);break;case"fulfilled":(_.status==="error"||_.data!==j.value)&&T();break;case"rejected":(_.status!=="error"||_.error!==j.reason)&&T();break}}return _}updateResult(){const t=$(this,Nt),n=this.createResult($(this,qe),this.options);if(te(this,Li,$(this,qe).state),te(this,As,this.options),$(this,Li).data!==void 0&&te(this,Ps,$(this,qe)),Wl(n,t))return;te(this,Nt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!$(this,js).size)return!0;const o=new Set(s!=null?s:$(this,js));return this.options.throwOnError&&o.add("error"),Object.keys($(this,Nt)).some(a=>{const l=a;return $(this,Nt)[l]!==t[l]&&o.has(l)})};De(this,Xe,ev).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&De(this,Xe,hd).call(this)}},Ut=new WeakMap,qe=new WeakMap,ja=new WeakMap,Nt=new WeakMap,Li=new WeakMap,As=new WeakMap,Vr=new WeakMap,Wr=new WeakMap,Ma=new WeakMap,Ts=new WeakMap,Ps=new WeakMap,Di=new WeakMap,Ii=new WeakMap,Qr=new WeakMap,js=new WeakMap,Xe=new WeakSet,$o=function(t){De(this,Xe,md).call(this);let n=$(this,qe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ft)),n},cd=function(){De(this,Xe,gd).call(this);const t=ni(this.options.staleTime,$(this,qe));if(zi||$(this,Nt).isStale||!sd(t))return;const r=Gp($(this,Nt).dataUpdatedAt,t)+1;te(this,Di,setTimeout(()=>{$(this,Nt).isStale||this.updateResult()},r))},dd=function(){var t;return(t=typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,qe)):this.options.refetchInterval)!=null?t:!1},fd=function(t){De(this,Xe,yd).call(this),te(this,Qr,t),!(zi||En(this.options.enabled,$(this,qe))===!1||!sd($(this,Qr))||$(this,Qr)===0)&&te(this,Ii,setInterval(()=>{(this.options.refetchIntervalInBackground||Mf.isFocused())&&De(this,Xe,$o).call(this)},$(this,Qr)))},hd=function(){De(this,Xe,cd).call(this),De(this,Xe,fd).call(this,De(this,Xe,dd).call(this))},gd=function(){$(this,Di)&&(clearTimeout($(this,Di)),te(this,Di,void 0))},yd=function(){$(this,Ii)&&(clearInterval($(this,Ii)),te(this,Ii,void 0))},md=function(){const t=$(this,Ut).getQueryCache().build($(this,Ut),this.options);if(t===$(this,qe))return;const n=$(this,qe);te(this,qe,t),te(this,ja,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ev=function(t){vt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n($(this,Nt))}),$(this,Ut).getQueryCache().notify({query:$(this,qe),type:"observerResultsUpdated"})})},_p);function d3(e,t){return En(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function n0(e,t){return d3(e,t)||e.state.data!==void 0&&pd(e,t,t.refetchOnMount)}function pd(e,t,n){if(En(t.enabled,e)!==!1&&ni(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&$f(e,t)}return!1}function r0(e,t,n,r){return(e!==t||En(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&$f(e,n)}function $f(e,t){return En(t.enabled,e)!==!1&&e.isStaleByTime(ni(t.staleTime,e))}function f3(e,t){return!Wl(e.getCurrentResult(),t)}var Yr,Xr,Gt,xr,Er,Rl,vd,kp,h3=(kp=class extends ro{constructor(n,r){super();le(this,Er);le(this,Yr);le(this,Xr);le(this,Gt);le(this,xr);te(this,Yr,n),this.setOptions(r),this.bindMethods(),De(this,Er,Rl).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=$(this,Yr).defaultMutationOptions(n),Wl(this.options,r)||$(this,Yr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:$(this,Gt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Hi(r.mutationKey)!==Hi(this.options.mutationKey)?this.reset():((i=$(this,Gt))==null?void 0:i.state.status)==="pending"&&$(this,Gt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=$(this,Gt))==null||n.removeObserver(this)}onMutationUpdate(n){De(this,Er,Rl).call(this),De(this,Er,vd).call(this,n)}getCurrentResult(){return $(this,Xr)}reset(){var n;(n=$(this,Gt))==null||n.removeObserver(this),te(this,Gt,void 0),De(this,Er,Rl).call(this),De(this,Er,vd).call(this)}mutate(n,r){var i;return te(this,xr,r),(i=$(this,Gt))==null||i.removeObserver(this),te(this,Gt,$(this,Yr).getMutationCache().build($(this,Yr),this.options)),$(this,Gt).addObserver(this),$(this,Gt).execute(n)}},Yr=new WeakMap,Xr=new WeakMap,Gt=new WeakMap,xr=new WeakMap,Er=new WeakSet,Rl=function(){var r,i;const n=(i=(r=$(this,Gt))==null?void 0:r.state)!=null?i:Jp();te(this,Xr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},vd=function(n){vt.batch(()=>{var r,i,s,o,a,l,u,c;if($(this,xr)&&this.hasListeners()){const d=$(this,Xr).variables,f=$(this,Xr).context;(n==null?void 0:n.type)==="success"?((i=(r=$(this,xr)).onSuccess)==null||i.call(r,n.data,d,f),(o=(s=$(this,xr)).onSettled)==null||o.call(s,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=$(this,xr)).onError)==null||l.call(a,n.error,d,f),(c=(u=$(this,xr)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d($(this,Xr))})})},kp),tv=D.createContext(void 0),Yt=e=>{const t=D.useContext(tv);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},g3=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(tv.Provider,{value:e,children:t})),nv=D.createContext(!1),y3=()=>D.useContext(nv);nv.Provider;function m3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var p3=D.createContext(m3()),v3=()=>D.useContext(p3),b3=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},x3=e=>{D.useEffect(()=>{e.clearReset()},[e])},w3=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Vp(n,[e.error,r])),S3=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))}},C3=(e,t)=>e.isLoading&&e.isFetching&&!t,_3=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,i0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function k3(e,t,n){var d,f,h,y,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=y3(),i=v3(),s=Yt(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",S3(o),b3(o,i),x3(i);const a=!s.getQueryCache().get(o.queryHash),[l]=D.useState(()=>new t(s,o)),u=l.getOptimisticResult(o),c=!r&&e.subscribed!==!1;if(D.useSyncExternalStore(D.useCallback(p=>{const v=c?l.subscribe(vt.batchCalls(p)):Ft;return l.updateResult(),v},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),D.useEffect(()=>{l.setOptions(o)},[o,l]),_3(o,u))throw i0(o,l,i);if(w3({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((y=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,o,u),o.experimental_prefetchInRender&&!zi&&C3(u,r)){const p=a?i0(o,l,i):(m=s.getQueryCache().get(o.queryHash))==null?void 0:m.promise;p==null||p.catch(Ft).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function fi(e,t){return k3(e,c3,t)}function Mr(e,t){const n=Yt(t),[r]=D.useState(()=>new h3(n,e));D.useEffect(()=>{r.setOptions(e)},[r,e]);const i=D.useSyncExternalStore(D.useCallback(o=>r.subscribe(vt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=D.useCallback((o,a)=>{r.mutate(o,a).catch(Ft)},[r]);if(i.error&&Vp(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}var Te={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return s0(this.context.count)},getNextContextId(){return s0(this.context.count++)}};function s0(e){const t=String(e),n=t.length-1;return Te.context.id+(n?String.fromCharCode(96+n):"")+t}function Lo(e){Te.context=e}var rv=!1,O3=(e,t)=>e===t,Yl=Symbol("solid-proxy"),iv=typeof Proxy=="function",Tu=Symbol("solid-track"),Xl={equals:O3},sv=dv,$r=1,Zl=2,ov={owned:null,cleanups:null,context:null,owner:null},mc={},We=null,pc=null,E3=null,rt=null,Lt=null,kr=null,Pu=0;function Or(e,t){const n=rt,r=We,i=e.length===0,s=t===void 0?r:t,o=i?ov:{owned:null,cleanups:null,context:s?s.context:null,owner:s},a=i?e:()=>e(()=>ht(()=>ta(o)));We=o,rt=null;try{return or(a,!0)}finally{rt=n,We=r}}function ae(e,t){t=t?Object.assign({},Xl,t):Xl;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),cv(n,i));return[uv.bind(n),r]}function av(e,t,n){const r=ju(e,t,!0,$r);io(r)}function we(e,t,n){const r=ju(e,t,!1,$r);io(r)}function Se(e,t,n){sv=N3;const r=ju(e,t,!1,$r);(!n||!n.render)&&(r.user=!0),kr?kr.push(r):io(r)}function K(e,t,n){n=n?Object.assign({},Xl,n):Xl;const r=ju(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,io(r),uv.bind(r)}function A3(e){return e&&typeof e=="object"&&"then"in e}function T3(e,t,n){let r,i,s;r=!0,i=e,s={};let o=null,a=mc,l=null,u=!1,c="initialValue"in s,d=typeof r=="function"&&K(r);const f=new Set,[h,y]=(s.storage||ae)(s.initialValue),[m,p]=ae(void 0),[v,b]=ae(void 0,{equals:!1}),[S,C]=ae(c?"ready":"unresolved");Te.context&&(l=Te.getNextContextId(),s.ssrLoadFrom==="initial"?a=s.initialValue:Te.load&&Te.has(l)&&(a=Te.load(l)));function x(O,A,T,j){return o===O&&(o=null,j!==void 0&&(c=!0),(O===a||A===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(j,{value:A})),a=mc,k(A,T)),A}function k(O,A){or(()=>{A===void 0&&y(()=>O),C(A!==void 0?"errored":c?"ready":"unresolved"),p(A);for(const T of f.keys())T.decrement();f.clear()},!1)}function w(){const O=D3,A=h(),T=m();if(T!==void 0&&!o)throw T;return rt&&rt.user,A}function _(O=!0){if(O!==!1&&u)return;u=!1;const A=d?d():r;if(A==null||A===!1){x(o,ht(h));return}const T=a!==mc?a:ht(()=>i(A,{value:h(),refetching:O}));return A3(T)?(o=T,"value"in T?(T.status==="success"?x(o,T.value,void 0,A):x(o,void 0,bd(T.value),A),T):(u=!0,queueMicrotask(()=>u=!1),or(()=>{C(c?"refreshing":"pending"),b()},!1),T.then(j=>x(T,j,void 0,A),j=>x(T,void 0,bd(j),A)))):(x(o,T,void 0,A),T)}return Object.defineProperties(w,{state:{get:()=>S()},error:{get:()=>m()},loading:{get(){const O=S();return O==="pending"||O==="refreshing"}},latest:{get(){if(!c)return w();const O=m();if(O&&!o)throw O;return h()}}}),d?av(()=>_(!1)):_(!1),[w,{refetch:_,mutate:y}]}function P3(e){return or(e,!1)}function ht(e){if(rt===null)return e();const t=rt;rt=null;try{return e()}finally{rt=t}}function Tr(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 u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s)return s=!1,o;const l=ht(()=>t(a,i,o));return i=a,l}}function Pr(e){Se(()=>ht(e))}function Ce(e){return We===null||(We.cleanups===null?We.cleanups=[e]:We.cleanups.push(e)),e}function o0(){return We}function j3(e,t){const n=We,r=rt;We=e,rt=null;try{return or(t,!0)}catch(i){Lf(i)}finally{We=n,rt=r}}function M3(e){const t=rt,n=We;return Promise.resolve().then(()=>{rt=t,We=n;let r;return or(e,!1),rt=We=null,r?r.done:void 0})}var[$3,$I]=ae(!1);function L3(){return[$3,M3]}function _t(e,t){const n=Symbol("context");return{id:n,Provider:F3(n),defaultValue:e}}function kt(e){let t;return We&&We.context&&(t=We.context[e.id])!==void 0?t:e.defaultValue}function lv(e){const t=K(e),n=K(()=>xd(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var D3;function uv(){if(this.sources&&this.state)if(this.state===$r)io(this);else{const e=Lt;Lt=null,or(()=>eu(this),!1),Lt=e}if(rt){const e=this.observers?this.observers.length:0;rt.sources?(rt.sources.push(this),rt.sourceSlots.push(e)):(rt.sources=[this],rt.sourceSlots=[e]),this.observers?(this.observers.push(rt),this.observerSlots.push(rt.sources.length-1)):(this.observers=[rt],this.observerSlots=[rt.sources.length-1])}return this.value}function cv(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&or(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=pc&&pc.running;o&&pc.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Lt.push(s):kr.push(s),s.observers&&fv(s)),o||(s.state=$r)}if(Lt.length>1e6)throw Lt=[],new Error},!1)),t}function io(e){if(!e.fn)return;ta(e);const t=Pu;I3(e,e.value,t)}function I3(e,t,n){let r;const i=We,s=rt;rt=We=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=$r,e.owned&&e.owned.forEach(ta),e.owned=null),e.updatedAt=n+1,Lf(o)}finally{rt=s,We=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?cv(e,r):e.value=r,e.updatedAt=n)}function ju(e,t,n,r=$r,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:We,context:We?We.context:null,pure:n};return We===null||We!==ov&&(We.owned?We.owned.push(s):We.owned=[s]),s}function Jl(e){if(e.state===0)return;if(e.state===Zl)return eu(e);if(e.suspense&&ht(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Pu);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===$r)io(e);else if(e.state===Zl){const r=Lt;Lt=null,or(()=>eu(e,t[0]),!1),Lt=r}}function or(e,t){if(Lt)return e();let n=!1;t||(Lt=[]),kr?n=!0:kr=[],Pu++;try{const r=e();return R3(n),r}catch(r){n||(kr=null),Lt=null,Lf(r)}}function R3(e){if(Lt&&(dv(Lt),Lt=null),e)return;const t=kr;kr=null,t.length&&or(()=>sv(t),!1)}function dv(e){for(let t=0;t<e.length;t++)Jl(e[t])}function N3(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Jl(r)}if(Te.context){if(Te.count){Te.effects||(Te.effects=[]),Te.effects.push(...e.slice(0,n));return}Lo()}for(Te.effects&&(Te.done||!Te.count)&&(e=[...Te.effects,...e],n+=Te.effects.length,delete Te.effects),t=0;t<n;t++)Jl(e[t])}function eu(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===$r?r!==t&&(!r.updatedAt||r.updatedAt<Pu)&&Jl(r):i===Zl&&eu(r,t)}}}function fv(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Zl,n.pure?Lt.push(n):kr.push(n),n.observers&&fv(n))}}function ta(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--)ta(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ta(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 bd(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Lf(e,t=We){throw bd(e)}function xd(e){if(typeof e=="function"&&!e.length)return xd(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=xd(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function F3(e,t){return function(r){let i;return we(()=>i=ht(()=>(We.context={...We.context,[e]:r.value},lv(()=>r.children))),void 0),i}}var wd=Symbol("fallback");function tu(e){for(let t=0;t<e.length;t++)e[t]()}function B3(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Ce(()=>tu(s)),()=>{let l=e()||[],u=l.length,c,d;return l[Tu],ht(()=>{let h,y,m,p,v,b,S,C,x;if(u===0)o!==0&&(tu(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[wd],i[0]=Or(k=>(s[0]=k,n.fallback())),o=1);else if(o===0){for(i=new Array(u),d=0;d<u;d++)r[d]=l[d],i[d]=Or(f);o=u}else{for(m=new Array(u),p=new Array(u),a&&(v=new Array(u)),b=0,S=Math.min(o,u);b<S&&r[b]===l[b];b++);for(S=o-1,C=u-1;S>=b&&C>=b&&r[S]===l[C];S--,C--)m[C]=i[S],p[C]=s[S],a&&(v[C]=a[S]);for(h=new Map,y=new Array(C+1),d=C;d>=b;d--)x=l[d],c=h.get(x),y[d]=c===void 0?-1:c,h.set(x,d);for(c=b;c<=S;c++)x=r[c],d=h.get(x),d!==void 0&&d!==-1?(m[d]=i[c],p[d]=s[c],a&&(v[d]=a[c]),d=y[d],h.set(x,d)):s[c]();for(d=b;d<u;d++)d in m?(i[d]=m[d],s[d]=p[d],a&&(a[d]=v[d],a[d](d))):i[d]=Or(f);i=i.slice(0,o=u),r=l.slice(0)}return i});function f(h){if(s[d]=h,a){const[y,m]=ae(d);return a[d]=m,t(l[d],y)}return t(l[d])}}}function q3(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return Ce(()=>tu(s)),()=>{const u=e()||[],c=u.length;return u[Tu],ht(()=>{if(c===0)return a!==0&&(tu(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[wd],i[0]=Or(f=>(s[0]=f,n.fallback())),a=1),i;for(r[0]===wd&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<c;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=Or(d));for(;l<r.length;l++)s[l]();return a=o.length=s.length=c,r=u.slice(0),i=i.slice(0,a)});function d(f){s[l]=f;const[h,y]=ae(u[l]);return o[l]=y,t(h,l)}}}function L(e,t){return ht(()=>e(t||{}))}function ul(){return!0}var Sd={get(e,t,n){return t===Yl?n:e.get(t)},has(e,t){return t===Yl?!0:e.has(t)},set:ul,deleteProperty:ul,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ul,deleteProperty:ul}},ownKeys(e){return e.keys()}};function vc(e){return(e=typeof e=="function"?e():e)?e:{}}function z3(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function Pe(...e){let t=!1;for(let o=0;o<e.length;o++){const a=e[o];t=t||!!a&&Yl in a,e[o]=typeof a=="function"?(t=!0,K(a)):a}if(iv&&t)return new Proxy({get(o){for(let a=e.length-1;a>=0;a--){const l=vc(e[a])[o];if(l!==void 0)return l}},has(o){for(let a=e.length-1;a>=0;a--)if(o in vc(e[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<e.length;a++)o.push(...Object.keys(vc(e[a])));return[...new Set(o)]}},Sd);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 u=l.length-1;u>=0;u--){const c=l[u];if(c==="__proto__"||c==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,c);if(!r[c])r[c]=d.get?{enumerable:!0,configurable:!0,get:z3.bind(n[c]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[c];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 Ze(e,...t){if(iv&&Yl 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)}},Sd));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))}},Sd)),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 u of t)u.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 hv(e){let t,n;const r=i=>{const s=Te.context;if(s){const[a,l]=ae();Te.count||(Te.count=0),Te.count++,(n||(n=e())).then(u=>{!Te.done&&Lo(s),Te.count--,l(()=>u.default),Lo()}),t=a}else if(!t){const[a]=T3(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return K(()=>(o=t())?ht(()=>{if(!s||Te.done)return o(i);const a=Te.context;Lo(s);const l=o(i);return Lo(a),l}):"")};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var H3=0;function Ln(){return Te.context?Te.getNextContextId():`cl-${H3++}`}var gv=e=>`Stale read from <${e}>.`;function U3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return K(B3(()=>e.each,e.children,t||void 0))}function G3(e){const t="fallback"in e&&{fallback:()=>e.fallback};return K(q3(()=>e.each,e.children,t||void 0))}function xe(e){const t=e.keyed,n=K(()=>e.when,void 0,void 0),r=t?n:K(n,void 0,{equals:(i,s)=>!i==!s});return K(()=>{const i=r();if(i){const s=e.children;return typeof s=="function"&&s.length>0?ht(()=>s(t?i:()=>{if(!ht(r))throw gv("Show");return n()})):s}return e.fallback},void 0,void 0)}function K3(e){const t=lv(()=>e.children),n=K(()=>{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],u=s,c=K(()=>u()?void 0:l.when,void 0,void 0),d=l.keyed?c:K(c,void 0,{equals:(f,h)=>!f==!h});s=()=>u()||(d()?[a,c,l]:void 0)}return s});return K(()=>{const r=n()();if(!r)return e.fallback;const[i,s,o]=r,a=o.children;return typeof a=="function"&&a.length>0?ht(()=>a(o.keyed?s():()=>{var u;if(((u=ht(n)())==null?void 0:u[0])!==i)throw gv("Match");return s()})):a},void 0,void 0)}function bc(e){return e}var V3=["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"],W3=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...V3]),Q3=new Set(["innerHTML","textContent","innerText","children"]),Y3=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),X3=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 Z3(e,t){const n=X3[e];return typeof n=="object"?n[t]?n.$:void 0:n}var J3=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"]),tS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function nS(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,u=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 c=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],c)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],c),t[i]=n[s]}else{if(!u){u=new Map;let d=a;for(;d<s;)u.set(n[d],d++)}const c=u.get(t[o]);if(c!=null)if(a<c&&c<s){let d=o,f=1,h;for(;++d<i&&d<s&&!((h=u.get(t[d]))==null||h!==c+f);)f++;if(f>c-a){const y=t[o];for(;a<c;)e.insertBefore(n[a++],y)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var Vo="_$DX_DELEGATE";function yv(e,t,n,r={}){let i;return Or(s=>{i=s,t===document?e():Q(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function ce(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 Mu(e,t=window.document){const n=t[Vo]||(t[Vo]=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,vv))}}function rS(e=window.document){if(e[Vo]){for(let t of e[Vo].keys())e.removeEventListener(t,vv);delete e[Vo]}}function re(e,t,n){Ji(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function iS(e,t,n,r){Ji(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function sS(e,t,n){Ji(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function ie(e,t){Ji(e)||(t==null?e.removeAttribute("class"):e.className=t)}function mv(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 oS(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]||(a0(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||(a0(e,a,!0),n[a]=l)}return n}function aS(e,t,n){if(!t)return n?re(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 pv(e,t={},n,r){const i={};return r||we(()=>i.children=na(e,t.children,i.children)),we(()=>typeof t.ref=="function"&&so(t.ref,e)),we(()=>lS(e,t,n,!0,i,!0)),i}function so(e,t,n){return ht(()=>e(t,n))}function Q(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return na(e,t,r,n);we(i=>na(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]=l0(e,o,null,i[o],n,s,t)}for(const o in t){if(o==="children")continue;const a=t[o];i[o]=l0(e,o,a,i[o],n,s,t)}}function uS(e){let t,n;return!Ji()||!(t=Te.registry.get(n=dS()))?e():(Te.completed&&Te.completed.add(t),Te.registry.delete(n),t)}function Ji(e){return!!Te.context&&!Te.done&&(!e||e.isConnected)}function cS(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function a0(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 l0(e,t,n,r,i,s,o){let a,l,u,c,d;if(t==="style")return aS(e,n,r);if(t==="classList")return oS(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=J3.has(f);if(!h&&r){const y=Array.isArray(r)?r[0]:r;e.removeEventListener(f,y)}(h||n)&&(mv(e,f,n,h),h&&Mu([f]))}else if(t.slice(0,5)==="attr:")re(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")sS(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(u=Q3.has(t))||!i&&((c=Z3(t,e.tagName))||(l=W3.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"?ie(e,n):a&&!l&&!u?e[cS(t)]=n:e[c||t]=n}else{const f=i&&t.indexOf(":")>-1&&tS[t.split(":")[0]];f?iS(e,f,t,n):re(e,Y3[t]||t,n)}return n}function vv(e){if(Te.registry&&Te.events&&Te.events.find(([l,u])=>u===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 u=t[`${n}Data`];if(u!==void 0?l.call(t,u,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}}),Te.registry&&!Te.done&&(Te.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();s(l[0]);for(let u=0;u<l.length-2&&(t=l[u],!!o());u++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();s(r)}function na(e,t,n,r,i){const s=Ji(e);if(s){!n&&(n=[...e.childNodes]);let l=[];for(let u=0;u<n.length;u++){const c=n[u];c.nodeType===8&&c.data.slice(0,2)==="!$"?c.remove():l.push(c)}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=is(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=is(e,n,r)}else{if(o==="function")return we(()=>{let l=t();for(;typeof l=="function";)l=l();n=na(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],u=n&&Array.isArray(n);if(Cd(l,t,n,i))return we(()=>n=na(e,l,n,r,!0)),()=>n;if(s){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let c=l[0];if(c.parentNode!==e)return n;const d=[c];for(;(c=c.nextSibling)!==r;)d.push(c);return n=d}if(l.length===0){if(n=is(e,n,r),a)return n}else u?n.length===0?u0(e,l,r):nS(e,n,l):(n&&is(e),u0(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=is(e,n,r,t);is(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Cd(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],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=Cd(e,a,l)||i;else if(u==="function")if(r){for(;typeof a=="function";)a=a();i=Cd(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return i}function u0(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function is(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 dS(){return Te.getNextContextId()}var fS="http://www.w3.org/2000/svg";function bv(e,t=!1){return t?document.createElementNS(fS,e):document.createElement(e)}function xv(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=o0();let s,o=!!Te.context;return Se(()=>{o&&(o0().user=o=!1),s||(s=j3(i,()=>K(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,u]=ae(!1),c=()=>u(!0);Or(d=>Q(a,()=>l()?d():s(),null)),Ce(c)}else{const l=bv(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),Q(u,s),a.appendChild(l),e.ref&&e.ref(l),Ce(()=>a.removeChild(l))}},void 0,{render:!o}),n}function hS(e,t){const n=K(e);return K(()=>{const r=n();switch(typeof r){case"function":return ht(()=>r(t));case"string":const i=eS.has(r),s=Te.context?uS():bv(r,i);return pv(s,t,i),s}})}function gS(e){const[,t]=Ze(e,["component"]);return hS(()=>e.component,t)}var yS=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()}},wv=class{constructor(t){this.generateIdentifier=t,this.kv=new yS}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)}},mS=class extends wv{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 pS(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 vS(e,t){const n=pS(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 Ys(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Nl(e,t){return e.indexOf(t)!==-1}function c0(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var bS=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return vS(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},xS=e=>Object.prototype.toString.call(e).slice(8,-1),Sv=e=>typeof e=="undefined",wS=e=>e===null,ra=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,_d=e=>ra(e)&&Object.keys(e).length===0,oi=e=>Array.isArray(e),SS=e=>typeof e=="string",CS=e=>typeof e=="number"&&!isNaN(e),_S=e=>typeof e=="boolean",kS=e=>e instanceof RegExp,ia=e=>e instanceof Map,sa=e=>e instanceof Set,Cv=e=>xS(e)==="Symbol",OS=e=>e instanceof Date&&!isNaN(e.valueOf()),ES=e=>e instanceof Error,d0=e=>typeof e=="number"&&isNaN(e),AS=e=>_S(e)||wS(e)||Sv(e)||CS(e)||SS(e)||Cv(e),TS=e=>typeof e=="bigint",PS=e=>e===1/0||e===-1/0,jS=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),MS=e=>e instanceof URL,_v=e=>e.replace(/\./g,"\\."),xc=e=>e.map(String).map(_v).join("."),Wo=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 Kn(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var kv=[Kn(Sv,"undefined",()=>null,()=>{}),Kn(TS,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):e),Kn(OS,"Date",e=>e.toISOString(),e=>new Date(e)),Kn(ES,"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}),Kn(kS,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Kn(sa,"set",e=>[...e.values()],e=>new Set(e)),Kn(ia,"map",e=>[...e.entries()],e=>new Map(e)),Kn(e=>d0(e)||PS(e),"number",e=>d0(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Kn(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Kn(MS,"URL",e=>e.toString(),e=>new URL(e))];function $u(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Ov=$u((e,t)=>Cv(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}),$S=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Ev=$u(jS,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=$S[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Av(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var Tv=$u(Av,(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)}),Pv=$u((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)}),LS=[Tv,Ov,Pv,Ev],f0=(e,t)=>{const n=c0(LS,i=>i.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=c0(kv,i=>i.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},jv={};kv.forEach(e=>{jv[e.annotation]=e});var DS=(e,t,n)=>{if(oi(t))switch(t[0]){case"symbol":return Ov.untransform(e,t,n);case"class":return Tv.untransform(e,t,n);case"custom":return Pv.untransform(e,t,n);case"typed-array":return Ev.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=jv[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},hs=(e,t)=>{const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Mv(e){if(Nl(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Nl(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Nl(e,"constructor"))throw new Error("constructor is not allowed as a property")}var IS=(e,t)=>{Mv(t);for(let n=0;n<t.length;n++){const r=t[n];if(sa(e))e=hs(e,+r);else if(ia(e)){const i=+r,s=+t[++n]==0?"key":"value",o=hs(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[r]}return e},kd=(e,t,n)=>{if(Mv(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const o=t[s];if(oi(r)){const a=+o;r=r[a]}else if(ra(r))r=r[o];else if(sa(r)){const a=+o;r=hs(r,a)}else if(ia(r)){if(s===t.length-2)break;const l=+o,u=+t[++s]==0?"key":"value",c=hs(r,l);switch(u){case"key":r=c;break;case"value":r=r.get(c);break}}}const i=t[t.length-1];if(oi(r)?r[+i]=n(r[+i]):ra(r)&&(r[i]=n(r[i])),sa(r)){const s=hs(r,+i),o=n(s);s!==o&&(r.delete(s),r.add(o))}if(ia(r)){const s=+t[t.length-2],o=hs(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 Od(e,t,n=[]){if(!e)return;if(!oi(e)){Ys(e,(s,o)=>Od(s,t,[...n,...Wo(o)]));return}const[r,i]=e;i&&Ys(i,(s,o)=>{Od(s,t,[...n,...Wo(o)])}),t(r,n)}function RS(e,t,n){return Od(t,(r,i)=>{e=kd(e,i,s=>DS(s,r,n))}),e}function NS(e,t){function n(r,i){const s=IS(e,Wo(i));r.map(Wo).forEach(o=>{e=kd(e,o,()=>s)})}if(oi(t)){const[r,i]=t;r.forEach(s=>{e=kd(e,Wo(s),()=>e)}),i&&Ys(i,n)}else Ys(t,n);return e}var FS=(e,t)=>ra(e)||oi(e)||ia(e)||sa(e)||Av(e,t);function BS(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function qS(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(xc):n[xc(s)]=o.map(xc)}),r?_d(n)?[r]:[r,n]:_d(n)?void 0:n}var $v=(e,t,n,r,i=[],s=[],o=new Map)=>{var h;const a=AS(e);if(!a){BS(e,i,t);const y=o.get(e);if(y)return r?{transformedValue:null}:y}if(!FS(e,n)){const y=f0(e,n),m=y?{transformedValue:y.value,annotations:[y.type]}:{transformedValue:e};return a||o.set(e,m),m}if(Nl(s,e))return{transformedValue:null};const l=f0(e,n),u=(h=l==null?void 0:l.value)!=null?h:e,c=oi(u)?[]:{},d={};Ys(u,(y,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=$v(y,t,n,r,[...i,m],[...s,e],o);c[m]=p.transformedValue,oi(p.annotations)?d[m]=p.annotations:ra(p.annotations)&&Ys(p.annotations,(v,b)=>{d[_v(m)+"."+b]=v})});const f=_d(d)?{transformedValue:c,annotations:l?[l.type]:void 0}:{transformedValue:c,annotations:l?[l.type,d]:d};return a||o.set(e,f),f};function Lv(e){return Object.prototype.toString.call(e).slice(8,-1)}function h0(e){return Lv(e)==="Array"}function zS(e){if(Lv(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function HS(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 Ed(e,t={}){if(h0(e))return e.map(i=>Ed(i,t));if(!zS(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((i,s)=>{if(h0(t.props)&&!t.props.includes(s))return i;const o=e[s],a=Ed(o,t);return HS(i,s,a,e,t.nonenumerable),i},{})}var it=class{constructor({dedupe:e=!1}={}){this.classRegistry=new mS,this.symbolRegistry=new wv(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new bS,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=$v(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const i=qS(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r}deserialize(e){const{json:t,meta:n}=e;let r=Ed(t);return n!=null&&n.values&&(r=RS(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=NS(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)}};it.defaultInstance=new it;it.serialize=it.defaultInstance.serialize.bind(it.defaultInstance);it.deserialize=it.defaultInstance.deserialize.bind(it.defaultInstance);it.stringify=it.defaultInstance.stringify.bind(it.defaultInstance);it.parse=it.defaultInstance.parse.bind(it.defaultInstance);it.registerClass=it.defaultInstance.registerClass.bind(it.defaultInstance);it.registerSymbol=it.defaultInstance.registerSymbol.bind(it.defaultInstance);it.registerCustom=it.defaultInstance.registerCustom.bind(it.defaultInstance);it.allowErrorProps=it.defaultInstance.allowErrorProps.bind(it.defaultInstance);var Dv=it.serialize,US=it.stringify;function us(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}function GS(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function KS({queryState:e,observerCount:t,isStale:n}){return e.fetchStatus==="fetching"?"blue":t?e.fetchStatus==="paused"?"purple":n?"yellow":"green":"gray"}function gs({status:e,isPaused:t}){return t?"purple":e==="error"?"red":e==="pending"?"yellow":e==="success"?"green":"gray"}function VS(e){return e==="fresh"?"green":e==="stale"?"yellow":e==="paused"?"purple":e==="inactive"?"gray":"blue"}var nu=(e,t=!1)=>{const{json:n}=Dv(e);return JSON.stringify(n,null,t?2:void 0)},cl=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,WS=(e,t)=>e.queryHash.localeCompare(t.queryHash),Iv=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,QS=(e,t)=>cl(e)===cl(t)?Iv(e,t):cl(e)>cl(t)?1:-1,Ad={status:QS,"query hash":WS,"last updated":Iv},dl=e=>e.state.isPaused?0:e.state.status==="error"?2:e.state.status==="pending"?1:3,Rv=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,YS=(e,t)=>dl(e)===dl(t)?Rv(e,t):dl(e)>dl(t)?1:-1,Td={status:YS,"last updated":Rv},g0=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),Nv=()=>{const[e,t]=ae("dark");return Pr(()=>{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),Ce(()=>n.removeEventListener("change",r))}),e},ki=(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,ki(r.get(i),s,n)),r}if(e instanceof Set){const r=ki(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]=ki(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]=ki(r[i],s,n),r}return e},Do=(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,Do(n.get(r),i)),n}if(e instanceof Set){const n=Do(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]=Do(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]=Do(n[r],i),n}return e},Fv=(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)},Ms,$a,La,Da,Ri,Ia,$s,Ls,Ds,Is,Rs,Ns,Ra,Op,XS=(Op=class{constructor(e){le(this,Ms);le(this,$a);le(this,La);le(this,Da);le(this,Ri,!1);le(this,Ia);le(this,$s);le(this,Ls);le(this,Ds);le(this,Is);le(this,Rs);le(this,Ns);le(this,Ra);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c}=e;te(this,Ms,ae(t)),te(this,La,n),te(this,Da,r),te(this,$a,i),te(this,Ia,u),te(this,$s,c),te(this,Ls,ae(s)),te(this,Ds,ae(o)),te(this,Is,ae(a)),te(this,Rs,ae(l))}setButtonPosition(e){$(this,Ls)[1](e)}setPosition(e){$(this,Ds)[1](e)}setInitialIsOpen(e){$(this,Is)[1](e)}setErrorTypes(e){$(this,Rs)[1](e)}setClient(e){$(this,Ms)[1](e)}mount(e){if($(this,Ri))throw new Error("Devtools is already mounted");const t=yv(()=>{const n=this,[r]=$(this,Ls),[i]=$(this,Ds),[s]=$(this,Is),[o]=$(this,Rs),[a]=$(this,Ms);let l;return $(this,Ns)?l=$(this,Ns):(l=hv(()=>Promise.resolve().then(()=>UL)),te(this,Ns,l)),Fv($(this,Ia),$(this,$s)),L(l,Pe({get queryFlavor(){return $(n,La)},get version(){return $(n,Da)},get onlineManager(){return $(n,$a)},get shadowDOMTarget(){return $(n,$s)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return i()},get initialIsOpen(){return s()},get errorTypes(){return o()}}))},e);te(this,Ri,!0),te(this,Ra,t)}unmount(){var e;if(!$(this,Ri))throw new Error("Devtools is not mounted");(e=$(this,Ra))==null||e.call(this),te(this,Ri,!1)}},Ms=new WeakMap,$a=new WeakMap,La=new WeakMap,Da=new WeakMap,Ri=new WeakMap,Ia=new WeakMap,$s=new WeakMap,Ls=new WeakMap,Ds=new WeakMap,Is=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,Ra=new WeakMap,Op),Fs,Na,Fa,Ba,Ni,qa,Bs,qs,zs,Hs,Us,Gs,Ks,za,Ep,ZS=(Ep=class{constructor(e){le(this,Fs);le(this,Na);le(this,Fa);le(this,Ba);le(this,Ni,!1);le(this,qa);le(this,Bs);le(this,qs);le(this,zs);le(this,Hs);le(this,Us);le(this,Gs);le(this,Ks);le(this,za);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l,styleNonce:u,shadowDOMTarget:c,onClose:d}=e;te(this,Fs,ae(t)),te(this,Fa,n),te(this,Ba,r),te(this,Na,i),te(this,qa,u),te(this,Bs,c),te(this,qs,ae(s)),te(this,zs,ae(o)),te(this,Hs,ae(a)),te(this,Us,ae(l)),te(this,Gs,ae(d))}setButtonPosition(e){$(this,qs)[1](e)}setPosition(e){$(this,zs)[1](e)}setInitialIsOpen(e){$(this,Hs)[1](e)}setErrorTypes(e){$(this,Us)[1](e)}setClient(e){$(this,Fs)[1](e)}setOnClose(e){$(this,Gs)[1](()=>e)}mount(e){if($(this,Ni))throw new Error("Devtools is already mounted");const t=yv(()=>{const n=this,[r]=$(this,qs),[i]=$(this,zs),[s]=$(this,Hs),[o]=$(this,Us),[a]=$(this,Fs),[l]=$(this,Gs);let u;return $(this,Ks)?u=$(this,Ks):(u=hv(()=>Promise.resolve().then(()=>VL)),te(this,Ks,u)),Fv($(this,qa),$(this,Bs)),L(u,Pe({get queryFlavor(){return $(n,Fa)},get version(){return $(n,Ba)},get onlineManager(){return $(n,Na)},get shadowDOMTarget(){return $(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);te(this,Ni,!0),te(this,za,t)}unmount(){var e;if(!$(this,Ni))throw new Error("Devtools is not mounted");(e=$(this,za))==null||e.call(this),te(this,Ni,!1)}},Fs=new WeakMap,Na=new WeakMap,Fa=new WeakMap,Ba=new WeakMap,Ni=new WeakMap,qa=new WeakMap,Bs=new WeakMap,qs=new WeakMap,zs=new WeakMap,Hs=new WeakMap,Us=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,za=new WeakMap,Ep);function JS(e){const t=Yt(e.client),n=D.useRef(null),{buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}=e,[u]=D.useState(new XS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Qs,buttonPosition:r,position:i,initialIsOpen:s,errorTypes:o,styleNonce:a,shadowDOMTarget:l}));return D.useEffect(()=>{u.setClient(t)},[t,u]),D.useEffect(()=>{r&&u.setButtonPosition(r)},[r,u]),D.useEffect(()=>{i&&u.setPosition(i)},[i,u]),D.useEffect(()=>{u.setInitialIsOpen(s||!1)},[s,u]),D.useEffect(()=>{u.setErrorTypes(o||[])},[o,u]),D.useEffect(()=>(n.current&&u.mount(n.current),()=>{u.unmount()}),[u]),g.jsx("div",{dir:"ltr",className:"tsqd-parent-container",ref:n})}function eC(e){const t=Yt(e.client),n=D.useRef(null),{errorTypes:r,styleNonce:i,shadowDOMTarget:s}=e,[o]=D.useState(new ZS({client:t,queryFlavor:"React Query",version:"5",onlineManager:Qs,buttonPosition:"bottom-left",position:"bottom",initialIsOpen:!0,errorTypes:r,styleNonce:i,shadowDOMTarget:s,onClose:e.onClose}));return D.useEffect(()=>{o.setClient(t)},[t,o]),D.useEffect(()=>{var a;o.setOnClose((a=e.onClose)!=null?a:()=>{})},[e.onClose,o]),D.useEffect(()=>{o.setErrorTypes(r||[])},[r,o]),D.useEffect(()=>(n.current&&o.mount(n.current),()=>{o.unmount()}),[o]),g.jsx("div",{style:{height:"500px",...e.style},className:"tsqd-parent-container",ref:n})}var tC=process.env.NODE_ENV!=="development"?function(){return null}:JS;process.env.NODE_ENV;function Bv(e,t){return function(){return e.apply(t,arguments)}}const{toString:nC}=Object.prototype,{getPrototypeOf:Df}=Object,{iterator:Lu,toStringTag:qv}=Symbol,Du=(e=>t=>{const n=nC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Un=e=>(e=e.toLowerCase(),t=>Du(t)===e),Iu=e=>t=>typeof t===e,{isArray:oo}=Array,oa=Iu("undefined");function rC(e){return e!==null&&!oa(e)&&e.constructor!==null&&!oa(e.constructor)&&Wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zv=Un("ArrayBuffer");function iC(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zv(e.buffer),t}const sC=Iu("string"),Wt=Iu("function"),Hv=Iu("number"),Ru=e=>e!==null&&typeof e=="object",oC=e=>e===!0||e===!1,Fl=e=>{if(Du(e)!=="object")return!1;const t=Df(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qv in e)&&!(Lu in e)},aC=Un("Date"),lC=Un("File"),uC=Un("Blob"),cC=Un("FileList"),dC=e=>Ru(e)&&Wt(e.pipe),fC=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Wt(e.append)&&((t=Du(e))==="formdata"||t==="object"&&Wt(e.toString)&&e.toString()==="[object FormData]"))},hC=Un("URLSearchParams"),[gC,yC,mC,pC]=["ReadableStream","Request","Response","Headers"].map(Un),vC=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ga(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,i;if(typeof e!="object"&&(e=[e]),oo(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 Uv(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,Gv=e=>!oa(e)&&e!==Oi;function Pd(){const{caseless:e}=Gv(this)&&this||{},t={},n=(r,i)=>{const s=e&&Uv(t,i)||i;Fl(t[s])&&Fl(r)?t[s]=Pd(t[s],r):Fl(r)?t[s]=Pd({},r):oo(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ga(arguments[r],n);return t}const bC=(e,t,n,{allOwnKeys:r}={})=>(Ga(t,(i,s)=>{n&&Wt(i)?e[s]=Bv(i,n):e[s]=i},{allOwnKeys:r}),e),xC=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wC=(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)},SC=(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&&Df(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CC=(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},_C=e=>{if(!e)return null;if(oo(e))return e;let t=e.length;if(!Hv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kC=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Df(Uint8Array)),OC=(e,t)=>{const r=(e&&e[Lu]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},EC=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},AC=Un("HTMLFormElement"),TC=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),y0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),PC=Un("RegExp"),Kv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ga(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},jC=e=>{Kv(e,(t,n)=>{if(Wt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wt(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+"'")})}})},MC=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return oo(e)?r(e):r(String(e).split(t)),n},$C=()=>{},LC=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function DC(e){return!!(e&&Wt(e.append)&&e[qv]==="FormData"&&e[Lu])}const IC=e=>{const t=new Array(10),n=(r,i)=>{if(Ru(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=oo(r)?[]:{};return Ga(r,(o,a)=>{const l=n(o,i+1);!oa(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},RC=Un("AsyncFunction"),NC=e=>e&&(Ru(e)||Wt(e))&&Wt(e.then)&&Wt(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",Wt(Oi.postMessage)),FC=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Oi):typeof process!="undefined"&&process.nextTick||Vv,BC=e=>e!=null&&Wt(e[Lu]),H={isArray:oo,isArrayBuffer:zv,isBuffer:rC,isFormData:fC,isArrayBufferView:iC,isString:sC,isNumber:Hv,isBoolean:oC,isObject:Ru,isPlainObject:Fl,isReadableStream:gC,isRequest:yC,isResponse:mC,isHeaders:pC,isUndefined:oa,isDate:aC,isFile:lC,isBlob:uC,isRegExp:PC,isFunction:Wt,isStream:dC,isURLSearchParams:hC,isTypedArray:kC,isFileList:cC,forEach:Ga,merge:Pd,extend:bC,trim:vC,stripBOM:xC,inherits:wC,toFlatObject:SC,kindOf:Du,kindOfTest:Un,endsWith:CC,toArray:_C,forEachEntry:OC,matchAll:EC,isHTMLForm:AC,hasOwnProperty:y0,hasOwnProp:y0,reduceDescriptors:Kv,freezeMethods:jC,toObjectSet:MC,toCamelCase:TC,noop:$C,toFiniteNumber:LC,findKey:Uv,global:Oi,isContextDefined:Gv,isSpecCompliantForm:DC,toJSONObject:IC,isAsyncFn:RC,isThenable:NC,setImmediate:Vv,asap:FC,isIterable:BC};function Me(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)}H.inherits(Me,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:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Wv=Me.prototype,Qv={};["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=>{Qv[e]={value:e}});Object.defineProperties(Me,Qv);Object.defineProperty(Wv,"isAxiosError",{value:!0});Me.from=(e,t,n,r,i,s)=>{const o=Object.create(Wv);return H.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),Me.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const qC=null;function jd(e){return H.isPlainObject(e)||H.isArray(e)}function Yv(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function m0(e,t,n){return e?e.concat(t).map(function(i,s){return i=Yv(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function zC(e){return H.isArray(e)&&!e.some(jd)}const HC=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function Nu(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!H.isUndefined(p[m])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(H.isDate(y))return y.toISOString();if(H.isBoolean(y))return y.toString();if(!l&&H.isBlob(y))throw new Me("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(y)||H.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function c(y,m,p){let v=y;if(y&&!p&&typeof y=="object"){if(H.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=JSON.stringify(y);else if(H.isArray(y)&&zC(y)||(H.isFileList(y)||H.endsWith(m,"[]"))&&(v=H.toArray(y)))return m=Yv(m),v.forEach(function(S,C){!(H.isUndefined(S)||S===null)&&t.append(o===!0?m0([m],C,s):o===null?m:m+"[]",u(S))}),!1}return jd(y)?!0:(t.append(m0(p,m,s),u(y)),!1)}const d=[],f=Object.assign(HC,{defaultVisitor:c,convertValue:u,isVisitable:jd});function h(y,m){if(!H.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(y),H.forEach(y,function(v,b){(!(H.isUndefined(v)||v===null)&&i.call(t,v,H.isString(b)?b.trim():b,m,f))===!0&&h(v,m?m.concat(b):[b])}),d.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return h(e),t}function p0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function If(e,t){this._pairs=[],e&&Nu(e,this,t)}const Xv=If.prototype;Xv.append=function(t,n){this._pairs.push([t,n])};Xv.toString=function(t){const n=t?function(r){return t.call(this,r,p0)}:p0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function UC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zv(e,t,n){if(!t)return e;const r=n&&n.encode||UC;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=H.isURLSearchParams(t)?t.toString():new If(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class v0{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){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Jv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},GC=typeof URLSearchParams!="undefined"?URLSearchParams:If,KC=typeof FormData!="undefined"?FormData:null,VC=typeof Blob!="undefined"?Blob:null,WC={isBrowser:!0,classes:{URLSearchParams:GC,FormData:KC,Blob:VC},protocols:["http","https","file","blob","url","data"]},Rf=typeof window!="undefined"&&typeof document!="undefined",Md=typeof navigator=="object"&&navigator||void 0,QC=Rf&&(!Md||["ReactNative","NativeScript","NS"].indexOf(Md.product)<0),YC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",XC=Rf&&window.location.href||"http://localhost",ZC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Rf,hasStandardBrowserEnv:QC,hasStandardBrowserWebWorkerEnv:YC,navigator:Md,origin:XC},Symbol.toStringTag,{value:"Module"})),$t={...ZC,...WC};function JC(e,t){return Nu(e,new $t.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return $t.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function e5(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t5(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 e2(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&&H.isArray(i)?i.length:o,l?(H.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!H.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&H.isArray(i[o])&&(i[o]=t5(i[o])),!a)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(e5(r),i,n,0)}),n}return null}function n5(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ka={transitional:Jv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=H.isObject(t);if(s&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(e2(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.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 JC(t,this.formSerializer).toString();if((a=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Nu(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),n5(t)):t}],transformResponse:[function(t){const n=this.transitional||Ka.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.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"?Me.from(a,Me.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:$t.classes.FormData,Blob:$t.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{Ka.headers[e]={}});const r5=H.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"]),i5=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]&&r5[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},b0=Symbol("internals");function vo(e){return e&&String(e).trim().toLowerCase()}function Bl(e){return e===!1||e==null?e:H.isArray(e)?e.map(Bl):String(e)}function s5(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 o5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function wc(e,t,n,r,i){if(H.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!H.isString(t)){if(H.isString(r))return t.indexOf(r)!==-1;if(H.isRegExp(r))return r.test(t)}}function a5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function l5(e,t){const n=H.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 Qt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=vo(l);if(!c)throw new Error("header name must be a non-empty string");const d=H.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=Bl(a))}const o=(a,l)=>H.forEach(a,(u,c)=>s(u,c,l));if(H.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(H.isString(t)&&(t=t.trim())&&!o5(t))o(i5(t),n);else if(H.isObject(t)&&H.isIterable(t)){let a={},l,u;for(const c of t){if(!H.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?H.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=vo(t),t){const r=H.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return s5(i);if(H.isFunction(n))return n.call(this,i,r);if(H.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=vo(t),t){const r=H.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||wc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=vo(o),o){const a=H.findKey(r,o);a&&(!n||wc(r,r[a],a,n))&&(delete r[a],i=!0)}}return H.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||wc(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return H.forEach(this,(i,s)=>{const o=H.findKey(r,s);if(o){n[o]=Bl(i),delete n[s];return}const a=t?a5(s):String(s).trim();a!==s&&delete n[s],n[a]=Bl(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return H.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&H.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[b0]=this[b0]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=vo(o);r[a]||(l5(i,o),r[a]=!0)}return H.isArray(t)?t.forEach(s):s(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Qt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});H.freezeMethods(Qt);function Sc(e,t){const n=this||Ka,r=t||n,i=Qt.from(r.headers);let s=r.data;return H.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function t2(e){return!!(e&&e.__CANCEL__)}function ao(e,t,n){Me.call(this,e==null?"canceled":e,Me.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(ao,Me,{__CANCEL__:!0});function n2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Me("Request failed with status code "+n.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function u5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function c5(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 u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;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),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function d5(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-d)))},()=>i&&o(i)]}const ru=(e,t,n=3)=>{let r=0;const i=c5(50,250);return d5(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},x0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},w0=e=>(...t)=>H.asap(()=>e(...t)),f5=$t.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$t.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($t.origin),$t.navigator&&/(msie|trident)/i.test($t.navigator.userAgent)):()=>!0,h5=$t.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),H.isString(r)&&o.push("path="+r),H.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 g5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function y5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function r2(e,t,n){let r=!g5(t);return e&&(r||n==!1)?y5(e,t):t}const S0=e=>e instanceof Qt?{...e}:e;function Ui(e,t){t=t||{};const n={};function r(u,c,d,f){return H.isPlainObject(u)&&H.isPlainObject(c)?H.merge.call({caseless:f},u,c):H.isPlainObject(c)?H.merge({},c):H.isArray(c)?c.slice():c}function i(u,c,d,f){if(H.isUndefined(c)){if(!H.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function s(u,c){if(!H.isUndefined(c))return r(void 0,c)}function o(u,c){if(H.isUndefined(c)){if(!H.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}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:(u,c,d)=>i(S0(u),S0(c),d,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||i,f=d(e[c],t[c],c);H.isUndefined(f)&&d!==a||(n[c]=f)}),n}const i2=e=>{const t=Ui({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=Qt.from(o),t.url=Zv(r2(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(H.isFormData(n)){if($t.hasStandardBrowserEnv||$t.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if($t.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&f5(t.url))){const u=i&&s&&h5.read(s);u&&o.set(i,u)}return t},m5=typeof XMLHttpRequest!="undefined",p5=m5&&function(e){return new Promise(function(n,r){const i=i2(e);let s=i.data;const o=Qt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,y;function m(){h&&h(),y&&y(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(i.method.toUpperCase(),i.url,!0),p.timeout=i.timeout;function v(){if(!p)return;const S=Qt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};n2(function(w){n(w),m()},function(w){r(w),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 Me("Request aborted",Me.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Me("Network Error",Me.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||Jv;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Me(C,x.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,e,p)),p=null},s===void 0&&o.setContentType(null),"setRequestHeader"in p&&H.forEach(o.toJSON(),function(C,x){p.setRequestHeader(x,C)}),H.isUndefined(i.withCredentials)||(p.withCredentials=!!i.withCredentials),a&&a!=="json"&&(p.responseType=i.responseType),u&&([f,y]=ru(u,!0),p.addEventListener("progress",f)),l&&p.upload&&([d,h]=ru(l),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=S=>{p&&(r(!S||S.type?new ao(null,e,p):S),p.abort(),p=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const b=u5(i.url);if(b&&$t.protocols.indexOf(b)===-1){r(new Me("Unsupported protocol "+b+":",Me.ERR_BAD_REQUEST,e));return}p.send(s||null)})},v5=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Me?c:new ao(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new Me(`timeout ${t} of ms exceeded`,Me.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>H.asap(a),l}},b5=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},x5=async function*(e,t){for await(const n of w5(e))yield*b5(n,t)},w5=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()}},C0=(e,t,n,r)=>{const i=x5(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=s+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Fu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",s2=Fu&&typeof ReadableStream=="function",S5=Fu&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),o2=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},C5=s2&&o2(()=>{let e=!1;const t=new Request($t.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_0=64*1024,$d=s2&&o2(()=>H.isReadableStream(new Response("").body)),iu={stream:$d&&(e=>e.body)};Fu&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!iu[t]&&(iu[t]=H.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Me(`Response type '${t}' is not supported`,Me.ERR_NOT_SUPPORT,r)})})})(new Response);const _5=async e=>{if(e==null)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e))return(await new Request($t.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(H.isArrayBufferView(e)||H.isArrayBuffer(e))return e.byteLength;if(H.isURLSearchParams(e)&&(e=e+""),H.isString(e))return(await S5(e)).byteLength},k5=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return n==null?_5(t):n},O5=Fu&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=i2(e);u=u?(u+"").toLowerCase():"text";let h=v5([i,s&&s.toAbortSignal()],o),y;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&C5&&n!=="get"&&n!=="head"&&(p=await k5(c,r))!==0){let x=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(H.isFormData(r)&&(k=x.headers.get("content-type"))&&c.setContentType(k),x.body){const[w,_]=x0(p,ru(w0(l)));r=C0(x.body,_0,w,_)}}H.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;y=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:v?d:void 0});let b=await fetch(y,f);const S=$d&&(u==="stream"||u==="response");if($d&&(a||S&&m)){const x={};["status","statusText","headers"].forEach(O=>{x[O]=b[O]});const k=H.toFiniteNumber(b.headers.get("content-length")),[w,_]=a&&x0(k,ru(w0(a),!0))||[];b=new Response(C0(b.body,_0,w,()=>{_&&_(),m&&m()}),x)}u=u||"text";let C=await iu[H.findKey(iu,u)||"text"](b,e);return!S&&m&&m(),await new Promise((x,k)=>{n2(x,k,{data:C,headers:Qt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:y})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new Me("Network Error",Me.ERR_NETWORK,e,y),{cause:v.cause||v}):Me.from(v,v&&v.code,e,y)}}),Ld={http:qC,xhr:p5,fetch:O5};H.forEach(Ld,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const k0=e=>`- ${e}`,E5=e=>H.isFunction(e)||e===null||e===!1,a2={getAdapter:e=>{e=H.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,!E5(n)&&(r=Ld[(o=String(n)).toLowerCase()],r===void 0))throw new Me(`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(k0).join(`
|
|
16
|
+
`):" "+k0(s[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Ld};function Cc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ao(null,e)}function O0(e){return Cc(e),e.headers=Qt.from(e.headers),e.data=Sc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),a2.getAdapter(e.adapter||Ka.adapter)(e).then(function(r){return Cc(e),r.data=Sc.call(e,e.transformResponse,r),r.headers=Qt.from(r.headers),r},function(r){return t2(r)||(Cc(e),r&&r.response&&(r.response.data=Sc.call(e,e.transformResponse,r.response),r.response.headers=Qt.from(r.response.headers))),Promise.reject(r)})}const l2="1.10.0",Bu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const E0={};Bu.transitional=function(t,n,r){function i(s,o){return"[Axios v"+l2+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new Me(i(o," has been removed"+(n?" in "+n:"")),Me.ERR_DEPRECATED);return n&&!E0[o]&&(E0[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}};Bu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function A5(e,t,n){if(typeof e!="object")throw new Me("options must be an object",Me.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 Me("option "+s+" must be "+l,Me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Me("Unknown option "+s,Me.ERR_BAD_OPTION)}}const ql={assertOptions:A5,validators:Bu},Vn=ql.validators;let Fi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new v0,response:new v0}}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=Ui(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ql.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:ql.assertOptions(i,{encode:Vn.function,serialize:Vn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ql.assertOptions(n,{baseUrl:Vn.spelling("baseURL"),withXsrfToken:Vn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&H.merge(s.common,s[n.method]);s&&H.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Qt.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 u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const y=[O0.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),f=y.length,c=Promise.resolve(n);d<f;)c=c.then(y[d++],y[d++]);return c}f=a.length;let h=n;for(d=0;d<f;){const y=a[d++],m=a[d++];try{h=y(h)}catch(p){m.call(this,p);break}}try{c=O0.call(this,h)}catch(y){return Promise.reject(y)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Ui(this.defaults,t);const n=r2(t.baseURL,t.url,t.allowAbsoluteUrls);return Zv(n,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){Fi.prototype[t]=function(n,r){return this.request(Ui(r||{},{method:t,url:n,data:(r||{}).data}))}});H.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Ui(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Fi.prototype[t]=n(),Fi.prototype[t+"Form"]=n(!0)});let T5=class u2{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 ao(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 u2(function(i){t=i}),cancel:t}}};function P5(e){return function(n){return e.apply(null,n)}}function j5(e){return H.isObject(e)&&e.isAxiosError===!0}const Dd={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(Dd).forEach(([e,t])=>{Dd[t]=e});function c2(e){const t=new Fi(e),n=Bv(Fi.prototype.request,t);return H.extend(n,Fi.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return c2(Ui(e,i))},n}const ct=c2(Ka);ct.Axios=Fi;ct.CanceledError=ao;ct.CancelToken=T5;ct.isCancel=t2;ct.VERSION=l2;ct.toFormData=Nu;ct.AxiosError=Me;ct.Cancel=ct.CanceledError;ct.all=function(t){return Promise.all(t)};ct.spread=P5;ct.isAxiosError=j5;ct.mergeConfig=Ui;ct.AxiosHeaders=Qt;ct.formToJSON=e=>e2(H.isHTMLForm(e)?new FormData(e):e);ct.getAdapter=a2.getAdapter;ct.HttpStatusCode=Dd;ct.default=ct;const{Axios:RI,AxiosError:NI,CanceledError:FI,isCancel:BI,CancelToken:qI,VERSION:zI,all:HI,Cancel:UI,isAxiosError:M5,spread:GI,toFormData:KI,AxiosHeaders:VI,HttpStatusCode:WI,formToJSON:QI,getAdapter:YI,mergeConfig:XI}=ct,$5={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};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 Bt(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return rn(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(rn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,rn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,rn(d,"constructor",u),rn(u,"constructor",l),l.displayName="GeneratorFunction",rn(u,i,"GeneratorFunction"),rn(d),rn(d,i,"Generator"),rn(d,r,function(){return this}),rn(d,"toString",function(){return"[object Generator]"}),(Bt=function(){return{w:s,m:f}})()}function rn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}rn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){rn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},rn(e,t,n,r)}function A0(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 Bi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(n),!0).forEach(function(r){L5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L5(e,t,n){return(t=D5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D5(e){var t=I5(e,"string");return aa(t)=="symbol"?t:t+""}function I5(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 T0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function Gi(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){T0(s,r,i,o,a,"next",l)}function a(l){T0(s,r,i,o,a,"throw",l)}o(void 0)})}}var d2=function(){var t;return((t=$5)===null||t===void 0?void 0:t.VITE_MYYOAST_ACCESS_TOKEN)||""};function P0(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 R5="yst-insights-token",lo=ct.create({withCredentials:!0});lo.interceptors.request.use(function(){var e=Gi(Bt().m(function t(n){var r,i;return Bt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,F5();case 1:return r=s.v,s.n=2,h2();case 2:return i=s.v,n.headers=Bi(Bi(Bi({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},t)}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)},{synchronous:!1});lo.interceptors.response.use(function(e){return e},function(){var e=Gi(Bt().m(function t(n){var r;return Bt().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 Ot(e){return Id.apply(this,arguments)}function Id(){return Id=Gi(Bt().m(function e(t){var n;return Bt().w(function(r){for(;;)switch(r.n){case 0:return n=Bi({},t),delete n.baseURL,r.a(2,lo.request(Bi(Bi({},n),{},{withCredentials:!0})))}},e)})),Id.apply(this,arguments)}function f2(e){lo.defaults.baseURL=e}function j0(){return lo.defaults.baseURL}function N5(e){d2=e}var bo=null;function F5(){return Rd.apply(this,arguments)}function Rd(){return Rd=Gi(Bt().m(function e(){var t,n,r,i,s;return Bt().w(function(o){for(;;)switch(o.p=o.n){case 0:if(t=d2(),n=lo.defaults.baseURL,r=B5(t,n),i=sessionStorage.getItem(r),!i){o.n=4;break}if(o.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){o.n=2;break}return o.a(2,String(s.value));case 2:o.n=4;break;case 3:o.p=3,o.v;case 4:if(!bo){o.n=5;break}return o.a(2,bo);case 5:return bo=Gi(Bt().m(function a(){var l,u,c,d,f;return Bt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,h2();case 1:return l=h.v,h.n=2,ct.post(n+"/users/getToken",{},{headers:Bi({Authorization:"Bearer "+t},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(u=h.v,c=u.data,!(c!=null&&c.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:c.plainTextToken,validUntil:Date.parse(((d=c.accessToken)===null||d===void 0?void 0:d.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,c.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,f=h.v,ct.isAxiosError(f)?f.response?console.error("Login failed with status",f.response.status,f.response.data):f.request?console.error("Login request made but no response received",f.request):console.error("Error setting up login request",f.message):console.error("Non-Axios error during login",f);case 5:return h.p=5,bo=null,h.f(5);case 6:return h.a(2,"")}},a,null,[[0,4,5,6]])}))(),o.a(2,bo)}},e,null,[[1,3]])})),Rd.apply(this,arguments)}function B5(e,t){var n=Array.from(e+t).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return R5+":"+n}var xo=null;function h2(){return Nd.apply(this,arguments)}function Nd(){return Nd=Gi(Bt().m(function e(){var t;return Bt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(j0()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(t=P0("XSRF-TOKEN"),!t){n.n=2;break}return n.a(2,decodeURIComponent(t));case 2:if(!xo){n.n=3;break}return n.a(2,xo);case 3:return xo=Gi(Bt().m(function r(){var i;return Bt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,ct.get(((i=j0())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(P0("XSRF-TOKEN")||""));case 2:return s.p=2,xo=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,xo)}},e)})),Nd.apply(this,arguments)}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 M0(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 _e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M0(Object(n),!0).forEach(function(r){q5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q5(e,t,n){return(t=z5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z5(e){var t=H5(e,"string");return la(t)=="symbol"?t:t+""}function H5(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)}var U5=function(t,n){return Ot({url:"/brands/".concat(t,"/analysis"),method:"GET",signal:n})},Nf=function(t){return["/brands/".concat(t,"/analysis")]},G5=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:Nf(t),a=function(u){var c=u.signal;return U5(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function g2(e,t,n){var r=G5(e,t),i=fi(r,n);return i.queryKey=r.queryKey,i}var K5=function(t,n,r){return Ot({url:"/brands/".concat(t,"/analysis/").concat(n),method:"GET",signal:r})},ir=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n)]},V5=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:ir(t,n),l=function(c){var d=c.signal;return K5(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function qu(e,t,n,r){var i=V5(e,t,n),s=fi(i,r);return s.queryKey=i.queryKey,s}var W5=function(t,n){return Ot({url:"/brands/".concat(t,"/analysis/").concat(n),method:"DELETE"})},Q5=function(t){var n=["deleteSingleAnalysis"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.analysisId;return W5(u,c)};return _e({mutationFn:s},i)},Y5=function(t,n){var r=Q5(t);return Mr(r,n)},X5=function(t,n,r){return Ot({url:"/brands/".concat(t,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},Sr=function(t,n){return["/brands/".concat(t,"/analysis/").concat(n,"/status")]},Z5=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:Sr(t,n),l=function(c){var d=c.signal;return X5(t,n,d)};return _e({queryKey:a,queryFn:l,enabled:!!(t&&n)},o)};function J5(e,t,n,r){var i=Z5(e,t,n),s=fi(i,r);return s.queryKey=i.queryKey,s}var e4=function(t){return Ot({url:"/users/logout",method:"POST",signal:t})},t4=function(t){var n=["logout"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return e4()};return _e({mutationFn:s},i)},n4=function(t,n){var r=t4(t);return Mr(r,n)},r4=function(t,n){return Ot({url:"/brands/".concat(t,"/associated-brands"),method:"GET",signal:n})},su=function(t){return["/brands/".concat(t,"/associated-brands")]},i4=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:su(t),a=function(u){var c=u.signal;return r4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function s4(e,t,n){var r=i4(e,t),i=fi(r,n);return i.queryKey=r.queryKey,i}var o4=function(t,n,r){return Ot({url:"/brands/".concat(t,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},a4=function(t){var n=["createBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return o4(u,c)};return _e({mutationFn:s},i)},y2=function(t,n){var r=a4(t);return Mr(r,n)},l4=function(t,n){return Ot({url:"/brands/".concat(t,"/associated-brand-groups/").concat(n),method:"DELETE"})},u4=function(t){var n=["deleteBrandAssociationGroup"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.brandGroupId;return l4(u,c)};return _e({mutationFn:s},i)},c4=function(t,n){var r=u4(t);return Mr(r,n)},d4=function(t){return Ot({url:"/brands",method:"GET",signal:t})},rr=function(){return["/brands"]},f4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:rr(),o=function(l){var u=l.signal;return d4(u)};return _e({queryKey:s,queryFn:o},i)};function es(e,t){var n=f4(e),r=fi(n,t);return r.queryKey=n.queryKey,r}var h4=function(t,n){return Ot({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:t,signal:n})},g4=function(t){var n=["createBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.data;return h4(u)};return _e({mutationFn:s},i)},y4=function(t,n){var r=g4(t);return Mr(r,n)},m4=function(t,n){return Ot({url:"/brands/".concat(t),method:"GET",signal:n})},zu=function(t){return["/brands/".concat(t)]},p4=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:zu(t),a=function(u){var c=u.signal;return m4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function ou(e,t,n){var r=p4(e,t),i=fi(r,n);return i.queryKey=r.queryKey,i}var v4=function(t){return Ot({url:"/brands/".concat(t),method:"DELETE"})},b4=function(t){var n=["deleteBrand"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId;return v4(u)};return _e({mutationFn:s},i)},x4=function(t,n){var r=b4(t);return Mr(r,n)},w4=function(t,n){return Ot({url:"/brands/".concat(t,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},S4=function(t){var n=["updateBrandSettings"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return w4(u,c)};return _e({mutationFn:s},i)},m2=function(t,n){var r=S4(t);return Mr(r,n)},C4=function(t,n){return Ot({url:"/brands/".concat(t,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},_4=function(t){var n=["updateBrandQueries"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(a){var l=a!=null?a:{},u=l.brandId,c=l.data;return C4(u,c)};return _e({mutationFn:s},i)},k4=function(t,n){var r=_4(t);return Mr(r,n)},O4=function(t,n){return Ot({url:"/brands/".concat(t,"/query-suggestions"),method:"GET",signal:n})},E4=function(t){return["/brands/".concat(t,"/query-suggestions")]},A4=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:E4(t),a=function(u){var c=u.signal;return O4(t,c)};return _e({queryKey:o,queryFn:a,enabled:!!t},s)};function T4(e,t,n){var r=A4(e,t),i=fi(r,n);return i.queryKey=r.queryKey,i}var P4=function(t){return Ot({url:"/users/current",method:"GET",signal:t})},Hu=function(){return["/users/current"]},j4=function(t){var n,r=t!=null?t:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Hu(),o=function(l){var u=l.signal;return P4(u)};return _e({queryKey:s,queryFn:o},i)};function Uu(e,t){var n=j4(e),r=fi(n,t);return r.queryKey=n.queryKey,r}var M4=function(){return Ot({url:"/users/data",method:"DELETE"})},$4=function(t){var n=["deleteUserData"],r=t?t.mutation&&"mutationKey"in t.mutation&&t.mutation.mutationKey?t:_e(_e({},t),{},{mutation:_e(_e({},t.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return M4()};return _e({mutationFn:s},i)},L4=function(t,n){var r=$4(t);return Mr(r,n)},p2=F.createContext(void 0),D4=function(t){var n,r,i,s,o,a,l,u,c=t.children,d=t.brandId,f=t.analysisId,h=t.model,y=t.hostAppProps,m=y===void 0?{}:y,p=ol("/brands/:brandId"),v=ol("/brands/:brandId/*"),b=ol("/brands/:brandId/analysis/:analysisId"),S=ol("/brands/:brandId/analysis/:analysisId/*"),C=(b==null||(n=b.params)===null||n===void 0?void 0:n.brandId)||(S==null||(r=S.params)===null||r===void 0?void 0:r.brandId)||(v==null||(i=v.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),x=b!=null&&(o=b.params)!==null&&o!==void 0&&o.analysisId||S!=null&&(a=S.params)!==null&&a!==void 0&&a.analysisId?Number((b==null||(l=b.params)===null||l===void 0?void 0:l.analysisId)||(S==null||(u=S.params)===null||u===void 0?void 0:u.analysisId)):void 0,k=F.useMemo(function(){return{brandId:C||d||"",analysisId:x||f||"latest",model:h||"openai",hostAppProps:m}},[C,d,x,f,h,m]),w=F.useMemo(function(){return{data:k}},[k]);return g.jsx(p2.Provider,{value:w,children:c})},v2=F.createContext(void 0),I4=function(t){var n=t.children,r=t.setBrandId,i=t.setAnalysisId,s=t.setModel,o=F.useCallback(function(d){r(d),i("latest")},[r,i]),a=F.useCallback(function(d){i(d)},[i]),l=F.useCallback(function(d){s(d)},[s]),u=F.useMemo(function(){return{setBrandId:o,setAnalysisId:a,setModel:l}},[o,a,l]),c=F.useMemo(function(){return{mutations:u}},[u]);return g.jsx(v2.Provider,{value:c,children:n})};function _c(e,t){return B4(e)||F4(e,t)||N4(e,t)||R4()}function R4(){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 N4(e,t){if(e){if(typeof e=="string")return $0(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)?$0(e,t):void 0}}function $0(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 F4(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function B4(e){if(Array.isArray(e))return e}var q4=function(t){var n=t.children,r=t.hostAppProps,i=r===void 0?{}:r,s=F.useState(void 0),o=_c(s,2),a=o[0],l=o[1],u=F.useState("latest"),c=_c(u,2),d=c[0],f=c[1],h=F.useState(void 0),y=_c(h,2),m=y[0],p=y[1];return g.jsx(I4,{brandId:a,setBrandId:l,analysisId:d,setAnalysisId:f,model:m,setModel:p,children:g.jsx(D4,{brandId:a,analysisId:d,model:m,hostAppProps:i,children:n})})},Gn=function(){var t=F.useContext(p2);if(t===void 0)throw new Error("useBrandAnalysisData must be used within a BrandAnalysisDataProvider");return t.data},Va=function(){var t=F.useContext(v2);if(t===void 0)throw new Error("useBrandAnalysisMutations must be used within a BrandAnalysisMutationsProvider");return t.mutations},kc={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 M0;function B4(){return M0||(M0=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})()}(Cc)),Cc.exports}var q4=B4();const ke=Ep(q4);var z4=function(t){return e4({mutation:{onSettled:function(){t&&t()}}})};function H4(e,t){return D.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),D.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 U4=D.forwardRef(H4);function G4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const K4=D.forwardRef(G4);function V4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const W4=D.forwardRef(V4);function Q4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const Y4=D.forwardRef(Q4);function X4(e,t){return D.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),D.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"}),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const Z4=D.forwardRef(X4);function J4(e,t){return D.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),D.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 e6=D.forwardRef(J4);function t6(e,t){return D.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),D.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 n6=D.forwardRef(t6);function r6(e,t){return D.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),D.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 Rd=D.forwardRef(r6);function i6(e,t){return D.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),D.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 s6=D.forwardRef(i6);function o6(e,t){return D.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),D.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 p2=D.forwardRef(o6);function a6(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const v2=D.forwardRef(a6);function l6(e,t){return D.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),D.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 u6=D.forwardRef(l6);function c6(e,t){return D.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),D.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 d6=D.forwardRef(c6);function f6(e,t){return D.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),D.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 h6=D.forwardRef(f6);function g6(e,t){return D.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),D.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 Rf=D.forwardRef(g6);function y6(e,t){return D.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),D.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 m6=D.forwardRef(y6);var p6=function(){return[{label:"Brand analysis",href:"/",Icon:u6,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:Z4,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},$0;function v6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var L0=function(t){var n=t.className,r=zt(),i=r.pathname,s=p6();return g.jsx("div",{className:ke("yst-flex yst-flex-col yst-gap-10",n),children:g.jsx(A.SidebarNavigation.Sidebar,{children:g.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 g.jsx(A.SidebarNavigation.SubmenuItem,{className:ke("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":a}),href:o.href,to:o.href,as:ci,label:g.jsxs(g.Fragment,{children:[g.jsx(o.Icon,{className:ke($0||($0=v6(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const b6="data:image/svg+xml,%3csvg%20width='208'%20height='42'%20viewBox='0%200%20208%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='169'%20width='39'%20height='16'%20rx='8'%20fill='%23BFDBFE'/%3e%3cpath%20d='M177.869%2012V4.9541H180.813C182.151%204.9541%20182.957%205.62793%20182.957%206.70703V6.7168C182.957%207.4541%20182.41%208.1084%20181.702%208.2207V8.30859C182.649%208.39648%20183.304%209.08008%20183.304%209.99316V10.0029C183.304%2011.2383%20182.386%2012%20180.882%2012H177.869ZM180.506%205.93555H179.129V7.92285H180.345C181.238%207.92285%20181.712%207.57617%20181.712%206.93652V6.92676C181.712%206.30176%20181.268%205.93555%20180.506%205.93555ZM180.545%208.81641H179.129V11.0186H180.594C181.521%2011.0186%20182.015%2010.6328%20182.015%209.91504V9.90527C182.015%209.19238%20181.507%208.81641%20180.545%208.81641ZM186.834%2012.1074C185.247%2012.1074%20184.285%2011.043%20184.285%209.34375V9.33887C184.285%207.65918%20185.257%206.56055%20186.775%206.56055C188.294%206.56055%20189.231%207.625%20189.231%209.23633V9.63672H185.501C185.516%2010.5938%20186.033%2011.1504%20186.858%2011.1504C187.518%2011.1504%20187.894%2010.8184%20188.011%2010.5742L188.025%2010.54H189.183L189.168%2010.584C188.997%2011.2725%20188.284%2012.1074%20186.834%2012.1074ZM186.79%207.5127C186.111%207.5127%20185.604%207.97168%20185.511%208.82129H188.045C187.962%207.94727%20187.469%207.5127%20186.79%207.5127ZM192.547%2012.0244C191.321%2012.0244%20190.818%2011.6143%20190.818%2010.584V7.60547H189.988V6.66309H190.818V5.35449H192.054V6.66309H193.182V7.60547H192.054V10.2959C192.054%2010.8281%20192.264%2011.0527%20192.771%2011.0527C192.942%2011.0527%20193.035%2011.0479%20193.182%2011.0332V11.9707C193.006%2012.0049%20192.781%2012.0244%20192.547%2012.0244ZM195.848%2012.0879C194.832%2012.0879%20194.095%2011.4629%20194.095%2010.4912V10.4814C194.095%209.5293%20194.822%208.97266%20196.121%208.89453L197.493%208.81152V8.35254C197.493%207.82031%20197.146%207.52734%20196.492%207.52734C195.936%207.52734%20195.574%207.72754%20195.452%208.0791L195.447%208.09863H194.3L194.305%208.05469C194.422%207.15625%20195.281%206.56055%20196.551%206.56055C197.923%206.56055%20198.694%207.22461%20198.694%208.35254V12H197.493V11.2676H197.41C197.117%2011.7852%20196.551%2012.0879%20195.848%2012.0879ZM195.296%2010.4326C195.296%2010.8867%20195.682%2011.1553%20196.219%2011.1553C196.951%2011.1553%20197.493%2010.6768%20197.493%2010.042V9.6123L196.292%209.69043C195.613%209.73438%20195.296%209.9834%20195.296%2010.4229V10.4326Z'%20fill='%231E3A8A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.5037%2019.2842C22.9203%2019.2842%2023.2881%2019.5608%2023.402%2019.9612L24.4143%2023.5057C24.857%2025.0583%2026.071%2026.2724%2027.6236%2026.715L31.1682%2027.7273C31.6629%2027.8705%2031.9526%2028.3881%2031.8094%2028.8828C31.7215%2029.192%2031.4774%2029.4361%2031.1682%2029.524L27.6236%2030.5363C26.071%2030.9789%2024.857%2032.193%2024.4143%2033.7456L23.402%2037.2901C23.2588%2037.7849%2022.7413%2038.0745%2022.2466%2037.9313C21.9373%2037.8434%2021.6932%2037.5993%2021.6053%2037.2901L20.5931%2033.7456C20.1504%2032.193%2018.9364%2030.9789%2017.3838%2030.5363L13.8392%2029.524C13.3445%2029.3808%2013.0548%2028.8633%2013.198%2028.3685C13.2859%2028.0593%2013.53%2027.8152%2013.8392%2027.7273L17.3838%2026.715C18.9364%2026.2724%2020.1504%2025.0583%2020.5931%2023.5057L21.6053%2019.9612C21.7193%2019.5608%2022.0871%2019.2842%2022.5037%2019.2842Z'%20fill='url(%23paint0_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.3742%2012C13.6573%2012%2013.9047%2012.192%2013.9731%2012.4654L14.1846%2013.315C14.3799%2014.0864%2014.9821%2014.6918%2015.7535%2014.8838L16.603%2015.0954C16.9318%2015.1768%2017.1335%2015.512%2017.0522%2015.8407C16.9968%2016.0621%2016.8243%2016.2346%2016.603%2016.2899L15.7535%2016.5015C14.9821%2016.6968%2014.3767%2017.2989%2014.1846%2018.0703L13.9731%2018.9199C13.8917%2019.2486%2013.5564%2019.4504%2013.2277%2019.369C13.0064%2019.3137%2012.8339%2019.1412%2012.7785%2018.9199L12.567%2018.0703C12.3749%2017.2989%2011.7695%2016.6935%2010.9981%2016.5015L10.1486%2016.2899C9.81986%2016.2085%209.61805%2015.8733%209.69943%2015.5446C9.75476%2015.3232%209.92727%2015.1507%2010.1486%2015.0954L10.9981%2014.8838C11.7695%2014.6918%2012.3749%2014.0864%2012.567%2013.315L12.7785%2012.4654C12.8469%2012.192%2013.0943%2012%2013.3774%2012H13.3742Z'%20fill='url(%23paint1_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.39254%2026.8813C6.54226%2026.8813%206.67571%2026.979%206.72453%2027.1189L6.90681%2027.669C6.97516%2027.8773%207.1379%2028.0401%207.34947%2028.1117L7.89954%2028.294C8.08181%2028.3558%208.17946%2028.5543%208.12087%2028.7366C8.08507%2028.8408%208.0037%2028.9222%207.89954%2028.958L7.34947%2029.1402C7.14116%2029.2086%206.97841%2029.3713%206.90681%2029.5829L6.72453%2030.133C6.66269%2030.3152%206.46414%2030.4129%206.28187%2030.3543C6.17771%2030.3185%206.09634%2030.2371%206.06054%2030.133L5.87827%2029.5829C5.80992%2029.3746%205.64392%2029.2118%205.4356%2029.1402L4.88553%2028.958C4.70326%2028.8961%204.60561%2028.6976%204.6642%2028.5153C4.7%2028.4111%204.78138%2028.3298%204.88553%2028.294L5.4356%2028.1117C5.64392%2028.0433%205.80666%2027.8806%205.87827%2027.669L6.06054%2027.1189C6.10936%2026.9757%206.24281%2026.8813%206.39254%2026.8813Z'%20fill='url(%23paint2_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.80904%2033.5596C2.95876%2033.5596%203.09221%2033.6572%203.14104%2033.7972L3.32331%2034.3473C3.39166%2034.5556%203.5544%2034.7183%203.76597%2034.7899L4.31604%2034.9722C4.49832%2035.034%204.59596%2035.2326%204.53737%2035.4148C4.50157%2035.519%204.4202%2035.6004%204.31604%2035.6362L3.76597%2035.8185C3.55766%2035.8868%203.39492%2036.0495%203.32331%2036.2611L3.14104%2036.8112C3.07919%2036.9935%202.88065%2037.0911%202.69837%2037.0325C2.59422%2036.9967%202.51285%2036.9153%202.47704%2036.8112L2.29477%2036.2611C2.22642%2036.0528%202.06042%2035.8901%201.85211%2035.8185L1.30204%2035.6362C1.11976%2035.5743%201.02212%2035.3758%201.0807%2035.1935C1.11651%2035.0894%201.19788%2035.008%201.30204%2034.9722L1.85211%2034.7899C2.06042%2034.7216%202.22316%2034.5588%202.29477%2034.3473L2.47704%2033.7972C2.52587%2033.654%202.65931%2033.5596%202.80904%2033.5596Z'%20fill='url(%23paint3_radial_4548_14216)'/%3e%3cpath%20d='M2.42488%2032.7235C1.94641%2031.4476%201.68277%2030.0676%201.68277%2028.6256C1.68277%2023.5806%204.89532%2019.2712%209.38379%2017.634L8.79466%2016.0586C3.66498%2017.9269%200%2022.8483%200%2028.6256C0%2030.2661%200.296193%2031.835%200.836502%2033.2866L2.42488%2032.7268V32.7235Z'%20fill='url(%23paint4_radial_4548_14216)'/%3e%3cpath%20d='M20.6587%2037.7652C18.6602%2039.3633%2016.1279%2040.3202%2013.3743%2040.3202C10.0023%2040.3202%206.96221%2038.8849%204.82702%2036.5967L3.58691%2037.7359C6.02807%2040.3593%209.51078%2041.9998%2013.3776%2041.9998C16.5218%2041.9998%2019.4121%2040.9159%2021.6938%2039.0997L20.662%2037.7684L20.6587%2037.7652Z'%20fill='url(%23paint5_radial_4548_14216)'/%3e%3cpath%20d='M13.3739%2022.3664C15.0436%2022.3664%2016.5604%2023.0238%2017.6833%2024.0914L18.8095%2022.8383C17.3904%2021.5038%2015.4798%2020.6836%2013.3771%2020.6836C9.89444%2020.6836%206.93902%2022.9262%205.86816%2026.0476L7.44678%2026.627C8.28328%2024.1533%2010.6235%2022.3631%2013.3771%2022.3631L13.3739%2022.3664Z'%20fill='url(%23paint6_radial_4548_14216)'/%3e%3cpath%20d='M17.6737%2033.1658C16.5508%2034.2301%2015.0373%2034.8843%2013.3741%2034.8843C10.6074%2034.8843%208.2574%2033.0811%207.43392%2030.5879L5.84229%2031.1249C6.89035%2034.2822%209.8653%2036.5638%2013.3773%2036.5638C15.4832%2036.5638%2017.3971%2035.7436%2018.8162%2034.4059L17.677%2033.169L17.6737%2033.1658Z'%20fill='url(%23paint7_radial_4548_14216)'/%3e%3cpath%20d='M39.169%2021.2891H43.677C45.7666%2021.2891%2047.2802%2021.595%2048.2111%2022.2037C49.142%2022.8123%2049.6074%2023.7758%2049.6074%2025.0908C49.6074%2025.9761%2049.3796%2026.7149%2048.9206%2027.3041C48.4617%2027.8932%2047.8075%2028.2642%2046.9482%2028.414V28.5181C48.0158%2028.7199%2048.8002%2029.1138%2049.3014%2029.7062C49.8027%2030.2985%2050.0533%2031.0992%2050.0533%2032.1115C50.0533%2033.4753%2049.5781%2034.5429%2048.6244%2035.3143C47.6707%2036.0857%2046.3493%2036.473%2044.6502%2036.473H39.1658V21.2891H39.169ZM41.6525%2027.5645H44.0416C45.0799%2027.5645%2045.8383%2027.3985%2046.3167%2027.0697C46.7952%2026.741%2047.0328%2026.1811%2047.0328%2025.3935C47.0328%2024.6806%2046.7757%2024.1631%2046.2581%2023.8474C45.7406%2023.5284%2044.9236%2023.3689%2043.8007%2023.3689H41.6492V27.5645H41.6525ZM41.6525%2029.5792V34.3867H44.2889C45.3272%2034.3867%2046.1117%2034.1881%2046.6422%2033.791C47.1728%2033.3939%2047.4364%2032.7657%2047.4364%2031.9065C47.4364%2031.1188%2047.1662%2030.5329%2046.6259%2030.1521C46.0856%2029.7713%2045.2654%2029.5792%2044.1653%2029.5792H41.6525Z'%20fill='url(%23paint8_linear_4548_14216)'/%3e%3cpath%20d='M58.7762%2024.7817C59.2677%2024.7817%2059.6713%2024.8175%2059.9902%2024.8859L59.7526%2027.161C59.4076%2027.0764%2059.0463%2027.0374%2058.672%2027.0374C57.6955%2027.0374%2056.9046%2027.3563%2056.2992%2027.9943C55.6938%2028.6322%2055.3911%2029.459%2055.3911%2030.4778V36.4797H52.95V24.9933H54.8606L55.1828%2027.0178H55.3065C55.6873%2026.3311%2056.1853%2025.7908%2056.7972%2025.3871C57.4091%2024.9868%2058.0699%2024.785%2058.7762%2024.785V24.7817Z'%20fill='url(%23paint9_linear_4548_14216)'/%3e%3cpath%20d='M69.309%2036.4734L68.8208%2034.8753H68.7394C68.1861%2035.575%2067.6295%2036.0503%2067.0664%2036.3041C66.5065%2036.558%2065.784%2036.685%2064.9051%2036.685C63.7757%2036.685%2062.8969%2036.379%2062.2622%2035.7703C61.6275%2035.1617%2061.3118%2034.2991%2061.3118%2033.186C61.3118%2032.0012%2061.7512%2031.1094%2062.63%2030.5072C63.5088%2029.9051%2064.8498%2029.5763%2066.6498%2029.521L68.632%2029.4591V28.8472C68.632%2028.1116%2068.4595%2027.5648%2068.1177%2027.2003C67.7759%2026.8357%2067.2421%2026.6534%2066.5228%2026.6534C65.9337%2026.6534%2065.3706%2026.7413%2064.8303%2026.9138C64.29%2027.0864%2063.7692%2027.2914%2063.2712%2027.5258L62.4803%2025.7811C63.1019%2025.4557%2063.7855%2025.2083%2064.5276%2025.039C65.2697%2024.8698%2065.9662%2024.7852%2066.627%2024.7852C68.0884%2024.7852%2069.1918%2025.1041%2069.9339%2025.7421C70.6793%2026.38%2071.0503%2027.3793%2071.0503%2028.7431V36.4799H69.3057L69.309%2036.4734ZM65.6733%2034.8134C66.5586%2034.8134%2067.2714%2034.566%2067.8085%2034.0713C68.3455%2033.5766%2068.6124%2032.8833%2068.6124%2031.9882V30.9922L67.138%2031.054C65.989%2031.0963%2065.1525%2031.2884%2064.6285%2031.6301C64.1044%2031.9719%2063.8441%2032.4992%2063.8441%2033.2055C63.8441%2033.7165%2063.997%2034.1136%2064.2997%2034.3935C64.6057%2034.6734%2065.0614%2034.8134%2065.67%2034.8134H65.6733Z'%20fill='url(%23paint10_linear_4548_14216)'/%3e%3cpath%20d='M84.5646%2036.4732H82.1137V29.4102C82.1137%2028.5248%2081.9347%2027.8641%2081.5799%2027.4279C81.2219%2026.9918%2080.6588%2026.7737%2079.8809%2026.7737C78.8491%2026.7737%2078.0939%2027.0797%2077.6155%2027.6883C77.137%2028.297%2076.8994%2029.319%2076.8994%2030.7512V36.4732H74.4583V24.9868H76.3689L76.7106%2026.4938H76.8343C77.1793%2025.947%2077.6708%2025.5238%2078.3088%2025.2277C78.9467%2024.9315%2079.653%2024.7817%2080.4277%2024.7817C83.1846%2024.7817%2084.5614%2026.1846%2084.5614%2028.987V36.4765L84.5646%2036.4732Z'%20fill='url(%23paint11_linear_4548_14216)'/%3e%3cpath%20d='M91.836%2036.6814C90.4038%2036.6814%2089.2841%2036.1606%2088.4802%2035.1223C87.6762%2034.084%2087.2759%2032.6258%2087.2759%2030.751C87.2759%2028.8762%2087.6827%2027.4018%2088.4965%2026.3537C89.3102%2025.3056%2090.4364%2024.7816%2091.8783%2024.7816C93.3202%2024.7816%2094.5375%2025.3382%2095.3252%2026.4546H95.4489C95.3317%2025.6311%2095.2731%2024.9802%2095.2731%2024.5017V20.3159H97.724V36.4763H95.8134L95.387%2034.9693H95.2731C94.4919%2036.1118%2093.3462%2036.6847%2091.836%2036.6847V36.6814ZM92.4902%2034.709C93.4927%2034.709%2094.225%2034.4258%2094.6807%2033.8627C95.1364%2033.2996%2095.374%2032.3817%2095.387%2031.1156V30.7738C95.387%2029.3254%2095.1527%2028.2969%2094.6807%2027.6882C94.2088%2027.0795%2093.4732%2026.7736%2092.4674%2026.7736C91.6081%2026.7736%2090.9474%2027.1219%2090.4852%2027.8184C90.023%2028.5149%2089.7886%2029.5044%2089.7886%2030.7933C89.7886%2032.0823%2090.0132%2033.0392%2090.4624%2033.7065C90.9116%2034.3737%2091.5886%2034.709%2092.4869%2034.709H92.4902Z'%20fill='url(%23paint12_linear_4548_14216)'/%3e%3cpath%20d='M106.997%2036.473V21.2891H109.481V36.473H106.997Z'%20fill='url(%23paint13_linear_4548_14216)'/%3e%3cpath%20d='M123.334%2036.4732H120.883V29.4102C120.883%2028.5248%20120.704%2027.8641%20120.349%2027.4279C119.991%2026.9918%20119.428%2026.7737%20118.65%2026.7737C117.618%2026.7737%20116.863%2027.0797%20116.385%2027.6883C115.906%2028.297%20115.668%2029.319%20115.668%2030.7512V36.4732H113.227V24.9868H115.138L115.48%2026.4938H115.603C115.948%2025.947%20116.44%2025.5238%20117.078%2025.2277C117.716%2024.9315%20118.422%2024.7817%20119.197%2024.7817C121.954%2024.7817%20123.33%2026.1846%20123.33%2028.987V36.4765L123.334%2036.4732Z'%20fill='url(%23paint14_linear_4548_14216)'/%3e%3cpath%20d='M134.449%2033.2019C134.449%2034.3249%20134.039%2035.1841%20133.222%2035.783C132.405%2036.3819%20131.233%2036.6814%20129.71%2036.6814C128.187%2036.6814%20126.95%2036.4503%20126.022%2035.9848V33.8757C127.373%2034.4974%20128.629%2034.8098%20129.791%2034.8098C131.295%2034.8098%20132.044%2034.3574%20132.044%2033.4493C132.044%2033.1596%20131.959%2032.9155%20131.793%2032.7235C131.627%2032.5314%20131.354%2032.3296%20130.973%2032.1213C130.592%2031.913%20130.062%2031.6786%20129.385%2031.415C128.063%2030.904%20127.168%2030.3897%20126.699%2029.8787C126.231%2029.3677%20126%2028.7004%20126%2027.8835C126%2026.9005%20126.397%2026.1389%20127.188%2025.592C127.982%2025.0485%20129.059%2024.7783%20130.423%2024.7783C131.787%2024.7783%20133.05%2025.0517%20134.254%2025.5986L133.466%2027.4376C132.226%2026.9265%20131.185%2026.6694%20130.342%2026.6694C129.053%2026.6694%20128.411%2027.0372%20128.411%2027.7695C128.411%2028.1308%20128.581%2028.4335%20128.916%2028.6842C129.251%2028.9348%20129.983%2029.2766%20131.113%2029.7127C132.06%2030.0805%20132.75%2030.4158%20133.18%2030.7217C133.609%2031.0277%20133.928%2031.3792%20134.137%2031.7763C134.345%2032.1734%20134.449%2032.6519%20134.449%2033.2052V33.2019Z'%20fill='url(%23paint15_linear_4548_14216)'/%3e%3cpath%20d='M136.939%2021.9434C136.939%2021.5072%20137.059%2021.172%20137.297%2020.9344C137.535%2020.6968%20137.876%2020.5796%20138.319%2020.5796C138.762%2020.5796%20139.081%2020.6968%20139.322%2020.9344C139.562%2021.1687%20139.68%2021.504%20139.68%2021.9434C139.68%2022.3828%20139.559%2022.6855%20139.322%2022.9264C139.084%2023.164%20138.749%2023.2844%20138.319%2023.2844C137.889%2023.2844%20137.535%2023.164%20137.297%2022.9264C137.059%2022.6887%20136.939%2022.36%20136.939%2021.9434ZM139.527%2036.4731H137.085V24.9867H139.527V36.4731Z'%20fill='url(%23paint16_linear_4548_14216)'/%3e%3cpath%20d='M152.715%2024.987V26.328L150.752%2026.6925C150.931%2026.9334%20151.081%2027.2328%20151.198%2027.5843C151.316%2027.9359%20151.374%2028.3102%20151.374%2028.7073C151.374%2029.892%20150.964%2030.8229%20150.147%2031.5C149.33%2032.177%20148.204%2032.5187%20146.772%2032.5187C146.404%2032.5187%20146.072%2032.4927%20145.776%2032.4373C145.248%2032.7628%20144.988%2033.1437%20144.988%2033.5798C144.988%2033.8435%20145.112%2034.0387%20145.356%2034.1722C145.603%2034.3024%20146.052%2034.3707%20146.71%2034.3707H148.715C149.981%2034.3707%20150.945%2034.6409%20151.602%2035.1812C152.259%2035.7215%20152.588%2036.4994%20152.588%2037.5182C152.588%2038.8202%20152.051%2039.8227%20150.977%2040.529C149.903%2041.2353%20148.354%2041.5868%20146.326%2041.5868C144.76%2041.5868%20143.566%2041.3101%20142.742%2040.7568C141.919%2040.2035%20141.505%2039.4125%20141.505%2038.3905C141.505%2037.6842%20141.73%2037.0918%20142.176%2036.6101C142.622%2036.1284%20143.247%2035.7964%20144.051%2035.6076C143.725%2035.4676%20143.455%2035.2463%20143.247%2034.9371C143.035%2034.6279%20142.931%2034.3056%20142.931%2033.9671C142.931%2033.5375%20143.051%2033.173%20143.296%2032.8768C143.54%2032.5806%20143.898%2032.2844%20144.376%2031.9947C143.781%2031.7376%20143.299%2031.3209%20142.928%2030.7416C142.557%2030.1655%20142.371%2029.4884%20142.371%2028.7105C142.371%2027.4639%20142.765%2026.4972%20143.549%2025.8137C144.334%2025.1269%20145.454%2024.7852%20146.908%2024.7852C147.234%2024.7852%20147.576%2024.8079%20147.93%2024.8535C148.289%2024.8991%20148.555%2024.9446%20148.734%2024.9935H152.712L152.715%2024.987ZM143.689%2038.2603C143.689%2038.7876%20143.927%2039.1912%20144.402%2039.4744C144.877%2039.7576%20145.541%2039.9008%20146.401%2039.9008C147.729%2039.9008%20148.721%2039.7087%20149.372%2039.3279C150.023%2038.9471%20150.349%2038.4426%20150.349%2037.8111C150.349%2037.3131%20150.17%2036.9584%20149.815%2036.7468C149.457%2036.5352%20148.796%2036.4311%20147.826%2036.4311H145.978C145.278%2036.4311%20144.721%2036.5971%20144.311%2036.9258C143.898%2037.2546%20143.693%2037.7005%20143.693%2038.2603H143.689ZM144.741%2028.7073C144.741%2029.4266%20144.926%2029.9799%20145.297%2030.3705C145.668%2030.7578%20146.199%2030.9531%20146.892%2030.9531C148.305%2030.9531%20149.011%2030.198%20149.011%2028.6877C149.011%2027.9391%20148.835%2027.363%20148.487%2026.9594C148.139%2026.5558%20147.605%2026.3507%20146.892%2026.3507C146.179%2026.3507%20145.652%2026.5526%20145.288%2026.9529C144.923%2027.3532%20144.741%2027.9391%20144.741%2028.7073Z'%20fill='url(%23paint17_linear_4548_14216)'/%3e%3cpath%20d='M164.95%2036.4729H162.499V29.4099C162.499%2028.5245%20162.32%2027.8638%20161.965%2027.4276C161.607%2026.9915%20161.044%2026.7734%20160.266%2026.7734C159.241%2026.7734%20158.489%2027.0794%20158.007%2027.6913C157.526%2028.3032%20157.285%2029.3317%20157.285%2030.7704V36.4729H154.844V20.3125H157.285V24.4136C157.285%2025.0711%20157.243%2025.7742%20157.161%2026.5228H157.317C157.649%2025.9695%20158.112%2025.5398%20158.704%2025.2339C159.296%2024.9279%20159.986%2024.7782%20160.774%2024.7782C163.557%2024.7782%20164.95%2026.181%20164.95%2028.9835V36.4729Z'%20fill='url(%23paint18_linear_4548_14216)'/%3e%3cpath%20d='M172.625%2034.709C173.221%2034.709%20173.816%2034.6146%20174.412%2034.4291V36.2681C174.142%2036.3853%20173.794%2036.4829%20173.367%2036.5643C172.941%2036.6424%20172.501%2036.6847%20172.042%2036.6847C169.728%2036.6847%20168.573%2035.4674%20168.573%2033.0295V26.8387H167.004V25.7581L168.687%2024.863L169.517%2022.4316H171.024V24.9867H174.295V26.8355H171.024V32.9839C171.024%2033.5731%20171.17%2034.006%20171.466%2034.2859C171.763%2034.5658%20172.147%2034.7058%20172.625%2034.7058V34.709Z'%20fill='url(%23paint19_linear_4548_14216)'/%3e%3cpath%20d='M184.424%2033.2019C184.424%2034.3249%20184.014%2035.1841%20183.197%2035.783C182.38%2036.3819%20181.208%2036.6814%20179.685%2036.6814C178.161%2036.6814%20176.925%2036.4503%20175.997%2035.9848V33.8757C177.348%2034.4974%20178.604%2034.8098%20179.766%2034.8098C181.27%2034.8098%20182.018%2034.3574%20182.018%2033.4493C182.018%2033.1596%20181.934%2032.9155%20181.768%2032.7235C181.602%2032.5314%20181.328%2032.3296%20180.948%2032.1213C180.567%2031.913%20180.036%2031.6786%20179.359%2031.415C178.038%2030.904%20177.143%2030.3897%20176.674%2029.8787C176.205%2029.3677%20175.974%2028.7004%20175.974%2027.8835C175.974%2026.9005%20176.371%2026.1389%20177.162%2025.592C177.956%2025.0485%20179.034%2024.7783%20180.397%2024.7783C181.761%2024.7783%20183.024%2025.0517%20184.228%2025.5986L183.441%2027.4376C182.201%2026.9265%20181.159%2026.6694%20180.316%2026.6694C179.027%2026.6694%20178.386%2027.0372%20178.386%2027.7695C178.386%2028.1308%20178.555%2028.4335%20178.89%2028.6842C179.226%2028.9348%20179.958%2029.2766%20181.088%2029.7127C182.035%2030.0805%20182.725%2030.4158%20183.154%2030.7217C183.584%2031.0277%20183.903%2031.3792%20184.111%2031.7763C184.32%2032.1734%20184.424%2032.6519%20184.424%2033.2052V33.2019Z'%20fill='url(%23paint20_linear_4548_14216)'/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0672%2015.5248)%20scale(61.1655%2061.1655)'%3e%3cstop%20offset='0.17'%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0676%2015.525)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint2_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8974)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint3_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8984)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint4_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint5_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint6_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0673%2015.5246)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint7_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0675%20-58.8983)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3clinearGradient%20id='paint8_linear_4548_14216'%20x1='27.6858'%20y1='26.9883'%20x2='184.655'%20y2='47.7609'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint9_linear_4548_14216'%20x1='27.7019'%20y1='26.8681'%20x2='184.671'%20y2='47.6374'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint10_linear_4548_14216'%20x1='27.8582'%20y1='25.703'%20x2='184.827'%20y2='46.4723'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint11_linear_4548_14216'%20x1='28.0796'%20y1='24.0657'%20x2='185.049'%20y2='44.835'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint12_linear_4548_14216'%20x1='28.6426'%20y1='19.7724'%20x2='185.612'%20y2='40.5417'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint13_linear_4548_14216'%20x1='28.8281'%20y1='18.376'%20x2='185.794'%20y2='39.1453'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint14_linear_4548_14216'%20x1='28.7407'%20y1='19.0206'%20x2='185.71'%20y2='39.7899'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint15_linear_4548_14216'%20x1='28.9621'%20y1='17.367'%20x2='185.928'%20y2='38.1363'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint16_linear_4548_14216'%20x1='29.382'%20y1='14.187'%20x2='186.351'%20y2='34.9563'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint17_linear_4548_14216'%20x1='28.9585'%20y1='17.3836'%20x2='185.928'%20y2='38.1529'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint18_linear_4548_14216'%20x1='29.7136'%20y1='11.6741'%20x2='186.683'%20y2='32.4466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint19_linear_4548_14216'%20x1='29.8241'%20y1='10.8313'%20x2='186.794'%20y2='31.6039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint20_linear_4548_14216'%20x1='29.8206'%20y1='10.867'%20x2='186.79'%20y2='31.6364'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function x6(e,t){return _6(e)||C6(e,t)||S6(e,t)||w6()}function w6(){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
|
|
24
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b2(e,t){if(e){if(typeof e=="string")return Nd(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)?Nd(e,t):void 0}}function Nd(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 G6(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function K6(e){if(Array.isArray(e))return e}var Nf=F.createContext(void 0),V6=function(t){var n=t.children,r=F.useState([]),i=H6(r,2),s=i[0],o=i[1],a=F.useCallback(function(u){o(function(c){return c.filter(function(d){return d.id!==u})})},[]),l=F.useCallback(function(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(function(d){var f,h,y=typeof u=="string"?d.some(function(b){return typeof b.message!="string"?!1:b.message===u&&b.variant===(c.variant||"info")}):!1;if(y)return d;var m="toast-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,11)),p=(f=c.duration)!==null&&f!==void 0?f:5e3,v={id:m,message:u,variant:c.variant||"info",duration:p,dismissible:(h=c.dismissible)!==null&&h!==void 0?h:!0};return p>0&&setTimeout(function(){a(m)},p),[].concat(F6(d),[v])})},[a]);return g.jsx(Nf.Provider,{value:{toasts:s,addToast:l,removeToast:a},children:n})},W6=function(){var t=F.useContext(Nf);if(!t)return null;var n=t.toasts,r=t.removeToast;if(typeof window=="undefined")return null;var i=document.getElementById("hook-toasts");return i?Op.createPortal(g.jsx("div",{className:ke("yst-w-full yst-space-y-4"),"aria-live":"polite","aria-atomic":"true",children:n.map(function(s){var o;return g.jsxs(A.Toast,{className:ke("yst-w-full",s.className),id:s.id,variant:s.variant||"info",autoDismiss:s.dismissible?0:(o=s.duration)!==null&&o!==void 0?o:1500,onDismiss:function(){return r(s.id)},isVisible:!0,setIsVisible:function(){},children:[g.jsxs("div",{className:"yst-flex yst-gap-3",children:[g.jsx("div",{className:"yst-flex-shrink-0",children:g.jsx(A.ValidationIcon,{className:"yst-h-5 yst-w-5",variant:s.variant})}),g.jsxs("div",{className:"yst-flex-1",children:[typeof s.title=="string"?g.jsx(A.Title,{title:s.title}):s.title,typeof s.message=="string"?g.jsx("p",{className:"yst-mb-0",children:s.message}):s.message]}),s.dismissible&&g.jsx("div",{children:g.jsx(A.Toast.Close,{className:"yst-p-0 yst-text-slate-400",dismissScreenReaderLabel:"Dismiss"})})]}),s.actions&&g.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-3",children:g.jsx(s.actions,{dismiss:function(){return r(s.id)}})})]},s.id)})}),i):null},Ff=function(){var t=F.useContext(Nf);if(!t)throw new Error("useToast must be used within a ToastProvider");var n=t.addToast;return F.useCallback(function(r,i){n(r,i)},[n])},Q6={openai:"openai",perplexity:"perplexity",anthropic:"anthropic"},Y6={updating:"updating"},vi={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},X6=function(t){return typeof t=="string"&&t!=="latest"&&t.trim().length>0};function Z6(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 x2=D.forwardRef(Z6);function J6(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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_=D.forwardRef(J6);function t_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 w2=D.forwardRef(t_);function n_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 S2=D.forwardRef(n_);function r_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const i_=D.forwardRef(r_);function s_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const o_=D.forwardRef(s_);function a_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}const B0=D.forwardRef(a_);function l_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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"}),D.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 C2=D.forwardRef(l_);function u_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 c_=D.forwardRef(u_);function d_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const _2=D.forwardRef(d_);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)}var f_=["children","as","startColor","endColor","angle","disabled","style","className"];function q0(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 z0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(n),!0).forEach(function(r){h_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h_(e,t,n){return(t=g_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g_(e){var t=y_(e,"string");return ua(t)=="symbol"?t:t+""}function y_(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 m_(e,t){if(e==null)return{};var n,r,i=p_(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 p_(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 Uu=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,u=t.angle,c=u===void 0?102:u,d=t.disabled,f=d===void 0?!1:d,h=t.style,y=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=m_(t,f_),b=z0(f?{display:"inline-block"}:{background:"linear-gradient(".concat(c,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},y);return g.jsx(i,{className:p,style:b,...v,children:n})};function Bf(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return g.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 v_=function(){var t=vn();return g.jsx("form",{onSubmit:function(){return t("/setup")},children:g.jsxs(A.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[g.jsx(A.Paper.Header,{children:g.jsxs(A.Title,{size:"1",children:["Welcome to ",g.jsx(Uu,{children:"Yoast AI Brand Insights"}),"!"]})}),g.jsxs(A.Paper.Content,{className:"yst-space-y-8",children:[g.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[g.jsx("p",{children:"See how your brand is represented in AI answers."}),g.jsxs("p",{children:[g.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."]}),g.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),g.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 g.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[g.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[g.jsx(A.Stepper.Step,{isActive:!0,isComplete:!1,children:g.jsx("span",{className:"yst-hidden",children:r+1})}),g.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:[g.jsx(A.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),g.jsx("p",{className:"yst-my-0 yst-py-0",children:n.description})]})]}),r<i.length-1&&g.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)})})]}),g.jsx(Bf,{className:"yst-justify-end",children:g.jsxs(A.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",g.jsx(e_,{})]})})]})})};function ca(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Va(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,u=e.delta,c=e.deltaFormat,d=c===void 0?"absolute":c,f=e.deltaSuffix,h=e.scoreFormat,y=h===void 0?"absolute":h;return g.jsxs("div",{className:ke(o,"yst-font-medium"),children:[g.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&&y==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&g.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&g.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof u=="number"&&!isNaN(u)&&g.jsxs("span",{className:ke("yst-ml-2",ca(u)),children:[u>-1&&"+",u,d==="percentage"&&"%"," ",f]})]})}var b_=["Icon","className","children","position","id"];function x_(e,t){return __(e)||C_(e,t)||S_(e,t)||w_()}function w_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
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
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
22
|
+
*/var L0;function z4(){return L0||(L0=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})()}(kc)),kc.exports}var H4=z4();const ke=Tp(H4);var U4=function(t){return n4({mutation:{onSettled:function(){t&&t()}}})};function G4(e,t){return D.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),D.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 K4=D.forwardRef(G4);function V4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const W4=D.forwardRef(V4);function Q4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const Y4=D.forwardRef(Q4);function X4(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const Z4=D.forwardRef(X4);function J4(e,t){return D.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),D.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"}),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const e6=D.forwardRef(J4);function t6(e,t){return D.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),D.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 n6=D.forwardRef(t6);function r6(e,t){return D.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),D.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 i6=D.forwardRef(r6);function s6(e,t){return D.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),D.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 Fd=D.forwardRef(s6);function o6(e,t){return D.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),D.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 a6=D.forwardRef(o6);function l6(e,t){return D.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),D.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 b2=D.forwardRef(l6);function u6(e,t){return D.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),D.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const x2=D.forwardRef(u6);function c6(e,t){return D.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),D.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 d6=D.forwardRef(c6);function f6(e,t){return D.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),D.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 h6=D.forwardRef(f6);function g6(e,t){return D.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),D.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 y6=D.forwardRef(g6);function m6(e,t){return D.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),D.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 Ff=D.forwardRef(m6);function p6(e,t){return D.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),D.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 v6=D.forwardRef(p6);var b6=function(){return[{label:"Brand analysis",href:"/",Icon:d6,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:e6,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},D0;function x6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var I0=function(t){var n=t.className,r=qt(),i=r.pathname,s=b6();return g.jsx("div",{className:ke("yst-flex yst-flex-col yst-gap-10",n),children:g.jsx(E.SidebarNavigation.Sidebar,{children:g.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 g.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:di,label:g.jsxs(g.Fragment,{children:[g.jsx(o.Icon,{className:ke(D0||(D0=x6(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),o.label]})},o.label)})})})})};const w6="data:image/svg+xml,%3csvg%20width='208'%20height='42'%20viewBox='0%200%20208%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='169'%20width='39'%20height='16'%20rx='8'%20fill='%23BFDBFE'/%3e%3cpath%20d='M177.869%2012V4.9541H180.813C182.151%204.9541%20182.957%205.62793%20182.957%206.70703V6.7168C182.957%207.4541%20182.41%208.1084%20181.702%208.2207V8.30859C182.649%208.39648%20183.304%209.08008%20183.304%209.99316V10.0029C183.304%2011.2383%20182.386%2012%20180.882%2012H177.869ZM180.506%205.93555H179.129V7.92285H180.345C181.238%207.92285%20181.712%207.57617%20181.712%206.93652V6.92676C181.712%206.30176%20181.268%205.93555%20180.506%205.93555ZM180.545%208.81641H179.129V11.0186H180.594C181.521%2011.0186%20182.015%2010.6328%20182.015%209.91504V9.90527C182.015%209.19238%20181.507%208.81641%20180.545%208.81641ZM186.834%2012.1074C185.247%2012.1074%20184.285%2011.043%20184.285%209.34375V9.33887C184.285%207.65918%20185.257%206.56055%20186.775%206.56055C188.294%206.56055%20189.231%207.625%20189.231%209.23633V9.63672H185.501C185.516%2010.5938%20186.033%2011.1504%20186.858%2011.1504C187.518%2011.1504%20187.894%2010.8184%20188.011%2010.5742L188.025%2010.54H189.183L189.168%2010.584C188.997%2011.2725%20188.284%2012.1074%20186.834%2012.1074ZM186.79%207.5127C186.111%207.5127%20185.604%207.97168%20185.511%208.82129H188.045C187.962%207.94727%20187.469%207.5127%20186.79%207.5127ZM192.547%2012.0244C191.321%2012.0244%20190.818%2011.6143%20190.818%2010.584V7.60547H189.988V6.66309H190.818V5.35449H192.054V6.66309H193.182V7.60547H192.054V10.2959C192.054%2010.8281%20192.264%2011.0527%20192.771%2011.0527C192.942%2011.0527%20193.035%2011.0479%20193.182%2011.0332V11.9707C193.006%2012.0049%20192.781%2012.0244%20192.547%2012.0244ZM195.848%2012.0879C194.832%2012.0879%20194.095%2011.4629%20194.095%2010.4912V10.4814C194.095%209.5293%20194.822%208.97266%20196.121%208.89453L197.493%208.81152V8.35254C197.493%207.82031%20197.146%207.52734%20196.492%207.52734C195.936%207.52734%20195.574%207.72754%20195.452%208.0791L195.447%208.09863H194.3L194.305%208.05469C194.422%207.15625%20195.281%206.56055%20196.551%206.56055C197.923%206.56055%20198.694%207.22461%20198.694%208.35254V12H197.493V11.2676H197.41C197.117%2011.7852%20196.551%2012.0879%20195.848%2012.0879ZM195.296%2010.4326C195.296%2010.8867%20195.682%2011.1553%20196.219%2011.1553C196.951%2011.1553%20197.493%2010.6768%20197.493%2010.042V9.6123L196.292%209.69043C195.613%209.73438%20195.296%209.9834%20195.296%2010.4229V10.4326Z'%20fill='%231E3A8A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.5037%2019.2842C22.9203%2019.2842%2023.2881%2019.5608%2023.402%2019.9612L24.4143%2023.5057C24.857%2025.0583%2026.071%2026.2724%2027.6236%2026.715L31.1682%2027.7273C31.6629%2027.8705%2031.9526%2028.3881%2031.8094%2028.8828C31.7215%2029.192%2031.4774%2029.4361%2031.1682%2029.524L27.6236%2030.5363C26.071%2030.9789%2024.857%2032.193%2024.4143%2033.7456L23.402%2037.2901C23.2588%2037.7849%2022.7413%2038.0745%2022.2466%2037.9313C21.9373%2037.8434%2021.6932%2037.5993%2021.6053%2037.2901L20.5931%2033.7456C20.1504%2032.193%2018.9364%2030.9789%2017.3838%2030.5363L13.8392%2029.524C13.3445%2029.3808%2013.0548%2028.8633%2013.198%2028.3685C13.2859%2028.0593%2013.53%2027.8152%2013.8392%2027.7273L17.3838%2026.715C18.9364%2026.2724%2020.1504%2025.0583%2020.5931%2023.5057L21.6053%2019.9612C21.7193%2019.5608%2022.0871%2019.2842%2022.5037%2019.2842Z'%20fill='url(%23paint0_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.3742%2012C13.6573%2012%2013.9047%2012.192%2013.9731%2012.4654L14.1846%2013.315C14.3799%2014.0864%2014.9821%2014.6918%2015.7535%2014.8838L16.603%2015.0954C16.9318%2015.1768%2017.1335%2015.512%2017.0522%2015.8407C16.9968%2016.0621%2016.8243%2016.2346%2016.603%2016.2899L15.7535%2016.5015C14.9821%2016.6968%2014.3767%2017.2989%2014.1846%2018.0703L13.9731%2018.9199C13.8917%2019.2486%2013.5564%2019.4504%2013.2277%2019.369C13.0064%2019.3137%2012.8339%2019.1412%2012.7785%2018.9199L12.567%2018.0703C12.3749%2017.2989%2011.7695%2016.6935%2010.9981%2016.5015L10.1486%2016.2899C9.81986%2016.2085%209.61805%2015.8733%209.69943%2015.5446C9.75476%2015.3232%209.92727%2015.1507%2010.1486%2015.0954L10.9981%2014.8838C11.7695%2014.6918%2012.3749%2014.0864%2012.567%2013.315L12.7785%2012.4654C12.8469%2012.192%2013.0943%2012%2013.3774%2012H13.3742Z'%20fill='url(%23paint1_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.39254%2026.8813C6.54226%2026.8813%206.67571%2026.979%206.72453%2027.1189L6.90681%2027.669C6.97516%2027.8773%207.1379%2028.0401%207.34947%2028.1117L7.89954%2028.294C8.08181%2028.3558%208.17946%2028.5543%208.12087%2028.7366C8.08507%2028.8408%208.0037%2028.9222%207.89954%2028.958L7.34947%2029.1402C7.14116%2029.2086%206.97841%2029.3713%206.90681%2029.5829L6.72453%2030.133C6.66269%2030.3152%206.46414%2030.4129%206.28187%2030.3543C6.17771%2030.3185%206.09634%2030.2371%206.06054%2030.133L5.87827%2029.5829C5.80992%2029.3746%205.64392%2029.2118%205.4356%2029.1402L4.88553%2028.958C4.70326%2028.8961%204.60561%2028.6976%204.6642%2028.5153C4.7%2028.4111%204.78138%2028.3298%204.88553%2028.294L5.4356%2028.1117C5.64392%2028.0433%205.80666%2027.8806%205.87827%2027.669L6.06054%2027.1189C6.10936%2026.9757%206.24281%2026.8813%206.39254%2026.8813Z'%20fill='url(%23paint2_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.80904%2033.5596C2.95876%2033.5596%203.09221%2033.6572%203.14104%2033.7972L3.32331%2034.3473C3.39166%2034.5556%203.5544%2034.7183%203.76597%2034.7899L4.31604%2034.9722C4.49832%2035.034%204.59596%2035.2326%204.53737%2035.4148C4.50157%2035.519%204.4202%2035.6004%204.31604%2035.6362L3.76597%2035.8185C3.55766%2035.8868%203.39492%2036.0495%203.32331%2036.2611L3.14104%2036.8112C3.07919%2036.9935%202.88065%2037.0911%202.69837%2037.0325C2.59422%2036.9967%202.51285%2036.9153%202.47704%2036.8112L2.29477%2036.2611C2.22642%2036.0528%202.06042%2035.8901%201.85211%2035.8185L1.30204%2035.6362C1.11976%2035.5743%201.02212%2035.3758%201.0807%2035.1935C1.11651%2035.0894%201.19788%2035.008%201.30204%2034.9722L1.85211%2034.7899C2.06042%2034.7216%202.22316%2034.5588%202.29477%2034.3473L2.47704%2033.7972C2.52587%2033.654%202.65931%2033.5596%202.80904%2033.5596Z'%20fill='url(%23paint3_radial_4548_14216)'/%3e%3cpath%20d='M2.42488%2032.7235C1.94641%2031.4476%201.68277%2030.0676%201.68277%2028.6256C1.68277%2023.5806%204.89532%2019.2712%209.38379%2017.634L8.79466%2016.0586C3.66498%2017.9269%200%2022.8483%200%2028.6256C0%2030.2661%200.296193%2031.835%200.836502%2033.2866L2.42488%2032.7268V32.7235Z'%20fill='url(%23paint4_radial_4548_14216)'/%3e%3cpath%20d='M20.6587%2037.7652C18.6602%2039.3633%2016.1279%2040.3202%2013.3743%2040.3202C10.0023%2040.3202%206.96221%2038.8849%204.82702%2036.5967L3.58691%2037.7359C6.02807%2040.3593%209.51078%2041.9998%2013.3776%2041.9998C16.5218%2041.9998%2019.4121%2040.9159%2021.6938%2039.0997L20.662%2037.7684L20.6587%2037.7652Z'%20fill='url(%23paint5_radial_4548_14216)'/%3e%3cpath%20d='M13.3739%2022.3664C15.0436%2022.3664%2016.5604%2023.0238%2017.6833%2024.0914L18.8095%2022.8383C17.3904%2021.5038%2015.4798%2020.6836%2013.3771%2020.6836C9.89444%2020.6836%206.93902%2022.9262%205.86816%2026.0476L7.44678%2026.627C8.28328%2024.1533%2010.6235%2022.3631%2013.3771%2022.3631L13.3739%2022.3664Z'%20fill='url(%23paint6_radial_4548_14216)'/%3e%3cpath%20d='M17.6737%2033.1658C16.5508%2034.2301%2015.0373%2034.8843%2013.3741%2034.8843C10.6074%2034.8843%208.2574%2033.0811%207.43392%2030.5879L5.84229%2031.1249C6.89035%2034.2822%209.8653%2036.5638%2013.3773%2036.5638C15.4832%2036.5638%2017.3971%2035.7436%2018.8162%2034.4059L17.677%2033.169L17.6737%2033.1658Z'%20fill='url(%23paint7_radial_4548_14216)'/%3e%3cpath%20d='M39.169%2021.2891H43.677C45.7666%2021.2891%2047.2802%2021.595%2048.2111%2022.2037C49.142%2022.8123%2049.6074%2023.7758%2049.6074%2025.0908C49.6074%2025.9761%2049.3796%2026.7149%2048.9206%2027.3041C48.4617%2027.8932%2047.8075%2028.2642%2046.9482%2028.414V28.5181C48.0158%2028.7199%2048.8002%2029.1138%2049.3014%2029.7062C49.8027%2030.2985%2050.0533%2031.0992%2050.0533%2032.1115C50.0533%2033.4753%2049.5781%2034.5429%2048.6244%2035.3143C47.6707%2036.0857%2046.3493%2036.473%2044.6502%2036.473H39.1658V21.2891H39.169ZM41.6525%2027.5645H44.0416C45.0799%2027.5645%2045.8383%2027.3985%2046.3167%2027.0697C46.7952%2026.741%2047.0328%2026.1811%2047.0328%2025.3935C47.0328%2024.6806%2046.7757%2024.1631%2046.2581%2023.8474C45.7406%2023.5284%2044.9236%2023.3689%2043.8007%2023.3689H41.6492V27.5645H41.6525ZM41.6525%2029.5792V34.3867H44.2889C45.3272%2034.3867%2046.1117%2034.1881%2046.6422%2033.791C47.1728%2033.3939%2047.4364%2032.7657%2047.4364%2031.9065C47.4364%2031.1188%2047.1662%2030.5329%2046.6259%2030.1521C46.0856%2029.7713%2045.2654%2029.5792%2044.1653%2029.5792H41.6525Z'%20fill='url(%23paint8_linear_4548_14216)'/%3e%3cpath%20d='M58.7762%2024.7817C59.2677%2024.7817%2059.6713%2024.8175%2059.9902%2024.8859L59.7526%2027.161C59.4076%2027.0764%2059.0463%2027.0374%2058.672%2027.0374C57.6955%2027.0374%2056.9046%2027.3563%2056.2992%2027.9943C55.6938%2028.6322%2055.3911%2029.459%2055.3911%2030.4778V36.4797H52.95V24.9933H54.8606L55.1828%2027.0178H55.3065C55.6873%2026.3311%2056.1853%2025.7908%2056.7972%2025.3871C57.4091%2024.9868%2058.0699%2024.785%2058.7762%2024.785V24.7817Z'%20fill='url(%23paint9_linear_4548_14216)'/%3e%3cpath%20d='M69.309%2036.4734L68.8208%2034.8753H68.7394C68.1861%2035.575%2067.6295%2036.0503%2067.0664%2036.3041C66.5065%2036.558%2065.784%2036.685%2064.9051%2036.685C63.7757%2036.685%2062.8969%2036.379%2062.2622%2035.7703C61.6275%2035.1617%2061.3118%2034.2991%2061.3118%2033.186C61.3118%2032.0012%2061.7512%2031.1094%2062.63%2030.5072C63.5088%2029.9051%2064.8498%2029.5763%2066.6498%2029.521L68.632%2029.4591V28.8472C68.632%2028.1116%2068.4595%2027.5648%2068.1177%2027.2003C67.7759%2026.8357%2067.2421%2026.6534%2066.5228%2026.6534C65.9337%2026.6534%2065.3706%2026.7413%2064.8303%2026.9138C64.29%2027.0864%2063.7692%2027.2914%2063.2712%2027.5258L62.4803%2025.7811C63.1019%2025.4557%2063.7855%2025.2083%2064.5276%2025.039C65.2697%2024.8698%2065.9662%2024.7852%2066.627%2024.7852C68.0884%2024.7852%2069.1918%2025.1041%2069.9339%2025.7421C70.6793%2026.38%2071.0503%2027.3793%2071.0503%2028.7431V36.4799H69.3057L69.309%2036.4734ZM65.6733%2034.8134C66.5586%2034.8134%2067.2714%2034.566%2067.8085%2034.0713C68.3455%2033.5766%2068.6124%2032.8833%2068.6124%2031.9882V30.9922L67.138%2031.054C65.989%2031.0963%2065.1525%2031.2884%2064.6285%2031.6301C64.1044%2031.9719%2063.8441%2032.4992%2063.8441%2033.2055C63.8441%2033.7165%2063.997%2034.1136%2064.2997%2034.3935C64.6057%2034.6734%2065.0614%2034.8134%2065.67%2034.8134H65.6733Z'%20fill='url(%23paint10_linear_4548_14216)'/%3e%3cpath%20d='M84.5646%2036.4732H82.1137V29.4102C82.1137%2028.5248%2081.9347%2027.8641%2081.5799%2027.4279C81.2219%2026.9918%2080.6588%2026.7737%2079.8809%2026.7737C78.8491%2026.7737%2078.0939%2027.0797%2077.6155%2027.6883C77.137%2028.297%2076.8994%2029.319%2076.8994%2030.7512V36.4732H74.4583V24.9868H76.3689L76.7106%2026.4938H76.8343C77.1793%2025.947%2077.6708%2025.5238%2078.3088%2025.2277C78.9467%2024.9315%2079.653%2024.7817%2080.4277%2024.7817C83.1846%2024.7817%2084.5614%2026.1846%2084.5614%2028.987V36.4765L84.5646%2036.4732Z'%20fill='url(%23paint11_linear_4548_14216)'/%3e%3cpath%20d='M91.836%2036.6814C90.4038%2036.6814%2089.2841%2036.1606%2088.4802%2035.1223C87.6762%2034.084%2087.2759%2032.6258%2087.2759%2030.751C87.2759%2028.8762%2087.6827%2027.4018%2088.4965%2026.3537C89.3102%2025.3056%2090.4364%2024.7816%2091.8783%2024.7816C93.3202%2024.7816%2094.5375%2025.3382%2095.3252%2026.4546H95.4489C95.3317%2025.6311%2095.2731%2024.9802%2095.2731%2024.5017V20.3159H97.724V36.4763H95.8134L95.387%2034.9693H95.2731C94.4919%2036.1118%2093.3462%2036.6847%2091.836%2036.6847V36.6814ZM92.4902%2034.709C93.4927%2034.709%2094.225%2034.4258%2094.6807%2033.8627C95.1364%2033.2996%2095.374%2032.3817%2095.387%2031.1156V30.7738C95.387%2029.3254%2095.1527%2028.2969%2094.6807%2027.6882C94.2088%2027.0795%2093.4732%2026.7736%2092.4674%2026.7736C91.6081%2026.7736%2090.9474%2027.1219%2090.4852%2027.8184C90.023%2028.5149%2089.7886%2029.5044%2089.7886%2030.7933C89.7886%2032.0823%2090.0132%2033.0392%2090.4624%2033.7065C90.9116%2034.3737%2091.5886%2034.709%2092.4869%2034.709H92.4902Z'%20fill='url(%23paint12_linear_4548_14216)'/%3e%3cpath%20d='M106.997%2036.473V21.2891H109.481V36.473H106.997Z'%20fill='url(%23paint13_linear_4548_14216)'/%3e%3cpath%20d='M123.334%2036.4732H120.883V29.4102C120.883%2028.5248%20120.704%2027.8641%20120.349%2027.4279C119.991%2026.9918%20119.428%2026.7737%20118.65%2026.7737C117.618%2026.7737%20116.863%2027.0797%20116.385%2027.6883C115.906%2028.297%20115.668%2029.319%20115.668%2030.7512V36.4732H113.227V24.9868H115.138L115.48%2026.4938H115.603C115.948%2025.947%20116.44%2025.5238%20117.078%2025.2277C117.716%2024.9315%20118.422%2024.7817%20119.197%2024.7817C121.954%2024.7817%20123.33%2026.1846%20123.33%2028.987V36.4765L123.334%2036.4732Z'%20fill='url(%23paint14_linear_4548_14216)'/%3e%3cpath%20d='M134.449%2033.2019C134.449%2034.3249%20134.039%2035.1841%20133.222%2035.783C132.405%2036.3819%20131.233%2036.6814%20129.71%2036.6814C128.187%2036.6814%20126.95%2036.4503%20126.022%2035.9848V33.8757C127.373%2034.4974%20128.629%2034.8098%20129.791%2034.8098C131.295%2034.8098%20132.044%2034.3574%20132.044%2033.4493C132.044%2033.1596%20131.959%2032.9155%20131.793%2032.7235C131.627%2032.5314%20131.354%2032.3296%20130.973%2032.1213C130.592%2031.913%20130.062%2031.6786%20129.385%2031.415C128.063%2030.904%20127.168%2030.3897%20126.699%2029.8787C126.231%2029.3677%20126%2028.7004%20126%2027.8835C126%2026.9005%20126.397%2026.1389%20127.188%2025.592C127.982%2025.0485%20129.059%2024.7783%20130.423%2024.7783C131.787%2024.7783%20133.05%2025.0517%20134.254%2025.5986L133.466%2027.4376C132.226%2026.9265%20131.185%2026.6694%20130.342%2026.6694C129.053%2026.6694%20128.411%2027.0372%20128.411%2027.7695C128.411%2028.1308%20128.581%2028.4335%20128.916%2028.6842C129.251%2028.9348%20129.983%2029.2766%20131.113%2029.7127C132.06%2030.0805%20132.75%2030.4158%20133.18%2030.7217C133.609%2031.0277%20133.928%2031.3792%20134.137%2031.7763C134.345%2032.1734%20134.449%2032.6519%20134.449%2033.2052V33.2019Z'%20fill='url(%23paint15_linear_4548_14216)'/%3e%3cpath%20d='M136.939%2021.9434C136.939%2021.5072%20137.059%2021.172%20137.297%2020.9344C137.535%2020.6968%20137.876%2020.5796%20138.319%2020.5796C138.762%2020.5796%20139.081%2020.6968%20139.322%2020.9344C139.562%2021.1687%20139.68%2021.504%20139.68%2021.9434C139.68%2022.3828%20139.559%2022.6855%20139.322%2022.9264C139.084%2023.164%20138.749%2023.2844%20138.319%2023.2844C137.889%2023.2844%20137.535%2023.164%20137.297%2022.9264C137.059%2022.6887%20136.939%2022.36%20136.939%2021.9434ZM139.527%2036.4731H137.085V24.9867H139.527V36.4731Z'%20fill='url(%23paint16_linear_4548_14216)'/%3e%3cpath%20d='M152.715%2024.987V26.328L150.752%2026.6925C150.931%2026.9334%20151.081%2027.2328%20151.198%2027.5843C151.316%2027.9359%20151.374%2028.3102%20151.374%2028.7073C151.374%2029.892%20150.964%2030.8229%20150.147%2031.5C149.33%2032.177%20148.204%2032.5187%20146.772%2032.5187C146.404%2032.5187%20146.072%2032.4927%20145.776%2032.4373C145.248%2032.7628%20144.988%2033.1437%20144.988%2033.5798C144.988%2033.8435%20145.112%2034.0387%20145.356%2034.1722C145.603%2034.3024%20146.052%2034.3707%20146.71%2034.3707H148.715C149.981%2034.3707%20150.945%2034.6409%20151.602%2035.1812C152.259%2035.7215%20152.588%2036.4994%20152.588%2037.5182C152.588%2038.8202%20152.051%2039.8227%20150.977%2040.529C149.903%2041.2353%20148.354%2041.5868%20146.326%2041.5868C144.76%2041.5868%20143.566%2041.3101%20142.742%2040.7568C141.919%2040.2035%20141.505%2039.4125%20141.505%2038.3905C141.505%2037.6842%20141.73%2037.0918%20142.176%2036.6101C142.622%2036.1284%20143.247%2035.7964%20144.051%2035.6076C143.725%2035.4676%20143.455%2035.2463%20143.247%2034.9371C143.035%2034.6279%20142.931%2034.3056%20142.931%2033.9671C142.931%2033.5375%20143.051%2033.173%20143.296%2032.8768C143.54%2032.5806%20143.898%2032.2844%20144.376%2031.9947C143.781%2031.7376%20143.299%2031.3209%20142.928%2030.7416C142.557%2030.1655%20142.371%2029.4884%20142.371%2028.7105C142.371%2027.4639%20142.765%2026.4972%20143.549%2025.8137C144.334%2025.1269%20145.454%2024.7852%20146.908%2024.7852C147.234%2024.7852%20147.576%2024.8079%20147.93%2024.8535C148.289%2024.8991%20148.555%2024.9446%20148.734%2024.9935H152.712L152.715%2024.987ZM143.689%2038.2603C143.689%2038.7876%20143.927%2039.1912%20144.402%2039.4744C144.877%2039.7576%20145.541%2039.9008%20146.401%2039.9008C147.729%2039.9008%20148.721%2039.7087%20149.372%2039.3279C150.023%2038.9471%20150.349%2038.4426%20150.349%2037.8111C150.349%2037.3131%20150.17%2036.9584%20149.815%2036.7468C149.457%2036.5352%20148.796%2036.4311%20147.826%2036.4311H145.978C145.278%2036.4311%20144.721%2036.5971%20144.311%2036.9258C143.898%2037.2546%20143.693%2037.7005%20143.693%2038.2603H143.689ZM144.741%2028.7073C144.741%2029.4266%20144.926%2029.9799%20145.297%2030.3705C145.668%2030.7578%20146.199%2030.9531%20146.892%2030.9531C148.305%2030.9531%20149.011%2030.198%20149.011%2028.6877C149.011%2027.9391%20148.835%2027.363%20148.487%2026.9594C148.139%2026.5558%20147.605%2026.3507%20146.892%2026.3507C146.179%2026.3507%20145.652%2026.5526%20145.288%2026.9529C144.923%2027.3532%20144.741%2027.9391%20144.741%2028.7073Z'%20fill='url(%23paint17_linear_4548_14216)'/%3e%3cpath%20d='M164.95%2036.4729H162.499V29.4099C162.499%2028.5245%20162.32%2027.8638%20161.965%2027.4276C161.607%2026.9915%20161.044%2026.7734%20160.266%2026.7734C159.241%2026.7734%20158.489%2027.0794%20158.007%2027.6913C157.526%2028.3032%20157.285%2029.3317%20157.285%2030.7704V36.4729H154.844V20.3125H157.285V24.4136C157.285%2025.0711%20157.243%2025.7742%20157.161%2026.5228H157.317C157.649%2025.9695%20158.112%2025.5398%20158.704%2025.2339C159.296%2024.9279%20159.986%2024.7782%20160.774%2024.7782C163.557%2024.7782%20164.95%2026.181%20164.95%2028.9835V36.4729Z'%20fill='url(%23paint18_linear_4548_14216)'/%3e%3cpath%20d='M172.625%2034.709C173.221%2034.709%20173.816%2034.6146%20174.412%2034.4291V36.2681C174.142%2036.3853%20173.794%2036.4829%20173.367%2036.5643C172.941%2036.6424%20172.501%2036.6847%20172.042%2036.6847C169.728%2036.6847%20168.573%2035.4674%20168.573%2033.0295V26.8387H167.004V25.7581L168.687%2024.863L169.517%2022.4316H171.024V24.9867H174.295V26.8355H171.024V32.9839C171.024%2033.5731%20171.17%2034.006%20171.466%2034.2859C171.763%2034.5658%20172.147%2034.7058%20172.625%2034.7058V34.709Z'%20fill='url(%23paint19_linear_4548_14216)'/%3e%3cpath%20d='M184.424%2033.2019C184.424%2034.3249%20184.014%2035.1841%20183.197%2035.783C182.38%2036.3819%20181.208%2036.6814%20179.685%2036.6814C178.161%2036.6814%20176.925%2036.4503%20175.997%2035.9848V33.8757C177.348%2034.4974%20178.604%2034.8098%20179.766%2034.8098C181.27%2034.8098%20182.018%2034.3574%20182.018%2033.4493C182.018%2033.1596%20181.934%2032.9155%20181.768%2032.7235C181.602%2032.5314%20181.328%2032.3296%20180.948%2032.1213C180.567%2031.913%20180.036%2031.6786%20179.359%2031.415C178.038%2030.904%20177.143%2030.3897%20176.674%2029.8787C176.205%2029.3677%20175.974%2028.7004%20175.974%2027.8835C175.974%2026.9005%20176.371%2026.1389%20177.162%2025.592C177.956%2025.0485%20179.034%2024.7783%20180.397%2024.7783C181.761%2024.7783%20183.024%2025.0517%20184.228%2025.5986L183.441%2027.4376C182.201%2026.9265%20181.159%2026.6694%20180.316%2026.6694C179.027%2026.6694%20178.386%2027.0372%20178.386%2027.7695C178.386%2028.1308%20178.555%2028.4335%20178.89%2028.6842C179.226%2028.9348%20179.958%2029.2766%20181.088%2029.7127C182.035%2030.0805%20182.725%2030.4158%20183.154%2030.7217C183.584%2031.0277%20183.903%2031.3792%20184.111%2031.7763C184.32%2032.1734%20184.424%2032.6519%20184.424%2033.2052V33.2019Z'%20fill='url(%23paint20_linear_4548_14216)'/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0672%2015.5248)%20scale(61.1655%2061.1655)'%3e%3cstop%20offset='0.17'%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0676%2015.525)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint2_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8974)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint3_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8984)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint4_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint5_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint6_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0673%2015.5246)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint7_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0675%20-58.8983)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3clinearGradient%20id='paint8_linear_4548_14216'%20x1='27.6858'%20y1='26.9883'%20x2='184.655'%20y2='47.7609'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint9_linear_4548_14216'%20x1='27.7019'%20y1='26.8681'%20x2='184.671'%20y2='47.6374'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint10_linear_4548_14216'%20x1='27.8582'%20y1='25.703'%20x2='184.827'%20y2='46.4723'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint11_linear_4548_14216'%20x1='28.0796'%20y1='24.0657'%20x2='185.049'%20y2='44.835'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint12_linear_4548_14216'%20x1='28.6426'%20y1='19.7724'%20x2='185.612'%20y2='40.5417'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint13_linear_4548_14216'%20x1='28.8281'%20y1='18.376'%20x2='185.794'%20y2='39.1453'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint14_linear_4548_14216'%20x1='28.7407'%20y1='19.0206'%20x2='185.71'%20y2='39.7899'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint15_linear_4548_14216'%20x1='28.9621'%20y1='17.367'%20x2='185.928'%20y2='38.1363'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint16_linear_4548_14216'%20x1='29.382'%20y1='14.187'%20x2='186.351'%20y2='34.9563'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint17_linear_4548_14216'%20x1='28.9585'%20y1='17.3836'%20x2='185.928'%20y2='38.1529'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint18_linear_4548_14216'%20x1='29.7136'%20y1='11.6741'%20x2='186.683'%20y2='32.4466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint19_linear_4548_14216'%20x1='29.8241'%20y1='10.8313'%20x2='186.794'%20y2='31.6039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint20_linear_4548_14216'%20x1='29.8206'%20y1='10.867'%20x2='186.79'%20y2='31.6364'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function S6(e,t){return O6(e)||k6(e,t)||_6(e,t)||C6()}function C6(){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 _6(e,t){if(e){if(typeof e=="string")return R0(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)?R0(e,t):void 0}}function R0(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 k6(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function O6(e){if(Array.isArray(e))return e}var E6=function(t){var n=t.className,r=qt(),i=r.pathname,s=Gn(),o=s.hostAppProps,a=o.onLogout,l=F.useState(!1),u=S6(l,2),c=u[0],d=u[1],f=Uu({query:{select:function(C){var x=C.data;return x==null?void 0:x.data}}}),h=f.data,y=f.isLoading,m=U4(a),p=m.mutate,v=m.isPending,b=function(C){if(C.preventDefault(),d(!0),!v)return p()};return g.jsxs("div",{className:ke("ystaii-sidemenu"),children:[g.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:g.jsx(E.SidebarNavigation,{activePath:i,children:g.jsx(E.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:g.jsx(I0,{})})})}),g.jsxs("div",{className:ke("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-justify-between yst-px-4","yst-flex-col yst-items-start yst-space-y-12 yst-max-w-2xl yst-mx-auto"),children:[g.jsx(E.Title,{children:g.jsx(di,{className:ke("yst-outline-none"),to:"/",children:g.jsx("img",{src:w6,alt:"Yoast",width:"208",height:"42",className:"yst-block"})})}),g.jsxs("div",{className:ke("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[g.jsx("div",{children:g.jsx("b",{children:y?g.jsx(E.SkeletonLoader,{children:"Display name"}):h==null?void 0:h.displayName})}),g.jsx("div",{children:y?g.jsx(E.SkeletonLoader,{children:"loading-email@address.com"}):h==null?void 0:h.email}),g.jsx("div",{children:g.jsx(E.Link,{variant:"primary",className:"yst-no-underline",onClick:b,children:y?g.jsxs(E.SkeletonLoader,{children:["Sign out ",g.jsx("span",{"aria-hidden":"true",children:"→"})]}):c||v?g.jsx(g.Fragment,{children:"Signing out..."}):g.jsxs(g.Fragment,{children:["Sign out ",g.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),g.jsx("div",{className:ke("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:g.jsx(E.SidebarNavigation,{activePath:i,children:g.jsx(I0,{className:n})})})]})},A6=["className","href"];function T6(e,t){if(e==null)return{};var n,r,i=P6(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 P6(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 j6=function(t){var n=t.className,r=t.href,i=r===void 0?"#content":r,s=T6(t,A6);return g.jsx("a",{href:i,className:ke("yst-absolute yst-left-[10px] yst-z-[100000] yst-block yst-h-12 yst-min-w-[150px] yst-px-[15px] yst-text-[14px] yst-leading-[48px] yst-bg-[var(--bg-color-white)] yst-rounded yst-shadow-md yst-underline yst-text-center yst-outline-none; yst--top-[1000em] focus:yst-top-[10px] focus:yst-text-[var(--text-color-blue)]",n),...s,children:"Skip to main content"})};function Oc(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:g.jsxs("div",{className:ke("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[g.jsx(j6,{children:"Skip to main content"}),!s&&g.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:[g.jsx(E6,{}),o&&g.jsx(o,{}),g.jsxs("div",{id:"toast-portal",className:"yst-fixed yst-bottom-4 yst-left-4 yst-w-96 yst-space-y-4",children:[g.jsx("div",{id:"hook-toasts"}),g.jsx("div",{id:"tsx-toasts"})]})]}),g.jsx("main",{id:"content",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:g.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:g.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:t})})})]})}function Io(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return sn(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(sn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,sn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,sn(d,"constructor",u),sn(u,"constructor",l),l.displayName="GeneratorFunction",sn(u,i,"GeneratorFunction"),sn(d),sn(d,i,"Generator"),sn(d,r,function(){return this}),sn(d,"toString",function(){return"[object Generator]"}),(Io=function(){return{w:s,m:f}})()}function sn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}sn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){sn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},sn(e,t,n,r)}function N0(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function F0(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){N0(s,r,i,o,a,"next",l)}function a(l){N0(s,r,i,o,a,"throw",l)}o(void 0)})}}function M6(e,t){return I6(e)||D6(e,t)||L6(e,t)||$6()}function $6(){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 L6(e,t){if(e){if(typeof e=="string")return B0(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)?B0(e,t):void 0}}function B0(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 D6(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function I6(e){if(Array.isArray(e))return e}var R6=function(t){var n,r=t.className,i=Yt(),s=xn(),o=F.useState(!1),a=M6(o,2),l=a[0],u=a[1],c=es({query:{select:function(x){var k=x.data;return k==null?void 0:k.brands}}}),d=c.data,f=m2({mutation:{onSettled:function(){i.invalidateQueries({queryKey:[rr()]})}}}),h=f.mutateAsync,y=f.isPending,m=F.useMemo(function(){var C;return(C=d==null?void 0:d.filter(function(x){var k;return((k=x.settings)===null||k===void 0?void 0:k.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&C!==void 0?C:[]},[d]);F.useEffect(function(){u(m.length!==0)},[m]);var p=function(){var C=F0(Io().m(function x(){var k;return Io().w(function(w){for(;;)switch(w.n){case 0:return k=m.map(function(_){return h({brandId:String(_.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),w.n=1,Promise.all(k);case 1:u(!1);case 2:return w.a(2)}},x)}));return function(){return C.apply(this,arguments)}}(),v=function(){var C=F0(Io().m(function x(){return Io().w(function(k){for(;;)switch(k.n){case 0:return k.n=1,p();case 1:s("/settings");case 2:return k.a(2)}},x)}));return function(){return C.apply(this,arguments)}}(),b=m.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",S=m.length===1?g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),g.jsxs("p",{children:["The brand ",g.jsx("b",{children:m==null||(n=m[0])===null||n===void 0?void 0:n.name})," was deactivated, since it was the most recently analyzed."]}),g.jsxs("p",{children:["If you prefer, you can go to ",g.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),g.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),g.jsx("ul",{children:m.map(function(C){return g.jsx("li",{children:g.jsx("b",{children:C.name})},C.id)})}),g.jsxs("p",{children:["If you prefer, you can go to ",g.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return l?g.jsx(E.Modal,{isOpen:l,onClose:v,position:"center",as:"div",className:r,children:g.jsxs(E.Modal.Panel,{children:[g.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:b})}),g.jsx(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:S})]})}),g.jsxs(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[g.jsx(E.Button,{variant:"secondary",onClick:v,children:"Close"}),g.jsx(E.Button,{variant:"primary",onClick:v,isLoading:y,disabled:y,children:"Go to settings"})]})]})}):null},Gu=function(){return g.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:g.jsxs("div",{className:"yst-flex yst-items-center yst-gap-3 yst-text-center",children:[g.jsx(E.Spinner,{variant:"primary"}),g.jsx("span",{className:"yst-italic",children:"Just a moment while we get things ready for you..."})]})})},N6={HOME:"/"},F6=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=qt(),l=xn(),u={disable:s,hideNav:r},c=Gn(),d=c.brandId,f=Va(),h=f.setBrandId,y=es({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(w){var _;return w==null||(_=w.data)===null||_===void 0?void 0:_.brands}}}),m=y.data,p=y.isLoading,v=y.error,b=y.refetch,S=F.useRef(!1),C=F.useMemo(function(){return m==null?void 0:m.find(function(k){return k.id===d})},[m,d]);F.useEffect(function(){var k;if(!(m===void 0||d)){var w=(k=m[0])===null||k===void 0?void 0:k.id;w&&h(w)}},[m,d,h,l,a.pathname]),F.useEffect(function(){!d||S.current||(S.current=!0)},[C,d,l,a.pathname,m]);var x=F.useCallback(function(){b()},[b]);return a.pathname!==N6.HOME&&p?g.jsx(Oc,{...u,children:g.jsx(Gu,{})}):v?g.jsx(Oc,{...u,children:g.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:g.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[g.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),g.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),g.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),g.jsx(E.Button,{variant:"primary",onClick:x,children:"Retry"})]})})}):g.jsxs(Oc,{DebugInfo:o,...u,children:[g.jsx(Ws,{}),g.jsx(R6,{})]})},cr=function(t){var n=t.title,r=qt();return F.useEffect(function(){document.title=n},[r,n]),null},B6=function(){var t=Eu(),n=t.brandId,r=t.analysisId,i=g2(n,{query:{enabled:!!n,select:function(d){var f=d.data;return(f==null?void 0:f.analyses)||[]}}}),s=i.data,o=i.isLoading,a=i.error;if(o)return g.jsx(Gu,{});if(a)return console.error("Error fetching analyses for validation:",a),g.jsx(_i,{to:"/brands/".concat(n),replace:!0});if(!r||r.trim()==="")return g.jsx(_i,{to:"/brands/".concat(n),replace:!0});if(r==="latest")return g.jsx(Ws,{});var l=parseInt(r,10);if(isNaN(l))return g.jsx(_i,{to:"/brands/".concat(n),replace:!0});var u=s==null?void 0:s.some(function(c){return c.id===l});return u?g.jsx(Ws,{}):g.jsx(_i,{to:"/brands/".concat(n),replace:!0})},q0=function(){var t=Eu(),n=t.brandId,r=es({query:{select:function(f){var h=f.data;return h}}}),i=r.data,s=r.isLoading,o=r.error,a=r.isFetched,l=(i==null?void 0:i.brands)||[];if(s||!a)return g.jsx(Gu,{});if(o)return g.jsx(_i,{to:"/",replace:!0});if(!n||n.trim()==="")return g.jsx(_i,{to:"/",replace:!0});var u=parseInt(n,10),c=l.length>0&&l.some(function(d){var f=String(d.id),h=typeof d.id=="number"?d.id:parseInt(String(d.id),10);return f===n||h===u||d.id===n});return a&&!c?g.jsx(_i,{to:"/",replace:!0}):g.jsx(Ws,{})};function q6(e){return U6(e)||H6(e)||w2(e)||z6()}function z6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H6(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U6(e){if(Array.isArray(e))return Bd(e)}function G6(e,t){return W6(e)||V6(e,t)||w2(e,t)||K6()}function K6(){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 w2(e,t){if(e){if(typeof e=="string")return Bd(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)?Bd(e,t):void 0}}function Bd(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 V6(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function W6(e){if(Array.isArray(e))return e}var Bf=F.createContext(void 0),Q6=function(t){var n=t.children,r=F.useState([]),i=G6(r,2),s=i[0],o=i[1],a=F.useCallback(function(u){o(function(c){return c.filter(function(d){return d.id!==u})})},[]),l=F.useCallback(function(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(function(d){var f,h,y=typeof u=="string"?d.some(function(b){return typeof b.message!="string"?!1:b.message===u&&b.variant===(c.variant||"info")}):!1;if(y)return d;var m="toast-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,11)),p=(f=c.duration)!==null&&f!==void 0?f:5e3,v={id:m,message:u,variant:c.variant||"info",duration:p,dismissible:(h=c.dismissible)!==null&&h!==void 0?h:!0};return p>0&&setTimeout(function(){a(m)},p),[].concat(q6(d),[v])})},[a]);return g.jsx(Bf.Provider,{value:{toasts:s,addToast:l,removeToast:a},children:n})},Y6=function(){var t=F.useContext(Bf);if(!t)return null;var n=t.toasts,r=t.removeToast;if(typeof window=="undefined")return null;var i=document.getElementById("hook-toasts");return i?Ap.createPortal(g.jsx("div",{className:ke("yst-w-full yst-space-y-4"),"aria-live":"polite","aria-atomic":"true",children:n.map(function(s){var o;return g.jsxs(E.Toast,{className:ke("yst-w-full",s.className),id:s.id,variant:s.variant||"info",autoDismiss:s.dismissible?0:(o=s.duration)!==null&&o!==void 0?o:1500,onDismiss:function(){return r(s.id)},isVisible:!0,setIsVisible:function(){},children:[g.jsxs("div",{className:"yst-flex yst-gap-3",children:[g.jsx("div",{className:"yst-flex-shrink-0",children:g.jsx(E.ValidationIcon,{className:"yst-h-5 yst-w-5",variant:s.variant})}),g.jsxs("div",{className:"yst-flex-1",children:[typeof s.title=="string"?g.jsx(E.Title,{title:s.title}):s.title,typeof s.message=="string"?g.jsx("p",{className:"yst-mb-0",children:s.message}):s.message]}),s.dismissible&&g.jsx("div",{children:g.jsx(E.Toast.Close,{className:"yst-p-0 yst-text-slate-400",dismissScreenReaderLabel:"Dismiss"})})]}),s.actions&&g.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-3",children:g.jsx(s.actions,{dismiss:function(){return r(s.id)}})})]},s.id)})}),i):null},qf=function(){var t=F.useContext(Bf);if(!t)throw new Error("useToast must be used within a ToastProvider");var n=t.addToast;return F.useCallback(function(r,i){n(r,i)},[n])},X6={openai:"openai",perplexity:"perplexity",anthropic:"anthropic"},Z6={updating:"updating"},qr={pending:"pending",processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"},J6=function(t){return typeof t=="string"&&t!=="latest"&&t.trim().length>0};function e_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 S2=D.forwardRef(e_);function t_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 n_=D.forwardRef(t_);function r_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 C2=D.forwardRef(r_);function i_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 _2=D.forwardRef(i_);function s_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const o_=D.forwardRef(s_);function a_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const l_=D.forwardRef(a_);function u_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}const z0=D.forwardRef(u_);function c_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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"}),D.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 k2=D.forwardRef(c_);function d_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.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 f_=D.forwardRef(d_);function h_(e,t){return D.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),D.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const O2=D.forwardRef(h_);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)}var g_=["children","as","startColor","endColor","angle","disabled","style","className"];function H0(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 U0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H0(Object(n),!0).forEach(function(r){y_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function y_(e,t,n){return(t=m_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m_(e){var t=p_(e,"string");return ua(t)=="symbol"?t:t+""}function p_(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 v_(e,t){if(e==null)return{};var n,r,i=b_(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 b_(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 Ku=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,u=t.angle,c=u===void 0?102:u,d=t.disabled,f=d===void 0?!1:d,h=t.style,y=h===void 0?{}:h,m=t.className,p=m===void 0?"":m,v=v_(t,g_),b=U0(f?{display:"inline-block"}:{background:"linear-gradient(".concat(c,"deg, ").concat(o,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},y);return g.jsx(i,{className:p,style:b,...v,children:n})};function zf(e){var t=e.children,n=e.nestedInPaperContent,r=n===void 0?!1:n,i=e.className;return g.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 x_=function(){var t=xn();return g.jsx("form",{onSubmit:function(){return t("/setup")},children:g.jsxs(E.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[g.jsx(E.Paper.Header,{children:g.jsxs(E.Title,{size:"1",children:["Welcome to ",g.jsx(Ku,{children:"Yoast AI Brand Insights"}),"!"]})}),g.jsxs(E.Paper.Content,{className:"yst-space-y-8",children:[g.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[g.jsx("p",{children:"See how your brand is represented in AI answers."}),g.jsxs("p",{children:[g.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."]}),g.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),g.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 g.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[g.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[g.jsx(E.Stepper.Step,{isActive:!0,isComplete:!1,children:g.jsx("span",{className:"yst-hidden",children:r+1})}),g.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:[g.jsx(E.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),g.jsx("p",{className:"yst-my-0 yst-py-0",children:n.description})]})]}),r<i.length-1&&g.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)})})]}),g.jsx(zf,{className:"yst-justify-end",children:g.jsxs(E.Button,{variant:"primary",onClick:function(){return t("/setup")},className:"yst-gap-1.5",children:["Start your first analysis ",g.jsx(n_,{})]})})]})})};function ca(e){return typeof e!="number"?{}:{"yst-text-green-600":e>0,"yst-text-red-600":e<0,"yst-text-gray-400":e===0}}function Wa(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,u=e.delta,c=e.deltaFormat,d=c===void 0?"absolute":c,f=e.deltaSuffix,h=e.scoreFormat,y=h===void 0?"absolute":h;return g.jsxs("div",{className:ke(o,"yst-font-medium"),children:[g.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&&y==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&g.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&g.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof u=="number"&&!isNaN(u)&&g.jsxs("span",{className:ke("yst-ml-2",ca(u)),children:[u>-1&&"+",u,d==="percentage"&&"%"," ",f]})]})}var w_=["Icon","className","children","position","id"];function S_(e,t){return O_(e)||k_(e,t)||__(e,t)||C_()}function C_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function __(e,t){if(e){if(typeof e=="string")return G0(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)?G0(e,t):void 0}}function G0(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 k_(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function O_(e){if(Array.isArray(e))return e}function E_(e,t){if(e==null)return{};var n,r,i=A_(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 A_(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 Hf(e){var t=e.Icon,n=t===void 0?a6:t,r=e.className,i=r===void 0?"":r,s=e.children,o=e.position,a=o===void 0?"left":o,l=e.id,u=l===void 0?"":l,c=E_(e,w_),d=F.useState(!1),f=S_(d,2),h=f[0],y=f[1];return s?g.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return y(!0)},onMouseLeave:function(){return y(!1)},"aria-describedby":u?"tooltip-button-id":"tooltip-button",...c,children:[g.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&g.jsx(E.Tooltip,{position:a,id:u||"tooltip-button",children:s})]}):null}var Qa=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,"-"))},u=l(n);return g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(a),children:[g.jsx(E.Title,{size:s,children:n}),g.jsx(Hf,{id:u,children:r})]})},K0=function(t){var n=t.keywords,r=t.badgeClassName;return g.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i,s){return i&&g.jsx(E.Badge,{className:r,children:i},s)})})},E2=function(t){var n,r,i,s,o=t.title,a=o===void 0?"Sentiment":o,l=t.tooltip,u=l===void 0?"":l,c=t.data,d=c==null?void 0:c.brandName,f=c==null||(n=c.positivityPercentage)===null||n===void 0?void 0:n.value,h=c==null||(r=c.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,y=c==null||(i=c.keywords)===null||i===void 0?void 0:i.positive,m=c==null||(s=c.keywords)===null||s===void 0?void 0:s.negative,p=!c||f===void 0&&h===void 0;return g.jsx(E.Card,{className:"yst-overflow-visible",children:g.jsxs(E.Card.Content,{className:"yst-space-y-8",children:[g.jsx(Qa,{title:a,tooltip:u}),g.jsx("div",{className:"yst-space-y-3",children:!p&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:d||g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),g.jsxs("div",{children:[g.jsx("div",{className:"yst-inline-flex",children:g.jsx(Wa,{className:"yst-mb-1.5",score:f,scoreFormat:"percentage",suffix:"positive",delta:h})}),g.jsx(E.ProgressBar,{max:100,min:0,progress:f||0,className:ke({"yst-bg-red-500":f},"[&>*]:yst-bg-green-500")})]})]})}),p&&g.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."}),!!y&&g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(E.Title,{as:"h5",size:"5",children:"Positive keywords"}),g.jsx(K0,{keywords:y,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(E.Title,{as:"h5",size:"5",children:"Negative keywords"}),g.jsx(K0,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function da(e){"@babel/helpers - typeof";return da=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},da(e)}var T_=["data"];function V0(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 P_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V0(Object(n),!0).forEach(function(r){j_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j_(e,t,n){return(t=M_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M_(e){var t=$_(e,"string");return da(t)=="symbol"?t:t+""}function $_(e,t){if(da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L_(e,t){if(e==null)return{};var n,r,i=D_(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 D_(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 hi=function(t,n,r){var i=Gn(),s=i.brandId,o=i.analysisId,a=i.model,l=s,u=o,c=a,d=qu(l,u,{query:{enabled:!!l&&!!u,select:function(p){var v=p.data;return v==null?void 0:v.analysis}}}),f=d.data,h=L_(d,T_),y=F.useMemo(function(){if(!f||!c)return null;var m=f.scans||[];return m.find(function(p){return String(p.aiProvider)===String(c)})||null},[f,c]);return P_({data:y},h)};function I_(){var e,t=hi(),n=t.data;return g.jsx(E2,{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 R_=["children","as","className"];function N_(e,t){if(e==null)return{};var n,r,i=F_(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 F_(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 Ya=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,u=l===void 0?"div":l,c=o.className,d=c===void 0?"":c,f=N_(o,R_);return g.jsx(u,{className:ke(String(s).trim(),d),...f,children:a})}},Ec=[{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"}],W0=function(t){if(!t)return Ec[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)%Ec.length;return Ec[s]};function fa(e){"@babel/helpers - typeof";return fa=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},fa(e)}var Q0;function Y0(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 X0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y0(Object(n),!0).forEach(function(r){B_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B_(e,t,n){return(t=q_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q_(e){var t=z_(e,"string");return fa(t)=="symbol"?t:t+""}function z_(e,t){if(fa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function H_(e){return K_(e)||G_(e)||A2(e)||U_()}function U_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G_(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K_(e){if(Array.isArray(e))return qd(e)}function Z0(e,t){return Q_(e)||W_(e,t)||A2(e,t)||V_()}function V_(){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 A2(e,t){if(e){if(typeof e=="string")return qd(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)?qd(e,t):void 0}}function qd(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 W_(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function Q_(e){if(Array.isArray(e))return e}function Y_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wo=Ya(Q0||(Q0=Y_(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),J0=function(t){var n=t.data,r=t.totalQueries,i=t.isLoading,s=i===void 0?!1:i,o=t.isFirstScan,a=o===void 0?!1:o,l=t.enableCategories,u=l===void 0?!1:l,c=s||!n,d=n||{},f=d.rank,h=d.url,y=d.rootDomain,m=d.category,p=d.impact,v=d.numberOfMentions,b=v==null?void 0:v.value,S=v==null?void 0:v.previous,C=typeof(S==null?void 0:S.difference)=="number"?S.difference:b;return g.jsxs("tr",{className:"yst-flex yst-flex-col md:yst-table-row",children:[g.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[g.jsx(wo,{as:"span",children:"Rank:"}),c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):g.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:f!=null?f:"—"})]}),g.jsx(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2 yst-break-all",children:c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):g.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:g.jsxs(E.Link,{className:"yst-flex yst-items-center yst-gap-1 yst-font-medium",href:h||"#",rel:"nofollow noreferrer",target:"_blank",children:[g.jsx("span",{children:h!=null?h:"—"})," ",g.jsx(k2,{})]})})}),g.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 yst-font-medium md:yst-ml-0 md:yst-p-2",children:[g.jsx(wo,{as:"span",children:"Domain:"}),c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):g.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:y!=null?y:"—"})]}),u&&g.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-py-1 md:yst-ml-0 md:yst-p-2",children:[g.jsx(wo,{as:"span",children:"Category:"}),c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):g.jsx(E.Badge,{className:ke(W0(m||"").bg,W0(m||"").text),children:m!=null?m:"—"})]}),g.jsxs(E.Table.Cell,{className:ke("yst-ml-2 yst-py-0 md:yst-ml-0 md:yst-p-2","yst-font-medium",{"yst-text-green-600":p==="High","yst-text-yellow-600":p==="Medium","yst-text-red-600":p==="Low"}),children:[g.jsx(wo,{as:"span",children:"Impact:"}),c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-12"}):p!=null?p:"—"]}),g.jsxs(E.Table.Cell,{className:"yst-ml-2 yst-pt-1 md:yst-ml-0 md:yst-p-2 md:yst-text-right",children:[g.jsx(wo,{as:"span",children:"Mentions:"}),c?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):b?g.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[g.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[g.jsx("span",{className:"yst-text-slate-500",children:b}),g.jsxs("span",{className:"yst-text-slate-900",children:["/ ",r]})]}),!a&&g.jsxs("span",{className:ke("yst-ml-auto",ca(C)),children:[C>-1&&"+",C]})]}):"—"]})]},c?void 0:h)},X_=function(t){var n,r,i,s,o,a=t.enableCategories,l=a===void 0?!1:a,u=F.useState("all"),c=Z0(u,2),d=c[0],f=c[1],h=F.useState(1),y=Z0(h,2),m=y[0],p=y[1],v=hi(),b=v.data,S=v.isLoading,C=v.isRefetching,x=b==null?void 0:b.citations,k=(b==null||(n=b.scores)===null||n===void 0||(n=n.standardized)===null||n===void 0?void 0:n.citations)||{},w=Object.hasOwn(k,"previous"),_=x==null||(r=x.list)===null||r===void 0?void 0:r.filter(function(P){return d==="all"?!0:P.category===d}),O=10,A=(_==null?void 0:_.length)||0,T=Math.ceil(A/O),j=(m-1)*O,B=j+O,R=_==null?void 0:_.slice(j,B);return F.useEffect(function(){m>T&&T>0&&p(1)},[T,m,p,d]),g.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:g.jsxs(E.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[g.jsxs("div",{className:"yst-space-y-4",children:[g.jsx(Qa,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),g.jsx("p",{children:"This table highlights the most important sources where your brand was cited."}),g.jsx(Wa,{score:x==null||(i=x.total)===null||i===void 0?void 0:i.value,suffix:"citations",delta:x==null||(s=x.total)===null||s===void 0||(s=s.previous)===null||s===void 0?void 0:s.difference,deltaSuffix:"since last analysis",isLoading:S,hideTotal:!0})]}),(x==null||(o=x.list)===null||o===void 0?void 0:o.length)===0&&!S&&!C?g.jsx(E.Alert,{children:"The selected AI model returned no citations for your queries. This can happen with some queries or models."}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{children:[l&&g.jsx(E.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:d,onChange:function(P){f(P)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(H_(x!=null&&x.categories?x.categories.map(function(P){return{value:P,label:P}}):[]))}),g.jsxs(E.Table,{variant:"minimal",children:[g.jsx(E.Table.Head,{className:"yst-font-semibold",children:g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-pl-2",children:"#"}),g.jsx(E.Table.Cell,{className:"yst yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"URL"}),g.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Root domain"}),l&&g.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell",children:"Category"}),g.jsx(E.Table.Cell,{className:"yst-hidden yst-text-slate-900 md:yst-table-cell md:yst-px-2",children:"Impact"}),g.jsx(E.Table.Cell,{className:"yst-hidden yst-text-right yst-text-slate-900 md:yst-table-cell",children:"Mentions"})]})}),g.jsx(E.Table.Body,{children:S||C?Array.from({length:5}).map(function(P,M){return g.jsx(J0,{isLoading:!0,enableCategories:l},"skeleton-".concat(M))}):R&&R.length>0?R.map(function(P,M){return g.jsx(J0,{data:X0(X0({},P),{},{rank:j+M+1}),totalQueries:b==null?void 0:b.numberOfQueries,isFirstScan:!w,enableCategories:l},"citation-table-row-".concat(P.url,"-").concat(M))}):g.jsx(E.Table.Row,{children:g.jsxs(E.Table.Cell,{colSpan:l?6:5,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[d==="all"?"No citations found.":'No citations found for the "'.concat(d,'" category.')," ",g.jsx(E.Link,{onClick:function(){return f("all")},children:"Show all categories."})]})},"no-results")})]})]}),_&&_.length>O&&g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:[g.jsxs("p",{className:"yst-mb-0",children:["Showing ",j+1," to"," ",B>A?A:B," of"," ",A," results"]}),g.jsx(E.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:m,total:T,onNavigate:p,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})]})})};function Z_(e,t){return n8(e)||t8(e,t)||e8(e,t)||J_()}function J_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e8(e,t){if(e){if(typeof e=="string")return eg(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)?eg(e,t):void 0}}function eg(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 t8(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function n8(e){if(Array.isArray(e))return e}var tg=function(t){var n,r=t.data,i=t.totalQueries,s=t.isFirstScan,o=s===void 0?!0:s,a=t.isLoading,l=a===void 0?!1:a,u=l||!r,c=r||{},d=c.rank,f=c.brand,h=d==null?void 0:d.previous,y=typeof(h==null?void 0:h.difference)=="number"?h.difference*-1:void 0,m=f==null?void 0:f.numberOfMentions,p=m==null?void 0:m.previous,v=typeof(p==null?void 0:p.difference)=="number"?p.difference:void 0;return g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Cell,{children:u?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):g.jsxs("span",{className:"yst-flex yst-justify-between yst-gap-4",children:[g.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-2 yst-font-medium",children:[g.jsx("span",{className:"yst-text-slate-500",children:"#"}),g.jsx("span",{className:"yst-text-slate-900",children:d==null?void 0:d.value})]}),!o&&g.jsx("span",{className:ke("yst-inline-flex yst-items-center yst-justify-end",ca(h&&typeof y=="number"?y:0)),children:h&&typeof y=="number"?g.jsxs(g.Fragment,{children:[Math.abs(y),y>0?g.jsx(l_,{className:"yst-h-4 yst-w-4"}):g.jsx(o_,{className:"yst-h-4 yst-w-4"})]}):g.jsx(z0,{className:"yst-mx-1 yst-h-4 yst-w-4"})})]})}),g.jsx(E.Table.Cell,{children:u?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):g.jsx("span",{className:"yst-font-medium",children:f!=null&&f.isSelf?g.jsx(Ku,{children:f==null?void 0:f.name}):(n=f==null?void 0:f.name)!==null&&n!==void 0?n:"—"})}),g.jsx(E.Table.Cell,{children:u?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):g.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[g.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[g.jsx("span",{className:"yst-text-slate-500",children:m==null?void 0:m.value}),g.jsxs("span",{className:"yst-text-slate-900",children:["/ ",i]})]}),!o&&g.jsx("span",{className:ke("yst-ml-auto",ca(p&&typeof v=="number"?v:0)),children:p&&typeof v=="number"?g.jsxs(g.Fragment,{children:[v>-1&&"+",v]}):g.jsx(z0,{className:"yst-h-4 yst-w-4"})})]})})]},u||d==null?void 0:d.value)},r8=function(t){var n,r,i=t.className,s=F.useRef(null),o=F.useState(1),a=Z_(o,2),l=a[0],u=a[1],c=hi(),d=c.data,f=c.isLoading,h=c.isRefetching,y=d==null||(n=d.rankings)===null||n===void 0?void 0:n.list,m=(d==null||(r=d.scores)===null||r===void 0||(r=r.standardized)===null||r===void 0?void 0:r.ranking)||{},p=Object.hasOwn(m,"previous"),v=5,b=(y==null?void 0:y.length)||0,S=Math.ceil(b/v),C=(l-1)*v,x=C+v,k=y==null?void 0:y.slice(C,x);return F.useEffect(function(){l>S&&S>0&&u(1)},[S,l,u]),g.jsx(E.Card,{ref:s,className:ke("yst-overflow-visible",i),children:g.jsxs(E.Card.Content,{className:"yst-mt-0 yst-space-y-6",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(Qa,{title:"Competitor ranking",tooltip:"How often competitors are mentioned in your submitted queries."}),g.jsx("p",{children:"Brands with the most mentions for your prompts."})]}),!f&&!h&&(!y||y.length===0)?g.jsx(E.Alert,{variant:"info",children:"The selected AI model returned no brands for your queries. This can happen with some queries or models."}):g.jsxs(E.Table,{variant:"minimal",children:[g.jsx(E.Table.Head,{children:g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Cell,{className:"yst-w-20 yst-font-semibold",children:"Rank"}),g.jsx(E.Table.Cell,{className:"yst-font-semibold",children:"Brand"}),g.jsx(E.Table.Cell,{className:"yst-w-20 yst-text-right yst-font-semibold",children:"Mentions"})]})}),g.jsx(E.Table.Body,{children:k&&Array.isArray(k)&&k.length>0?k.map(function(w){var _;return g.jsx(tg,{data:w,totalQueries:d==null?void 0:d.numberOfQueries,isFirstScan:!p},"rank-row-".concat((_=w.rank)===null||_===void 0?void 0:_.value))}):f||h?Array.from({length:v}).map(function(w,_){return g.jsx(tg,{isLoading:!0},"skeleton-".concat(_))}):null})]}),!f&&!h&&y&&y.length>v&&g.jsx(E.Pagination,{current:l,total:S,className:"yst-flex-row",onNavigate:u,screenReaderTextNext:"Next",screenReaderTextPrevious:"Previous",variant:"text"})]})})},i8=function(){var t,n=hi(),r=n.data,i=r==null||(t=r.sentiment)===null||t===void 0?void 0:t.topCompetitor;return g.jsx(E2,{title:"Competitor sentiment",data:i,tooltip:"Percentage of positive versus negative keywords in your query results related to your competitor's brand."})},s8=function(t){var n=t.brand,r=xn(),i=Va(),s=i.setBrandId;return(n==null?void 0:n.setupStatus)==="pendingQuerySelection"?g.jsx(E.Alert,{className:"yst-mt-0",children:g.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.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)]}),g.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!"})]}),g.jsx("div",{className:"yst-flex yst-justify-start yst-gap-6",children:g.jsx(E.Link,{onClick:function(){n.id?(s(n.id),r("/setup/".concat(n.id,"/queries"))):console.error("Brand ID is missing.")},children:"Review queries"})})]})}):null},Vu=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,u=t.disabled,c=u===void 0?!1:u,d=t.confirmText,f=d===void 0?"Yes, delete":d,h=t.cancelText,y=h===void 0?"No, go back":h,m=t.className;return g.jsx(E.Modal,{isOpen:n,onClose:r,position:"center",as:"div",className:m,children:g.jsxs(E.Modal.Panel,{children:[g.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[g.jsx("div",{children:g.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:g.jsx(Fd,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:a})}),g.jsx(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:typeof l=="string"?g.jsx("p",{children:l}):l})]})]}),g.jsxs(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[g.jsx(E.Button,{variant:"secondary",onClick:r,children:y}),g.jsx(E.Button,{variant:"error",onClick:i,isLoading:o,disabled:c,children:f})]})]})})},fl={exports:{}},hl={exports:{}},Qe={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var
|
|
37
|
+
*/var ng;function o8(){if(ng)return Qe;ng=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,u=e?Symbol.for("react.concurrent_mode"):60111,c=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,y=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 S(x){if(typeof x=="object"&&x!==null){var k=x.$$typeof;switch(k){case t:switch(x=x.type,x){case l:case u:case r:case s:case i:case d:return x;default:switch(x=x&&x.$$typeof,x){case a:case c:case y:case h:case o:return x;default:return k}}case n:return k}}}function C(x){return S(x)===u}return Qe.AsyncMode=l,Qe.ConcurrentMode=u,Qe.ContextConsumer=a,Qe.ContextProvider=o,Qe.Element=t,Qe.ForwardRef=c,Qe.Fragment=r,Qe.Lazy=y,Qe.Memo=h,Qe.Portal=n,Qe.Profiler=s,Qe.StrictMode=i,Qe.Suspense=d,Qe.isAsyncMode=function(x){return C(x)||S(x)===l},Qe.isConcurrentMode=C,Qe.isContextConsumer=function(x){return S(x)===a},Qe.isContextProvider=function(x){return S(x)===o},Qe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Qe.isForwardRef=function(x){return S(x)===c},Qe.isFragment=function(x){return S(x)===r},Qe.isLazy=function(x){return S(x)===y},Qe.isMemo=function(x){return S(x)===h},Qe.isPortal=function(x){return S(x)===n},Qe.isProfiler=function(x){return S(x)===s},Qe.isStrictMode=function(x){return S(x)===i},Qe.isSuspense=function(x){return S(x)===d},Qe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===u||x===s||x===i||x===d||x===f||typeof x=="object"&&x!==null&&(x.$$typeof===y||x.$$typeof===h||x.$$typeof===o||x.$$typeof===a||x.$$typeof===c||x.$$typeof===p||x.$$typeof===v||x.$$typeof===b||x.$$typeof===m)},Qe.typeOf=S,Qe}var Ye={};/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|
|
40
40
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/var
|
|
44
|
+
*/var rg;function a8(){return rg||(rg=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,u=e?Symbol.for("react.concurrent_mode"):60111,c=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,y=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 S(se){return typeof se=="string"||typeof se=="function"||se===r||se===u||se===s||se===i||se===d||se===f||typeof se=="object"&&se!==null&&(se.$$typeof===y||se.$$typeof===h||se.$$typeof===o||se.$$typeof===a||se.$$typeof===c||se.$$typeof===p||se.$$typeof===v||se.$$typeof===b||se.$$typeof===m)}function C(se){if(typeof se=="object"&&se!==null){var nt=se.$$typeof;switch(nt){case t:var Ie=se.type;switch(Ie){case l:case u:case r:case s:case i:case d:return Ie;default:var st=Ie&&Ie.$$typeof;switch(st){case a:case c:case y:case h:case o:return st;default:return nt}}case n:return nt}}}var x=l,k=u,w=a,_=o,O=t,A=c,T=r,j=y,B=h,R=n,P=s,M=i,I=d,G=!1;function Y(se){return G||(G=!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.")),q(se)||C(se)===l}function q(se){return C(se)===u}function U(se){return C(se)===a}function z(se){return C(se)===o}function V(se){return typeof se=="object"&&se!==null&&se.$$typeof===t}function N(se){return C(se)===c}function ne(se){return C(se)===r}function J(se){return C(se)===y}function he(se){return C(se)===h}function X(se){return C(se)===n}function ge(se){return C(se)===s}function ye(se){return C(se)===i}function je(se){return C(se)===d}Ye.AsyncMode=x,Ye.ConcurrentMode=k,Ye.ContextConsumer=w,Ye.ContextProvider=_,Ye.Element=O,Ye.ForwardRef=A,Ye.Fragment=T,Ye.Lazy=j,Ye.Memo=B,Ye.Portal=R,Ye.Profiler=P,Ye.StrictMode=M,Ye.Suspense=I,Ye.isAsyncMode=Y,Ye.isConcurrentMode=q,Ye.isContextConsumer=U,Ye.isContextProvider=z,Ye.isElement=V,Ye.isForwardRef=N,Ye.isFragment=ne,Ye.isLazy=J,Ye.isMemo=he,Ye.isPortal=X,Ye.isProfiler=ge,Ye.isStrictMode=ye,Ye.isSuspense=je,Ye.isValidElementType=S,Ye.typeOf=C}()),Ye}var ig;function T2(){return ig||(ig=1,process.env.NODE_ENV==="production"?hl.exports=o8():hl.exports=a8()),hl.exports}/*
|
|
45
45
|
object-assign
|
|
46
46
|
(c) Sindre Sorhus
|
|
47
47
|
@license MIT
|
|
48
|
-
*/var
|
|
49
|
-
Valid keys: `+JSON.stringify(Object.keys(q),null," "));var se=De(de,ye,N,ee,te+"."+ye,n);if(se)return se}return null}return p(U)}function R(q){switch(typeof q){case"number":case"string":case"undefined":return!0;case"boolean":return!q;case"object":if(Array.isArray(q))return q.every(R);if(q===null||a(q))return!0;var U=d(q);if(U){var z=U.call(q),K;if(U!==q.entries){for(;!(K=z.next()).done;)if(!R(K.value))return!1}else for(;!(K=z.next()).done;){var N=K.value;if(N&&!R(N[1]))return!1}}else return!1;return!0;default:return!1}}function P(q,U){return q==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function j(q){var U=typeof q;return Array.isArray(q)?"array":q instanceof RegExp?"object":P(U,q)?"symbol":U}function I(q){if(typeof q=="undefined"||q===null)return""+q;var U=j(q);if(U==="object"){if(q instanceof Date)return"date";if(q instanceof RegExp)return"regexp"}return U}function G(q){var U=I(q);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function Y(q){return!q.constructor||!q.constructor.name?f:q.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Pc}var jc,lg;function u8(){if(lg)return jc;lg=1;var e=zf();function t(){}function n(){}return n.resetWarningCache=t,jc=function(){function r(o,a,l,u,c,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},jc}var ug;function c8(){if(ug)return dl.exports;if(ug=1,process.env.NODE_ENV!=="production"){var e=E2(),t=!0;dl.exports=l8()(e.isElement,t)}else dl.exports=u8()();return dl.exports}var d8=c8();const Bd=Ep(d8);var Ya=function(t){var n=t.className,r=n===void 0?"":n;return g.jsx("hr",{className:ke("yst-my-6",r)})};Ya.propTypes={className:Bd.string};const T2=6048e5,f8=864e5,cg=Symbol.for("constructDateFrom");function pn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&cg in e?e[cg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Zt(e,t){return pn(t||e,e)}function P2(e,t,n){const r=Zt(e,n==null?void 0:n.in);if(isNaN(t))return pn(e,NaN);if(!t)return r;const i=r.getDate(),s=pn(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 h8={};function Ku(){return h8}function ha(e,t){var a,l,u,c,d,f,h,y;const n=Ku(),r=(y=(h=(c=(u=t==null?void 0:t.weekStartsOn)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?c:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?y:0,i=Zt(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 su(e,t){return ha(e,{...t,weekStartsOn:1})}function j2(e,t){const n=Zt(e,t==null?void 0:t.in),r=n.getFullYear(),i=pn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=su(i),o=pn(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=su(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function dg(e){const t=Zt(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 Vu(e,...t){const n=pn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ou(e,t){const n=Zt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function g8(e,t,n){const[r,i]=Vu(n==null?void 0:n.in,e,t),s=ou(r),o=ou(i),a=+s-dg(s),l=+o-dg(o);return Math.round((a-l)/f8)}function y8(e,t){const n=j2(e,t),r=pn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),su(r)}function m8(e){return pn(e,Date.now())}function p8(e,t,n){const[r,i]=Vu(n==null?void 0:n.in,e,t);return+ou(r)==+ou(i)}function v8(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function b8(e){return!(!v8(e)&&typeof e!="number"||isNaN(+Zt(e)))}function x8(e,t){const n=Zt(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 w8(e,t){const[n,r]=Vu(e,t.start,t.end);return{start:n,end:r}}function S8(e,t){const{start:n,end:r}=w8(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(pn(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function C8(e,t){const n=Zt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _8(e,t){const n=Zt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const k8={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"}},O8=(e,t,n)=>{let r;const i=k8[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 Mc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const E8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},A8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},T8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},P8={date:Mc({formats:E8,defaultWidth:"full"}),time:Mc({formats:A8,defaultWidth:"full"}),dateTime:Mc({formats:T8,defaultWidth:"full"})},j8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},M8=(e,t,n,r)=>j8[e];function So(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 $8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},L8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},D8={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"]},I8={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"]},R8={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"}},N8={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"}},F8=(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"},B8={ordinalNumber:F8,era:So({values:$8,defaultWidth:"wide"}),quarter:So({values:L8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:So({values:D8,defaultWidth:"wide"}),day:So({values:I8,defaultWidth:"wide"}),dayPeriod:So({values:R8,defaultWidth:"wide",formattingValues:N8,defaultFormattingWidth:"wide"})};function Co(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)?z8(a,d=>d.test(o)):q8(a,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function q8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function z8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function H8(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 U8=/^(\d+)(th|st|nd|rd)?/i,G8=/\d+/i,K8={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},V8={any:[/^b/i,/^(a|c)/i]},W8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Q8={any:[/1/i,/2/i,/3/i,/4/i]},Y8={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},X8={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]},Z8={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},J8={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]},e7={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},t7={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}},n7={ordinalNumber:H8({matchPattern:U8,parsePattern:G8,valueCallback:e=>parseInt(e,10)}),era:Co({matchPatterns:K8,defaultMatchWidth:"wide",parsePatterns:V8,defaultParseWidth:"any"}),quarter:Co({matchPatterns:W8,defaultMatchWidth:"wide",parsePatterns:Q8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Co({matchPatterns:Y8,defaultMatchWidth:"wide",parsePatterns:X8,defaultParseWidth:"any"}),day:Co({matchPatterns:Z8,defaultMatchWidth:"wide",parsePatterns:J8,defaultParseWidth:"any"}),dayPeriod:Co({matchPatterns:e7,defaultMatchWidth:"any",parsePatterns:t7,defaultParseWidth:"any"})},r7={code:"en-US",formatDistance:O8,formatLong:P8,formatRelative:M8,localize:B8,match:n7,options:{weekStartsOn:0,firstWeekContainsDate:1}};function i7(e,t){const n=Zt(e,t==null?void 0:t.in);return g8(n,_8(n))+1}function s7(e,t){const n=Zt(e,t==null?void 0:t.in),r=+su(n)-+y8(n);return Math.round(r/T2)+1}function M2(e,t){var c,d,f,h,y,m,p,v;const n=Zt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Ku(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(y=i.locale)==null?void 0:y.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=pn((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=ha(o,t),l=pn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=ha(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function o7(e,t){var a,l,u,c,d,f,h,y;const n=Ku(),r=(y=(h=(c=(u=t==null?void 0:t.firstWeekContainsDate)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?c:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?y:1,i=M2(e,t),s=pn((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),ha(s,t)}function a7(e,t){const n=Zt(e,t==null?void 0:t.in),r=+ha(n,t)-+o7(n,t);return Math.round(r/T2)+1}function Je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Je(n+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Je(i,t.length)}},is={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fg={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 Ir.y(e,t)},Y:function(e,t,n,r){const i=M2(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Je(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Je(s,t.length)},R:function(e,t){const n=j2(e);return Je(n,t.length)},u:function(e,t){const n=e.getFullYear();return Je(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 Je(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 Je(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 Ir.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 Je(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=a7(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Je(i,t.length)},I:function(e,t,n){const r=s7(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ir.d(e,t)},D:function(e,t,n){const r=i7(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Je(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 Je(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 Je(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 Je(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=is.noon:r===0?i=is.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=is.evening:r>=12?i=is.afternoon:r>=4?i=is.morning:i=is.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 Ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ir.s(e,t)},S:function(e,t){return Ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return gg(r);case"XXXX":case"XX":return bi(r);case"XXXXX":case"XXX":default:return bi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return gg(r);case"xxxx":case"xx":return bi(r);case"xxxxx":case"xxx":default:return bi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+hg(r,":");case"OOOO":default:return"GMT"+bi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+hg(r,":");case"zzzz":default:return"GMT"+bi(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Je(r,t.length)},T:function(e,t,n){return Je(+e,t.length)}};function hg(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+Je(s,2)}function gg(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):bi(e,t)}function bi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Je(Math.trunc(r/60),2),s=Je(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"})}},$2=(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"})}},l7=(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}}",$2(i,t))},u7={p:$2,P:l7},c7=/^D+$/,d7=/^Y+$/,f7=["D","DD","YY","YYYY"];function h7(e){return c7.test(e)}function g7(e){return d7.test(e)}function y7(e,t,n){const r=m7(e,t,n);if(console.warn(r),f7.includes(e))throw new RangeError(r)}function m7(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 p7=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v7=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b7=/^'([^]*?)'?$/,x7=/''/g,w7=/[a-zA-Z]/;function Ro(e,t,n){var c,d,f,h,y,m,p,v,b;const r=Ku(),i=(c=r.locale)!=null?c:r7,s=(y=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?y: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=Zt(e,n==null?void 0:n.in);if(!b8(a))throw new RangeError("Invalid time value");let l=t.match(v7).map(S=>{const C=S[0];if(C==="p"||C==="P"){const x=u7[C];return x(S,i.formatLong)}return S}).join("").match(p7).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const C=S[0];if(C==="'")return{isToken:!1,value:S7(S)};if(fg[C])return{isToken:!0,value:S};if(C.match(w7))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const C=S.value;(g7(C)||h7(C))&&y7(C,t,String(e));const x=fg[C[0]];return x(a,C,i.localize,u)}).join("")}function S7(e){const t=e.match(b7);return t?t[1].replace(x7,"'"):e}function mg(e,t,n){const[r,i]=Vu(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function C7(e,t){return p8(pn(e,e),m8(e))}function _7(e,t,n){return P2(e,-1,n)}function ga(e){"@babel/helpers - typeof";return ga=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},ga(e)}function $c(e,t,n){return(t=k7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k7(e){var t=O7(e,"string");return ga(t)=="symbol"?t:t+""}function O7(e,t){if(ga(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ga(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pg(e,t){return P7(e)||T7(e,t)||A7(e,t)||E7()}function E7(){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
|
|
51
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
52
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B7(e,t){if(e){if(typeof e=="string")return Sg(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)?Sg(e,t):void 0}}function Sg(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 q7(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function z7(e){if(Array.isArray(e))return e}function zd(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return rn(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,M={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,j){return k=P,w=0,_=e,M.n=j,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!j&&t<E.length;t++){var j,I=E[t],G=M.p,Y=I[2];R>3?(j=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((j=R<2&&G<I[1])?(w=0,M.v=P,M.n=I[1]):G<Y&&(j=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,M.n=Y,w=0))}if(j||R>1)return o;throw T=!0,P}return function(R,P,j){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,j),w=P,_=j;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(M.n=-1),B(w,_)):M.n=_:M.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=M.n<0)?_:S.call(C,M))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(rn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,rn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,rn(d,"constructor",u),rn(u,"constructor",l),l.displayName="GeneratorFunction",rn(u,i,"GeneratorFunction"),rn(d),rn(d,i,"Generator"),rn(d,r,function(){return this}),rn(d,"toString",function(){return"[object Generator]"}),(zd=function(){return{w:s,m:f}})()}function rn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}rn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){rn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},rn(e,t,n,r)}function Cg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function H7(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 U7(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Dc=Qa(xg||(xg=U7(["yst-flex-1 yst-space-y-2"]))),G7=function(t){var n,r,i,s,o=t.className,a=Gn(),l=a.brandId,u=a.analysisId,c=a.model,d=Ka(),f=d.setModel,h=d.setAnalysisId,y=Xt(),m=vn(),p=fi(),v=p.data,b=zu({query:{select:function(Ke){var Ve=Ke.data;return Ve==null?void 0:Ve.data}}}),S=b.data,C=b.isLoading,x=S==null?void 0:S.displayName,k=Ji({query:{select:function(Ke){var Ve=Ke.data;return Ve==null?void 0:Ve.brands}}}),w=k.data,_=k.isLoading,O=f2(l,{query:{enabled:!!l,select:function(Ke){var Ve=Ke.data;return Ve==null?void 0:Ve.analyses}}}),E=O.data,T=O.isLoading,M=Fu(l,u,{query:{enabled:!!l&&!!u,select:function(Ke){var Ve=Ke.data;return Ve}}}),B=M.data,R=M.isLoading,P=iu(l,{query:{enabled:!!l,select:function(Ke){var Ve=Ke.data;return Ve}}}),j=P.data,I=W5({mutation:{onSuccess:function(){var Oe=H7(zd().m(function Ve(){var Rt,Jt;return zd().w(function(kt){for(;;)switch(kt.n){case 0:return kt.n=1,Promise.all([y.invalidateQueries({queryKey:If(l)}),y.invalidateQueries({queryKey:ir(l,u)}),y.invalidateQueries({queryKey:Bu(l)})]);case 1:Rt=(E==null?void 0:E.filter(function(ce){return String(ce.id)!==String(u)}))||[],Rt.length>0?(Jt=Rt.reduce(function(ce,pe){var Ee=ce.createdAt?new Date(ce.createdAt).getTime():0,Ae=pe.createdAt?new Date(pe.createdAt).getTime():0;return Ae>Ee?pe:ce}),h(Jt.id),m("/brands/".concat(l,"/analysis/").concat(Jt.id))):(h("latest"),m("/brands/".concat(l))),K(!1);case 2:return kt.a(2)}},Ve)}));function Ke(){return Oe.apply(this,arguments)}return Ke}()}}),G=I.mutate,Y=I.isPending,q=F.useState(!1),U=wg(q,2),z=U[0],K=U[1],N=function(){K(!1)},ee=w==null?void 0:w.find(function(Oe){return String(Oe.id)===String(l)}),te=B==null||(n=B.analysis)===null||n===void 0?void 0:n.id,de=l!=null&&typeof te=="number"&&!isNaN(te),X=F.useState(!1),he=wg(X,2),ye=he[0],De=he[1];F.useEffect(function(){if(de){var Oe="yst_legal_alert_dismissed_".concat(l,"_").concat(te);De(window.localStorage.getItem(Oe)===null)}},[l,te,de]);var se=function(Ke){if(Ke.preventDefault(),!!de){var Ve="yst_legal_alert_dismissed_".concat(l,"_").concat(te);window.localStorage.setItem(Ve,"true"),De(!1)}},nt=function(Ke){switch(Ke){case"openai":return"OpenAI";case"perplexity":return"Perplexity";case"anthropic":return"Anthropic";default:return Ke||"Unknown"}},ze=(B==null||(r=B.analysis)===null||r===void 0||(r=r.scans)===null||r===void 0?void 0:r.map(function(Oe){return{value:Oe.aiProvider,label:nt(Oe.aiProvider)}}))||[{value:"",label:"Default model"}],ft=E!=null&&E.some(function(Oe){return String(Oe.id)===String(u)})?u:E&&E.length>0?E[0].id:"latest",Ge=iu(l,{query:{enabled:!!l,select:function(Ke){var Ve=Ke.data;return Ve}}}),Ne=Ge.data,J=(Ne==null?void 0:Ne.name)||"your brand",Me=qd(Ne==null?void 0:Ne.nextScheduledAnalysis),ot=B==null||(i=B.analysis)===null||i===void 0?void 0:i.status,Ie=function(){var Oe=g.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[g.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),g.jsxs("p",{children:["You've completed the setup for"," ",g.jsx("b",{className:"yst-font-medium",children:J}),". The analysis is scheduled to run on"," ",g.jsx("b",{className:"yst-font-medium",children:Me}),". You'll see the results here once it's ready. We'll also notify you by email."]})]});if(ot===void 0&&(j==null?void 0:j.setupStatus)==="scheduledFirstAnalysis")return{alertContent:Oe,alertVariant:"info"};switch(ot){case vi.pending:return{alertContent:Oe,alertVariant:"info"};case vi.processing:return{alertContent:g.jsxs(g.Fragment,{children:["You've completed the setup for ",J,". The analysis is now processing. You'll see the results here once it's ready. We'll also notify you by email."]}),alertVariant:"info"};case vi.failed:return{alertContent:g.jsx(g.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"};case vi.cancelled:return{alertContent:g.jsx(g.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"};case vi.completed:return{alertContent:null};default:return{alertContent:null,alertVariant:"info"}}}(),$e=Ie.alertContent,fe=Ie.alertVariant,me=!T&&(j==null?void 0:j.setupStatus)!=="pendingQuerySelection"&&(E==null?void 0:E.length)===0&&(j==null?void 0:j.nextScheduledAnalysis)===null,ge=v&&["updating","completed"].includes(v.status)&&!v.isUpToDateWithBrandGroups,Fe=(v==null?void 0:v.status)===Y6.updating&&ge===!0;return g.jsxs(g.Fragment,{children:[g.jsx(Gu,{isOpen:z,onClose:N,onConfirm:function(){l&&u&&G({brandId:l,analysisId:u})},isLoading:Y,title:"Delete analysis?",description:g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"This will permanently delete all data associated with this analysis."}),g.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),g.jsx(A.Card,{className:ke("yst-relative yst-overflow-visible",o),children:g.jsxs(A.Card.Content,{className:"yst-mt-0",children:[g.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:[g.jsx("div",{className:"xl:yst-max-w-1/4",children:g.jsxs("div",{className:"yst-flex yst-flex-col xl:yst-flex-row xl:yst-items-baseline xl:yst-gap-2",children:[g.jsx(A.Title,{children:g.jsxs(g.Fragment,{children:[C?g.jsx(A.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):g.jsxs(g.Fragment,{children:["Hi",x&&" ".concat(x),","]})," "]})}),g.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),g.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[g.jsxs(A.Button,{variant:"primary",className:"yst-gap-1.5",onClick:function(){return m("/setup")},disabled:T||_,children:[g.jsx(v2,{})," Analyze a different brand"]}),g.jsx("div",{className:"yst-relative",children:g.jsxs(A.DropdownMenu,{children:[g.jsx(A.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:T||_||w&&(w==null?void 0:w.length)<1,children:g.jsx(n6,{})}),g.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:g.jsxs(A.DropdownMenu.ButtonItem,{onClick:function(){return K(!0)},disabled:T||_||(B==null||(s=B.analysis)===null||s===void 0?void 0:s.status)!=="completed"||!E||E.length===0,className:"yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50",children:[g.jsx(Rf,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),g.jsx(Ya,{}),g.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center",children:[g.jsxs(Dc,{children:[g.jsx(A.Label,{htmlFor:"brand-name",children:"Brand"}),g.jsx(A.Select,{onChange:function(Oe){m("/brands/".concat(Oe.toString()))},id:"brand-name",value:l?Number(l):"loading",options:w&&w.length>0?w.map(function(Oe){return{value:Oe.id,label:Oe.name}}):[{value:"loading",label:"Loading..."}],disabled:_||!w||w.length<2||!l})]}),g.jsxs(Dc,{children:[g.jsx(A.Label,{htmlFor:"analysis-date",children:"Analysis date"}),g.jsx(I7,{analyses:E||[],selectedAnalysisId:ft,onAnalysisSelect:function(Oe){m("/brands/".concat(l,"/analysis/").concat(String(Oe)))},isLoading:T,disabled:T||!E||E.length<1,id:"analysis-date"})]}),g.jsxs(Dc,{children:[g.jsx(A.Label,{htmlFor:"ai-tool",children:"AI model"}),g.jsx(A.Select,{onChange:function(Oe){Object.values(Q6).includes(Oe)?f(Oe):console.error("Invalid AI provider selected:",Oe)},id:"ai-tool",value:c,options:R||T?[{value:c,label:"Loading..."}]:ze,disabled:R||T||[{}].length<2})]})]})]})}),g.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[de&&ye&&g.jsx(A.Alert,{children:g.jsxs("div",{className:"yst-flex yst-w-full",children:[g.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:g.jsx("p",{className:"yst-mb-0",children:"Note: This content was generated by an AI model (see dropdown above) and may contain errors. Please review before acting on it."})}),g.jsx("div",{className:"yst-ml-auto",children:g.jsx(A.Link,{onClick:se,variant:"default",children:g.jsx(_2,{})})})]})}),ot!==vi.completed&&$e&&g.jsx(A.Alert,{className:"md:yst-col-span-2",variant:fe,children:$e}),ge&&g.jsxs(A.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",Fe?g.jsxs(g.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):g.jsx(g.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),me&&g.jsx(A.Alert,{variant:"info",className:"yst-mb-6",children:g.jsx("div",{className:"yst-flex yst-items-start yst-gap-3",children:g.jsxs("div",{className:"yst-flex-1",children:[g.jsx("h3",{className:"yst-mb-2 yst-font-medium yst-text-blue-800",children:"No analyses scheduled"}),g.jsxs("p",{className:"yst-text-bluer-700 yst-mb-0",children:[g.jsx("span",{className:"yst-font-medium yst-text-blue-900",children:ee==null?void 0:ee.name})," ","has not been analyzed yet, and no analyses are scheduled because this brand is set to inactive in your"," ",g.jsx("span",{className:"yst-cursor-pointer yst-font-medium yst-text-blue-900 yst-underline",onClick:function(){return m("/settings")},role:"button",tabIndex:0,onKeyPress:function(Oe){(Oe.key==="Enter"||Oe.key===" ")&&m("/settings")},children:"Settings"}),"."]})]})})}),ee&&g.jsx(r8,{brand:ee},ee.id)]})},K7=function(){var t,n,r,i=fi(),s=i.data,o=i.isLoading,a=i.isRefetching,l=s==null?void 0:s.mentions;return g.jsx(A.Card,{className:"yst-overflow-visible",children:g.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(Wa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),g.jsx(Va,{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?g.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(u,c){var d=c===0,f=l.queriesWithMentions&&c===l.queriesWithMentions.length-1;return g.jsxs("li",{className:ke("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:[g.jsx("div",{className:"yst-h-4 yst-w-4",children:u!=null&&u.mentioned?g.jsx(K4,{className:"yst-text-green-500"}):g.jsx(m6,{className:"yst-text-red-500"})}),g.jsx("span",{className:"yst-justify-start",children:u.query}),g.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:u!=null&&u.mentioned?g.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):g.jsx(A.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},u.query)})}):g.jsx(A.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};/*!
|
|
48
|
+
*/var Ac,sg;function l8(){if(sg)return Ac;sg=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(c){return o[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch(c){return!1}}return Ac=i()?Object.assign:function(s,o){for(var a,l=r(s),u,c=1;c<arguments.length;c++){a=Object(arguments[c]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){u=e(a);for(var f=0;f<u.length;f++)n.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l},Ac}var Tc,og;function Uf(){if(og)return Tc;og=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Tc=e,Tc}var Pc,ag;function P2(){return ag||(ag=1,Pc=Function.call.bind(Object.prototype.hasOwnProperty)),Pc}var jc,lg;function u8(){if(lg)return jc;lg=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Uf(),n={},r=P2();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,u){if(process.env.NODE_ENV!=="production"){for(var c in s)if(r(s,c)){var d;try{if(typeof s[c]!="function"){var f=Error((l||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[c](o,c,l,a,null,t)}catch(y){d=y}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+c+"` 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=u?u():"";e("Failed "+a+" type: "+d.message+(h!=null?h:""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},jc=i,jc}var Mc,ug;function c8(){if(ug)return Mc;ug=1;var e=T2(),t=l8(),n=Uf(),r=P2(),i=u8(),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(u){}});function o(){return null}return Mc=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(q){var U=q&&(u&&q[u]||q[c]);if(typeof U=="function")return U}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:S,element:C(),elementType:x(),instanceOf:k,node:A(),objectOf:_,oneOf:w,oneOfType:O,shape:j,exact:B};function y(q,U){return q===U?q!==0||1/q===1/U:q!==q&&U!==U}function m(q,U){this.message=q,this.data=U&&typeof U=="object"?U:{},this.stack=""}m.prototype=Error.prototype;function p(q){if(process.env.NODE_ENV!=="production")var U={},z=0;function V(ne,J,he,X,ge,ye,je){if(X=X||f,ye=ye||he,je!==n){if(l){var se=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 se.name="Invariant Violation",se}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var nt=X+":"+he;!U[nt]&&z<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ye+"` prop on `"+X+"`. 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."),U[nt]=!0,z++)}}return J[he]==null?ne?J[he]===null?new m("The "+ge+" `"+ye+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new m("The "+ge+" `"+ye+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:q(J,he,X,ge,ye)}var N=V.bind(null,!1);return N.isRequired=V.bind(null,!0),N}function v(q){function U(z,V,N,ne,J,he){var X=z[V],ge=M(X);if(ge!==q){var ye=I(X);return new m("Invalid "+ne+" `"+J+"` of type "+("`"+ye+"` supplied to `"+N+"`, expected ")+("`"+q+"`."),{expectedType:q})}return null}return p(U)}function b(){return p(o)}function S(q){function U(z,V,N,ne,J){if(typeof q!="function")return new m("Property `"+J+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var he=z[V];if(!Array.isArray(he)){var X=M(he);return new m("Invalid "+ne+" `"+J+"` of type "+("`"+X+"` supplied to `"+N+"`, expected an array."))}for(var ge=0;ge<he.length;ge++){var ye=q(he,ge,N,ne,J+"["+ge+"]",n);if(ye instanceof Error)return ye}return null}return p(U)}function C(){function q(U,z,V,N,ne){var J=U[z];if(!a(J)){var he=M(J);return new m("Invalid "+N+" `"+ne+"` of type "+("`"+he+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return p(q)}function x(){function q(U,z,V,N,ne){var J=U[z];if(!e.isValidElementType(J)){var he=M(J);return new m("Invalid "+N+" `"+ne+"` of type "+("`"+he+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return p(q)}function k(q){function U(z,V,N,ne,J){if(!(z[V]instanceof q)){var he=q.name||f,X=Y(z[V]);return new m("Invalid "+ne+" `"+J+"` of type "+("`"+X+"` supplied to `"+N+"`, expected ")+("instance of `"+he+"`."))}return null}return p(U)}function w(q){if(!Array.isArray(q))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 U(z,V,N,ne,J){for(var he=z[V],X=0;X<q.length;X++)if(y(he,q[X]))return null;var ge=JSON.stringify(q,function(je,se){var nt=I(se);return nt==="symbol"?String(se):se});return new m("Invalid "+ne+" `"+J+"` of value `"+String(he)+"` "+("supplied to `"+N+"`, expected one of "+ge+"."))}return p(U)}function _(q){function U(z,V,N,ne,J){if(typeof q!="function")return new m("Property `"+J+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var he=z[V],X=M(he);if(X!=="object")return new m("Invalid "+ne+" `"+J+"` of type "+("`"+X+"` supplied to `"+N+"`, expected an object."));for(var ge in he)if(r(he,ge)){var ye=q(he,ge,N,ne,J+"."+ge,n);if(ye instanceof Error)return ye}return null}return p(U)}function O(q){if(!Array.isArray(q))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var U=0;U<q.length;U++){var z=q[U];if(typeof z!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(z)+" at index "+U+"."),o}function V(N,ne,J,he,X){for(var ge=[],ye=0;ye<q.length;ye++){var je=q[ye],se=je(N,ne,J,he,X,n);if(se==null)return null;se.data&&r(se.data,"expectedType")&&ge.push(se.data.expectedType)}var nt=ge.length>0?", expected one of type ["+ge.join(", ")+"]":"";return new m("Invalid "+he+" `"+X+"` supplied to "+("`"+J+"`"+nt+"."))}return p(V)}function A(){function q(U,z,V,N,ne){return R(U[z])?null:new m("Invalid "+N+" `"+ne+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return p(q)}function T(q,U,z,V,N){return new m((q||"React class")+": "+U+" type `"+z+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function j(q){function U(z,V,N,ne,J){var he=z[V],X=M(he);if(X!=="object")return new m("Invalid "+ne+" `"+J+"` of type `"+X+"` "+("supplied to `"+N+"`, expected `object`."));for(var ge in q){var ye=q[ge];if(typeof ye!="function")return T(N,ne,J,ge,I(ye));var je=ye(he,ge,N,ne,J+"."+ge,n);if(je)return je}return null}return p(U)}function B(q){function U(z,V,N,ne,J){var he=z[V],X=M(he);if(X!=="object")return new m("Invalid "+ne+" `"+J+"` of type `"+X+"` "+("supplied to `"+N+"`, expected `object`."));var ge=t({},z[V],q);for(var ye in ge){var je=q[ye];if(r(q,ye)&&typeof je!="function")return T(N,ne,J,ye,I(je));if(!je)return new m("Invalid "+ne+" `"+J+"` key `"+ye+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(z[V],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(q),null," "));var se=je(he,ye,N,ne,J+"."+ye,n);if(se)return se}return null}return p(U)}function R(q){switch(typeof q){case"number":case"string":case"undefined":return!0;case"boolean":return!q;case"object":if(Array.isArray(q))return q.every(R);if(q===null||a(q))return!0;var U=d(q);if(U){var z=U.call(q),V;if(U!==q.entries){for(;!(V=z.next()).done;)if(!R(V.value))return!1}else for(;!(V=z.next()).done;){var N=V.value;if(N&&!R(N[1]))return!1}}else return!1;return!0;default:return!1}}function P(q,U){return q==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function M(q){var U=typeof q;return Array.isArray(q)?"array":q instanceof RegExp?"object":P(U,q)?"symbol":U}function I(q){if(typeof q=="undefined"||q===null)return""+q;var U=M(q);if(U==="object"){if(q instanceof Date)return"date";if(q instanceof RegExp)return"regexp"}return U}function G(q){var U=I(q);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function Y(q){return!q.constructor||!q.constructor.name?f:q.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},Mc}var $c,cg;function d8(){if(cg)return $c;cg=1;var e=Uf();function t(){}function n(){}return n.resetWarningCache=t,$c=function(){function r(o,a,l,u,c,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},$c}var dg;function f8(){if(dg)return fl.exports;if(dg=1,process.env.NODE_ENV!=="production"){var e=T2(),t=!0;fl.exports=c8()(e.isElement,t)}else fl.exports=d8()();return fl.exports}var h8=f8();const zd=Tp(h8);var Xa=function(t){var n=t.className,r=n===void 0?"":n;return g.jsx("hr",{className:ke("yst-my-6",r)})};Xa.propTypes={className:zd.string};const j2=6048e5,g8=864e5,fg=Symbol.for("constructDateFrom");function bn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&fg in e?e[fg](t):e instanceof Date?new e.constructor(t):new Date(t)}function Xt(e,t){return bn(t||e,e)}function M2(e,t,n){const r=Xt(e,n==null?void 0:n.in);if(isNaN(t))return bn(e,NaN);if(!t)return r;const i=r.getDate(),s=bn(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 y8={};function Wu(){return y8}function ha(e,t){var a,l,u,c,d,f,h,y;const n=Wu(),r=(y=(h=(c=(u=t==null?void 0:t.weekStartsOn)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)!=null?c:n.weekStartsOn)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)!=null?y:0,i=Xt(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 au(e,t){return ha(e,{...t,weekStartsOn:1})}function $2(e,t){const n=Xt(e,t==null?void 0:t.in),r=n.getFullYear(),i=bn(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=au(i),o=bn(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=au(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function hg(e){const t=Xt(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 Qu(e,...t){const n=bn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function lu(e,t){const n=Xt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function m8(e,t,n){const[r,i]=Qu(n==null?void 0:n.in,e,t),s=lu(r),o=lu(i),a=+s-hg(s),l=+o-hg(o);return Math.round((a-l)/g8)}function p8(e,t){const n=$2(e,t),r=bn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),au(r)}function v8(e){return bn(e,Date.now())}function b8(e,t,n){const[r,i]=Qu(n==null?void 0:n.in,e,t);return+lu(r)==+lu(i)}function x8(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function w8(e){return!(!x8(e)&&typeof e!="number"||isNaN(+Xt(e)))}function S8(e,t){const n=Xt(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 C8(e,t){const[n,r]=Qu(e,t.start,t.end);return{start:n,end:r}}function _8(e,t){const{start:n,end:r}=C8(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(bn(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return i?l.reverse():l}function k8(e,t){const n=Xt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function O8(e,t){const n=Xt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const E8={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"}},A8=(e,t,n)=>{let r;const i=E8[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 Lc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const T8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},P8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},j8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M8={date:Lc({formats:T8,defaultWidth:"full"}),time:Lc({formats:P8,defaultWidth:"full"}),dateTime:Lc({formats:j8,defaultWidth:"full"})},$8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L8=(e,t,n,r)=>$8[e];function So(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 D8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},R8={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"]},N8={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"]},F8={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"}},B8={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"}},q8=(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"},z8={ordinalNumber:q8,era:So({values:D8,defaultWidth:"wide"}),quarter:So({values:I8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:So({values:R8,defaultWidth:"wide"}),day:So({values:N8,defaultWidth:"wide"}),dayPeriod:So({values:F8,defaultWidth:"wide",formattingValues:B8,defaultFormattingWidth:"wide"})};function Co(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)?U8(a,d=>d.test(o)):H8(a,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function H8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function U8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function G8(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 K8=/^(\d+)(th|st|nd|rd)?/i,V8=/\d+/i,W8={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},Q8={any:[/^b/i,/^(a|c)/i]},Y8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},X8={any:[/1/i,/2/i,/3/i,/4/i]},Z8={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},J8={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]},e7={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},t7={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]},n7={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},r7={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}},i7={ordinalNumber:G8({matchPattern:K8,parsePattern:V8,valueCallback:e=>parseInt(e,10)}),era:Co({matchPatterns:W8,defaultMatchWidth:"wide",parsePatterns:Q8,defaultParseWidth:"any"}),quarter:Co({matchPatterns:Y8,defaultMatchWidth:"wide",parsePatterns:X8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Co({matchPatterns:Z8,defaultMatchWidth:"wide",parsePatterns:J8,defaultParseWidth:"any"}),day:Co({matchPatterns:e7,defaultMatchWidth:"wide",parsePatterns:t7,defaultParseWidth:"any"}),dayPeriod:Co({matchPatterns:n7,defaultMatchWidth:"any",parsePatterns:r7,defaultParseWidth:"any"})},s7={code:"en-US",formatDistance:A8,formatLong:M8,formatRelative:L8,localize:z8,match:i7,options:{weekStartsOn:0,firstWeekContainsDate:1}};function o7(e,t){const n=Xt(e,t==null?void 0:t.in);return m8(n,O8(n))+1}function a7(e,t){const n=Xt(e,t==null?void 0:t.in),r=+au(n)-+p8(n);return Math.round(r/j2)+1}function L2(e,t){var c,d,f,h,y,m,p,v;const n=Xt(e,t==null?void 0:t.in),r=n.getFullYear(),i=Wu(),s=(v=(p=(h=(f=t==null?void 0:t.firstWeekContainsDate)!=null?f:(d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?p:(m=(y=i.locale)==null?void 0:y.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,o=bn((t==null?void 0:t.in)||e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=ha(o,t),l=bn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=ha(l,t);return+n>=+a?r+1:+n>=+u?r:r-1}function l7(e,t){var a,l,u,c,d,f,h,y;const n=Wu(),r=(y=(h=(c=(u=t==null?void 0:t.firstWeekContainsDate)!=null?u:(l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)!=null?c:n.firstWeekContainsDate)!=null?h:(f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?y:1,i=L2(e,t),s=bn((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),ha(s,t)}function u7(e,t){const n=Xt(e,t==null?void 0:t.in),r=+ha(n,t)-+l7(n,t);return Math.round(r/j2)+1}function Je(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ir={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Je(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Je(n+1,2)},d(e,t){return Je(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 Je(e.getHours()%12||12,t.length)},H(e,t){return Je(e.getHours(),t.length)},m(e,t){return Je(e.getMinutes(),t.length)},s(e,t){return Je(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Je(i,t.length)}},ss={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gg={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 Ir.y(e,t)},Y:function(e,t,n,r){const i=L2(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Je(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Je(s,t.length)},R:function(e,t){const n=$2(e);return Je(n,t.length)},u:function(e,t){const n=e.getFullYear();return Je(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 Je(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 Je(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 Ir.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 Je(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=u7(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Je(i,t.length)},I:function(e,t,n){const r=a7(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Je(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ir.d(e,t)},D:function(e,t,n){const r=o7(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Je(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 Je(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 Je(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 Je(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=ss.noon:r===0?i=ss.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=ss.evening:r>=12?i=ss.afternoon:r>=4?i=ss.morning:i=ss.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 Ir.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ir.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Je(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ir.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ir.s(e,t)},S:function(e,t){return Ir.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return mg(r);case"XXXX":case"XX":return xi(r);case"XXXXX":case"XXX":default:return xi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return mg(r);case"xxxx":case"xx":return xi(r);case"xxxxx":case"xxx":default:return xi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+yg(r,":");case"OOOO":default:return"GMT"+xi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+yg(r,":");case"zzzz":default:return"GMT"+xi(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Je(r,t.length)},T:function(e,t,n){return Je(+e,t.length)}};function yg(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+Je(s,2)}function mg(e,t){return e%60===0?(e>0?"-":"+")+Je(Math.abs(e)/60,2):xi(e,t)}function xi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Je(Math.trunc(r/60),2),s=Je(r%60,2);return n+i+t+s}const pg=(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"})}},D2=(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"})}},c7=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return pg(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}}",pg(r,t)).replace("{{time}}",D2(i,t))},d7={p:D2,P:c7},f7=/^D+$/,h7=/^Y+$/,g7=["D","DD","YY","YYYY"];function y7(e){return f7.test(e)}function m7(e){return h7.test(e)}function p7(e,t,n){const r=v7(e,t,n);if(console.warn(r),g7.includes(e))throw new RangeError(r)}function v7(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 b7=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x7=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,w7=/^'([^]*?)'?$/,S7=/''/g,C7=/[a-zA-Z]/;function Ro(e,t,n){var c,d,f,h,y,m,p,v,b;const r=Wu(),i=(c=r.locale)!=null?c:s7,s=(y=(h=r.firstWeekContainsDate)!=null?h:(f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?y: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=Xt(e,n==null?void 0:n.in);if(!w8(a))throw new RangeError("Invalid time value");let l=t.match(x7).map(S=>{const C=S[0];if(C==="p"||C==="P"){const x=d7[C];return x(S,i.formatLong)}return S}).join("").match(b7).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const C=S[0];if(C==="'")return{isToken:!1,value:_7(S)};if(gg[C])return{isToken:!0,value:S};if(C.match(C7))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:S}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(S=>{if(!S.isToken)return S.value;const C=S.value;(m7(C)||y7(C))&&p7(C,t,String(e));const x=gg[C[0]];return x(a,C,i.localize,u)}).join("")}function _7(e){const t=e.match(w7);return t?t[1].replace(S7,"'"):e}function vg(e,t,n){const[r,i]=Qu(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function k7(e,t){return b8(bn(e,e),v8(e))}function O7(e,t,n){return M2(e,-1,n)}function ga(e){"@babel/helpers - typeof";return ga=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},ga(e)}function Dc(e,t,n){return(t=E7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E7(e){var t=A7(e,"string");return ga(t)=="symbol"?t:t+""}function A7(e,t){if(ga(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ga(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bg(e,t){return M7(e)||j7(e,t)||P7(e,t)||T7()}function T7(){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 P7(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 j7(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function M7(e){if(Array.isArray(e))return e}var Wn={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:{default:"yst-bg-blue-500"}},$7=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,u=t.onClose,c=F.useState(new Date),d=bg(c,2),f=d[0],h=d[1],y=function(_){if(!_)return null;var O=_.slice(0,10),A=O.split("-"),T=bg(A,3),j=T[0],B=T[1],R=T[2],P=Number(j),M=Number(B),I=Number(R);return Number.isNaN(P)||Number.isNaN(M)||Number.isNaN(I)||M<1||M>12||I<1||I>31?null:new Date(P,M-1,I)},m=F.useMemo(function(){var w=new Map;return n.forEach(function(_){var O=y(_.createdAt),A=O?Ro(O,"yyyy-MM-dd"):"";A&&(w.has(A)||w.set(A,[]),w.get(A).push(_))}),w},[n]);F.useEffect(function(){if(l&&r){var w=n.find(function(T){return T.id===r});if(w){var _=y(w.createdAt);_&&h(_)}}else if(l&&n.length>0){var O=n.reduce(function(T,j){return new Date(j.createdAt)>new Date(T.createdAt)?j:T}),A=y(O.createdAt);A&&h(A)}},[l,r,n]);var p=F.useMemo(function(){return n.length===0?null:n.reduce(function(w,_){return new Date(_.createdAt)>new Date(w.createdAt)?_:w})},[n]),v=function(){if(p){var _=y(p.createdAt);_&&h(_)}},b=F.useMemo(function(){if(!p)return!1;var w=y(p.createdAt);return w?vg(w,f):!1},[p,f]),S=F.useMemo(function(){var w=k8(f),_=S8(f),O=new Date(w),A=O.getDay(),T=A===0?6:A-1;O.setDate(O.getDate()-T);var j=new Date(_),B=j.getDay(),R=B===0?0:7-B;return j.setDate(j.getDate()+R),_8({start:O,end:j}).map(function(P){var M=Ro(P,"yyyy-MM-dd"),I=m.get(M)||[],G=I.find(function(Y){return String(Y.id)===String(r)});return{date:M,dateObj:P,isCurrentMonth:vg(P,f),isToday:k7(P),isSelected:!!G,hasAnalyses:I.length>0,analyses:I}})},[f,m,r]),C=function(){h(function(_){return O7(_)})},x=function(){h(function(_){return M2(_,1)})},k=function(_){if(_.hasAnalyses){if(_.analyses.length===1)i(_.analyses[0].id);else{var O=_.analyses.reduce(function(A,T){return new Date(T.createdAt)>new Date(A.createdAt)?T:A});i(O.id)}u==null||u()}};return l?o?g.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:g.jsxs("div",{className:"yst-animate-pulse yst-space-y-4",children:[g.jsx("div",{className:"yst-h-6 yst-rounded yst-bg-slate-200"}),g.jsx("div",{className:"yst-h-48 yst-rounded yst-bg-slate-200"})]})}):g.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:[g.jsxs("div",{className:"yst-mb-6 yst-flex yst-items-center yst-justify-between",children:[g.jsxs("button",{type:"button",onClick:C,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[g.jsx("span",{className:"yst-sr-only",children:"Previous month"}),g.jsx(Y4,{className:"yst-h-5 yst-w-5"})]}),g.jsx("h2",{className:"yst-text-sm yst-font-semibold yst-text-slate-900",children:Ro(f,"MMMM yyyy")}),g.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:[g.jsx("span",{className:"yst-sr-only",children:"Next month"}),g.jsx(Z4,{className:"yst-h-5 yst-w-5"})]})]}),g.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(w,_){return g.jsx("div",{className:"yst-py-2 yst-text-center yst-text-xs yst-font-medium yst-text-slate-500",children:w},"".concat(w,"-").concat(_))})}),g.jsx("div",{className:"yst-grid yst-grid-cols-7 yst-gap-x-1",children:S.map(function(w){return g.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-py-1",children:g.jsxs("button",{type:"button",onClick:function(){return k(w)},disabled:!w.hasAnalyses,className:ke("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":w.isCurrentMonth,"yst-text-slate-400":!w.isCurrentMonth},{"focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-blue-500":w.hasAnalyses,"yst-cursor-not-allowed":!w.hasAnalyses,"yst-cursor-pointer":w.hasAnalyses},Dc({},"".concat(Wn.selected.background," ").concat(Wn.selected.text," ").concat(Wn.selected.hover),w.isSelected),Dc({},"".concat(Wn.hasAnalysis.border," ").concat(Wn.hasAnalysis.text," ").concat(Wn.hasAnalysis.hover),w.hasAnalyses&&!w.isSelected)),children:[g.jsx("span",{className:ke("yst-relative yst-z-10 yst-w-4",Dc({},Wn.today.underline,w.isToday&&!w.isSelected)),children:Ro(w.dateObj,"d")}),w.hasAnalyses&&w.analyses.length>1&&!w.isSelected&&g.jsx("span",{className:ke("yst-absolute yst-right-1 yst-top-1 yst-h-2 yst-w-2 yst-rounded-full",Wn.indicator.default)})]})},w.date)})}),g.jsxs("div",{className:"yst-mt-4 yst-flex yst-items-center yst-gap-4 yst-text-xs yst-text-slate-600",children:[g.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[g.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(Wn.hasAnalysis.border)}),g.jsx("span",{children:"Has analysis"})]}),g.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[g.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(Wn.selected.background)}),g.jsx("span",{children:"Selected"})]}),g.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[g.jsx("div",{className:"yst-h-0.5 yst-w-4 yst-bg-slate-400"}),g.jsx("span",{children:"Today"})]})]}),p&&g.jsx("div",{className:"yst-mt-6",children:g.jsx(E.Button,{onClick:v,className:"yst-w-full",disabled:b,children:"Show latest analysis"})})]}):null};function Ic(e,t){return R7(e)||I7(e,t)||D7(e,t)||L7()}function L7(){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 D7(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 I7(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function R7(e){if(Array.isArray(e))return e}var N7=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,u=t.id,c=u===void 0?"analysis-date-select":u,d=F.useState(!1),f=Ic(d,2),h=f[0],y=f[1],m=F.useState("latest"),p=Ic(m,2),v=p[0],b=p[1],S=F.useRef(null),C=function(P){if(!P)return null;var M=P.slice(0,10),I=M.split("-"),G=Ic(I,3),Y=G[0],q=G[1],U=G[2],z=Number(Y),V=Number(q),N=Number(U);return Number.isNaN(z)||Number.isNaN(V)||Number.isNaN(N)||V<1||V>12||N<1||N>31?null:new Date(z,V-1,N)},x=function(P){var M=C(P.createdAt);return M?M.getTime():-1/0};F.useEffect(function(){if((r==="latest"||!r)&&n.length>0&&!o){var R=n.reduce(function(P,M){return x(M)>x(P)?M:P});i(R.id)}},[n,r,i,o]);var k=F.useMemo(function(){if(r==="latest"||!r){if(n.length>0){var R=n.reduce(function(P,M){return x(M)>x(P)?M:P});return R.id}return"latest"}return r},[r,n,x]);F.useEffect(function(){b(k)},[k]);var w=n.find(function(R){return String(R.id)===String(v)}),_=n.length>0?String(n.reduce(function(R,P){return x(P)>x(R)?P:R}).id):"",O=function(){if(w){var R=C(w.createdAt),P=R?Ro(R,"MMMM d, yyyy"):w.createdAt?w.createdAt.slice(0,10):"Unknown date",M=String(w.id)===_?"(latest)":"(older)";return"".concat(P," ").concat(M)}return n.length>0?"Select date...":"No analyses available"}();F.useEffect(function(){var R=function(M){S.current&&!S.current.contains(M.target)&&y(!1)};return h&&document.addEventListener("mousedown",R),function(){document.removeEventListener("mousedown",R)}},[h]);var A=function(){!l&&!o&&y(!h)},T=function(P){b(P),i(P),y(!1)},j=function(){y(!1)},B=function(P){P.key==="Enter"||P.key===" "?(P.preventDefault(),A()):P.key==="Escape"&&y(!1)};return g.jsxs("div",{ref:S,className:"yst-relative",children:[g.jsxs("div",{className:"yst-relative",children:[g.jsx(E.TextInput,{id:c,onClick:A,onKeyDown:B,onChange:function(){},disabled:l||o,value:O,"aria-expanded":h,"aria-haspopup":"true","aria-label":"Select analysis date",className:ke("yst-pr-10",{"yst-cursor-default":!l&&!o})}),g.jsx(K4,{className:ke("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})})]}),g.jsx($7,{analyses:n,selectedAnalysisId:v,onAnalysisSelect:T,isLoading:o,isOpen:h,onClose:j})]})};function I2(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 F7(e,t){var n=I2(e);return n!==void 0&&n>t*60*1e3}var B7=2;function R2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B7,n=I2(e);return n!==void 0&&n<=t*60*1e3}function Hd(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"},o={hour:"numeric",minute:"2-digit",hour12:!0},a=i.toLocaleDateString("en-US",s),l=i.toLocaleTimeString("en-US",o);return"".concat(a," at ").concat(l)}function ya(e){"@babel/helpers - typeof";return ya=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},ya(e)}var Sg;function gl(e,t,n){return(t=q7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q7(e){var t=z7(e,"string");return ya(t)=="symbol"?t:t+""}function z7(e,t){if(ya(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ya(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cg(e,t){return K7(e)||G7(e,t)||U7(e,t)||H7()}function H7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U7(e,t){if(e){if(typeof e=="string")return _g(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)?_g(e,t):void 0}}function _g(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 G7(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function K7(e){if(Array.isArray(e))return e}function Ud(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return on(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(on(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,on(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,on(d,"constructor",u),on(u,"constructor",l),l.displayName="GeneratorFunction",on(u,i,"GeneratorFunction"),on(d),on(d,i,"Generator"),on(d,r,function(){return this}),on(d,"toString",function(){return"[object Generator]"}),(Ud=function(){return{w:s,m:f}})()}function on(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}on=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){on(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},on(e,t,n,r)}function kg(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function V7(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){kg(s,r,i,o,a,"next",l)}function a(l){kg(s,r,i,o,a,"throw",l)}o(void 0)})}}function W7(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Rc=Ya(Sg||(Sg=W7(["yst-flex-1 yst-space-y-2"]))),Q7=function(t){var n,r,i,s,o,a=t.className,l=Gn(),u=l.brandId,c=l.analysisId,d=l.model,f=Va(),h=f.setModel,y=f.setAnalysisId,m=Yt(),p=xn(),v=hi(),b=v.data,S=Uu({query:{select:function(Ve){var oe=Ve.data;return oe==null?void 0:oe.data}}}),C=S.data,x=S.isLoading,k=C==null?void 0:C.displayName,w=es({query:{select:function(Ve){var oe=Ve.data;return oe==null?void 0:oe.brands}}}),_=w.data,O=w.isLoading,A=g2(u,{query:{enabled:!!u,select:function(Ve){var oe=Ve.data;return oe==null?void 0:oe.analyses}}}),T=A.data,j=A.isLoading,B=qu(u,c,{query:{enabled:!!u&&!!c,select:function(Ve){var oe=Ve.data;return oe}}}),R=B.data,P=B.isLoading,M=ou(u,{query:{enabled:!!u,select:function(Ve){var oe=Ve.data;return oe}}}),I=M.data,G=Y5({mutation:{onSuccess:function(){var Ae=V7(Ud().m(function oe(){var pe,Oe;return Ud().w(function(Ee){for(;;)switch(Ee.n){case 0:return Ee.n=1,Promise.all([m.invalidateQueries({queryKey:Nf(u)}),m.invalidateQueries({queryKey:ir(u,c)}),m.invalidateQueries({queryKey:zu(u)})]);case 1:pe=(T==null?void 0:T.filter(function(He){return String(He.id)!==String(c)}))||[],pe.length>0?(Oe=pe.reduce(function(He,Et){var tn=He.createdAt?new Date(He.createdAt).getTime():0,mi=Et.createdAt?new Date(Et.createdAt).getTime():0;return mi>tn?Et:He}),y(Oe.id),p("/brands/".concat(u,"/analysis/").concat(Oe.id))):(y("latest"),p("/brands/".concat(u))),N(!1);case 2:return Ee.a(2)}},oe)}));function Ve(){return Ae.apply(this,arguments)}return Ve}()}}),Y=G.mutate,q=G.isPending,U=F.useState(!1),z=Cg(U,2),V=z[0],N=z[1],ne=function(){N(!1)},J=_==null?void 0:_.find(function(Ae){return String(Ae.id)===String(u)}),he=function(Ve){switch(Ve){case"openai":return"OpenAI";case"perplexity":return"Perplexity";case"anthropic":return"Anthropic";default:return Ve||"Unknown"}},X=(R==null||(n=R.analysis)===null||n===void 0||(n=n.scans)===null||n===void 0?void 0:n.map(function(Ae){return{value:Ae.aiProvider,label:he(Ae.aiProvider)}}))||[{value:"",label:"Default model"}],ge=T!=null&&T.some(function(Ae){return String(Ae.id)===String(c)})?c:T&&T.length>0?T[0].id:"latest",ye=ou(u,{query:{enabled:!!u,select:function(Ve){var oe=Ve.data;return oe}}}),je=ye.data,se=(je==null?void 0:je.name)||"your brand",nt=Hd(je==null?void 0:je.nextScheduledAnalysis),Ie=R==null||(r=R.analysis)===null||r===void 0?void 0:r.status,st=R==null||(i=R.analysis)===null||i===void 0?void 0:i.id,ze=u!=null&&typeof st=="number"&&!isNaN(st),Ke=F.useState(!1),ee=Cg(Ke,2),$e=ee[0],ot=ee[1];F.useEffect(function(){if(!ze||Ie!==qr.completed){ot(!1);return}var Ae="yst_legal_alert_dismissed_".concat(u,"_").concat(st);ot(window.localStorage.getItem(Ae)===null)},[u,st,ze,Ie]);var Ne=function(Ve){if(Ve.preventDefault(),!!ze){var oe="yst_legal_alert_dismissed_".concat(u,"_").concat(st);window.localStorage.setItem(oe,"true"),ot(!1)}},Le=g.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[g.jsx("p",{className:"yst-font-medium",children:"Your analysis is scheduled"}),g.jsxs("p",{children:["You've completed the setup for"," ",g.jsx("b",{className:"yst-font-medium",children:se}),". The analysis is scheduled to run on"," ",g.jsx("b",{className:"yst-font-medium",children:nt}),". You'll see the results here once it's ready. We'll also notify you by email."]})]}),de=gl(gl(gl(gl({scheduledFirstAnalysis:{alertContent:Le,alertVariant:"info"}},qr.pending,{alertContent:Le,alertVariant:"info"}),qr.processing,{alertContent:g.jsxs(g.Fragment,{children:["You've completed the setup for ",se,". The analysis is now processing. You'll see the results here once it's ready. We'll also notify you by email."]}),alertVariant:"info"}),qr.failed,{alertContent:g.jsx(g.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"}),qr.cancelled,{alertContent:g.jsx(g.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"}),me=!Ie&&(I==null?void 0:I.setupStatus)==="scheduledFirstAnalysis"?"scheduledFirstAnalysis":Ie,fe=(s=de[me])!==null&&s!==void 0?s:{alertContent:null,alertVariant:"info"},Fe=fe.alertContent,Zt=fe.alertVariant,It=!j&&(I==null?void 0:I.setupStatus)!=="pendingQuerySelection"&&(T==null?void 0:T.length)===0&&(I==null?void 0:I.nextScheduledAnalysis)===null,Jt=Ie===qr.completed&&b&&["updating","completed"].includes(b.status)&&!b.isUpToDateWithBrandGroups,en=(b==null?void 0:b.status)===Z6.updating&&Jt===!0;return g.jsxs(g.Fragment,{children:[g.jsx(Vu,{isOpen:V,onClose:ne,onConfirm:function(){u&&c&&Y({brandId:u,analysisId:c})},isLoading:q,title:"Delete analysis?",description:g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"This will permanently delete all data associated with this analysis."}),g.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),g.jsx(E.Card,{className:ke("yst-relative yst-overflow-visible",a),children:g.jsxs(E.Card.Content,{className:"yst-mt-0",children:[g.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:[g.jsx("div",{className:"xl:yst-max-w-1/4",children:g.jsxs("div",{className:"yst-flex yst-flex-col xl:yst-flex-row xl:yst-items-baseline xl:yst-gap-2",children:[g.jsx(E.Title,{children:g.jsxs(g.Fragment,{children:[x?g.jsx(E.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):g.jsxs(g.Fragment,{children:["Hi",k&&" ".concat(k),","]})," "]})}),g.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),g.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[g.jsxs(E.Button,{variant:"primary",className:"yst-gap-1.5",onClick:function(){return p("/setup")},disabled:j||O,children:[g.jsx(x2,{})," Analyze a different brand"]}),g.jsx("div",{className:"yst-relative",children:g.jsxs(E.DropdownMenu,{children:[g.jsx(E.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:j||O||_&&(_==null?void 0:_.length)<1,children:g.jsx(i6,{})}),g.jsx(E.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:g.jsxs(E.DropdownMenu.ButtonItem,{onClick:function(){return N(!0)},disabled:j||O||(R==null||(o=R.analysis)===null||o===void 0?void 0:o.status)!=="completed"||!T||T.length===0,className:"yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50",children:[g.jsx(Ff,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),g.jsx(Xa,{}),g.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center",children:[g.jsxs(Rc,{children:[g.jsx(E.Label,{htmlFor:"brand-name",children:"Brand"}),g.jsx(E.Select,{onChange:function(Ae){p("/brands/".concat(Ae.toString()))},id:"brand-name",value:u?Number(u):"loading",options:_&&_.length>0?_.map(function(Ae){return{value:Ae.id,label:Ae.name}}):[{value:"loading",label:"Loading..."}],disabled:O||!_||_.length<2||!u})]}),g.jsxs(Rc,{children:[g.jsx(E.Label,{htmlFor:"analysis-date",children:"Analysis date"}),g.jsx(N7,{analyses:T||[],selectedAnalysisId:ge,onAnalysisSelect:function(Ae){p("/brands/".concat(u,"/analysis/").concat(String(Ae)))},isLoading:j,disabled:j||!T||T.length<1,id:"analysis-date"})]}),g.jsxs(Rc,{children:[g.jsx(E.Label,{htmlFor:"ai-tool",children:"AI model"}),g.jsx(E.Select,{onChange:function(Ae){Object.values(X6).includes(Ae)?h(Ae):console.error("Invalid AI provider selected:",Ae)},id:"ai-tool",value:d,options:P||j?[{value:d,label:"Loading..."}]:X,disabled:P||j||[{}].length<2})]})]})]})}),g.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[$e&&g.jsx(E.Alert,{children:g.jsxs("div",{className:"yst-flex yst-w-full",children:[g.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:g.jsx("p",{className:"yst-mb-0",children:"Note: This content was generated by an AI model (see dropdown above) and may contain errors. Please review before acting on it."})}),g.jsx("div",{className:"yst-ml-auto",children:g.jsx(E.Link,{onClick:Ne,variant:"default",children:g.jsx(O2,{})})})]})}),Ie!==qr.completed&&Fe&&g.jsx(E.Alert,{className:"md:yst-col-span-2",variant:Zt,children:Fe}),Jt&&g.jsxs(E.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",en?g.jsxs(g.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):g.jsx(g.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),It&&g.jsx(E.Alert,{variant:"info",className:"yst-mb-6",children:g.jsx("div",{className:"yst-flex yst-items-start yst-gap-3",children:g.jsxs("div",{className:"yst-flex-1",children:[g.jsx("h3",{className:"yst-mb-2 yst-font-medium yst-text-blue-800",children:"No analyses scheduled"}),g.jsxs("p",{className:"yst-text-bluer-700 yst-mb-0",children:[g.jsx("span",{className:"yst-font-medium yst-text-blue-900",children:J==null?void 0:J.name})," ","has not been analyzed yet, and no analyses are scheduled because this brand is set to inactive in your"," ",g.jsx("span",{className:"yst-cursor-pointer yst-font-medium yst-text-blue-900 yst-underline",onClick:function(){return p("/settings")},role:"button",tabIndex:0,onKeyPress:function(Ae){(Ae.key==="Enter"||Ae.key===" ")&&p("/settings")},children:"Settings"}),"."]})]})})}),J&&g.jsx(s8,{brand:J},J.id)]})},Y7=function(){var t,n,r,i=hi(),s=i.data,o=i.isLoading,a=i.isRefetching,l=s==null?void 0:s.mentions;return g.jsx(E.Card,{className:"yst-overflow-visible",children:g.jsxs(E.Card.Content,{className:"yst-space-y-4",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(Qa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),g.jsx(Wa,{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?g.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(u,c){var d=c===0,f=l.queriesWithMentions&&c===l.queriesWithMentions.length-1;return g.jsxs("li",{className:ke("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:[g.jsx("div",{className:"yst-h-4 yst-w-4",children:u!=null&&u.mentioned?g.jsx(W4,{className:"yst-text-green-500"}):g.jsx(v6,{className:"yst-text-red-500"})}),g.jsx("span",{className:"yst-justify-start",children:u.query}),g.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:u!=null&&u.mentioned?g.jsx(E.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):g.jsx(E.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},u.query)})}):g.jsx(E.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};/*!
|
|
53
53
|
* @kurkle/color v0.3.4
|
|
54
54
|
* https://github.com/kurkle/color#readme
|
|
55
55
|
* (c) 2024 Jukka Kurkela
|
|
56
56
|
* Released under the MIT License
|
|
57
|
-
*/function
|
|
57
|
+
*/function Za(e){return e+.5|0}const Zr=(e,t,n)=>Math.max(Math.min(e,n),t);function No(e){return Zr(Za(e*2.55),0,255)}function ri(e){return Zr(Za(e*255),0,255)}function pr(e){return Zr(Za(e/2.55)/100,0,1)}function Og(e){return Zr(Za(e*100),0,100)}const wn={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},Gd=[..."0123456789ABCDEF"],X7=e=>Gd[e&15],Z7=e=>Gd[(e&240)>>4]+Gd[e&15],yl=e=>(e&240)>>4===(e&15),J7=e=>yl(e.r)&&yl(e.g)&&yl(e.b)&&yl(e.a);function e9(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&wn[e[1]]*17,g:255&wn[e[2]]*17,b:255&wn[e[3]]*17,a:t===5?wn[e[4]]*17:255}:(t===7||t===9)&&(n={r:wn[e[1]]<<4|wn[e[2]],g:wn[e[3]]<<4|wn[e[4]],b:wn[e[5]]<<4|wn[e[6]],a:t===9?wn[e[7]]<<4|wn[e[8]]:255})),n}const t9=(e,t)=>e<255?t(e):"";function n9(e){var t=J7(e)?X7:Z7;return e?"#"+t(e.r)+t(e.g)+t(e.b)+t9(e.a,t):void 0}const r9=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function N2(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 i9(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 s9(e,t,n){const r=N2(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 o9(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 Gf(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,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=o9(n,r,i,c,s),l=l*60+.5),[l|0,u||0,a]}function Kf(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ri)}function Vf(e,t,n){return Kf(N2,e,t,n)}function a9(e,t,n){return Kf(s9,e,t,n)}function l9(e,t,n){return Kf(i9,e,t,n)}function F2(e){return(e%360+360)%360}function u9(e){const t=r9.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?No(+t[5]):ri(+t[5]));const i=F2(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=a9(i,s,o):t[1]==="hsv"?r=l9(i,s,o):r=Vf(i,s,o),{r:r[0],g:r[1],b:r[2],a:n}}function c9(e,t){var n=Gf(e);n[0]=F2(n[0]+t),n=Vf(n),e.r=n[0],e.g=n[1],e.b=n[2]}function d9(e){if(!e)return;const t=Gf(e),n=t[0],r=Og(t[1]),i=Og(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${pr(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Eg={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"},Ag={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 f9(){const e={},t=Object.keys(Ag),n=Object.keys(Eg);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,Eg[s]);s=parseInt(Ag[o],16),e[a]=[s>>16&255,s>>8&255,s&255]}return e}let ml;function h9(e){ml||(ml=f9(),ml.transparent=[0,0,0,0]);const t=ml[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const g9=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function y9(e){const t=g9.exec(e);let n=255,r,i,s;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?No(o):Zr(o*255,0,255)}return r=+t[1],i=+t[3],s=+t[5],r=255&(t[2]?No(r):Zr(r,0,255)),i=255&(t[4]?No(i):Zr(i,0,255)),s=255&(t[6]?No(s):Zr(s,0,255)),{r,g:i,b:s,a:n}}}function m9(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${pr(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Nc=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,os=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function p9(e,t,n){const r=os(pr(e.r)),i=os(pr(e.g)),s=os(pr(e.b));return{r:ri(Nc(r+n*(os(pr(t.r))-r))),g:ri(Nc(i+n*(os(pr(t.g))-i))),b:ri(Nc(s+n*(os(pr(t.b))-s))),a:e.a+n*(t.a-e.a)}}function pl(e,t,n){if(e){let r=Gf(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Vf(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function B2(e,t){return e&&Object.assign(t||{},e)}function Tg(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=ri(e[3]))):(t=B2(e,{r:0,g:0,b:0,a:1}),t.a=ri(t.a)),t}function v9(e){return e.charAt(0)==="r"?y9(e):u9(e)}class ma{constructor(t){if(t instanceof ma)return t;const n=typeof t;let r;n==="object"?r=Tg(t):n==="string"&&(r=e9(t)||h9(t)||v9(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=B2(this._rgb);return t&&(t.a=pr(t.a)),t}set rgb(t){this._rgb=Tg(t)}rgbString(){return this._valid?m9(this._rgb):void 0}hexString(){return this._valid?n9(this._rgb):void 0}hslString(){return this._valid?d9(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,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*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=p9(this._rgb,t._rgb,n)),this}clone(){return new ma(this.rgb)}alpha(t){return this._rgb.a=ri(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Za(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 pl(this._rgb,2,t),this}darken(t){return pl(this._rgb,2,-t),this}saturate(t){return pl(this._rgb,1,t),this}desaturate(t){return pl(this._rgb,1,-t),this}rotate(t){return c9(this._rgb,t),this}}/*!
|
|
58
58
|
* Chart.js v4.5.0
|
|
59
59
|
* https://www.chartjs.org
|
|
60
60
|
* (c) 2025 Chart.js Contributors
|
|
61
61
|
* Released under the MIT License
|
|
62
|
-
*/function dr(){}const y9=(()=>{let e=0;return()=>e++})();function tt(e){return e==null}function ht(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 He(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ct(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Qn(e,t){return Ct(e)?e:t}function Be(e,t){return typeof e=="undefined"?t:e}const m9=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function at(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function et(e,t,n,r){let i,s,o;if(ht(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(He(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function au(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 lu(e){if(ht(e))return e.map(lu);if(He(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=lu(e[n[i]]);return t}return e}function F2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function p9(e,t,n,r){if(!F2(e))return;const i=t[e],s=n[e];He(i)&&He(s)?ma(i,s,r):t[e]=lu(s)}function ma(e,t,n){const r=ht(t)?t:[t],i=r.length;if(!He(e))return e;n=n||{};const s=n.merger||p9;let o;for(let a=0;a<i;++a){if(o=r[a],!He(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],e,o,n)}return e}function Qo(e,t){return ma(e,t,{merger:v9})}function v9(e,t,n){if(!F2(e))return;const r=t[e],i=n[e];He(r)&&He(i)?Qo(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=lu(i))}const Ag={"":e=>e,x:e=>e.x,y:e=>e.y};function b9(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 x9(e){const t=b9(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function pa(e,t){return(Ag[t]||(Ag[t]=x9(t)))(e)}function Kf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const uu=e=>typeof e!="undefined",oi=e=>typeof e=="function",Tg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function w9(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const vt=Math.PI,yn=2*vt,S9=yn+vt,cu=Number.POSITIVE_INFINITY,C9=vt/180,gn=vt/2,yi=vt/4,Pg=vt*2/3,B2=Math.log10,Ys=Math.sign;function Yo(e,t,n){return Math.abs(e-t)<n}function jg(e){const t=Math.round(e);e=Yo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(B2(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function _9(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 k9(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function va(e){return!k9(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function O9(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function E9(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 Zr(e){return e*(vt/180)}function Vf(e){return e*(180/vt)}function Mg(e){if(!Ct(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function A9(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*vt&&(s+=yn),{angle:s,distance:i}}function Ud(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function T9(e,t){return(e-t+S9)%yn-vt}function dn(e){return(e%yn+yn)%yn}function q2(e,t,n,r){const i=dn(e),s=dn(t),o=dn(n),a=dn(s-i),l=dn(o-i),u=dn(i-s),c=dn(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function En(e,t,n){return Math.max(t,Math.min(n,e))}function P9(e){return En(e,-32768,32767)}function gs(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Wf(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 Oi=(e,t,n,r)=>Wf(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),j9=(e,t,n)=>Wf(e,n,r=>e[r][t]>=n);function M9(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 z2=["push","pop","shift","splice","unshift"];function $9(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),z2.forEach(n=>{const r="_onData"+Kf(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 $g(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)&&(z2.forEach(s=>{delete e[s]}),delete e._chartjs)}function L9(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const H2=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function U2(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,H2.call(window,()=>{r=!1,e.apply(t,n)}))}}function D9(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Qf=e=>e==="start"?"left":e==="end"?"right":"center",jt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,I9=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function R9(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:d,max:f,minDefined:h,maxDefined:y}=o.getUserBounds();if(h){if(i=Math.min(Oi(l,c,d).lo,n?r:Oi(t,c,o.getPixelForValue(d)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(p=>!tt(p[a.axis]));i-=Math.max(0,m)}i=En(i,0,r-1)}if(y){let m=Math.max(Oi(l,o.axis,f,!0).hi+1,n?0:Oi(t,c,o.getPixelForValue(f),!0).hi+1);if(u){const p=l.slice(m-1).findIndex(v=>!tt(v[a.axis]));m+=Math.max(0,p)}s=En(m,i,r)-i}else s=r-i}return{start:i,count:s}}function N9(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 ml=e=>e===0||e===1,Lg=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*yn/n)),Dg=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*yn/n)+1,Xo={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*gn)+1,easeOutSine:e=>Math.sin(e*gn),easeInOutSine:e=>-.5*(Math.cos(vt*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=>ml(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=>ml(e)?e:Lg(e,.075,.3),easeOutElastic:e=>ml(e)?e:Dg(e,.075,.3),easeInOutElastic(e){return ml(e)?e:e<.5?.5*Lg(e*2,.1125,.45):.5+.5*Dg(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-Xo.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?Xo.easeInBounce(e*2)*.5:Xo.easeOutBounce(e*2-1)*.5+.5};function Yf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ig(e){return Yf(e)?e:new ya(e)}function Rc(e){return Yf(e)?e:new ya(e).saturate(.5).darken(.1).hexString()}const F9=["x","y","borderWidth","radius","tension"],B9=["color","borderColor","backgroundColor"];function q9(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:B9},numbers:{type:"number",properties:F9}}),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 z9(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Rg=new Map;function H9(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Rg.get(n);return r||(r=new Intl.NumberFormat(e,t),Rg.set(n,r)),r}function G2(e,t,n){return H9(t,n).format(e)}const U9={values(e){return ht(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 u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=G9(e,n)}const o=B2(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),G2(e,r,l)}};function G9(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 Xf={formatters:U9};function K9(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:Xf.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 Gi=Object.create(null),Gd=Object.create(null);function Zo(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 Nc(e,t,n){return typeof t=="string"?ma(Zo(e,t),n):ma(Zo(e,""),t)}class V9{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)=>Rc(i.backgroundColor),this.hoverBorderColor=(r,i)=>Rc(i.borderColor),this.hoverColor=(r,i)=>Rc(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 Nc(this,t,n)}get(t){return Zo(this,t)}describe(t,n){return Nc(Gd,t,n)}override(t,n){return Nc(Gi,t,n)}route(t,n,r,i){const s=Zo(this,t),o=Zo(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return He(l)?Object.assign({},u,l):Be(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var mt=new V9({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[q9,z9,K9]);function W9(e){return!e||tt(e.size)||tt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function du(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 Q9(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,u,c,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!ht(d))o=du(e,i,s,o,d);else if(ht(d))for(u=0,c=d.length;u<c;u++)f=d[u],f!=null&&!ht(f)&&(o=du(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 mi(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 Ng(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Kd(e,t,n,r){K2(e,t,n,r,null)}function K2(e,t,n,r,i){let s,o,a,l,u,c,d,f;const h=t.pointStyle,y=t.rotation,m=t.radius;let p=(y||0)*C9;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,yn):e.arc(n,r,m,0,yn),e.closePath();break;case"triangle":c=i?i/2:m,e.moveTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=Pg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=Pg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(p+yi)*l,d=Math.cos(p+yi)*(i?i/2-u:l),a=Math.sin(p+yi)*l,f=Math.sin(p+yi)*(i?i/2-u:l),e.arc(n-d,r-a,u,p-vt,p-gn),e.arc(n+f,r-o,u,p-gn,p),e.arc(n+d,r+a,u,p,p+gn),e.arc(n-f,r+o,u,p+gn,p+vt),e.closePath();break;case"rect":if(!y){l=Math.SQRT1_2*m,c=i?i/2:l,e.rect(n-c,r-l,2*c,2*l);break}p+=yi;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+=yi;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+=yi,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 Cr(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 Wu(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Qu(e){e.restore()}function Y9(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 X9(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 Z9(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),tt(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 J9(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,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function ek(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ki(e,t,n,r,i,s={}){const o=ht(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,Z9(e,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&ek(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),tt(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(u,n,r,s.maxWidth)),e.fillText(u,n,r,s.maxWidth),J9(e,n,r,u,s),r+=Number(i.lineHeight);e.restore()}function fu(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*vt,vt,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,vt,gn,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,gn,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-gn,!0),e.lineTo(n+o.topLeft,r)}const tk=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,nk=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function rk(e,t){const n=(""+e).match(tk);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 ik=e=>+e||0;function V2(e,t){const n={},r=He(t),i=r?Object.keys(t):t,s=He(e)?r?o=>Be(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=ik(s(o));return n}function sk(e){return V2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ys(e){return V2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function It(e){const t=sk(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function xt(e,t){e=e||{},t=t||mt.font;let n=Be(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Be(e.style,t.style);r&&!(""+r).match(nk)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Be(e.family,t.family),lineHeight:rk(Be(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Be(e.weight,t.weight),string:""};return i.string=W9(i),i}function pl(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 ok(e,t,n){const{min:r,max:i}=e,s=m9(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 hi(e,t){return Object.assign(Object.create(e),t)}function Zf(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=X2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>Zf([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 Q2(a,l,()=>gk(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Bg(a).includes(l)},ownKeys(a){return Bg(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function Xs(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:W2(e,r),setContext:s=>Xs(e,s,n,r),override:s=>Xs(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 Q2(s,o,()=>lk(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 W2(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:oi(n)?n:()=>n,isIndexable:oi(r)?r:()=>r}}const ak=(e,t)=>e?e+Kf(t):t,Jf=(e,t)=>He(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Q2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function lk(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return oi(a)&&o.isScriptable(t)&&(a=uk(t,a,e,n)),ht(a)&&a.length&&(a=ck(t,a,e,o.isIndexable)),Jf(t,a)&&(a=Xs(a,i,s&&s[t],o)),a}function uk(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),Jf(e,l)&&(l=eh(i._scopes,i,e,l)),l}function ck(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(He(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=eh(u,i,e,c);t.push(Xs(d,s,o&&o[e],a))}}return t}function Y2(e,t,n){return oi(e)?e(t,n):e}const dk=(e,t)=>e===!0?t:typeof e=="string"?pa(t,e):void 0;function fk(e,t,n,r,i){for(const s of t){const o=dk(n,s);if(o){e.add(o);const a=Y2(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 eh(e,t,n,r){const i=t._rootScopes,s=Y2(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=Fg(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=Fg(a,o,s,l,r),l===null)?!1:Zf(Array.from(a),[""],i,s,()=>hk(t,n,r))}function Fg(e,t,n,r,i){for(;n;)n=fk(e,t,n,r,i);return n}function hk(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return ht(i)&&He(n)?n:i||{}}function gk(e,t,n,r){let i;for(const s of t)if(i=X2(ak(s,e),n),typeof i!="undefined")return Jf(e,i)?eh(n,r,e,i):i}function X2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function Bg(e){let t=e._keys;return t||(t=e._keys=yk(e._scopes)),t}function yk(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 mk(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,u,c;for(a=0,l=r;a<l;++a)u=a+n,c=t[u],o[a]={r:i.parse(pa(c,s),u)};return o}const pk=Number.EPSILON||1e-14,Zs=(e,t)=>t<e.length&&!e[t].skip&&e[t],Z2=e=>e==="x"?"y":"x";function vk(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Ud(s,i),l=Ud(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;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 bk(e,t,n){const r=e.length;let i,s,o,a,l,u=Zs(e,0);for(let c=0;c<r-1;++c)if(l=u,u=Zs(e,c+1),!(!l||!u)){if(Yo(t[c],0,pk)){n[c]=n[c+1]=0;continue}i=n[c]/t[c],s=n[c+1]/t[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*t[c],n[c+1]=s*o*t[c])}}function xk(e,t,n="x"){const r=Z2(n),i=e.length;let s,o,a,l=Zs(e,0);for(let u=0;u<i;++u){if(o=a,a=l,l=Zs(e,u+1),!a)continue;const c=a[n],d=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=d-s*t[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=d+s*t[u])}}function wk(e,t="x"){const n=Z2(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=Zs(e,0);for(o=0;o<r;++o)if(a=l,l=u,u=Zs(e,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Ys(i[o-1])!==Ys(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}bk(e,i,s),xk(e,s,t)}function vl(e,t,n){return Math.max(Math.min(e,n),t)}function Sk(e,t){let n,r,i,s,o,a=Cr(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&Cr(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=vl(i.cp1x,t.left,t.right),i.cp1y=vl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=vl(i.cp2x,t.left,t.right),i.cp2y=vl(i.cp2y,t.top,t.bottom)))}function Ck(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")wk(e,i);else{let u=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=vk(u,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,u=a}t.capBezierPoints&&Sk(e,n)}function th(){return typeof window!="undefined"&&typeof document!="undefined"}function nh(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function hu(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 Yu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function _k(e,t){return Yu(e).getPropertyValue(t)}const kk=["top","right","bottom","left"];function Bi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=kk[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Ok=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Ek(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(Ok(i,s,e.target))a=i,l=s;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function xi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Yu(n),s=i.boxSizing==="border-box",o=Bi(i,"padding"),a=Bi(i,"border","width"),{x:l,y:u,box:c}=Ek(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:y}=t;return s&&(h-=o.width+a.width,y-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/y*n.height/r)}}function Ak(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&nh(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Yu(s),l=Bi(a,"border","width"),u=Bi(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=hu(a.maxWidth,s,"clientWidth"),i=hu(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||cu,maxHeight:i||cu}}const bl=e=>Math.round(e*10)/10;function Tk(e,t,n,r){const i=Yu(e),s=Bi(i,"margin"),o=hu(i.maxWidth,e,"clientWidth")||cu,a=hu(i.maxHeight,e,"clientHeight")||cu,l=Ak(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=Bi(i,"border","width"),h=Bi(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=bl(Math.min(u,o,l.maxWidth)),c=bl(Math.min(c,a,l.maxHeight)),u&&!c&&(c=bl(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=bl(Math.floor(c*r))),{width:u,height:c}}function qg(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 Pk=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};th()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function zg(e,t){const n=_k(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function wi(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function jk(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 Mk(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=wi(e,i,n),a=wi(i,s,n),l=wi(s,t,n),u=wi(o,a,n),c=wi(a,l,n);return wi(u,c,n)}const $k=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}}},Lk=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ms(e,t,n){return e?$k(t,n):Lk()}function J2(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 eb(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function tb(e){return e==="angle"?{between:q2,compare:T9,normalize:dn}:{between:gs,compare:(t,n)=>t-n,normalize:t=>t}}function Hg({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 Dk(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=tb(r),l=t.length;let{start:u,end:c,loop:d}=e,f,h;if(d){for(u+=l,c+=l,f=0,h=l;f<h&&o(a(t[u%l][r]),i,s);++f)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:d,style:e.style}}function nb(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:u}=tb(r),{start:c,end:d,loop:f,style:h}=Dk(e,t,n),y=[];let m=!1,p=null,v,b,S;const C=()=>l(i,S,v)&&a(i,S)!==0,x=()=>a(s,v)===0||l(s,S,v),k=()=>m||C(),w=()=>!m||x();for(let _=c,O=c;_<=d;++_)b=t[_%o],!b.skip&&(v=u(b[r]),v!==S&&(m=l(v,i,s),p===null&&k()&&(p=a(v,i)===0?_:O),p!==null&&w()&&(y.push(Hg({start:p,end:_,loop:f,count:o,style:h})),p=null),O=_,S=v));return p!==null&&y.push(Hg({start:p,end:d,loop:f,count:o,style:h})),y}function rb(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=nb(r[i],e.points,t);s.length&&n.push(...s)}return n}function Ik(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 Rk(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=u.stop?l:null):(o=l,a.skip&&(t=l)),a=u}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function Nk(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=Ik(n,i,s,r);if(r===!0)return Ug(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,u=!!e._fullLoop&&o===0&&a===i-1;return Ug(e,Rk(n,o,l,u),n,t)}function Ug(e,t,n,r){return!r||!r.setContext||!n?t:Fk(e,t,n,r)}function Fk(e,t,n,r){const i=e._chart.getContext(),s=Gg(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,u=[];let c=s,d=t[0].start,f=d;function h(y,m,p,v){const b=a?-1:1;if(y!==m){for(y+=l;n[y%l].skip;)y-=b;for(;n[m%l].skip;)m+=b;y%l!==m%l&&(u.push({start:y%l,end:m%l,loop:p,style:v}),c=v,d=m%l)}}for(const y of t){d=a?d:y.start;let m=n[d%l],p;for(f=d+1;f<=y.end;f++){const v=n[f%l];p=Gg(r.setContext(hi(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),Bk(p,c)&&h(d,f-1,y.loop,c),m=v,c=p}d<f-1&&h(d,f-1,y.loop,c)}return u}function Gg(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Bk(e,t){if(!t)return!1;const n=[],r=function(i,s){return Yf(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function xl(e,t,n){return e.options.clip?e[n]:t[n]}function qk(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:xl(n,t,"left"),right:xl(n,t,"right"),top:xl(r,t,"top"),bottom:xl(r,t,"bottom")}:t}function ib(e,t){const n=t._clip;if(n.disabled)return!1;const r=qk(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)}}/*!
|
|
62
|
+
*/function dr(){}const b9=(()=>{let e=0;return()=>e++})();function tt(e){return e==null}function ft(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 Ue(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function St(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Qn(e,t){return St(e)?e:t}function Be(e,t){return typeof e=="undefined"?t:e}const x9=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function at(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function et(e,t,n,r){let i,s,o;if(ft(e))for(s=e.length,i=0;i<s;i++)t.call(n,e[i],i);else if(Ue(e))for(o=Object.keys(e),s=o.length,i=0;i<s;i++)t.call(n,e[o[i]],o[i])}function uu(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 cu(e){if(ft(e))return e.map(cu);if(Ue(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=cu(e[n[i]]);return t}return e}function q2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function w9(e,t,n,r){if(!q2(e))return;const i=t[e],s=n[e];Ue(i)&&Ue(s)?pa(i,s,r):t[e]=cu(s)}function pa(e,t,n){const r=ft(t)?t:[t],i=r.length;if(!Ue(e))return e;n=n||{};const s=n.merger||w9;let o;for(let a=0;a<i;++a){if(o=r[a],!Ue(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],e,o,n)}return e}function Qo(e,t){return pa(e,t,{merger:S9})}function S9(e,t,n){if(!q2(e))return;const r=t[e],i=n[e];Ue(r)&&Ue(i)?Qo(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=cu(i))}const Pg={"":e=>e,x:e=>e.x,y:e=>e.y};function C9(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 _9(e){const t=C9(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function va(e,t){return(Pg[t]||(Pg[t]=_9(t)))(e)}function Wf(e){return e.charAt(0).toUpperCase()+e.slice(1)}const du=e=>typeof e!="undefined",ai=e=>typeof e=="function",jg=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function k9(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const pt=Math.PI,pn=2*pt,O9=pn+pt,fu=Number.POSITIVE_INFINITY,E9=pt/180,mn=pt/2,pi=pt/4,Mg=pt*2/3,z2=Math.log10,Xs=Math.sign;function Yo(e,t,n){return Math.abs(e-t)<n}function $g(e){const t=Math.round(e);e=Yo(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(z2(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function A9(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 T9(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ba(e){return!T9(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function P9(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function j9(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*(pt/180)}function Qf(e){return e*(180/pt)}function Lg(e){if(!St(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function M9(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*pt&&(s+=pn),{angle:s,distance:i}}function Kd(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function $9(e,t){return(e-t+O9)%pn-pt}function hn(e){return(e%pn+pn)%pn}function H2(e,t,n,r){const i=hn(e),s=hn(t),o=hn(n),a=hn(s-i),l=hn(o-i),u=hn(i-s),c=hn(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function An(e,t,n){return Math.max(t,Math.min(n,e))}function L9(e){return An(e,-32768,32767)}function ys(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Yf(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 Ei=(e,t,n,r)=>Yf(e,n,r?i=>{const s=e[i][t];return s<n||s===n&&e[i+1][t]===n}:i=>e[i][t]<n),D9=(e,t,n)=>Yf(e,n,r=>e[r][t]>=n);function I9(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 U2=["push","pop","shift","splice","unshift"];function R9(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),U2.forEach(n=>{const r="_onData"+Wf(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 Dg(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)&&(U2.forEach(s=>{delete e[s]}),delete e._chartjs)}function N9(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const G2=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function K2(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,G2.call(window,()=>{r=!1,e.apply(t,n)}))}}function F9(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const Xf=e=>e==="start"?"left":e==="end"?"right":"center",Pt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,B9=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function q9(e,t,n){const r=t.length;let i=0,s=r;if(e._sorted){const{iScale:o,vScale:a,_parsed:l}=e,u=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,c=o.axis,{min:d,max:f,minDefined:h,maxDefined:y}=o.getUserBounds();if(h){if(i=Math.min(Ei(l,c,d).lo,n?r:Ei(t,c,o.getPixelForValue(d)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(p=>!tt(p[a.axis]));i-=Math.max(0,m)}i=An(i,0,r-1)}if(y){let m=Math.max(Ei(l,o.axis,f,!0).hi+1,n?0:Ei(t,c,o.getPixelForValue(f),!0).hi+1);if(u){const p=l.slice(m-1).findIndex(v=>!tt(v[a.axis]));m+=Math.max(0,p)}s=An(m,i,r)-i}else s=r-i}return{start:i,count:s}}function z9(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 vl=e=>e===0||e===1,Ig=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*pn/n)),Rg=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*pn/n)+1,Xo={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*mn)+1,easeOutSine:e=>Math.sin(e*mn),easeInOutSine:e=>-.5*(Math.cos(pt*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=>vl(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=>vl(e)?e:Ig(e,.075,.3),easeOutElastic:e=>vl(e)?e:Rg(e,.075,.3),easeInOutElastic(e){return vl(e)?e:e<.5?.5*Ig(e*2,.1125,.45):.5+.5*Rg(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-Xo.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?Xo.easeInBounce(e*2)*.5:Xo.easeOutBounce(e*2-1)*.5+.5};function Zf(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ng(e){return Zf(e)?e:new ma(e)}function Fc(e){return Zf(e)?e:new ma(e).saturate(.5).darken(.1).hexString()}const H9=["x","y","borderWidth","radius","tension"],U9=["color","borderColor","backgroundColor"];function G9(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:U9},numbers:{type:"number",properties:H9}}),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 K9(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Fg=new Map;function V9(e,t){t=t||{};const n=e+JSON.stringify(t);let r=Fg.get(n);return r||(r=new Intl.NumberFormat(e,t),Fg.set(n,r)),r}function V2(e,t,n){return V9(t,n).format(e)}const W9={values(e){return ft(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 u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=Q9(e,n)}const o=z2(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),V2(e,r,l)}};function Q9(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:W9};function Y9(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),Vd=Object.create(null);function Zo(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 Bc(e,t,n){return typeof t=="string"?pa(Zo(e,t),n):pa(Zo(e,""),t)}class X9{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)=>Fc(i.backgroundColor),this.hoverBorderColor=(r,i)=>Fc(i.borderColor),this.hoverColor=(r,i)=>Fc(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 Bc(this,t,n)}get(t){return Zo(this,t)}describe(t,n){return Bc(Vd,t,n)}override(t,n){return Bc(Ki,t,n)}route(t,n,r,i){const s=Zo(this,t),o=Zo(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return Ue(l)?Object.assign({},u,l):Be(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var yt=new X9({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[G9,K9,Y9]);function Z9(e){return!e||tt(e.size)||tt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function hu(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 J9(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,u,c,d,f;for(l=0;l<a;l++)if(d=n[l],d!=null&&!ft(d))o=hu(e,i,s,o,d);else if(ft(d))for(u=0,c=d.length;u<c;u++)f=d[u],f!=null&&!ft(f)&&(o=hu(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 vi(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 Bg(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Wd(e,t,n,r){W2(e,t,n,r,null)}function W2(e,t,n,r,i){let s,o,a,l,u,c,d,f;const h=t.pointStyle,y=t.rotation,m=t.radius;let p=(y||0)*E9;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,pn):e.arc(n,r,m,0,pn),e.closePath();break;case"triangle":c=i?i/2:m,e.moveTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=Mg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),p+=Mg,e.lineTo(n+Math.sin(p)*c,r-Math.cos(p)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(p+pi)*l,d=Math.cos(p+pi)*(i?i/2-u:l),a=Math.sin(p+pi)*l,f=Math.sin(p+pi)*(i?i/2-u:l),e.arc(n-d,r-a,u,p-pt,p-mn),e.arc(n+f,r-o,u,p-mn,p),e.arc(n+d,r+a,u,p,p+mn),e.arc(n-f,r+o,u,p+mn,p+pt),e.closePath();break;case"rect":if(!y){l=Math.SQRT1_2*m,c=i?i/2:l,e.rect(n-c,r-l,2*c,2*l);break}p+=pi;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+=pi;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+=pi,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 Cr(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 Yu(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Xu(e){e.restore()}function ek(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 tk(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 nk(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),tt(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 rk(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,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function ik(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Vi(e,t,n,r,i,s={}){const o=ft(t)?t:[t],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(e.save(),e.font=i.string,nk(e,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&ik(e,s.backdrop),a&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),tt(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(u,n,r,s.maxWidth)),e.fillText(u,n,r,s.maxWidth),rk(e,n,r,u,s),r+=Number(i.lineHeight);e.restore()}function gu(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*pt,pt,!0),e.lineTo(n,r+s-o.bottomLeft),e.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,pt,mn,!0),e.lineTo(n+i-o.bottomRight,r+s),e.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,mn,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-mn,!0),e.lineTo(n+o.topLeft,r)}const sk=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ok=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function ak(e,t){const n=(""+e).match(sk);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 lk=e=>+e||0;function Q2(e,t){const n={},r=Ue(t),i=r?Object.keys(t):t,s=Ue(e)?r?o=>Be(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=lk(s(o));return n}function uk(e){return Q2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ms(e){return Q2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Dt(e){const t=uk(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function bt(e,t){e=e||{},t=t||yt.font;let n=Be(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Be(e.style,t.style);r&&!(""+r).match(ok)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Be(e.family,t.family),lineHeight:ak(Be(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Be(e.weight,t.weight),string:""};return i.string=Z9(i),i}function bl(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 ck(e,t,n){const{min:r,max:i}=e,s=x9(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 gi(e,t){return Object.assign(Object.create(e),t)}function eh(e,t=[""],n,r,i=()=>e[0]){const s=n||e;typeof r=="undefined"&&(r=J2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>eh([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 X2(a,l,()=>vk(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return zg(a).includes(l)},ownKeys(a){return zg(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function Zs(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Y2(e,r),setContext:s=>Zs(e,s,n,r),override:s=>Zs(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 X2(s,o,()=>fk(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 Y2(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:ai(n)?n:()=>n,isIndexable:ai(r)?r:()=>r}}const dk=(e,t)=>e?e+Wf(t):t,th=(e,t)=>Ue(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function X2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function fk(e,t,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=e;let a=r[t];return ai(a)&&o.isScriptable(t)&&(a=hk(t,a,e,n)),ft(a)&&a.length&&(a=gk(t,a,e,o.isIndexable)),th(t,a)&&(a=Zs(a,i,s&&s[t],o)),a}function hk(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),th(e,l)&&(l=nh(i._scopes,i,e,l)),l}function gk(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(Ue(t[0])){const l=t,u=i._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=nh(u,i,e,c);t.push(Zs(d,s,o&&o[e],a))}}return t}function Z2(e,t,n){return ai(e)?e(t,n):e}const yk=(e,t)=>e===!0?t:typeof e=="string"?va(t,e):void 0;function mk(e,t,n,r,i){for(const s of t){const o=yk(n,s);if(o){e.add(o);const a=Z2(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 nh(e,t,n,r){const i=t._rootScopes,s=Z2(t._fallback,n,r),o=[...e,...i],a=new Set;a.add(r);let l=qg(a,o,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=qg(a,o,s,l,r),l===null)?!1:eh(Array.from(a),[""],i,s,()=>pk(t,n,r))}function qg(e,t,n,r,i){for(;n;)n=mk(e,t,n,r,i);return n}function pk(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return ft(i)&&Ue(n)?n:i||{}}function vk(e,t,n,r){let i;for(const s of t)if(i=J2(dk(s,e),n),typeof i!="undefined")return th(e,i)?nh(n,r,e,i):i}function J2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r!="undefined")return r}}function zg(e){let t=e._keys;return t||(t=e._keys=bk(e._scopes)),t}function bk(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 xk(e,t,n,r){const{iScale:i}=e,{key:s="r"}=this._parsing,o=new Array(r);let a,l,u,c;for(a=0,l=r;a<l;++a)u=a+n,c=t[u],o[a]={r:i.parse(va(c,s),u)};return o}const wk=Number.EPSILON||1e-14,Js=(e,t)=>t<e.length&&!e[t].skip&&e[t],eb=e=>e==="x"?"y":"x";function Sk(e,t,n,r){const i=e.skip?t:e,s=t,o=n.skip?t:n,a=Kd(s,i),l=Kd(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;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 Ck(e,t,n){const r=e.length;let i,s,o,a,l,u=Js(e,0);for(let c=0;c<r-1;++c)if(l=u,u=Js(e,c+1),!(!l||!u)){if(Yo(t[c],0,wk)){n[c]=n[c+1]=0;continue}i=n[c]/t[c],s=n[c+1]/t[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*t[c],n[c+1]=s*o*t[c])}}function _k(e,t,n="x"){const r=eb(n),i=e.length;let s,o,a,l=Js(e,0);for(let u=0;u<i;++u){if(o=a,a=l,l=Js(e,u+1),!a)continue;const c=a[n],d=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=d-s*t[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=d+s*t[u])}}function kk(e,t="x"){const n=eb(t),r=e.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=Js(e,0);for(o=0;o<r;++o)if(a=l,l=u,u=Js(e,o+1),!!l){if(u){const c=u[t]-l[t];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Xs(i[o-1])!==Xs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}Ck(e,i,s),_k(e,s,t)}function xl(e,t,n){return Math.max(Math.min(e,n),t)}function Ok(e,t){let n,r,i,s,o,a=Cr(e[0],t);for(n=0,r=e.length;n<r;++n)o=s,s=a,a=n<r-1&&Cr(e[n+1],t),s&&(i=e[n],o&&(i.cp1x=xl(i.cp1x,t.left,t.right),i.cp1y=xl(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=xl(i.cp2x,t.left,t.right),i.cp2y=xl(i.cp2y,t.top,t.bottom)))}function Ek(e,t,n,r,i){let s,o,a,l;if(t.spanGaps&&(e=e.filter(u=>!u.skip)),t.cubicInterpolationMode==="monotone")kk(e,i);else{let u=r?e[e.length-1]:e[0];for(s=0,o=e.length;s<o;++s)a=e[s],l=Sk(u,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,u=a}t.capBezierPoints&&Ok(e,n)}function rh(){return typeof window!="undefined"&&typeof document!="undefined"}function ih(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function yu(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 Zu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Ak(e,t){return Zu(e).getPropertyValue(t)}const Tk=["top","right","bottom","left"];function qi(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=Tk[i];r[s]=parseFloat(e[t+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Pk=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function jk(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(Pk(i,s,e.target))a=i,l=s;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function wi(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Zu(n),s=i.boxSizing==="border-box",o=qi(i,"padding"),a=qi(i,"border","width"),{x:l,y:u,box:c}=jk(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:y}=t;return s&&(h-=o.width+a.width,y-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/y*n.height/r)}}function Mk(e,t,n){let r,i;if(t===void 0||n===void 0){const s=e&&ih(e);if(!s)t=e.clientWidth,n=e.clientHeight;else{const o=s.getBoundingClientRect(),a=Zu(s),l=qi(a,"border","width"),u=qi(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=yu(a.maxWidth,s,"clientWidth"),i=yu(a.maxHeight,s,"clientHeight")}}return{width:t,height:n,maxWidth:r||fu,maxHeight:i||fu}}const wl=e=>Math.round(e*10)/10;function $k(e,t,n,r){const i=Zu(e),s=qi(i,"margin"),o=yu(i.maxWidth,e,"clientWidth")||fu,a=yu(i.maxHeight,e,"clientHeight")||fu,l=Mk(e,t,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=qi(i,"border","width"),h=qi(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=wl(Math.min(u,o,l.maxWidth)),c=wl(Math.min(c,a,l.maxHeight)),u&&!c&&(c=wl(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=wl(Math.floor(c*r))),{width:u,height:c}}function Hg(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 Lk=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};rh()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return e}();function Ug(e,t){const n=Ak(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Si(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Dk(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 Ik(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},s={x:t.cp1x,y:t.cp1y},o=Si(e,i,n),a=Si(i,s,n),l=Si(s,t,n),u=Si(o,a,n),c=Si(a,l,n);return Si(u,c,n)}const Rk=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}}},Nk=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ps(e,t,n){return e?Rk(t,n):Nk()}function tb(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 nb(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function rb(e){return e==="angle"?{between:H2,compare:$9,normalize:hn}:{between:ys,compare:(t,n)=>t-n,normalize:t=>t}}function Gg({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 Fk(e,t,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=rb(r),l=t.length;let{start:u,end:c,loop:d}=e,f,h;if(d){for(u+=l,c+=l,f=0,h=l;f<h&&o(a(t[u%l][r]),i,s);++f)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:d,style:e.style}}function ib(e,t,n){if(!n)return[e];const{property:r,start:i,end:s}=n,o=t.length,{compare:a,between:l,normalize:u}=rb(r),{start:c,end:d,loop:f,style:h}=Fk(e,t,n),y=[];let m=!1,p=null,v,b,S;const C=()=>l(i,S,v)&&a(i,S)!==0,x=()=>a(s,v)===0||l(s,S,v),k=()=>m||C(),w=()=>!m||x();for(let _=c,O=c;_<=d;++_)b=t[_%o],!b.skip&&(v=u(b[r]),v!==S&&(m=l(v,i,s),p===null&&k()&&(p=a(v,i)===0?_:O),p!==null&&w()&&(y.push(Gg({start:p,end:_,loop:f,count:o,style:h})),p=null),O=_,S=v));return p!==null&&y.push(Gg({start:p,end:d,loop:f,count:o,style:h})),y}function sb(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const s=ib(r[i],e.points,t);s.length&&n.push(...s)}return n}function Bk(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 qk(e,t,n,r){const i=e.length,s=[];let o=t,a=e[t],l;for(l=t+1;l<=n;++l){const u=e[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:t%i,end:(l-1)%i,loop:r}),t=o=u.stop?l:null):(o=l,a.skip&&(t=l)),a=u}return o!==null&&s.push({start:t%i,end:o%i,loop:r}),s}function zk(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const s=!!e._loop,{start:o,end:a}=Bk(n,i,s,r);if(r===!0)return Kg(e,[{start:o,end:a,loop:s}],n,t);const l=a<o?a+i:a,u=!!e._fullLoop&&o===0&&a===i-1;return Kg(e,qk(n,o,l,u),n,t)}function Kg(e,t,n,r){return!r||!r.setContext||!n?t:Hk(e,t,n,r)}function Hk(e,t,n,r){const i=e._chart.getContext(),s=Vg(e.options),{_datasetIndex:o,options:{spanGaps:a}}=e,l=n.length,u=[];let c=s,d=t[0].start,f=d;function h(y,m,p,v){const b=a?-1:1;if(y!==m){for(y+=l;n[y%l].skip;)y-=b;for(;n[m%l].skip;)m+=b;y%l!==m%l&&(u.push({start:y%l,end:m%l,loop:p,style:v}),c=v,d=m%l)}}for(const y of t){d=a?d:y.start;let m=n[d%l],p;for(f=d+1;f<=y.end;f++){const v=n[f%l];p=Vg(r.setContext(gi(i,{type:"segment",p0:m,p1:v,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),Uk(p,c)&&h(d,f-1,y.loop,c),m=v,c=p}d<f-1&&h(d,f-1,y.loop,c)}return u}function Vg(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Uk(e,t){if(!t)return!1;const n=[],r=function(i,s){return Zf(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function Sl(e,t,n){return e.options.clip?e[n]:t[n]}function Gk(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Sl(n,t,"left"),right:Sl(n,t,"right"),top:Sl(r,t,"top"),bottom:Sl(r,t,"bottom")}:t}function ob(e,t){const n=t._clip;if(n.disabled)return!1;const r=Gk(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)}}/*!
|
|
63
63
|
* Chart.js v4.5.0
|
|
64
64
|
* https://www.chartjs.org
|
|
65
65
|
* (c) 2025 Chart.js Contributors
|
|
66
66
|
* Released under the MIT License
|
|
67
|
-
*/class zk{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=H2.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 yr=new zk;const Kg="transparent",Hk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Ig(e||Kg),i=r.valid&&Ig(t||Kg);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Uk{constructor(t,n,r,i){const s=n[r];i=pl([t.to,i,s,t.from]);const o=pl([t.from,s,i]);this._active=!0,this._fn=t.fn||Hk[t.type||typeof o],this._easing=Xo[t.easing]||Xo.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=pl([t.to,n,i,t.from]),this._from=pl([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 sb{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!He(t))return;const n=Object.keys(mt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!He(s))return;const o={};for(const a of n)o[a]=s[a];(ht(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=Kk(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&Gk(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 u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let d=s[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}s[u]=d=new Uk(f,t,u,c),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 yr.add(this._chart,r),!0}}function Gk(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 Kk(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 Vg(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 Vk(e,t,n){if(n===!1)return!1;const r=Vg(e,n),i=Vg(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Wk(e){let t,n,r,i;return He(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 ob(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 Wg(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],Ct(u)&&(s||t===0||Ys(t)===Ys(u))&&(t+=u)}return!c&&!r.all?0:t}function Qk(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,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[i]:c,[s]:e[c]};return a}function Fc(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Yk(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Xk(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 Zk(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Qg(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 Yg(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=Yk(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const y=t[h],{[l]:m,[u]:p}=y,v=y._stacks||(y._stacks={});f=v[u]=Zk(i,c,m),f[a]=p,f._top=Qg(f,o,!0,r.type),f._bottom=Qg(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function Bc(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Jk(e,t){return hi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function eO(e,t,n){return hi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function _o(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 qc=e=>e==="reset"||e==="none",Xg=(e,t)=>t?e:Object.assign({},e),tO=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ob(n,!0),values:null};class ps{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=Fc(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&&_o(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,y)=>d==="x"?f:d==="r"?y:h,s=n.xAxisID=Be(r.xAxisID,Bc(t,"x")),o=n.yAxisID=Be(r.yAxisID,Bc(t,"y")),a=n.rAxisID=Be(r.rAxisID,Bc(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=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(u),n.vScale=this.getScaleForId(c)}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&&$g(this._data,this),t._stacked&&_o(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(He(n)){const i=this._cachedMeta;this._data=Qk(n,i)}else if(r!==n){if(r){$g(r,this);const i=this._cachedMeta;_o(i),i._parsed=[]}n&&Object.isExtensible(n)&&$9(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=Fc(n.vScale,n),n.stack!==r.stack&&(i=!0,_o(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Yg(this,n._parsed),n._stacked=Fc(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,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{ht(i[t])?f=this.parseArrayData(r,i,t,n):He(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&Yg(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,d=new Array(i);let f,h,y;for(f=0,h=i;f<h;++f)y=f+r,d[f]={[a]:c||s.parse(u[y],y),[l]:o.parse(n[y],y)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,u,c,d;for(l=0,u=i;l<u;++l)c=l+r,d=n[c],a[l]={x:s.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+r,h=n[f],u[c]={x:s.parse(pa(h,a),f),y:o.parse(pa(h,l),f)};return u}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:ob(i,!0),values:n._stacks[t.axis]._visualValues};return Wg(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=Wg(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=tO(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=Xk(a);let f,h;function y(){h=i[f];const m=h[a.axis];return!Ct(h[t.axis])||c>m||d<m}for(f=0;f<o&&!(!y()&&(this.updateRangeFromParsed(u,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!y()){this.updateRangeFromParsed(u,t,h,l);break}}return u}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],Ct(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=Wk(Be(this.options.clip,Vk(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,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,s,a,l),c=a;c<a+l;++c){const d=i[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,s))}for(c=0;c<o.length;++c)o[c].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=eO(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=Jk(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&&uu(r);if(a)return Xg(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(mt.elements[t]),y=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(f,h,y,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(Xg(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 c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new sb(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||qc(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){qc(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!qc(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,u]of this._syncList)this[a](l,u);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=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[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&&_o(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])}}be(ps,"defaults",{}),be(ps,"datasetElementType",null),be(ps,"dataElementType",null);class Bl extends ps{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}=R9(n,i,o);this._drawStart=a,this._drawCount=l,N9(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:y,segment:m}=this.options,p=va(y)?y:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let x=0;x<S;++x){const k=t[x],w=v?k:{};if(x<n||x>=b){w.skip=!0;continue}const _=this.getParsed(x),O=tt(_[h]),E=w[f]=o.getPixelForValue(_[f],x),T=w[h]=s||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,_,l):_[h],x);w.skip=isNaN(E)||isNaN(T)||O,w.stop=x>0&&Math.abs(_[f]-C[f])>p,m&&(w.parsed=_,w.raw=u.data[x]),d&&(w.options=c||this.resolveDataElementOptions(x,k.active?"active":i)),v||this.updateElement(k,x,w,i),C=_}}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()}}be(Bl,"id","line"),be(Bl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),be(Bl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ql extends ps{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 mk.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],u=this.resolveDataElementOptions(a,l.active?"active":i),c=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:c.x,f=o?s.yCenter:c.y,h={x:d,y:f,angle:c.angle,skip:isNaN(d)||isNaN(f),options:u};this.updateElement(l,a,h,i)}}}be(ql,"id","radar"),be(ql,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),be(ql,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function pi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class rh{constructor(t){be(this,"options");this.options=t||{}}static override(t){Object.assign(rh.prototype,t)}init(){}formats(){return pi()}parse(){return pi()}format(){return pi()}add(){return pi()}diff(){return pi()}startOf(){return pi()}endOf(){return pi()}}var nO={_date:rh};function rO(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 u=a._reversePixels?j9:Oi;if(r){if(i._sharedOptions){const c=s[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(s,t,n-d),h=u(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,c.lo+1).reverse().findIndex(m=>!tt(m[d.axis]));c.lo-=Math.max(0,h);const y=f.slice(c.hi).findIndex(m=>!tt(m[d.axis]));c.hi+=Math.max(0,y)}return c}}return{lo:0,hi:s.length-1}}function Xu(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:d,hi:f}=rO(s[a],t,o,i);for(let h=d;h<=f;++h){const y=c[h];y.skip||r(y,u,h)}}}function iO(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 zc(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Xu(e,n,t,function(a,l,u){!i&&!Cr(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function sO(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=A9(o,{x:t.x,y:t.y});q2(d,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return Xu(e,n,t,s),i}function oO(e,t,n,r,i,s){let o=[];const a=iO(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,i);if(r&&!h)return;const y=c.getCenterPoint(i);if(!(!!s||e.isPointInArea(y))&&!h)return;const p=a(t,y);p<l?(o=[{element:c,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:c,datasetIndex:d,index:f})}return Xu(e,n,t,u),o}function Hc(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?sO(e,t,n,i):oO(e,t,n,r,i,s)}function Zg(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Xu(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var aO={modes:{index(e,t,n,r){const i=xi(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?zc(e,i,s,r,o):Hc(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=xi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?zc(e,i,s,r,o):Hc(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const i=xi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return zc(e,i,s,r,o)},nearest(e,t,n,r){const i=xi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Hc(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=xi(t,e);return Zg(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=xi(t,e);return Zg(e,i,"y",n.intersect,r)}}};const ab=["left","top","right","bottom"];function ko(e,t){return e.filter(n=>n.pos===t)}function Jg(e,t){return e.filter(n=>ab.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 lO(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 uO(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!ab.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 cO(e,t){const n=uO(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,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&t.availableHeight)}return n}function dO(e){const t=lO(e),n=Oo(t.filter(u=>u.box.fullSize),!0),r=Oo(ko(t,"left"),!0),i=Oo(ko(t,"right")),s=Oo(ko(t,"top"),!0),o=Oo(ko(t,"bottom")),a=Jg(t,"x"),l=Jg(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:ko(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function ey(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function lb(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 fO(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!He(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&&lb(o,s.getPadding());const a=Math.max(0,t.outerWidth-ey(o,e,"left","right")),l=Math.max(0,t.outerHeight-ey(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function hO(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 gO(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 Fo(e,t,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=e.length,u=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,gO(a.horizontal,t));const{same:d,other:f}=fO(t,n,a,r);u|=d&&i.length,c=c||f,l.fullSize||i.push(a)}return u&&Fo(i,t,n,r)||c}function wl(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 ty(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;uu(u.start)&&(o=u.start),l.fullSize?wl(l,i.left,o,n.outerWidth-i.right-i.left,f):wl(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;uu(u.start)&&(s=u.start),l.fullSize?wl(l,s,i.top,f,n.outerHeight-i.bottom-i.top):wl(l,s,t.top+u.placed,f,d),u.start=s,u.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=It(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=dO(e.boxes),l=a.vertical,u=a.horizontal;et(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=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/c,hBoxMaxHeight:o/2}),f=Object.assign({},i);lb(f,It(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),y=cO(l.concat(u),d);Fo(a.fullSize,h,d,y),Fo(l,h,d,y),Fo(u,h,d,y)&&Fo(l,h,d,y),hO(h),ty(a.leftAndTop,h,d,y),h.x+=h.w,h.y+=h.h,ty(a.rightAndBottom,h,d,y),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},et(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 ub{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 yO extends ub{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const zl="$chartjs",mO={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ny=e=>e===null||e==="";function pO(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[zl]={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",ny(i)){const s=zg(e,"width");s!==void 0&&(e.width=s)}if(ny(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=zg(e,"height");s!==void 0&&(e.height=s)}return e}const cb=Pk?{passive:!0}:!1;function vO(e,t,n){e&&e.addEventListener(t,n,cb)}function bO(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,cb)}function xO(e,t){const n=mO[e.type]||e.type,{x:r,y:i}=xi(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function gu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function wO(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||gu(a.addedNodes,r),o=o&&!gu(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function SO(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||gu(a.removedNodes,r),o=o&&!gu(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const ba=new Map;let ry=0;function db(){const e=window.devicePixelRatio;e!==ry&&(ry=e,ba.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function CO(e,t){ba.size||window.addEventListener("resize",db),ba.set(e,t)}function _O(e){ba.delete(e),ba.size||window.removeEventListener("resize",db)}function kO(e,t,n){const r=e.canvas,i=r&&nh(r);if(!i)return;const s=U2((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),CO(e,s),o}function Uc(e,t,n){n&&n.disconnect(),t==="resize"&&_O(e)}function OO(e,t,n){const r=e.canvas,i=U2(s=>{e.ctx!==null&&n(xO(s,e))},e);return vO(r,t,i),i}class EO extends ub{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(pO(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[zl])return!1;const r=n[zl].initial;["height","width"].forEach(s=>{const o=r[s];tt(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[zl],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:wO,detach:SO,resize:kO}[n]||OO;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Uc,detach:Uc,resize:Uc}[n]||bO)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Tk(t,n,r,i)}isAttached(t){const n=t&&nh(t);return!!(n&&n.isConnected)}}function AO(e){return!th()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?yO:EO}var Ml;let es=(Ml=class{constructor(){be(this,"x");be(this,"y");be(this,"active",!1);be(this,"options");be(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return va(this.x)&&va(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}},be(Ml,"defaults",{}),be(Ml,"defaultRoutes"),Ml);function TO(e,t){const n=e.options.ticks,r=PO(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?MO(t):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return $O(t,u,s,o/i),u;const c=jO(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(Sl(t,u,c,tt(h)?0:a-h,a),d=0,f=o-1;d<f;d++)Sl(t,u,c,s[d],s[d+1]);return Sl(t,u,c,l,tt(h)?t.length:l+h),u}return Sl(t,u,c),u}function PO(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 jO(e,t,n){const r=LO(e),i=t.length/n;if(!r)return Math.max(i,1);const s=_9(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 MO(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function $O(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 Sl(e,t,n,r,i){const s=Be(r,0),o=Math.min(Be(i,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(s+a*n))}function LO(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 DO=e=>e==="left"?"right":e==="right"?"left":e,iy=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,sy=(e,t)=>Math.min(t||e,e);function oy(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 IO(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),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<s-a||l>o+a)))return l}function RO(e,t){et(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 Eo(e){return e.drawTicks?e.tickLength:0}function ay(e,t){if(!e.display)return 0;const n=xt(e.font,t),r=It(e.padding);return(ht(e.text)?e.text.length:1)*n.lineHeight+r.height}function NO(e,t){return hi(e,{scale:t,type:"scale"})}function FO(e,t,n){return hi(e,{tick:n,index:t,type:"tick"})}function BO(e,t,n){let r=Qf(e);return(n&&t!=="right"||!n&&t==="right")&&(r=DO(r)),r}function qO(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,y;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=jt(r,s,a),He(n)){const v=Object.keys(n)[0],b=n[v];y=c[v].getPixelForValue(b)+m-t}else n==="center"?y=(u.bottom+u.top)/2+m-t:y=iy(e,n,t);f=a-s}else{if(He(n)){const v=Object.keys(n)[0],b=n[v];h=c[v].getPixelForValue(b)-p+t}else n==="center"?h=(u.left+u.right)/2-p+t:h=iy(e,n,t);y=jt(r,o,i),d=n==="left"?-gn:gn}return{titleX:h,titleY:y,maxWidth:f,rotation:d}}class lo extends es{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=Qn(t,Number.POSITIVE_INFINITY),n=Qn(n,Number.NEGATIVE_INFINITY),r=Qn(r,Number.POSITIVE_INFINITY),i=Qn(i,Number.NEGATIVE_INFINITY),{min:Qn(t,r),max:Qn(n,i),minDefined:Ct(t),maxDefined:Ct(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,u=a.length;l<u;++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:Qn(n,Qn(r,n)),max:Qn(r,Qn(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(){at(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=ok(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?oy(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=TO(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(){at(this.options.afterUpdate,[this])}beforeSetDimensions(){at(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(){at(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),at(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){at(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=at(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){at(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){at(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=sy(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=En(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-Eo(t.grid)-n.padding-ay(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=Vf(Math.min(Math.asin(En((c.highest.height+6)/a,-1,1)),Math.asin(En(l/u,-1,1))-Math.asin(En(f/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(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=ay(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Eo(s)+l):(t.height=this.maxHeight,t.width=Eo(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,y=Zr(this.labelRotation),m=Math.cos(y),p=Math.sin(y);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(u,c,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,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(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-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;s==="start"?(c=0,d=t.height):s==="end"&&(c=n.height,d=0),this.paddingTop=c+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(){at(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++)tt(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=oy(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/sy(n,r));let u=0,c=0,d,f,h,y,m,p,v,b,S,C,x;for(d=0;d<n;d+=l){if(y=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,S=C=0,!tt(y)&&!ht(y))S=du(i,v.data,v.gc,S,y),C=b;else if(ht(y))for(f=0,h=y.length;f<h;++f)x=y[f],!tt(x)&&!ht(x)&&(S=du(i,v.data,v.gc,S,x),C+=b);o.push(S),a.push(C),u=Math.max(S,u),c=Math.max(C,c)}RO(s,n);const k=o.indexOf(u),w=a.indexOf(c),_=O=>({width:o[O]||0,height:a[O]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(w),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 P9(this._alignToPixels?mi(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=FO(this.getContext(),t,r))}return this.$context||(this.$context=NO(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Zr(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,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Eo(s),h=[],y=a.setContext(this.getContext()),m=y.display?y.width:0,p=m/2,v=function(j){return mi(r,j,m)};let b,S,C,x,k,w,_,O,E,T,M,B;if(o==="top")b=v(this.bottom),w=this.bottom-f,O=b-p,T=v(t.top)+p,B=t.bottom;else if(o==="bottom")b=v(this.top),T=t.top,B=v(t.bottom)-p,w=b+p,O=this.top+f;else if(o==="left")b=v(this.right),k=this.right-f,_=b-p,E=v(t.left)+p,M=t.right;else if(o==="right")b=v(this.left),E=t.left,M=v(t.right)-p,k=b+p,_=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(He(o)){const j=Object.keys(o)[0],I=o[j];b=v(this.chart.scales[j].getPixelForValue(I))}T=t.top,B=t.bottom,w=b+p,O=w+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(He(o)){const j=Object.keys(o)[0],I=o[j];b=v(this.chart.scales[j].getPixelForValue(I))}k=b-p,_=k-f,E=t.left,M=t.right}const R=Be(i.ticks.maxTicksLimit,d),P=Math.max(1,Math.ceil(d/R));for(S=0;S<d;S+=P){const j=this.getContext(S),I=s.setContext(j),G=a.setContext(j),Y=I.lineWidth,q=I.color,U=G.dash||[],z=G.dashOffset,K=I.tickWidth,N=I.tickColor,ee=I.tickBorderDash||[],te=I.tickBorderDashOffset;C=IO(this,S,l),C!==void 0&&(x=mi(r,C,Y),u?k=_=E=M=x:w=O=T=B=x,h.push({tx1:k,ty1:w,tx2:_,ty2:O,x1:E,y1:T,x2:M,y2:B,width:Y,color:q,borderDash:U,borderDashOffset:z,tickWidth:K,tickColor:N,tickBorderDash:ee,tickBorderDashOffset:te}))}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:u,padding:c,mirror:d}=s,f=Eo(r.grid),h=f+c,y=d?-c:h,m=-Zr(this.labelRotation),p=[];let v,b,S,C,x,k,w,_,O,E,T,M,B="middle";if(i==="top")k=this.bottom-y,w=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+y,w=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(f);w=P.textAlign,x=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(f);w=P.textAlign,x=P.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+h;else if(He(i)){const P=Object.keys(i)[0],j=i[P];k=this.chart.scales[P].getPixelForValue(j)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(He(i)){const P=Object.keys(i)[0],j=i[P];x=this.chart.scales[P].getPixelForValue(j)}w=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const R=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){S=a[v],C=S.label;const P=s.setContext(this.getContext(v));_=this.getPixelForTick(v)+s.labelOffset,O=this._resolveTickFontOptions(v),E=O.lineHeight,T=ht(C)?C.length:1;const j=T/2,I=P.color,G=P.textStrokeColor,Y=P.textStrokeWidth;let q=w;o?(x=_,w==="inner"&&(v===b-1?q=this.options.reverse?"left":"right":v===0?q=this.options.reverse?"right":"left":q="center"),i==="top"?u==="near"||m!==0?M=-T*E+E/2:u==="center"?M=-R.highest.height/2-j*E+E:M=-R.highest.height+E/2:u==="near"||m!==0?M=E/2:u==="center"?M=R.highest.height/2-j*E:M=R.highest.height-T*E,d&&(M*=-1),m!==0&&!P.showLabelBackdrop&&(x+=E/2*Math.sin(m))):(k=_,M=(1-T)*E/2);let U;if(P.showLabelBackdrop){const z=It(P.backdropPadding),K=R.heights[v],N=R.widths[v];let ee=M-z.top,te=0-z.left;switch(B){case"middle":ee-=K/2;break;case"bottom":ee-=K;break}switch(w){case"center":te-=N/2;break;case"right":te-=N;break;case"inner":v===b-1?te-=N:v>0&&(te-=N/2);break}U={left:te,top:ee,width:N+z.width,height:K+z.height,color:P.backdropColor}}p.push({label:C,font:O,textOffset:M,options:{rotation:m,color:I,strokeColor:G,strokeWidth:Y,textAlign:q,textBaseline:B,translation:[x,k],backdrop:U}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Zr(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 u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_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,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.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 u,c,d,f;this.isHorizontal()?(u=mi(t,this.left,o)-o/2,c=mi(t,this.right,a)+a/2,d=f=l):(d=mi(t,this.top,o)-o/2,f=mi(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Wu(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Ki(r,u,0,c,l,a)}i&&Qu(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=xt(r.font),o=It(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||He(n)?(l+=o.bottom,ht(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=qO(this,l,n,a);Ki(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:BO(a,n,i),textBaseline:"middle",translation:[u,c]})}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=Be(t.grid&&t.grid.z,-1),i=Be(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==lo.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 xt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Cl{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;UO(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,zO(t,o,r),this.override&&mt.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 mt[i]&&(delete mt[i][r],this.override&&delete Gi[r])}}function zO(e,t,n){const r=ma(Object.create(null),[n?mt.get(n):{},mt.get(t),e.defaults]);mt.set(t,r),e.defaultRoutes&&HO(t,e.defaultRoutes),e.descriptors&&mt.describe(t,e.descriptors)}function HO(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(".");mt.route(s,i,l,a)})}function UO(e){return"id"in e&&"defaults"in e}class GO{constructor(){this.controllers=new Cl(ps,"datasets",!0),this.elements=new Cl(es,"elements"),this.plugins=new Cl(Object,"plugins"),this.scales=new Cl(lo,"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):et(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Kf(t);at(r["before"+i],[],r),n[t](r),at(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 Zn=new GO;class KO{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(at(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){tt(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=Be(r.options&&r.options.plugins,{}),s=VO(r);return i===!1&&!n?[]:QO(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 VO(e){const t={},n=[],r=Object.keys(Zn.plugins.items);for(let s=0;s<r.length;s++)n.push(Zn.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 WO(e,t){return!t&&e===!1?null:e===!0?{}:e}function QO(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,u=WO(r[l],i);u!==null&&s.push({plugin:a,options:YO(e.config,{plugin:a,local:n[l]},u,o)})}return s}function YO(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 Vd(e,t){const n=mt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function XO(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function ZO(e,t){return e===t?"_index_":"_value_"}function ly(e){if(e==="x"||e==="y"||e==="r")return e}function JO(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Wd(e,...t){if(ly(e))return e;for(const n of t){const r=n.axis||JO(n.position)||e.length>1&&ly(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function uy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function eE(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 uy(e,"x",n[0])||uy(e,"y",n[0])}return{}}function tE(e,t){const n=Gi[e.type]||{scales:{}},r=t.scales||{},i=Vd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!He(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=Wd(o,a,eE(o,e),mt.scales[a.type]),u=ZO(l,i),c=n.scales||{};s[o]=Qo(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Vd(a,t),c=(Gi[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=XO(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Qo(s[h],[{axis:f},r[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];Qo(a,[mt.scales[a.type],mt.scale])}),s}function fb(e){const t=e.options||(e.options={});t.plugins=Be(t.plugins,{}),t.scales=tE(e,t)}function hb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function nE(e){return e=e||{},e.data=hb(e.data),fb(e),e}const cy=new Map,gb=new Set;function _l(e,t){let n=cy.get(e);return n||(n=t(),cy.set(e,n),gb.add(n)),n}const Ao=(e,t,n)=>{const r=pa(t,n);r!==void 0&&e.add(r)};class rE{constructor(t){this._config=nE(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=hb(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 _l(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _l(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _l(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return _l(`${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(c=>{t&&(l.add(t),c.forEach(d=>Ao(l,t,d))),c.forEach(d=>Ao(l,i,d)),c.forEach(d=>Ao(l,Gi[s]||{},d)),c.forEach(d=>Ao(l,mt,d)),c.forEach(d=>Ao(l,Gd,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),gb.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Gi[n]||{},mt.datasets[n]||{},{type:n},mt,Gd]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=dy(this._resolverCache,t,i);let l=o;if(sE(o,n)){s.$shared=!1,r=oi(r)?r():r;const u=this.createResolver(t,r,a);l=Xs(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(t,n,r=[""],i){const{resolver:s}=dy(this._resolverCache,t,r);return He(n)?Xs(s,n,void 0,i):s}}function dy(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:Zf(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const iE=e=>He(e)&&Object.getOwnPropertyNames(e).some(t=>oi(e[t]));function sE(e,t){const{isScriptable:n,isIndexable:r}=W2(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(oi(a)||iE(a))||o&&ht(a))return!0}return!1}var oE="4.5.0";const aE=["top","bottom","left","right","chartArea"];function fy(e,t){return e==="top"||e==="bottom"||aE.indexOf(e)===-1&&t==="x"}function hy(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"),at(n&&n.onComplete,[e],t)}function lE(e){const t=e.chart,n=t.options.animation;at(n&&n.onProgress,[e],t)}function yb(e){return th()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Hl={},yy=e=>{const t=yb(e);return Object.values(Hl).filter(n=>n.canvas===t).pop()};function uE(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 cE(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Fr;let Zu=(Fr=class{static register(...t){Zn.add(...t),my()}static unregister(...t){Zn.remove(...t),my()}constructor(t,n){const r=this.config=new rE(n),i=yb(t),s=yy(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||AO(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=y9(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,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 KO,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=D9(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Hl[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}yr.listen(this,"complete",gy),yr.listen(this,"progress",lE),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return tt(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 Zn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():qg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ng(this.canvas,this.ctx),this}stop(){return yr.stop(this),this}resize(t,n){yr.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,qg(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),at(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};et(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=Wd(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),et(s,o=>{const a=o.options,l=a.id,u=Wd(l,a),c=Be(a.type,o.dtype);(a.position===void 0||fy(a.position,u)!==fy(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Zn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),et(i,(o,a)=>{o||delete r[a]}),et(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(hy("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||Vd(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=Zn.getController(a),{datasetElementType:u,dataElementType:c}=mt.datasets[a];Object.assign(l,{dataElementType:Zn.getElement(c),datasetElementType:u&&Zn.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){et(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 u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),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||et(s,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(hy("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){et(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);(!Tg(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;uE(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(!Tg(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=[],et(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,oi(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&&(yr.has(this)?this.attached&&!yr.running(this)&&yr.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=ib(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Wu(n,i),t.controller.draw(),i&&Qu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Cr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=aO.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=hi(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);uu(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(),yr.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(),Ng(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Hl[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)};et(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};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(){et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},et(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 u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[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}});!au(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,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.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=w9(t),u=cE(t,this._lastEvent,r,l);r&&(this._lastEvent=null,at(s.onHover,[t,a,this],this),l&&at(s.onClick,[t,a,this],this));const c=!au(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_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)}},be(Fr,"defaults",mt),be(Fr,"instances",Hl),be(Fr,"overrides",Gi),be(Fr,"registry",Zn),be(Fr,"version",oE),be(Fr,"getChart",yy),Fr);function my(){return et(Zu.instances,e=>e._plugins.invalidate())}function mb(e,t,n=t){e.lineCap=Be(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Be(n.borderDash,t.borderDash)),e.lineDashOffset=Be(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Be(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Be(n.borderWidth,t.borderWidth),e.strokeStyle=Be(n.borderColor,t.borderColor)}function dE(e,t,n){e.lineTo(n.x,n.y)}function fE(e){return e.stepped?Y9:e.tension||e.cubicInterpolationMode==="monotone"?X9:dE}function pb(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),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function hE(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:u}=pb(i,n,r),c=fE(s);let{move:d=!0,reverse:f}=r||{},h,y,m;for(h=0;h<=u;++h)y=i[(a+(f?u-h:h))%o],!y.skip&&(d?(e.moveTo(y.x,y.y),d=!1):c(e,m,y,f,s.stepped),m=y);return l&&(y=i[(a+(f?u:0))%o],c(e,m,y,f,s.stepped)),!!l}function gE(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=pb(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,d=0,f,h,y,m,p,v;const b=C=>(o+(u?a-C:C))%s,S=()=>{m!==p&&(e.lineTo(c,p),e.lineTo(c,m),e.lineTo(c,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 C=h.x,x=h.y,k=C|0;k===y?(x<m?m=x:x>p&&(p=x),c=(d*c+C)/++d):(S(),e.lineTo(C,x),y=k,d=0,m=p=x),v=x}S()}function Qd(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?gE:hE}function yE(e){return e.stepped?jk:e.tension||e.cubicInterpolationMode==="monotone"?Mk:wi}function mE(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),mb(e,t.options),e.stroke(i)}function pE(e,t,n,r){const{segments:i,options:s}=t,o=Qd(t);for(const a of i)mb(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const vE=typeof Path2D=="function";function bE(e,t,n,r){vE&&!t.options.segment?mE(e,t,n,r):pE(e,t,n,r)}class Jr extends es{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;Ck(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=Nk(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=rb(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=yE(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:d,end:f}=o[u],h=s[d],y=s[f];if(h===y){a.push(h);continue}const m=Math.abs((i-h[n])/(y[n]-h[n])),p=l(h,y,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Qd(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Qd(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(),bE(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}be(Jr,"id","line"),be(Jr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),be(Jr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),be(Jr,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function py(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Ul extends es{constructor(n){super();be(this,"parsed");be(this,"skip");be(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 py(this,n,"x",r)}inYRange(n,r){return py(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||!Cr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Kd(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}be(Ul,"id","point"),be(Ul,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),be(Ul,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function xE(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:u}=a;u=Ju(l,u,i);const c=Yd(n,i[l],i[u],a.loop);if(!t.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const d=rb(t,c);for(const f of d){const h=Yd(n,s[f.start],s[f.end],f.loop),y=nb(a,i,h);for(const m of y)o.push({source:m,target:f,start:{[n]:vy(c,h,"start",Math.max)},end:{[n]:vy(c,h,"end",Math.min)}})}}return o}function Yd(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=dn(i),s=dn(s)),{property:e,start:i,end:s}}function wE(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=Ju(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function Ju(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function vy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function vb(e,t){let n=[],r=!1;return ht(e)?(r=!0,n=e):n=wE(e,t),n.length?new Jr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function by(e){return e&&e.fill!==!1}function SE(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(!Ct(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function CE(e,t,n){const r=EE(e);if(He(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Ct(i)&&Math.floor(i)===i?_E(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function _E(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function kE(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:He(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function OE(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:He(e)?r=e.value:r=t.getBaseValue(),r}function EE(e){const t=e.options,n=t.fill;let r=Be(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function AE(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=TE(t,n);a.push(vb({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)PE(i,o[c],a)}return new Jr({points:i,options:{}})}function TE(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 PE(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=jE(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function jE(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 u=0;u<s.length;u++){const c=s[u],d=o[c.start][n],f=o[c.end][n];if(gs(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class bb{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:yn},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 ME(e){const{chart:t,fill:n,line:r}=e;if(Ct(n))return $E(t,n);if(n==="stack")return AE(e);if(n==="shape")return!0;const i=LE(e);return i instanceof bb?i:vb(i,r)}function $E(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function LE(e){return(e.scale||{}).getPointPositionForValue?IE(e):DE(e)}function DE(e){const{scale:t={},fill:n}=e,r=kE(n,t);if(Ct(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function IE(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=OE(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new bb({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 Gc(e,t,n){const r=ME(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,u=o.options,c=u.fill,d=u.backgroundColor,{above:f=d,below:h=d}=c||{},y=i.getDatasetMeta(s),m=ib(i,y);r&&o.points.length&&(Wu(e,n),RE(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Qu(e))}function RE(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,u=n._loop?"angle":t.axis;e.save();let c=s;s!==i&&(u==="x"?(xy(e,r,o.top),Kc(e,{line:n,target:r,color:i,scale:a,property:u,clip:l}),e.restore(),e.save(),xy(e,r,o.bottom)):u==="y"&&(wy(e,r,o.left),Kc(e,{line:n,target:r,color:s,scale:a,property:u,clip:l}),e.restore(),e.save(),wy(e,r,o.right),c=i)),Kc(e,{line:n,target:r,color:c,scale:a,property:u,clip:l}),e.restore()}function xy(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:u}=a,c=i[l],d=i[Ju(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.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 wy(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:u}=a,c=i[l],d=i[Ju(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(n,c.y),e.lineTo(c.x,c.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 Kc(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=xE(n,r,i);for(const{source:u,target:c,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=u,y=r!==!0;e.save(),e.fillStyle=h,NE(e,o,a,y&&Yd(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,u);let p;if(y){m?e.closePath():Sy(e,r,f,i);const v=!!r.pathSegment(e,c,{move:m,reverse:!0});p=m&&v,p||Sy(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function NE(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,u,c,d;s==="x"?(l=o,u=i.top,c=a,d=i.bottom):(l=i.left,u=o,c=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),c=Math.min(c,n.right),u=Math.max(u,n.top),d=Math.min(d,n.bottom)),e.rect(l,u,c-l,d-u),e.clip()}}function Sy(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var FE={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:CE(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=SE(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&&Gc(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;by(s)&&Gc(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!by(r)||n.drawTime!=="beforeDatasetDraw"||Gc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Cy=(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)}},BE=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class _y extends es{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=at(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=xt(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Cy(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((y,m)=>{const p=r+n/2+s.measureText(y.text).width;(m===0||u[u.length-1]+p+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,h+=c,f++),l[m]={left:0,top:h,row:f,width:p,height:i},u[u.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,y=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:S}=qE(r,n,s,p,i);v>0&&h+S+2*a>c&&(d+=f+a,u.push({width:f,height:h}),y+=f+a,m++,f=h=0),l[v]={left:y,top:h,col:m,width:b,height:S},f=Math.max(f,b),h+=S+a}),d+=f,u.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=ms(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=jt(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=jt(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+t+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=jt(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=jt(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Wu(t,this),this._draw(),Qu(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=mt.color,l=ms(t.rtl,this.left,this.width),u=xt(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:m,itemHeight:p}=Cy(o,d),v=function(k,w,_){if(isNaN(y)||y<=0||isNaN(m)||m<0)return;i.save();const O=Be(_.lineWidth,1);if(i.fillStyle=Be(_.fillStyle,a),i.lineCap=Be(_.lineCap,"butt"),i.lineDashOffset=Be(_.lineDashOffset,0),i.lineJoin=Be(_.lineJoin,"miter"),i.lineWidth=O,i.strokeStyle=Be(_.strokeStyle,a),i.setLineDash(Be(_.lineDash,[])),o.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:O},T=l.xPlus(k,y/2),M=w+f;K2(i,E,T,M,o.pointStyleWidth&&y)}else{const E=w+Math.max((d-m)/2,0),T=l.leftForLtr(k,y),M=ys(_.borderRadius);i.beginPath(),Object.values(M).some(B=>B!==0)?fu(i,{x:T,y:E,w:y,h:m,radius:M}):i.rect(T,E,y,m),i.fill(),O!==0&&i.stroke()}i.restore()},b=function(k,w,_){Ki(i,_.text,k,w+p/2,u,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?h={x:jt(s,this.left+c,this.right-r[0]),y:this.top+c+C,line:0}:h={x:this.left+c,y:jt(s,this.top+C+c,this.bottom-n[0].height),line:0},J2(this.ctx,t.textDirection);const x=p+c;this.legendItems.forEach((k,w)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const _=i.measureText(k.text).width,O=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),E=y+f+_;let T=h.x,M=h.y;l.setWidth(this.width),S?w>0&&T+E+c>this.right&&(M=h.y+=x,h.line++,T=h.x=jt(s,this.left+c,this.right-r[h.line])):w>0&&M+x>this.bottom&&(T=h.x=T+n[h.line].width+c,h.line++,M=h.y=jt(s,this.top+C+c,this.bottom-n[h.line].height));const B=l.x(T);if(v(B,M,k),T=I9(O,T+y+f,S?T+E:this.right,t.rtl),b(l.x(T),M,k),S)h.x+=E+c;else if(typeof k.text!="string"){const R=u.lineHeight;h.y+=xb(k,R)+c}else h.y+=x}),eb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=xt(n.font),i=It(n.padding);if(!n.display)return;const s=ms(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=jt(t.align,d,this.right-f);else{const y=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);c=u+jt(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const h=jt(a,d,d+f);o.textAlign=s.textAlign(Qf(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Ki(o,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=xt(t.font),r=It(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(gs(t,this.left,this.right)&&gs(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],gs(t,i.left,i.left+i.width)&&gs(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!UE(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=BE(i,r);i&&!s&&at(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&at(n.onHover,[t,r,this],this)}else r&&at(n.onClick,[t,r,this],this)}}function qE(e,t,n,r,i){const s=zE(r,e,t,n),o=HE(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function zE(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 HE(e,t,n){let r=e;return typeof t.text!="string"&&(r=xb(t,n)),r}function xb(e,t){const n=e.text?e.text.length:0;return t*n}function UE(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var GE={id:"legend",_element:_y,start(e,t,n){const r=e.legend=new _y({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 u=l.controller.getStyle(n?0:void 0),c=It(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.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 wb extends es{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=ht(r.text)?r.text.length:1;this._padding=It(r.padding);const s=i*xt(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,u,c,d;return this.isHorizontal()?(c=jt(a,r,s),d=n+t,u=s-r):(o.position==="left"?(c=r+t,d=jt(a,i,n),l=vt*-.5):(c=s-t,d=jt(a,n,i),l=vt*.5),u=i-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=xt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Ki(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Qf(n.align),textBaseline:"middle",translation:[o,a]})}}function KE(e,t){const n=new wb({ctx:e.ctx,options:t,chart:e});An.configure(e,n,t),An.addBox(e,n),e.titleBlock=n}var VE={id:"title",_element:wb,start(e,t,n){KE(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 Bo={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 u=l.getCenterPoint(),c=Ud(t,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Xn(e,t){return t&&(ht(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function mr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
67
|
+
*/class Kk{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=G2.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 yr=new Kk;const Wg="transparent",Vk={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Ng(e||Wg),i=r.valid&&Ng(t||Wg);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Wk{constructor(t,n,r,i){const s=n[r];i=bl([t.to,i,s,t.from]);const o=bl([t.from,s,i]);this._active=!0,this._fn=t.fn||Vk[t.type||typeof o],this._easing=Xo[t.easing]||Xo.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=bl([t.to,n,i,t.from]),this._from=bl([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 ab{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ue(t))return;const n=Object.keys(yt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const s=t[i];if(!Ue(s))return;const o={};for(const a of n)o[a]=s[a];(ft(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,i=Yk(t,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&Qk(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 u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let d=s[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}s[u]=d=new Wk(f,t,u,c),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 yr.add(this._chart,r),!0}}function Qk(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 Yk(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 Qg(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 Xk(e,t,n){if(n===!1)return!1;const r=Qg(e,n),i=Qg(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Zk(e){let t,n,r,i;return Ue(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 lb(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 Yg(e,t,n,r={}){const i=e.keys,s=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],St(u)&&(s||t===0||Xs(t)===Xs(u))&&(t+=u)}return!c&&!r.all?0:t}function Jk(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,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[i]:c,[s]:e[c]};return a}function qc(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function eO(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function tO(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 nO(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Xg(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 Zg(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=eO(s,o,r),d=t.length;let f;for(let h=0;h<d;++h){const y=t[h],{[l]:m,[u]:p}=y,v=y._stacks||(y._stacks={});f=v[u]=nO(i,c,m),f[a]=p,f._top=Xg(f,o,!0,r.type),f._bottom=Xg(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=p}}function zc(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function rO(e,t){return gi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function iO(e,t,n){return gi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function _o(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 Hc=e=>e==="reset"||e==="none",Jg=(e,t)=>t?e:Object.assign({},e),sO=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:lb(n,!0),values:null};class vs{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=qc(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&&_o(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,y)=>d==="x"?f:d==="r"?y:h,s=n.xAxisID=Be(r.xAxisID,zc(t,"x")),o=n.yAxisID=Be(r.yAxisID,zc(t,"y")),a=n.rAxisID=Be(r.rAxisID,zc(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=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(u),n.vScale=this.getScaleForId(c)}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&&Dg(this._data,this),t._stacked&&_o(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ue(n)){const i=this._cachedMeta;this._data=Jk(n,i)}else if(r!==n){if(r){Dg(r,this);const i=this._cachedMeta;_o(i),i._parsed=[]}n&&Object.isExtensible(n)&&R9(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=qc(n.vScale,n),n.stack!==r.stack&&(i=!0,_o(n),n.stack=r.stack),this._resyncElements(t),(i||s!==n._stacked)&&(Zg(this,n._parsed),n._stacked=qc(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,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{ft(i[t])?f=this.parseArrayData(r,i,t,n):Ue(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&Zg(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:s,vScale:o}=t,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,d=new Array(i);let f,h,y;for(f=0,h=i;f<h;++f)y=f+r,d[f]={[a]:c||s.parse(u[y],y),[l]:o.parse(n[y],y)};return d}parseArrayData(t,n,r,i){const{xScale:s,yScale:o}=t,a=new Array(i);let l,u,c,d;for(l=0,u=i;l<u;++l)c=l+r,d=n[c],a[l]={x:s.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,i){const{xScale:s,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+r,h=n[f],u[c]={x:s.parse(va(h,a),f),y:o.parse(va(h,l),f)};return u}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:lb(i,!0),values:n._stacks[t.axis]._visualValues};return Yg(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=Yg(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=sO(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=tO(a);let f,h;function y(){h=i[f];const m=h[a.axis];return!St(h[t.axis])||c>m||d<m}for(f=0;f<o&&!(!y()&&(this.updateRangeFromParsed(u,t,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!y()){this.updateRangeFromParsed(u,t,h,l);break}}return u}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],St(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=Zk(Be(this.options.clip,Xk(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,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,s,a,l),c=a;c<a+l;++c){const d=i[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,s))}for(c=0;c<o.length;++c)o[c].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=iO(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=rO(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&&du(r);if(a)return Jg(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(yt.elements[t]),y=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(f,h,y,d);return m.$shared&&(m.$shared=l,s[o]=Object.freeze(Jg(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 c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new ab(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||Hc(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){Hc(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!Hc(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,u]of this._syncList)this[a](l,u);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=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[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&&_o(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])}}be(vs,"defaults",{}),be(vs,"datasetElementType",null),be(vs,"dataElementType",null);class zl extends vs{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}=q9(n,i,o);this._drawStart=a,this._drawCount=l,z9(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:y,segment:m}=this.options,p=ba(y)?y:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",b=n+r,S=t.length;let C=n>0&&this.getParsed(n-1);for(let x=0;x<S;++x){const k=t[x],w=v?k:{};if(x<n||x>=b){w.skip=!0;continue}const _=this.getParsed(x),O=tt(_[h]),A=w[f]=o.getPixelForValue(_[f],x),T=w[h]=s||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,_,l):_[h],x);w.skip=isNaN(A)||isNaN(T)||O,w.stop=x>0&&Math.abs(_[f]-C[f])>p,m&&(w.parsed=_,w.raw=u.data[x]),d&&(w.options=c||this.resolveDataElementOptions(x,k.active?"active":i)),v||this.updateElement(k,x,w,i),C=_}}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()}}be(zl,"id","line"),be(zl,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),be(zl,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Hl extends vs{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 xk.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],u=this.resolveDataElementOptions(a,l.active?"active":i),c=s.getPointPositionForValue(a,this.getParsed(a).r),d=o?s.xCenter:c.x,f=o?s.yCenter:c.y,h={x:d,y:f,angle:c.angle,skip:isNaN(d)||isNaN(f),options:u};this.updateElement(l,a,h,i)}}}be(Hl,"id","radar"),be(Hl,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),be(Hl,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function bi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sh{constructor(t){be(this,"options");this.options=t||{}}static override(t){Object.assign(sh.prototype,t)}init(){}formats(){return bi()}parse(){return bi()}format(){return bi()}add(){return bi()}diff(){return bi()}startOf(){return bi()}endOf(){return bi()}}var oO={_date:sh};function aO(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 u=a._reversePixels?D9:Ei;if(r){if(i._sharedOptions){const c=s[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(s,t,n-d),h=u(s,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(s,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,h=f.slice(0,c.lo+1).reverse().findIndex(m=>!tt(m[d.axis]));c.lo-=Math.max(0,h);const y=f.slice(c.hi).findIndex(m=>!tt(m[d.axis]));c.hi+=Math.max(0,y)}return c}}return{lo:0,hi:s.length-1}}function Ju(e,t,n,r,i){const s=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:d,hi:f}=aO(s[a],t,o,i);for(let h=d;h<=f;++h){const y=c[h];y.skip||r(y,u,h)}}}function lO(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 Uc(e,t,n,r,i){const s=[];return!i&&!e.isPointInArea(t)||Ju(e,n,t,function(a,l,u){!i&&!Cr(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function uO(e,t,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=M9(o,{x:t.x,y:t.y});H2(d,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return Ju(e,n,t,s),i}function cO(e,t,n,r,i,s){let o=[];const a=lO(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,i);if(r&&!h)return;const y=c.getCenterPoint(i);if(!(!!s||e.isPointInArea(y))&&!h)return;const p=a(t,y);p<l?(o=[{element:c,datasetIndex:d,index:f}],l=p):p===l&&o.push({element:c,datasetIndex:d,index:f})}return Ju(e,n,t,u),o}function Gc(e,t,n,r,i,s){return!s&&!e.isPointInArea(t)?[]:n==="r"&&!r?uO(e,t,n,i):cO(e,t,n,r,i,s)}function ey(e,t,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Ju(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:s}var dO={modes:{index(e,t,n,r){const i=wi(t,e),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Uc(e,i,s,r,o):Gc(e,i,s,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=wi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Uc(e,i,s,r,o):Gc(e,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const i=wi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Uc(e,i,s,r,o)},nearest(e,t,n,r){const i=wi(t,e),s=n.axis||"xy",o=n.includeInvisible||!1;return Gc(e,i,s,n.intersect,r,o)},x(e,t,n,r){const i=wi(t,e);return ey(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=wi(t,e);return ey(e,i,"y",n.intersect,r)}}};const ub=["left","top","right","bottom"];function ko(e,t){return e.filter(n=>n.pos===t)}function ty(e,t){return e.filter(n=>ub.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 fO(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 hO(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!ub.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 gO(e,t){const n=hO(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,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&t.availableHeight)}return n}function yO(e){const t=fO(e),n=Oo(t.filter(u=>u.box.fullSize),!0),r=Oo(ko(t,"left"),!0),i=Oo(ko(t,"right")),s=Oo(ko(t,"top"),!0),o=Oo(ko(t,"bottom")),a=ty(t,"x"),l=ty(t,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:ko(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function ny(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function cb(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 mO(e,t,n,r){const{pos:i,box:s}=n,o=e.maxPadding;if(!Ue(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&&cb(o,s.getPadding());const a=Math.max(0,t.outerWidth-ny(o,e,"left","right")),l=Math.max(0,t.outerHeight-ny(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function pO(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 vO(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 Fo(e,t,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=e.length,u=0;s<o;++s){a=e[s],l=a.box,l.update(a.width||t.w,a.height||t.h,vO(a.horizontal,t));const{same:d,other:f}=mO(t,n,a,r);u|=d&&i.length,c=c||f,l.fullSize||i.push(a)}return u&&Fo(i,t,n,r)||c}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 ry(e,t,n,r){const i=n.padding;let{x:s,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;du(u.start)&&(o=u.start),l.fullSize?Cl(l,i.left,o,n.outerWidth-i.right-i.left,f):Cl(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;du(u.start)&&(s=u.start),l.fullSize?Cl(l,s,i.top,f,n.outerHeight-i.bottom-i.top):Cl(l,s,t.top+u.placed,f,d),u.start=s,u.placed+=d,s=l.right}}t.x=s,t.y=o}var Tn={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=Dt(e.options.layout.padding),s=Math.max(t-i.width,0),o=Math.max(n-i.height,0),a=yO(e.boxes),l=a.vertical,u=a.horizontal;et(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=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/c,hBoxMaxHeight:o/2}),f=Object.assign({},i);cb(f,Dt(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),y=gO(l.concat(u),d);Fo(a.fullSize,h,d,y),Fo(l,h,d,y),Fo(u,h,d,y)&&Fo(l,h,d,y),pO(h),ry(a.leftAndTop,h,d,y),h.x+=h.w,h.y+=h.h,ry(a.rightAndBottom,h,d,y),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},et(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 db{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 bO extends db{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ul="$chartjs",xO={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},iy=e=>e===null||e==="";function wO(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Ul]={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=Ug(e,"width");s!==void 0&&(e.width=s)}if(iy(r))if(e.style.height==="")e.height=e.width/(t||2);else{const s=Ug(e,"height");s!==void 0&&(e.height=s)}return e}const fb=Lk?{passive:!0}:!1;function SO(e,t,n){e&&e.addEventListener(t,n,fb)}function CO(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,fb)}function _O(e,t){const n=xO[e.type]||e.type,{x:r,y:i}=wi(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function mu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function kO(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||mu(a.addedNodes,r),o=o&&!mu(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function OO(e,t,n){const r=e.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||mu(a.removedNodes,r),o=o&&!mu(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xa=new Map;let sy=0;function hb(){const e=window.devicePixelRatio;e!==sy&&(sy=e,xa.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function EO(e,t){xa.size||window.addEventListener("resize",hb),xa.set(e,t)}function AO(e){xa.delete(e),xa.size||window.removeEventListener("resize",hb)}function TO(e,t,n){const r=e.canvas,i=r&&ih(r);if(!i)return;const s=K2((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),EO(e,s),o}function Kc(e,t,n){n&&n.disconnect(),t==="resize"&&AO(e)}function PO(e,t,n){const r=e.canvas,i=K2(s=>{e.ctx!==null&&n(_O(s,e))},e);return SO(r,t,i),i}class jO extends db{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(wO(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Ul])return!1;const r=n[Ul].initial;["height","width"].forEach(s=>{const o=r[s];tt(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[Ul],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:kO,detach:OO,resize:TO}[n]||PO;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Kc,detach:Kc,resize:Kc}[n]||CO)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return $k(t,n,r,i)}isAttached(t){const n=t&&ih(t);return!!(n&&n.isConnected)}}function MO(e){return!rh()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?bO:jO}var Ll;let ts=(Ll=class{constructor(){be(this,"x");be(this,"y");be(this,"active",!1);be(this,"options");be(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return ba(this.x)&&ba(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}},be(Ll,"defaults",{}),be(Ll,"defaultRoutes"),Ll);function $O(e,t){const n=e.options.ticks,r=LO(e),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?IO(t):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return RO(t,u,s,o/i),u;const c=DO(s,t,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(_l(t,u,c,tt(h)?0:a-h,a),d=0,f=o-1;d<f;d++)_l(t,u,c,s[d],s[d+1]);return _l(t,u,c,l,tt(h)?t.length:l+h),u}return _l(t,u,c),u}function LO(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 DO(e,t,n){const r=NO(e),i=t.length/n;if(!r)return Math.max(i,1);const s=A9(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 IO(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function RO(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 _l(e,t,n,r,i){const s=Be(r,0),o=Math.min(Be(i,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(s+a*n))}function NO(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 FO=e=>e==="left"?"right":e==="right"?"left":e,oy=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,ay=(e,t)=>Math.min(t||e,e);function ly(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 BO(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),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<s-a||l>o+a)))return l}function qO(e,t){et(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 Eo(e){return e.drawTicks?e.tickLength:0}function uy(e,t){if(!e.display)return 0;const n=bt(e.font,t),r=Dt(e.padding);return(ft(e.text)?e.text.length:1)*n.lineHeight+r.height}function zO(e,t){return gi(e,{scale:t,type:"scale"})}function HO(e,t,n){return gi(e,{tick:n,index:t,type:"tick"})}function UO(e,t,n){let r=Xf(e);return(n&&t!=="right"||!n&&t==="right")&&(r=FO(r)),r}function GO(e,t,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,y;const m=o-i,p=a-s;if(e.isHorizontal()){if(h=Pt(r,s,a),Ue(n)){const v=Object.keys(n)[0],b=n[v];y=c[v].getPixelForValue(b)+m-t}else n==="center"?y=(u.bottom+u.top)/2+m-t:y=oy(e,n,t);f=a-s}else{if(Ue(n)){const v=Object.keys(n)[0],b=n[v];h=c[v].getPixelForValue(b)-p+t}else n==="center"?h=(u.left+u.right)/2-p+t:h=oy(e,n,t);y=Pt(r,o,i),d=n==="left"?-mn:mn}return{titleX:h,titleY:y,maxWidth:f,rotation:d}}class uo extends ts{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=Qn(t,Number.POSITIVE_INFINITY),n=Qn(n,Number.NEGATIVE_INFINITY),r=Qn(r,Number.POSITIVE_INFINITY),i=Qn(i,Number.NEGATIVE_INFINITY),{min:Qn(t,r),max:Qn(n,i),minDefined:St(t),maxDefined:St(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,u=a.length;l<u;++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:Qn(n,Qn(r,n)),max:Qn(r,Qn(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(){at(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=ck(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?ly(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=$O(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(){at(this.options.afterUpdate,[this])}beforeSetDimensions(){at(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(){at(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),at(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){at(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=at(n.callback,[s.value,r,t],this)}afterTickToLabelConversion(){at(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){at(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=ay(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=An(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-Eo(t.grid)-n.padding-uy(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=Qf(Math.min(Math.asin(An((c.highest.height+6)/a,-1,1)),Math.asin(An(l/u,-1,1))-Math.asin(An(f/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){at(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){at(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=uy(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Eo(s)+l):(t.height=this.maxHeight,t.width=Eo(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,y=Jr(this.labelRotation),m=Math.cos(y),p=Math.sin(y);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(u,c,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,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(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-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;s==="start"?(c=0,d=t.height):s==="end"&&(c=n.height,d=0),this.paddingTop=c+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(){at(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++)tt(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=ly(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/ay(n,r));let u=0,c=0,d,f,h,y,m,p,v,b,S,C,x;for(d=0;d<n;d+=l){if(y=t[d].label,m=this._resolveTickFontOptions(d),i.font=p=m.string,v=s[p]=s[p]||{data:{},gc:[]},b=m.lineHeight,S=C=0,!tt(y)&&!ft(y))S=hu(i,v.data,v.gc,S,y),C=b;else if(ft(y))for(f=0,h=y.length;f<h;++f)x=y[f],!tt(x)&&!ft(x)&&(S=hu(i,v.data,v.gc,S,x),C+=b);o.push(S),a.push(C),u=Math.max(S,u),c=Math.max(C,c)}qO(s,n);const k=o.indexOf(u),w=a.indexOf(c),_=O=>({width:o[O]||0,height:a[O]||0});return{first:_(0),last:_(n-1),widest:_(k),highest:_(w),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 L9(this._alignToPixels?vi(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=HO(this.getContext(),t,r))}return this.$context||(this.$context=zO(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,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Eo(s),h=[],y=a.setContext(this.getContext()),m=y.display?y.width:0,p=m/2,v=function(M){return vi(r,M,m)};let b,S,C,x,k,w,_,O,A,T,j,B;if(o==="top")b=v(this.bottom),w=this.bottom-f,O=b-p,T=v(t.top)+p,B=t.bottom;else if(o==="bottom")b=v(this.top),T=t.top,B=v(t.bottom)-p,w=b+p,O=this.top+f;else if(o==="left")b=v(this.right),k=this.right-f,_=b-p,A=v(t.left)+p,j=t.right;else if(o==="right")b=v(this.left),A=t.left,j=v(t.right)-p,k=b+p,_=this.left+f;else if(n==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(Ue(o)){const M=Object.keys(o)[0],I=o[M];b=v(this.chart.scales[M].getPixelForValue(I))}T=t.top,B=t.bottom,w=b+p,O=w+f}else if(n==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(Ue(o)){const M=Object.keys(o)[0],I=o[M];b=v(this.chart.scales[M].getPixelForValue(I))}k=b-p,_=k-f,A=t.left,j=t.right}const R=Be(i.ticks.maxTicksLimit,d),P=Math.max(1,Math.ceil(d/R));for(S=0;S<d;S+=P){const M=this.getContext(S),I=s.setContext(M),G=a.setContext(M),Y=I.lineWidth,q=I.color,U=G.dash||[],z=G.dashOffset,V=I.tickWidth,N=I.tickColor,ne=I.tickBorderDash||[],J=I.tickBorderDashOffset;C=BO(this,S,l),C!==void 0&&(x=vi(r,C,Y),u?k=_=A=j=x:w=O=T=B=x,h.push({tx1:k,ty1:w,tx2:_,ty2:O,x1:A,y1:T,x2:j,y2:B,width:Y,color:q,borderDash:U,borderDashOffset:z,tickWidth:V,tickColor:N,tickBorderDash:ne,tickBorderDashOffset:J}))}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:u,padding:c,mirror:d}=s,f=Eo(r.grid),h=f+c,y=d?-c:h,m=-Jr(this.labelRotation),p=[];let v,b,S,C,x,k,w,_,O,A,T,j,B="middle";if(i==="top")k=this.bottom-y,w=this._getXAxisLabelAlignment();else if(i==="bottom")k=this.top+y,w=this._getXAxisLabelAlignment();else if(i==="left"){const P=this._getYAxisLabelAlignment(f);w=P.textAlign,x=P.x}else if(i==="right"){const P=this._getYAxisLabelAlignment(f);w=P.textAlign,x=P.x}else if(n==="x"){if(i==="center")k=(t.top+t.bottom)/2+h;else if(Ue(i)){const P=Object.keys(i)[0],M=i[P];k=this.chart.scales[P].getPixelForValue(M)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(t.left+t.right)/2-h;else if(Ue(i)){const P=Object.keys(i)[0],M=i[P];x=this.chart.scales[P].getPixelForValue(M)}w=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?B="top":l==="end"&&(B="bottom"));const R=this._getLabelSizes();for(v=0,b=a.length;v<b;++v){S=a[v],C=S.label;const P=s.setContext(this.getContext(v));_=this.getPixelForTick(v)+s.labelOffset,O=this._resolveTickFontOptions(v),A=O.lineHeight,T=ft(C)?C.length:1;const M=T/2,I=P.color,G=P.textStrokeColor,Y=P.textStrokeWidth;let q=w;o?(x=_,w==="inner"&&(v===b-1?q=this.options.reverse?"left":"right":v===0?q=this.options.reverse?"right":"left":q="center"),i==="top"?u==="near"||m!==0?j=-T*A+A/2:u==="center"?j=-R.highest.height/2-M*A+A:j=-R.highest.height+A/2:u==="near"||m!==0?j=A/2:u==="center"?j=R.highest.height/2-M*A:j=R.highest.height-T*A,d&&(j*=-1),m!==0&&!P.showLabelBackdrop&&(x+=A/2*Math.sin(m))):(k=_,j=(1-T)*A/2);let U;if(P.showLabelBackdrop){const z=Dt(P.backdropPadding),V=R.heights[v],N=R.widths[v];let ne=j-z.top,J=0-z.left;switch(B){case"middle":ne-=V/2;break;case"bottom":ne-=V;break}switch(w){case"center":J-=N/2;break;case"right":J-=N;break;case"inner":v===b-1?J-=N:v>0&&(J-=N/2);break}U={left:J,top:ne,width:N+z.width,height:V+z.height,color:P.backdropColor}}p.push({label:C,font:O,textOffset:j,options:{rotation:m,color:I,strokeColor:G,strokeWidth:Y,textAlign:q,textBaseline:B,translation:[x,k],backdrop:U}})}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 u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_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,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.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 u,c,d,f;this.isHorizontal()?(u=vi(t,this.left,o)-o/2,c=vi(t,this.right,a)+a/2,d=f=l):(d=vi(t,this.top,o)-o/2,f=vi(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Yu(r,i);const s=this.getLabelItems(t);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Vi(r,u,0,c,l,a)}i&&Xu(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=bt(r.font),o=Dt(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||Ue(n)?(l+=o.bottom,ft(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=GO(this,l,n,a);Vi(t,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:UO(a,n,i),textBaseline:"middle",translation:[u,c]})}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=Be(t.grid&&t.grid.z,-1),i=Be(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==uo.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 bt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class kl{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;WO(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,KO(t,o,r),this.override&&yt.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 yt[i]&&(delete yt[i][r],this.override&&delete Ki[r])}}function KO(e,t,n){const r=pa(Object.create(null),[n?yt.get(n):{},yt.get(t),e.defaults]);yt.set(t,r),e.defaultRoutes&&VO(t,e.defaultRoutes),e.descriptors&&yt.describe(t,e.descriptors)}function VO(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(".");yt.route(s,i,l,a)})}function WO(e){return"id"in e&&"defaults"in e}class QO{constructor(){this.controllers=new kl(vs,"datasets",!0),this.elements=new kl(ts,"elements"),this.plugins=new kl(Object,"plugins"),this.scales=new kl(uo,"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):et(i,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const i=Wf(t);at(r["before"+i],[],r),n[t](r),at(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 Zn=new QO;class YO{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(at(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){tt(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=Be(r.options&&r.options.plugins,{}),s=XO(r);return i===!1&&!n?[]:JO(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 XO(e){const t={},n=[],r=Object.keys(Zn.plugins.items);for(let s=0;s<r.length;s++)n.push(Zn.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 ZO(e,t){return!t&&e===!1?null:e===!0?{}:e}function JO(e,{plugins:t,localIds:n},r,i){const s=[],o=e.getContext();for(const a of t){const l=a.id,u=ZO(r[l],i);u!==null&&s.push({plugin:a,options:eE(e.config,{plugin:a,local:n[l]},u,o)})}return s}function eE(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 Qd(e,t){const n=yt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function tE(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function nE(e,t){return e===t?"_index_":"_value_"}function cy(e){if(e==="x"||e==="y"||e==="r")return e}function rE(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Yd(e,...t){if(cy(e))return e;for(const n of t){const r=n.axis||rE(n.position)||e.length>1&&cy(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function dy(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function iE(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 dy(e,"x",n[0])||dy(e,"y",n[0])}return{}}function sE(e,t){const n=Ki[e.type]||{scales:{}},r=t.scales||{},i=Qd(e.type,t),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Ue(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=Yd(o,a,iE(o,e),yt.scales[a.type]),u=nE(l,i),c=n.scales||{};s[o]=Qo(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Qd(a,t),c=(Ki[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=tE(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),Qo(s[h],[{axis:f},r[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];Qo(a,[yt.scales[a.type],yt.scale])}),s}function gb(e){const t=e.options||(e.options={});t.plugins=Be(t.plugins,{}),t.scales=sE(e,t)}function yb(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function oE(e){return e=e||{},e.data=yb(e.data),gb(e),e}const fy=new Map,mb=new Set;function Ol(e,t){let n=fy.get(e);return n||(n=t(),fy.set(e,n),mb.add(n)),n}const Ao=(e,t,n)=>{const r=va(t,n);r!==void 0&&e.add(r)};class aE{constructor(t){this._config=oE(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=yb(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(),gb(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ol(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ol(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ol(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ol(`${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(c=>{t&&(l.add(t),c.forEach(d=>Ao(l,t,d))),c.forEach(d=>Ao(l,i,d)),c.forEach(d=>Ao(l,Ki[s]||{},d)),c.forEach(d=>Ao(l,yt,d)),c.forEach(d=>Ao(l,Vd,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),mb.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ki[n]||{},yt.datasets[n]||{},{type:n},yt,Vd]}resolveNamedOptions(t,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=hy(this._resolverCache,t,i);let l=o;if(uE(o,n)){s.$shared=!1,r=ai(r)?r():r;const u=this.createResolver(t,r,a);l=Zs(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(t,n,r=[""],i){const{resolver:s}=hy(this._resolverCache,t,r);return Ue(n)?Zs(s,n,void 0,i):s}}function hy(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:eh(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const lE=e=>Ue(e)&&Object.getOwnPropertyNames(e).some(t=>ai(e[t]));function uE(e,t){const{isScriptable:n,isIndexable:r}=Y2(e);for(const i of t){const s=n(i),o=r(i),a=(o||s)&&e[i];if(s&&(ai(a)||lE(a))||o&&ft(a))return!0}return!1}var cE="4.5.0";const dE=["top","bottom","left","right","chartArea"];function gy(e,t){return e==="top"||e==="bottom"||dE.indexOf(e)===-1&&t==="x"}function yy(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function my(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),at(n&&n.onComplete,[e],t)}function fE(e){const t=e.chart,n=t.options.animation;at(n&&n.onProgress,[e],t)}function pb(e){return rh()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Gl={},py=e=>{const t=pb(e);return Object.values(Gl).filter(n=>n.canvas===t).pop()};function hE(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 gE(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var Fr;let ec=(Fr=class{static register(...t){Zn.add(...t),vy()}static unregister(...t){Zn.remove(...t),vy()}constructor(t,n){const r=this.config=new aE(n),i=pb(t),s=py(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||MO(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=b9(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,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 YO,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=F9(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Gl[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}yr.listen(this,"complete",my),yr.listen(this,"progress",fE),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return tt(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 Zn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Bg(this.canvas,this.ctx),this}stop(){return yr.stop(this),this}resize(t,n){yr.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,Hg(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),at(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};et(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=Yd(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),et(s,o=>{const a=o.options,l=a.id,u=Yd(l,a),c=Be(a.type,o.dtype);(a.position===void 0||gy(a.position,u)!==gy(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Zn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),et(i,(o,a)=>{o||delete r[a]}),et(r,o=>{Tn.configure(this,o,o.options),Tn.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(yy("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||Qd(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=Zn.getController(a),{datasetElementType:u,dataElementType:c}=yt.datasets[a];Object.assign(l,{dataElementType:Zn.getElement(c),datasetElementType:u&&Zn.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){et(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 u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),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||et(s,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yy("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){et(this.scales,t=>{Tn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!jg(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;hE(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(!jg(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;Tn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],et(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,ai(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&&(yr.has(this)?this.attached&&!yr.running(this)&&yr.start(this):(this.draw(),my({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=ob(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Yu(n,i),t.controller.draw(),i&&Xu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Cr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const s=dO.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=gi(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);du(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(),yr.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(),Bg(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Gl[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)};et(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};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(){et(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},et(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 u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[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}});!uu(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,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.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=k9(t),u=gE(t,this._lastEvent,r,l);r&&(this._lastEvent=null,at(s.onHover,[t,a,this],this),l&&at(s.onClick,[t,a,this],this));const c=!uu(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_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)}},be(Fr,"defaults",yt),be(Fr,"instances",Gl),be(Fr,"overrides",Ki),be(Fr,"registry",Zn),be(Fr,"version",cE),be(Fr,"getChart",py),Fr);function vy(){return et(ec.instances,e=>e._plugins.invalidate())}function vb(e,t,n=t){e.lineCap=Be(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Be(n.borderDash,t.borderDash)),e.lineDashOffset=Be(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Be(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Be(n.borderWidth,t.borderWidth),e.strokeStyle=Be(n.borderColor,t.borderColor)}function yE(e,t,n){e.lineTo(n.x,n.y)}function mE(e){return e.stepped?ek:e.tension||e.cubicInterpolationMode==="monotone"?tk:yE}function bb(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),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function pE(e,t,n,r){const{points:i,options:s}=t,{count:o,start:a,loop:l,ilen:u}=bb(i,n,r),c=mE(s);let{move:d=!0,reverse:f}=r||{},h,y,m;for(h=0;h<=u;++h)y=i[(a+(f?u-h:h))%o],!y.skip&&(d?(e.moveTo(y.x,y.y),d=!1):c(e,m,y,f,s.stepped),m=y);return l&&(y=i[(a+(f?u:0))%o],c(e,m,y,f,s.stepped)),!!l}function vE(e,t,n,r){const i=t.points,{count:s,start:o,ilen:a}=bb(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,d=0,f,h,y,m,p,v;const b=C=>(o+(u?a-C:C))%s,S=()=>{m!==p&&(e.lineTo(c,p),e.lineTo(c,m),e.lineTo(c,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 C=h.x,x=h.y,k=C|0;k===y?(x<m?m=x:x>p&&(p=x),c=(d*c+C)/++d):(S(),e.lineTo(C,x),y=k,d=0,m=p=x),v=x}S()}function Xd(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?vE:pE}function bE(e){return e.stepped?Dk:e.tension||e.cubicInterpolationMode==="monotone"?Ik:Si}function xE(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),vb(e,t.options),e.stroke(i)}function wE(e,t,n,r){const{segments:i,options:s}=t,o=Xd(t);for(const a of i)vb(e,s,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const SE=typeof Path2D=="function";function CE(e,t,n,r){SE&&!t.options.segment?xE(e,t,n,r):wE(e,t,n,r)}class ei extends ts{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;Ek(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=zk(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=sb(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=bE(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:d,end:f}=o[u],h=s[d],y=s[f];if(h===y){a.push(h);continue}const m=Math.abs((i-h[n])/(y[n]-h[n])),p=l(h,y,m,r.stepped);p[n]=t[n],a.push(p)}return a.length===1?a[0]:a}pathSegment(t,n,r){return Xd(this)(t,this,n,r)}path(t,n,r){const i=this.segments,s=Xd(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(),CE(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}be(ei,"id","line"),be(ei,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),be(ei,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),be(ei,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function by(e,t,n,r){const i=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(t-s)<i.radius+i.hitRadius}class Kl extends ts{constructor(n){super();be(this,"parsed");be(this,"skip");be(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 by(this,n,"x",r)}inYRange(n,r){return by(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||!Cr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Wd(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}be(Kl,"id","point"),be(Kl,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),be(Kl,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function _E(e,t,n){const r=e.segments,i=e.points,s=t.points,o=[];for(const a of r){let{start:l,end:u}=a;u=tc(l,u,i);const c=Zd(n,i[l],i[u],a.loop);if(!t.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const d=sb(t,c);for(const f of d){const h=Zd(n,s[f.start],s[f.end],f.loop),y=ib(a,i,h);for(const m of y)o.push({source:m,target:f,start:{[n]:xy(c,h,"start",Math.max)},end:{[n]:xy(c,h,"end",Math.min)}})}}return o}function Zd(e,t,n,r){if(r)return;let i=t[e],s=n[e];return e==="angle"&&(i=hn(i),s=hn(s)),{property:e,start:i,end:s}}function kE(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=tc(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function tc(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function xy(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function xb(e,t){let n=[],r=!1;return ft(e)?(r=!0,n=e):n=kE(e,t),n.length?new ei({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function wy(e){return e&&e.fill!==!1}function OE(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(!St(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function EE(e,t,n){const r=jE(e);if(Ue(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return St(i)&&Math.floor(i)===i?AE(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function AE(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function TE(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Ue(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function PE(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:Ue(e)?r=e.value:r=t.getBaseValue(),r}function jE(e){const t=e.options,n=t.fill;let r=Be(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function ME(e){const{scale:t,index:n,line:r}=e,i=[],s=r.segments,o=r.points,a=$E(t,n);a.push(xb({x:null,y:t.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)LE(i,o[c],a)}return new ei({points:i,options:{}})}function $E(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 LE(e,t,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=DE(s,t,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(e.push(l),!a)break}}e.push(...r)}function DE(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 u=0;u<s.length;u++){const c=s[u],d=o[c.start][n],f=o[c.end][n];if(ys(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class wb{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:pn},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 IE(e){const{chart:t,fill:n,line:r}=e;if(St(n))return RE(t,n);if(n==="stack")return ME(e);if(n==="shape")return!0;const i=NE(e);return i instanceof wb?i:xb(i,r)}function RE(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function NE(e){return(e.scale||{}).getPointPositionForValue?BE(e):FE(e)}function FE(e){const{scale:t={},fill:n}=e,r=TE(n,t);if(St(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function BE(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,s=r.reverse?t.max:t.min,o=PE(n,t,s),a=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,s);return new wb({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 Vc(e,t,n){const r=IE(t),{chart:i,index:s,line:o,scale:a,axis:l}=t,u=o.options,c=u.fill,d=u.backgroundColor,{above:f=d,below:h=d}=c||{},y=i.getDatasetMeta(s),m=ob(i,y);r&&o.points.length&&(Yu(e,n),qE(e,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:m}),Xu(e))}function qE(e,t){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=t,u=n._loop?"angle":t.axis;e.save();let c=s;s!==i&&(u==="x"?(Sy(e,r,o.top),Wc(e,{line:n,target:r,color:i,scale:a,property:u,clip:l}),e.restore(),e.save(),Sy(e,r,o.bottom)):u==="y"&&(Cy(e,r,o.left),Wc(e,{line:n,target:r,color:s,scale:a,property:u,clip:l}),e.restore(),e.save(),Cy(e,r,o.right),c=i)),Wc(e,{line:n,target:r,color:c,scale:a,property:u,clip:l}),e.restore()}function Sy(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:u}=a,c=i[l],d=i[tc(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.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 Cy(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:u}=a,c=i[l],d=i[tc(l,u,i)];s?(e.moveTo(c.x,c.y),s=!1):(e.lineTo(n,c.y),e.lineTo(c.x,c.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 Wc(e,t){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=t,l=_E(n,r,i);for(const{source:u,target:c,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=u,y=r!==!0;e.save(),e.fillStyle=h,zE(e,o,a,y&&Zd(i,d,f)),e.beginPath();const m=!!n.pathSegment(e,u);let p;if(y){m?e.closePath():_y(e,r,f,i);const v=!!r.pathSegment(e,c,{move:m,reverse:!0});p=m&&v,p||_y(e,r,d,i)}e.closePath(),e.fill(p?"evenodd":"nonzero"),e.restore()}}function zE(e,t,n,r){const i=t.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,u,c,d;s==="x"?(l=o,u=i.top,c=a,d=i.bottom):(l=i.left,u=o,c=i.right,d=a),e.beginPath(),n&&(l=Math.max(l,n.left),c=Math.min(c,n.right),u=Math.max(u,n.top),d=Math.min(d,n.bottom)),e.rect(l,u,c-l,d-u),e.clip()}}function _y(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var HE={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 ei&&(l={visible:e.isDatasetVisible(o),index:o,fill:EE(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=OE(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&&Vc(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;wy(s)&&Vc(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!wy(r)||n.drawTime!=="beforeDatasetDraw"||Vc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ky=(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)}},UE=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Oy extends ts{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=at(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=bt(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=ky(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let d=t;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((y,m)=>{const p=r+n/2+s.measureText(y.text).width;(m===0||u[u.length-1]+p+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,h+=c,f++),l[m]={left:0,top:h,row:f,width:p,height:i},u[u.length-1]+=p+a}),d}_fitCols(t,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,y=0,m=0;return this.legendItems.forEach((p,v)=>{const{itemWidth:b,itemHeight:S}=GE(r,n,s,p,i);v>0&&h+S+2*a>c&&(d+=f+a,u.push({width:f,height:h}),y+=f+a,m++,f=h=0),l[v]={left:y,top:h,col:m,width:b,height:S},f=Math.max(f,b),h+=S+a}),d+=f,u.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=ps(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=Pt(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Pt(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+t+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=Pt(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Pt(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Yu(t,this),this._draw(),Xu(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=t,a=yt.color,l=ps(t.rtl,this.left,this.width),u=bt(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:y,boxHeight:m,itemHeight:p}=ky(o,d),v=function(k,w,_){if(isNaN(y)||y<=0||isNaN(m)||m<0)return;i.save();const O=Be(_.lineWidth,1);if(i.fillStyle=Be(_.fillStyle,a),i.lineCap=Be(_.lineCap,"butt"),i.lineDashOffset=Be(_.lineDashOffset,0),i.lineJoin=Be(_.lineJoin,"miter"),i.lineWidth=O,i.strokeStyle=Be(_.strokeStyle,a),i.setLineDash(Be(_.lineDash,[])),o.usePointStyle){const A={radius:m*Math.SQRT2/2,pointStyle:_.pointStyle,rotation:_.rotation,borderWidth:O},T=l.xPlus(k,y/2),j=w+f;W2(i,A,T,j,o.pointStyleWidth&&y)}else{const A=w+Math.max((d-m)/2,0),T=l.leftForLtr(k,y),j=ms(_.borderRadius);i.beginPath(),Object.values(j).some(B=>B!==0)?gu(i,{x:T,y:A,w:y,h:m,radius:j}):i.rect(T,A,y,m),i.fill(),O!==0&&i.stroke()}i.restore()},b=function(k,w,_){Vi(i,_.text,k,w+p/2,u,{strikethrough:_.hidden,textAlign:l.textAlign(_.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?h={x:Pt(s,this.left+c,this.right-r[0]),y:this.top+c+C,line:0}:h={x:this.left+c,y:Pt(s,this.top+C+c,this.bottom-n[0].height),line:0},tb(this.ctx,t.textDirection);const x=p+c;this.legendItems.forEach((k,w)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const _=i.measureText(k.text).width,O=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),A=y+f+_;let T=h.x,j=h.y;l.setWidth(this.width),S?w>0&&T+A+c>this.right&&(j=h.y+=x,h.line++,T=h.x=Pt(s,this.left+c,this.right-r[h.line])):w>0&&j+x>this.bottom&&(T=h.x=T+n[h.line].width+c,h.line++,j=h.y=Pt(s,this.top+C+c,this.bottom-n[h.line].height));const B=l.x(T);if(v(B,j,k),T=B9(O,T+y+f,S?T+A:this.right,t.rtl),b(l.x(T),j,k),S)h.x+=A+c;else if(typeof k.text!="string"){const R=u.lineHeight;h.y+=Sb(k,R)+c}else h.y+=x}),nb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=bt(n.font),i=Dt(n.padding);if(!n.display)return;const s=ps(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Pt(t.align,d,this.right-f);else{const y=this.columnSizes.reduce((m,p)=>Math.max(m,p.height),0);c=u+Pt(t.align,this.top,this.bottom-y-t.labels.padding-this._computeTitleHeight())}const h=Pt(a,d,d+f);o.textAlign=s.textAlign(Xf(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Vi(o,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=bt(t.font),r=Dt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,s;if(ys(t,this.left,this.right)&&ys(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],ys(t,i.left,i.left+i.width)&&ys(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!WE(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,s=UE(i,r);i&&!s&&at(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!s&&at(n.onHover,[t,r,this],this)}else r&&at(n.onClick,[t,r,this],this)}}function GE(e,t,n,r,i){const s=KE(r,e,t,n),o=VE(i,r,t.lineHeight);return{itemWidth:s,itemHeight:o}}function KE(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 VE(e,t,n){let r=e;return typeof t.text!="string"&&(r=Sb(t,n)),r}function Sb(e,t){const n=e.text?e.text.length:0;return t*n}function WE(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var QE={id:"legend",_element:Oy,start(e,t,n){const r=e.legend=new Oy({ctx:e.ctx,options:n,chart:e});Tn.configure(e,r,n),Tn.addBox(e,r)},stop(e){Tn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Tn.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 u=l.controller.getStyle(n?0:void 0),c=Dt(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.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 Cb extends ts{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=ft(r.text)?r.text.length:1;this._padding=Dt(r.padding);const s=i*bt(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,u,c,d;return this.isHorizontal()?(c=Pt(a,r,s),d=n+t,u=s-r):(o.position==="left"?(c=r+t,d=Pt(a,i,n),l=pt*-.5):(c=s-t,d=Pt(a,n,i),l=pt*.5),u=i-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=bt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);Vi(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Xf(n.align),textBaseline:"middle",translation:[o,a]})}}function YE(e,t){const n=new Cb({ctx:e.ctx,options:t,chart:e});Tn.configure(e,n,t),Tn.addBox(e,n),e.titleBlock=n}var XE={id:"title",_element:Cb,start(e,t,n){YE(e,n)},stop(e){const t=e.titleBlock;Tn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Tn.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 Bo={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 u=l.getCenterPoint(),c=Kd(t,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Xn(e,t){return t&&(ft(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function mr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
68
68
|
`)>-1?e.split(`
|
|
69
|
-
`):e}function WE(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 ky(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=xt(t.bodyFont),u=xt(t.titleFont),c=xt(t.footerFont),d=s.length,f=i.length,h=r.length,y=It(t.padding);let m=y.height,p=0,v=r.reduce((C,x)=>C+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*C+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const S=function(C){p=Math.max(p,n.measureText(C).width+b)};return n.save(),n.font=u.string,et(e.title,S),n.font=l.string,et(e.beforeBody.concat(e.afterBody),S),b=t.displayColors?o+2+t.boxPadding:0,et(r,C=>{et(C.before,S),et(C.lines,S),et(C.after,S)}),b=0,n.font=c.string,et(e.footer,S),n.restore(),p+=y.width,{width:p,height:m}}function QE(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function YE(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 XE(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),YE(u,e,t,n)&&(u="center"),u}function Oy(e,t,n){const r=n.yAlign||t.yAlign||QE(e,n);return{xAlign:n.xAlign||t.xAlign||XE(e,t,n,r),yAlign:r}}function ZE(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function JE(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Ey(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=ys(o);let y=ZE(t,a);const m=JE(t,l,u);return l==="center"?a==="left"?y+=u:a==="right"&&(y-=u):a==="left"?y-=Math.max(c,f)+i:a==="right"&&(y+=Math.max(d,h)+i),{x:En(y,0,r.width-t.width),y:En(m,0,r.height-t.height)}}function kl(e,t,n){const r=It(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Ay(e){return Xn([],mr(e))}function eA(e,t,n){return hi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Ty(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Sb={beforeTitle:dr,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:dr,beforeBody:dr,beforeLabel:dr,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 tt(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:dr,afterBody:dr,beforeFooter:dr,footer:dr,afterFooter:dr};function Ut(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?Sb[t].call(n,r):i}class Xd extends es{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 sb(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=eA(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Ut(r,"beforeTitle",this,t),s=Ut(r,"title",this,t),o=Ut(r,"afterTitle",this,t);let a=[];return a=Xn(a,mr(i)),a=Xn(a,mr(s)),a=Xn(a,mr(o)),a}getBeforeBody(t,n){return Ay(Ut(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return et(t,s=>{const o={before:[],lines:[],after:[]},a=Ty(r,s);Xn(o.before,mr(Ut(a,"beforeLabel",this,s))),Xn(o.lines,Ut(a,"label",this,s)),Xn(o.after,mr(Ut(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return Ay(Ut(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Ut(r,"beforeFooter",this,t),s=Ut(r,"footer",this,t),o=Ut(r,"afterFooter",this,t);let a=[];return a=Xn(a,mr(i)),a=Xn(a,mr(s)),a=Xn(a,mr(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(WE(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),et(a,c=>{const d=Ty(t.callbacks,c);i.push(Ut(d,"labelColor",this,c)),s.push(Ut(d,"labelPointStyle",this,c)),o.push(Ut(d,"labelTextColor",this,c))}),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=Bo[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=ky(this,r),u=Object.assign({},a,l),c=Oy(this.chart,r,u),d=Ey(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.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:u,bottomLeft:c,bottomRight:d}=ys(a),{x:f,y:h}=t,{width:y,height:m}=n;let p,v,b,S,C,x;return s==="center"?(C=h+m/2,i==="left"?(p=f,v=p-o,S=C+o,x=C-o):(p=f+y,v=p+o,S=C-o,x=C+o),b=p):(i==="left"?v=f+Math.max(l,c)+o:i==="right"?v=f+y-Math.max(u,d)-o:v=this.caretX,s==="top"?(S=h,C=S-o,p=v-o,b=v+o):(S=h+m,C=S+o,p=v+o,b=v-o),x=S),{x1:p,x2:v,x3:b,y1:S,y2:C,y3:x}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=ms(r.rtl,this.x,this.width);for(t.x=kl(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=xt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.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:u}=s,c=xt(s.bodyFont),d=kl(this,"left",s),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,y=n.y+h;if(s.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,u)+u/2,v=y+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Kd(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Kd(t,m,p,v)}else{t.lineWidth=He(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,u),p=i.leftForLtr(i.xPlus(f,1),u-2),v=ys(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,fu(t,{x:m,y,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fu(t,{x:p,y:y+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,y,u,l),t.strokeRect(m,y,u,l),t.fillStyle=o.backgroundColor,t.fillRect(p,y+1,u-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:u,boxPadding:c}=r,d=xt(r.bodyFont);let f=d.lineHeight,h=0;const y=ms(r.rtl,this.x,this.width),m=function(_){n.fillText(_,y.x(t.x+h),t.y+f/2),t.y+=f+s},p=y.textAlign(o);let v,b,S,C,x,k,w;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=kl(this,p,r),n.fillStyle=r.bodyColor,et(this.beforeBody,m),h=a&&p!=="right"?o==="center"?u/2+c:u+2+c:0,C=0,k=i.length;C<k;++C){for(v=i[C],b=this.labelTextColors[C],n.fillStyle=b,et(v.before,m),S=v.lines,a&&S.length&&(this._drawColorBox(n,t,C,y,r),f=Math.max(d.lineHeight,l)),x=0,w=S.length;x<w;++x)m(S[x]),f=d.lineHeight;et(v.after,m)}h=0,f=d.lineHeight,et(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=ms(r.rtl,this.x,this.width);for(t.x=kl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=xt(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:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:y}=ys(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+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+u,l+c-y),n.quadraticCurveTo(a+u,l+c,a+u-y,l+c),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-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=Bo[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=ky(this,t),l=Object.assign({},o,this._size),u=Oy(n,t,l),c=Ey(t,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_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=It(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),J2(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),eb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!au(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||!au(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=Bo[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}be(Xd,"positioners",Bo);var tA={id:"tooltip",_element:Xd,positioners:Bo,afterInit(e,t,n){n&&(e.tooltip=new Xd({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:Sb},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 nA=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function rA(e,t,n,r){const i=e.indexOf(t);if(i===-1)return nA(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const iA=(e,t)=>e===null?null:En(Math.round(e),0,t);function Py(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Zd extends lo{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(tt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:rA(r,t,Be(n,t),this._addedLabels),iA(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 Py.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}}be(Zd,"id","category"),be(Zd,"defaults",{ticks:{callback:Py}});function sA(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=s||1,y=c-1,{min:m,max:p}=t,v=!tt(o),b=!tt(a),S=!tt(u),C=(p-m)/(d+1);let x=jg((p-m)/y/h)*h,k,w,_,O;if(x<1e-14&&!v&&!b)return[{value:m},{value:p}];O=Math.ceil(p/x)-Math.floor(m/x),O>y&&(x=jg(O*x/y/h)*h),tt(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(w=Math.floor(m/x)*x,_=Math.ceil(p/x)*x):(w=m,_=p),v&&b&&s&&O9((a-o)/s,x/1e3)?(O=Math.round(Math.min((a-o)/x,c)),x=(a-o)/O,w=o,_=a):S?(w=v?o:w,_=b?a:_,O=u-1,x=(_-w)/O):(O=(_-w)/x,Yo(O,Math.round(O),x/1e3)?O=Math.round(O):O=Math.ceil(O));const E=Math.max(Mg(x),Mg(w));k=Math.pow(10,tt(l)?E:l),w=Math.round(w*k)/k,_=Math.round(_*k)/k;let T=0;for(v&&(f&&w!==o?(n.push({value:o}),w<o&&T++,Yo(Math.round((w+T*x)*k)/k,o,jy(o,C,e))&&T++):w<o&&T++);T<O;++T){const M=Math.round((w+T*x)*k)/k;if(b&&M>a)break;n.push({value:M})}return b&&f&&_!==a?n.length&&Yo(n[n.length-1].value,a,jy(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!b||_===a)&&n.push({value:_}),n}function jy(e,t,{horizontal:n,minRotation:r}){const i=Zr(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/s,o)}class Jd extends lo{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 tt(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=Ys(i),u=Ys(s);l<0&&u<0?a(0):l>0&&u>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=sA(i,s);return t.bounds==="ticks"&&E9(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 G2(t,this.chart.options.locale,this.options.ticks.format)}}class ef extends Jd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ct(t)?t:0,this.max=Ct(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Zr(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}}be(ef,"id","linear"),be(ef,"defaults",{ticks:{callback:Xf.formatters.numeric}});function tf(e){const t=e.ticks;if(t.display&&e.display){const n=It(t.backdropPadding);return Be(t.font&&t.font.size,mt.font.size)+n.height}return 0}function oA(e,t,n){return n=ht(n)?n:[n],{w:Q9(e,t.string,n),h:n.length*t.lineHeight}}function My(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 aA(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?vt/s:0;for(let l=0;l<s;l++){const u=o.setContext(e.getPointLabelContext(l));i[l]=u.padding;const c=e.getPointPosition(l,e.drawingArea+i[l],a),d=xt(u.font),f=oA(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=dn(e.getIndexAngle(l)+a),y=Math.round(Vf(h)),m=My(y,c.x,f.w,0,180),p=My(y,c.y,f.h,90,270);lA(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=dA(e,r,i)}function lA(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 uA(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),u=Math.round(Vf(dn(l.angle+gn))),c=gA(l.y,a.h,u),d=fA(u),f=hA(l.x,a.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+a.w,bottom:c+a.h}}function cA(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(Cr({x:n,y:r},t)||Cr({x:n,y:s},t)||Cr({x:i,y:r},t)||Cr({x:i,y:s},t))}function dA(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:tf(s)/2,additionalAngle:o?vt/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=t[c];const d=uA(e,c,l);r.push(d),a==="auto"&&(d.visible=cA(d,u),d.visible&&(u=d))}return r}function fA(e){return e===0||e===180?"center":e<180?"left":"right"}function hA(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function gA(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function yA(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!tt(a)){const l=ys(t.borderRadius),u=It(t.backdropPadding);e.fillStyle=a;const c=r-u.left,d=i-u.top,f=s-r+u.width,h=o-i+u.height;Object.values(l).some(y=>y!==0)?(e.beginPath(),fu(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function mA(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));yA(n,o,s);const a=xt(o.font),{x:l,y:u,textAlign:c}=s;Ki(n,e._pointLabels[i],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Cb(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,yn);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 pA(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(),Cb(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function vA(e,t,n){return hi(e,{label:n,index:t,type:"pointLabel"})}class qo extends Jd{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=It(tf(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=Ct(t)&&!isNaN(t)?t:0,this.max=Ct(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/tf(this.options))}generateTickLabels(t){Jd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=at(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?aA(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=yn/(this._pointLabels.length||1),r=this.options.startAngle||0;return dn(t*n+Zr(r))}getDistanceFromCenterForValue(t){if(tt(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(tt(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 vA(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-gn+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(),Cb(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,u;if(n.pointLabels.display&&mA(this,o),i.display&&this.ticks.forEach((c,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),y=s.setContext(f);pA(this,h,l,o,y)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const c=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),u=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.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 u=r.setContext(this.getContext(l)),c=xt(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(a.label).width,t.fillStyle=u.backdropColor;const d=It(u.backdropPadding);t.fillRect(-o/2-d.left,-s-c.size/2-d.top,o+d.width,c.size+d.height)}Ki(t,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}be(qo,"id","radialLinear"),be(qo,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Xf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),be(qo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),be(qo,"descriptors",{angleLines:{_fallback:"grid"}});const ec={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}},Wt=Object.keys(ec);function $y(e,t){return e-t}function Ly(e,t){if(tt(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)),Ct(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(va(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Dy(e,t,n,r){const i=Wt.length;for(let s=Wt.indexOf(e);s<i-1;++s){const o=ec[Wt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Wt[s]}return Wt[i-1]}function bA(e,t,n,r,i){for(let s=Wt.length-1;s>=Wt.indexOf(n);s--){const o=Wt[s];if(ec[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return Wt[n?Wt.indexOf(n):0]}function xA(e){for(let t=Wt.indexOf(e)+1,n=Wt.length;t<n;++t)if(ec[Wt[t]].common)return Wt[t]}function Iy(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Wf(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function wA(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 Ry(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:wA(e,r,i,n)}class yu extends lo{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 nO._date(t.adapters.date);i.init(n),Qo(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:Ly(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(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Ct(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=Ct(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=M9(i,s,o);return this._unit=n.unit||(r.autoSkip?Dy(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):bA(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:xA(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Ry(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=En(n,0,o),r=En(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||Dy(s.minUnit,n,r,this._getLabelCapacity(n)),a=Be(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=va(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"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 y=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)Iy(c,f,y);return(f===r||i.bounds==="ticks"||h===1)&&Iy(c,f,y),Object.keys(c).sort($y).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 at(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}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=Zr(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,Ry(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(Ly(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return L9(t.sort($y))}}be(yu,"id","time"),be(yu,"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 Ol(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}=Oi(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}=Oi(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const u=o-s;return u?a+(l-a)*(t-s)/u:a}class Ny extends yu{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=Ol(n,this.min),this._tableRange=Ol(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,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(Ol(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ol(this._table,r*this._tableRange+this._minPos,!0)}}be(Ny,"id","timeseries"),be(Ny,"defaults",yu.defaults);const _b="label";function Fy(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function SA(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function kb(e,t){e.labels=t}function Ob(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_b;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 CA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_b;const n={labels:[],datasets:[]};return kb(n,e.labels),Ob(n,e.datasets,t),n}function _A(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=F.useRef(null),y=F.useRef(null),m=()=>{h.current&&(y.current=new Zu(h.current,{type:o,data:CA(a,s),options:l&&{...l},plugins:u}),Fy(t,y.current))},p=()=>{Fy(t,null),y.current&&(y.current.destroy(),y.current=null)};return F.useEffect(()=>{!i&&y.current&&l&&SA(y.current,l)},[i,l]),F.useEffect(()=>{!i&&y.current&&kb(y.current.config.data,a.labels)},[i,a.labels]),F.useEffect(()=>{!i&&y.current&&a.datasets&&Ob(y.current.config.data,a.datasets,s)},[i,a.datasets]),F.useEffect(()=>{y.current&&(i?(p(),setTimeout(m)):y.current.update(d))},[i,l,a.labels,a.datasets,d]),F.useEffect(()=>{y.current&&(p(),setTimeout(m))},[o]),F.useEffect(()=>(m(),()=>p()),[]),F.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},c)}const kA=F.forwardRef(_A);function Eb(e,t){return Zu.register(t),F.forwardRef((n,r)=>F.createElement(kA,{...n,ref:r,type:e}))}const OA=Eb("line",Bl),EA=Eb("radar",ql);Zu.register(Zd,ef,qo,Jr,Ul,FE,VE,tA,GE);var nf={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}},AA=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 By(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 qy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?By(Object(n),!0).forEach(function(r){TA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):By(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TA(e,t,n){return(t=PA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PA(e){var t=jA(e,"string");return Js(t)=="symbol"?t:t+""}function jA(e,t){if(Js(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Js(e){"@babel/helpers - typeof";return Js=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},Js(e)}function MA(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var $A=function(){var t,n,r,i,s=fi(),o=s.data,a=s.isLoading,l=s.isRefetching,u=o==null?void 0:o.mentions,c=u==null||(t=u.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,d=u==null?void 0:u.chart,f=Array.isArray(d==null?void 0:d.labels)?d.labels:d!=null&&d.labels&&Js(d.labels)==="object"?Object.values(d.labels):[],h=f.map(function(v){return MA(String(v))}),y=o==null?void 0:o.numberOfQueries;if(!y){var m=0;Array.isArray(d==null?void 0:d.datasets)&&d.datasets.forEach(function(v){Array.isArray(v==null?void 0:v.data)&&v.data.forEach(function(b){typeof b=="number"&&b>m&&(m=b)})}),y=m+2}var p=qy(qy({},nf),{},{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:y,ticks:{stepSize:1}}}});return g.jsx(A.Card,{className:"yst-overflow-visible",children:g.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(Wa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),g.jsx(Va,{score:u==null||(n=u.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value,total:o==null?void 0:o.numberOfQueries,delta:c,deltaSuffix:"since last analysis",suffix:"queries",isLoading:a||l})]}),Array.isArray(d==null||(r=d.datasets)===null||r===void 0?void 0:r.data)&&(d==null||(i=d.datasets)===null||i===void 0?void 0:i.data.length)<2?g.jsx(A.Alert,{variant:"info",children:"One more analysis needed to show more insights."}):g.jsx("div",{className:"yst-h-72",children:g.jsx(OA,{data:function(){var v={labels:h,datasets:[d==null?void 0:d.datasets]};return v}(),options:p})})]})})};function El(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,u=l===void 0?!1:l,c=e.delta,d=e.tooltipPosition,f=d===void 0?"left":d;return g.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",u&&"yst-border-r yst-border-slate-200",s),children:[g.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),g.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof c=="number"&&g.jsxs("p",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",ca(c)),children:[c>0?g.jsx(w2,{}):c<0?g.jsx(x2,{}):null,c>-1e-6&&"+",c]}),i&&g.jsx(qf,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",position:f,children:i})]})}function LA(e){var t=e.children,n=e.className;return g.jsx("div",{className:ke("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function DA(e){return e>0?"yst-text-green-600":e<0?"yst-text-red-600":"yst-text-slate-500"}function IA(e){var t=e.current,n=e.previous,r=e.className;if(typeof n!="number")return null;var i=t-n,s=i>0,o=i<0,a="".concat(i>0?"+":"").concat(i.toFixed(1),"%");return g.jsxs("div",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",DA(i),r),"aria-label":s?"Visibility increased by ".concat(a):o?"Visibility decreased by ".concat(a):"No change in visibility",children:[s&&g.jsx(w2,{className:"yst-w-4 yst-h-4"}),o&&g.jsx(x2,{className:"yst-w-4 yst-h-4"}),a]})}function xa(e){"@babel/helpers - typeof";return xa=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},xa(e)}function RA(e,t){return qA(e)||BA(e,t)||FA(e,t)||NA()}function NA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
70
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FA(e,t){if(e){if(typeof e=="string")return zy(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)?zy(e,t):void 0}}function zy(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 BA(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function qA(e){if(Array.isArray(e))return e}function Hy(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 Al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(n),!0).forEach(function(r){zA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zA(e,t,n){return(t=HA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HA(e){var t=UA(e,"string");return xa(t)=="symbol"?t:t+""}function UA(e,t){if(xa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GA(){var e,t,n,r,i,s,o,a,l,u,c,d,f,h,y,m,p,v,b,S,C,x,k,w,_=Gn(),O=_.brandId,E=_.analysisId,T=Fu(O,E,{query:{select:function(Ne){var J=Ne.data;return J},enabled:!!O&&!!E}}),M=T.data,B=T.isLoading,R=M==null||(e=M.analysis)===null||e===void 0?void 0:e.scans,P=Array.isArray(R)&&R.length>0?R.reduce(function(Ge,Ne){if(!Ge)return Ne;if(!(Ne!=null&&Ne.finishedAt)||!(Ge!=null&&Ge.finishedAt))return Ge;var J=new Date(Ne.finishedAt),Me=new Date(Ge.finishedAt);return J>Me?Ne:Ge},R[0]):void 0,j=P==null||(t=P.scores)===null||t===void 0?void 0:t.standardized,I=(n=P==null||(r=P.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value)!==null&&n!==void 0?n:0,G=P==null||(i=P.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,Y=(s=P==null||(o=P.scores)===null||o===void 0||(o=o.standardized)===null||o===void 0||(o=o.citations)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,q=(a=P==null||(l=P.citations)===null||l===void 0||(l=l.total)===null||l===void 0?void 0:l.value)!==null&&a!==void 0?a:0,U=P==null||(u=P.citations)===null||u===void 0||(u=u.total)===null||u===void 0||(u=u.previous)===null||u===void 0?void 0:u.difference,z=P==null||(c=P.rankings)===null||c===void 0||(c=c.list)===null||c===void 0?void 0:c.find(function(Ge){var Ne;return((Ne=Ge.brand)===null||Ne===void 0?void 0:Ne.isSelf)===!0}),K=(d=z==null||(f=z.rank)===null||f===void 0?void 0:f.value)!==null&&d!==void 0?d:"—",N=z==null||(h=z.rank)===null||h===void 0||(h=h.previous)===null||h===void 0?void 0:h.difference;N&&(N=N*-1);var ee=(y=j==null||(m=j.visibility)===null||m===void 0?void 0:m.value)!==null&&y!==void 0?y:0,te=j==null||(p=j.visibility)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value,de=(v=j==null||(b=j.ranking)===null||b===void 0?void 0:b.value)!==null&&v!==void 0?v:0,X=(S=j==null||(C=j.sentiment)===null||C===void 0?void 0:C.value)!==null&&S!==void 0?S:0,he=(x=j==null||(k=j.mentions)===null||k===void 0?void 0:k.value)!==null&&x!==void 0?x:0,ye={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[he,de,Y,X],backgroundColor:AA,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},De=Al(Al({},nf),{},{plugins:Al(Al({},nf.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(Ne){var J=Ne.label||"",Me=Ne.parsed.r||0;return"".concat(J,": ").concat(Me,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}}),se=F.useState(typeof window!="undefined"&&window.innerWidth<800?"top":"left"),nt=RA(se,2),ze=nt[0],ft=nt[1];return F.useEffect(function(){function Ge(){ft(window.innerWidth<800?"top":"left")}return window.addEventListener("resize",Ge),function(){return window.removeEventListener("resize",Ge)}},[]),g.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:g.jsxs(A.Card.Content,{children:[g.jsx(A.Title,{size:"3",className:"yst-mb-2",children:"AI Visibility Index (AIVI)"}),g.jsx(Va,{score:ee,total:100,isLoading:B}),g.jsx(IA,{current:ee,previous:te,className:"yst-mb-4"}),g.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:[g.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:[g.jsx(EA,{data:ye,options:De}),g.jsx(qf,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",position:"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."})]}),g.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:g.jsxs(LA,{children:[g.jsx(El,{value:I,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:G,tooltipPosition:ze}),g.jsx(El,{value:typeof K=="number"&&Number.isFinite(K)&&K>0?g.jsxs(g.Fragment,{children:["#",K,K===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:N}),g.jsx(El,{value:q,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:U,tooltipPosition:ze}),g.jsx(El,{value:X?"".concat(X,"%"):"—",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||(w=P.scores)===null||w===void 0||(w=w.standardized)===null||w===void 0||(w=w.sentiment)===null||w===void 0||(w=w.previous)===null||w===void 0?void 0:w.difference})]})})]})]})})}const KA="data:image/svg+xml,%3csvg%20width='17'%20height='17'%20viewBox='0%200%2017%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.652%2015.0488C2.3816%2015.0488%201.348%2014.0152%201.348%2012.7448V5.22476C1.348%203.95436%202.3816%202.92075%203.652%202.92075H9.5912L9.9304%202.07275H3.652C1.9144%202.07275%200.5%203.48716%200.5%205.22476V12.7448C0.5%2014.4824%201.9144%2015.8968%203.652%2015.8968H3.6776V15.0488H3.652Z'%20fill='%23A61E69'/%3e%3cpath%20d='M16.5%205.22468C16.5%203.74948%2015.4824%202.51428%2014.1096%202.17188L13.812%202.97188C14.8584%203.18628%2015.6488%204.11748%2015.6488%205.22788V15.0519H9.16236C9.00236%2015.3527%208.83276%2015.6375%208.65356%2015.8999H16.4968V5.22468H16.5Z'%20fill='%23A61E69'/%3e%3cpath%20d='M11.5815%200.140137L8.03267%209.99614L6.28867%204.53374H4.15747L6.82307%2011.3785C7.06947%2012.0121%207.06947%2012.7129%206.82307%2013.3497C6.56387%2014.0121%206.10627%2014.8025%204.82947%2015.0361L4.77187%2015.0457V16.8633H4.84547C5.91107%2016.8185%206.73667%2016.4665%207.44387%2015.7561C8.16387%2015.0329%208.78147%2013.9065%209.38947%2012.2137L13.8919%200.140137H11.5815Z'%20fill='%23A61E69'/%3e%3c/svg%3e";var VA=function(){var t,n=fi(),r=n.data,i=n.isLoading,s=n.isRefetching;return i&&!s||(r==null||(t=r.mentions)===null||t===void 0||(t=t.mentionedInNumberOfQueries)===null||t===void 0?void 0:t.value)!==0?null:g.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2 yst-text-slate-800",children:g.jsxs(A.Card.Content,{className:"yst-space-y-4 yst-max-w-2xl",children:[g.jsx(A.Title,{size:"3",children:"We couldn’t find your brand in this brand analysis..."}),g.jsx("p",{children:"This means LLMs may not yet be surfacing your site in answers. Don’t worry, here are some steps you can take today to boost your AI visibility:"}),g.jsxs("ol",{className:"yst-list-decimal yst-ml-5 [&>li::marker]:yst-font-semibold ",children:[g.jsxs("li",{children:[g.jsx("strong",{children:"Activate llms.txt →"})," ",g.jsx("a",{href:"https://yoast.com/features/llms-txt/",target:"_blank",rel:"noopener noreferrer",children:"Set up llms.txt in Yoast SEO"}),"."," ","Make sure AI systems know where to look and which pages matter most."]}),g.jsxs("li",{children:[g.jsx("strong",{children:"Adopt an LLM-friendly content structure →"})," ",g.jsx("a",{href:"https://yoast.com/yoast-seo-premium-september-9-2025/",target:"_blank",rel:"noopener noreferrer",children:"See how in our latest update"}),". Start with clear definitions or TL;DRs, use subheadings, and format answers so LLMs can lift them directly."]}),g.jsxs("li",{children:[g.jsx("strong",{children:"Simplify writing and readability →"})," ","Use shorter sentences, plain language, and one idea per paragraph. This makes it easier for AI systems to recognize and quote your content."]})]}),g.jsxs("p",{children:["Want to go deeper? →"," ",g.jsx("a",{href:"https://yoast.com/how-to-optimize-content-for-llms/",target:"_blank",rel:"noopener noreferrer",children:"Read our full guide on optimizing content for LLMs"}),"."]})]})})};function WA(e,t){return ZA(e)||XA(e,t)||YA(e,t)||QA()}function QA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
71
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
72
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hT(e,t){if(e){if(typeof e=="string")return Gy(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)?Gy(e,t):void 0}}function Gy(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 gT(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function yT(e){if(Array.isArray(e))return e}var mT=function(t){var n=t.isRtl,r=n===void 0?!1:n,i=t.className,s=t.style,o=t.token,a=o===void 0?"":o,l=t.apiUrl,u=t.DebugInfo,c=t.basename,d=c===void 0?"/":c,f=t.subpath,h=f===void 0?"/":f,y=t.onNavigate,m=y===void 0?function(){}:y,p=t.onLogout,v=p===void 0?function(){}:p,b=t.onAddSubscription,S=b===void 0?function(){}:b,C=function(T,M){var B=T.endsWith("/")?T.slice(0,-1):T,R=M.startsWith("/")?M:"/".concat(M);return B+R||"/"},x=F.useState(!!(a||l)),k=dT(x,2),w=k[0],_=k[1],O={onAddSubscription:S,onLogout:v,onNavigate:m,DebugInfo:u,basename:d,subpath:h};return F.useEffect(function(){l&&c2(l),I5(typeof a!="function"?function(){return a}:a),_(!1)},[l,a]),w?g.jsx("div",{className:i,style:s,children:g.jsx(A.Spinner,{})}):g.jsx("div",{className:i,style:s,children:g.jsxs(dw,{initialEntries:[C(d,h)],basename:d||"/",children:[g.jsx(cT,{subpath:h,onNavigate:m}),g.jsx(A.Root,{context:{isRtl:r},children:g.jsx(uT,{DebugInfo:u,hostAppProps:O})})]})})},pT=e=>e!=null,vT=e=>e.filter(pT);function bT(e){return(...t)=>{for(const n of e)n&&n(...t)}}var Z=e=>typeof e=="function"&&!e.length?e():e,rf=e=>Array.isArray(e)?e:e?[e]:[];function xT(e,...t){return typeof e=="function"?e(...t):e}var wT=Ce;function ST(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 CT(e){const[t,n]=oe(),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 y=o.get(h);y||(y=oe(void 0,{equals:!1}),o.set(h,y)),y[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,y)=>{const m=e!=null&&e.serializer?e.serializer(h,f,y!=null?y:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(S){r(S,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},u=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(y){r(y,`Error removing ${s}${f} from ${h.name}`)}}),c=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(y,m)=>{if(!f.hasOwnProperty(y)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,y,e.options):m;p&&(f[y]=p)}};return i.forEach(y=>{if(typeof y.getAll=="function"){let m;try{m=y.getAll()}catch(p){r(p,`Error getting all values from in ${y.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=y.key(m++);)f.hasOwnProperty(p)||h(p,y.getItem(p))}catch(v){r(v,`Error getting all values from ${y.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&Pr(()=>{const f=h=>{var m;let y=!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),y=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),y&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),Ce(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var y;return(y=h.addEventListener)==null?void 0:y.call(h,"storage",f)}),Ce(()=>i.forEach(h=>{var y;return(y=h.removeEventListener)==null?void 0:y.call(h,"storage",f)})))}),[a,l,{clear:c,error:t,remove:u,toJSON:d}]}var Tb=CT,_T=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),Ky=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},wn=_T({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=wn._cookies[0][wn._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=wn.getItem(e);wn._cookies[0][wn._cookies[1]]=`${e}=${t}${Ky(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:wn});window.dispatchEvent(i)},removeItem:e=>{wn._cookies[0][wn._cookies[1]]=`${e}=deleted${Ky({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return wn._cookies[0][wn._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return wn._cookies[0][wn._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),kT=1024,Vi=796,ih=700,OT="bottom-right",sf="bottom",Pb="system",ET=!1,jb=500,AT=500,Mb=500,TT=Object.keys(Od)[0],Vy=1,PT=Object.keys(Ed)[0],sh=Ot({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function ve(){return Et(sh)}var $b=Ot(void 0),Lb=e=>{const[t,n]=oe(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)}),[...(ve().shadowDOMTarget||document).styleSheets].forEach(u=>{try{const c=[...u.cssRules].map(y=>y.cssText).join(""),d=document.createElement("style"),f=u.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=c,l.document.head.appendChild(d)}catch(c){const d=document.createElement("link");if(u.href==null)return;d.rel="stylesheet",d.type=u.type,d.media=u.media.toString(),d.href=u.href,l.document.head.appendChild(d)}}),Pu(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};Se(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||AT))}),Se(()=>{const o=(ve().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const u=(ve().shadowDOMTarget||a.document).querySelector("#_goober");u&&(u.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),Ce(()=>{l.disconnect()})}});const s=V(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return L($b.Provider,{value:s,get children(){return e.children}})},oh=()=>V(()=>{const t=Et($b);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),ah=Ot(()=>"dark");function _t(){return Et(ah)}var Db={À:"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"},jT=Object.keys(Db).join("|"),MT=new RegExp(jT,"g");function $T(e){return e.replace(MT,t=>Db[t])}var Vt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Wy(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Vt.MATCHES,!n.accessors){const o=Qy(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=RT(e,n.accessors),s={rankedValue:e,rank:Vt.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=Qy(a.itemValue,t,n);const{minRanking:u,maxRanking:c,threshold:d=n.threshold}=a.attributes;l<u&&l>=Vt.MATCHES?l=u:l>c&&(l=c),l=Math.min(l,c),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function Qy(e,t,n){return e=Yy(e,n),t=Yy(t,n),t.length>e.length?Vt.NO_MATCH:e===t?Vt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Vt.EQUAL:e.startsWith(t)?Vt.STARTS_WITH:e.includes(` ${t}`)?Vt.WORD_STARTS_WITH:e.includes(t)?Vt.CONTAINS:t.length===1?Vt.NO_MATCH:LT(e).includes(t)?Vt.ACRONYM:DT(e,t))}function LT(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function DT(e,t){let n=0,r=0;function i(l,u,c){for(let d=c,f=u.length;d<f;d++)if(u[d]===l)return n+=1,d+1;return-1}function s(l){const u=1/l,c=n/t.length;return Vt.MATCHES+c*u}const o=i(t[0],e,0);if(o<0)return Vt.NO_MATCH;r=o;for(let l=1,u=t.length;l<u;l++){const c=t[l];if(r=i(c,e,r),!(r>-1))return Vt.NO_MATCH}const a=r-o;return s(a)}function Yy(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=$T(e)),e}function IT(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 RT(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=NT(s),a=IT(e,s);for(let l=0,u=a.length;l<u;l++)n.push({itemValue:a[l],attributes:o})}return n}var Xy={maxRanking:1/0,minRanking:-1/0};function NT(e){return typeof e=="function"?Xy:{...Xy,...e}}var FT={data:""},BT=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||FT,qT=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,zT=/\/\*[^]*?\*\/| +/g,Zy=/\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},hr={},Ib=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ib(e[n]);return t}return e},HT=(e,t,n,r,i)=>{let s=Ib(e),o=hr[s]||(hr[s]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(s));if(!hr[o]){let l=s!==e?e:(u=>{let c,d,f=[{}];for(;c=qT.exec(u.replace(zT,""));)c[4]?f.shift():c[3]?(d=c[3].replace(Zy," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(Zy," ").trim();return f[0]})(e);hr[o]=Si(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&hr.g?hr.g:null;return n&&(hr.g=hr[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(hr[o],t,r,a),o},UT=(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 Re(e){let t=this||{},n=e.call?e(t.p):e;return HT(n.unshift?n.raw?UT(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,BT(t.target),t.g,t.o,t.k)}Re.bind({g:1});Re.bind({k:1});function Rb(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=Rb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function le(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rb(e))&&(r&&(r+=" "),r+=t);return r}function GT(e,t){const n=gt(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=oe([],{equals:!1}),[l]=M3(),u=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},c=(d,f,h)=>d.splice(h,0,f);return V(d=>{const f=o(),h=e();if(h[Eu],gt(l))return l(),d;if(f.length){const y=d.filter(m=>!f.includes(m));return f.length=0,r({list:y,added:[],removed:[],unchanged:y,finishRemoved:u}),y}return gt(()=>{const y=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const C of h)(i.has(C)?b:p).push(C);let S=!p.length;for(let C=0;C<d.length;C++){const x=d[C];y.has(x)||(s.has(x)||(v.push(x),s.add(x)),c(m,x,C)),S&&x!==m[C]&&(S=!1)}return!v.length&&S?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:u}),i=y,m)})},t.appear?[]:n.slice())}function Ht(...e){return bT(e)}var Jy=e=>e instanceof Element;function of(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return of(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=of(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function KT(e,t=Jy,n=Jy){const r=V(e),i=V(()=>of(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function VT(e){return V(()=>{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 Nb(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function WT(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())}),Nb(()=>{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 QT(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()),Nb(()=>{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 em=e=>{const t=VT(e);return GT(KT(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)WT(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:u,rect:c}of a)if(u.isConnected){const d=u.getBoundingClientRect(),f=c.left-d.left,h=c.top-d.top;(f||h)&&(u.style.transform=`translate(${f}px, ${h}px)`,u.style.transitionDuration="0s",l.push(u))}document.body.offsetHeight;for(const u of l){let c=function(d){(d.target===u||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",c),u.classList.remove(...o.move))};u.classList.add(...o.move),u.style.transform=u.style.transitionDuration="",u.addEventListener("transitionend",c)}});for(const l of r)QT(o,e,l,()=>i([l]))}})},Wc=Symbol("fallback");function tm(e){for(const t of e)t.dispose()}function YT(e,t,n,r={}){const i=new Map;return Ce(()=>tm(i.values())),()=>{const o=e()||[];return o[Eu],gt(()=>{var c,d;if(!o.length)return tm(i.values()),i.clear(),r.fallback?[Or(h=>(i.set(Wc,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(Wc);if(!i.size||l){l==null||l.dispose(),i.delete(Wc);for(let f=0;f<o.length;f++){const h=o[f],y=t(h,f);s(a,h,f,y)}return a}const u=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],y=t(h,f);u.delete(y);const m=i.get(y);m?(a[f]=m.mapped,(c=m.setIndex)==null||c.call(m,f),m.setItem(()=>h)):s(a,h,f,y)}for(const f of u)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,u){Or(c=>{const[d,f]=oe(a),h={setItem:f,dispose:c};if(n.length>1){const[y,m]=oe(l);h.setIndex=m,h.mapped=n(d,y)}else h.mapped=n(d);i.set(u,h),o[l]=h.mapped})}}function mu(e){const{by:t}=e;return V(YT(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function XT(e,t,n,r){return e.addEventListener(t,n,r),wT(e.removeEventListener.bind(e,t,n,r))}function ZT(e,t,n,r){const i=()=>{rf(Z(e)).forEach(s=>{s&&rf(Z(t)).forEach(o=>XT(s,o,n,r))})};typeof e=="function"?Se(i):we(i)}function JT(e,t){const n=new ResizeObserver(e);return Ce(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function Fb(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=JT(o=>{for(const a of o){const{contentRect:l,target:u}=a,c=Math.round(l.width),d=Math.round(l.height),f=r.get(u);(!f||f.width!==c||f.height!==d)&&(t(l,u,a),r.set(u,{width:c,height:d}))}},n);Se(o=>{const a=vT(rf(Z(e)));return ST(a,o,i,s),a},[])}var eP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function nm(e){const t={};let n;for(;n=eP.exec(e);)t[n[1]]=n[2];return t}function tc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=nm(e)}else typeof t=="string"&&(t=nm(t));return{...e,...t}}function tP(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function af(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nP(e){return typeof e=="number"}function us(e){return Object.prototype.toString.call(e)==="[object String]"}function rP(e){return typeof e=="function"}function Za(e){return t=>`${e()}-${t}`}function Tn(e,t){return e?e===t||e.contains(t):!1}function zo(e,t=!1){const{activeElement:n}=ar(e);if(!(n!=null&&n.nodeName))return null;if(Bb(n)&&n.contentDocument)return zo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=ar(n).getElementById(r);if(i)return i}}return n}function iP(e){return ar(e).defaultView||window}function ar(e){return e?e.ownerDocument||e:document}function Bb(e){return e.tagName==="IFRAME"}var lh=(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))(lh||{});function uh(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 nc(){return uh(/^Mac/i)}function sP(){return uh(/^iPhone/i)}function oP(){return uh(/^iPad/i)||nc()&&navigator.maxTouchPoints>1}function aP(){return sP()||oP()}function lP(){return nc()||aP()}function lt(e,t){return t&&(rP(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function St(e){return t=>{for(const n of e)lt(t,n)}}function uP(e){return nc()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function $t(e){if(e)if(cP())e.focus({preventScroll:!0});else{const t=dP(e);e.focus(),fP(t)}}var Tl=null;function cP(){if(Tl==null){Tl=!1;try{document.createElement("div").focus({get preventScroll(){return Tl=!0,!0}})}catch(e){}}return Tl}function dP(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 fP(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var qb=["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'])"],hP=[...qb,'[tabindex]:not([tabindex="-1"]):not([disabled])'],ch=qb.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",gP=hP.join(':not([hidden]):not([tabindex="-1"]),');function zb(e,t){const r=Array.from(e.querySelectorAll(ch)).filter(rm);return t&&rm(e)&&r.unshift(e),r.forEach((i,s)=>{if(Bb(i)&&i.contentDocument){const o=i.contentDocument.body,a=zb(o,!1);r.splice(s,1,...a)}}),r}function rm(e){return Hb(e)&&!yP(e)}function Hb(e){return e.matches(ch)&&dh(e)}function yP(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function dh(e,t){return e.nodeName!=="#comment"&&mP(e)&&pP(e,t)&&(!e.parentElement||dh(e.parentElement,e))}function mP(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 pP(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function vP(e,t,n){const r=t!=null&&t.tabbable?gP:ch,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)&&dh(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 im(e){for(;e&&!bP(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function bP(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function xP(){}function wP(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[u,c]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],y=(c-f)*(n-u)-(u-d)*(r-c);if(f<c){if(r>=f&&r<c){if(y===0)return!0;y>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(c<f){if(r>c&&r<=f){if(y===0)return!0;y<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==c&&(n>=d&&n<=u||n>=u&&n<=d))return!0}return i}function Ue(e,t){return Pe(e,t)}var To=new Map,sm=new Set;function om(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=To.get(n.target);r||(r=new Set,To.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=To.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),To.delete(n.target)),To.size===0)){for(const i of sm)i();sm.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?om():document.addEventListener("DOMContentLoaded",om));function lf(e,t){const n=am(e,t,"left"),r=am(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,u=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>u&&(a+=r+s-u),e.scrollLeft=o,e.scrollTop=a}function am(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 SP(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=im(e);for(;e&&o&&e!==i&&o!==i;)lf(o,e),e=o,o=im(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:u}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-u)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var Ub={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 Pn(e){return t=>(e(t),()=>e(void 0))}function rc(e,t){const[n,r]=oe(lm(t==null?void 0:t()));return Se(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||lm(t==null?void 0:t()))}),n}function lm(e){return us(e)?e:void 0}function dt(e){const[t,n]=Ze(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return L(fS,Pe(n,{get component(){return t.as}}))}var CP=["id","name","validationState","required","disabled","readOnly"];function _P(e){const t=`form-control-${$n()}`,n=Ue({id:t},e),[r,i]=oe(),[s,o]=oe(),[a,l]=oe(),[u,c]=oe(),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(),u(),m].filter(Boolean).join(" ")||void 0,h=V(()=>({"data-valid":Z(n.validationState)==="valid"?"":void 0,"data-invalid":Z(n.validationState)==="invalid"?"":void 0,"data-required":Z(n.required)?"":void 0,"data-disabled":Z(n.disabled)?"":void 0,"data-readonly":Z(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=Z(n.name))!=null?m:Z(n.id)},dataset:h,validationState:()=>Z(n.validationState),isRequired:()=>Z(n.required),isDisabled:()=>Z(n.disabled),isReadOnly:()=>Z(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:u,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Za(()=>Z(n.id)),registerLabel:Pn(i),registerField:Pn(o),registerDescription:Pn(l),registerErrorMessage:Pn(c)}}}var Gb=Ot();function Ja(){const e=Et(Gb);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Kb(e){const t=Ja(),n=Ue({id:t.generateId("description")},e);return Se(()=>Ce(t.registerDescription(n.id))),L(dt,Pe({as:"div"},()=>t.dataset(),n))}function Vb(e){const t=Ja(),n=Ue({id:t.generateId("error-message")},e),[r,i]=Ze(n,["forceMount"]),s=()=>t.validationState()==="invalid";return Se(()=>{s()&&Ce(t.registerErrorMessage(i.id))}),L(xe,{get when(){return r.forceMount||s()},get children(){return L(dt,Pe({as:"div"},()=>t.dataset(),i))}})}function kP(e){let t;const n=Ja(),r=Ue({id:n.generateId("label")},e),[i,s]=Ze(r,["ref"]),o=rc(()=>t,()=>"label");return Se(()=>Ce(n.registerLabel(s.id))),L(dt,Pe({as:"label",ref(a){const l=Ht(u=>t=u,i.ref);typeof l=="function"&&l(a)},get for(){return V(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function OP(e,t){Se(Tr(e,n=>{if(n==null)return;const r=EP(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),Ce(()=>{r.removeEventListener("reset",t)}))}))}function EP(e){return AP(e)?e.form:e.closest("form")}function AP(e){return e.matches("textarea, input, select, button")}function el(e){var o;const[t,n]=oe((o=e.defaultValue)==null?void 0:o.call(e)),r=V(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=V(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{gt(()=>{var u;const l=xT(a,i());return Object.is(l,i())||(r()||n(l),(u=e.onChange)==null||u.call(e,l)),l})}]}function Wb(e){const[t,n]=el(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function TP(e){const[t,n]=el(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function PP(e={}){const[t,n]=Wb({value:()=>Z(e.isSelected),defaultValue:()=>!!Z(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(s)},toggle:()=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(!t())}}}var jP=Object.defineProperty,ic=(e,t)=>{for(var n in t)jP(e,n,{get:t[n],enumerable:!0})},Qb=Ot();function Yb(){return Et(Qb)}function MP(){const e=Yb();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Xb(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function $P(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&&Xb(s,n))return r+1}return 0}function LP(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:Xb(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function Zb(e,t){const n=LP(e);e!==n&&t(n)}function DP(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 ar(r).body}function IP(e,t){Se(()=>{const n=setTimeout(()=>{Zb(e(),t)});Ce(()=>clearTimeout(n))})}function RP(e,t){if(typeof IntersectionObserver!="function"){IP(e,t);return}let n=[];Se(()=>{const r=()=>{const o=!!n.length;n=e(),o&&Zb(e(),t)},i=DP(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}Ce(()=>s.disconnect())})}function NP(e={}){const[t,n]=TP({value:()=>Z(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});RP(t,n);const r=s=>(n(o=>{const a=$P(o,s);return tP(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>L(Qb.Provider,{value:{registerItem:r},get children(){return s.children}})}}function FP(e){const t=MP(),n=Ue({shouldRegisterItem:!0},e);Se(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());Ce(r)})}function Jb(e){var l,u,c;let t=(l=e.startIndex)!=null?l:0;const n=(u=e.startLevel)!=null?u:0,r=[],i=d=>{var y;if(d==null)return"";const f=(y=e.getKey)!=null?y:"key",h=us(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var y;if(d==null)return"";const f=(y=e.getTextValue)!=null?y:"textValue",h=us(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,y;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(y=us(f)?d[f]:f(d))!=null?y:!1},a=d=>{var f;if(d!=null)return us(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(us(d)||nP(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=(c=a(d))!=null?c:[];if(f.length>0){const h=Jb({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 BP(e,t=[]){return V(()=>{const n=Jb({dataSource:Z(e.dataSource),getKey:Z(e.getKey),getTextValue:Z(e.getTextValue),getDisabled:Z(e.getDisabled),getSectionChildren:Z(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var qP=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),zP=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function HP(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return qP.has(r)}const t=e.split("-")[0];return zP.has(t)}function UP(e){return HP(e)?"rtl":"ltr"}function e1(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:UP(e)}}var uf=e1(),Ho=new Set;function um(){uf=e1();for(const e of Ho)e(uf)}function GP(){const[e,t]=oe(uf),n=V(()=>e());return Pr(()=>{Ho.size===0&&window.addEventListener("languagechange",um),Ho.add(t),Ce(()=>{Ho.delete(t),Ho.size===0&&window.removeEventListener("languagechange",um)})}),{locale:()=>n().locale,direction:()=>n().direction}}var KP=Ot();function gi(){const e=GP();return Et(KP)||e}var Qc=new Map;function VP(e){const{locale:t}=gi(),n=V(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return V(()=>{const r=n();let i;return Qc.has(r)&&(i=Qc.get(r)),i||(i=new Intl.Collator(t(),e),Qc.set(r,i)),i})}var vr=class t1 extends Set{constructor(n,r,i){super(n);be(this,"anchorKey");be(this,"currentKey");n instanceof t1?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function WP(e){const[t,n]=el(e);return[()=>{var i;return(i=t())!=null?i:new vr},n]}function n1(e){return lP()?e.altKey:e.ctrlKey}function cs(e){return nc()?e.metaKey:e.ctrlKey}function cm(e){return new vr(e)}function QP(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function YP(e){const t=Ue({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=oe(!1),[i,s]=oe(),o=V(()=>{const m=Z(t.selectedKeys);return m!=null?cm(m):m}),a=V(()=>{const m=Z(t.defaultSelectedKeys);return m!=null?cm(m):new vr}),[l,u]=WP({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[c,d]=oe(Z(t.selectionBehavior)),f=()=>Z(t.selectionMode),h=()=>{var m;return(m=Z(t.disallowEmptySelection))!=null?m:!1},y=m=>{(Z(t.allowDuplicateSelectionEvents)||!QP(m,l()))&&u(m)};return Se(()=>{const m=l();Z(t.selectionBehavior)==="replace"&&c()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),Se(()=>{var m;d((m=Z(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:c,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:y}}function XP(e){const[t,n]=oe(""),[r,i]=oe(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,y;if(Z(e.isDisabled))return;const a=Z(e.keyboardDelegate),l=Z(e.selectionManager);if(!a.getKeyForSearch)return;const u=ZP(o.key);if(!u||o.ctrlKey||o.metaKey)return;u===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let c=n(m=>m+u),d=(f=a.getKeyForSearch(c,l.focusedKey()))!=null?f:a.getKeyForSearch(c);d==null&&JP(c)&&(c=c[0],d=(h=a.getKeyForSearch(c,l.focusedKey()))!=null?h:a.getKeyForSearch(c)),d!=null&&(l.setFocusedKey(d),(y=e.onTypeSelect)==null||y.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function ZP(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function JP(e){return e.split("").every(t=>t===e[0])}function ej(e,t,n){const i=Pe({selectOnFocus:()=>Z(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=gi();let a={top:0,left:0};ZT(()=>Z(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=XP({isDisabled:()=>Z(i.disallowTypeAhead),keyboardDelegate:()=>Z(i.keyboardDelegate),selectionManager:()=>Z(i.selectionManager)}),u=()=>{var p;return(p=Z(i.orientation))!=null?p:"vertical"},c=p=>{var _,O,E,T,M,B,R,P;lt(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=Z(i.selectionManager),S=Z(i.selectOnFocus),C=j=>{j!=null&&(b.setFocusedKey(j),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(j):S&&!n1(p)&&b.replaceSelection(j))},x=Z(i.keyboardDelegate),k=Z(i.shouldFocusWrap),w=b.focusedKey();switch(p.key){case(u()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){p.preventDefault();let j;w!=null?j=x.getKeyBelow(w):j=(_=x.getFirstKey)==null?void 0:_.call(x),j==null&&k&&(j=(O=x.getFirstKey)==null?void 0:O.call(x,w)),C(j)}break}case(u()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){p.preventDefault();let j;w!=null?j=x.getKeyAbove(w):j=(E=x.getLastKey)==null?void 0:E.call(x),j==null&&k&&(j=(T=x.getLastKey)==null?void 0:T.call(x,w)),C(j)}break}case(u()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){p.preventDefault();const j=o()==="rtl";let I;w!=null?I=x.getKeyLeftOf(w):I=j?(M=x.getFirstKey)==null?void 0:M.call(x):(B=x.getLastKey)==null?void 0:B.call(x),C(I)}break}case(u()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){p.preventDefault();const j=o()==="rtl";let I;w!=null?I=x.getKeyRightOf(w):I=j?(R=x.getLastKey)==null?void 0:R.call(x):(P=x.getFirstKey)==null?void 0:P.call(x),C(I)}break}case"Home":if(x.getFirstKey){p.preventDefault();const j=x.getFirstKey(w,cs(p));j!=null&&(b.setFocusedKey(j),cs(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(j):S&&b.replaceSelection(j))}break;case"End":if(x.getLastKey){p.preventDefault();const j=x.getLastKey(w,cs(p));j!=null&&(b.setFocusedKey(j),cs(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(j):S&&b.replaceSelection(j))}break;case"PageDown":if(x.getKeyPageBelow&&w!=null){p.preventDefault();const j=x.getKeyPageBelow(w);C(j)}break;case"PageUp":if(x.getKeyPageAbove&&w!=null){p.preventDefault();const j=x.getKeyPageAbove(w);C(j)}break;case"a":cs(p)&&b.selectionMode()==="multiple"&&Z(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),Z(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!Z(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const j=vP(v,{tabbable:!0});let I,G;do G=j.lastChild(),G&&(I=G);while(G);I&&!I.contains(document.activeElement)&&$t(I)}break}}},d=p=>{var C,x,k,w;const v=Z(i.selectionManager),b=Z(i.keyboardDelegate),S=Z(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 _=E=>{E!=null&&(v.setFocusedKey(E),S&&v.replaceSelection(E))},O=p.relatedTarget;O&&p.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?_((x=v.lastSelectedKey())!=null?x:(C=b.getLastKey)==null?void 0:C.call(b)):_((w=v.firstSelectedKey())!=null?w:(k=b.getFirstKey)==null?void 0:k.call(b))}else if(!Z(i.isVirtualized)){const _=s();if(_){_.scrollTop=a.top,_.scrollLeft=a.left;const O=_.querySelector(`[data-key="${v.focusedKey()}"]`);O&&($t(O),lf(_,O))}}}},f=p=>{const v=Z(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},y=()=>{var k,w;const p=Z(i.autoFocus);if(!p)return;const v=Z(i.selectionManager),b=Z(i.keyboardDelegate);let S;p==="first"&&(S=(k=b.getFirstKey)==null?void 0:k.call(b)),p==="last"&&(S=(w=b.getLastKey)==null?void 0:w.call(b));const C=v.selectedKeys();C.size&&(S=C.values().next().value),v.setFocused(!0),v.setFocusedKey(S);const x=t();x&&S==null&&!Z(i.shouldUseVirtualFocus)&&$t(x)};return Pr(()=>{i.deferAutoFocus?setTimeout(y,0):y()}),Se(Tr([s,()=>Z(i.isVirtualized),()=>Z(i.selectionManager).focusedKey()],p=>{var C;const[v,b,S]=p;if(b)S&&((C=i.scrollToKey)==null||C.call(i,S));else if(S&&v){const x=v.querySelector(`[data-key="${S}"]`);x&&lf(v,x)}})),{tabIndex:V(()=>{if(!Z(i.shouldUseVirtualFocus))return Z(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:c,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function r1(e,t){const n=()=>Z(e.selectionManager),r=()=>Z(e.key),i=()=>Z(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"||cs(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>Z(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let u=null;const c=b=>{l()&&(u=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!Z(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&Z(e.shouldSelectOnPressUp)&&Z(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(Z(e.shouldSelectOnPressUp)&&!Z(e.allowsDifferentPressOrigin)||u!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(n1(b)?n().toggleSelection(r()):s(b))},y=b=>{a()&&b.preventDefault()},m=b=>{const S=t();i()||a()||!S||b.target===S&&n().setFocusedKey(r())},p=V(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=V(()=>Z(e.virtualized)?void 0:r());return Se(Tr([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,S,C,x,k])=>{b&&S===x&&k&&!C&&document.activeElement!==b&&(e.focus?e.focus():$t(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:c,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:y,onFocus:m}}var tj=class{constructor(e,t){be(this,"collection");be(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 vr(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 vr(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 vr([t],t,t):new vr;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new vr;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 vr)}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}},dm=class{constructor(e){be(this,"keyMap",new Map);be(this,"iterable");be(this,"firstKey");be(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 nj(e){const t=YP(e),r=BP({dataSource:()=>Z(e.dataSource),getKey:()=>Z(e.getKey),getTextValue:()=>Z(e.getTextValue),getDisabled:()=>Z(e.getDisabled),getSectionChildren:()=>Z(e.getSectionChildren),factory:s=>e.filter?new dm(e.filter(s)):new dm(s)},[()=>e.filter]),i=new tj(r,t);return sv(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var Mt=e=>typeof e=="function"?e():e,rj=e=>{const t=V(()=>{const o=Mt(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]=oe(Mt(e.show)?"present":"hidden");let s="none";return Se(o=>{const a=Mt(e.show);return gt(()=>{var c;if(o===a)return a;const l=s,u=n();a?i("present"):u==="none"||((c=t())==null?void 0:c.display)==="none"?i("hidden"):i(o===!0&&l!==u?"hiding":"hidden")}),a}),Se(()=>{const o=Mt(e.element);if(!o)return;const a=u=>{u.target===o&&(s=n())},l=u=>{const d=n().includes(u.animationName);u.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),Ce(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},ij=rj,i1=ij,pu="data-kb-top-layer",s1,cf=!1,jr=[];function wa(e){return jr.findIndex(t=>t.node===e)}function sj(e){return jr[wa(e)]}function oj(e){return jr[jr.length-1].node===e}function o1(){return jr.filter(e=>e.isPointerBlocking)}function aj(){return[...o1()].slice(-1)[0]}function fh(){return o1().length>0}function a1(e){var n;const t=wa((n=aj())==null?void 0:n.node);return wa(e)<t}function lj(e){jr.push(e)}function uj(e){const t=wa(e);t<0||jr.splice(t,1)}function cj(){for(const{node:e}of jr)e.style.pointerEvents=a1(e)?"none":"auto"}function dj(e){if(fh()&&!cf){const t=ar(e);s1=document.body.style.pointerEvents,t.body.style.pointerEvents="none",cf=!0}}function fj(e){if(fh())return;const t=ar(e);t.body.style.pointerEvents=s1,t.body.style.length===0&&t.body.removeAttribute("style"),cf=!1}var en={layers:jr,isTopMostLayer:oj,hasPointerBlockingLayer:fh,isBelowPointerBlockingLayer:a1,addLayer:lj,removeLayer:uj,indexOf:wa,find:sj,assignPointerEventToLayers:cj,disableBodyPointerEvents:dj,restoreBodyPointerEvents:fj},hj={};ic(hj,{Button:()=>mj,Root:()=>hh});var gj=["button","color","file","image","reset","submit"];function yj(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?gj.indexOf(e.type)!==-1:!1}function hh(e){let t;const n=Ue({type:"button"},e),[r,i]=Ze(n,["ref","type","disabled"]),s=rc(()=>t,()=>"button"),o=V(()=>{const u=s();return u==null?!1:yj({tagName:u,type:r.type})}),a=V(()=>s()==="input"),l=V(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return L(dt,Pe({as:"button",ref(u){const c=Ht(d=>t=d,r.ref);typeof c=="function"&&c(u)},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 mj=hh,pj=["top","right","bottom","left"],sr=Math.min,hn=Math.max,vu=Math.round,Pl=Math.floor,ai=e=>({x:e,y:e}),vj={left:"right",right:"left",bottom:"top",top:"bottom"},bj={start:"end",end:"start"};function df(e,t,n){return hn(e,sr(t,n))}function ts(e,t){return typeof e=="function"?e(t):e}function li(e){return e.split("-")[0]}function uo(e){return e.split("-")[1]}function l1(e){return e==="x"?"y":"x"}function gh(e){return e==="y"?"height":"width"}function Wi(e){return["top","bottom"].includes(li(e))?"y":"x"}function yh(e){return l1(Wi(e))}function xj(e,t,n){n===void 0&&(n=!1);const r=uo(e),i=yh(e),s=gh(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=bu(o)),[o,bu(o)]}function wj(e){const t=bu(e);return[ff(e),t,ff(t)]}function ff(e){return e.replace(/start|end/g,t=>bj[t])}function Sj(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 Cj(e,t,n,r){const i=uo(e);let s=Sj(li(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(ff)))),s}function bu(e){return e.replace(/left|right|bottom|top/g,t=>vj[t])}function _j(e){return{top:0,right:0,bottom:0,left:0,...e}}function u1(e){return typeof e!="number"?_j(e):{top:e,right:e,bottom:e,left:e}}function xu(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 fm(e,t,n){let{reference:r,floating:i}=e;const s=Wi(t),o=yh(t),a=gh(o),l=li(t),u=s==="y",c=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:c,y:r.y-i.height};break;case"bottom":h={x:c,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(uo(t)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}var kj=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 u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=fm(u,r,l),f=r,h={},y=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:S,data:C,reset:x}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=b!=null?b:c,d=S!=null?S:d,h={...h,[p]:{...h[p],...C}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=fm(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Sa(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ts(t,e),y=u1(h),p=a[f?d==="floating"?"reference":"floating":d],v=xu(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:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},x=xu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:l}):b);return{top:(v.top-x.top+y.top)/C.y,bottom:(x.bottom-v.bottom+y.bottom)/C.y,left:(v.left-x.left+y.left)/C.x,right:(x.right-v.right+y.right)/C.x}}var Oj=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:u,padding:c=0}=ts(e,t)||{};if(u==null)return{};const d=u1(c),f={x:n,y:r},h=yh(i),y=gh(h),m=await o.getDimensions(u),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",S=p?"clientHeight":"clientWidth",C=s.reference[y]+s.reference[h]-f[h]-s.floating[y],x=f[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let w=k?k[S]:0;(!w||!await(o.isElement==null?void 0:o.isElement(k)))&&(w=a.floating[S]||s.floating[y]);const _=C/2-x/2,O=w/2-m[y]/2-1,E=sr(d[v],O),T=sr(d[b],O),M=E,B=w-m[y]-T,R=w/2-m[y]/2+_,P=df(M,R,B),j=!l.arrow&&uo(i)!=null&&R!==P&&s.reference[y]/2-(R<M?E:T)-m[y]/2<0,I=j?R<M?R-M:R-B:0;return{[h]:f[h]+I,data:{[h]:P,centerOffset:R-P-I,...j&&{alignmentOffset:I}},reset:j}}}),Ej=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:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...p}=ts(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=li(i),b=Wi(a),S=li(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(S||!m?[bu(a)]:wj(a)),k=y!=="none";!f&&k&&x.push(...Cj(a,m,y,C));const w=[a,...x],_=await Sa(t,p),O=[];let E=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&O.push(_[v]),d){const R=xj(i,o,C);O.push(_[R[0]],_[R[1]])}if(E=[...E,{placement:i,overflows:O}],!O.every(R=>R<=0)){var T,M;const R=(((T=s.flip)==null?void 0:T.index)||0)+1,P=w[R];if(P)return{data:{index:R,overflows:E},reset:{placement:P}};let j=(M=E.filter(I=>I.overflows[0]<=0).sort((I,G)=>I.overflows[1]-G.overflows[1])[0])==null?void 0:M.placement;if(!j)switch(h){case"bestFit":{var B;const I=(B=E.filter(G=>{if(k){const Y=Wi(G.placement);return Y===b||Y==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Y=>Y>0).reduce((Y,q)=>Y+q,0)]).sort((G,Y)=>G[1]-Y[1])[0])==null?void 0:B[0];I&&(j=I);break}case"initialPlacement":j=a;break}if(i!==j)return{reset:{placement:j}}}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 gm(e){return pj.some(t=>e[t]>=0)}var Aj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ts(e,t);switch(r){case"referenceHidden":{const s=await Sa(t,{...i,elementContext:"reference"}),o=hm(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:gm(o)}}}case"escaped":{const s=await Sa(t,{...i,altBoundary:!0}),o=hm(s,n.floating);return{data:{escapedOffsets:o,escaped:gm(o)}}}default:return{}}}}};async function Tj(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=li(n),a=uo(n),l=Wi(n)==="y",u=["left","top"].includes(o)?-1:1,c=s&&l?-1:1,d=ts(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}var Pj=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 Tj(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}}}}},jj=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}=ts(e,t),u={x:n,y:r},c=await Sa(t,l),d=Wi(li(i)),f=l1(d);let h=u[f],y=u[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+c[p],S=h-c[v];h=df(b,h,S)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=y+c[p],S=y-c[v];y=df(b,y,S)}const m=a.fn({...t,[f]:h,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Mj=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}=ts(e,t),l=await Sa(t,a),u=li(n),c=uo(n),d=Wi(n)==="y",{width:f,height:h}=r.floating;let y,m;u==="top"||u==="bottom"?(y=u,m=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=u,y=c==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=sr(h-l[y],p),S=sr(f-l[m],v),C=!t.middlewareData.shift;let x=b,k=S;if(d?k=c||C?sr(S,v):v:x=c||C?sr(b,p):p,C&&!c){const _=hn(l.left,0),O=hn(l.right,0),E=hn(l.top,0),T=hn(l.bottom,0);d?k=f-2*(_!==0||O!==0?_+O:hn(l.left,l.right)):x=h-2*(E!==0||T!==0?E+T:hn(l.top,l.bottom))}await o({...t,availableWidth:k,availableHeight:x});const w=await i.getDimensions(s.floating);return f!==w.width||h!==w.height?{reset:{rects:!0}}:{}}}};function co(e){return c1(e)?(e.nodeName||"").toLowerCase():"#document"}function mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(c1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function c1(e){return e instanceof Node||e instanceof mn(e).Node}function qn(e){return e instanceof Element||e instanceof mn(e).Element}function lr(e){return e instanceof HTMLElement||e instanceof mn(e).HTMLElement}function ym(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof mn(e).ShadowRoot}function tl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function $j(e){return["table","td","th"].includes(co(e))}function sc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function mh(e){const t=ph(),n=qn(e)?zn(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 Lj(e){let t=ui(e);for(;lr(t)&&!eo(t);){if(mh(t))return t;if(sc(t))return null;t=ui(t)}return null}function ph(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function eo(e){return["html","body","#document"].includes(co(e))}function zn(e){return mn(e).getComputedStyle(e)}function oc(e){return qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ui(e){if(co(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ym(e)&&e.host||Lr(e);return ym(t)?t.host:t}function d1(e){const t=ui(e);return eo(t)?e.ownerDocument?e.ownerDocument.body:e.body:lr(t)&&tl(t)?t:d1(t)}function Ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=d1(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=mn(i);return s?t.concat(o,o.visualViewport||[],tl(i)?i:[],o.frameElement&&n?Ca(o.frameElement):[]):t.concat(i,Ca(i,[],n))}function f1(e){const t=zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=lr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=vu(n)!==s||vu(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function vh(e){return qn(e)?e:e.contextElement}function vs(e){const t=vh(e);if(!lr(t))return ai(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=f1(t);let o=(s?vu(n.width):n.width)/r,a=(s?vu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Dj=ai(0);function h1(e){const t=mn(e);return!ph()||!t.visualViewport?Dj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ij(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mn(e)?!1:t}function Qi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=vh(e);let o=ai(1);t&&(r?qn(r)&&(o=vs(r)):o=vs(e));const a=Ij(s,n,r)?h1(s):ai(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=mn(s),h=r&&qn(r)?mn(r):r;let y=f,m=y.frameElement;for(;m&&r&&h!==y;){const p=vs(m),v=m.getBoundingClientRect(),b=zn(m),S=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,C=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,u*=p.y,c*=p.x,d*=p.y,l+=S,u+=C,y=mn(m),m=y.frameElement}}return xu({width:c,height:d,x:l,y:u})}function Rj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Lr(r),a=t?sc(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ai(1);const c=ai(0),d=lr(r);if((d||!d&&!s)&&((co(r)!=="body"||tl(o))&&(l=oc(r)),lr(r))){const f=Qi(r);u=vs(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function Nj(e){return Array.from(e.getClientRects())}function g1(e){return Qi(Lr(e)).left+oc(e).scrollLeft}function Fj(e){const t=Lr(e),n=oc(e),r=e.ownerDocument.body,i=hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+g1(e);const a=-n.scrollTop;return zn(r).direction==="rtl"&&(o+=hn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function Bj(e,t){const n=mn(e),r=Lr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=ph();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function qj(e,t){const n=Qi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=lr(e)?vs(e):ai(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function mm(e,t,n){let r;if(t==="viewport")r=Bj(e,n);else if(t==="document")r=Fj(Lr(e));else if(qn(t))r=qj(t,n);else{const i=h1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return xu(r)}function y1(e,t){const n=ui(e);return n===t||!qn(n)||eo(n)?!1:zn(n).position==="fixed"||y1(n,t)}function zj(e,t){const n=t.get(e);if(n)return n;let r=Ca(e,[],!1).filter(a=>qn(a)&&co(a)!=="body"),i=null;const s=zn(e).position==="fixed";let o=s?ui(e):e;for(;qn(o)&&!eo(o);){const a=zn(o),l=mh(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||tl(o)&&!l&&y1(e,o))?r=r.filter(c=>c!==o):i=a,o=ui(o)}return t.set(e,r),r}function Hj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?sc(t)?[]:zj(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=mm(t,c,i);return u.top=hn(d.top,u.top),u.right=sr(d.right,u.right),u.bottom=sr(d.bottom,u.bottom),u.left=hn(d.left,u.left),u},mm(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Uj(e){const{width:t,height:n}=f1(e);return{width:t,height:n}}function Gj(e,t,n){const r=lr(t),i=Lr(t),s=n==="fixed",o=Qi(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=ai(0);if(r||!r&&!s)if((co(t)!=="body"||tl(i))&&(a=oc(t)),r){const d=Qi(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=g1(i));const u=o.left+a.scrollLeft-l.x,c=o.top+a.scrollTop-l.y;return{x:u,y:c,width:o.width,height:o.height}}function Yc(e){return zn(e).position==="static"}function pm(e,t){return!lr(e)||zn(e).position==="fixed"?null:t?t(e):e.offsetParent}function m1(e,t){const n=mn(e);if(sc(e))return n;if(!lr(e)){let i=ui(e);for(;i&&!eo(i);){if(qn(i)&&!Yc(i))return i;i=ui(i)}return n}let r=pm(e,t);for(;r&&$j(r)&&Yc(r);)r=pm(r,t);return r&&eo(r)&&Yc(r)&&!mh(r)?n:r||Lj(e)||n}var Kj=async function(e){const t=this.getOffsetParent||m1,n=this.getDimensions,r=await n(e.floating);return{reference:Gj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Vj(e){return zn(e).direction==="rtl"}var p1={convertOffsetParentRelativeRectToViewportRelativeRect:Rj,getDocumentElement:Lr,getClippingRect:Hj,getOffsetParent:m1,getElementRects:Kj,getClientRects:Nj,getDimensions:Uj,getScale:vs,isElement:qn,isRTL:Vj};function Wj(e,t){let n=null,r;const i=Lr(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:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Pl(c),y=Pl(i.clientWidth-(u+d)),m=Pl(i.clientHeight-(c+f)),p=Pl(u),b={rootMargin:-h+"px "+-y+"px "+-m+"px "+-p+"px",threshold:hn(0,sr(1,l))||1};let S=!0;function C(x){const k=x[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch(x){n=new IntersectionObserver(C,b)}n.observe(e)}return o(!0),s}function Qj(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,u=vh(e),c=i||s?[...u?Ca(u):[],...Ca(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?Wj(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,m=l?Qi(e):null;l&&p();function p(){const v=Qi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,y=requestAnimationFrame(p)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(y)}}var Yj=Pj,Xj=jj,Zj=Ej,Jj=Mj,eM=Aj,tM=Oj,nM=(e,t,n)=>{const r=new Map,i={platform:p1,...n},s={...i.platform,_c:r};return kj(e,t,{...i,platform:s})},bh=Ot();function xh(){const e=Et(bh);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var rM=ue('<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">'),hf=30,vm=hf/2,iM={top:180,right:-90,bottom:0,left:90};function wh(e){const t=xh(),n=Ue({size:hf},e),[r,i]=Ze(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=sM(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"},u=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},c=()=>Number.parseInt(u())*2*(hf/r.size),d=()=>`rotate(${iM[s()]} ${vm} ${vm}) translate(0 2)`;return L(dt,Pe({as:"div",ref(f){const h=Ht(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return tc({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":c()},r.style)}},i,{get children(){const f=rM(),h=f.firstChild;return we(()=>re(h,"transform",d())),f}}))}function sM(e){const[t,n]=oe();return Se(()=>{const r=e();r&&n(iP(r).getComputedStyle(r))}),t}function oM(e){const t=xh(),[n,r]=Ze(e,["ref","style"]);return L(dt,Pe({as:"div",ref(i){const s=Ht(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return tc({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function bm(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 aM(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?bm(r):e?e.getBoundingClientRect():bm()}}}function lM(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var uM={top:"bottom",right:"left",bottom:"top",left:"right"};function cM(e,t){const[n,r]=e.split("-"),i=uM[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 dM(e){const t=Ue({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]=oe(),[i,s]=oe(),[o,a]=oe(t.placement),l=()=>{var f;return aM((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:u}=gi();async function c(){var k,w,_;const f=l(),h=n(),y=i();if(!f||!h)return;const m=((y==null?void 0:y.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(k=t.gutter)!=null?k:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[Yj(({placement:O})=>{const E=!!O.split("-")[1];return{mainAxis:p,crossAxis:E?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const O=typeof t.flip=="string"?t.flip.split(" "):void 0;if(O!==void 0&&!O.every(lM))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(Zj({padding:t.overflowPadding,fallbackPlacements:O}))}(t.slide||t.overlap)&&v.push(Xj({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(Jj({padding:t.overflowPadding,apply({availableWidth:O,availableHeight:E,rects:T}){const M=Math.round(T.reference.width);O=Math.floor(O),E=Math.floor(E),h.style.setProperty("--kb-popper-anchor-width",`${M}px`),h.style.setProperty("--kb-popper-content-available-width",`${O}px`),h.style.setProperty("--kb-popper-content-available-height",`${E}px`),t.sameWidth&&(h.style.width=`${M}px`),t.fitViewport&&(h.style.maxWidth=`${O}px`,h.style.maxHeight=`${E}px`)}})),t.hideWhenDetached&&v.push(eM({padding:t.detachedPadding})),y&&v.push(tM({element:y,padding:t.arrowPadding}));const b=await nM(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...p1,isRTL:()=>u()==="rtl"}});if(a(b.placement),(w=t.onCurrentPlacementChange)==null||w.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",cM(b.placement,u()));const S=Math.round(b.x),C=Math.round(b.y);let x;if(t.hideWhenDetached&&(x=(_=b.middlewareData.hide)!=null&&_.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${S}px, ${C}px, 0)`,visibility:x}),y&&b.middlewareData.arrow){const{x:O,y:E}=b.middlewareData.arrow,T=b.placement.split("-")[0];Object.assign(y.style,{left:O!=null?`${O}px`:"",top:E!=null?`${E}px`:"",[T]:"100%"})}}Se(()=>{const f=l(),h=n();if(!f||!h)return;const y=Qj(f,h,c,{elementResize:typeof ResizeObserver=="function"});Ce(y)}),Se(()=>{var y;const f=n(),h=(y=t.contentRef)==null?void 0:y.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 L(bh.Provider,{value:d,get children(){return t.children}})}var v1=Object.assign(dM,{Arrow:wh,Context:bh,usePopperContext:xh,Positioner:oM});function fM(e){const t=n=>{var r;n.key===lh.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};Se(()=>{var r,i;if(Z(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:ar();n.addEventListener("keydown",t),Ce(()=>{n.removeEventListener("keydown",t)})})}var xm="interactOutside.pointerDownOutside",wm="interactOutside.focusOutside";function hM(e,t){let n,r=xP;const i=()=>ar(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(`[${pu}]`)||!Tn(i(),f)||Tn(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},u=d=>{function f(){const h=t(),y=d.target;if(!h||!y||!l(d))return;const m=St([s,a]);y.addEventListener(xm,m,{once:!0});const p=new CustomEvent(xm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||uP(d)&&d.button===0}});y.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},c=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const y=St([o,a]);h.addEventListener(wm,y,{once:!0});const m=new CustomEvent(wm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};Se(()=>{Z(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",u,!0)},0),i().addEventListener("focusin",c,!0),Ce(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",u,!0),i().removeEventListener("focusin",c,!0)}))})}var b1=Ot();function gM(){return Et(b1)}function yM(e){let t;const n=gM(),[r,i]=Ze(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()}};hM({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>Tn(h(),d)))||[...s].some(h=>Tn(h,d)):!1},onPointerDownOutside:d=>{var f,h,y;!t||en.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!en.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(y=r.onDismiss)==null||y.call(r))},onFocusOutside:d=>{var f,h,y;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(y=r.onDismiss)==null||y.call(r)}},()=>t),fM({ownerDocument:()=>ar(t),onEscapeKeyDown:d=>{var f;!t||!en.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Pr(()=>{if(!t)return;en.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);en.assignPointerEventToLayers(),en.disableBodyPointerEvents(t),Ce(()=>{t&&(en.removeLayer(t),d==null||d(),en.assignPointerEventToLayers(),en.restoreBodyPointerEvents(t))})}),Se(Tr([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=en.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,en.assignPointerEventToLayers()),f&&en.disableBodyPointerEvents(d),Ce(()=>{en.restoreBodyPointerEvents(d)})},{defer:!0}));const c={registerNestedLayer:o};return L(b1.Provider,{value:c,get children(){return L(dt,Pe({as:"div",ref(d){const f=Ht(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function x1(e={}){const[t,n]=Wb({value:()=>Z(e.open),defaultValue:()=>!!Z(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 _n={};ic(_n,{Description:()=>Kb,ErrorMessage:()=>Vb,Item:()=>_1,ItemControl:()=>k1,ItemDescription:()=>O1,ItemIndicator:()=>E1,ItemInput:()=>A1,ItemLabel:()=>T1,Label:()=>P1,RadioGroup:()=>mM,Root:()=>j1});var w1=Ot();function S1(){const e=Et(w1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var C1=Ot();function nl(){const e=Et(C1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function _1(e){const t=Ja(),n=S1(),r=`${t.generateId("item")}-${$n()}`,i=Ue({id:r},e),[s,o]=Ze(i,["value","disabled","onPointerDown"]),[a,l]=oe(),[u,c]=oe(),[d,f]=oe(),[h,y]=oe(),[m,p]=oe(!1),v=V(()=>n.isSelectedValue(s.value)),b=V(()=>s.disabled||t.isDisabled()||!1),S=k=>{lt(k,s.onPointerDown),m()&&k.preventDefault()},C=V(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),x={value:()=>s.value,dataset:C,isSelected:v,isDisabled:b,inputId:a,labelId:u,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Za(()=>o.id),registerInput:Pn(l),registerLabel:Pn(c),registerDescription:Pn(f),setIsFocused:p,setInputRef:y};return L(C1.Provider,{value:x,get children(){return L(dt,Pe({as:"div",role:"group",onPointerDown:S},C,o))}})}function k1(e){const t=nl(),n=Ue({id:t.generateId("control")},e),[r,i]=Ze(n,["onClick","onKeyDown"]);return L(dt,Pe({as:"div",onClick:a=>{var l;lt(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;lt(a,r.onKeyDown),a.key===lh.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function O1(e){const t=nl(),n=Ue({id:t.generateId("description")},e);return Se(()=>Ce(t.registerDescription(n.id))),L(dt,Pe({as:"div"},()=>t.dataset(),n))}function E1(e){const t=nl(),n=Ue({id:t.generateId("indicator")},e),[r,i]=Ze(n,["ref","forceMount"]),[s,o]=oe(),{present:a}=i1({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return L(xe,{get when(){return a()},get children(){return L(dt,Pe({as:"div",ref(l){const u=Ht(o,r.ref);typeof u=="function"&&u(l)}},()=>t.dataset(),i))}})}function A1(e){const t=Ja(),n=S1(),r=nl(),i=Ue({id:r.generateId("input")},e),[s,o]=Ze(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,[u,c]=oe(!1),d=y=>{if(lt(y,s.onChange),y.stopPropagation(),!u()){n.setSelectedValue(r.value());const m=y.target;m.checked=r.isSelected()}c(!1)},f=y=>{lt(y,s.onFocus),r.setIsFocused(!0)},h=y=>{lt(y,s.onBlur),r.setIsFocused(!1)};return Se(Tr([()=>r.isSelected(),()=>r.value()],y=>{if(!y[0]&&y[1]===r.value())return;c(!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})),Se(()=>Ce(r.registerInput(o.id))),L(dt,Pe({as:"input",ref(y){const m=Ht(r.setInputRef,s.ref);typeof m=="function"&&m(y)},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 tc({...Ub},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function T1(e){const t=nl(),n=Ue({id:t.generateId("label")},e);return Se(()=>Ce(t.registerLabel(n.id))),L(dt,Pe({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function P1(e){return L(kP,Pe({as:"span"},e))}function j1(e){let t;const n=`radiogroup-${$n()}`,r=Ue({id:n,orientation:"vertical"},e),[i,s,o]=Ze(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],CP),[a,l]=el({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:y=>{var m;return(m=i.onChange)==null?void 0:m.call(i,y)}}),{formControlContext:u}=_P(s);OP(()=>t,()=>{var y;return l((y=i.defaultValue)!=null?y:"")});const c=()=>u.getAriaLabelledBy(Z(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>u.getAriaDescribedBy(i["aria-describedby"]),f=y=>y===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:y=>{if(!(u.isReadOnly()||u.isDisabled())&&(l(y),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return L(Gb.Provider,{value:u,get children(){return L(w1.Provider,{value:h,get children(){return L(dt,Pe({as:"div",ref(y){const m=Ht(p=>t=p,i.ref);typeof m=="function"&&m(y)},role:"radiogroup",get id(){return Z(s.id)},get"aria-invalid"(){return u.validationState()==="invalid"||void 0},get"aria-required"(){return u.isRequired()||void 0},get"aria-disabled"(){return u.isDisabled()||void 0},get"aria-readonly"(){return u.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return c()},get"aria-describedby"(){return d()}},()=>u.dataset(),o))}})}})}var mM=Object.assign(j1,{Description:Kb,ErrorMessage:Vb,Item:_1,ItemControl:k1,ItemDescription:O1,ItemIndicator:E1,ItemInput:A1,ItemLabel:T1,Label:P1}),pM=class{constructor(e,t,n){be(this,"collection");be(this,"ref");be(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 vM(e,t,n){const r=VP({usage:"search",sensitivity:"base"}),i=V(()=>{const s=Z(e.keyboardDelegate);return s||new pM(e.collection,t,r)});return ej({selectionManager:()=>Z(e.selectionManager),keyboardDelegate:i,autoFocus:()=>Z(e.autoFocus),deferAutoFocus:()=>Z(e.deferAutoFocus),shouldFocusWrap:()=>Z(e.shouldFocusWrap),disallowEmptySelection:()=>Z(e.disallowEmptySelection),selectOnFocus:()=>Z(e.selectOnFocus),disallowTypeAhead:()=>Z(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Z(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Z(e.allowsTabNavigation),isVirtualized:()=>Z(e.isVirtualized),scrollToKey:s=>{var o;return(o=Z(e.scrollToKey))==null?void 0:o(s)},orientation:()=>Z(e.orientation)},t)}var Xc="focusScope.autoFocusOnMount",Zc="focusScope.autoFocusOnUnmount",Sm={bubbles:!1,cancelable:!0},Cm={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=af(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=af(this.stack,e),(t=this.active())==null||t.resume()}};function bM(e,t){const[n,r]=oe(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=y=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,y)},a=y=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,y)},l=()=>ar(t()),u=()=>{const y=l().createElement("span");return y.setAttribute("data-focus-trap",""),y.tabIndex=0,Object.assign(y.style,Ub),y},c=()=>{const y=t();return y?zb(y,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const y=c();return y.length>0?y[0]:null},f=()=>{const y=c();return y.length>0?y[y.length-1]:null},h=()=>{const y=t();if(!y)return!1;const m=zo(y);return!m||Tn(y,m)?!1:Hb(m)};Se(()=>{const y=t();if(!y)return;Cm.add(i);const m=zo(y);if(!Tn(y,m)){const v=new CustomEvent(Xc,Sm);y.addEventListener(Xc,o),y.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{$t(d()),zo(y)===m&&$t(y)},0)}Ce(()=>{y.removeEventListener(Xc,o),setTimeout(()=>{const v=new CustomEvent(Zc,Sm);h()&&v.preventDefault(),y.addEventListener(Zc,a),y.dispatchEvent(v),v.defaultPrevented||$t(m!=null?m:l().body),y.removeEventListener(Zc,a),Cm.remove(i)},0)})}),Se(()=>{const y=t();if(!y||!Z(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${pu}]`)||(Tn(y,b)?s=b:$t(s))},p=v=>{const b=v.relatedTarget,S=b!=null?b:zo(y);S!=null&&S.closest(`[${pu}]`)||Tn(y,S)||$t(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),Ce(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),Se(()=>{const y=t();if(!y||!Z(e.trapFocus)||n())return;const m=u();y.insertAdjacentElement("afterbegin",m);const p=u();y.insertAdjacentElement("beforeend",p);function v(S){const C=d(),x=f();S.relatedTarget===C?$t(x):$t(C)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(S=>{for(const C of S)C.previousSibling===p&&(p.remove(),y.insertAdjacentElement("beforeend",p)),C.nextSibling===m&&(m.remove(),y.insertAdjacentElement("afterbegin",m))});b.observe(y,{childList:!0,subtree:!1}),Ce(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var xM="data-live-announcer";function wM(e){Se(()=>{Z(e.isDisabled)||Ce(SM(Z(e.targets),Z(e.root)))})}var Po=new WeakMap,Sn=[];function SM(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${xM}], [${pu}]`))n.add(f);const u=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},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)s(f),f=c.nextNode()}},s=l=>{var c;const u=(c=Po.get(l))!=null?c:0;l.getAttribute("aria-hidden")==="true"&&u===0||(u===0&&l.setAttribute("aria-hidden","true"),r.add(l),Po.set(l,u+1))};Sn.length&&Sn[Sn.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(const c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(const c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return Sn.push(a),()=>{o.disconnect();for(const l of r){const u=Po.get(l);if(u==null)return;u===1?(l.removeAttribute("aria-hidden"),Po.delete(l)):Po.set(l,u-1)}a===Sn[Sn.length-1]?(Sn.pop(),Sn.length&&Sn[Sn.length-1].observe()):Sn.splice(Sn.indexOf(a),1)}}var jl=new Map,CM=e=>{Se(()=>{var s,o;const t=(s=Mt(e.style))!=null?s:{},n=(o=Mt(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=jl.get(e.key);i?i.activeCount++:jl.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);Ce(()=>{var l;const a=jl.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}jl.delete(e.key);for(const[u,c]of Object.entries(a.originalStyles))e.element.style[u]=c;for(const u of a.properties)e.element.style.removeProperty(u);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},_m=CM,_M=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},kM=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},OM=(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[u,c,d]=_M(i,t),f=d-u-r*c;(c!==0||f!==0)&&kM(i,t)&&(s+=f,o+=c),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[km,Om]=oe([]),EM=e=>km().indexOf(e)===km().length-1,AM=e=>{const t=Pe({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=$n();let r=[0,0],i=null,s=null;Se(()=>{Mt(t.enabled)&&(Om(u=>[...u,n]),Ce(()=>{Om(u=>u.filter(c=>c!==n))}))}),Se(()=>{if(!Mt(t.enabled)||!Mt(t.hideScrollbar))return;const{body:u}=document,c=window.innerWidth-u.offsetWidth;if(Mt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];c>0&&(Mt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(u).paddingRight} + ${c}px)`:d.marginRight=`calc(${window.getComputedStyle(u).marginRight} + ${c}px)`,f.push({key:"--scrollbar-width",value:`${c}px`}));const h=window.scrollY,y=window.scrollX;_m({key:"prevent-scroll",element:u,style:d,properties:f,cleanup:()=>{Mt(t.restoreScrollPosition)&&c>0&&window.scrollTo(y,h)}})}else _m({key:"prevent-scroll",element:u,style:{overflow:"hidden"}})}),Se(()=>{!EM(n)||!Mt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),Ce(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=u=>{r=Em(u),i=null,s=null},a=u=>{const c=u.target,d=Mt(t.element),f=TM(u),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",y=h==="x"?f[0]:f[1],m=Am(c,h,y,d);let p;d&&gf(d,c)?p=!m:p=!0,p&&u.cancelable&&u.preventDefault()},l=u=>{const c=Mt(t.element),d=u.target;let f;if(u.touches.length===2)f=!Mt(t.allowPinchZoom);else{if(i==null||s===null){const h=Em(u).map((m,p)=>r[p]-m),y=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=y,s=y==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=Am(d,i,s,c);c&&gf(c,d)?f=!h:f=!0}}f&&u.cancelable&&u.preventDefault()}},TM=e=>[e.deltaX,e.deltaY],Em=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Am=(e,t,n,r)=>{const i=r!==null&&gf(r,e),[s,o]=OM(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},gf=(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},PM=AM,jM=PM,M1=Ot();function $1(){return Et(M1)}function Dr(){const e=$1();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var L1=Ot();function Sh(){const e=Et(L1);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var D1=Ot();function ur(){const e=Et(D1);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function Ch(e){let t;const n=ur(),r=Dr(),i=Ue({id:n.generateId(`item-${$n()}`)},e),[s,o]=Ze(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=oe(),[u,c]=oe(),[d,f]=oe(),h=()=>r.listState().selectionManager(),y=()=>o.id,m=()=>h().focusedKey()===y(),p=()=>{var O;(O=s.onSelect)==null||O.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};FP({getItem:()=>{var O,E,T,M,B;return{ref:()=>t,type:"item",key:y(),textValue:(M=(T=(E=s.textValue)!=null?E:(O=d())==null?void 0:O.textContent)!=null?T:t==null?void 0:t.textContent)!=null?M:"",disabled:(B=s.disabled)!=null?B:!1}}});const v=r1({key:y,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=O=>{lt(O,s.onPointerMove),O.pointerType==="mouse"&&(s.disabled?r.onItemLeave(O):(r.onItemEnter(O),O.defaultPrevented||($t(O.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(y()))))},S=O=>{lt(O,s.onPointerLeave),O.pointerType==="mouse"&&r.onItemLeave(O)},C=O=>{lt(O,s.onPointerUp),!s.disabled&&O.button===0&&p()},x=O=>{if(lt(O,s.onKeyDown),!O.repeat&&!s.disabled)switch(O.key){case"Enter":case" ":p();break}},k=V(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),w=V(()=>({"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})),_={isChecked:()=>s.checked,dataset:w,setLabelRef:f,generateId:Za(()=>o.id),registerLabel:Pn(l),registerDescription:Pn(c)};return L(L1.Provider,{value:_,get children(){return L(dt,Pe({as:"div",ref(O){const E=Ht(T=>t=T,s.ref);typeof E=="function"&&E(O)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},get"data-key"(){return v.dataKey()},get onPointerDown(){return St([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return St([C,v.onPointerUp])},get onClick(){return St([s.onClick,v.onClick])},get onKeyDown(){return St([x,v.onKeyDown])},get onMouseDown(){return St([s.onMouseDown,v.onMouseDown])},get onFocus(){return St([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:S},w,o))}})}function I1(e){const t=Ue({closeOnSelect:!1},e),[n,r]=Ze(t,["checked","defaultChecked","onChange","onSelect"]),i=PP({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 L(Ch,Pe({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var MM=Ot();function ac(){return Et(MM)}var _a={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>_a.next(e==="ltr"?"rtl":"ltr",t)},Tm={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function R1(e){const t=ur(),n=Dr(),r=ac(),{direction:i}=gi(),s=Ue({id:t.generateId("trigger")},e),[o,a]=Ze(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 u=rc(()=>n.triggerRef(),()=>"button"),c=V(()=>{var v;return u()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});Se(Tr(()=>r==null?void 0:r.value(),v=>{var b;c()&&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=>{lt(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{lt(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},y=v=>{if(lt(v,o.onKeyDown),!o.disabled){if(c())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case Tm.first(t.orientation()):v.stopPropagation(),v.preventDefault(),SP(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case Tm.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case _a.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case _a.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;lt(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=>{lt(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return Se(()=>Ce(n.registerTriggerId(o.id))),L(hh,Pe({ref(v){const b=Ht(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 V(()=>!!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:y,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var $M=Ot();function N1(){return Et($M)}function F1(e){let t;const n=ur(),r=Dr(),i=ac(),s=N1(),{direction:o}=gi(),a=Ue({id:n.generateId(`content-${$n()}`)},e),[l,u]=Ze(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let c=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=vM({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);bM({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:S=>{var C;i===void 0&&((C=l.onOpenAutoFocus)==null||C.call(l,S))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=S=>{if(Tn(S.currentTarget,S.target)&&(S.key==="Tab"&&r.isOpen()&&S.preventDefault(),i!==void 0&&S.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(S.key){case _a.next(o(),n.orientation()):S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case _a.previous(o(),n.orientation()):if(S.currentTarget.hasAttribute("data-closed"))break;S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},y=S=>{var C;(C=l.onEscapeKeyDown)==null||C.call(l,S),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=S=>{var C;(C=l.onFocusOutside)==null||C.call(l,S),n.isModal()&&S.preventDefault()},p=S=>{var C,x;lt(S,l.onPointerEnter),r.isOpen()&&((C=r.parentMenuContext())==null||C.listState().selectionManager().setFocused(!1),(x=r.parentMenuContext())==null||x.listState().selectionManager().setFocusedKey(void 0))},v=S=>{if(lt(S,l.onPointerMove),S.pointerType!=="mouse")return;const C=S.target,x=c!==S.clientX;Tn(S.currentTarget,C)&&x&&(r.setPointerDir(S.clientX>c?"right":"left"),c=S.clientX)};Se(()=>Ce(r.registerContentId(l.id)));const b={ref:Ht(S=>{r.setContentRef(S),t=S},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:St([l.onKeyDown,f.onKeyDown,h]),onMouseDown:St([l.onMouseDown,f.onMouseDown]),onFocusIn:St([l.onFocusIn,f.onFocusIn]),onFocusOut:St([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return L(xe,{get when(){return r.contentPresent()},get children(){return L(xe,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return L(dt,Pe({as:"div"},()=>r.dataset(),b,u))},get children(){return L(v1.Positioner,{get children(){return L(yM,Pe({get disableOutsidePointerEvents(){return V(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return tc({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:y,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,u))}})}})}})}function LM(e){let t;const n=ur(),r=Dr(),[i,s]=Ze(e,["ref"]);return jM({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),L(F1,Pe({ref(o){const a=Ht(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var B1=Ot();function DM(){const e=Et(B1);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function _h(e){const t=ur(),n=Ue({id:t.generateId(`group-${$n()}`)},e),[r,i]=oe(),s={generateId:Za(()=>n.id),registerLabelId:Pn(i)};return L(B1.Provider,{value:s,get children(){return L(dt,Pe({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function q1(e){const t=DM(),n=Ue({id:t.generateId("label")},e),[r,i]=Ze(n,["id"]);return Se(()=>Ce(t.registerLabelId(r.id))),L(dt,Pe({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function z1(e){const t=Dr(),n=Ue({children:"▼"},e);return L(dt,Pe({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function H1(e){return L(Ch,Pe({role:"menuitem",closeOnSelect:!0},e))}function U1(e){const t=Sh(),n=Ue({id:t.generateId("description")},e),[r,i]=Ze(n,["id"]);return Se(()=>Ce(t.registerDescription(r.id))),L(dt,Pe({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function G1(e){const t=Sh(),n=Ue({id:t.generateId("indicator")},e),[r,i]=Ze(n,["forceMount"]);return L(xe,{get when(){return r.forceMount||t.isChecked()},get children(){return L(dt,Pe({as:"div"},()=>t.dataset(),i))}})}function K1(e){const t=Sh(),n=Ue({id:t.generateId("label")},e),[r,i]=Ze(n,["ref","id"]);return Se(()=>Ce(t.registerLabel(r.id))),L(dt,Pe({as:"div",ref(s){const o=Ht(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function V1(e){const t=Dr();return L(xe,{get when(){return t.contentPresent()},get children(){return L(vv,e)}})}var W1=Ot();function IM(){const e=Et(W1);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function Q1(e){const n=ur().generateId(`radiogroup-${$n()}`),r=Ue({id:n},e),[i,s]=Ze(r,["value","defaultValue","onChange","disabled"]),[o,a]=el({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:u=>{var c;return(c=i.onChange)==null?void 0:c.call(i,u)}}),l={isDisabled:()=>i.disabled,isSelectedValue:u=>u===o(),setSelectedValue:a};return L(W1.Provider,{value:l,get children(){return L(_h,s)}})}function Y1(e){const t=IM(),n=Ue({closeOnSelect:!1},e),[r,i]=Ze(n,["value","onSelect"]);return L(Ch,Pe({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 RM(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 NM(e,t){return t?wP([e.clientX,e.clientY],t):!1}function X1(e){const t=ur(),n=Yb(),r=$1(),i=ac(),s=N1(),o=Ue({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=Ze(o,["open","defaultOpen","onOpenChange"]);let u=0,c=null,d="right";const[f,h]=oe(),[y,m]=oe(),[p,v]=oe(),[b,S]=oe(),[C,x]=oe(!0),[k,w]=oe(l.placement),[_,O]=oe([]),[E,T]=oe([]),{DomCollectionProvider:M}=NP({items:E,onItemsChange:T}),B=x1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:X=>{var he;return(he=a.onOpenChange)==null?void 0:he.call(a,X)}}),{present:R}=i1({show:()=>t.forceMount()||B.isOpen(),element:()=>{var X;return(X=b())!=null?X:null}}),P=nj({selectionMode:"none",dataSource:E}),j=X=>{x(X),B.open()},I=(X=!1)=>{B.close(),X&&r&&r.close(!0)},G=X=>{x(X),B.toggle()},Y=()=>{const X=b();X&&($t(X),P.selectionManager().setFocused(!0),P.selectionManager().setFocusedKey(void 0))},q=()=>{s!=null?setTimeout(()=>Y()):Y()},U=X=>{O(ye=>[...ye,X]);const he=r==null?void 0:r.registerNestedMenu(X);return()=>{O(ye=>af(ye,X)),he==null||he()}},z=X=>d===(c==null?void 0:c.side)&&NM(X,c==null?void 0:c.area),K=X=>{z(X)&&X.preventDefault()},N=X=>{z(X)||q()},ee=X=>{z(X)&&X.preventDefault()};wM({isDisabled:()=>!(r==null&&B.isOpen()&&t.isModal()),targets:()=>[b(),..._()].filter(Boolean)}),Se(()=>{const X=b();if(!X||!r)return;const he=r.registerNestedMenu(X);Ce(()=>{he()})}),Se(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),..._()]))}),Se(()=>{var X;r!==void 0||i===void 0||(i.value()===t.value()?((X=p())==null||X.focus(),i.autoFocusMenu()&&j(!0)):I())}),Se(()=>{r!==void 0||i===void 0||B.isOpen()&&i.setValue(t.value())}),Ce(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const de={dataset:V(()=>({"data-expanded":B.isOpen()?"":void 0,"data-closed":B.isOpen()?void 0:""})),isOpen:B.isOpen,contentPresent:R,nestedMenus:_,currentPlacement:k,pointerGraceTimeoutId:()=>u,autoFocus:C,listState:()=>P,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:y,setTriggerRef:v,setContentRef:S,open:j,close:I,toggle:G,focusContent:q,onItemEnter:K,onItemLeave:N,onTriggerLeave:ee,setPointerDir:X=>d=X,setPointerGraceTimeoutId:X=>u=X,setPointerGraceIntent:X=>c=X,registerNestedMenu:U,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:Pn(h),registerContentId:Pn(m)};return L(M,{get children(){return L(M1.Provider,{value:de,get children(){return L(xe,{when:s===void 0,get fallback(){return l.children},get children(){return L(v1,Pe({anchorRef:p,contentRef:b,onCurrentPlacementChange:w},l))}})}})}})}function Z1(e){const{direction:t}=gi();return L(X1,Pe({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var FM={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function J1(e){const t=Dr(),n=ur(),[r,i]=Ze(e,["onFocusOutside","onKeyDown"]),{direction:s}=gi();return L(F1,Pe({onOpenAutoFocus:c=>{c.preventDefault()},onCloseAutoFocus:c=>{c.preventDefault()},onFocusOutside:c=>{var f;(f=r.onFocusOutside)==null||f.call(r,c);const d=c.target;Tn(t.triggerRef(),d)||t.close()},onKeyDown:c=>{lt(c,r.onKeyDown);const d=Tn(c.currentTarget,c.target),f=FM.close(s(),n.orientation()).includes(c.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),$t(t.triggerRef()))}},i))}var Pm=["Enter"," "],BM={open:(e,t)=>e==="ltr"?[...Pm,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Pm,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function ex(e){let t;const n=ur(),r=Dr(),i=Ue({id:n.generateId(`sub-trigger-${$n()}`)},e),[s,o]=Ze(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:u}=gi(),c=()=>s.id,d=()=>{const S=r.parentMenuContext();if(S==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return S.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===c(),y=r1({key:c,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=S=>{lt(S,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=S=>{var x;if(lt(S,s.onPointerMove),S.pointerType!=="mouse")return;const C=r.parentMenuContext();if(C==null||C.onItemEnter(S),!S.defaultPrevented){if(s.disabled){C==null||C.onItemLeave(S);return}!r.isOpen()&&!a&&((x=r.parentMenuContext())==null||x.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),C==null||C.onItemEnter(S),S.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),$t(S.currentTarget),C==null||C.listState().selectionManager().setFocused(!0),C==null||C.listState().selectionManager().setFocusedKey(c()))}},v=S=>{if(lt(S,s.onPointerLeave),S.pointerType!=="mouse")return;l();const C=r.parentMenuContext(),x=r.contentRef();if(x){C==null||C.setPointerGraceIntent({area:RM(r.currentPlacement(),S,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(C==null?void 0:C.pointerGraceTimeoutId());const k=window.setTimeout(()=>{C==null||C.setPointerGraceIntent(null)},300);C==null||C.setPointerGraceTimeoutId(k)}else{if(C==null||C.onTriggerLeave(S),S.defaultPrevented)return;C==null||C.setPointerGraceIntent(null)}C==null||C.onItemLeave(S)},b=S=>{lt(S,s.onKeyDown),!S.repeat&&(s.disabled||BM.open(u(),n.orientation()).includes(S.key)&&(S.stopPropagation(),S.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 Se(()=>{var C,x,k;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const S=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:c(),textValue:(x=(C=s.textValue)!=null?C:t==null?void 0:t.textContent)!=null?x:"",disabled:(k=s.disabled)!=null?k:!1});Ce(S)}),Se(Tr(()=>{var S;return(S=r.parentMenuContext())==null?void 0:S.pointerGraceTimeoutId()},S=>{Ce(()=>{var C;window.clearTimeout(S),(C=r.parentMenuContext())==null||C.setPointerGraceIntent(null)})})),Se(()=>Ce(r.registerTriggerId(s.id))),Ce(()=>{l()}),L(dt,Pe({as:"div",ref(S){const C=Ht(x=>{r.setTriggerRef(x),t=x},s.ref);typeof C=="function"&&C(S)},get id(){return s.id},role:"menuitem",get tabIndex(){return y.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return V(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return y.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return St([s.onPointerDown,y.onPointerDown])},get onPointerUp(){return St([s.onPointerUp,y.onPointerUp])},get onClick(){return St([m,y.onClick])},get onKeyDown(){return St([b,y.onKeyDown])},get onMouseDown(){return St([s.onMouseDown,y.onMouseDown])},get onFocus(){return St([s.onFocus,y.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function qM(e){const t=ac(),n=`menu-${$n()}`,r=Ue({id:n,modal:!0},e),[i,s]=Ze(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=x1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var u;return(u=i.onOpenChange)==null?void 0:u.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:Za(()=>i.id),value:()=>i.value,orientation:()=>{var l,u;return(u=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?u:"horizontal"}};return L(D1.Provider,{value:a,get children(){return L(X1,Pe({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var zM={};ic(zM,{Root:()=>lc,Separator:()=>HM});function lc(e){let t;const n=Ue({orientation:"horizontal"},e),[r,i]=Ze(n,["ref","orientation"]),s=rc(()=>t,()=>"hr");return L(dt,Pe({as:"hr",ref(o){const a=Ht(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 HM=lc,pt={};ic(pt,{Arrow:()=>wh,CheckboxItem:()=>I1,Content:()=>tx,DropdownMenu:()=>UM,Group:()=>_h,GroupLabel:()=>q1,Icon:()=>z1,Item:()=>H1,ItemDescription:()=>U1,ItemIndicator:()=>G1,ItemLabel:()=>K1,Portal:()=>V1,RadioGroup:()=>Q1,RadioItem:()=>Y1,Root:()=>nx,Separator:()=>lc,Sub:()=>Z1,SubContent:()=>J1,SubTrigger:()=>ex,Trigger:()=>R1});function tx(e){const t=ur(),n=Dr(),[r,i]=Ze(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return L(LM,Pe({onCloseAutoFocus:l=>{var u;(u=r.onCloseAutoFocus)==null||u.call(r,l),s||$t(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var u;(u=r.onInteractOutside)==null||u.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function nx(e){const t=`dropdownmenu-${$n()}`,n=Ue({id:t},e);return L(qM,n)}var UM=Object.assign(nx,{Arrow:wh,CheckboxItem:I1,Content:tx,Group:_h,GroupLabel:q1,Icon:z1,Item:H1,ItemDescription:U1,ItemIndicator:G1,ItemLabel:K1,Portal:V1,RadioGroup:Q1,RadioItem:Y1,Separator:lc,Sub:Z1,SubContent:J1,SubTrigger:ex,Trigger:R1}),W={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"}},GM=ue('<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>'),KM=ue('<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>'),VM=ue('<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>'),WM=ue('<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>'),kh=ue('<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>'),QM=ue('<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>'),YM=ue('<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>'),XM=ue('<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>'),ZM=ue('<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">'),JM=ue('<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">'),e$=ue('<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>'),t$=ue('<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>'),n$=ue('<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>'),r$=ue('<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>'),rx=ue('<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>'),i$=ue('<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>'),s$=ue('<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>'),o$=ue('<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>'),a$=ue('<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>'),l$=ue('<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>'),u$=ue('<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>'),c$=ue('<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>'),d$=ue('<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 f$(){return GM()}function ix(){return KM()}function Jo(){return VM()}function jm(){return WM()}function Mm(){return kh()}function h$(){return(()=>{var e=kh();return e.style.setProperty("transform","rotate(90deg)"),e})()}function g$(){return(()=>{var e=kh();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function y$(){return QM()}function m$(){return YM()}function p$(){return XM()}function v$(){return ZM()}function b$(){return JM()}function x$(){return e$()}function w$(){return t$()}function S$(){return n$()}function C$(){return r$()}function _$(e){return(()=>{var t=rx(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function k$(){return i$()}function O$(){return s$()}function E$(e){return[L(xe,{get when(){return e.checked},get children(){var t=rx(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),L(xe,{get when(){return!e.checked},get children(){var t=o$(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function A$(){return a$()}function T$(){return l$()}function P$(){return u$()}function j$(){return c$()}function $m(){const e=$n();return(()=>{var t=d$(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,u=l.nextSibling,c=u.firstChild,d=u.nextSibling,f=d.firstChild,h=d.nextSibling,y=h.nextSibling,m=y.firstChild,p=y.nextSibling,v=p.firstChild,b=p.nextSibling,S=b.nextSibling,C=S.firstChild,x=S.nextSibling,k=x.firstChild,w=x.nextSibling,_=w.nextSibling,O=_.firstChild,E=_.nextSibling,T=E.firstChild,M=E.nextSibling,B=M.nextSibling,R=B.firstChild,P=B.nextSibling,j=P.firstChild,I=P.nextSibling,G=I.nextSibling,Y=G.firstChild,q=G.nextSibling,U=q.firstChild,z=q.nextSibling,K=z.firstChild,N=K.nextSibling,ee=N.nextSibling,te=ee.nextSibling,de=te.nextSibling,X=z.nextSibling,he=X.firstChild,ye=X.nextSibling,De=ye.firstChild,se=ye.nextSibling,nt=se.firstChild,ze=nt.nextSibling,ft=ze.nextSibling,Ge=ft.firstChild,Ne=Ge.nextSibling,J=Ne.nextSibling,Me=J.nextSibling,ot=Me.nextSibling,Ie=ot.nextSibling,$e=Ie.nextSibling,fe=$e.nextSibling,me=fe.nextSibling,ge=me.nextSibling,Fe=ge.nextSibling,Oe=Fe.nextSibling,Ke=se.nextSibling,Ve=Ke.firstChild,Rt=Ke.nextSibling,Jt=Rt.firstChild,kt=Rt.nextSibling,ce=kt.firstChild,pe=ce.nextSibling,Ee=kt.nextSibling,Ae=Ee.firstChild,rt=Ee.nextSibling,bn=rt.firstChild,In=rt.nextSibling,go=In.firstChild,yo=go.nextSibling,ns=yo.nextSibling,Th=ns.nextSibling,Ph=Th.nextSibling,jh=Ph.nextSibling,Mh=jh.nextSibling,$h=Mh.nextSibling,Lh=$h.nextSibling,Dh=Lh.nextSibling,Ih=Dh.nextSibling,Rh=Ih.nextSibling,Nh=Rh.nextSibling,Fh=Nh.nextSibling,Bh=Fh.nextSibling,qh=Bh.nextSibling,zh=qh.nextSibling,vx=zh.nextSibling;return re(n,"id",`a-${e}`),re(r,"fill",`url(#a-${e})`),re(s,"id",`am-${e}`),re(o,"id",`b-${e}`),re(a,"filter",`url(#am-${e})`),re(l,"mask",`url(#b-${e})`),re(c,"id",`ah-${e}`),re(d,"id",`k-${e}`),re(f,"filter",`url(#ah-${e})`),re(h,"mask",`url(#k-${e})`),re(m,"id",`ae-${e}`),re(p,"id",`j-${e}`),re(v,"filter",`url(#ae-${e})`),re(b,"mask",`url(#j-${e})`),re(C,"id",`ai-${e}`),re(x,"id",`i-${e}`),re(k,"filter",`url(#ai-${e})`),re(w,"mask",`url(#i-${e})`),re(O,"id",`aj-${e}`),re(E,"id",`h-${e}`),re(T,"filter",`url(#aj-${e})`),re(M,"mask",`url(#h-${e})`),re(R,"id",`ag-${e}`),re(P,"id",`g-${e}`),re(j,"filter",`url(#ag-${e})`),re(I,"mask",`url(#g-${e})`),re(Y,"id",`af-${e}`),re(q,"id",`f-${e}`),re(U,"filter",`url(#af-${e})`),re(z,"mask",`url(#f-${e})`),re(te,"id",`m-${e}`),re(de,"fill",`url(#m-${e})`),re(he,"id",`ak-${e}`),re(ye,"id",`e-${e}`),re(De,"filter",`url(#ak-${e})`),re(se,"mask",`url(#e-${e})`),re(nt,"id",`n-${e}`),re(ze,"fill",`url(#n-${e})`),re(Ge,"id",`r-${e}`),re(Ne,"fill",`url(#r-${e})`),re(J,"id",`s-${e}`),re(Me,"fill",`url(#s-${e})`),re(ot,"id",`q-${e}`),re(Ie,"fill",`url(#q-${e})`),re($e,"id",`p-${e}`),re(fe,"fill",`url(#p-${e})`),re(me,"id",`o-${e}`),re(ge,"fill",`url(#o-${e})`),re(Fe,"id",`l-${e}`),re(Oe,"fill",`url(#l-${e})`),re(Ve,"id",`al-${e}`),re(Rt,"id",`d-${e}`),re(Jt,"filter",`url(#al-${e})`),re(kt,"mask",`url(#d-${e})`),re(ce,"id",`u-${e}`),re(pe,"fill",`url(#u-${e})`),re(Ae,"id",`ad-${e}`),re(rt,"id",`c-${e}`),re(bn,"filter",`url(#ad-${e})`),re(In,"mask",`url(#c-${e})`),re(go,"id",`t-${e}`),re(yo,"fill",`url(#t-${e})`),re(ns,"id",`v-${e}`),re(Th,"stroke",`url(#v-${e})`),re(Ph,"id",`aa-${e}`),re(jh,"stroke",`url(#aa-${e})`),re(Mh,"id",`w-${e}`),re($h,"stroke",`url(#w-${e})`),re(Lh,"id",`ac-${e}`),re(Dh,"stroke",`url(#ac-${e})`),re(Ih,"id",`ab-${e}`),re(Rh,"stroke",`url(#ab-${e})`),re(Nh,"id",`y-${e}`),re(Fh,"stroke",`url(#y-${e})`),re(Bh,"id",`x-${e}`),re(qh,"stroke",`url(#x-${e})`),re(zh,"id",`z-${e}`),re(vx,"stroke",`url(#z-${e})`),t})()}var M$=ue('<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>'),$$=ue('<button title="Copy object to clipboard">'),L$=ue('<button title="Remove all items"aria-label="Remove all items">'),D$=ue('<button title="Delete item"aria-label="Delete item">'),I$=ue('<button title="Toggle value"aria-label="Toggle value">'),R$=ue('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),jo=ue("<div>"),N$=ue("<div><button> <span></span> <span> "),F$=ue("<input>"),Lm=ue("<span>"),B$=ue("<div><span>:"),q$=ue("<div><div><button> [<!>...<!>]");function z$(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var Dm=e=>{const t=_t(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=V(()=>t()==="dark"?ho(n):fo(n));return(()=>{var i=M$();return we(()=>ie(i,le(r().expander,n`
|
|
69
|
+
`):e}function ZE(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 Ey(e,t){const n=e.chart.ctx,{body:r,footer:i,title:s}=e,{boxWidth:o,boxHeight:a}=t,l=bt(t.bodyFont),u=bt(t.titleFont),c=bt(t.footerFont),d=s.length,f=i.length,h=r.length,y=Dt(t.padding);let m=y.height,p=0,v=r.reduce((C,x)=>C+x.before.length+x.lines.length+x.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*C+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const S=function(C){p=Math.max(p,n.measureText(C).width+b)};return n.save(),n.font=u.string,et(e.title,S),n.font=l.string,et(e.beforeBody.concat(e.afterBody),S),b=t.displayColors?o+2+t.boxPadding:0,et(r,C=>{et(C.before,S),et(C.lines,S),et(C.after,S)}),b=0,n.font=c.string,et(e.footer,S),n.restore(),p+=y.width,{width:p,height:m}}function JE(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function eA(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 tA(e,t,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),eA(u,e,t,n)&&(u="center"),u}function Ay(e,t,n){const r=n.yAlign||t.yAlign||JE(e,n);return{xAlign:n.xAlign||t.xAlign||tA(e,t,n,r),yAlign:r}}function nA(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function rA(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Ty(e,t,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=ms(o);let y=nA(t,a);const m=rA(t,l,u);return l==="center"?a==="left"?y+=u:a==="right"&&(y-=u):a==="left"?y-=Math.max(c,f)+i:a==="right"&&(y+=Math.max(d,h)+i),{x:An(y,0,r.width-t.width),y:An(m,0,r.height-t.height)}}function El(e,t,n){const r=Dt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Py(e){return Xn([],mr(e))}function iA(e,t,n){return gi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function jy(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const _b={beforeTitle:dr,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:dr,beforeBody:dr,beforeLabel:dr,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 tt(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:dr,afterBody:dr,beforeFooter:dr,footer:dr,afterFooter:dr};function Ht(e,t,n,r){const i=e[t].call(n,r);return typeof i=="undefined"?_b[t].call(n,r):i}class Jd extends ts{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 ab(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=iA(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Ht(r,"beforeTitle",this,t),s=Ht(r,"title",this,t),o=Ht(r,"afterTitle",this,t);let a=[];return a=Xn(a,mr(i)),a=Xn(a,mr(s)),a=Xn(a,mr(o)),a}getBeforeBody(t,n){return Py(Ht(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return et(t,s=>{const o={before:[],lines:[],after:[]},a=jy(r,s);Xn(o.before,mr(Ht(a,"beforeLabel",this,s))),Xn(o.lines,Ht(a,"label",this,s)),Xn(o.after,mr(Ht(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(t,n){return Py(Ht(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Ht(r,"beforeFooter",this,t),s=Ht(r,"footer",this,t),o=Ht(r,"afterFooter",this,t);let a=[];return a=Xn(a,mr(i)),a=Xn(a,mr(s)),a=Xn(a,mr(o)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(ZE(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),et(a,c=>{const d=jy(t.callbacks,c);i.push(Ht(d,"labelColor",this,c)),s.push(Ht(d,"labelPointStyle",this,c)),o.push(Ht(d,"labelTextColor",this,c))}),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=Bo[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=Ey(this,r),u=Object.assign({},a,l),c=Ay(this.chart,r,u),d=Ty(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.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:u,bottomLeft:c,bottomRight:d}=ms(a),{x:f,y:h}=t,{width:y,height:m}=n;let p,v,b,S,C,x;return s==="center"?(C=h+m/2,i==="left"?(p=f,v=p-o,S=C+o,x=C-o):(p=f+y,v=p+o,S=C-o,x=C+o),b=p):(i==="left"?v=f+Math.max(l,c)+o:i==="right"?v=f+y-Math.max(u,d)-o:v=this.caretX,s==="top"?(S=h,C=S-o,p=v-o,b=v+o):(S=h+m,C=S+o,p=v+o,b=v-o),x=S),{x1:p,x2:v,x3:b,y1:S,y2:C,y3:x}}drawTitle(t,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=ps(r.rtl,this.x,this.width);for(t.x=El(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=bt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.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:u}=s,c=bt(s.bodyFont),d=El(this,"left",s),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,y=n.y+h;if(s.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},p=i.leftForLtr(f,u)+u/2,v=y+l/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,Wd(t,m,p,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Wd(t,m,p,v)}else{t.lineWidth=Ue(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,u),p=i.leftForLtr(i.xPlus(f,1),u-2),v=ms(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,gu(t,{x:m,y,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),gu(t,{x:p,y:y+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(m,y,u,l),t.strokeRect(m,y,u,l),t.fillStyle=o.backgroundColor,t.fillRect(p,y+1,u-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:u,boxPadding:c}=r,d=bt(r.bodyFont);let f=d.lineHeight,h=0;const y=ps(r.rtl,this.x,this.width),m=function(_){n.fillText(_,y.x(t.x+h),t.y+f/2),t.y+=f+s},p=y.textAlign(o);let v,b,S,C,x,k,w;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=El(this,p,r),n.fillStyle=r.bodyColor,et(this.beforeBody,m),h=a&&p!=="right"?o==="center"?u/2+c:u+2+c:0,C=0,k=i.length;C<k;++C){for(v=i[C],b=this.labelTextColors[C],n.fillStyle=b,et(v.before,m),S=v.lines,a&&S.length&&(this._drawColorBox(n,t,C,y,r),f=Math.max(d.lineHeight,l)),x=0,w=S.length;x<w;++x)m(S[x]),f=d.lineHeight;et(v.after,m)}h=0,f=d.lineHeight,et(this.afterBody,m),t.y-=s}drawFooter(t,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=ps(r.rtl,this.x,this.width);for(t.x=El(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=bt(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:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:y}=ms(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+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&s==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+u,l+c-y),n.quadraticCurveTo(a+u,l+c,a+u-y,l+c),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-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=Bo[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Ey(this,t),l=Object.assign({},o,this._size),u=Ay(n,t,l),c=Ty(t,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_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=Dt(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),tb(t,n.textDirection),s.y+=o.top,this.drawTitle(s,t,n),this.drawBody(s,t,n),this.drawFooter(s,t,n),nb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!uu(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||!uu(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=Bo[s.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}be(Jd,"positioners",Bo);var sA={id:"tooltip",_element:Jd,positioners:Bo,afterInit(e,t,n){n&&(e.tooltip=new Jd({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:_b},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 oA=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function aA(e,t,n,r){const i=e.indexOf(t);if(i===-1)return oA(e,t,n,r);const s=e.lastIndexOf(t);return i!==s?n:i}const lA=(e,t)=>e===null?null:An(Math.round(e),0,t);function My(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ef extends uo{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(tt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:aA(r,t,Be(n,t),this._addedLabels),lA(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 My.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}}be(ef,"id","category"),be(ef,"defaults",{ticks:{callback:My}});function uA(e,t){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=s||1,y=c-1,{min:m,max:p}=t,v=!tt(o),b=!tt(a),S=!tt(u),C=(p-m)/(d+1);let x=$g((p-m)/y/h)*h,k,w,_,O;if(x<1e-14&&!v&&!b)return[{value:m},{value:p}];O=Math.ceil(p/x)-Math.floor(m/x),O>y&&(x=$g(O*x/y/h)*h),tt(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),i==="ticks"?(w=Math.floor(m/x)*x,_=Math.ceil(p/x)*x):(w=m,_=p),v&&b&&s&&P9((a-o)/s,x/1e3)?(O=Math.round(Math.min((a-o)/x,c)),x=(a-o)/O,w=o,_=a):S?(w=v?o:w,_=b?a:_,O=u-1,x=(_-w)/O):(O=(_-w)/x,Yo(O,Math.round(O),x/1e3)?O=Math.round(O):O=Math.ceil(O));const A=Math.max(Lg(x),Lg(w));k=Math.pow(10,tt(l)?A:l),w=Math.round(w*k)/k,_=Math.round(_*k)/k;let T=0;for(v&&(f&&w!==o?(n.push({value:o}),w<o&&T++,Yo(Math.round((w+T*x)*k)/k,o,$y(o,C,e))&&T++):w<o&&T++);T<O;++T){const j=Math.round((w+T*x)*k)/k;if(b&&j>a)break;n.push({value:j})}return b&&f&&_!==a?n.length&&Yo(n[n.length-1].value,a,$y(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!b||_===a)&&n.push({value:_}),n}function $y(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 tf extends uo{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 tt(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=Xs(i),u=Xs(s);l<0&&u<0?a(0):l>0&&u>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=uA(i,s);return t.bounds==="ticks"&&j9(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 V2(t,this.chart.options.locale,this.options.ticks.format)}}class nf extends tf{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=St(t)?t:0,this.max=St(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}}be(nf,"id","linear"),be(nf,"defaults",{ticks:{callback:Jf.formatters.numeric}});function rf(e){const t=e.ticks;if(t.display&&e.display){const n=Dt(t.backdropPadding);return Be(t.font&&t.font.size,yt.font.size)+n.height}return 0}function cA(e,t,n){return n=ft(n)?n:[n],{w:J9(e,t.string,n),h:n.length*t.lineHeight}}function Ly(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 dA(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?pt/s:0;for(let l=0;l<s;l++){const u=o.setContext(e.getPointLabelContext(l));i[l]=u.padding;const c=e.getPointPosition(l,e.drawingArea+i[l],a),d=bt(u.font),f=cA(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=hn(e.getIndexAngle(l)+a),y=Math.round(Qf(h)),m=Ly(y,c.x,f.w,0,180),p=Ly(y,c.y,f.h,90,270);fA(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=yA(e,r,i)}function fA(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 hA(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:s,padding:o,size:a}=n,l=e.getPointPosition(t,r+i+o,s),u=Math.round(Qf(hn(l.angle+mn))),c=vA(l.y,a.h,u),d=mA(u),f=pA(l.x,a.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+a.w,bottom:c+a.h}}function gA(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:s}=e;return!(Cr({x:n,y:r},t)||Cr({x:n,y:s},t)||Cr({x:i,y:r},t)||Cr({x:i,y:s},t))}function yA(e,t,n){const r=[],i=e._pointLabels.length,s=e.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:rf(s)/2,additionalAngle:o?pt/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=t[c];const d=hA(e,c,l);r.push(d),a==="auto"&&(d.visible=gA(d,u),d.visible&&(u=d))}return r}function mA(e){return e===0||e===180?"center":e<180?"left":"right"}function pA(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function vA(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function bA(e,t,n){const{left:r,top:i,right:s,bottom:o}=n,{backdropColor:a}=t;if(!tt(a)){const l=ms(t.borderRadius),u=Dt(t.backdropPadding);e.fillStyle=a;const c=r-u.left,d=i-u.top,f=s-r+u.width,h=o-i+u.height;Object.values(l).some(y=>y!==0)?(e.beginPath(),gu(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function xA(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));bA(n,o,s);const a=bt(o.font),{x:l,y:u,textAlign:c}=s;Vi(n,e._pointLabels[i],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function kb(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,pn);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 wA(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(),kb(e,n,o,r),s.closePath(),s.stroke(),s.restore())}function SA(e,t,n){return gi(e,{label:n,index:t,type:"pointLabel"})}class qo extends tf{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=Dt(rf(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=St(t)&&!isNaN(t)?t:0,this.max=St(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/rf(this.options))}generateTickLabels(t){tf.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=at(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?dA(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=pn/(this._pointLabels.length||1),r=this.options.startAngle||0;return hn(t*n+Jr(r))}getDistanceFromCenterForValue(t){if(tt(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(tt(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 SA(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-mn+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(),kb(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,u;if(n.pointLabels.display&&xA(this,o),i.display&&this.ticks.forEach((c,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),y=s.setContext(f);wA(this,h,l,o,y)}}),r.display){for(t.save(),a=o-1;a>=0;a--){const c=r.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),u=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.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 u=r.setContext(this.getContext(l)),c=bt(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,o=t.measureText(a.label).width,t.fillStyle=u.backdropColor;const d=Dt(u.backdropPadding);t.fillRect(-o/2-d.left,-s-c.size/2-d.top,o+d.width,c.size+d.height)}Vi(t,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}be(qo,"id","radialLinear"),be(qo,"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}}),be(qo,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),be(qo,"descriptors",{angleLines:{_fallback:"grid"}});const nc={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}},Vt=Object.keys(nc);function Dy(e,t){return e-t}function Iy(e,t){if(tt(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)),St(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(ba(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Ry(e,t,n,r){const i=Vt.length;for(let s=Vt.indexOf(e);s<i-1;++s){const o=nc[Vt[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Vt[s]}return Vt[i-1]}function CA(e,t,n,r,i){for(let s=Vt.length-1;s>=Vt.indexOf(n);s--){const o=Vt[s];if(nc[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return Vt[n?Vt.indexOf(n):0]}function _A(e){for(let t=Vt.indexOf(e)+1,n=Vt.length;t<n;++t)if(nc[Vt[t]].common)return Vt[t]}function Ny(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Yf(n,t),s=n[r]>=t?n[r]:n[i];e[s]=!0}}function kA(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 Fy(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:kA(e,r,i,n)}class pu extends uo{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 oO._date(t.adapters.date);i.init(n),Qo(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:Iy(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(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=St(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=St(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=I9(i,s,o);return this._unit=n.unit||(r.autoSkip?Ry(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):CA(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:_A(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),Fy(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=An(n,0,o),r=An(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||Ry(s.minUnit,n,r,this._getLabelCapacity(n)),a=Be(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=ba(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"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 y=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)Ny(c,f,y);return(f===r||i.bounds==="ticks"||h===1)&&Ny(c,f,y),Object.keys(c).sort(Dy).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 at(o,[t,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}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,Fy(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(Iy(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return N9(t.sort(Dy))}}be(pu,"id","time"),be(pu,"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 Al(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}=Ei(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}=Ei(e,"time",t)),{time:s,pos:a}=e[r],{time:o,pos:l}=e[i]);const u=o-s;return u?a+(l-a)*(t-s)/u:a}class By extends pu{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=Al(n,this.min),this._tableRange=Al(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,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(Al(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Al(this._table,r*this._tableRange+this._minPos,!0)}}be(By,"id","timeseries"),be(By,"defaults",pu.defaults);const Ob="label";function qy(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function OA(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Eb(e,t){e.labels=t}function Ab(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ob;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 EA(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ob;const n={labels:[],datasets:[]};return Eb(n,e.labels),Ab(n,e.datasets,t),n}function AA(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=F.useRef(null),y=F.useRef(null),m=()=>{h.current&&(y.current=new ec(h.current,{type:o,data:EA(a,s),options:l&&{...l},plugins:u}),qy(t,y.current))},p=()=>{qy(t,null),y.current&&(y.current.destroy(),y.current=null)};return F.useEffect(()=>{!i&&y.current&&l&&OA(y.current,l)},[i,l]),F.useEffect(()=>{!i&&y.current&&Eb(y.current.config.data,a.labels)},[i,a.labels]),F.useEffect(()=>{!i&&y.current&&a.datasets&&Ab(y.current.config.data,a.datasets,s)},[i,a.datasets]),F.useEffect(()=>{y.current&&(i?(p(),setTimeout(m)):y.current.update(d))},[i,l,a.labels,a.datasets,d]),F.useEffect(()=>{y.current&&(p(),setTimeout(m))},[o]),F.useEffect(()=>(m(),()=>p()),[]),F.createElement("canvas",{ref:h,role:"img",height:n,width:r,...f},c)}const TA=F.forwardRef(AA);function Tb(e,t){return ec.register(t),F.forwardRef((n,r)=>F.createElement(TA,{...n,ref:r,type:e}))}const PA=Tb("line",zl),jA=Tb("radar",Hl);ec.register(ef,nf,qo,ei,Kl,HE,XE,sA,QE);var sf={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}},MA=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 zy(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 Hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zy(Object(n),!0).forEach(function(r){$A(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $A(e,t,n){return(t=LA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LA(e){var t=DA(e,"string");return eo(t)=="symbol"?t:t+""}function DA(e,t){if(eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eo(e){"@babel/helpers - typeof";return eo=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},eo(e)}function IA(e){var t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleString("en-US",{month:"short",day:"numeric"})}var RA=function(){var t,n,r,i,s=hi(),o=s.data,a=s.isLoading,l=s.isRefetching,u=o==null?void 0:o.mentions,c=u==null||(t=u.mentionedInNumberOfQueries)===null||t===void 0||(t=t.previous)===null||t===void 0?void 0:t.difference,d=u==null?void 0:u.chart,f=Array.isArray(d==null?void 0:d.labels)?d.labels:d!=null&&d.labels&&eo(d.labels)==="object"?Object.values(d.labels):[],h=f.map(function(v){return IA(String(v))}),y=o==null?void 0:o.numberOfQueries;if(!y){var m=0;Array.isArray(d==null?void 0:d.datasets)&&d.datasets.forEach(function(v){Array.isArray(v==null?void 0:v.data)&&v.data.forEach(function(b){typeof b=="number"&&b>m&&(m=b)})}),y=m+2}var p=Hy(Hy({},sf),{},{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:y,ticks:{stepSize:1}}}});return g.jsx(E.Card,{className:"yst-overflow-visible",children:g.jsxs(E.Card.Content,{className:"yst-space-y-4",children:[g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(Qa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),g.jsx(Wa,{score:u==null||(n=u.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value,total:o==null?void 0:o.numberOfQueries,delta:c,deltaSuffix:"since last analysis",suffix:"queries",isLoading:a||l})]}),Array.isArray(d==null||(r=d.datasets)===null||r===void 0?void 0:r.data)&&(d==null||(i=d.datasets)===null||i===void 0?void 0:i.data.length)<2?g.jsx(E.Alert,{variant:"info",children:"One more analysis needed to show more insights."}):g.jsx("div",{className:"yst-h-72",children:g.jsx(PA,{data:function(){var v={labels:h,datasets:[d==null?void 0:d.datasets]};return v}(),options:p})})]})})};function Tl(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,u=l===void 0?!1:l,c=e.delta,d=e.tooltipPosition,f=d===void 0?"left":d;return g.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",u&&"yst-border-r yst-border-slate-200",s),children:[g.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),g.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof c=="number"&&g.jsxs("p",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",ca(c)),children:[c>0?g.jsx(C2,{}):c<0?g.jsx(S2,{}):null,c>-1e-6&&"+",c]}),i&&g.jsx(Hf,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",position:f,children:i})]})}function NA(e){var t=e.children,n=e.className;return g.jsx("div",{className:ke("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:t})}function FA(e){return e>0?"yst-text-green-600":e<0?"yst-text-red-600":"yst-text-slate-500"}function BA(e){var t=e.current,n=e.previous,r=e.className;if(typeof n!="number")return null;var i=t-n,s=i>0,o=i<0,a="".concat(i>0?"+":"").concat(i.toFixed(1),"%");return g.jsxs("div",{className:ke("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",FA(i),r),"aria-label":s?"Visibility increased by ".concat(a):o?"Visibility decreased by ".concat(a):"No change in visibility",children:[s&&g.jsx(C2,{className:"yst-w-4 yst-h-4"}),o&&g.jsx(S2,{className:"yst-w-4 yst-h-4"}),a]})}function wa(e){"@babel/helpers - typeof";return wa=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},wa(e)}function qA(e,t){return GA(e)||UA(e,t)||HA(e,t)||zA()}function zA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
70
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HA(e,t){if(e){if(typeof e=="string")return Uy(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)?Uy(e,t):void 0}}function Uy(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 UA(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function GA(e){if(Array.isArray(e))return e}function Gy(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?Gy(Object(n),!0).forEach(function(r){KA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KA(e,t,n){return(t=VA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VA(e){var t=WA(e,"string");return wa(t)=="symbol"?t:t+""}function WA(e,t){if(wa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QA(){var e,t,n,r,i,s,o,a,l,u,c,d,f,h,y,m,p,v,b,S,C,x,k,w,_=Gn(),O=_.brandId,A=_.analysisId,T=qu(O,A,{query:{select:function(Ke){var ee=Ke.data;return ee},enabled:!!O&&!!A}}),j=T.data,B=T.isLoading,R=j==null||(e=j.analysis)===null||e===void 0?void 0:e.scans,P=Array.isArray(R)&&R.length>0?R.reduce(function(ze,Ke){if(!ze)return Ke;if(!(Ke!=null&&Ke.finishedAt)||!(ze!=null&&ze.finishedAt))return ze;var ee=new Date(Ke.finishedAt),$e=new Date(ze.finishedAt);return ee>$e?Ke:ze},R[0]):void 0,M=P==null||(t=P.scores)===null||t===void 0?void 0:t.standardized,I=(n=P==null||(r=P.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value)!==null&&n!==void 0?n:0,G=P==null||(i=P.mentions)===null||i===void 0||(i=i.mentionedInNumberOfQueries)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,Y=(s=P==null||(o=P.scores)===null||o===void 0||(o=o.standardized)===null||o===void 0||(o=o.citations)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:0,q=(a=P==null||(l=P.citations)===null||l===void 0||(l=l.total)===null||l===void 0?void 0:l.value)!==null&&a!==void 0?a:0,U=P==null||(u=P.citations)===null||u===void 0||(u=u.total)===null||u===void 0||(u=u.previous)===null||u===void 0?void 0:u.difference,z=P==null||(c=P.rankings)===null||c===void 0||(c=c.list)===null||c===void 0?void 0:c.find(function(ze){var Ke;return((Ke=ze.brand)===null||Ke===void 0?void 0:Ke.isSelf)===!0}),V=(d=z==null||(f=z.rank)===null||f===void 0?void 0:f.value)!==null&&d!==void 0?d:"—",N=z==null||(h=z.rank)===null||h===void 0||(h=h.previous)===null||h===void 0?void 0:h.difference;N&&(N=N*-1);var ne=(y=M==null||(m=M.visibility)===null||m===void 0?void 0:m.value)!==null&&y!==void 0?y:0,J=M==null||(p=M.visibility)===null||p===void 0||(p=p.previous)===null||p===void 0?void 0:p.value,he=(v=M==null||(b=M.ranking)===null||b===void 0?void 0:b.value)!==null&&v!==void 0?v:0,X=(S=M==null||(C=M.sentiment)===null||C===void 0?void 0:C.value)!==null&&S!==void 0?S:0,ge=(x=M==null||(k=M.mentions)===null||k===void 0?void 0:k.value)!==null&&x!==void 0?x:0,ye={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[ge,he,Y,X],backgroundColor:MA,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},je=Pl(Pl({},sf),{},{plugins:Pl(Pl({},sf.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(Ke){var ee=Ke.label||"",$e=Ke.parsed.r||0;return"".concat(ee,": ").concat($e,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}}),se=F.useState(typeof window!="undefined"&&window.innerWidth<800?"top":"left"),nt=qA(se,2),Ie=nt[0],st=nt[1];return F.useEffect(function(){function ze(){st(window.innerWidth<800?"top":"left")}return window.addEventListener("resize",ze),function(){return window.removeEventListener("resize",ze)}},[]),g.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:g.jsxs(E.Card.Content,{children:[g.jsx(E.Title,{size:"3",className:"yst-mb-2",children:"AI Visibility Index (AIVI)"}),g.jsx(Wa,{score:ne,total:100,isLoading:B}),g.jsx(BA,{current:ne,previous:J,className:"yst-mb-4"}),g.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:[g.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:[g.jsx(jA,{data:ye,options:je}),g.jsx(Hf,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",position:"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."})]}),g.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:g.jsxs(NA,{children:[g.jsx(Tl,{value:I,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:G,tooltipPosition:Ie}),g.jsx(Tl,{value:typeof V=="number"&&Number.isFinite(V)&&V>0?g.jsxs(g.Fragment,{children:["#",V,V===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:N}),g.jsx(Tl,{value:q,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:U,tooltipPosition:Ie}),g.jsx(Tl,{value:X?"".concat(X,"%"):"—",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||(w=P.scores)===null||w===void 0||(w=w.standardized)===null||w===void 0||(w=w.sentiment)===null||w===void 0||(w=w.previous)===null||w===void 0?void 0:w.difference})]})})]})]})})}const YA="data:image/svg+xml,%3csvg%20width='17'%20height='17'%20viewBox='0%200%2017%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.652%2015.0488C2.3816%2015.0488%201.348%2014.0152%201.348%2012.7448V5.22476C1.348%203.95436%202.3816%202.92075%203.652%202.92075H9.5912L9.9304%202.07275H3.652C1.9144%202.07275%200.5%203.48716%200.5%205.22476V12.7448C0.5%2014.4824%201.9144%2015.8968%203.652%2015.8968H3.6776V15.0488H3.652Z'%20fill='%23A61E69'/%3e%3cpath%20d='M16.5%205.22468C16.5%203.74948%2015.4824%202.51428%2014.1096%202.17188L13.812%202.97188C14.8584%203.18628%2015.6488%204.11748%2015.6488%205.22788V15.0519H9.16236C9.00236%2015.3527%208.83276%2015.6375%208.65356%2015.8999H16.4968V5.22468H16.5Z'%20fill='%23A61E69'/%3e%3cpath%20d='M11.5815%200.140137L8.03267%209.99614L6.28867%204.53374H4.15747L6.82307%2011.3785C7.06947%2012.0121%207.06947%2012.7129%206.82307%2013.3497C6.56387%2014.0121%206.10627%2014.8025%204.82947%2015.0361L4.77187%2015.0457V16.8633H4.84547C5.91107%2016.8185%206.73667%2016.4665%207.44387%2015.7561C8.16387%2015.0329%208.78147%2013.9065%209.38947%2012.2137L13.8919%200.140137H11.5815Z'%20fill='%23A61E69'/%3e%3c/svg%3e";var XA=function(){var t,n=hi(),r=n.data,i=n.isLoading,s=n.isRefetching;return i&&!s||(r==null||(t=r.mentions)===null||t===void 0||(t=t.mentionedInNumberOfQueries)===null||t===void 0?void 0:t.value)!==0?null:g.jsx(E.Card,{className:"yst-overflow-visible md:yst-col-span-2 yst-text-slate-800",children:g.jsxs(E.Card.Content,{className:"yst-space-y-4 yst-max-w-2xl",children:[g.jsx(E.Title,{size:"3",children:"We couldn’t find your brand in this brand analysis..."}),g.jsx("p",{children:"This means LLMs may not yet be surfacing your site in answers. Don’t worry, here are some steps you can take today to boost your AI visibility:"}),g.jsxs("ol",{className:"yst-list-decimal yst-ml-5 [&>li::marker]:yst-font-semibold ",children:[g.jsxs("li",{children:[g.jsx("strong",{children:"Activate llms.txt →"})," ",g.jsx("a",{href:"https://yoast.com/features/llms-txt/",target:"_blank",rel:"noopener noreferrer",children:"Set up llms.txt in Yoast SEO"}),"."," ","Make sure AI systems know where to look and which pages matter most."]}),g.jsxs("li",{children:[g.jsx("strong",{children:"Adopt an LLM-friendly content structure →"})," ",g.jsx("a",{href:"https://yoast.com/yoast-seo-premium-september-9-2025/",target:"_blank",rel:"noopener noreferrer",children:"See how in our latest update"}),". Start with clear definitions or TL;DRs, use subheadings, and format answers so LLMs can lift them directly."]}),g.jsxs("li",{children:[g.jsx("strong",{children:"Simplify writing and readability →"})," ","Use shorter sentences, plain language, and one idea per paragraph. This makes it easier for AI systems to recognize and quote your content."]})]}),g.jsxs("p",{children:["Want to go deeper? →"," ",g.jsx("a",{href:"https://yoast.com/how-to-optimize-content-for-llms/",target:"_blank",rel:"noopener noreferrer",children:"Read our full guide on optimizing content for LLMs"}),"."]})]})})};function ZA(e,t){return nT(e)||tT(e,t)||eT(e,t)||JA()}function JA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
71
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eT(e,t){if(e){if(typeof e=="string")return Ky(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)?Ky(e,t):void 0}}function Ky(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 tT(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function nT(e){if(Array.isArray(e))return e}var Qc=function(){var t=Gn(),n=t.brandId,r=t.analysisId,i=es({query:{select:function(_){var O=_.data;return O==null?void 0:O.brands}}}),s=i.data,o=i.isLoading,a=qu(n,r,{query:{enabled:!!n&&J6(r),select:function(_){var O=_.data;return O==null?void 0:O.analysis}}}),l=a.data,u=a.isLoading,c=l==null?void 0:l.status,d=o||u,f=s&&(s==null?void 0:s.length)>0,h=!d&&l&&c===qr.completed,y=F.useState(!1),m=ZA(y,2),p=m[0],v=m[1],b=F.useRef(null),S=F.useRef(void 0),C=localStorage.getItem("yst_congratulations_toast_seen")==="true";F.useEffect(function(){return h&&!S.current&&!C&&(b.current=setTimeout(function(){v(!0),localStorage.setItem("yst_congratulations_toast_seen","true")},1e4)),!h&&S.current&&(v(!1),b.current&&(clearTimeout(b.current),b.current=null)),S.current=h,function(){b.current&&(clearTimeout(b.current),b.current=null)}},[h,C]);function x(w){var _=w.children;if(typeof window=="undefined")return null;var O=document.getElementById("tsx-toasts");return O?Ap.createPortal(_,O):null}var k=function(_){var O=_.isVisible,A=_.setIsVisible,T=function(){A(!1)};return g.jsxs(E.Toast,{id:"toast",isVisible:O,setIsVisible:function(j){j||A(!1)},children:[g.jsxs("div",{className:"yst-mb-3 yst-flex yst-items-start yst-gap-3",children:[g.jsx("img",{src:YA}),g.jsxs("div",{className:"yst-grow",children:[g.jsx(E.Title,{size:"3",className:"yst-mb-1",children:"Congratulations on your first analysis!"}),"You’ve completed your brand analysis. We’d love to hear what you think."]}),g.jsx(E.Button,{variant:"tertiary",onClick:T,children:g.jsx(O2,{})})]}),g.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-4",children:[g.jsx(E.Button,{variant:"tertiary",onClick:T,children:"Dismiss"}),g.jsxs(E.Button,{as:"a",href:"https://www.surveymonkey.com/r/HGSB8DL",target:"_blank",children:["Give feedback",g.jsx(k2,{className:"yst-ml-2"})]})]})]})};return o?g.jsx(Gu,{}):f?g.jsxs("div",{className:"yst-space-y-4",children:[g.jsx(Q7,{}),h&&g.jsxs("div",{className:"yst-space-y-4",children:[g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[g.jsx(E.Title,{size:"2",children:"Your brand analysis"}),g.jsxs(E.Button,{as:di,variant:"secondary",to:"/brands/".concat(n,"/brand-list"),className:ke("yst-gap-1.5"),disabled:!n,children:[g.jsx(b2,{})," Edit brand list"]})]}),g.jsxs("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:[g.jsx(XA,{}),g.jsx(QA,{}),g.jsx(Y7,{}),g.jsx(RA,{}),g.jsx(r8,{}),g.jsx(X_,{}),g.jsx(I_,{}),g.jsx(i8,{})]}),g.jsx(x,{children:g.jsx(k,{isVisible:p,setIsVisible:v})})]})]}):g.jsx(x_,{})};function Pb(e){var t=e.children,n=e.description,r=e.title;return g.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&&g.jsx(E.Title,{className:ke({"yst-mb-3":n||t}),children:r}),n&&g.jsx("p",{children:n}),t]})}var rT=function(){return g.jsx(E.Card,{className:"yst-mb-4",children:g.jsxs(E.Card.Content,{className:"yst-flex yst-flex-col yst-gap-8",children:[g.jsx(E.Title,{size:"2",children:"Query - Best fish restaurant in Nijmegen"}),g.jsxs("div",{children:[g.jsx("p",{children:"AI Response:"}),g.jsx(E.Link,{href:"#todo",children:"Show more"})]}),g.jsxs("div",{children:[g.jsx("p",{children:"Extracted brands:"}),g.jsx(E.Badge,{children:"Example"}),g.jsx(E.Badge,{children:"Example"}),g.jsx(E.Badge,{children:"Example"}),g.jsx(E.Badge,{children:"Example"}),g.jsx(E.Badge,{children:"Example"})]}),g.jsxs(E.Table,{children:[g.jsx(E.Table.Head,{children:g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Header,{children:"URL"}),g.jsx(E.Table.Header,{children:"Associated brand"})]})}),g.jsxs(E.Table.Body,{children:[g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Cell,{children:g.jsx(E.Link,{href:"https://example.com",target:"_blank",children:"https://example.com"})}),g.jsx(E.Table.Cell,{children:"Example Brand"})]}),g.jsxs(E.Table.Row,{children:[g.jsx(E.Table.Cell,{children:g.jsx(E.Link,{href:"https://example2.com",target:"_blank",children:"https://example2.com"})}),g.jsx(E.Table.Cell,{children:"Example Brand 2"})]})]})]})]})})},iT=function(){return g.jsxs(E.Card,{children:[g.jsx(Pb,{title:"Query history"}),g.jsx(E.Card,{className:"yst-mb-4",children:g.jsxs(E.Card.Content,{children:[g.jsxs("p",{className:"yst-mb-8",children:["Manna Fish Restaurant - Analysis performed on:"," ",g.jsx(E.Badge,{children:"2025-04-08 12:31:21"})]}),[0,1,2,3,4].map(function(t){return g.jsx(rT,{},t)})]})})]})},sT=F.lazy(function(){return Promise.resolve().then(()=>yD)}),oT=F.lazy(function(){return Promise.resolve().then(()=>HD)}),aT=F.lazy(function(){return Promise.resolve().then(()=>KD)}),lT=F.lazy(function(){return Promise.resolve().then(()=>oI)}),uT=F.lazy(function(){return Promise.resolve().then(()=>_I)}),cT=F.lazy(function(){return Promise.resolve().then(()=>PI)}),dT=new u3({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),fr=function(){return g.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:g.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[g.jsx(E.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},fT=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 g.jsx(yw,{children:g.jsxs(At,{element:g.jsx(F6,{hideNav:r,disableLayout:s,DebugInfo:o}),children:[g.jsxs(At,{path:"/",element:g.jsx(Ws,{}),children:[g.jsx(At,{index:!0,element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"AI Brand Insights"}),g.jsx(Qc,{})]})}),g.jsxs(At,{path:"brands/:brandId",element:g.jsx(q0,{}),children:[g.jsx(At,{index:!0,element:g.jsx(Qc,{})}),g.jsx(At,{path:"brand-list",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Brands - AI Brand Insights"}),g.jsx(sT,{})]})}),g.jsx(At,{path:"analysis/:analysisId",element:g.jsx(B6,{}),children:g.jsx(At,{index:!0,element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Analysis - AI Brand Insights"}),g.jsx(Qc,{})]})})})]}),g.jsxs(At,{path:"/setup",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Setup brand - AI Brand Insights"}),g.jsx(aT,{})]}),children:[g.jsx(At,{index:!0,element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"AI Brand Insights"}),g.jsx(lT,{})]})}),g.jsxs(At,{path:":brandId",element:g.jsx(q0,{}),children:[g.jsx(At,{path:"queries",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Setup queries - AI Brand Insights"}),g.jsx(uT,{})]})}),g.jsx(At,{path:"analysis",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Analysis - AI Brand Insights"}),g.jsx(cT,{})]})})]})]})]}),g.jsx(At,{path:"/settings",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Settings - AI Brand Insights"}),g.jsx(oT,{})]})}),g.jsx(At,{path:"/query-history",element:g.jsxs(F.Suspense,{fallback:g.jsx(fr,{}),children:[g.jsx(cr,{title:"Query history - AI Brand Insights"}),g.jsx(iT,{})]})}),!1]})})},hT=function(t){var n=t.DebugInfo,r=t.hostAppProps;return g.jsxs(g3,{client:dT,children:[g.jsx(Q6,{children:g.jsxs(q4,{hostAppProps:r,children:[g.jsx(fT,{DebugInfo:n}),g.jsx(Y6,{})]})}),g.jsx(tC,{initialIsOpen:!1})]})};function gT(e){var t=e.subpath,n=t===void 0?"/":t,r=e.onNavigate,i=xn(),s=qt(),o=F.useRef(n),a=F.useRef(null),l=F.useRef(!1),u="".concat(s.pathname).concat(s.search).concat(s.hash),c=F.useCallback(r,[r]);return F.useEffect(function(){if(n===u){o.current=n;return}l.current||n!==o.current&&(o.current=n,a.current=n,l.current=!0,i(n,{replace:!0}),setTimeout(function(){l.current=!1},10))},[n,u,i]),F.useEffect(function(){l.current||u!==n&&u!==a.current&&(a.current=u,c(u))},[u,n,c]),null}function yT(e,t){return bT(e)||vT(e,t)||pT(e,t)||mT()}function mT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
72
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pT(e,t){if(e){if(typeof e=="string")return Vy(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)?Vy(e,t):void 0}}function Vy(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 vT(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function bT(e){if(Array.isArray(e))return e}var xT=function(t){var n=t.isRtl,r=n===void 0?!1:n,i=t.className,s=t.style,o=t.token,a=o===void 0?"":o,l=t.apiUrl,u=t.DebugInfo,c=t.basename,d=c===void 0?"/":c,f=t.subpath,h=f===void 0?"/":f,y=t.onNavigate,m=y===void 0?function(){}:y,p=t.onLogout,v=p===void 0?function(){}:p,b=t.onAddSubscription,S=b===void 0?function(){}:b,C=function(T,j){var B=T.endsWith("/")?T.slice(0,-1):T,R=j.startsWith("/")?j:"/".concat(j);return B+R||"/"},x=F.useState(!!(a||l)),k=yT(x,2),w=k[0],_=k[1],O={onAddSubscription:S,onLogout:v,onNavigate:m,DebugInfo:u,basename:d,subpath:h};return F.useEffect(function(){l&&f2(l),N5(typeof a!="function"?function(){return a}:a),_(!1)},[l,a]),w?g.jsx("div",{className:i,style:s,children:g.jsx(E.Spinner,{})}):g.jsx("div",{className:i,style:s,children:g.jsxs(hw,{initialEntries:[C(d,h)],basename:d||"/",children:[g.jsx(gT,{subpath:h,onNavigate:m}),g.jsx(E.Root,{context:{isRtl:r},children:g.jsx(hT,{DebugInfo:u,hostAppProps:O})})]})})},wT=e=>e!=null,ST=e=>e.filter(wT);function CT(e){return(...t)=>{for(const n of e)n&&n(...t)}}var Z=e=>typeof e=="function"&&!e.length?e():e,of=e=>Array.isArray(e)?e:e?[e]:[];function _T(e,...t){return typeof e=="function"?e(...t):e}var kT=Ce;function OT(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 ET(e){const[t,n]=ae(),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 y=o.get(h);y||(y=ae(void 0,{equals:!1}),o.set(h,y)),y[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,y)=>{const m=e!=null&&e.serializer?e.serializer(h,f,y!=null?y:e.options):h,p=`${s}${f}`;i.forEach(b=>{try{b.getItem(p)!==m&&b.setItem(p,m)}catch(S){r(S,`Error setting ${s}${f} to ${m} in ${b.name}`)}});const v=o.get(f);v&&v[1]()},u=f=>i.forEach(h=>{try{h.removeItem(`${s}${f}`)}catch(y){r(y,`Error removing ${s}${f} from ${h.name}`)}}),c=()=>i.forEach(f=>{try{f.clear()}catch(h){r(h,`Error clearing ${f.name}`)}}),d=()=>{const f={},h=(y,m)=>{if(!f.hasOwnProperty(y)){const p=m&&(e!=null&&e.deserializer)?e.deserializer(m,y,e.options):m;p&&(f[y]=p)}};return i.forEach(y=>{if(typeof y.getAll=="function"){let m;try{m=y.getAll()}catch(p){r(p,`Error getting all values from in ${y.name}`)}for(const p of m)h(p,m[p])}else{let m=0,p;try{for(;p=y.key(m++);)f.hasOwnProperty(p)||h(p,y.getItem(p))}catch(v){r(v,`Error getting all values from ${y.name}`)}}}),f};return(e==null?void 0:e.sync)!==!1&&Pr(()=>{const f=h=>{var m;let y=!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),y=!0)}catch(v){r(v,`Error synching api ${p.name} from storage event (${h.key}=${h.newValue})`)}}),y&&h.key&&((m=o.get(h.key))==null||m[1]())};"addEventListener"in globalThis?(globalThis.addEventListener("storage",f),Ce(()=>globalThis.removeEventListener("storage",f))):(i.forEach(h=>{var y;return(y=h.addEventListener)==null?void 0:y.call(h,"storage",f)}),Ce(()=>i.forEach(h=>{var y;return(y=h.removeEventListener)==null?void 0:y.call(h,"storage",f)})))}),[a,l,{clear:c,error:t,remove:u,toJSON:d}]}var jb=ET,AT=e=>(typeof e.clear=="function"||(e.clear=()=>{let t;for(;t=e.key(0);)e.removeItem(t)}),e),Wy=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},Sn=AT({_cookies:[globalThis.document,"cookie"],getItem:e=>{var t,n;return(n=(t=Sn._cookies[0][Sn._cookies[1]].match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)"))==null?void 0:t.pop())!=null?n:null},setItem:(e,t,n)=>{const r=Sn.getItem(e);Sn._cookies[0][Sn._cookies[1]]=`${e}=${t}${Wy(n)}`;const i=Object.assign(new Event("storage"),{key:e,oldValue:r,newValue:t,url:globalThis.document.URL,storageArea:Sn});window.dispatchEvent(i)},removeItem:e=>{Sn._cookies[0][Sn._cookies[1]]=`${e}=deleted${Wy({expires:new Date(0)})}`},key:e=>{let t=null,n=0;return Sn._cookies[0][Sn._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g,(r,i)=>(!t&&i&&n++===e&&(t=i),"")),t},get length(){let e=0;return Sn._cookies[0][Sn._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g,t=>(e+=t?1:0,"")),e}}),TT=1024,Wi=796,oh=700,PT="bottom-right",af="bottom",Mb="system",jT=!1,$b=500,MT=500,Lb=500,$T=Object.keys(Ad)[0],Qy=1,LT=Object.keys(Td)[0],ah=_t({client:void 0,onlineManager:void 0,queryFlavor:"",version:"",shadowDOMTarget:void 0});function ve(){return kt(ah)}var Db=_t(void 0),Ib=e=>{const[t,n]=ae(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="",rS(l.document),l.document.title="TanStack Query Devtools",l.document.body.style.margin="0",l.addEventListener("pagehide",()=>{e.setLocalStore("pip_open","false"),n(null)}),[...(ve().shadowDOMTarget||document).styleSheets].forEach(u=>{try{const c=[...u.cssRules].map(y=>y.cssText).join(""),d=document.createElement("style"),f=u.ownerNode;let h="";f&&"id"in f&&(h=f.id),h&&d.setAttribute("id",h),d.textContent=c,l.document.head.appendChild(d)}catch(c){const d=document.createElement("link");if(u.href==null)return;d.rel="stylesheet",d.type=u.type,d.media=u.media.toString(),d.href=u.href,l.document.head.appendChild(d)}}),Mu(["focusin","focusout","pointermove","keydown","pointerdown","pointerup","click","mousedown","input"],l.document),e.setLocalStore("pip_open","true"),n(l)};Se(()=>{var a;((a=e.localStore.pip_open)!=null?a:"false")==="true"&&!e.disabled&&i(Number(window.innerWidth),Number(e.localStore.height||MT))}),Se(()=>{const o=(ve().shadowDOMTarget||document).querySelector("#_goober"),a=t();if(o&&a){const l=new MutationObserver(()=>{const u=(ve().shadowDOMTarget||a.document).querySelector("#_goober");u&&(u.textContent=o.textContent)});l.observe(o,{childList:!0,subtree:!0,characterDataOldValue:!0}),Ce(()=>{l.disconnect()})}});const s=K(()=>{var o;return{pipWindow:t(),requestPipWindow:i,closePipWindow:r,disabled:(o=e.disabled)!=null?o:!1}});return L(Db.Provider,{value:s,get children(){return e.children}})},lh=()=>K(()=>{const t=kt(Db);if(!t)throw new Error("usePiPWindow must be used within a PiPProvider");return t()}),uh=_t(()=>"dark");function Ct(){return kt(uh)}var Rb={À:"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"},DT=Object.keys(Rb).join("|"),IT=new RegExp(DT,"g");function RT(e){return e.replace(IT,t=>Rb[t])}var Kt={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Yy(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Kt.MATCHES,!n.accessors){const o=Xy(e,t,n);return{rankedValue:e,rank:o,accessorIndex:-1,accessorThreshold:n.threshold,passed:o>=n.threshold}}const i=qT(e,n.accessors),s={rankedValue:e,rank:Kt.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let o=0;o<i.length;o++){const a=i[o];let l=Xy(a.itemValue,t,n);const{minRanking:u,maxRanking:c,threshold:d=n.threshold}=a.attributes;l<u&&l>=Kt.MATCHES?l=u:l>c&&(l=c),l=Math.min(l,c),l>=d&&l>s.rank&&(s.rank=l,s.passed=!0,s.accessorIndex=o,s.accessorThreshold=d,s.rankedValue=a.itemValue)}return s}function Xy(e,t,n){return e=Zy(e,n),t=Zy(t,n),t.length>e.length?Kt.NO_MATCH:e===t?Kt.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Kt.EQUAL:e.startsWith(t)?Kt.STARTS_WITH:e.includes(` ${t}`)?Kt.WORD_STARTS_WITH:e.includes(t)?Kt.CONTAINS:t.length===1?Kt.NO_MATCH:NT(e).includes(t)?Kt.ACRONYM:FT(e,t))}function NT(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(s=>{t+=s.substr(0,1)})}),t}function FT(e,t){let n=0,r=0;function i(l,u,c){for(let d=c,f=u.length;d<f;d++)if(u[d]===l)return n+=1,d+1;return-1}function s(l){const u=1/l,c=n/t.length;return Kt.MATCHES+c*u}const o=i(t[0],e,0);if(o<0)return Kt.NO_MATCH;r=o;for(let l=1,u=t.length;l<u;l++){const c=t[l];if(r=i(c,e,r),!(r>-1))return Kt.NO_MATCH}const a=r-o;return s(a)}function Zy(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=RT(e)),e}function BT(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 qT(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r],o=zT(s),a=BT(e,s);for(let l=0,u=a.length;l<u;l++)n.push({itemValue:a[l],attributes:o})}return n}var Jy={maxRanking:1/0,minRanking:-1/0};function zT(e){return typeof e=="function"?Jy:{...Jy,...e}}var HT={data:""},UT=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||HT,GT=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,KT=/\/\*[^]*?\*\/| +/g,em=/\n+/g,Ci=(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"?Ci(o,s):s+"{"+Ci(o,s[1]=="k"?"":t)+"}":typeof o=="object"?r+=Ci(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+=Ci.p?Ci.p(s,o):s+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},hr={},Nb=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Nb(e[n]);return t}return e},VT=(e,t,n,r,i)=>{let s=Nb(e),o=hr[s]||(hr[s]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(s));if(!hr[o]){let l=s!==e?e:(u=>{let c,d,f=[{}];for(;c=GT.exec(u.replace(KT,""));)c[4]?f.shift():c[3]?(d=c[3].replace(em," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(em," ").trim();return f[0]})(e);hr[o]=Ci(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let a=n&&hr.g?hr.g:null;return n&&(hr.g=hr[o]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(hr[o],t,r,a),o},WT=(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?"":Ci(a,""):a===!1?"":a}return r+i+(o==null?"":o)},"");function Re(e){let t=this||{},n=e.call?e(t.p):e;return VT(n.unshift?n.raw?WT(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,UT(t.target),t.g,t.o,t.k)}Re.bind({g:1});Re.bind({k:1});function Fb(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=Fb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ue(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Fb(e))&&(r&&(r+=" "),r+=t);return r}function QT(e,t){const n=ht(e),{onChange:r}=t;let i=new Set(t.appear?void 0:n);const s=new WeakSet,[o,a]=ae([],{equals:!1}),[l]=L3(),u=d=>{a(f=>(f.push.apply(f,d),f));for(const f of d)s.delete(f)},c=(d,f,h)=>d.splice(h,0,f);return K(d=>{const f=o(),h=e();if(h[Tu],ht(l))return l(),d;if(f.length){const y=d.filter(m=>!f.includes(m));return f.length=0,r({list:y,added:[],removed:[],unchanged:y,finishRemoved:u}),y}return ht(()=>{const y=new Set(h),m=h.slice(),p=[],v=[],b=[];for(const C of h)(i.has(C)?b:p).push(C);let S=!p.length;for(let C=0;C<d.length;C++){const x=d[C];y.has(x)||(s.has(x)||(v.push(x),s.add(x)),c(m,x,C)),S&&x!==m[C]&&(S=!1)}return!v.length&&S?d:(r({list:m,added:p,removed:v,unchanged:b,finishRemoved:u}),i=y,m)})},t.appear?[]:n.slice())}function zt(...e){return CT(e)}var tm=e=>e instanceof Element;function lf(e,t){if(t(e))return e;if(typeof e=="function"&&!e.length)return lf(e(),t);if(Array.isArray(e)){const n=[];for(const r of e){const i=lf(r,t);i&&(Array.isArray(i)?n.push.apply(n,i):n.push(i))}return n.length?n:null}return null}function YT(e,t=tm,n=tm){const r=K(e),i=K(()=>lf(r(),t));return i.toArray=()=>{const s=i();return Array.isArray(s)?s:s?[s]:[]},i}function XT(e){return K(()=>{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 Bb(e){requestAnimationFrame(()=>requestAnimationFrame(e))}function ZT(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())}),Bb(()=>{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 JT(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()),Bb(()=>{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 nm=e=>{const t=XT(e);return QT(YT(()=>e.children).toArray,{appear:e.appear,onChange({added:n,removed:r,finishRemoved:i,list:s}){const o=t();for(const l of n)ZT(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:u,rect:c}of a)if(u.isConnected){const d=u.getBoundingClientRect(),f=c.left-d.left,h=c.top-d.top;(f||h)&&(u.style.transform=`translate(${f}px, ${h}px)`,u.style.transitionDuration="0s",l.push(u))}document.body.offsetHeight;for(const u of l){let c=function(d){(d.target===u||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",c),u.classList.remove(...o.move))};u.classList.add(...o.move),u.style.transform=u.style.transitionDuration="",u.addEventListener("transitionend",c)}});for(const l of r)JT(o,e,l,()=>i([l]))}})},Yc=Symbol("fallback");function rm(e){for(const t of e)t.dispose()}function eP(e,t,n,r={}){const i=new Map;return Ce(()=>rm(i.values())),()=>{const o=e()||[];return o[Tu],ht(()=>{var c,d;if(!o.length)return rm(i.values()),i.clear(),r.fallback?[Or(h=>(i.set(Yc,{dispose:h}),r.fallback()))]:[];const a=new Array(o.length),l=i.get(Yc);if(!i.size||l){l==null||l.dispose(),i.delete(Yc);for(let f=0;f<o.length;f++){const h=o[f],y=t(h,f);s(a,h,f,y)}return a}const u=new Set(i.keys());for(let f=0;f<o.length;f++){const h=o[f],y=t(h,f);u.delete(y);const m=i.get(y);m?(a[f]=m.mapped,(c=m.setIndex)==null||c.call(m,f),m.setItem(()=>h)):s(a,h,f,y)}for(const f of u)(d=i.get(f))==null||d.dispose(),i.delete(f);return a})};function s(o,a,l,u){Or(c=>{const[d,f]=ae(a),h={setItem:f,dispose:c};if(n.length>1){const[y,m]=ae(l);h.setIndex=m,h.mapped=n(d,y)}else h.mapped=n(d);i.set(u,h),o[l]=h.mapped})}}function vu(e){const{by:t}=e;return K(eP(()=>e.each,typeof t=="function"?t:n=>n[t],e.children,"fallback"in e?{fallback:()=>e.fallback}:void 0))}function tP(e,t,n,r){return e.addEventListener(t,n,r),kT(e.removeEventListener.bind(e,t,n,r))}function nP(e,t,n,r){const i=()=>{of(Z(e)).forEach(s=>{s&&of(Z(t)).forEach(o=>tP(s,o,n,r))})};typeof e=="function"?Se(i):we(i)}function rP(e,t){const n=new ResizeObserver(e);return Ce(n.disconnect.bind(n)),{observe:r=>n.observe(r,t),unobserve:n.unobserve.bind(n)}}function qb(e,t,n){const r=new WeakMap,{observe:i,unobserve:s}=rP(o=>{for(const a of o){const{contentRect:l,target:u}=a,c=Math.round(l.width),d=Math.round(l.height),f=r.get(u);(!f||f.width!==c||f.height!==d)&&(t(l,u,a),r.set(u,{width:c,height:d}))}},n);Se(o=>{const a=ST(of(Z(e)));return OT(a,o,i,s),a},[])}var iP=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function im(e){const t={};let n;for(;n=iP.exec(e);)t[n[1]]=n[2];return t}function rc(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=im(e)}else typeof t=="string"&&(t=im(t));return{...e,...t}}function sP(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function uf(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oP(e){return typeof e=="number"}function cs(e){return Object.prototype.toString.call(e)==="[object String]"}function aP(e){return typeof e=="function"}function Ja(e){return t=>`${e()}-${t}`}function Pn(e,t){return e?e===t||e.contains(t):!1}function zo(e,t=!1){const{activeElement:n}=ar(e);if(!(n!=null&&n.nodeName))return null;if(zb(n)&&n.contentDocument)return zo(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=ar(n).getElementById(r);if(i)return i}}return n}function lP(e){return ar(e).defaultView||window}function ar(e){return e?e.ownerDocument||e:document}function zb(e){return e.tagName==="IFRAME"}var ch=(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))(ch||{});function dh(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 ic(){return dh(/^Mac/i)}function uP(){return dh(/^iPhone/i)}function cP(){return dh(/^iPad/i)||ic()&&navigator.maxTouchPoints>1}function dP(){return uP()||cP()}function fP(){return ic()||dP()}function lt(e,t){return t&&(aP(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function wt(e){return t=>{for(const n of e)lt(t,n)}}function hP(e){return ic()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function Mt(e){if(e)if(gP())e.focus({preventScroll:!0});else{const t=yP(e);e.focus(),mP(t)}}var jl=null;function gP(){if(jl==null){jl=!1;try{document.createElement("div").focus({get preventScroll(){return jl=!0,!0}})}catch(e){}}return jl}function yP(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 mP(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Hb=["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'])"],pP=[...Hb,'[tabindex]:not([tabindex="-1"]):not([disabled])'],fh=Hb.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",vP=pP.join(':not([hidden]):not([tabindex="-1"]),');function Ub(e,t){const r=Array.from(e.querySelectorAll(fh)).filter(sm);return t&&sm(e)&&r.unshift(e),r.forEach((i,s)=>{if(zb(i)&&i.contentDocument){const o=i.contentDocument.body,a=Ub(o,!1);r.splice(s,1,...a)}}),r}function sm(e){return Gb(e)&&!bP(e)}function Gb(e){return e.matches(fh)&&hh(e)}function bP(e){return parseInt(e.getAttribute("tabindex")||"0",10)<0}function hh(e,t){return e.nodeName!=="#comment"&&xP(e)&&wP(e,t)&&(!e.parentElement||hh(e.parentElement,e))}function xP(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 wP(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function SP(e,t,n){const r=t!=null&&t.tabbable?vP:fh,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)&&hh(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 om(e){for(;e&&!CP(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function CP(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function _P(){}function kP(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[u,c]=t[a],[d,f]=t[l],[,h]=t[l===0?o-1:l-1]||[0,0],y=(c-f)*(n-u)-(u-d)*(r-c);if(f<c){if(r>=f&&r<c){if(y===0)return!0;y>0&&(r===f?r>h&&(i=!i):i=!i)}}else if(c<f){if(r>c&&r<=f){if(y===0)return!0;y<0&&(r===f?r<h&&(i=!i):i=!i)}}else if(r==c&&(n>=d&&n<=u||n>=u&&n<=d))return!0}return i}function Ge(e,t){return Pe(e,t)}var To=new Map,am=new Set;function lm(){if(typeof window=="undefined")return;const e=n=>{if(!n.target)return;let r=To.get(n.target);r||(r=new Set,To.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=To.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),To.delete(n.target)),To.size===0)){for(const i of am)i();am.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document!="undefined"&&(document.readyState!=="loading"?lm():document.addEventListener("DOMContentLoaded",lm));function cf(e,t){const n=um(e,t,"left"),r=um(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight;let o=e.scrollLeft,a=e.scrollTop;const l=o+e.offsetWidth,u=a+e.offsetHeight;n<=o?o=n:n+i>l&&(o+=n+i-l),r<=a?a=r:r+s>u&&(a+=r+s-u),e.scrollLeft=o,e.scrollTop=a}function um(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 OP(e,t){var n,r;if(document.contains(e)){const i=document.scrollingElement||document.documentElement;if(window.getComputedStyle(i).overflow==="hidden"){let o=om(e);for(;e&&o&&e!==i&&o!==i;)cf(o,e),e=o,o=om(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:u}=e.getBoundingClientRect();(Math.abs(o-l)>1||Math.abs(a-u)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var Kb={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 jn(e){return t=>(e(t),()=>e(void 0))}function sc(e,t){const[n,r]=ae(cm(t==null?void 0:t()));return Se(()=>{var i;r(((i=e())==null?void 0:i.tagName.toLowerCase())||cm(t==null?void 0:t()))}),n}function cm(e){return cs(e)?e:void 0}function dt(e){const[t,n]=Ze(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return L(gS,Pe(n,{get component(){return t.as}}))}var EP=["id","name","validationState","required","disabled","readOnly"];function AP(e){const t=`form-control-${Ln()}`,n=Ge({id:t},e),[r,i]=ae(),[s,o]=ae(),[a,l]=ae(),[u,c]=ae(),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(),u(),m].filter(Boolean).join(" ")||void 0,h=K(()=>({"data-valid":Z(n.validationState)==="valid"?"":void 0,"data-invalid":Z(n.validationState)==="invalid"?"":void 0,"data-required":Z(n.required)?"":void 0,"data-disabled":Z(n.disabled)?"":void 0,"data-readonly":Z(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>{var m;return(m=Z(n.name))!=null?m:Z(n.id)},dataset:h,validationState:()=>Z(n.validationState),isRequired:()=>Z(n.required),isDisabled:()=>Z(n.disabled),isReadOnly:()=>Z(n.readOnly),labelId:r,fieldId:s,descriptionId:a,errorMessageId:u,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:Ja(()=>Z(n.id)),registerLabel:jn(i),registerField:jn(o),registerDescription:jn(l),registerErrorMessage:jn(c)}}}var Vb=_t();function el(){const e=kt(Vb);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Wb(e){const t=el(),n=Ge({id:t.generateId("description")},e);return Se(()=>Ce(t.registerDescription(n.id))),L(dt,Pe({as:"div"},()=>t.dataset(),n))}function Qb(e){const t=el(),n=Ge({id:t.generateId("error-message")},e),[r,i]=Ze(n,["forceMount"]),s=()=>t.validationState()==="invalid";return Se(()=>{s()&&Ce(t.registerErrorMessage(i.id))}),L(xe,{get when(){return r.forceMount||s()},get children(){return L(dt,Pe({as:"div"},()=>t.dataset(),i))}})}function TP(e){let t;const n=el(),r=Ge({id:n.generateId("label")},e),[i,s]=Ze(r,["ref"]),o=sc(()=>t,()=>"label");return Se(()=>Ce(n.registerLabel(s.id))),L(dt,Pe({as:"label",ref(a){const l=zt(u=>t=u,i.ref);typeof l=="function"&&l(a)},get for(){return K(()=>o()==="label")()?n.fieldId():void 0}},()=>n.dataset(),s))}function PP(e,t){Se(Tr(e,n=>{if(n==null)return;const r=jP(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),Ce(()=>{r.removeEventListener("reset",t)}))}))}function jP(e){return MP(e)?e.form:e.closest("form")}function MP(e){return e.matches("textarea, input, select, button")}function tl(e){var o;const[t,n]=ae((o=e.defaultValue)==null?void 0:o.call(e)),r=K(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),i=K(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[i,a=>{ht(()=>{var u;const l=_T(a,i());return Object.is(l,i())||(r()||n(l),(u=e.onChange)==null||u.call(e,l)),l})}]}function Yb(e){const[t,n]=tl(e);return[()=>{var i;return(i=t())!=null?i:!1},n]}function $P(e){const[t,n]=tl(e);return[()=>{var i;return(i=t())!=null?i:[]},n]}function LP(e={}){const[t,n]=Yb({value:()=>Z(e.isSelected),defaultValue:()=>!!Z(e.defaultIsSelected),onChange:s=>{var o;return(o=e.onSelectedChange)==null?void 0:o.call(e,s)}});return{isSelected:t,setIsSelected:s=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(s)},toggle:()=>{!Z(e.isReadOnly)&&!Z(e.isDisabled)&&n(!t())}}}var DP=Object.defineProperty,oc=(e,t)=>{for(var n in t)DP(e,n,{get:t[n],enumerable:!0})},Xb=_t();function Zb(){return kt(Xb)}function IP(){const e=Zb();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Jb(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function RP(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&&Jb(s,n))return r+1}return 0}function NP(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:Jb(a,l)?(r>s&&(n=!0),-1):(r<s&&(n=!0),1)}),n?t.map(([r,i])=>i):e}function e1(e,t){const n=NP(e);e!==n&&t(n)}function FP(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 ar(r).body}function BP(e,t){Se(()=>{const n=setTimeout(()=>{e1(e(),t)});Ce(()=>clearTimeout(n))})}function qP(e,t){if(typeof IntersectionObserver!="function"){BP(e,t);return}let n=[];Se(()=>{const r=()=>{const o=!!n.length;n=e(),o&&e1(e(),t)},i=FP(e()),s=new IntersectionObserver(r,{root:i});for(const o of e()){const a=o.ref();a&&s.observe(a)}Ce(()=>s.disconnect())})}function zP(e={}){const[t,n]=$P({value:()=>Z(e.items),onChange:s=>{var o;return(o=e.onItemsChange)==null?void 0:o.call(e,s)}});qP(t,n);const r=s=>(n(o=>{const a=RP(o,s);return sP(o,s,a)}),()=>{n(o=>{const a=o.filter(l=>l.ref()!==s.ref());return o.length===a.length?o:a})});return{DomCollectionProvider:s=>L(Xb.Provider,{value:{registerItem:r},get children(){return s.children}})}}function HP(e){const t=IP(),n=Ge({shouldRegisterItem:!0},e);Se(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());Ce(r)})}function t1(e){var l,u,c;let t=(l=e.startIndex)!=null?l:0;const n=(u=e.startLevel)!=null?u:0,r=[],i=d=>{var y;if(d==null)return"";const f=(y=e.getKey)!=null?y:"key",h=cs(f)?d[f]:f(d);return h!=null?String(h):""},s=d=>{var y;if(d==null)return"";const f=(y=e.getTextValue)!=null?y:"textValue",h=cs(f)?d[f]:f(d);return h!=null?String(h):""},o=d=>{var h,y;if(d==null)return!1;const f=(h=e.getDisabled)!=null?h:"disabled";return(y=cs(f)?d[f]:f(d))!=null?y:!1},a=d=>{var f;if(d!=null)return cs(e.getSectionChildren)?d[e.getSectionChildren]:(f=e.getSectionChildren)==null?void 0:f.call(e,d)};for(const d of e.dataSource){if(cs(d)||oP(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=(c=a(d))!=null?c:[];if(f.length>0){const h=t1({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 UP(e,t=[]){return K(()=>{const n=t1({dataSource:Z(e.dataSource),getKey:Z(e.getKey),getTextValue:Z(e.getTextValue),getDisabled:Z(e.getDisabled),getSectionChildren:Z(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var GP=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),KP=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function VP(e){var n;if(Intl.Locale){const r=(n=new Intl.Locale(e).maximize().script)!=null?n:"";return GP.has(r)}const t=e.split("-")[0];return KP.has(t)}function WP(e){return VP(e)?"rtl":"ltr"}function n1(){let e=typeof navigator!="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";return{locale:e,direction:WP(e)}}var df=n1(),Ho=new Set;function dm(){df=n1();for(const e of Ho)e(df)}function QP(){const[e,t]=ae(df),n=K(()=>e());return Pr(()=>{Ho.size===0&&window.addEventListener("languagechange",dm),Ho.add(t),Ce(()=>{Ho.delete(t),Ho.size===0&&window.removeEventListener("languagechange",dm)})}),{locale:()=>n().locale,direction:()=>n().direction}}var YP=_t();function yi(){const e=QP();return kt(YP)||e}var Xc=new Map;function XP(e){const{locale:t}=yi(),n=K(()=>t()+(e?Object.entries(e).sort((r,i)=>r[0]<i[0]?-1:1).join():""));return K(()=>{const r=n();let i;return Xc.has(r)&&(i=Xc.get(r)),i||(i=new Intl.Collator(t(),e),Xc.set(r,i)),i})}var vr=class r1 extends Set{constructor(n,r,i){super(n);be(this,"anchorKey");be(this,"currentKey");n instanceof r1?(this.anchorKey=r||n.anchorKey,this.currentKey=i||n.currentKey):(this.anchorKey=r,this.currentKey=i)}};function ZP(e){const[t,n]=tl(e);return[()=>{var i;return(i=t())!=null?i:new vr},n]}function i1(e){return fP()?e.altKey:e.ctrlKey}function ds(e){return ic()?e.metaKey:e.ctrlKey}function fm(e){return new vr(e)}function JP(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function ej(e){const t=Ge({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=ae(!1),[i,s]=ae(),o=K(()=>{const m=Z(t.selectedKeys);return m!=null?fm(m):m}),a=K(()=>{const m=Z(t.defaultSelectedKeys);return m!=null?fm(m):new vr}),[l,u]=ZP({value:o,defaultValue:a,onChange:m=>{var p;return(p=t.onSelectionChange)==null?void 0:p.call(t,m)}}),[c,d]=ae(Z(t.selectionBehavior)),f=()=>Z(t.selectionMode),h=()=>{var m;return(m=Z(t.disallowEmptySelection))!=null?m:!1},y=m=>{(Z(t.allowDuplicateSelectionEvents)||!JP(m,l()))&&u(m)};return Se(()=>{const m=l();Z(t.selectionBehavior)==="replace"&&c()==="toggle"&&typeof m=="object"&&m.size===0&&d("replace")}),Se(()=>{var m;d((m=Z(t.selectionBehavior))!=null?m:"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:c,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:s,selectedKeys:l,setSelectedKeys:y}}function tj(e){const[t,n]=ae(""),[r,i]=ae(-1);return{typeSelectHandlers:{onKeyDown:o=>{var f,h,y;if(Z(e.isDisabled))return;const a=Z(e.keyboardDelegate),l=Z(e.selectionManager);if(!a.getKeyForSearch)return;const u=nj(o.key);if(!u||o.ctrlKey||o.metaKey)return;u===" "&&t().trim().length>0&&(o.preventDefault(),o.stopPropagation());let c=n(m=>m+u),d=(f=a.getKeyForSearch(c,l.focusedKey()))!=null?f:a.getKeyForSearch(c);d==null&&rj(c)&&(c=c[0],d=(h=a.getKeyForSearch(c,l.focusedKey()))!=null?h:a.getKeyForSearch(c)),d!=null&&(l.setFocusedKey(d),(y=e.onTypeSelect)==null||y.call(e,d)),clearTimeout(r()),i(window.setTimeout(()=>n(""),500))}}}}function nj(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function rj(e){return e.split("").every(t=>t===e[0])}function ij(e,t,n){const i=Pe({selectOnFocus:()=>Z(e.selectionManager).selectionBehavior()==="replace"},e),s=()=>t(),{direction:o}=yi();let a={top:0,left:0};nP(()=>Z(i.isVirtualized)?void 0:s(),"scroll",()=>{const p=s();p&&(a={top:p.scrollTop,left:p.scrollLeft})});const{typeSelectHandlers:l}=tj({isDisabled:()=>Z(i.disallowTypeAhead),keyboardDelegate:()=>Z(i.keyboardDelegate),selectionManager:()=>Z(i.selectionManager)}),u=()=>{var p;return(p=Z(i.orientation))!=null?p:"vertical"},c=p=>{var _,O,A,T,j,B,R,P;lt(p,l.onKeyDown),p.altKey&&p.key==="Tab"&&p.preventDefault();const v=t();if(!(v!=null&&v.contains(p.target)))return;const b=Z(i.selectionManager),S=Z(i.selectOnFocus),C=M=>{M!=null&&(b.setFocusedKey(M),p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&!i1(p)&&b.replaceSelection(M))},x=Z(i.keyboardDelegate),k=Z(i.shouldFocusWrap),w=b.focusedKey();switch(p.key){case(u()==="vertical"?"ArrowDown":"ArrowRight"):{if(x.getKeyBelow){p.preventDefault();let M;w!=null?M=x.getKeyBelow(w):M=(_=x.getFirstKey)==null?void 0:_.call(x),M==null&&k&&(M=(O=x.getFirstKey)==null?void 0:O.call(x,w)),C(M)}break}case(u()==="vertical"?"ArrowUp":"ArrowLeft"):{if(x.getKeyAbove){p.preventDefault();let M;w!=null?M=x.getKeyAbove(w):M=(A=x.getLastKey)==null?void 0:A.call(x),M==null&&k&&(M=(T=x.getLastKey)==null?void 0:T.call(x,w)),C(M)}break}case(u()==="vertical"?"ArrowLeft":"ArrowUp"):{if(x.getKeyLeftOf){p.preventDefault();const M=o()==="rtl";let I;w!=null?I=x.getKeyLeftOf(w):I=M?(j=x.getFirstKey)==null?void 0:j.call(x):(B=x.getLastKey)==null?void 0:B.call(x),C(I)}break}case(u()==="vertical"?"ArrowRight":"ArrowDown"):{if(x.getKeyRightOf){p.preventDefault();const M=o()==="rtl";let I;w!=null?I=x.getKeyRightOf(w):I=M?(R=x.getLastKey)==null?void 0:R.call(x):(P=x.getFirstKey)==null?void 0:P.call(x),C(I)}break}case"Home":if(x.getFirstKey){p.preventDefault();const M=x.getFirstKey(w,ds(p));M!=null&&(b.setFocusedKey(M),ds(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&b.replaceSelection(M))}break;case"End":if(x.getLastKey){p.preventDefault();const M=x.getLastKey(w,ds(p));M!=null&&(b.setFocusedKey(M),ds(p)&&p.shiftKey&&b.selectionMode()==="multiple"?b.extendSelection(M):S&&b.replaceSelection(M))}break;case"PageDown":if(x.getKeyPageBelow&&w!=null){p.preventDefault();const M=x.getKeyPageBelow(w);C(M)}break;case"PageUp":if(x.getKeyPageAbove&&w!=null){p.preventDefault();const M=x.getKeyPageAbove(w);C(M)}break;case"a":ds(p)&&b.selectionMode()==="multiple"&&Z(i.disallowSelectAll)!==!0&&(p.preventDefault(),b.selectAll());break;case"Escape":p.defaultPrevented||(p.preventDefault(),Z(i.disallowEmptySelection)||b.clearSelection());break;case"Tab":if(!Z(i.allowsTabNavigation)){if(p.shiftKey)v.focus();else{const M=SP(v,{tabbable:!0});let I,G;do G=M.lastChild(),G&&(I=G);while(G);I&&!I.contains(document.activeElement)&&Mt(I)}break}}},d=p=>{var C,x,k,w;const v=Z(i.selectionManager),b=Z(i.keyboardDelegate),S=Z(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 _=A=>{A!=null&&(v.setFocusedKey(A),S&&v.replaceSelection(A))},O=p.relatedTarget;O&&p.currentTarget.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_FOLLOWING?_((x=v.lastSelectedKey())!=null?x:(C=b.getLastKey)==null?void 0:C.call(b)):_((w=v.firstSelectedKey())!=null?w:(k=b.getFirstKey)==null?void 0:k.call(b))}else if(!Z(i.isVirtualized)){const _=s();if(_){_.scrollTop=a.top,_.scrollLeft=a.left;const O=_.querySelector(`[data-key="${v.focusedKey()}"]`);O&&(Mt(O),cf(_,O))}}}},f=p=>{const v=Z(i.selectionManager);p.currentTarget.contains(p.relatedTarget)||v.setFocused(!1)},h=p=>{s()===p.target&&p.preventDefault()},y=()=>{var k,w;const p=Z(i.autoFocus);if(!p)return;const v=Z(i.selectionManager),b=Z(i.keyboardDelegate);let S;p==="first"&&(S=(k=b.getFirstKey)==null?void 0:k.call(b)),p==="last"&&(S=(w=b.getLastKey)==null?void 0:w.call(b));const C=v.selectedKeys();C.size&&(S=C.values().next().value),v.setFocused(!0),v.setFocusedKey(S);const x=t();x&&S==null&&!Z(i.shouldUseVirtualFocus)&&Mt(x)};return Pr(()=>{i.deferAutoFocus?setTimeout(y,0):y()}),Se(Tr([s,()=>Z(i.isVirtualized),()=>Z(i.selectionManager).focusedKey()],p=>{var C;const[v,b,S]=p;if(b)S&&((C=i.scrollToKey)==null||C.call(i,S));else if(S&&v){const x=v.querySelector(`[data-key="${S}"]`);x&&cf(v,x)}})),{tabIndex:K(()=>{if(!Z(i.shouldUseVirtualFocus))return Z(i.selectionManager).focusedKey()==null?0:-1}),onKeyDown:c,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function s1(e,t){const n=()=>Z(e.selectionManager),r=()=>Z(e.key),i=()=>Z(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"||ds(b)||"pointerType"in b&&b.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),a=()=>Z(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let u=null;const c=b=>{l()&&(u=b.pointerType,b.pointerType==="mouse"&&b.button===0&&!Z(e.shouldSelectOnPressUp)&&s(b))},d=b=>{l()&&b.pointerType==="mouse"&&b.button===0&&Z(e.shouldSelectOnPressUp)&&Z(e.allowsDifferentPressOrigin)&&s(b)},f=b=>{l()&&(Z(e.shouldSelectOnPressUp)&&!Z(e.allowsDifferentPressOrigin)||u!=="mouse")&&s(b)},h=b=>{!l()||!["Enter"," "].includes(b.key)||(i1(b)?n().toggleSelection(r()):s(b))},y=b=>{a()&&b.preventDefault()},m=b=>{const S=t();i()||a()||!S||b.target===S&&n().setFocusedKey(r())},p=K(()=>{if(!(i()||a()))return r()===n().focusedKey()?0:-1}),v=K(()=>Z(e.virtualized)?void 0:r());return Se(Tr([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([b,S,C,x,k])=>{b&&S===x&&k&&!C&&document.activeElement!==b&&(e.focus?e.focus():Mt(b))})),{isSelected:o,isDisabled:a,allowsSelection:l,tabIndex:p,dataKey:v,onPointerDown:c,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:y,onFocus:m}}var sj=class{constructor(e,t){be(this,"collection");be(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 vr(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 vr(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 vr([t],t,t):new vr;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new vr;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 vr)}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}},hm=class{constructor(e){be(this,"keyMap",new Map);be(this,"iterable");be(this,"firstKey");be(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 oj(e){const t=ej(e),r=UP({dataSource:()=>Z(e.dataSource),getKey:()=>Z(e.getKey),getTextValue:()=>Z(e.getTextValue),getDisabled:()=>Z(e.getDisabled),getSectionChildren:()=>Z(e.getSectionChildren),factory:s=>e.filter?new hm(e.filter(s)):new hm(s)},[()=>e.filter]),i=new sj(r,t);return av(()=>{const s=t.focusedKey();s!=null&&!r().getItem(s)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>i}}var jt=e=>typeof e=="function"?e():e,aj=e=>{const t=K(()=>{const o=jt(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]=ae(jt(e.show)?"present":"hidden");let s="none";return Se(o=>{const a=jt(e.show);return ht(()=>{var c;if(o===a)return a;const l=s,u=n();a?i("present"):u==="none"||((c=t())==null?void 0:c.display)==="none"?i("hidden"):i(o===!0&&l!==u?"hiding":"hidden")}),a}),Se(()=>{const o=jt(e.element);if(!o)return;const a=u=>{u.target===o&&(s=n())},l=u=>{const d=n().includes(u.animationName);u.target===o&&d&&r()==="hiding"&&i("hidden")};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",l),o.addEventListener("animationend",l),Ce(()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",l),o.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r}},lj=aj,o1=lj,bu="data-kb-top-layer",a1,ff=!1,jr=[];function Sa(e){return jr.findIndex(t=>t.node===e)}function uj(e){return jr[Sa(e)]}function cj(e){return jr[jr.length-1].node===e}function l1(){return jr.filter(e=>e.isPointerBlocking)}function dj(){return[...l1()].slice(-1)[0]}function gh(){return l1().length>0}function u1(e){var n;const t=Sa((n=dj())==null?void 0:n.node);return Sa(e)<t}function fj(e){jr.push(e)}function hj(e){const t=Sa(e);t<0||jr.splice(t,1)}function gj(){for(const{node:e}of jr)e.style.pointerEvents=u1(e)?"none":"auto"}function yj(e){if(gh()&&!ff){const t=ar(e);a1=document.body.style.pointerEvents,t.body.style.pointerEvents="none",ff=!0}}function mj(e){if(gh())return;const t=ar(e);t.body.style.pointerEvents=a1,t.body.style.length===0&&t.body.removeAttribute("style"),ff=!1}var nn={layers:jr,isTopMostLayer:cj,hasPointerBlockingLayer:gh,isBelowPointerBlockingLayer:u1,addLayer:fj,removeLayer:hj,indexOf:Sa,find:uj,assignPointerEventToLayers:gj,disableBodyPointerEvents:yj,restoreBodyPointerEvents:mj},pj={};oc(pj,{Button:()=>xj,Root:()=>yh});var vj=["button","color","file","image","reset","submit"];function bj(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?vj.indexOf(e.type)!==-1:!1}function yh(e){let t;const n=Ge({type:"button"},e),[r,i]=Ze(n,["ref","type","disabled"]),s=sc(()=>t,()=>"button"),o=K(()=>{const u=s();return u==null?!1:bj({tagName:u,type:r.type})}),a=K(()=>s()==="input"),l=K(()=>s()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return L(dt,Pe({as:"button",ref(u){const c=zt(d=>t=d,r.ref);typeof c=="function"&&c(u)},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 xj=yh,wj=["top","right","bottom","left"],sr=Math.min,yn=Math.max,xu=Math.round,Ml=Math.floor,li=e=>({x:e,y:e}),Sj={left:"right",right:"left",bottom:"top",top:"bottom"},Cj={start:"end",end:"start"};function hf(e,t,n){return yn(e,sr(t,n))}function ns(e,t){return typeof e=="function"?e(t):e}function ui(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function c1(e){return e==="x"?"y":"x"}function mh(e){return e==="y"?"height":"width"}function Qi(e){return["top","bottom"].includes(ui(e))?"y":"x"}function ph(e){return c1(Qi(e))}function _j(e,t,n){n===void 0&&(n=!1);const r=co(e),i=ph(e),s=mh(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=wu(o)),[o,wu(o)]}function kj(e){const t=wu(e);return[gf(e),t,gf(t)]}function gf(e){return e.replace(/start|end/g,t=>Cj[t])}function Oj(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 Ej(e,t,n,r){const i=co(e);let s=Oj(ui(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(gf)))),s}function wu(e){return e.replace(/left|right|bottom|top/g,t=>Sj[t])}function Aj(e){return{top:0,right:0,bottom:0,left:0,...e}}function d1(e){return typeof e!="number"?Aj(e):{top:e,right:e,bottom:e,left:e}}function Su(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 gm(e,t,n){let{reference:r,floating:i}=e;const s=Qi(t),o=ph(t),a=mh(o),l=ui(t),u=s==="y",c=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:c,y:r.y-i.height};break;case"bottom":h={x:c,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(co(t)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}var Tj=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 u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=gm(u,r,l),f=r,h={},y=0;for(let m=0;m<a.length;m++){const{name:p,fn:v}=a[m],{x:b,y:S,data:C,reset:x}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});c=b!=null?b:c,d=S!=null?S:d,h={...h,[p]:{...h[p],...C}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=gm(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Ca(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ns(t,e),y=d1(h),p=a[f?d==="floating"?"reference":"floating":d],v=Su(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:u,rootBoundary:c,strategy:l})),b=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},x=Su(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:S,strategy:l}):b);return{top:(v.top-x.top+y.top)/C.y,bottom:(x.bottom-v.bottom+y.bottom)/C.y,left:(v.left-x.left+y.left)/C.x,right:(x.right-v.right+y.right)/C.x}}var Pj=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:u,padding:c=0}=ns(e,t)||{};if(u==null)return{};const d=d1(c),f={x:n,y:r},h=ph(i),y=mh(h),m=await o.getDimensions(u),p=h==="y",v=p?"top":"left",b=p?"bottom":"right",S=p?"clientHeight":"clientWidth",C=s.reference[y]+s.reference[h]-f[h]-s.floating[y],x=f[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let w=k?k[S]:0;(!w||!await(o.isElement==null?void 0:o.isElement(k)))&&(w=a.floating[S]||s.floating[y]);const _=C/2-x/2,O=w/2-m[y]/2-1,A=sr(d[v],O),T=sr(d[b],O),j=A,B=w-m[y]-T,R=w/2-m[y]/2+_,P=hf(j,R,B),M=!l.arrow&&co(i)!=null&&R!==P&&s.reference[y]/2-(R<j?A:T)-m[y]/2<0,I=M?R<j?R-j:R-B:0;return{[h]:f[h]+I,data:{[h]:P,centerOffset:R-P-I,...M&&{alignmentOffset:I}},reset:M}}}),jj=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:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...p}=ns(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=ui(i),b=Qi(a),S=ui(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=f||(S||!m?[wu(a)]:kj(a)),k=y!=="none";!f&&k&&x.push(...Ej(a,m,y,C));const w=[a,...x],_=await Ca(t,p),O=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&O.push(_[v]),d){const R=_j(i,o,C);O.push(_[R[0]],_[R[1]])}if(A=[...A,{placement:i,overflows:O}],!O.every(R=>R<=0)){var T,j;const R=(((T=s.flip)==null?void 0:T.index)||0)+1,P=w[R];if(P)return{data:{index:R,overflows:A},reset:{placement:P}};let M=(j=A.filter(I=>I.overflows[0]<=0).sort((I,G)=>I.overflows[1]-G.overflows[1])[0])==null?void 0:j.placement;if(!M)switch(h){case"bestFit":{var B;const I=(B=A.filter(G=>{if(k){const Y=Qi(G.placement);return Y===b||Y==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Y=>Y>0).reduce((Y,q)=>Y+q,0)]).sort((G,Y)=>G[1]-Y[1])[0])==null?void 0:B[0];I&&(M=I);break}case"initialPlacement":M=a;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function ym(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mm(e){return wj.some(t=>e[t]>=0)}var Mj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ns(e,t);switch(r){case"referenceHidden":{const s=await Ca(t,{...i,elementContext:"reference"}),o=ym(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:mm(o)}}}case"escaped":{const s=await Ca(t,{...i,altBoundary:!0}),o=ym(s,n.floating);return{data:{escapedOffsets:o,escaped:mm(o)}}}default:return{}}}}};async function $j(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ui(n),a=co(n),l=Qi(n)==="y",u=["left","top"].includes(o)?-1:1,c=s&&l?-1:1,d=ns(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}var Lj=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 $j(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}}}}},Dj=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}=ns(e,t),u={x:n,y:r},c=await Ca(t,l),d=Qi(ui(i)),f=c1(d);let h=u[f],y=u[d];if(s){const p=f==="y"?"top":"left",v=f==="y"?"bottom":"right",b=h+c[p],S=h-c[v];h=hf(b,h,S)}if(o){const p=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=y+c[p],S=y-c[v];y=hf(b,y,S)}const m=a.fn({...t,[f]:h,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}},Ij=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}=ns(e,t),l=await Ca(t,a),u=ui(n),c=co(n),d=Qi(n)==="y",{width:f,height:h}=r.floating;let y,m;u==="top"||u==="bottom"?(y=u,m=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=u,y=c==="end"?"top":"bottom");const p=h-l.top-l.bottom,v=f-l.left-l.right,b=sr(h-l[y],p),S=sr(f-l[m],v),C=!t.middlewareData.shift;let x=b,k=S;if(d?k=c||C?sr(S,v):v:x=c||C?sr(b,p):p,C&&!c){const _=yn(l.left,0),O=yn(l.right,0),A=yn(l.top,0),T=yn(l.bottom,0);d?k=f-2*(_!==0||O!==0?_+O:yn(l.left,l.right)):x=h-2*(A!==0||T!==0?A+T:yn(l.top,l.bottom))}await o({...t,availableWidth:k,availableHeight:x});const w=await i.getDimensions(s.floating);return f!==w.width||h!==w.height?{reset:{rects:!0}}:{}}}};function fo(e){return f1(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){var t;return(t=(f1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function f1(e){return e instanceof Node||e instanceof vn(e).Node}function qn(e){return e instanceof Element||e instanceof vn(e).Element}function lr(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function pm(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function nl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Rj(e){return["table","td","th"].includes(fo(e))}function ac(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function vh(e){const t=bh(),n=qn(e)?zn(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 Nj(e){let t=ci(e);for(;lr(t)&&!to(t);){if(vh(t))return t;if(ac(t))return null;t=ci(t)}return null}function bh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function to(e){return["html","body","#document"].includes(fo(e))}function zn(e){return vn(e).getComputedStyle(e)}function lc(e){return qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ci(e){if(fo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pm(e)&&e.host||Lr(e);return pm(t)?t.host:t}function h1(e){const t=ci(e);return to(t)?e.ownerDocument?e.ownerDocument.body:e.body:lr(t)&&nl(t)?t:h1(t)}function _a(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=vn(i);return s?t.concat(o,o.visualViewport||[],nl(i)?i:[],o.frameElement&&n?_a(o.frameElement):[]):t.concat(i,_a(i,[],n))}function g1(e){const t=zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=lr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=xu(n)!==s||xu(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function xh(e){return qn(e)?e:e.contextElement}function bs(e){const t=xh(e);if(!lr(t))return li(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=g1(t);let o=(s?xu(n.width):n.width)/r,a=(s?xu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var Fj=li(0);function y1(e){const t=vn(e);return!bh()||!t.visualViewport?Fj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=xh(e);let o=li(1);t&&(r?qn(r)&&(o=bs(r)):o=bs(e));const a=Bj(s,n,r)?y1(s):li(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=vn(s),h=r&&qn(r)?vn(r):r;let y=f,m=y.frameElement;for(;m&&r&&h!==y;){const p=bs(m),v=m.getBoundingClientRect(),b=zn(m),S=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*p.x,C=v.top+(m.clientTop+parseFloat(b.paddingTop))*p.y;l*=p.x,u*=p.y,c*=p.x,d*=p.y,l+=S,u+=C,y=vn(m),m=y.frameElement}}return Su({width:c,height:d,x:l,y:u})}function qj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=Lr(r),a=t?ac(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=li(1);const c=li(0),d=lr(r);if((d||!d&&!s)&&((fo(r)!=="body"||nl(o))&&(l=lc(r)),lr(r))){const f=Yi(r);u=bs(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function zj(e){return Array.from(e.getClientRects())}function m1(e){return Yi(Lr(e)).left+lc(e).scrollLeft}function Hj(e){const t=Lr(e),n=lc(e),r=e.ownerDocument.body,i=yn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=yn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+m1(e);const a=-n.scrollTop;return zn(r).direction==="rtl"&&(o+=yn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function Uj(e,t){const n=vn(e),r=Lr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=bh();(!u||u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function Gj(e,t){const n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=lr(e)?bs(e):li(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function vm(e,t,n){let r;if(t==="viewport")r=Uj(e,n);else if(t==="document")r=Hj(Lr(e));else if(qn(t))r=Gj(t,n);else{const i=y1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Su(r)}function p1(e,t){const n=ci(e);return n===t||!qn(n)||to(n)?!1:zn(n).position==="fixed"||p1(n,t)}function Kj(e,t){const n=t.get(e);if(n)return n;let r=_a(e,[],!1).filter(a=>qn(a)&&fo(a)!=="body"),i=null;const s=zn(e).position==="fixed";let o=s?ci(e):e;for(;qn(o)&&!to(o);){const a=zn(o),l=vh(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||nl(o)&&!l&&p1(e,o))?r=r.filter(c=>c!==o):i=a,o=ci(o)}return t.set(e,r),r}function Vj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?ac(t)?[]:Kj(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=vm(t,c,i);return u.top=yn(d.top,u.top),u.right=sr(d.right,u.right),u.bottom=sr(d.bottom,u.bottom),u.left=yn(d.left,u.left),u},vm(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wj(e){const{width:t,height:n}=g1(e);return{width:t,height:n}}function Qj(e,t,n){const r=lr(t),i=Lr(t),s=n==="fixed",o=Yi(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=li(0);if(r||!r&&!s)if((fo(t)!=="body"||nl(i))&&(a=lc(t)),r){const d=Yi(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=m1(i));const u=o.left+a.scrollLeft-l.x,c=o.top+a.scrollTop-l.y;return{x:u,y:c,width:o.width,height:o.height}}function Zc(e){return zn(e).position==="static"}function bm(e,t){return!lr(e)||zn(e).position==="fixed"?null:t?t(e):e.offsetParent}function v1(e,t){const n=vn(e);if(ac(e))return n;if(!lr(e)){let i=ci(e);for(;i&&!to(i);){if(qn(i)&&!Zc(i))return i;i=ci(i)}return n}let r=bm(e,t);for(;r&&Rj(r)&&Zc(r);)r=bm(r,t);return r&&to(r)&&Zc(r)&&!vh(r)?n:r||Nj(e)||n}var Yj=async function(e){const t=this.getOffsetParent||v1,n=this.getDimensions,r=await n(e.floating);return{reference:Qj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xj(e){return zn(e).direction==="rtl"}var b1={convertOffsetParentRelativeRectToViewportRelativeRect:qj,getDocumentElement:Lr,getClippingRect:Vj,getOffsetParent:v1,getElementRects:Yj,getClientRects:zj,getDimensions:Wj,getScale:bs,isElement:qn,isRTL:Xj};function Zj(e,t){let n=null,r;const i=Lr(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:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Ml(c),y=Ml(i.clientWidth-(u+d)),m=Ml(i.clientHeight-(c+f)),p=Ml(u),b={rootMargin:-h+"px "+-y+"px "+-m+"px "+-p+"px",threshold:yn(0,sr(1,l))||1};let S=!0;function C(x){const k=x[0].intersectionRatio;if(k!==l){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(C,{...b,root:i.ownerDocument})}catch(x){n=new IntersectionObserver(C,b)}n.observe(e)}return o(!0),s}function Jj(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,u=xh(e),c=i||s?[...u?_a(u):[],..._a(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?Zj(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,m=l?Yi(e):null;l&&p();function p(){const v=Yi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,y=requestAnimationFrame(p)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(y)}}var eM=Lj,tM=Dj,nM=jj,rM=Ij,iM=Mj,sM=Pj,oM=(e,t,n)=>{const r=new Map,i={platform:b1,...n},s={...i.platform,_c:r};return Tj(e,t,{...i,platform:s})},wh=_t();function Sh(){const e=kt(wh);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var aM=ce('<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">'),yf=30,xm=yf/2,lM={top:180,right:-90,bottom:0,left:90};function Ch(e){const t=Sh(),n=Ge({size:yf},e),[r,i]=Ze(n,["ref","style","size"]),s=()=>t.currentPlacement().split("-")[0],o=uM(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"},u=()=>{var f;return((f=o())==null?void 0:f.getPropertyValue(`border-${s()}-width`))||"0px"},c=()=>Number.parseInt(u())*2*(yf/r.size),d=()=>`rotate(${lM[s()]} ${xm} ${xm}) translate(0 2)`;return L(dt,Pe({as:"div",ref(f){const h=zt(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return rc({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":c()},r.style)}},i,{get children(){const f=aM(),h=f.firstChild;return we(()=>re(h,"transform",d())),f}}))}function uM(e){const[t,n]=ae();return Se(()=>{const r=e();r&&n(lP(r).getComputedStyle(r))}),t}function cM(e){const t=Sh(),[n,r]=Ze(e,["ref","style"]);return L(dt,Pe({as:"div",ref(i){const s=zt(t.setPositionerRef,n.ref);typeof s=="function"&&s(i)},"data-popper-positioner":"",get style(){return rc({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function wm(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 dM(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?wm(r):e?e.getBoundingClientRect():wm()}}}function fM(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var hM={top:"bottom",right:"left",bottom:"top",left:"right"};function gM(e,t){const[n,r]=e.split("-"),i=hM[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 yM(e){const t=Ge({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]=ae(),[i,s]=ae(),[o,a]=ae(t.placement),l=()=>{var f;return dM((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:u}=yi();async function c(){var k,w,_;const f=l(),h=n(),y=i();if(!f||!h)return;const m=((y==null?void 0:y.clientHeight)||0)/2,p=typeof t.gutter=="number"?t.gutter+m:(k=t.gutter)!=null?k:m;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const v=[eM(({placement:O})=>{const A=!!O.split("-")[1];return{mainAxis:p,crossAxis:A?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const O=typeof t.flip=="string"?t.flip.split(" "):void 0;if(O!==void 0&&!O.every(fM))throw new Error("`flip` expects a spaced-delimited list of placements");v.push(nM({padding:t.overflowPadding,fallbackPlacements:O}))}(t.slide||t.overlap)&&v.push(tM({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),v.push(rM({padding:t.overflowPadding,apply({availableWidth:O,availableHeight:A,rects:T}){const j=Math.round(T.reference.width);O=Math.floor(O),A=Math.floor(A),h.style.setProperty("--kb-popper-anchor-width",`${j}px`),h.style.setProperty("--kb-popper-content-available-width",`${O}px`),h.style.setProperty("--kb-popper-content-available-height",`${A}px`),t.sameWidth&&(h.style.width=`${j}px`),t.fitViewport&&(h.style.maxWidth=`${O}px`,h.style.maxHeight=`${A}px`)}})),t.hideWhenDetached&&v.push(iM({padding:t.detachedPadding})),y&&v.push(sM({element:y,padding:t.arrowPadding}));const b=await oM(f,h,{placement:t.placement,strategy:"absolute",middleware:v,platform:{...b1,isRTL:()=>u()==="rtl"}});if(a(b.placement),(w=t.onCurrentPlacementChange)==null||w.call(t,b.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",gM(b.placement,u()));const S=Math.round(b.x),C=Math.round(b.y);let x;if(t.hideWhenDetached&&(x=(_=b.middlewareData.hide)!=null&&_.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${S}px, ${C}px, 0)`,visibility:x}),y&&b.middlewareData.arrow){const{x:O,y:A}=b.middlewareData.arrow,T=b.placement.split("-")[0];Object.assign(y.style,{left:O!=null?`${O}px`:"",top:A!=null?`${A}px`:"",[T]:"100%"})}}Se(()=>{const f=l(),h=n();if(!f||!h)return;const y=Jj(f,h,c,{elementResize:typeof ResizeObserver=="function"});Ce(y)}),Se(()=>{var y;const f=n(),h=(y=t.contentRef)==null?void 0:y.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 L(wh.Provider,{value:d,get children(){return t.children}})}var x1=Object.assign(yM,{Arrow:Ch,Context:wh,usePopperContext:Sh,Positioner:cM});function mM(e){const t=n=>{var r;n.key===ch.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};Se(()=>{var r,i;if(Z(e.isDisabled))return;const n=(i=(r=e.ownerDocument)==null?void 0:r.call(e))!=null?i:ar();n.addEventListener("keydown",t),Ce(()=>{n.removeEventListener("keydown",t)})})}var Sm="interactOutside.pointerDownOutside",Cm="interactOutside.focusOutside";function pM(e,t){let n,r=_P;const i=()=>ar(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(`[${bu}]`)||!Pn(i(),f)||Pn(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},u=d=>{function f(){const h=t(),y=d.target;if(!h||!y||!l(d))return;const m=wt([s,a]);y.addEventListener(Sm,m,{once:!0});const p=new CustomEvent(Sm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||hP(d)&&d.button===0}});y.dispatchEvent(p)}d.pointerType==="touch"?(i().removeEventListener("click",f),r=f,i().addEventListener("click",f,{once:!0})):f()},c=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const y=wt([o,a]);h.addEventListener(Cm,y,{once:!0});const m=new CustomEvent(Cm,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(m)};Se(()=>{Z(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener("pointerdown",u,!0)},0),i().addEventListener("focusin",c,!0),Ce(()=>{window.clearTimeout(n),i().removeEventListener("click",r),i().removeEventListener("pointerdown",u,!0),i().removeEventListener("focusin",c,!0)}))})}var w1=_t();function vM(){return kt(w1)}function bM(e){let t;const n=vM(),[r,i]=Ze(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()}};pM({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>Pn(h(),d)))||[...s].some(h=>Pn(h,d)):!1},onPointerDownOutside:d=>{var f,h,y;!t||nn.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!nn.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(y=r.onDismiss)==null||y.call(r))},onFocusOutside:d=>{var f,h,y;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(y=r.onDismiss)==null||y.call(r)}},()=>t),mM({ownerDocument:()=>ar(t),onEscapeKeyDown:d=>{var f;!t||!nn.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Pr(()=>{if(!t)return;nn.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);nn.assignPointerEventToLayers(),nn.disableBodyPointerEvents(t),Ce(()=>{t&&(nn.removeLayer(t),d==null||d(),nn.assignPointerEventToLayers(),nn.restoreBodyPointerEvents(t))})}),Se(Tr([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=nn.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,nn.assignPointerEventToLayers()),f&&nn.disableBodyPointerEvents(d),Ce(()=>{nn.restoreBodyPointerEvents(d)})},{defer:!0}));const c={registerNestedLayer:o};return L(w1.Provider,{value:c,get children(){return L(dt,Pe({as:"div",ref(d){const f=zt(h=>t=h,r.ref);typeof f=="function"&&f(d)}},i))}})}function S1(e={}){const[t,n]=Yb({value:()=>Z(e.open),defaultValue:()=>!!Z(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 kn={};oc(kn,{Description:()=>Wb,ErrorMessage:()=>Qb,Item:()=>O1,ItemControl:()=>E1,ItemDescription:()=>A1,ItemIndicator:()=>T1,ItemInput:()=>P1,ItemLabel:()=>j1,Label:()=>M1,RadioGroup:()=>xM,Root:()=>$1});var C1=_t();function _1(){const e=kt(C1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupContext` must be used within a `RadioGroup` component");return e}var k1=_t();function rl(){const e=kt(k1);if(e===void 0)throw new Error("[kobalte]: `useRadioGroupItemContext` must be used within a `RadioGroup.Item` component");return e}function O1(e){const t=el(),n=_1(),r=`${t.generateId("item")}-${Ln()}`,i=Ge({id:r},e),[s,o]=Ze(i,["value","disabled","onPointerDown"]),[a,l]=ae(),[u,c]=ae(),[d,f]=ae(),[h,y]=ae(),[m,p]=ae(!1),v=K(()=>n.isSelectedValue(s.value)),b=K(()=>s.disabled||t.isDisabled()||!1),S=k=>{lt(k,s.onPointerDown),m()&&k.preventDefault()},C=K(()=>({...t.dataset(),"data-disabled":b()?"":void 0,"data-checked":v()?"":void 0})),x={value:()=>s.value,dataset:C,isSelected:v,isDisabled:b,inputId:a,labelId:u,descriptionId:d,inputRef:h,select:()=>n.setSelectedValue(s.value),generateId:Ja(()=>o.id),registerInput:jn(l),registerLabel:jn(c),registerDescription:jn(f),setIsFocused:p,setInputRef:y};return L(k1.Provider,{value:x,get children(){return L(dt,Pe({as:"div",role:"group",onPointerDown:S},C,o))}})}function E1(e){const t=rl(),n=Ge({id:t.generateId("control")},e),[r,i]=Ze(n,["onClick","onKeyDown"]);return L(dt,Pe({as:"div",onClick:a=>{var l;lt(a,r.onClick),t.select(),(l=t.inputRef())==null||l.focus()},onKeyDown:a=>{var l;lt(a,r.onKeyDown),a.key===ch.Space&&(t.select(),(l=t.inputRef())==null||l.focus())}},()=>t.dataset(),i))}function A1(e){const t=rl(),n=Ge({id:t.generateId("description")},e);return Se(()=>Ce(t.registerDescription(n.id))),L(dt,Pe({as:"div"},()=>t.dataset(),n))}function T1(e){const t=rl(),n=Ge({id:t.generateId("indicator")},e),[r,i]=Ze(n,["ref","forceMount"]),[s,o]=ae(),{present:a}=o1({show:()=>r.forceMount||t.isSelected(),element:()=>{var l;return(l=s())!=null?l:null}});return L(xe,{get when(){return a()},get children(){return L(dt,Pe({as:"div",ref(l){const u=zt(o,r.ref);typeof u=="function"&&u(l)}},()=>t.dataset(),i))}})}function P1(e){const t=el(),n=_1(),r=rl(),i=Ge({id:r.generateId("input")},e),[s,o]=Ze(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,[u,c]=ae(!1),d=y=>{if(lt(y,s.onChange),y.stopPropagation(),!u()){n.setSelectedValue(r.value());const m=y.target;m.checked=r.isSelected()}c(!1)},f=y=>{lt(y,s.onFocus),r.setIsFocused(!0)},h=y=>{lt(y,s.onBlur),r.setIsFocused(!1)};return Se(Tr([()=>r.isSelected(),()=>r.value()],y=>{if(!y[0]&&y[1]===r.value())return;c(!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})),Se(()=>Ce(r.registerInput(o.id))),L(dt,Pe({as:"input",ref(y){const m=zt(r.setInputRef,s.ref);typeof m=="function"&&m(y)},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 rc({...Kb},s.style)},get"aria-labelledby"(){return a()},get"aria-describedby"(){return l()},onChange:d,onFocus:f,onBlur:h},()=>r.dataset(),o))}function j1(e){const t=rl(),n=Ge({id:t.generateId("label")},e);return Se(()=>Ce(t.registerLabel(n.id))),L(dt,Pe({as:"label",get for(){return t.inputId()}},()=>t.dataset(),n))}function M1(e){return L(TP,Pe({as:"span"},e))}function $1(e){let t;const n=`radiogroup-${Ln()}`,r=Ge({id:n,orientation:"vertical"},e),[i,s,o]=Ze(r,["ref","value","defaultValue","onChange","orientation","aria-labelledby","aria-describedby"],EP),[a,l]=tl({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:y=>{var m;return(m=i.onChange)==null?void 0:m.call(i,y)}}),{formControlContext:u}=AP(s);PP(()=>t,()=>{var y;return l((y=i.defaultValue)!=null?y:"")});const c=()=>u.getAriaLabelledBy(Z(s.id),o["aria-label"],i["aria-labelledby"]),d=()=>u.getAriaDescribedBy(i["aria-describedby"]),f=y=>y===a(),h={ariaDescribedBy:d,isSelectedValue:f,setSelectedValue:y=>{if(!(u.isReadOnly()||u.isDisabled())&&(l(y),t))for(const m of t.querySelectorAll("[type='radio']")){const p=m;p.checked=f(p.value)}}};return L(Vb.Provider,{value:u,get children(){return L(C1.Provider,{value:h,get children(){return L(dt,Pe({as:"div",ref(y){const m=zt(p=>t=p,i.ref);typeof m=="function"&&m(y)},role:"radiogroup",get id(){return Z(s.id)},get"aria-invalid"(){return u.validationState()==="invalid"||void 0},get"aria-required"(){return u.isRequired()||void 0},get"aria-disabled"(){return u.isDisabled()||void 0},get"aria-readonly"(){return u.isReadOnly()||void 0},get"aria-orientation"(){return i.orientation},get"aria-labelledby"(){return c()},get"aria-describedby"(){return d()}},()=>u.dataset(),o))}})}})}var xM=Object.assign($1,{Description:Wb,ErrorMessage:Qb,Item:O1,ItemControl:E1,ItemDescription:A1,ItemIndicator:T1,ItemInput:P1,ItemLabel:j1,Label:M1}),wM=class{constructor(e,t,n){be(this,"collection");be(this,"ref");be(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 SM(e,t,n){const r=XP({usage:"search",sensitivity:"base"}),i=K(()=>{const s=Z(e.keyboardDelegate);return s||new wM(e.collection,t,r)});return ij({selectionManager:()=>Z(e.selectionManager),keyboardDelegate:i,autoFocus:()=>Z(e.autoFocus),deferAutoFocus:()=>Z(e.deferAutoFocus),shouldFocusWrap:()=>Z(e.shouldFocusWrap),disallowEmptySelection:()=>Z(e.disallowEmptySelection),selectOnFocus:()=>Z(e.selectOnFocus),disallowTypeAhead:()=>Z(e.disallowTypeAhead),shouldUseVirtualFocus:()=>Z(e.shouldUseVirtualFocus),allowsTabNavigation:()=>Z(e.allowsTabNavigation),isVirtualized:()=>Z(e.isVirtualized),scrollToKey:s=>{var o;return(o=Z(e.scrollToKey))==null?void 0:o(s)},orientation:()=>Z(e.orientation)},t)}var Jc="focusScope.autoFocusOnMount",ed="focusScope.autoFocusOnUnmount",_m={bubbles:!1,cancelable:!0},km={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=uf(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=uf(this.stack,e),(t=this.active())==null||t.resume()}};function CM(e,t){const[n,r]=ae(!1),i={pause(){r(!0)},resume(){r(!1)}};let s=null;const o=y=>{var m;return(m=e.onMountAutoFocus)==null?void 0:m.call(e,y)},a=y=>{var m;return(m=e.onUnmountAutoFocus)==null?void 0:m.call(e,y)},l=()=>ar(t()),u=()=>{const y=l().createElement("span");return y.setAttribute("data-focus-trap",""),y.tabIndex=0,Object.assign(y.style,Kb),y},c=()=>{const y=t();return y?Ub(y,!0).filter(m=>!m.hasAttribute("data-focus-trap")):[]},d=()=>{const y=c();return y.length>0?y[0]:null},f=()=>{const y=c();return y.length>0?y[y.length-1]:null},h=()=>{const y=t();if(!y)return!1;const m=zo(y);return!m||Pn(y,m)?!1:Gb(m)};Se(()=>{const y=t();if(!y)return;km.add(i);const m=zo(y);if(!Pn(y,m)){const v=new CustomEvent(Jc,_m);y.addEventListener(Jc,o),y.dispatchEvent(v),v.defaultPrevented||setTimeout(()=>{Mt(d()),zo(y)===m&&Mt(y)},0)}Ce(()=>{y.removeEventListener(Jc,o),setTimeout(()=>{const v=new CustomEvent(ed,_m);h()&&v.preventDefault(),y.addEventListener(ed,a),y.dispatchEvent(v),v.defaultPrevented||Mt(m!=null?m:l().body),y.removeEventListener(ed,a),km.remove(i)},0)})}),Se(()=>{const y=t();if(!y||!Z(e.trapFocus)||n())return;const m=v=>{const b=v.target;b!=null&&b.closest(`[${bu}]`)||(Pn(y,b)?s=b:Mt(s))},p=v=>{const b=v.relatedTarget,S=b!=null?b:zo(y);S!=null&&S.closest(`[${bu}]`)||Pn(y,S)||Mt(s)};l().addEventListener("focusin",m),l().addEventListener("focusout",p),Ce(()=>{l().removeEventListener("focusin",m),l().removeEventListener("focusout",p)})}),Se(()=>{const y=t();if(!y||!Z(e.trapFocus)||n())return;const m=u();y.insertAdjacentElement("afterbegin",m);const p=u();y.insertAdjacentElement("beforeend",p);function v(S){const C=d(),x=f();S.relatedTarget===C?Mt(x):Mt(C)}m.addEventListener("focusin",v),p.addEventListener("focusin",v);const b=new MutationObserver(S=>{for(const C of S)C.previousSibling===p&&(p.remove(),y.insertAdjacentElement("beforeend",p)),C.nextSibling===m&&(m.remove(),y.insertAdjacentElement("afterbegin",m))});b.observe(y,{childList:!0,subtree:!1}),Ce(()=>{m.removeEventListener("focusin",v),p.removeEventListener("focusin",v),m.remove(),p.remove(),b.disconnect()})})}var _M="data-live-announcer";function kM(e){Se(()=>{Z(e.isDisabled)||Ce(OM(Z(e.targets),Z(e.root)))})}var Po=new WeakMap,Cn=[];function OM(e,t=document.body){const n=new Set(e),r=new Set,i=l=>{for(const f of l.querySelectorAll(`[${_M}], [${bu}]`))n.add(f);const u=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},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&s(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)s(f),f=c.nextNode()}},s=l=>{var c;const u=(c=Po.get(l))!=null?c:0;l.getAttribute("aria-hidden")==="true"&&u===0||(u===0&&l.setAttribute("aria-hidden","true"),r.add(l),Po.set(l,u+1))};Cn.length&&Cn[Cn.length-1].disconnect(),i(t);const o=new MutationObserver(l=>{for(const u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(const c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(const c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});o.observe(t,{childList:!0,subtree:!0});const a={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return Cn.push(a),()=>{o.disconnect();for(const l of r){const u=Po.get(l);if(u==null)return;u===1?(l.removeAttribute("aria-hidden"),Po.delete(l)):Po.set(l,u-1)}a===Cn[Cn.length-1]?(Cn.pop(),Cn.length&&Cn[Cn.length-1].observe()):Cn.splice(Cn.indexOf(a),1)}}var $l=new Map,EM=e=>{Se(()=>{var s,o;const t=(s=jt(e.style))!=null?s:{},n=(o=jt(e.properties))!=null?o:[],r={};for(const a in t)r[a]=e.element.style[a];const i=$l.get(e.key);i?i.activeCount++:$l.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);Ce(()=>{var l;const a=$l.get(e.key);if(a){if(a.activeCount!==1){a.activeCount--;return}$l.delete(e.key);for(const[u,c]of Object.entries(a.originalStyles))e.element.style[u]=c;for(const u of a.properties)e.element.style.removeProperty(u);e.element.style.length===0&&e.element.removeAttribute("style"),(l=e.cleanup)==null||l.call(e)}})})},Om=EM,AM=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},TM=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},PM=(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[u,c,d]=AM(i,t),f=d-u-r*c;(c!==0||f!==0)&&TM(i,t)&&(s+=f,o+=c),i===(n!=null?n:document.documentElement)?a=!0:i=(l=i._$host)!=null?l:i.parentElement}while(i&&!a);return[s,o]},[Em,Am]=ae([]),jM=e=>Em().indexOf(e)===Em().length-1,MM=e=>{const t=Pe({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Ln();let r=[0,0],i=null,s=null;Se(()=>{jt(t.enabled)&&(Am(u=>[...u,n]),Ce(()=>{Am(u=>u.filter(c=>c!==n))}))}),Se(()=>{if(!jt(t.enabled)||!jt(t.hideScrollbar))return;const{body:u}=document,c=window.innerWidth-u.offsetWidth;if(jt(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];c>0&&(jt(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(u).paddingRight} + ${c}px)`:d.marginRight=`calc(${window.getComputedStyle(u).marginRight} + ${c}px)`,f.push({key:"--scrollbar-width",value:`${c}px`}));const h=window.scrollY,y=window.scrollX;Om({key:"prevent-scroll",element:u,style:d,properties:f,cleanup:()=>{jt(t.restoreScrollPosition)&&c>0&&window.scrollTo(y,h)}})}else Om({key:"prevent-scroll",element:u,style:{overflow:"hidden"}})}),Se(()=>{!jM(n)||!jt(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),Ce(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",o),document.removeEventListener("touchmove",l)}))});const o=u=>{r=Tm(u),i=null,s=null},a=u=>{const c=u.target,d=jt(t.element),f=$M(u),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",y=h==="x"?f[0]:f[1],m=Pm(c,h,y,d);let p;d&&mf(d,c)?p=!m:p=!0,p&&u.cancelable&&u.preventDefault()},l=u=>{const c=jt(t.element),d=u.target;let f;if(u.touches.length===2)f=!jt(t.allowPinchZoom);else{if(i==null||s===null){const h=Tm(u).map((m,p)=>r[p]-m),y=Math.abs(h[0])>Math.abs(h[1])?"x":"y";i=y,s=y==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=Pm(d,i,s,c);c&&mf(c,d)?f=!h:f=!0}}f&&u.cancelable&&u.preventDefault()}},$M=e=>[e.deltaX,e.deltaY],Tm=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Pm=(e,t,n,r)=>{const i=r!==null&&mf(r,e),[s,o]=PM(e,t,i?r:void 0);return!(n>0&&Math.abs(s)<=1||n<0&&Math.abs(o)<1)},mf=(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},LM=MM,DM=LM,L1=_t();function D1(){return kt(L1)}function Dr(){const e=D1();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var I1=_t();function _h(){const e=kt(I1);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var R1=_t();function ur(){const e=kt(R1);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function kh(e){let t;const n=ur(),r=Dr(),i=Ge({id:n.generateId(`item-${Ln()}`)},e),[s,o]=Ze(i,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=ae(),[u,c]=ae(),[d,f]=ae(),h=()=>r.listState().selectionManager(),y=()=>o.id,m=()=>h().focusedKey()===y(),p=()=>{var O;(O=s.onSelect)==null||O.call(s),s.closeOnSelect&&setTimeout(()=>{r.close(!0)})};HP({getItem:()=>{var O,A,T,j,B;return{ref:()=>t,type:"item",key:y(),textValue:(j=(T=(A=s.textValue)!=null?A:(O=d())==null?void 0:O.textContent)!=null?T:t==null?void 0:t.textContent)!=null?j:"",disabled:(B=s.disabled)!=null?B:!1}}});const v=s1({key:y,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),b=O=>{lt(O,s.onPointerMove),O.pointerType==="mouse"&&(s.disabled?r.onItemLeave(O):(r.onItemEnter(O),O.defaultPrevented||(Mt(O.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(y()))))},S=O=>{lt(O,s.onPointerLeave),O.pointerType==="mouse"&&r.onItemLeave(O)},C=O=>{lt(O,s.onPointerUp),!s.disabled&&O.button===0&&p()},x=O=>{if(lt(O,s.onKeyDown),!O.repeat&&!s.disabled)switch(O.key){case"Enter":case" ":p();break}},k=K(()=>{if(s.indeterminate)return"mixed";if(s.checked!=null)return s.checked}),w=K(()=>({"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})),_={isChecked:()=>s.checked,dataset:w,setLabelRef:f,generateId:Ja(()=>o.id),registerLabel:jn(l),registerDescription:jn(c)};return L(I1.Provider,{value:_,get children(){return L(dt,Pe({as:"div",ref(O){const A=zt(T=>t=T,s.ref);typeof A=="function"&&A(O)},get tabIndex(){return v.tabIndex()},get"aria-checked"(){return k()},get"aria-disabled"(){return s.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return u()},get"data-key"(){return v.dataKey()},get onPointerDown(){return wt([s.onPointerDown,v.onPointerDown])},get onPointerUp(){return wt([C,v.onPointerUp])},get onClick(){return wt([s.onClick,v.onClick])},get onKeyDown(){return wt([x,v.onKeyDown])},get onMouseDown(){return wt([s.onMouseDown,v.onMouseDown])},get onFocus(){return wt([s.onFocus,v.onFocus])},onPointerMove:b,onPointerLeave:S},w,o))}})}function N1(e){const t=Ge({closeOnSelect:!1},e),[n,r]=Ze(t,["checked","defaultChecked","onChange","onSelect"]),i=LP({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 L(kh,Pe({role:"menuitemcheckbox",get checked(){return i.isSelected()},onSelect:()=>{var o;(o=n.onSelect)==null||o.call(n),i.toggle()}},r))}var IM=_t();function uc(){return kt(IM)}var ka={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>ka.next(e==="ltr"?"rtl":"ltr",t)},jm={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function F1(e){const t=ur(),n=Dr(),r=uc(),{direction:i}=yi(),s=Ge({id:t.generateId("trigger")},e),[o,a]=Ze(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 u=sc(()=>n.triggerRef(),()=>"button"),c=K(()=>{var v;return u()==="a"&&((v=n.triggerRef())==null?void 0:v.getAttribute("href"))!=null});Se(Tr(()=>r==null?void 0:r.value(),v=>{var b;c()&&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=>{lt(v,o.onPointerDown),v.currentTarget.dataset.pointerType=v.pointerType,!o.disabled&&v.pointerType!=="touch"&&v.button===0&&d()},h=v=>{lt(v,o.onClick),o.disabled||v.currentTarget.dataset.pointerType==="touch"&&d()},y=v=>{if(lt(v,o.onKeyDown),!o.disabled){if(c())switch(v.key){case"Enter":case" ":return}switch(v.key){case"Enter":case" ":case jm.first(t.orientation()):v.stopPropagation(),v.preventDefault(),OP(v.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case jm.last(t.orientation()):v.stopPropagation(),v.preventDefault(),n.open("last");break;case ka.next(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.nextMenu();break;case ka.previous(i(),t.orientation()):if(r===void 0)break;v.stopPropagation(),v.preventDefault(),r.previousMenu();break}}},m=v=>{var b;lt(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=>{lt(v,o.onFocus),r!==void 0&&v.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return Se(()=>Ce(n.registerTriggerId(o.id))),L(yh,Pe({ref(v){const b=zt(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 K(()=>!!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:y,onFocus:p,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var RM=_t();function B1(){return kt(RM)}function q1(e){let t;const n=ur(),r=Dr(),i=uc(),s=B1(),{direction:o}=yi(),a=Ge({id:n.generateId(`content-${Ln()}`)},e),[l,u]=Ze(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let c=0;const d=()=>r.parentMenuContext()==null&&i===void 0&&n.isModal(),f=SM({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);CM({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:S=>{var C;i===void 0&&((C=l.onOpenAutoFocus)==null||C.call(l,S))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=S=>{if(Pn(S.currentTarget,S.target)&&(S.key==="Tab"&&r.isOpen()&&S.preventDefault(),i!==void 0&&S.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(S.key){case ka.next(o(),n.orientation()):S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.nextMenu();break;case ka.previous(o(),n.orientation()):if(S.currentTarget.hasAttribute("data-closed"))break;S.stopPropagation(),S.preventDefault(),r.close(!0),i.setAutoFocusMenu(!0),i.previousMenu();break}},y=S=>{var C;(C=l.onEscapeKeyDown)==null||C.call(l,S),i==null||i.setAutoFocusMenu(!1),r.close(!0)},m=S=>{var C;(C=l.onFocusOutside)==null||C.call(l,S),n.isModal()&&S.preventDefault()},p=S=>{var C,x;lt(S,l.onPointerEnter),r.isOpen()&&((C=r.parentMenuContext())==null||C.listState().selectionManager().setFocused(!1),(x=r.parentMenuContext())==null||x.listState().selectionManager().setFocusedKey(void 0))},v=S=>{if(lt(S,l.onPointerMove),S.pointerType!=="mouse")return;const C=S.target,x=c!==S.clientX;Pn(S.currentTarget,C)&&x&&(r.setPointerDir(S.clientX>c?"right":"left"),c=S.clientX)};Se(()=>Ce(r.registerContentId(l.id)));const b={ref:zt(S=>{r.setContentRef(S),t=S},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:wt([l.onKeyDown,f.onKeyDown,h]),onMouseDown:wt([l.onMouseDown,f.onMouseDown]),onFocusIn:wt([l.onFocusIn,f.onFocusIn]),onFocusOut:wt([l.onFocusOut,f.onFocusOut]),onPointerEnter:p,onPointerMove:v,get"data-orientation"(){return n.orientation()}};return L(xe,{get when(){return r.contentPresent()},get children(){return L(xe,{get when(){return s===void 0||r.parentMenuContext()!=null},get fallback(){return L(dt,Pe({as:"div"},()=>r.dataset(),b,u))},get children(){return L(x1.Positioner,{get children(){return L(bM,Pe({get disableOutsidePointerEvents(){return K(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return rc({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:y,onFocusOutside:m,get onDismiss(){return r.close}},()=>r.dataset(),b,u))}})}})}})}function NM(e){let t;const n=ur(),r=Dr(),[i,s]=Ze(e,["ref"]);return DM({element:()=>t!=null?t:null,enabled:()=>r.contentPresent()&&n.preventScroll()}),L(q1,Pe({ref(o){const a=zt(l=>{t=l},i.ref);typeof a=="function"&&a(o)}},s))}var z1=_t();function FM(){const e=kt(z1);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Oh(e){const t=ur(),n=Ge({id:t.generateId(`group-${Ln()}`)},e),[r,i]=ae(),s={generateId:Ja(()=>n.id),registerLabelId:jn(i)};return L(z1.Provider,{value:s,get children(){return L(dt,Pe({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function H1(e){const t=FM(),n=Ge({id:t.generateId("label")},e),[r,i]=Ze(n,["id"]);return Se(()=>Ce(t.registerLabelId(r.id))),L(dt,Pe({as:"span",get id(){return r.id},"aria-hidden":"true"},i))}function U1(e){const t=Dr(),n=Ge({children:"▼"},e);return L(dt,Pe({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function G1(e){return L(kh,Pe({role:"menuitem",closeOnSelect:!0},e))}function K1(e){const t=_h(),n=Ge({id:t.generateId("description")},e),[r,i]=Ze(n,["id"]);return Se(()=>Ce(t.registerDescription(r.id))),L(dt,Pe({as:"div",get id(){return r.id}},()=>t.dataset(),i))}function V1(e){const t=_h(),n=Ge({id:t.generateId("indicator")},e),[r,i]=Ze(n,["forceMount"]);return L(xe,{get when(){return r.forceMount||t.isChecked()},get children(){return L(dt,Pe({as:"div"},()=>t.dataset(),i))}})}function W1(e){const t=_h(),n=Ge({id:t.generateId("label")},e),[r,i]=Ze(n,["ref","id"]);return Se(()=>Ce(t.registerLabel(r.id))),L(dt,Pe({as:"div",ref(s){const o=zt(t.setLabelRef,r.ref);typeof o=="function"&&o(s)},get id(){return r.id}},()=>t.dataset(),i))}function Q1(e){const t=Dr();return L(xe,{get when(){return t.contentPresent()},get children(){return L(xv,e)}})}var Y1=_t();function BM(){const e=kt(Y1);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function X1(e){const n=ur().generateId(`radiogroup-${Ln()}`),r=Ge({id:n},e),[i,s]=Ze(r,["value","defaultValue","onChange","disabled"]),[o,a]=tl({value:()=>i.value,defaultValue:()=>i.defaultValue,onChange:u=>{var c;return(c=i.onChange)==null?void 0:c.call(i,u)}}),l={isDisabled:()=>i.disabled,isSelectedValue:u=>u===o(),setSelectedValue:a};return L(Y1.Provider,{value:l,get children(){return L(Oh,s)}})}function Z1(e){const t=BM(),n=Ge({closeOnSelect:!1},e),[r,i]=Ze(n,["value","onSelect"]);return L(kh,Pe({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 qM(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 zM(e,t){return t?kP([e.clientX,e.clientY],t):!1}function J1(e){const t=ur(),n=Zb(),r=D1(),i=uc(),s=B1(),o=Ge({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=Ze(o,["open","defaultOpen","onOpenChange"]);let u=0,c=null,d="right";const[f,h]=ae(),[y,m]=ae(),[p,v]=ae(),[b,S]=ae(),[C,x]=ae(!0),[k,w]=ae(l.placement),[_,O]=ae([]),[A,T]=ae([]),{DomCollectionProvider:j}=zP({items:A,onItemsChange:T}),B=S1({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:X=>{var ge;return(ge=a.onOpenChange)==null?void 0:ge.call(a,X)}}),{present:R}=o1({show:()=>t.forceMount()||B.isOpen(),element:()=>{var X;return(X=b())!=null?X:null}}),P=oj({selectionMode:"none",dataSource:A}),M=X=>{x(X),B.open()},I=(X=!1)=>{B.close(),X&&r&&r.close(!0)},G=X=>{x(X),B.toggle()},Y=()=>{const X=b();X&&(Mt(X),P.selectionManager().setFocused(!0),P.selectionManager().setFocusedKey(void 0))},q=()=>{s!=null?setTimeout(()=>Y()):Y()},U=X=>{O(ye=>[...ye,X]);const ge=r==null?void 0:r.registerNestedMenu(X);return()=>{O(ye=>uf(ye,X)),ge==null||ge()}},z=X=>d===(c==null?void 0:c.side)&&zM(X,c==null?void 0:c.area),V=X=>{z(X)&&X.preventDefault()},N=X=>{z(X)||q()},ne=X=>{z(X)&&X.preventDefault()};kM({isDisabled:()=>!(r==null&&B.isOpen()&&t.isModal()),targets:()=>[b(),..._()].filter(Boolean)}),Se(()=>{const X=b();if(!X||!r)return;const ge=r.registerNestedMenu(X);Ce(()=>{ge()})}),Se(()=>{r===void 0&&(i==null||i.registerMenu(t.value(),[b(),..._()]))}),Se(()=>{var X;r!==void 0||i===void 0||(i.value()===t.value()?((X=p())==null||X.focus(),i.autoFocusMenu()&&M(!0)):I())}),Se(()=>{r!==void 0||i===void 0||B.isOpen()&&i.setValue(t.value())}),Ce(()=>{r===void 0&&(i==null||i.unregisterMenu(t.value()))});const he={dataset:K(()=>({"data-expanded":B.isOpen()?"":void 0,"data-closed":B.isOpen()?void 0:""})),isOpen:B.isOpen,contentPresent:R,nestedMenus:_,currentPlacement:k,pointerGraceTimeoutId:()=>u,autoFocus:C,listState:()=>P,parentMenuContext:()=>r,triggerRef:p,contentRef:b,triggerId:f,contentId:y,setTriggerRef:v,setContentRef:S,open:M,close:I,toggle:G,focusContent:q,onItemEnter:V,onItemLeave:N,onTriggerLeave:ne,setPointerDir:X=>d=X,setPointerGraceTimeoutId:X=>u=X,setPointerGraceIntent:X=>c=X,registerNestedMenu:U,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:jn(h),registerContentId:jn(m)};return L(j,{get children(){return L(L1.Provider,{value:he,get children(){return L(xe,{when:s===void 0,get fallback(){return l.children},get children(){return L(x1,Pe({anchorRef:p,contentRef:b,onCurrentPlacementChange:w},l))}})}})}})}function ex(e){const{direction:t}=yi();return L(J1,Pe({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var HM={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function tx(e){const t=Dr(),n=ur(),[r,i]=Ze(e,["onFocusOutside","onKeyDown"]),{direction:s}=yi();return L(q1,Pe({onOpenAutoFocus:c=>{c.preventDefault()},onCloseAutoFocus:c=>{c.preventDefault()},onFocusOutside:c=>{var f;(f=r.onFocusOutside)==null||f.call(r,c);const d=c.target;Pn(t.triggerRef(),d)||t.close()},onKeyDown:c=>{lt(c,r.onKeyDown);const d=Pn(c.currentTarget,c.target),f=HM.close(s(),n.orientation()).includes(c.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),Mt(t.triggerRef()))}},i))}var Mm=["Enter"," "],UM={open:(e,t)=>e==="ltr"?[...Mm,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Mm,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function nx(e){let t;const n=ur(),r=Dr(),i=Ge({id:n.generateId(`sub-trigger-${Ln()}`)},e),[s,o]=Ze(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:u}=yi(),c=()=>s.id,d=()=>{const S=r.parentMenuContext();if(S==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return S.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===c(),y=s1({key:c,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>s.disabled},()=>t),m=S=>{lt(S,s.onClick),!r.isOpen()&&!s.disabled&&r.open(!0)},p=S=>{var x;if(lt(S,s.onPointerMove),S.pointerType!=="mouse")return;const C=r.parentMenuContext();if(C==null||C.onItemEnter(S),!S.defaultPrevented){if(s.disabled){C==null||C.onItemLeave(S);return}!r.isOpen()&&!a&&((x=r.parentMenuContext())==null||x.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),C==null||C.onItemEnter(S),S.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),Mt(S.currentTarget),C==null||C.listState().selectionManager().setFocused(!0),C==null||C.listState().selectionManager().setFocusedKey(c()))}},v=S=>{if(lt(S,s.onPointerLeave),S.pointerType!=="mouse")return;l();const C=r.parentMenuContext(),x=r.contentRef();if(x){C==null||C.setPointerGraceIntent({area:qM(r.currentPlacement(),S,x),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(C==null?void 0:C.pointerGraceTimeoutId());const k=window.setTimeout(()=>{C==null||C.setPointerGraceIntent(null)},300);C==null||C.setPointerGraceTimeoutId(k)}else{if(C==null||C.onTriggerLeave(S),S.defaultPrevented)return;C==null||C.setPointerGraceIntent(null)}C==null||C.onItemLeave(S)},b=S=>{lt(S,s.onKeyDown),!S.repeat&&(s.disabled||UM.open(u(),n.orientation()).includes(S.key)&&(S.stopPropagation(),S.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 Se(()=>{var C,x,k;if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const S=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:c(),textValue:(x=(C=s.textValue)!=null?C:t==null?void 0:t.textContent)!=null?x:"",disabled:(k=s.disabled)!=null?k:!1});Ce(S)}),Se(Tr(()=>{var S;return(S=r.parentMenuContext())==null?void 0:S.pointerGraceTimeoutId()},S=>{Ce(()=>{var C;window.clearTimeout(S),(C=r.parentMenuContext())==null||C.setPointerGraceIntent(null)})})),Se(()=>Ce(r.registerTriggerId(s.id))),Ce(()=>{l()}),L(dt,Pe({as:"div",ref(S){const C=zt(x=>{r.setTriggerRef(x),t=x},s.ref);typeof C=="function"&&C(S)},get id(){return s.id},role:"menuitem",get tabIndex(){return y.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return K(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return s.disabled},get"data-key"(){return y.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return s.disabled?"":void 0},get onPointerDown(){return wt([s.onPointerDown,y.onPointerDown])},get onPointerUp(){return wt([s.onPointerUp,y.onPointerUp])},get onClick(){return wt([m,y.onClick])},get onKeyDown(){return wt([b,y.onKeyDown])},get onMouseDown(){return wt([s.onMouseDown,y.onMouseDown])},get onFocus(){return wt([s.onFocus,y.onFocus])},onPointerMove:p,onPointerLeave:v},()=>r.dataset(),o))}function GM(e){const t=uc(),n=`menu-${Ln()}`,r=Ge({id:n,modal:!0},e),[i,s]=Ze(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),o=S1({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:l=>{var u;return(u=i.onOpenChange)==null?void 0:u.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,u;return(u=(l=i.orientation)!=null?l:t==null?void 0:t.orientation())!=null?u:"horizontal"}};return L(R1.Provider,{value:a,get children(){return L(J1,Pe({get open(){return o.isOpen()},get onOpenChange(){return o.setIsOpen}},s))}})}var KM={};oc(KM,{Root:()=>cc,Separator:()=>VM});function cc(e){let t;const n=Ge({orientation:"horizontal"},e),[r,i]=Ze(n,["ref","orientation"]),s=sc(()=>t,()=>"hr");return L(dt,Pe({as:"hr",ref(o){const a=zt(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 VM=cc,mt={};oc(mt,{Arrow:()=>Ch,CheckboxItem:()=>N1,Content:()=>rx,DropdownMenu:()=>WM,Group:()=>Oh,GroupLabel:()=>H1,Icon:()=>U1,Item:()=>G1,ItemDescription:()=>K1,ItemIndicator:()=>V1,ItemLabel:()=>W1,Portal:()=>Q1,RadioGroup:()=>X1,RadioItem:()=>Z1,Root:()=>ix,Separator:()=>cc,Sub:()=>ex,SubContent:()=>tx,SubTrigger:()=>nx,Trigger:()=>F1});function rx(e){const t=ur(),n=Dr(),[r,i]=Ze(e,["onCloseAutoFocus","onInteractOutside"]);let s=!1;return L(NM,Pe({onCloseAutoFocus:l=>{var u;(u=r.onCloseAutoFocus)==null||u.call(r,l),s||Mt(n.triggerRef()),s=!1,l.preventDefault()},onInteractOutside:l=>{var u;(u=r.onInteractOutside)==null||u.call(r,l),(!t.isModal()||l.detail.isContextMenu)&&(s=!0)}},i))}function ix(e){const t=`dropdownmenu-${Ln()}`,n=Ge({id:t},e);return L(GM,n)}var WM=Object.assign(ix,{Arrow:Ch,CheckboxItem:N1,Content:rx,Group:Oh,GroupLabel:H1,Icon:U1,Item:G1,ItemDescription:K1,ItemIndicator:V1,ItemLabel:W1,Portal:Q1,RadioGroup:X1,RadioItem:Z1,Separator:cc,Sub:ex,SubContent:tx,SubTrigger:nx,Trigger:F1}),W={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"}},QM=ce('<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>'),YM=ce('<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>'),XM=ce('<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>'),ZM=ce('<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>'),Eh=ce('<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>'),JM=ce('<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>'),e$=ce('<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>'),t$=ce('<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>'),n$=ce('<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">'),r$=ce('<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">'),i$=ce('<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>'),s$=ce('<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>'),o$=ce('<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>'),a$=ce('<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>'),sx=ce('<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>'),l$=ce('<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>'),u$=ce('<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>'),c$=ce('<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>'),d$=ce('<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>'),f$=ce('<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>'),h$=ce('<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>'),g$=ce('<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>'),y$=ce('<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 m$(){return QM()}function ox(){return YM()}function Jo(){return XM()}function $m(){return ZM()}function Lm(){return Eh()}function p$(){return(()=>{var e=Eh();return e.style.setProperty("transform","rotate(90deg)"),e})()}function v$(){return(()=>{var e=Eh();return e.style.setProperty("transform","rotate(-90deg)"),e})()}function b$(){return JM()}function x$(){return e$()}function w$(){return t$()}function S$(){return n$()}function C$(){return r$()}function _$(){return i$()}function k$(){return s$()}function O$(){return o$()}function E$(){return a$()}function A$(e){return(()=>{var t=sx(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#12B76A":"#027A48")),t})()}function T$(){return l$()}function P$(){return u$()}function j$(e){return[L(xe,{get when(){return e.checked},get children(){var t=sx(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}}),L(xe,{get when(){return!e.checked},get children(){var t=c$(),n=t.firstChild;return we(()=>re(n,"stroke",e.theme==="dark"?"#9B8AFB":"#6938EF")),t}})]}function M$(){return d$()}function $$(){return f$()}function L$(){return h$()}function D$(){return g$()}function Dm(){const e=Ln();return(()=>{var t=y$(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,s=i.firstChild,o=i.nextSibling,a=o.firstChild,l=o.nextSibling,u=l.nextSibling,c=u.firstChild,d=u.nextSibling,f=d.firstChild,h=d.nextSibling,y=h.nextSibling,m=y.firstChild,p=y.nextSibling,v=p.firstChild,b=p.nextSibling,S=b.nextSibling,C=S.firstChild,x=S.nextSibling,k=x.firstChild,w=x.nextSibling,_=w.nextSibling,O=_.firstChild,A=_.nextSibling,T=A.firstChild,j=A.nextSibling,B=j.nextSibling,R=B.firstChild,P=B.nextSibling,M=P.firstChild,I=P.nextSibling,G=I.nextSibling,Y=G.firstChild,q=G.nextSibling,U=q.firstChild,z=q.nextSibling,V=z.firstChild,N=V.nextSibling,ne=N.nextSibling,J=ne.nextSibling,he=J.nextSibling,X=z.nextSibling,ge=X.firstChild,ye=X.nextSibling,je=ye.firstChild,se=ye.nextSibling,nt=se.firstChild,Ie=nt.nextSibling,st=Ie.nextSibling,ze=st.firstChild,Ke=ze.nextSibling,ee=Ke.nextSibling,$e=ee.nextSibling,ot=$e.nextSibling,Ne=ot.nextSibling,Le=Ne.nextSibling,de=Le.nextSibling,me=de.nextSibling,fe=me.nextSibling,Fe=fe.nextSibling,Zt=Fe.nextSibling,It=se.nextSibling,Jt=It.firstChild,en=It.nextSibling,Ae=en.firstChild,Ve=en.nextSibling,oe=Ve.firstChild,pe=oe.nextSibling,Oe=Ve.nextSibling,Ee=Oe.firstChild,He=Oe.nextSibling,Et=He.firstChild,tn=He.nextSibling,mi=tn.firstChild,yo=mi.nextSibling,rs=yo.nextSibling,jh=rs.nextSibling,Mh=jh.nextSibling,$h=Mh.nextSibling,Lh=$h.nextSibling,Dh=Lh.nextSibling,Ih=Dh.nextSibling,Rh=Ih.nextSibling,Nh=Rh.nextSibling,Fh=Nh.nextSibling,Bh=Fh.nextSibling,qh=Bh.nextSibling,zh=qh.nextSibling,Hh=zh.nextSibling,Uh=Hh.nextSibling,xx=Uh.nextSibling;return re(n,"id",`a-${e}`),re(r,"fill",`url(#a-${e})`),re(s,"id",`am-${e}`),re(o,"id",`b-${e}`),re(a,"filter",`url(#am-${e})`),re(l,"mask",`url(#b-${e})`),re(c,"id",`ah-${e}`),re(d,"id",`k-${e}`),re(f,"filter",`url(#ah-${e})`),re(h,"mask",`url(#k-${e})`),re(m,"id",`ae-${e}`),re(p,"id",`j-${e}`),re(v,"filter",`url(#ae-${e})`),re(b,"mask",`url(#j-${e})`),re(C,"id",`ai-${e}`),re(x,"id",`i-${e}`),re(k,"filter",`url(#ai-${e})`),re(w,"mask",`url(#i-${e})`),re(O,"id",`aj-${e}`),re(A,"id",`h-${e}`),re(T,"filter",`url(#aj-${e})`),re(j,"mask",`url(#h-${e})`),re(R,"id",`ag-${e}`),re(P,"id",`g-${e}`),re(M,"filter",`url(#ag-${e})`),re(I,"mask",`url(#g-${e})`),re(Y,"id",`af-${e}`),re(q,"id",`f-${e}`),re(U,"filter",`url(#af-${e})`),re(z,"mask",`url(#f-${e})`),re(J,"id",`m-${e}`),re(he,"fill",`url(#m-${e})`),re(ge,"id",`ak-${e}`),re(ye,"id",`e-${e}`),re(je,"filter",`url(#ak-${e})`),re(se,"mask",`url(#e-${e})`),re(nt,"id",`n-${e}`),re(Ie,"fill",`url(#n-${e})`),re(ze,"id",`r-${e}`),re(Ke,"fill",`url(#r-${e})`),re(ee,"id",`s-${e}`),re($e,"fill",`url(#s-${e})`),re(ot,"id",`q-${e}`),re(Ne,"fill",`url(#q-${e})`),re(Le,"id",`p-${e}`),re(de,"fill",`url(#p-${e})`),re(me,"id",`o-${e}`),re(fe,"fill",`url(#o-${e})`),re(Fe,"id",`l-${e}`),re(Zt,"fill",`url(#l-${e})`),re(Jt,"id",`al-${e}`),re(en,"id",`d-${e}`),re(Ae,"filter",`url(#al-${e})`),re(Ve,"mask",`url(#d-${e})`),re(oe,"id",`u-${e}`),re(pe,"fill",`url(#u-${e})`),re(Ee,"id",`ad-${e}`),re(He,"id",`c-${e}`),re(Et,"filter",`url(#ad-${e})`),re(tn,"mask",`url(#c-${e})`),re(mi,"id",`t-${e}`),re(yo,"fill",`url(#t-${e})`),re(rs,"id",`v-${e}`),re(jh,"stroke",`url(#v-${e})`),re(Mh,"id",`aa-${e}`),re($h,"stroke",`url(#aa-${e})`),re(Lh,"id",`w-${e}`),re(Dh,"stroke",`url(#w-${e})`),re(Ih,"id",`ac-${e}`),re(Rh,"stroke",`url(#ac-${e})`),re(Nh,"id",`ab-${e}`),re(Fh,"stroke",`url(#ab-${e})`),re(Bh,"id",`y-${e}`),re(qh,"stroke",`url(#y-${e})`),re(zh,"id",`x-${e}`),re(Hh,"stroke",`url(#x-${e})`),re(Uh,"id",`z-${e}`),re(xx,"stroke",`url(#z-${e})`),t})()}var I$=ce('<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>'),R$=ce('<button title="Copy object to clipboard">'),N$=ce('<button title="Remove all items"aria-label="Remove all items">'),F$=ce('<button title="Delete item"aria-label="Delete item">'),B$=ce('<button title="Toggle value"aria-label="Toggle value">'),q$=ce('<button title="Bulk Edit Data"aria-label="Bulk Edit Data">'),jo=ce("<div>"),z$=ce("<div><button> <span></span> <span> "),H$=ce("<input>"),Im=ce("<span>"),U$=ce("<div><span>:"),G$=ce("<div><div><button> [<!>...<!>]");function K$(e,t){let n=0;const r=[];for(;n<e.length;)r.push(e.slice(n,n+t)),n=n+t;return r}var Rm=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n));return(()=>{var i=I$();return we(()=>ie(i,ue(r().expander,n`
|
|
73
73
|
transform: rotate(${e.expanded?90:0}deg);
|
|
74
74
|
`,e.expanded&&n`
|
|
75
75
|
& svg {
|
|
76
76
|
top: -1px;
|
|
77
77
|
}
|
|
78
|
-
`))),i})()},
|
|
78
|
+
`))),i})()},V$=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n)),[i,s]=ae("NoCopy");return(()=>{var o=R$();return mv(o,"click",i()==="NoCopy"?()=>{navigator.clipboard.writeText(US(e.value)).then(()=>{s("SuccessCopy"),setTimeout(()=>{s("NoCopy")},1500)},a=>{s("ErrorCopy"),setTimeout(()=>{s("NoCopy")},1500)})}:void 0,!0),Q(o,L(K3,{get children(){return[L(bc,{get when(){return i()==="NoCopy"},get children(){return L(O$,{})}}),L(bc,{get when(){return i()==="SuccessCopy"},get children(){return L(A$,{get theme(){return t()}})}}),L(bc,{get when(){return i()==="ErrorCopy"},get children(){return L(T$,{})}})]}})),we(a=>{var l=r().actionButton,u=`${i()==="NoCopy"?"Copy object to clipboard":i()==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard"}`;return l!==a.e&&ie(o,a.e=l),u!==a.t&&re(o,"aria-label",a.t=u),a},{e:void 0,t:void 0}),o})()},W$=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n)),i=ve().client;return(()=>{var s=N$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=ki(o,e.dataPath,[]);i.setQueryData(e.activeQuery.queryKey,a)},Q(s,L(P$,{})),we(()=>ie(s,r().actionButton)),s})()},Nm=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n)),i=ve().client;return(()=>{var s=F$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=Do(o,e.dataPath);i.setQueryData(e.activeQuery.queryKey,a)},Q(s,L(ox,{})),we(()=>ie(s,ue(r().actionButton))),s})()},Q$=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n)),i=ve().client;return(()=>{var s=B$();return s.$$click=()=>{const o=e.activeQuery.state.data,a=ki(o,e.dataPath,!e.value);i.setQueryData(e.activeQuery.queryKey,a)},Q(s,L(j$,{get theme(){return t()},get checked(){return e.value}})),we(()=>ie(s,ue(r().actionButton,n`
|
|
79
79
|
width: ${W.size[3.5]};
|
|
80
80
|
height: ${W.size[3.5]};
|
|
81
|
-
`))),s})()};function
|
|
81
|
+
`))),s})()};function Fm(e){return Symbol.iterator in e}function ti(e){var y;const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?go(n):ho(n)),i=ve().client,[s,o]=ae((e.defaultExpanded||[]).includes(e.label)),a=()=>o(m=>!m),[l,u]=ae([]),c=K(()=>Array.isArray(e.value)?e.value.map((m,p)=>({label:p.toString(),value:m})):e.value!==null&&typeof e.value=="object"&&Fm(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=K(()=>Array.isArray(e.value)?"array":e.value!==null&&typeof e.value=="object"&&Fm(e.value)&&typeof e.value[Symbol.iterator]=="function"?"Iterable":typeof e.value=="object"&&e.value!==null?"object":typeof e.value),f=K(()=>K$(c(),100)),h=(y=e.dataPath)!=null?y:[];return(()=>{var m=jo();return Q(m,L(xe,{get when(){return f().length},get children(){return[(()=>{var p=z$(),v=p.firstChild,b=v.firstChild,S=b.nextSibling,C=S.nextSibling,x=C.nextSibling,k=x.firstChild;return v.$$click=()=>a(),Q(v,L(Rm,{get expanded(){return s()}}),b),Q(S,()=>e.label),Q(x,()=>String(d()).toLowerCase()==="iterable"?"(Iterable) ":"",k),Q(x,()=>c().length,k),Q(x,()=>c().length>1?"items":"item",null),Q(p,L(xe,{get when(){return e.editable},get children(){var w=jo();return Q(w,L(V$,{get value(){return e.value}}),null),Q(w,L(xe,{get when(){return e.itemsDeletable&&e.activeQuery!==void 0},get children(){return L(Nm,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Q(w,L(xe,{get when(){return d()==="array"&&e.activeQuery!==void 0},get children(){return L(W$,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),Q(w,L(xe,{get when(){return K(()=>!!e.onEdit)()&&!Dv(e.value).meta},get children(){var _=q$();return _.$$click=()=>{var O;(O=e.onEdit)==null||O.call(e)},Q(_,L(E$,{})),we(()=>ie(_,r().actionButton)),_}}),null),we(()=>ie(w,r().actions)),w}}),null),we(w=>{var _=r().expanderButtonContainer,O=r().expanderButton,A=r().info;return _!==w.e&&ie(p,w.e=_),O!==w.t&&ie(v,w.t=O),A!==w.a&&ie(x,w.a=A),w},{e:void 0,t:void 0,a:void 0}),p})(),L(xe,{get when(){return s()},get children(){return[L(xe,{get when(){return f().length===1},get children(){var p=jo();return Q(p,L(vu,{get each(){return c()},by:v=>v.label,children:v=>L(ti,{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"}})})),we(()=>ie(p,r().subEntry)),p}}),L(xe,{get when(){return f().length>1},get children(){var p=jo();return Q(p,L(G3,{get each(){return f()},children:(v,b)=>(()=>{var S=G$(),C=S.firstChild,x=C.firstChild,k=x.firstChild,w=k.nextSibling,_=w.nextSibling,O=_.nextSibling;return O.nextSibling,x.$$click=()=>u(A=>A.includes(b)?A.filter(T=>T!==b):[...A,b]),Q(x,L(Rm,{get expanded(){return l().includes(b)}}),k),Q(x,b*100,w),Q(x,b*100+100-1,O),Q(C,L(xe,{get when(){return l().includes(b)},get children(){var A=jo();return Q(A,L(vu,{get each(){return v()},by:T=>T.label,children:T=>L(ti,{get defaultExpanded(){return e.defaultExpanded},get label(){return T().label},get value(){return T().value},get editable(){return e.editable},get dataPath(){return[...h,T().label]},get activeQuery(){return e.activeQuery}})})),we(()=>ie(A,r().subEntry)),A}}),null),we(A=>{var T=r().entry,j=r().expanderButton;return T!==A.e&&ie(C,A.e=T),j!==A.t&&ie(x,A.t=j),A},{e:void 0,t:void 0}),S})()})),we(()=>ie(p,r().subEntry)),p}})]}})]}}),null),Q(m,L(xe,{get when(){return f().length===0},get children(){var p=U$(),v=p.firstChild,b=v.firstChild;return Q(v,()=>e.label,b),Q(p,L(xe,{get when(){return K(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number"||d()==="boolean")},get fallback(){return(()=>{var S=Im();return Q(S,()=>nu(e.value)),we(()=>ie(S,r().value)),S})()},get children(){return[L(xe,{get when(){return K(()=>!!(e.editable&&e.activeQuery!==void 0))()&&(d()==="string"||d()==="number")},get children(){var S=H$();return S.addEventListener("change",C=>{const x=e.activeQuery.state.data,k=ki(x,h,d()==="number"?C.target.valueAsNumber:C.target.value);i.setQueryData(e.activeQuery.queryKey,k)}),we(C=>{var x=d()==="number"?"number":"text",k=ue(r().value,r().editableInput);return x!==C.e&&re(S,"type",C.e=x),k!==C.t&&ie(S,C.t=k),C},{e:void 0,t:void 0}),we(()=>S.value=e.value),S}}),L(xe,{get when(){return d()==="boolean"},get children(){var S=Im();return Q(S,L(Q$,{get activeQuery(){return e.activeQuery},dataPath:h,get value(){return e.value}}),null),Q(S,()=>nu(e.value),null),we(()=>ie(S,ue(r().value,r().actions,r().editableInput))),S}})]}}),null),Q(p,L(xe,{get when(){return e.editable&&e.itemsDeletable&&e.activeQuery!==void 0},get children(){return L(Nm,{get activeQuery(){return e.activeQuery},dataPath:h})}}),null),we(S=>{var C=r().row,x=r().label;return C!==S.e&&ie(p,S.e=C),x!==S.t&&ie(v,S.t=x),S},{e:void 0,t:void 0}),p}}),null),we(()=>ie(m,r().entry)),m})()}var ax=(e,t)=>{const{colors:n,font:r,size:i,border:s}=W,o=(a,l)=>e==="light"?a:l;return{entry:t`
|
|
82
82
|
& * {
|
|
83
83
|
font-size: ${r.size.xs};
|
|
84
84
|
font-family:
|
|
@@ -190,7 +190,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
190
190
|
outline: 2px solid ${n.blue[800]};
|
|
191
191
|
outline-offset: 2px;
|
|
192
192
|
}
|
|
193
|
-
`}},
|
|
193
|
+
`}},ho=e=>ax("light",e),go=e=>ax("dark",e);Mu(["click"]);var Y$=ce('<div><div aria-hidden=true></div><button type=button aria-label="Open Tanstack query devtools"class=tsqd-open-btn>'),il=ce("<div>"),X$=ce('<aside aria-label="Tanstack query devtools"><div></div><button aria-label="Close tanstack query devtools">'),Z$=ce("<select name=tsqd-queries-filter-sort>"),J$=ce("<select name=tsqd-mutations-filter-sort>"),eL=ce("<span>Asc"),tL=ce("<span>Desc"),nL=ce('<button aria-label="Open in picture-in-picture mode"title="Open in picture-in-picture mode">'),rL=ce("<div>Settings"),iL=ce("<span>Position"),sL=ce("<span>Top"),oL=ce("<span>Bottom"),aL=ce("<span>Left"),lL=ce("<span>Right"),uL=ce("<span>Theme"),cL=ce("<span>Light"),dL=ce("<span>Dark"),fL=ce("<span>System"),hL=ce("<div><div class=tsqd-queries-container>"),gL=ce("<div><div class=tsqd-mutations-container>"),yL=ce('<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>'),Bm=ce("<option>Sort by "),mL=ce("<div class=tsqd-query-disabled-indicator>disabled"),pL=ce("<div class=tsqd-query-static-indicator>static"),lx=ce("<button><div></div><code class=tsqd-query-hash>"),vL=ce("<div role=tooltip id=tsqd-status-tooltip>"),bL=ce("<span>"),xL=ce("<button><span></span><span>"),wL=ce("<button><span></span> Error"),SL=ce('<div><span></span>Trigger Error<select><option value=""disabled selected>'),CL=ce('<div class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer">'),_L=ce("<form><textarea name=data></textarea><div><span></span><div><button type=button>Cancel</button><button>Save"),kL=ce('<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">'),OL=ce("<option>"),EL=ce('<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">'),[gn,dc]=ae(null),[ii,ux]=ae(null),[Bn,Ah]=ae(0),[Mo,AL]=ae(!1),TL=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n)),i=K(()=>ve().onlineManager);Pr(()=>{const d=i().subscribe(f=>{AL(!f)});Ce(()=>{d()})});const s=lh(),o=K(()=>ve().buttonPosition||PT),a=K(()=>e.localStore.open==="true"?!0:e.localStore.open==="false"?!1:ve().initialIsOpen||jT),l=K(()=>e.localStore.position||ve().position||af);let u;Se(()=>{const d=u.parentElement,f=e.localStore.height||$b,h=e.localStore.width||Lb,y=l();d.style.setProperty("--tsqd-panel-height",`${y==="top"?"-":""}${f}px`),d.style.setProperty("--tsqd-panel-width",`${y==="left"?"-":""}${h}px`)}),Pr(()=>{const d=()=>{const f=u.parentElement,h=getComputedStyle(f).fontSize;f.style.setProperty("--tsqd-font-size",h)};d(),window.addEventListener("focus",d),Ce(()=>{window.removeEventListener("focus",d)})});const c=K(()=>{var d;return(d=e.localStore.pip_open)!=null?d:"false"});return[L(xe,{get when(){return K(()=>!!s().pipWindow)()&&c()=="true"},get children(){return L(xv,{get mount(){var d;return(d=s().pipWindow)==null?void 0:d.document.body},get children(){return L(PL,{get children(){return L(Th,e)}})}})}}),(()=>{var d=il(),f=u;return typeof f=="function"?so(f,d):u=d,Q(d,L(nm,{name:"tsqd-panel-transition",get children(){return L(xe,{get when(){return K(()=>!!(a()&&!s().pipWindow))()&&c()=="false"},get children(){return L(ML,{get localStore(){return e.localStore},get setLocalStore(){return e.setLocalStore}})}})}}),null),Q(d,L(nm,{name:"tsqd-button-transition",get children(){return L(xe,{get when(){return!a()},get children(){var h=Y$(),y=h.firstChild,m=y.nextSibling;return Q(y,L(Dm,{})),m.$$click=()=>e.setLocalStore("open","true"),Q(m,L(Dm,{})),we(()=>ie(h,ue(r().devtoolsBtn,r()[`devtoolsBtn-position-${o()}`],"tsqd-open-btn-container"))),h}})}}),null),we(()=>ie(d,ue(n`
|
|
194
194
|
& .tsqd-panel-transition-exit-active,
|
|
195
195
|
& .tsqd-panel-transition-enter-active {
|
|
196
196
|
transition:
|
|
@@ -216,62 +216,62 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216
216
|
transform: ${o()==="relative"?"none;":o()==="top-left"?"translateX(-72px);":o()==="top-right"?"translateX(72px);":"translateY(72px);"};
|
|
217
217
|
opacity: 0;
|
|
218
218
|
}
|
|
219
|
-
`,"tsqd-transitions-container"))),d})()]},
|
|
219
|
+
`,"tsqd-transitions-container"))),d})()]},PL=e=>{const t=lh(),n=Ct(),r=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,i=K(()=>n()==="dark"?In(r):Dn(r)),s=()=>{const{colors:o}=W,a=(l,u)=>n()==="dark"?u:l;return Bn()<Wi?r`
|
|
220
220
|
flex-direction: column;
|
|
221
221
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
222
222
|
`:r`
|
|
223
223
|
flex-direction: row;
|
|
224
224
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
225
|
-
`};return Se(()=>{const o=t().pipWindow,a=()=>{o&&
|
|
225
|
+
`};return Se(()=>{const o=t().pipWindow,a=()=>{o&&Ah(o.innerWidth)};o&&(o.addEventListener("resize",a),a()),Ce(()=>{o&&o.removeEventListener("resize",a)})}),(()=>{var o=il();return o.style.setProperty("--tsqd-font-size","16px"),o.style.setProperty("max-height","100vh"),o.style.setProperty("height","100vh"),o.style.setProperty("width","100vw"),Q(o,()=>e.children),we(()=>ie(o,ue(i().panel,s(),{[r`
|
|
226
226
|
min-width: min-content;
|
|
227
|
-
`]:Bn()<
|
|
227
|
+
`]:Bn()<oh},"tsqd-main-panel"))),o})()},jL=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n));let i;Pr(()=>{qb(i,({width:o},a)=>{a===i&&Ah(o)})});const s=()=>{const{colors:o}=W,a=(l,u)=>t()==="dark"?u:l;return Bn()<Wi?n`
|
|
228
228
|
flex-direction: column;
|
|
229
229
|
background-color: ${a(o.gray[300],o.gray[600])};
|
|
230
230
|
`:n`
|
|
231
231
|
flex-direction: row;
|
|
232
232
|
background-color: ${a(o.gray[200],o.darkGray[900])};
|
|
233
|
-
`};return(()=>{var o=
|
|
233
|
+
`};return(()=>{var o=il(),a=i;return typeof a=="function"?so(a,o):i=o,o.style.setProperty("--tsqd-font-size","16px"),Q(o,()=>e.children),we(()=>ie(o,ue(r().parentPanel,s(),{[n`
|
|
234
234
|
min-width: min-content;
|
|
235
|
-
`]:Bn()<
|
|
235
|
+
`]:Bn()<oh},"tsqd-main-panel"))),o})()},ML=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n)),[i,s]=ae(!1),o=K(()=>e.localStore.position||ve().position||af),a=c=>{const d=c.currentTarget.parentElement;if(!d)return;s(!0);const{height:f,width:h}=d.getBoundingClientRect(),y=c.clientX,m=c.clientY;let p=0;const v=g0(3.5),b=g0(12),S=x=>{if(x.preventDefault(),o()==="left"||o()==="right"){const k=o()==="right"?y-x.clientX:x.clientX-y;p=Math.round(h+k),p<b&&(p=b),e.setLocalStore("width",String(Math.round(p)));const w=d.getBoundingClientRect().width;Number(e.localStore.width)<w&&e.setLocalStore("width",String(w))}else{const k=o()==="bottom"?m-x.clientY:x.clientY-m;p=Math.round(f+k),p<v&&(p=v,dc(null)),e.setLocalStore("height",String(Math.round(p)))}},C=()=>{i()&&s(!1),document.removeEventListener("mousemove",S,!1),document.removeEventListener("mouseUp",C,!1)};document.addEventListener("mousemove",S,!1),document.addEventListener("mouseup",C,!1)};let l;Pr(()=>{qb(l,({width:c},d)=>{d===l&&Ah(c)})}),Se(()=>{var m,p;const c=(p=(m=l.parentElement)==null?void 0:m.parentElement)==null?void 0:p.parentElement;if(!c)return;const d=e.localStore.position||af,f=GS("padding",d),h=e.localStore.position==="left"||e.localStore.position==="right",y=(({padding:v,paddingTop:b,paddingBottom:S,paddingLeft:C,paddingRight:x})=>({padding:v,paddingTop:b,paddingBottom:S,paddingLeft:C,paddingRight:x}))(c.style);c.style[f]=`${h?e.localStore.width:e.localStore.height}px`,Ce(()=>{Object.entries(y).forEach(([v,b])=>{c.style[v]=b})})});const u=()=>{const{colors:c}=W,d=(f,h)=>t()==="dark"?h:f;return Bn()<Wi?n`
|
|
236
236
|
flex-direction: column;
|
|
237
237
|
background-color: ${d(c.gray[300],c.gray[600])};
|
|
238
238
|
`:n`
|
|
239
239
|
flex-direction: row;
|
|
240
240
|
background-color: ${d(c.gray[200],c.darkGray[900])};
|
|
241
|
-
`};return(()=>{var c=
|
|
241
|
+
`};return(()=>{var c=X$(),d=c.firstChild,f=d.nextSibling,h=l;return typeof h=="function"?so(h,c):l=c,d.$$mousedown=a,f.$$click=()=>e.setLocalStore("open","false"),Q(f,L(Jo,{})),Q(c,L(Th,e),null),we(y=>{var m=ue(r().panel,r()[`panel-position-${o()}`],u(),{[n`
|
|
242
242
|
min-width: min-content;
|
|
243
|
-
`]:Bn()<
|
|
243
|
+
`]:Bn()<oh&&(o()==="right"||o()==="left")},"tsqd-main-panel"),p=o()==="bottom"||o()==="top"?`${e.localStore.height||$b}px`:"auto",v=o()==="right"||o()==="left"?`${e.localStore.width||Lb}px`:"auto",b=ue(r().dragHandle,r()[`dragHandle-position-${o()}`],"tsqd-drag-handle"),S=ue(r().closeBtn,r()[`closeBtn-position-${o()}`],"tsqd-minimize-btn");return m!==y.e&&ie(c,y.e=m),p!==y.t&&((y.t=p)!=null?c.style.setProperty("height",p):c.style.removeProperty("height")),v!==y.a&&((y.a=v)!=null?c.style.setProperty("width",v):c.style.removeProperty("width")),b!==y.o&&ie(d,y.o=b),S!==y.i&&ie(f,y.i=S),y},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),c})()},Th=e=>{FL(),BL();let t;const n=Ct(),r=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,i=K(()=>n()==="dark"?In(r):Dn(r)),s=lh(),[o,a]=ae("queries"),l=K(()=>e.localStore.sort||$T),u=K(()=>Number(e.localStore.sortOrder)||Qy),c=K(()=>e.localStore.mutationSort||LT),d=K(()=>Number(e.localStore.mutationSortOrder)||Qy),f=K(()=>Ad[l()]),h=K(()=>Td[c()]),y=K(()=>ve().onlineManager),m=K(()=>ve().client.getQueryCache()),p=K(()=>ve().client.getMutationCache()),v=xt(w=>w().getAll().length,!1),b=K(Tr(()=>[v(),e.localStore.filter,l(),u()],()=>{const w=m().getAll(),_=e.localStore.filter?w.filter(A=>Yy(A.queryHash,e.localStore.filter||"").passed):[...w];return f()?_.sort((A,T)=>f()(A,T)*u()):_})),S=Fn(w=>w().getAll().length,!1),C=K(Tr(()=>[S(),e.localStore.mutationFilter,c(),d()],()=>{const w=p().getAll(),_=e.localStore.mutationFilter?w.filter(A=>{const T=`${A.options.mutationKey?JSON.stringify(A.options.mutationKey)+" - ":""}${new Date(A.state.submittedAt).toLocaleString()}`;return Yy(T,e.localStore.mutationFilter||"").passed}):[...w];return h()?_.sort((A,T)=>h()(A,T)*d()):_})),x=w=>{e.setLocalStore("position",w)},k=w=>{const O=getComputedStyle(t).getPropertyValue("--tsqd-font-size");w.style.setProperty("--tsqd-font-size",O)};return[(()=>{var w=yL(),_=w.firstChild,O=_.firstChild,A=O.firstChild,T=A.firstChild,j=T.nextSibling,B=j.firstChild,R=_.nextSibling,P=R.firstChild,M=P.firstChild,I=M.firstChild,G=M.nextSibling,Y=G.nextSibling,q=P.nextSibling,U=q.firstChild,z=U.nextSibling,V=t;return typeof V=="function"?so(V,w):t=w,A.$$click=()=>{if(!s().pipWindow&&!e.showPanelViewOnly){e.setLocalStore("open","false");return}e.onClose&&e.onClose()},Q(j,()=>ve().queryFlavor,B),Q(j,()=>ve().version,null),Q(O,L(kn.Root,{get class(){return ue(i().viewToggle)},get value(){return o()},onChange:N=>{a(N),dc(null),ux(null)},get children(){return[L(kn.Item,{value:"queries",class:"tsqd-radio-toggle",get children(){return[L(kn.ItemInput,{}),L(kn.ItemControl,{get children(){return L(kn.ItemIndicator,{})}}),L(kn.ItemLabel,{title:"Toggle Queries View",children:"Queries"})]}}),L(kn.Item,{value:"mutations",class:"tsqd-radio-toggle",get children(){return[L(kn.ItemInput,{}),L(kn.ItemControl,{get children(){return L(kn.ItemIndicator,{})}}),L(kn.ItemLabel,{title:"Toggle Mutations View",children:"Mutations"})]}})]}}),null),Q(_,L(xe,{get when(){return o()==="queries"},get children(){return L(DL,{})}}),null),Q(_,L(xe,{get when(){return o()==="mutations"},get children(){return L(IL,{})}}),null),Q(M,L(m$,{}),I),I.$$input=N=>{o()==="queries"?e.setLocalStore("filter",N.currentTarget.value):e.setLocalStore("mutationFilter",N.currentTarget.value)},Q(G,L(xe,{get when(){return o()==="queries"},get children(){var N=Z$();return N.addEventListener("change",ne=>{e.setLocalStore("sort",ne.currentTarget.value)}),Q(N,()=>Object.keys(Ad).map(ne=>(()=>{var J=Bm();return J.firstChild,J.value=ne,Q(J,ne,null),J})())),we(()=>N.value=l()),N}}),null),Q(G,L(xe,{get when(){return o()==="mutations"},get children(){var N=J$();return N.addEventListener("change",ne=>{e.setLocalStore("mutationSort",ne.currentTarget.value)}),Q(N,()=>Object.keys(Td).map(ne=>(()=>{var J=Bm();return J.firstChild,J.value=ne,Q(J,ne,null),J})())),we(()=>N.value=c()),N}}),null),Q(G,L(Jo,{}),null),Y.$$click=()=>{o()==="queries"?e.setLocalStore("sortOrder",String(u()*-1)):e.setLocalStore("mutationSortOrder",String(d()*-1))},Q(Y,L(xe,{get when(){return(o()==="queries"?u():d())===1},get children(){return[eL(),L($m,{})]}}),null),Q(Y,L(xe,{get when(){return(o()==="queries"?u():d())===-1},get children(){return[tL(),L(Lm,{})]}}),null),U.$$click=()=>{o()==="queries"?(Jn({type:"CLEAR_QUERY_CACHE"}),m().clear()):(Jn({type:"CLEAR_MUTATION_CACHE"}),p().clear())},Q(U,L(ox,{})),z.$$click=()=>{y().setOnline(!y().isOnline())},Q(z,(()=>{var N=K(()=>!!Mo());return()=>N()?L(C$,{}):L(S$,{})})()),Q(q,L(xe,{get when(){return K(()=>!s().pipWindow)()&&!s().disabled},get children(){var N=nL();return N.$$click=()=>{var ne;s().requestPipWindow(Number(window.innerWidth),Number((ne=e.localStore.height)!=null?ne:500))},Q(N,L(k$,{})),we(()=>ie(N,ue(i().actionsBtn,"tsqd-actions-btn","tsqd-action-open-pip"))),N}}),null),Q(q,L(mt.Root,{gutter:4,get children(){return[L(mt.Trigger,{get class(){return ue(i().actionsBtn,"tsqd-actions-btn","tsqd-action-settings")},get children(){return L(_$,{})}}),L(mt.Portal,{ref:N=>k(N),get mount(){return K(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(mt.Content,{get class(){return ue(i().settingsMenu,"tsqd-settings-menu")},get children(){return[(()=>{var N=rL();return we(()=>ie(N,ue(i().settingsMenuHeader,"tsqd-settings-menu-header"))),N})(),L(xe,{get when(){return!e.showPanelViewOnly},get children(){return L(mt.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[L(mt.SubTrigger,{get class(){return ue(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[iL(),L(Jo,{})]}}),L(mt.Portal,{ref:N=>k(N),get mount(){return K(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(mt.SubContent,{get class(){return ue(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[L(mt.Item,{onSelect:()=>{x("top")},as:"button",get class(){return ue(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[sL(),L($m,{})]}}),L(mt.Item,{onSelect:()=>{x("bottom")},as:"button",get class(){return ue(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[oL(),L(Lm,{})]}}),L(mt.Item,{onSelect:()=>{x("left")},as:"button",get class(){return ue(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[aL(),L(p$,{})]}}),L(mt.Item,{onSelect:()=>{x("right")},as:"button",get class(){return ue(i().settingsSubButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-right")},get children(){return[lL(),L(v$,{})]}})]}})}})]}})}}),L(mt.Sub,{overlap:!0,gutter:8,shift:-4,get children(){return[L(mt.SubTrigger,{get class(){return ue(i().settingsSubTrigger,"tsqd-settings-menu-sub-trigger","tsqd-settings-menu-sub-trigger-position")},get children(){return[uL(),L(Jo,{})]}}),L(mt.Portal,{ref:N=>k(N),get mount(){return K(()=>!!s().pipWindow)()?s().pipWindow.document.body:document.body},get children(){return L(mt.SubContent,{get class(){return ue(i().settingsMenu,"tsqd-settings-submenu")},get children(){return[L(mt.Item,{onSelect:()=>{e.setLocalStore("theme_preference","light")},as:"button",get class(){return ue(i().settingsSubButton,e.localStore.theme_preference==="light"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-top")},get children(){return[cL(),L(b$,{})]}}),L(mt.Item,{onSelect:()=>{e.setLocalStore("theme_preference","dark")},as:"button",get class(){return ue(i().settingsSubButton,e.localStore.theme_preference==="dark"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-bottom")},get children(){return[dL(),L(x$,{})]}}),L(mt.Item,{onSelect:()=>{e.setLocalStore("theme_preference","system")},as:"button",get class(){return ue(i().settingsSubButton,e.localStore.theme_preference==="system"&&i().themeSelectedButton,"tsqd-settings-menu-position-btn","tsqd-settings-menu-position-btn-left")},get children(){return[fL(),L(w$,{})]}})]}})}})]}})]}})}})]}}),null),Q(w,L(xe,{get when(){return o()==="queries"},get children(){var N=hL(),ne=N.firstChild;return Q(ne,L(vu,{by:J=>J.queryHash,get each(){return b()},children:J=>L($L,{get query(){return J()}})})),we(()=>ie(N,ue(i().overflowQueryContainer,"tsqd-queries-overflow-container"))),N}}),null),Q(w,L(xe,{get when(){return o()==="mutations"},get children(){var N=gL(),ne=N.firstChild;return Q(ne,L(vu,{by:J=>J.mutationId,get each(){return C()},children:J=>L(LL,{get mutation(){return J()}})})),we(()=>ie(N,ue(i().overflowQueryContainer,"tsqd-mutations-overflow-container"))),N}}),null),we(N=>{var ne=ue(i().queriesContainer,Bn()<Wi&&(gn()||ii())&&r`
|
|
244
244
|
height: 50%;
|
|
245
245
|
max-height: 50%;
|
|
246
|
-
`,Bn()<
|
|
246
|
+
`,Bn()<Wi&&!(gn()||ii())&&r`
|
|
247
247
|
height: 100%;
|
|
248
248
|
max-height: 100%;
|
|
249
|
-
`,"tsqd-queries-container"),
|
|
249
|
+
`,"tsqd-queries-container"),J=ue(i().row,"tsqd-header"),he=i().logoAndToggleContainer,X=ue(i().logo,"tsqd-text-logo-container"),ge=ue(i().tanstackLogo,"tsqd-text-logo-tanstack"),ye=ue(i().queryFlavorLogo,"tsqd-text-logo-query-flavor"),je=ue(i().row,"tsqd-filters-actions-container"),se=ue(i().filtersContainer,"tsqd-filters-container"),nt=ue(i().filterInput,"tsqd-query-filter-textfield-container"),Ie=ue("tsqd-query-filter-textfield"),st=ue(i().filterSelect,"tsqd-query-filter-sort-container"),ze=`Sort order ${(o()==="queries"?u():d())===-1?"descending":"ascending"}`,Ke=(o()==="queries"?u():d())===-1,ee=ue(i().actionsContainer,"tsqd-actions-container"),$e=ue(i().actionsBtn,"tsqd-actions-btn","tsqd-action-clear-cache"),ot=`Clear ${o()} cache`,Ne=ue(i().actionsBtn,Mo()&&i().actionsBtnOffline,"tsqd-actions-btn","tsqd-action-mock-offline-behavior"),Le=`${Mo()?"Unset offline mocking behavior":"Mock offline behavior"}`,de=Mo(),me=`${Mo()?"Unset offline mocking behavior":"Mock offline behavior"}`;return ne!==N.e&&ie(w,N.e=ne),J!==N.t&&ie(_,N.t=J),he!==N.a&&ie(O,N.a=he),X!==N.o&&ie(A,N.o=X),ge!==N.i&&ie(T,N.i=ge),ye!==N.n&&ie(j,N.n=ye),je!==N.s&&ie(R,N.s=je),se!==N.h&&ie(P,N.h=se),nt!==N.r&&ie(M,N.r=nt),Ie!==N.d&&ie(I,N.d=Ie),st!==N.l&&ie(G,N.l=st),ze!==N.u&&re(Y,"aria-label",N.u=ze),Ke!==N.c&&re(Y,"aria-pressed",N.c=Ke),ee!==N.w&&ie(q,N.w=ee),$e!==N.m&&ie(U,N.m=$e),ot!==N.f&&re(U,"title",N.f=ot),Ne!==N.y&&ie(z,N.y=Ne),Le!==N.g&&re(z,"aria-label",N.g=Le),de!==N.p&&re(z,"aria-pressed",N.p=de),me!==N.b&&re(z,"title",N.b=me),N},{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}),we(()=>I.value=o()==="queries"?e.localStore.filter||"":e.localStore.mutationFilter||""),w})(),L(xe,{get when(){return K(()=>o()==="queries")()&&gn()},get children(){return L(RL,{})}}),L(xe,{get when(){return K(()=>o()==="mutations")()&&ii()},get children(){return L(NL,{})}})]},$L=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n)),{colors:i,alpha:s}=W,o=(y,m)=>t()==="dark"?m:y,a=xt(y=>{var m;return(m=y().find({queryKey:e.query.queryKey}))==null?void 0:m.state},!0,y=>y.query.queryHash===e.query.queryHash),l=xt(y=>{var m,p;return(p=(m=y().find({queryKey:e.query.queryKey}))==null?void 0:m.isDisabled())!=null?p:!1},!0,y=>y.query.queryHash===e.query.queryHash),u=xt(y=>{var m,p;return(p=(m=y().find({queryKey:e.query.queryKey}))==null?void 0:m.isStatic())!=null?p:!1},!0,y=>y.query.queryHash===e.query.queryHash),c=xt(y=>{var m,p;return(p=(m=y().find({queryKey:e.query.queryKey}))==null?void 0:m.isStale())!=null?p:!1},!0,y=>y.query.queryHash===e.query.queryHash),d=xt(y=>{var m,p;return(p=(m=y().find({queryKey:e.query.queryKey}))==null?void 0:m.getObserversCount())!=null?p:0},!0,y=>y.query.queryHash===e.query.queryHash),f=K(()=>KS({queryState:a(),observerCount:d(),isStale:c()})),h=()=>f()==="gray"?n`
|
|
250
250
|
background-color: ${o(i[f()][200],i[f()][700])};
|
|
251
251
|
color: ${o(i[f()][700],i[f()][300])};
|
|
252
252
|
`:n`
|
|
253
253
|
background-color: ${o(i[f()][200]+s[80],i[f()][900])};
|
|
254
254
|
color: ${o(i[f()][800],i[f()][300])};
|
|
255
|
-
`;return L(xe,{get when(){return a()},get children(){var y=
|
|
255
|
+
`;return L(xe,{get when(){return a()},get children(){var y=lx(),m=y.firstChild,p=m.nextSibling;return y.$$click=()=>dc(e.query.queryHash===gn()?null:e.query.queryHash),Q(m,d),Q(p,()=>e.query.queryHash),Q(y,L(xe,{get when(){return l()},get children(){return mL()}}),null),Q(y,L(xe,{get when(){return u()},get children(){return pL()}}),null),we(v=>{var b=ue(r().queryRow,gn()===e.query.queryHash&&r().selectedQueryRow,"tsqd-query-row"),S=`Query key ${e.query.queryHash}`,C=ue(h(),"tsqd-query-observer-count");return b!==v.e&&ie(y,v.e=b),S!==v.t&&re(y,"aria-label",v.t=S),C!==v.a&&ie(m,v.a=C),v},{e:void 0,t:void 0,a:void 0}),y}})},LL=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n)),{colors:i,alpha:s}=W,o=(f,h)=>t()==="dark"?h:f,a=Fn(f=>{const y=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return y==null?void 0:y.state}),l=Fn(f=>{const y=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return y?y.state.isPaused:!1}),u=Fn(f=>{const y=f().getAll().find(m=>m.mutationId===e.mutation.mutationId);return y?y.state.status:"idle"}),c=K(()=>gs({isPaused:l(),status:u()})),d=()=>c()==="gray"?n`
|
|
256
256
|
background-color: ${o(i[c()][200],i[c()][700])};
|
|
257
257
|
color: ${o(i[c()][700],i[c()][300])};
|
|
258
258
|
`:n`
|
|
259
259
|
background-color: ${o(i[c()][200]+s[80],i[c()][900])};
|
|
260
260
|
color: ${o(i[c()][800],i[c()][300])};
|
|
261
|
-
`;return L(xe,{get when(){return a()},get children(){var f=
|
|
261
|
+
`;return L(xe,{get when(){return a()},get children(){var f=lx(),h=f.firstChild,y=h.nextSibling;return f.$$click=()=>{ux(e.mutation.mutationId===ii()?null:e.mutation.mutationId)},Q(h,L(xe,{get when(){return c()==="purple"},get children(){return L(D$,{})}}),null),Q(h,L(xe,{get when(){return c()==="green"},get children(){return L(M$,{})}}),null),Q(h,L(xe,{get when(){return c()==="red"},get children(){return L(L$,{})}}),null),Q(h,L(xe,{get when(){return c()==="yellow"},get children(){return L($$,{})}}),null),Q(y,L(xe,{get when(){return e.mutation.options.mutationKey},get children(){return[K(()=>JSON.stringify(e.mutation.options.mutationKey))," -"," "]}}),null),Q(y,()=>new Date(e.mutation.state.submittedAt).toLocaleString(),null),we(m=>{var p=ue(r().queryRow,ii()===e.mutation.mutationId&&r().selectedQueryRow,"tsqd-query-row"),v=`Mutation submitted at ${new Date(e.mutation.state.submittedAt).toLocaleString()}`,b=ue(d(),"tsqd-query-observer-count");return p!==m.e&&ie(f,m.e=p),v!==m.t&&re(f,"aria-label",m.t=v),b!==m.a&&ie(h,m.a=b),m},{e:void 0,t:void 0,a:void 0}),f}})},DL=()=>{const e=xt(l=>l().getAll().filter(u=>us(u)==="stale").length),t=xt(l=>l().getAll().filter(u=>us(u)==="fresh").length),n=xt(l=>l().getAll().filter(u=>us(u)==="fetching").length),r=xt(l=>l().getAll().filter(u=>us(u)==="paused").length),i=xt(l=>l().getAll().filter(u=>us(u)==="inactive").length),s=Ct(),o=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,a=K(()=>s()==="dark"?In(o):Dn(o));return(()=>{var l=il();return Q(l,L(wr,{label:"Fresh",color:"green",get count(){return t()}}),null),Q(l,L(wr,{label:"Fetching",color:"blue",get count(){return n()}}),null),Q(l,L(wr,{label:"Paused",color:"purple",get count(){return r()}}),null),Q(l,L(wr,{label:"Stale",color:"yellow",get count(){return e()}}),null),Q(l,L(wr,{label:"Inactive",color:"gray",get count(){return i()}}),null),we(()=>ie(l,ue(a().queryStatusContainer,"tsqd-query-status-container"))),l})()},IL=()=>{const e=Fn(a=>a().getAll().filter(l=>gs({isPaused:l.state.isPaused,status:l.state.status})==="green").length),t=Fn(a=>a().getAll().filter(l=>gs({isPaused:l.state.isPaused,status:l.state.status})==="yellow").length),n=Fn(a=>a().getAll().filter(l=>gs({isPaused:l.state.isPaused,status:l.state.status})==="purple").length),r=Fn(a=>a().getAll().filter(l=>gs({isPaused:l.state.isPaused,status:l.state.status})==="red").length),i=Ct(),s=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,o=K(()=>i()==="dark"?In(s):Dn(s));return(()=>{var a=il();return Q(a,L(wr,{label:"Paused",color:"purple",get count(){return n()}}),null),Q(a,L(wr,{label:"Pending",color:"yellow",get count(){return t()}}),null),Q(a,L(wr,{label:"Success",color:"green",get count(){return e()}}),null),Q(a,L(wr,{label:"Error",color:"red",get count(){return r()}}),null),we(()=>ie(a,ue(o().queryStatusContainer,"tsqd-query-status-container"))),a})()},wr=e=>{const t=Ct(),n=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,r=K(()=>t()==="dark"?In(n):Dn(n)),{colors:i,alpha:s}=W,o=(h,y)=>t()==="dark"?y:h;let a;const[l,u]=ae(!1),[c,d]=ae(!1),f=K(()=>!(gn()&&Bn()<TT&&Bn()>Wi||Bn()<Wi));return(()=>{var h=xL(),y=h.firstChild,m=y.nextSibling,p=a;return typeof p=="function"?so(p,h):a=h,h.addEventListener("mouseleave",()=>{u(!1),d(!1)}),h.addEventListener("mouseenter",()=>u(!0)),h.addEventListener("blur",()=>d(!1)),h.addEventListener("focus",()=>d(!0)),pv(h,Pe({get disabled(){return f()},get class(){return ue(r().queryStatusTag,!f()&&n`
|
|
262
262
|
cursor: pointer;
|
|
263
263
|
&:hover {
|
|
264
264
|
background: ${o(i.gray[200],i.darkGray[400])}${s[80]};
|
|
265
265
|
}
|
|
266
|
-
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||c()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),Q(h,L(xe,{get when(){return
|
|
266
|
+
`,"tsqd-query-status-tag",`tsqd-query-status-tag-${e.label.toLowerCase()}`)}},()=>l()||c()?{"aria-describedby":"tsqd-status-tooltip"}:{}),!1,!0),Q(h,L(xe,{get when(){return K(()=>!f())()&&(l()||c())},get children(){var v=vL();return Q(v,()=>e.label),we(()=>ie(v,ue(r().statusTooltip,"tsqd-query-status-tooltip"))),v}}),y),Q(h,L(xe,{get when(){return f()},get children(){var v=bL();return Q(v,()=>e.label),we(()=>ie(v,ue(r().queryStatusTagLabel,"tsqd-query-status-tag-label"))),v}}),m),Q(m,()=>e.count),we(v=>{var b=ue(n`
|
|
267
267
|
width: ${W.size[1.5]};
|
|
268
268
|
height: ${W.size[1.5]};
|
|
269
269
|
border-radius: ${W.border.radius.full};
|
|
270
270
|
background-color: ${W.colors[e.color][500]};
|
|
271
|
-
`,"tsqd-query-status-tag-dot"),S=
|
|
271
|
+
`,"tsqd-query-status-tag-dot"),S=ue(r().queryStatusCount,e.count>0&&e.color!=="gray"&&n`
|
|
272
272
|
background-color: ${o(i[e.color][100],i[e.color][900])};
|
|
273
273
|
color: ${o(i[e.color][700],i[e.color][300])};
|
|
274
|
-
`,"tsqd-query-status-tag-count");return b!==v.e&&ie(y,v.e=b),S!==v.t&&ie(m,v.t=S),v},{e:void 0,t:void 0}),h})()}
|
|
274
|
+
`,"tsqd-query-status-tag-count");return b!==v.e&&ie(y,v.e=b),S!==v.t&&ie(m,v.t=S),v},{e:void 0,t:void 0}),h})()},RL=()=>{const e=Ct(),t=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,n=K(()=>e()==="dark"?In(t):Dn(t)),{colors:r}=W,i=(O,A)=>e()==="dark"?A:O,s=ve().client,[o,a]=ae(!1),[l,u]=ae("view"),[c,d]=ae(!1),f=K(()=>ve().errorTypes||[]),h=xt(O=>O().getAll().find(A=>A.queryHash===gn()),!1),y=xt(O=>O().getAll().find(A=>A.queryHash===gn()),!1),m=xt(O=>{var A;return(A=O().getAll().find(T=>T.queryHash===gn()))==null?void 0:A.state},!1),p=xt(O=>{var A;return(A=O().getAll().find(T=>T.queryHash===gn()))==null?void 0:A.state.data},!1),v=xt(O=>{const A=O().getAll().find(T=>T.queryHash===gn());return A?us(A):"inactive"}),b=xt(O=>{const A=O().getAll().find(T=>T.queryHash===gn());return A?A.state.status:"pending"}),S=xt(O=>{var A,T;return(T=(A=O().getAll().find(j=>j.queryHash===gn()))==null?void 0:A.getObserversCount())!=null?T:0}),C=K(()=>VS(v())),x=()=>{var A,T;Jn({type:"REFETCH",queryHash:(A=h())==null?void 0:A.queryHash});const O=(T=h())==null?void 0:T.fetch();O==null||O.catch(()=>{})},k=O=>{var B;const A=h();if(!A)return;Jn({type:"TRIGGER_ERROR",queryHash:A.queryHash,metadata:{error:O==null?void 0:O.name}});const T=(B=O==null?void 0:O.initializer(A))!=null?B:new Error("Unknown error from devtools"),j=A.options;A.setState({status:"error",error:T,fetchMeta:{...A.state.fetchMeta,__previousQueryOptions:j}})},w=()=>{const O=h();if(!O)return;Jn({type:"RESTORE_LOADING",queryHash:O.queryHash});const A=O.state,T=O.state.fetchMeta?O.state.fetchMeta.__previousQueryOptions:null;O.cancel({silent:!0}),O.setState({...A,fetchStatus:"idle",fetchMeta:null}),T&&O.fetch(T)};Se(()=>{v()!=="fetching"&&a(!1)});const _=()=>C()==="gray"?t`
|
|
275
275
|
background-color: ${i(r[C()][200],r[C()][700])};
|
|
276
276
|
color: ${i(r[C()][700],r[C()][300])};
|
|
277
277
|
border-color: ${i(r[C()][400],r[C()][600])};
|
|
@@ -279,37 +279,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
279
279
|
background-color: ${i(r[C()][100],r[C()][900])};
|
|
280
280
|
color: ${i(r[C()][700],r[C()][300])};
|
|
281
281
|
border-color: ${i(r[C()][400],r[C()][600])};
|
|
282
|
-
`;return L(xe,{get when(){return
|
|
282
|
+
`;return L(xe,{get when(){return K(()=>!!h())()&&m()},get children(){var O=kL(),A=O.firstChild,T=A.nextSibling,j=T.firstChild,B=j.firstChild,R=B.firstChild,P=B.nextSibling,M=j.nextSibling,I=M.firstChild,G=I.nextSibling,Y=M.nextSibling,q=Y.firstChild,U=q.nextSibling,z=T.nextSibling,V=z.nextSibling,N=V.firstChild,ne=N.firstChild,J=N.nextSibling,he=J.firstChild,X=J.nextSibling,ge=X.firstChild,ye=X.nextSibling,je=ye.firstChild,se=ye.nextSibling,nt=se.firstChild,Ie=nt.nextSibling,st=V.nextSibling;st.firstChild;var ze=st.nextSibling,Ke=ze.nextSibling;return Q(R,()=>nu(h().queryKey,!0)),Q(P,v),Q(G,S),Q(U,()=>new Date(m().dataUpdatedAt).toLocaleTimeString()),N.$$click=x,J.$$click=()=>{var ee;Jn({type:"INVALIDATE",queryHash:(ee=h())==null?void 0:ee.queryHash}),s.invalidateQueries(h())},X.$$click=()=>{var ee;Jn({type:"RESET",queryHash:(ee=h())==null?void 0:ee.queryHash}),s.resetQueries(h())},ye.$$click=()=>{var ee;Jn({type:"REMOVE",queryHash:(ee=h())==null?void 0:ee.queryHash}),s.removeQueries(h()),dc(null)},se.$$click=()=>{var ee;if(((ee=h())==null?void 0:ee.state.data)===void 0)a(!0),w();else{const $e=h();if(!$e)return;Jn({type:"TRIGGER_LOADING",queryHash:$e.queryHash});const ot=$e.options;$e.fetch({...ot,queryFn:()=>new Promise(()=>{}),gcTime:-1}),$e.setState({data:void 0,status:"pending",fetchMeta:{...$e.state.fetchMeta,__previousQueryOptions:ot}})}},Q(se,()=>b()==="pending"?"Restore":"Trigger",Ie),Q(V,L(xe,{get when(){return f().length===0||b()==="error"},get children(){var ee=wL(),$e=ee.firstChild,ot=$e.nextSibling;return ee.$$click=()=>{var Ne;h().state.error?(Jn({type:"RESTORE_ERROR",queryHash:(Ne=h())==null?void 0:Ne.queryHash}),s.resetQueries(h())):k()},Q(ee,()=>b()==="error"?"Restore":"Trigger",ot),we(Ne=>{var Le=ue(t`
|
|
283
283
|
color: ${i(r.red[500],r.red[400])};
|
|
284
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),
|
|
284
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-error"),de=b()==="pending",me=t`
|
|
285
285
|
background-color: ${i(r.red[500],r.red[400])};
|
|
286
|
-
`;return
|
|
286
|
+
`;return Le!==Ne.e&&ie(ee,Ne.e=Le),de!==Ne.t&&(ee.disabled=Ne.t=de),me!==Ne.a&&ie($e,Ne.a=me),Ne},{e:void 0,t:void 0,a:void 0}),ee}}),null),Q(V,L(xe,{get when(){return!(f().length===0||b()==="error")},get children(){var ee=SL(),$e=ee.firstChild,ot=$e.nextSibling,Ne=ot.nextSibling;return Ne.firstChild,Ne.addEventListener("change",Le=>{const de=f().find(me=>me.name===Le.currentTarget.value);k(de)}),Q(Ne,L(U3,{get each(){return f()},children:Le=>(()=>{var de=OL();return Q(de,()=>Le.name),we(()=>de.value=Le.name),de})()}),null),Q(ee,L(Jo,{}),null),we(Le=>{var de=ue(n().actionsSelect,"tsqd-query-details-actions-btn","tsqd-query-details-action-error-multiple"),me=t`
|
|
287
287
|
background-color: ${W.colors.red[400]};
|
|
288
|
-
`,
|
|
288
|
+
`,fe=b()==="pending";return de!==Le.e&&ie(ee,Le.e=de),me!==Le.t&&ie($e,Le.t=me),fe!==Le.a&&(Ne.disabled=Le.a=fe),Le},{e:void 0,t:void 0,a:void 0}),ee}}),null),Q(st,()=>l()==="view"?"Explorer":"Editor",null),Q(O,L(xe,{get when(){return l()==="view"},get children(){var ee=CL();return Q(ee,L(ti,{label:"Data",defaultExpanded:["Data"],get value(){return p()},editable:!0,onEdit:()=>u("edit"),get activeQuery(){return h()}})),we($e=>($e=W.size[2])!=null?ee.style.setProperty("padding",$e):ee.style.removeProperty("padding")),ee}}),ze),Q(O,L(xe,{get when(){return l()==="edit"},get children(){var ee=_L(),$e=ee.firstChild,ot=$e.nextSibling,Ne=ot.firstChild,Le=Ne.nextSibling,de=Le.firstChild,me=de.nextSibling;return ee.addEventListener("submit",fe=>{fe.preventDefault();const Zt=new FormData(fe.currentTarget).get("data");try{const It=JSON.parse(Zt);h().setState({...h().state,data:It}),u("view")}catch(It){d(!0)}}),$e.addEventListener("focus",()=>d(!1)),Q(Ne,()=>c()?"Invalid Value":""),de.$$click=()=>u("view"),we(fe=>{var Fe=ue(n().devtoolsEditForm,"tsqd-query-details-data-editor"),Zt=n().devtoolsEditTextarea,It=c(),Jt=n().devtoolsEditFormActions,en=n().devtoolsEditFormError,Ae=n().devtoolsEditFormActionContainer,Ve=ue(n().devtoolsEditFormAction,t`
|
|
289
289
|
color: ${i(r.gray[600],r.gray[300])};
|
|
290
|
-
`),
|
|
290
|
+
`),oe=ue(n().devtoolsEditFormAction,t`
|
|
291
291
|
color: ${i(r.blue[600],r.blue[400])};
|
|
292
|
-
`);return Fe!==
|
|
292
|
+
`);return Fe!==fe.e&&ie(ee,fe.e=Fe),Zt!==fe.t&&ie($e,fe.t=Zt),It!==fe.a&&re($e,"data-error",fe.a=It),Jt!==fe.o&&ie(ot,fe.o=Jt),en!==fe.i&&ie(Ne,fe.i=en),Ae!==fe.n&&ie(Le,fe.n=Ae),Ve!==fe.s&&ie(de,fe.s=Ve),oe!==fe.h&&ie(me,fe.h=oe),fe},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),we(()=>$e.value=JSON.stringify(p(),null,2)),ee}}),ze),Q(Ke,L(ti,{label:"Query",defaultExpanded:["Query","queryKey"],get value(){return y()}})),we(ee=>{var $e=ue(n().detailsContainer,"tsqd-query-details-container"),ot=ue(n().detailsHeader,"tsqd-query-details-header"),Ne=ue(n().detailsBody,"tsqd-query-details-summary-container"),Le=ue(n().queryDetailsStatus,_()),de=ue(n().detailsHeader,"tsqd-query-details-header"),me=ue(n().actionsBody,"tsqd-query-details-actions-container"),fe=ue(t`
|
|
293
293
|
color: ${i(r.blue[600],r.blue[400])};
|
|
294
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),Fe=v()==="fetching",
|
|
294
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-refetch"),Fe=v()==="fetching",Zt=t`
|
|
295
295
|
background-color: ${i(r.blue[600],r.blue[400])};
|
|
296
|
-
`,
|
|
296
|
+
`,It=ue(t`
|
|
297
297
|
color: ${i(r.yellow[600],r.yellow[400])};
|
|
298
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),
|
|
298
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-invalidate"),Jt=b()==="pending",en=t`
|
|
299
299
|
background-color: ${i(r.yellow[600],r.yellow[400])};
|
|
300
|
-
`,
|
|
300
|
+
`,Ae=ue(t`
|
|
301
301
|
color: ${i(r.gray[600],r.gray[300])};
|
|
302
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),
|
|
302
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-reset"),Ve=b()==="pending",oe=t`
|
|
303
303
|
background-color: ${i(r.gray[600],r.gray[400])};
|
|
304
|
-
`,pe=
|
|
304
|
+
`,pe=ue(t`
|
|
305
305
|
color: ${i(r.pink[500],r.pink[400])};
|
|
306
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),
|
|
306
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-remove"),Oe=v()==="fetching",Ee=t`
|
|
307
307
|
background-color: ${i(r.pink[500],r.pink[400])};
|
|
308
|
-
`,
|
|
308
|
+
`,He=ue(t`
|
|
309
309
|
color: ${i(r.cyan[500],r.cyan[400])};
|
|
310
|
-
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),
|
|
310
|
+
`,"tsqd-query-details-actions-btn","tsqd-query-details-action-loading"),Et=o(),tn=t`
|
|
311
311
|
background-color: ${i(r.cyan[500],r.cyan[400])};
|
|
312
|
-
`,
|
|
312
|
+
`,mi=ue(n().detailsHeader,"tsqd-query-details-header"),yo=ue(n().detailsHeader,"tsqd-query-details-header"),rs=W.size[2];return $e!==ee.e&&ie(O,ee.e=$e),ot!==ee.t&&ie(A,ee.t=ot),Ne!==ee.a&&ie(T,ee.a=Ne),Le!==ee.o&&ie(P,ee.o=Le),de!==ee.i&&ie(z,ee.i=de),me!==ee.n&&ie(V,ee.n=me),fe!==ee.s&&ie(N,ee.s=fe),Fe!==ee.h&&(N.disabled=ee.h=Fe),Zt!==ee.r&&ie(ne,ee.r=Zt),It!==ee.d&&ie(J,ee.d=It),Jt!==ee.l&&(J.disabled=ee.l=Jt),en!==ee.u&&ie(he,ee.u=en),Ae!==ee.c&&ie(X,ee.c=Ae),Ve!==ee.w&&(X.disabled=ee.w=Ve),oe!==ee.m&&ie(ge,ee.m=oe),pe!==ee.f&&ie(ye,ee.f=pe),Oe!==ee.y&&(ye.disabled=ee.y=Oe),Ee!==ee.g&&ie(je,ee.g=Ee),He!==ee.p&&ie(se,ee.p=He),Et!==ee.b&&(se.disabled=ee.b=Et),tn!==ee.T&&ie(nt,ee.T=tn),mi!==ee.A&&ie(st,ee.A=mi),yo!==ee.O&&ie(ze,ee.O=yo),rs!==ee.I&&((ee.I=rs)!=null?Ke.style.setProperty("padding",rs):Ke.style.removeProperty("padding")),ee},{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}),O}})},NL=()=>{const e=Ct(),t=ve().shadowDOMTarget?Re.bind({target:ve().shadowDOMTarget}):Re,n=K(()=>e()==="dark"?In(t):Dn(t)),{colors:r}=W,i=(c,d)=>e()==="dark"?d:c,s=Fn(c=>{const f=c().getAll().find(h=>h.mutationId===ii());return f?f.state.isPaused:!1}),o=Fn(c=>{const f=c().getAll().find(h=>h.mutationId===ii());return f?f.state.status:"idle"}),a=K(()=>gs({isPaused:s(),status:o()})),l=Fn(c=>c().getAll().find(d=>d.mutationId===ii()),!1),u=()=>a()==="gray"?t`
|
|
313
313
|
background-color: ${i(r[a()][200],r[a()][700])};
|
|
314
314
|
color: ${i(r[a()][700],r[a()][300])};
|
|
315
315
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
@@ -317,7 +317,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
317
317
|
background-color: ${i(r[a()][100],r[a()][900])};
|
|
318
318
|
color: ${i(r[a()][700],r[a()][300])};
|
|
319
319
|
border-color: ${i(r[a()][400],r[a()][600])};
|
|
320
|
-
`;return L(xe,{get when(){return l()},get children(){var c=
|
|
320
|
+
`;return L(xe,{get when(){return l()},get children(){var c=EL(),d=c.firstChild,f=d.nextSibling,h=f.firstChild,y=h.firstChild,m=y.firstChild,p=y.nextSibling,v=h.nextSibling,b=v.firstChild,S=b.nextSibling,C=f.nextSibling,x=C.nextSibling,k=x.nextSibling,w=k.nextSibling,_=w.nextSibling,O=_.nextSibling,A=O.nextSibling,T=A.nextSibling;return Q(m,L(xe,{get when(){return l().options.mutationKey},fallback:"No mutationKey found",get children(){return nu(l().options.mutationKey,!0)}})),Q(p,L(xe,{get when(){return a()==="purple"},children:"pending"}),null),Q(p,L(xe,{get when(){return a()!=="purple"},get children(){return o()}}),null),Q(S,()=>new Date(l().state.submittedAt).toLocaleTimeString()),Q(x,L(ti,{label:"Variables",defaultExpanded:["Variables"],get value(){return l().state.variables}})),Q(w,L(ti,{label:"Context",defaultExpanded:["Context"],get value(){return l().state.context}})),Q(O,L(ti,{label:"Data",defaultExpanded:["Data"],get value(){return l().state.data}})),Q(T,L(ti,{label:"Mutation",defaultExpanded:["Mutation"],get value(){return l()}})),we(j=>{var B=ue(n().detailsContainer,"tsqd-query-details-container"),R=ue(n().detailsHeader,"tsqd-query-details-header"),P=ue(n().detailsBody,"tsqd-query-details-summary-container"),M=ue(n().queryDetailsStatus,u()),I=ue(n().detailsHeader,"tsqd-query-details-header"),G=W.size[2],Y=ue(n().detailsHeader,"tsqd-query-details-header"),q=W.size[2],U=ue(n().detailsHeader,"tsqd-query-details-header"),z=W.size[2],V=ue(n().detailsHeader,"tsqd-query-details-header"),N=W.size[2];return B!==j.e&&ie(c,j.e=B),R!==j.t&&ie(d,j.t=R),P!==j.a&&ie(f,j.a=P),M!==j.o&&ie(p,j.o=M),I!==j.i&&ie(C,j.i=I),G!==j.n&&((j.n=G)!=null?x.style.setProperty("padding",G):x.style.removeProperty("padding")),Y!==j.s&&ie(k,j.s=Y),q!==j.h&&((j.h=q)!=null?w.style.setProperty("padding",q):w.style.removeProperty("padding")),U!==j.r&&ie(_,j.r=U),z!==j.d&&((j.d=z)!=null?O.style.setProperty("padding",z):O.style.removeProperty("padding")),V!==j.l&&ie(A,j.l=V),N!==j.u&&((j.u=N)!=null?T.style.setProperty("padding",N):T.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}),c}})},Cu=new Map,FL=()=>{const e=K(()=>ve().client.getQueryCache()),t=e().subscribe(n=>{P3(()=>{for(const[r,i]of Cu.entries())i.shouldUpdate(n)&&i.setter(r(e))})});return Ce(()=>{Cu.clear(),t()}),t},xt=(e,t=!0,n=()=>!0)=>{const r=K(()=>ve().client.getQueryCache()),[i,s]=ae(e(r),t?void 0:{equals:!1});return Se(()=>{s(e(r))}),Cu.set(e,{setter:s,shouldUpdate:n}),Ce(()=>{Cu.delete(e)}),i},_u=new Map,BL=()=>{const e=K(()=>ve().client.getMutationCache()),t=e().subscribe(()=>{for(const[n,r]of _u.entries())queueMicrotask(()=>{r(n(e))})});return Ce(()=>{_u.clear(),t()}),t},Fn=(e,t=!0)=>{const n=K(()=>ve().client.getMutationCache()),[r,i]=ae(e(n),t?void 0:{equals:!1});return Se(()=>{i(e(n))}),_u.set(e,i),Ce(()=>{_u.delete(e)}),r},qL="@tanstack/query-devtools-event",Jn=({type:e,queryHash:t,metadata:n})=>{const r=new CustomEvent(qL,{detail:{type:e,queryHash:t,metadata:n},bubbles:!0,cancelable:!0});window.dispatchEvent(r)},cx=(e,t)=>{const{colors:n,font:r,size:i,alpha:s,shadow:o,border:a}=W,l=(u,c)=>e==="light"?u:c;return{devtoolsBtn:t`
|
|
321
321
|
z-index: 100000;
|
|
322
322
|
position: fixed;
|
|
323
323
|
padding: 4px;
|
|
@@ -1282,17 +1282,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1282
1282
|
opacity: 0.6;
|
|
1283
1283
|
cursor: not-allowed;
|
|
1284
1284
|
}
|
|
1285
|
-
`}},
|
|
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
|
|
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
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1293
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DD(e,t){if(e){if(typeof e=="string")return rp(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)?rp(e,t):void 0}}function rp(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 ID(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function RD(e){if(Array.isArray(e))return e}function Ah(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ip=Qa(ep||(ep=Ah(["xl:yst-w-1/3"]))),sp=Qa(tp||(tp=Ah(["xl:yst-w-2/3"]))),op=Qa(np||(np=Ah(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),ND=function(){var t,n,r,i,s=F.useState(!1),o=ed(s,2),a=o[0],l=o[1],u=F.useState(!1),c=ed(u,2),d=c[0],f=c[1],h=F.useState(null),y=ed(h,2),m=y[0],p=y[1],v=zu({query:{select:function(w){var _=w.data;return _}}}),b=v.data,S=Ji({query:{select:function(w){var _=w.data;return _==null?void 0:_.brands},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),C=S.data,x=C==null?void 0:C.find(function(k){return k.id===m});return g.jsxs("form",{children:[g.jsxs(A.Card,{children:[g.jsx(Ab,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),g.jsxs(A.Card.Content,{children:[g.jsxs(op,{children:[g.jsxs(ip,{className:"yst-space-y-2",children:[g.jsx(A.Title,{size:"4",children:"Brands"}),g.jsxs("p",{children:["You have"," ",g.jsxs("b",{children:[(t=b==null?void 0:b.activeSubscriptions)!==null&&t!==void 0?t:"—"," subscription(s)"]}),". This gives you up to"," ",g.jsxs("b",{children:[(n=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),g.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),g.jsxs(sp,{children:[C&&g.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: ",(r=b==null?void 0:b.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),C&&C.length===0&&g.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",g.jsx(A.Link,{as:ci,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(C!=null?C:[{id:"loading",name:"Loading..."}]).map(function(k,w,_){return g.jsx($D,{brand:k,isLast:w===_.length-1,onDelete:function(O){p(O),l(!0)}},k.id)})]})]}),g.jsx(Ya,{}),g.jsxs(op,{children:[g.jsxs(ip,{className:"yst-space-y-2",children:[g.jsx(A.Title,{size:"4",children:"Delete all data"}),g.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),g.jsxs(sp,{className:"yst-space-y-4",children:[g.jsxs(A.Button,{variant:"error",onClick:function(){f(!0)},disabled:(C==null?void 0:C.length)===0,children:[g.jsx(Rf,{})," Delete all data"]}),g.jsx("p",{children:g.jsxs("i",{children:[g.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),g.jsx(_D,{isOpen:a,onClose:function(){l(!1),p(null)},brandId:m||"",brandName:x==null?void 0:x.name}),g.jsx(pD,{isOpen:d,onClose:function(){f(!1)}})]})};const FD=Object.freeze(Object.defineProperty({__proto__:null,default:ND},Symbol.toStringTag,{value:"Module"}));function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}var vf=[{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. 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. This process should take around 5 minutes."}],BD=function(t){return vf.find(function(n){return!!Ks(n.path,t)})||vf[0]};function qD(){var e=zt(),t=BD(e.pathname);return g.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[g.jsx(ux,{title:g.jsx(fx,{currentStep:t,steps:vf}),description:t.description}),g.jsx(A.Paper.Content,{children:g.jsx(Vs,{})})]})}var fx=function(t){var n=t.title,r=t.currentStep,i=t.steps;return g.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[g.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[g.jsx("span",{className:"yst-text-slate-900",children:Cu(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),g.jsx("span",{children:Cu(r)==="object"?r.title:n||"Step ".concat(r)})]})};const zD=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:fx,default:qD},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,u=t.isLoading,c=u===void 0?!1:u;return g.jsx(Bf,{nestedInPaperContent:!0,children:g.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&&g.jsx(A.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),g.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:g.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:c,children:[i==="ai"&&g.jsx(h6,{}),s]})})]})})},HD=[{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"}],UD=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],td=[].concat(HD,UD,[{value:"OTHER",label:"Other"}]),GD=[{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"}],KD=[{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"ca",label:"Catalan"},{value:"zh",label:"Chinese"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"ka",label:"Georgian"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"no",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"es",label:"Spanish"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"vi",label:"Vietnamese"}],VD=[].concat(GD,KD);function ii(e){"@babel/helpers - typeof";return ii=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},ii(e)}function ap(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 lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ap(Object(n),!0).forEach(function(r){gx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ap(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gx(e,t,n){return(t=WD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WD(e){var t=QD(e,"string");return ii(t)=="symbol"?t:t+""}function QD(e,t){if(ii(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ii(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bf(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return un(b,"_invoke",function(S,C,x){var k,w,_,O=0,E=x||[],T=!1,M={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,j){return k=P,w=0,_=e,M.n=j,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!j&&t<E.length;t++){var j,I=E[t],G=M.p,Y=I[2];R>3?(j=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((j=R<2&&G<I[1])?(w=0,M.v=P,M.n=I[1]):G<Y&&(j=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,M.n=Y,w=0))}if(j||R>1)return o;throw T=!0,P}return function(R,P,j){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,j),w=P,_=j;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(M.n=-1),B(w,_)):M.n=_:M.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=M.n<0)?_:S.call(C,M))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(un(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,un(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,un(d,"constructor",u),un(u,"constructor",l),l.displayName="GeneratorFunction",un(u,i,"GeneratorFunction"),un(d),un(d,i,"Generator"),un(d,r,function(){return this}),un(d,"toString",function(){return"[object Generator]"}),(bf=function(){return{w:s,m:f}})()}function un(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}un=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){un(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},un(e,t,n,r)}function up(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function YD(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){up(s,r,i,o,a,"next",l)}function a(l){up(s,r,i,o,a,"throw",l)}o(void 0)})}}function os(e,t){return eI(e)||JD(e,t)||ZD(e,t)||XD()}function XD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1294
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1295
|
-
example: California, Bavaria, or Paris.`,maxLength:255})]}),g.jsx(
|
|
1296
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1297
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yx(e,t){if(e){if(typeof e=="string")return wf(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)?wf(e,t):void 0}}function wf(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 fI(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function hI(e){if(Array.isArray(e))return e}var ds=5,Ko="Generating...",gI="Re-generating...",yI=100,mI=800,pI=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],vI=Array.from({length:ds},function(e,t){return{id:"query-".concat(t),text:Ko,isRegenerating:!0}}),bI=function(){var t,n,r,i=ku(),s=i.brandId,o="/setup/".concat(s,"/analysis"),a=vn(),l=Xt(),u=Ff(),c=F.useRef(!1),d=F.useState(vI),f=Nr(d,2),h=f[0],y=f[1],m=F.useState(!1),p=Nr(m,2),v=p[0],b=p[1],S=F.useState([]),C=Nr(S,2),x=C[0],k=C[1],w=F.useState([]),_=Nr(w,2),O=_[0],E=_[1],T=F.useState(!1),M=Nr(T,2),B=M[0],R=M[1],P=F.useState(null),j=Nr(P,2),I=j[0],G=j[1],Y=F.useState(!1),q=Nr(Y,2),U=q[0],z=q[1],K=F.useState(!1),N=Nr(K,2),ee=N[0],te=N[1],de=E4(s||"",{query:{enabled:!!s}}),X=de.data,he=de.isRefetching,ye=de.error,De=de.isError,se=de.refetch,nt=iu(s||"",{query:{enabled:!!s}}),ze=nt.data,ft=F.useCallback(function(ce){var pe;if(!(ze!=null&&(pe=ze.data)!==null&&pe!==void 0&&pe.name))return!1;var Ee=ze.data.name.toLowerCase().trim();return Ee?ce.toLowerCase().includes(Ee):!1},[ze==null||(t=ze.data)===null||t===void 0?void 0:t.name]),Ge=F.useCallback(function(){return h.some(function(ce){return ft(ce.text)})},[h,ft]),Ne=function(){z(!1)},J=function(){z(!1),s&&Ie({brandId:s,data:{queries:h.map(function(pe){return pe.text})}})},Me=function(){z(!1);var pe=h.findIndex(function(Ee){return ft(Ee.text)});pe!==-1&&setTimeout(function(){var Ee=document.getElementById("query-text-".concat(pe));Ee&&(Ee.focus(),Ee.select())},yI)},ot=C4({mutation:{onSuccess:function(){var ce=cI(xf().m(function Ee(Ae){return xf().w(function(rt){for(;;)switch(rt.n){case 0:if(G(null),!(Ae!=null&&Ae.status&&Ae.status>=200&&Ae.status<300)){rt.n=2;break}return rt.n=1,Promise.all([l.invalidateQueries({queryKey:Bu(s||"")}),l.invalidateQueries({queryKey:rr()})]);case 1:a(o);case 2:return rt.a(2)}},Ee)}));function pe(Ee){return ce.apply(this,arguments)}return pe}(),onError:function(pe){var Ee,Ae;if((pe==null||(Ee=pe.response)===null||Ee===void 0||(Ee=Ee.data)===null||Ee===void 0?void 0:Ee.message)==="Cannot update queries for a brand that has existing analyses."){a(o,{replace:!0});return}var rt=(pe==null||(Ae=pe.response)===null||Ae===void 0||(Ae=Ae.data)===null||Ae===void 0?void 0:Ae.message)||(pe==null?void 0:pe.message)||"An unexpected error occurred.";G(rt)}}}),Ie=ot.mutate,$e=ot.isPending;F.useEffect(function(){s||a("/setup",{replace:!0})},[s,a,u]),F.useEffect(function(){var ce;!(ze!=null&&(ce=ze.data)!==null&&ce!==void 0&&ce.setupStatus)||c.current||(c.current=!0,ze.data.setupStatus!=="pendingQuerySelection"&&(u("Queries cannot be changed for a brand with a pending analysis.",{variant:"warning"}),a(o,{replace:!0})))},[ze==null||(n=ze.data)===null||n===void 0?void 0:n.setupStatus,s,a,o,u]),F.useEffect(function(){var ce;if(X!=null&&(ce=X.data)!==null&&ce!==void 0&&ce.queries&&Array.isArray(X.data.queries)){var pe=X.data.queries.slice(0,ds);y(pe.map(function(Ee,Ae){return{id:"query-".concat(Ae),text:Ee,isRegenerating:!1}})),E(X.data.queries.slice(ds))}else De&&(y(Array.from({length:ds},function(Ee,Ae){return{id:"query-".concat(Ae),text:"",isRegenerating:!1}})),E([]))},[X,De]);var fe=F.useCallback(function(ce){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;setTimeout(function(){y(function(Ee){return Ee.map(function(Ae,rt){var bn=x.indexOf(rt.toString());return bn>=0&&ce[bn]?Cn(Cn({},Ae),{},{text:ce[bn],isRegenerating:!1}):Cn(Cn({},Ae),{},{isRegenerating:!1})})}),k([]),R(!1),b(!1),pe&&E(function(Ee){var Ae=new Set(ce);return Ee.filter(function(rt){return!Ae.has(rt)})})},mI)},[x]);F.useEffect(function(){if(B&&!he){var ce;if(X!=null&&(ce=X.data)!==null&&ce!==void 0&&ce.queries&&Array.isArray(X.data.queries)){var pe=X.data.queries.slice(0,ds),Ee=x.map(Number);y(function(Ae){return Ae.map(function(rt,bn){var In=Ee.indexOf(bn);return Cn(Cn({},rt),{},{text:In>=0&&pe[In]?pe[In]:rt.text,isRegenerating:!1})})}),k([]),R(!1),b(!1)}else De&&(y(function(Ae){return Ae.map(function(rt){return Cn(Cn({},rt),{},{isRegenerating:!1})})}),k([]),R(!1),b(!1))}},[X,he,B,x,De]);var me=F.useCallback(function(ce,pe){var Ee=new Set(pe);return O.filter(function(Ae){return!Ee.has(Ae)}).slice(0,ce)},[O]),ge=F.useMemo(function(){return he||h.length===0||h.some(function(ce){return ce.isRegenerating||ce.text===Ko&&!De||ce.text.trim()===""})||v},[he,h,v,De]),Fe=he||h.some(function(ce){return ce.text===Ko})&&!De,Oe=F.useCallback(function(ce){var pe=ce.toString();k(function(Ee){return Ee.includes(pe)?Ee.filter(function(Ae){return Ae!==pe}):[].concat(rI(Ee),[pe])})},[]),Ke=F.useCallback(function(ce,pe){y(function(Ee){return Ee.map(function(Ae,rt){return rt===ce?Cn(Cn({},Ae),{},{text:pe}):Ae})})},[]),Ve=function(){b(!v),k([])},Rt=F.useCallback(function(){if(!(he||x.length===0)){y(function(rt){return rt.map(function(bn,In){return Cn(Cn({},bn),{},{isRegenerating:x.includes(In.toString())})})});var ce=h.map(function(rt){return rt.text}),pe=x.length,Ee=me(pe,ce),Ae=Ee.length>=pe;Ae?fe(Ee,!0):(R(!0),se())}},[he,x,se,h,me,fe]),Jt=F.useCallback(function(ce){if(ce.preventDefault(),!!s){if(Ge()){z(!0);return}Ie({brandId:s,data:{queries:h.map(function(pe){return pe.text})}})}},[s,h,Ie,Ge]),kt=function(){te(!0)};return g.jsxs("div",{children:[I&&g.jsx(A.Alert,{className:"yst-mb-4",variant:"error",children:I}),g.jsxs("form",{onSubmit:Jt,children:[g.jsxs("div",{className:"yst-mb-8",children:[g.jsx(A.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),g.jsxs("div",{className:"yst-space-y-4",children:[g.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),g.jsx("div",{className:ke("yst-flex yst-gap-2",v?"yst-justify-end":"yst-justify-start"),children:v?g.jsxs(g.Fragment,{children:[g.jsx(A.Button,{size:"small",variant:"secondary",onClick:Ve,children:"Done"}),g.jsxs(A.Button,{variant:"secondary",size:"small",onClick:Rt,className:"yst-gap-1",isLoading:he||B,disabled:B||he||x.length===0,children:[g.jsx(dp,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):g.jsxs(A.Button,{size:"small",variant:"secondary",onClick:Ve,className:"yst-gap-1.5",disabled:Fe||De,children:[g.jsx(e6,{}),"Select queries to regenerate"]})})]})]}),g.jsx("div",{className:"yst-mb-8",children:h.length===0?pI.map(function(ce,pe){return g.jsx("div",{className:ke("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:g.jsx(A.SkeletonLoader,{children:ce||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(pe))}):h.slice(0,ds).map(function(ce,pe){var Ee=ce.isRegenerating?ce.text===Ko?Ko:gI:ce.text;return g.jsx("div",{className:ke("yst-mb-4"),children:g.jsxs("div",{className:"yst-flex yst-gap-2",children:[v&&g.jsx("div",{className:"yst-flex yst-items-center",children:g.jsx(A.Checkbox,{id:"query-regenerate-".concat(pe),name:"query-regenerate-".concat(pe),value:pe.toString(),checked:x.includes(pe.toString()),onChange:function(){return Oe(pe)},disabled:he})}),g.jsx("div",{className:"yst-flex-1",children:g.jsx(A.TextField,{id:"query-text-".concat(pe),label:"Query ".concat(pe+1),type:"text",value:Ee,onChange:function(Ae){ce.isRegenerating||Ke(pe,Ae.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:ce.isRegenerating,required:!0,minLength:3,maxLength:255,validation:ft(ce.text)?{variant:"warning",message:"For more accurate insights, avoid using your brand name in the query."}:void 0})})]})},ce.id)})}),g.jsx(hx,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:ge,isLoading:$e})]}),g.jsx(A.Modal,{isOpen:De&&P5(ye)&&(ye==null||(r=ye.response)===null||r===void 0?void 0:r.status)===429&&!ee,onClose:kt,position:"center",as:"div",children:g.jsx(A.Modal.Panel,{children:g.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[g.jsx("div",{children:g.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:g.jsx(Rd,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Query regeneration limit reached"})}),g.jsx(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You’ve used all your query regenerations for this brand analysis, but you can still edit your queries manually."})}),g.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[g.jsx(A.Button,{variant:"secondary",onClick:kt,children:"Cancel"}),g.jsx(A.Button,{variant:"primary",onClick:kt,children:"Edit queries manually"})]})]})]})})}),g.jsx(A.Modal,{isOpen:U,onClose:Ne,position:"center",as:"div",children:g.jsx(A.Modal.Panel,{children:g.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[g.jsx("div",{children:g.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:g.jsx(Rd,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Brand name detected in your queries"})}),g.jsxs(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:[g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"We found your brand name in one or more of your queries. Using your brand name in queries often show more mentions and more positive sentiment, which can skew your results."}),g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"For more balanced results, remove your brand name or make the queries more general."})]}),g.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[g.jsxs(A.Button,{onClick:J,variant:"secondary",className:"yst-gap-1.5",disabled:$e,isLoading:$e,children:[g.jsx(dp,{}),"Run analysis anyway"]}),g.jsx(A.Button,{variant:"primary",onClick:Me,children:"Review and edit queries"})]})]})]})})})]})};const xI=Object.freeze(Object.defineProperty({__proto__:null,default:bI},Symbol.toStringTag,{value:"Module"}));var wI=["min","max","progress","className"];function SI(e,t){if(e==null)return{};var n,r,i=CI(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 CI(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 mx=F.forwardRef(function(e,t){var n=e.min,r=e.max,i=e.progress,s=e.className,o=SI(e,wI),a=F.useMemo(function(){var u=Math.max(0,r-n);if(u===0)return 0;var c=(i-n)/u*100;return Math.max(0,Math.min(100,c))},[n,r,i]),l=Math.min(Math.max(i,n),r);return g.jsx("div",{ref:t,role:"progressbar","aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":"".concat(Math.round(a),"%"),className:ke(s),...o,children:g.jsx("div",{className:"yst-relative yst-h-2 yst-w-full yst-overflow-hidden yst-rounded-full yst-bg-slate-200/40",children:g.jsx("div",{className:"yst-absolute yst-left-0 yst-top-0 yst-h-full yst-rounded-full yst-bg-[linear-gradient(97.38deg,_#A61E69_0%,_#6366F1_100%)] yst-transition-[width] yst-duration-300 yst-ease-out",style:{width:"".concat(a,"%")}})})})});mx.displayName="ProgressBarGradient";var as=[{labelAbove:"Running queries...",label:"Running queries",threshold:99},{labelAbove:"Done!",label:"Building analysis",threshold:100}],px=function(t){var n=t.progress,r=n===void 0?0:n,i=t.className,s=i===void 0?"":i,o=function(){for(var u=0;u<as.length;u++)if(r<=as[u].threshold)return as[u];return as[as.length-1]},a=o();return g.jsxs("div",{className:ke("yst-font-medium yst-text-slate-800",s),children:[g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?g.jsx(A.Spinner,{}):g.jsx(S2,{className:"yst-text-green-400"}),g.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:a.labelAbove})]}),g.jsx(mx,{className:"yst-mt-3",progress:r,min:0,max:100}),g.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:as.map(function(l){return g.jsx("span",{children:g.jsx(Uu,{disabled:a.label!==l.label,children:l.label})},l.label)})})]})};px.propTypes={progress:Bd.number,className:Bd.string};var _I=function(t){switch(t){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},kI=function(){var t,n,r,i=vn(),s=Xt(),o=ku(),a=Gn(),l=a.brandId,u=o.brandId||l,c=iu(u,{query:{enabled:!!u,select:function(C){var x=C.data;return x}}}),d=c.data,f=X5(u,"latest",{query:{enabled:!!u,select:function(C){var x=C.data;return x},refetchInterval:function(C){var x,k=C==null||(x=C.state)===null||x===void 0||(x=x.data)===null||x===void 0?void 0:x.data;return _I(k==null?void 0:k.status)}}}),h=f.data,y=h==null?void 0:h.id,m=y?"/brands/".concat(u,"/analysis/").concat(y):"/brands/".concat(u);F.useEffect(function(){var S=(h==null?void 0:h.status)==="pending"||(h==null?void 0:h.status)==="processing"||(h==null?void 0:h.status)==="completed";d!=null&&d.nextScheduledAnalysis&&h!==null&&h!==void 0&&h.status&&R7(d.nextScheduledAnalysis,5)&&!S&&i("/brands/".concat(u),{replace:!0})},[d==null?void 0:d.nextScheduledAnalysis,u,i,h==null?void 0:h.status]),F.useEffect(function(){((d==null?void 0:d.setupStatus)==="completed"||(d==null?void 0:d.setupStatus)==="scheduledFirstAnalysis"&&d!==null&&d!==void 0&&d.firstNextAnalysisOpportunity&&!D2(d.firstNextAnalysisOpportunity,2))&&i(m,{replace:!0})},[d==null?void 0:d.firstNextAnalysisOpportunity,d==null?void 0:d.setupStatus,m,i]);var p=d==null||(t=d.queries)===null||t===void 0?void 0:t.length,v=(h==null||(n=h.completedQueries)===null||n===void 0?void 0:n.length)||0,b=function(){if(p&&p>0){var S=80/p,C=v*S;return(h==null?void 0:h.status)==="completed"?100:Math.round(Math.min(C,80))}return 0}();return g.jsxs("div",{children:[g.jsxs("div",{className:"yst-space-y-8",children:[g.jsx(px,{progress:b}),g.jsx(Ya,{}),g.jsx("div",{className:"yst-space-y-8",children:d==null||(r=d.queries)===null||r===void 0?void 0:r.map(function(S){var C,x=S.id,k=S.query,w=x&&(h==null||(C=h.completedQueries)===null||C===void 0?void 0:C.includes(x));return g.jsxs("div",{className:ke("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[w===!0?g.jsx(S2,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):g.jsx(A.Spinner,{}),g.jsx("span",{className:"yst-flex-1 yst-text-sm",children:k})]},"result-item-".concat(k))})})]}),g.jsx("div",{className:"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 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",children:g.jsx(A.Button,{as:ci,to:m,onClick:function(S){if(b!==100){S.preventDefault();return}s.clear()},disabled:b!==100,children:"Continue →"})})]})};const OI=Object.freeze(Object.defineProperty({__proto__:null,default:kI},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=mT;exports.setApiBaseUrl=c2;
|
|
1285
|
+
`}},Dn=e=>cx("light",e),In=e=>cx("dark",e);Mu(["click","mousedown","input"]);var zL=e=>{const[t,n]=jb({prefix:"TanstackQueryDevtools"}),r=Nv(),i=K(()=>{const s=t.theme_preference||Mb;return s!=="system"?s:r()});return L(ah.Provider,{value:e,get children(){return L(Ib,{localStore:t,setLocalStore:n,get children(){return L(uh.Provider,{value:i,get children(){return L(TL,{localStore:t,setLocalStore:n})}})}})}})},HL=zL;const UL=Object.freeze(Object.defineProperty({__proto__:null,default:HL},Symbol.toStringTag,{value:"Module"}));var GL=e=>{const[t,n]=jb({prefix:"TanstackQueryDevtools"}),r=Nv(),i=K(()=>{const s=t.theme_preference||Mb;return s!=="system"?s:r()});return L(ah.Provider,{value:e,get children(){return L(Ib,{disabled:!0,localStore:t,setLocalStore:n,get children(){return L(uh.Provider,{value:i,get children(){return L(jL,{get children(){return L(Th,{localStore:t,setLocalStore:n,get onClose(){return e.onClose},showPanelViewOnly:!0})}})}})}})}})},KL=GL;const VL=Object.freeze(Object.defineProperty({__proto__:null,default:KL},Symbol.toStringTag,{value:"Module"}));function dx(e){var t=e.children,n=e.description,r=e.title;return g.jsxs(E.Paper.Header,{children:[r&&g.jsx(E.Title,{className:ke({"yst-mb-3":n||t}),children:r}),n&&(typeof n=="string"?g.jsx("p",{children:n}):n),t]})}function Uo(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return an(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(an(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,an(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,an(d,"constructor",u),an(u,"constructor",l),l.displayName="GeneratorFunction",an(u,i,"GeneratorFunction"),an(d),an(d,i,"Generator"),an(d,r,function(){return this}),an(d,"toString",function(){return"[object Generator]"}),(Uo=function(){return{w:s,m:f}})()}function an(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}an=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){an(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},an(e,t,n,r)}function qm(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function zm(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){qm(s,r,i,o,a,"next",l)}function a(l){qm(s,r,i,o,a,"throw",l)}o(void 0)})}}function td(e,t){return XL(e)||YL(e,t)||QL(e,t)||WL()}function WL(){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 QL(e,t){if(e){if(typeof e=="string")return Hm(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)?Hm(e,t):void 0}}function Hm(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 YL(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function XL(e){if(Array.isArray(e))return e}var ZL=function(t){var n=t.isOpen,r=t.onClose,i=t.groupToEdit,s=t.allBrands,o=Gn(),a=o.brandId,l=o.analysisId,u=F.useState(""),c=td(u,2),d=c[0],f=c[1],h=F.useState([]),y=td(h,2),m=y[0],p=y[1],v=F.useState(!1),b=td(v,2),S=b[0],C=b[1],x=Yt();F.useEffect(function(){if(n&&i&&i.type==="group"){var G;f(String(i.name||""));var Y=((G=i.groupedBrands)===null||G===void 0?void 0:G.map(function(q){return String(q.id||"")}))||[];p(Y)}},[n,i]);var k=y2({mutation:{onSuccess:function(){var G=zm(Uo().m(function q(){return Uo().w(function(U){for(;;)switch(U.n){case 0:return U.n=1,Promise.all([x.invalidateQueries({queryKey:su(a)}),x.invalidateQueries({queryKey:Sr(a,"latest")}),x.invalidateQueries({queryKey:ir(a,"latest")}),x.invalidateQueries({queryKey:Sr(a,l)}),x.invalidateQueries({queryKey:ir(a,l)})]);case 1:B();case 2:return U.a(2)}},q)}));function Y(){return G.apply(this,arguments)}return Y}(),onError:function(Y){console.error("Error creating brand group:",Y)}}}),w=k.mutate,_=k.isPending,O=c4({mutation:{onSuccess:function(){var G=zm(Uo().m(function q(){return Uo().w(function(U){for(;;)switch(U.n){case 0:return U.n=1,Promise.all([x.invalidateQueries({queryKey:su(a)}),x.invalidateQueries({queryKey:Sr(a,"latest")}),x.invalidateQueries({queryKey:ir(a,"latest")}),x.invalidateQueries({queryKey:Sr(a,l)}),x.invalidateQueries({queryKey:ir(a,l)})]);case 1:B(),M();case 2:return U.a(2)}},q)}));function Y(){return G.apply(this,arguments)}return Y}(),onError:function(Y){console.error("Error deleting brand group:",Y),window.alert("An error occurred while ungrouping the brands. Please try again later.")}}}),A=O.mutate,T=O.isPending,j=function(){!d.trim()||!(i!=null&&i.id)||w({brandId:a,data:{groupName:d.trim(),brandIds:m.map(function(Y){return Number(Y)})}})},B=function(){f(""),p([]),r()},R=function(){return m.map(function(Y){if(i&&i.type==="group"){var q,U=(q=i.groupedBrands)===null||q===void 0?void 0:q.find(function(V){return String(V.id)===Y});if(U)return U.name||""}var z=s.find(function(V){return String(V.id)===Y});return z?z.type==="group"?"Group: ".concat(z.name):z.name||"":""}).filter(Boolean)},P=function(){C(!0)},M=function(){return C(!1)},I=function(){typeof(i==null?void 0:i.id)=="number"&&A({brandId:a,brandGroupId:i.id})};return!i||i.type!=="group"?null:g.jsxs(g.Fragment,{children:[g.jsx(E.Modal,{isOpen:n,onClose:S?function(){}:B,as:"div",children:g.jsx(E.Modal.Panel,{children:g.jsxs(E.Modal.Container,{children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-4",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Edit brand group"})}),g.jsxs(E.Modal.Container.Content,{className:"yst-mb-8 yst-space-y-4",children:[g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"Update the group name or ungroup brands by removing their tags."}),g.jsxs("div",{children:[g.jsx("label",{htmlFor:"editGroupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),g.jsx(E.TextInput,{id:"editGroupName",value:d,onChange:function(G){return f(G.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),g.jsxs("div",{children:[g.jsx(E.TagField,{readOnly:!0,id:"editGroupedBrands",label:"Grouped brands",tags:R(),onRemoveTag:function(G){if(m.length<2)return C(!0);p(function(Y){return Y.filter(function(q,U){return U!==G})})},onAddTag:function(){}}),m.length===0?g.jsx("p",{className:"yst-mt-2 yst-text-sm",children:'Click "Ungroup brands" to remove this group.'}):g.jsx("p",{className:"yst-mt-2 yst-text-sm yst-italic yst-text-gray-500",children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]})]}),g.jsx(E.Modal.Container.Footer,{children:g.jsxs("div",{className:"yst-flex yst-w-full yst-items-center yst-justify-between",children:[g.jsx("div",{className:"yst-flex yst-justify-start",children:g.jsx(E.Button,{variant:"tertiary",onClick:P,disabled:_,className:"yst-text-red-600",children:"Ungroup brands"})}),g.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[g.jsx(E.Button,{variant:"secondary",onClick:B,children:"Cancel"}),g.jsx(E.Button,{variant:"primary",onClick:j,disabled:!d.trim()||_,isLoading:_,children:_?"Saving...":"Save changes"})]})]})})]})})}),g.jsx(Vu,{isOpen:S,onClose:M,onConfirm:I,title:"Ungroup this brand group?",description:g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"The group will be removed, but the brands inside will remain in your brand list."}),g.jsx("p",{children:"This action cannot be undone. To create a new group with these brands, simply select them and create a new group."})]}),confirmText:"Yes, ungroup",isLoading:T})]})};function pf(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return ln(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(ln(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,ln(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,ln(d,"constructor",u),ln(u,"constructor",l),l.displayName="GeneratorFunction",ln(u,i,"GeneratorFunction"),ln(d),ln(d,i,"Generator"),ln(d,r,function(){return this}),ln(d,"toString",function(){return"[object Generator]"}),(pf=function(){return{w:s,m:f}})()}function ln(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}ln=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){ln(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},ln(e,t,n,r)}function Um(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function JL(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Um(s,r,i,o,a,"next",l)}function a(l){Um(s,r,i,o,a,"throw",l)}o(void 0)})}}function Gm(e,t){return rD(e)||nD(e,t)||tD(e,t)||eD()}function eD(){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 tD(e,t){if(e){if(typeof e=="string")return Km(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)?Km(e,t):void 0}}function Km(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 nD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function rD(e){if(Array.isArray(e))return e}var iD=function(t){var n=t.isOpen,r=t.onClose,i=t.brandId,s=t.brandsToGroup,o=t.onGroupCreated,a=Yt(),l=Gn(),u=l.analysisId,c=F.useState(""),d=Gm(c,2),f=d[0],h=d[1],y=F.useState([]),m=Gm(y,2),p=m[0],v=m[1];F.useEffect(function(){if(n&&s.length>0){var _,O=(_=s[0])===null||_===void 0?void 0:_.name;h(String(O||"New Group")),v(s.map(function(A){var T;return String((T=A.id)!==null&&T!==void 0?T:"")}))}},[n,s]);var b=y2({mutation:{onSuccess:function(){var _=JL(pf().m(function A(){return pf().w(function(T){for(;;)switch(T.n){case 0:return T.n=1,Promise.all([a.invalidateQueries({queryKey:su(i)}),a.invalidateQueries({queryKey:Nf(i)}),a.invalidateQueries({queryKey:Sr(i,"latest")}),a.invalidateQueries({queryKey:ir(i,"latest")}),a.invalidateQueries({queryKey:Sr(i,u)}),a.invalidateQueries({queryKey:ir(i,u)})]);case 1:o==null||o(),x();case 2:return T.a(2)}},A)}));function O(){return _.apply(this,arguments)}return O}(),onError:function(O){console.error("Error creating group:",O)}}}),S=b.mutate,C=b.isPending,x=function(){h(""),v([]),r()},k=function(){if(!(!f.trim()||p.length===0)){var O=p.flatMap(function(A){var T=s.find(function(j){return String(j.id)===A});return T&&T.type==="group"&&Array.isArray(T.groupedBrands)?T.groupedBrands.map(function(j){return String(j.id)}):A});S({brandId:i,data:{groupName:f.trim(),brandIds:O.filter(function(A){return A!==""}).map(function(A){return Number(A)})}})}},w=function(O){v(function(A){return A.filter(function(T){return T!==O})})};return g.jsx(E.Modal,{isOpen:n,onClose:x,children:g.jsx(E.Modal.Panel,{children:g.jsxs(E.Modal.Container,{children:[g.jsx(E.Modal.Container.Header,{children:g.jsx(E.Modal.Title,{children:"Edit brand group"})}),g.jsxs(E.Modal.Container.Content,{className:"yst-space-y-4",children:[g.jsxs("div",{children:[g.jsx("label",{htmlFor:"groupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),g.jsx(E.TextInput,{id:"groupName",value:f,onChange:function(_){return h(_.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),g.jsxs("div",{children:[g.jsx(E.TagField,{readOnly:!0,id:"groupedBrands",label:"Brands in group (".concat(p.length,")"),tags:p.map(function(_){var O=s.find(function(A){return String(A.id)===_});return O?O.type==="group"?"Group: ".concat(O.name):O.name||"":""}).filter(Boolean),onRemoveTag:function(_){var O=p.find(function(A){var T=s.find(function(B){return String(B.id)===A});if(!T)return!1;var j=T.type==="group"?"Group: ".concat(T.name):T.name||"";return j===_});O&&w(O)},onAddTag:function(){}}),p.length===0&&g.jsx("p",{className:"yst-text-sm yst-italic yst-text-gray-500",children:"No brands selected"})]}),g.jsx("p",{children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]}),g.jsx(E.Modal.Container.Footer,{className:"yst-pt-4",children:g.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[g.jsx(E.Button,{variant:"secondary",onClick:x,disabled:C,children:"Cancel"}),g.jsx(E.Button,{variant:"primary",onClick:k,disabled:!f.trim()||p.length===0||C,children:C?"Saving...":"Save group"})]})})]})})})};function Oa(e){"@babel/helpers - typeof";return Oa=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},Oa(e)}function Vm(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 Wm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vm(Object(n),!0).forEach(function(r){fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fx(e,t,n){return(t=sD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sD(e){var t=oD(e,"string");return Oa(t)=="symbol"?t:t+""}function oD(e,t){if(Oa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aD(e){return cD(e)||uD(e)||hx(e)||lD()}function lD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1288
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cD(e){if(Array.isArray(e))return vf(e)}function Yn(e,t){return hD(e)||fD(e,t)||hx(e,t)||dD()}function dD(){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 hx(e,t){if(e){if(typeof e=="string")return vf(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)?vf(e,t):void 0}}function vf(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 fD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function hD(e){if(Array.isArray(e))return e}var gD=function(){var t,n=xn(),r=F.useState(!1),i=Yn(r,2),s=i[0],o=i[1],a=F.useState({}),l=Yn(a,2),u=l[0],c=l[1],d=F.useState(""),f=Yn(d,2),h=f[0],y=f[1],m=F.useState(1),p=Yn(m,2),v=p[0],b=p[1],S=F.useState({}),C=Yn(S,2),x=C[0],k=C[1],w=F.useState(!1),_=Yn(w,2),O=_[0],A=_[1],T=F.useState(!1),j=Yn(T,2),B=j[0],R=j[1],P=F.useState(null),M=Yn(P,2),I=M[0],G=M[1],Y=Gn(),q=Y.brandId;function U(de){return String(de.id)}var z=s4(q,{query:{enabled:!!q}}),V=z.data,N=z.isLoading,ne=10,J=(V==null||(t=V.data)===null||t===void 0?void 0:t.associatedBrands.filter(function(de){var me,fe;return h?((me=(fe=de.name)===null||fe===void 0?void 0:fe.toLowerCase())!==null&&me!==void 0?me:"").includes(h.toLowerCase()):!0}))||[],he=Math.ceil(J.length/ne),X=(v-1)*ne,ge=aD(J).sort(function(de,me){return de.type==="group"&&me.type!=="group"?-1:de.type!=="group"&&me.type==="group"?1:0}),ye=ge.slice(X,X+ne),je=function(me){var fe=J.find(function(Fe){return U(Fe)===me});fe&&fe.type==="group"&&(G(fe),R(!0))},se=Object.entries(x).filter(function(de){var me=Yn(de,2),fe=me[1];return fe}).map(function(de){var me=Yn(de,1),fe=me[0];return fe}),nt=function(){A(!0)},Ie=function(me){y(me.target.value),b(1)},st=function(me){k(function(fe){return Wm(Wm({},fe),{},fx({},me,!fe[me]))})},ze=function(){n("/")},Ke=function(){k({}),c({}),o(!1)},ee=function(){A(!1)},$e=function(){k({}),b(1),y("")},ot=function(){R(!1),G(null)},Ne=function(me,fe){return me in u?!!u[me]:!fe.isHidden},Le=[{Header:"Brand name",accessor:"name",Cell:function(me){var fe=me.value,Fe=me.row;return g.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:g.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[g.jsx(E.Checkbox,{id:"brand-checkbox-".concat(Fe.id),checked:!!x[U(Fe)],onChange:function(){return st(U(Fe))},value:U(Fe),label:Fe.isSelf?g.jsx(Ku,{children:fe}):fe,name:"brand-checkbox-".concat(Fe.id),disabled:!Ne(U(Fe),Fe)}),Fe.type==="group"&&g.jsx(f_,{className:"yst-h-4 yst-w-4 yst-text-slate-400"})]})})},LoadingComponent:function(me){var fe=me.id,Fe=fe===void 0?"":fe;return g.jsxs("div",{className:"yst-flex",children:[g.jsx(E.Checkbox,{id:"loading-row-checkbox-".concat(Fe),value:"loading",label:"",disabled:!0,name:"brand-checkbox-".concat(Fe)})," ",g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-32",id:"loading-row-skeleton-".concat(Fe)})]})}},{Header:"Actions",accessor:"id",Cell:function(me){var fe=me.value,Fe=me.row;return g.jsx(g.Fragment,{children:Fe.type==="group"?g.jsxs(E.Button,{variant:"tertiary",size:"small",onClick:function(){return je(String(fe!=null?fe:""))},className:"yst-gap-1.5 yst-px-0",disabled:!Ne(U(Fe),Fe),children:[g.jsx(b2,{className:"yst-h-4 yst-w-4"}),"Edit group"]}):void 0})},LoadingComponent:function(){return g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"})}}];return g.jsxs(E.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[g.jsx(dx,{title:"Brand list ".concat(""),children:g.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."})}),g.jsxs(E.Paper.Content,{children:[g.jsx("div",{className:"yst-mb-6",children:g.jsx(E.TextInput,{id:"brand-search",label:"Search brands",placeholder:"Search brands",value:h,onChange:Ie})}),g.jsx("div",{className:"yst-mb-6",children:g.jsxs(E.Table,{columns:Le,className:"yst-w-full",variant:"minimal",children:[g.jsx(E.Table.Head,{children:g.jsx(E.Table.Row,{children:Le.map(function(de){return g.jsx(E.Table.Header,{children:de.Header},de.accessor)})})}),g.jsx(E.Table.Body,{children:N?[1,2,3].map(function(de,me){return g.jsx(E.Table.Row,{children:Le.map(function(fe,Fe){return g.jsx(E.Table.Cell,{children:g.jsx(fe.LoadingComponent,{id:"skeleton-".concat(me,"-").concat(Fe)},fe.accessor)},"cell-".concat(Fe))})},me)}):ye.length===0?g.jsx(E.Table.Row,{children:g.jsx(E.Table.Cell,{colSpan:Le.length,children:g.jsxs("div",{className:"yst-py-12 yst-text-center",children:[g.jsx("h3",{className:"yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900",children:"No brands found"}),g.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&&g.jsx(E.Button,{variant:"secondary",size:"small",onClick:function(){y(""),b(1)},className:"yst-mt-4",children:"Clear search"})]})})}):ye.map(function(de){return g.jsx(E.Table.Row,{children:Le.map(function(me){return g.jsx(E.Table.Cell,{children:me.Cell?me.Cell({value:de[me.accessor],row:de}):de[me.accessor]},me.accessor)})},de.id)})})]})}),g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[g.jsxs(E.Button,{variant:"secondary",onClick:nt,className:"yst-mb-0 yst-gap-2",disabled:se.length<2,children:[g.jsx(h6,{})," Group brands"]}),g.jsx(E.Pagination,{variant:"text",current:v,total:he,onNavigate:b,className:"yst-flex-row",screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]}),g.jsx(zf,{children:g.jsx("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:s?g.jsxs(g.Fragment,{children:[g.jsx(E.Button,{variant:"secondary",className:"yst-mb-0",onClick:Ke,children:"Discard changes"}),g.jsx(E.Button,{variant:"primary",className:"yst-mb-0",onClick:ze,children:"Save changes"})]}):g.jsx(E.Button,{as:di,to:"/brands/".concat(q),variant:"tertiary",className:"yst-mb-0",children:"Return to analysis"})})}),g.jsx(iD,{isOpen:O,onClose:ee,brandId:q,brandsToGroup:J.filter(function(de){return se.includes(U(de))}),onGroupCreated:$e}),g.jsx(ZL,{isOpen:B,onClose:ot,groupToEdit:I,allBrands:J})]})};const yD=Object.freeze(Object.defineProperty({__proto__:null,default:gD},Symbol.toStringTag,{value:"Module"}));function mD(e,t){return xD(e)||bD(e,t)||vD(e,t)||pD()}function pD(){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 vD(e,t){if(e){if(typeof e=="string")return Qm(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)?Qm(e,t):void 0}}function Qm(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 bD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function xD(e){if(Array.isArray(e))return e}var wD=function(t){var n=t.isOpen,r=t.onClose,i=Yt(),s=qf(),o=F.useState(""),a=mD(o,2),l=a[0],u=a[1],c=L4({mutation:{onSettled:function(){i.clear()},onSuccess:function(){r(),s("Successfully deleted all data.",{variant:"success"})},onError:function(){i.clear(),s("Failed to delete all data. Please try again later.",{variant:"error"})}}}),d=c.mutate,f=c.isPending;return F.useEffect(function(){n&&u("")},[n]),g.jsx(Vu,{isOpen:n,onClose:r,onConfirm:function(){d()},isLoading:f,disabled:l!=="DELETE ALL",title:"Delete all data?",description:g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"This will permanently erase all brands, analysis results, and queries from your account."}),g.jsx("p",{children:"This action cannot be undone."}),g.jsx(E.TextField,{id:"delete-all-confirmation",label:"To confirm, please type DELETE ALL:",value:l,onChange:function(h){return u(h.target.value)}}),g.jsx("p",{children:g.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete all data",cancelText:"No, go back"})};function bf(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return un(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(un(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,un(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,un(d,"constructor",u),un(u,"constructor",l),l.displayName="GeneratorFunction",un(u,i,"GeneratorFunction"),un(d),un(d,i,"Generator"),un(d,r,function(){return this}),un(d,"toString",function(){return"[object Generator]"}),(bf=function(){return{w:s,m:f}})()}function un(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}un=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){un(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},un(e,t,n,r)}function Ym(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function SD(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Ym(s,r,i,o,a,"next",l)}function a(l){Ym(s,r,i,o,a,"throw",l)}o(void 0)})}}function CD(e,t){return ED(e)||OD(e,t)||kD(e,t)||_D()}function _D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1291
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kD(e,t){if(e){if(typeof e=="string")return Xm(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)?Xm(e,t):void 0}}function Xm(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 OD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function ED(e){if(Array.isArray(e))return e}var AD=function(t){var n=t.isOpen,r=t.brandId,i=t.onClose,s=t.brandName,o=Yt(),a=qf(),l=F.useState(""),u=CD(l,2),c=u[0],d=u[1],f=x4({mutation:{onSuccess:function(){var m=SD(bf().m(function v(){return bf().w(function(b){for(;;)switch(b.n){case 0:return b.n=1,Promise.all([o.invalidateQueries({queryKey:rr()}),o.invalidateQueries({queryKey:Hu()})]);case 1:a("Brand deleted successfully",{variant:"success"}),i();case 2:return b.a(2)}},v)}));function p(){return m.apply(this,arguments)}return p}(),onError:function(p){var v=p instanceof Error?p.message:"Please try again later.";a("Failed to delete brand. ".concat(v),{variant:"error"})}}}),h=f.mutate,y=f.isPending;return F.useEffect(function(){n&&d("")},[n]),g.jsx(Vu,{isOpen:n,onClose:i,onConfirm:function(){if(!s){console.error("Brand name is required for deletion confirmation");return}h({brandId:r})},isLoading:y,disabled:c.toLowerCase()!==(s==null?void 0:s.toLowerCase()),title:"Delete brand?",description:g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"This will permanently delete all data associated with this brand, including past analyses and query history."}),g.jsx("p",{children:"This action cannot be undone."}),g.jsx(E.TextField,{id:"delete-modal-brand-name-confirmation",label:"To confirm, please type your brand name ".concat(s,":"),value:c,onChange:function(m){return d(m.target.value)}}),g.jsx("p",{children:g.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete brand",cancelText:"No, go back"})};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 Go(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return cn(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(cn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,cn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,cn(d,"constructor",u),cn(u,"constructor",l),l.displayName="GeneratorFunction",cn(u,i,"GeneratorFunction"),cn(d),cn(d,i,"Generator"),cn(d,r,function(){return this}),cn(d,"toString",function(){return"[object Generator]"}),(Go=function(){return{w:s,m:f}})()}function cn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}cn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){cn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},cn(e,t,n,r)}function Zm(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 Rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(r){TD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TD(e,t,n){return(t=PD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PD(e){var t=jD(e,"string");return Ea(t)=="symbol"?t:t+""}function jD(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 Jm(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function ep(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){Jm(s,r,i,o,a,"next",l)}function a(l){Jm(s,r,i,o,a,"throw",l)}o(void 0)})}}function MD(e,t){return ID(e)||DD(e,t)||LD(e,t)||$D()}function $D(){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 LD(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 DD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function ID(e){if(Array.isArray(e))return e}var RD=function(t){var n,r,i=t.brand,s=t.isLast,o=t.onDelete,a=i.id,l=Gn(),u=l.hostAppProps,c=l.analysisId,d=u.onAddSubscription,f=xn(),h=Va(),y=h.setBrandId,m=F.useState(!1),p=MD(m,2),v=p[0],b=p[1],S=Yt(),C=Uu({query:{select:function(P){var M=P.data;return M},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),x=C.data,k=m2({mutation:{onMutate:function(){var R=ep(Go().m(function M(I){var G,Y,q;return Go().w(function(U){for(;;)switch(U.n){case 0:return G=I.brandId,Y=I.data,U.n=1,S.cancelQueries({queryKey:rr()});case 1:return q=S.getQueryData(rr()),S.setQueryData(rr(),function(z){var V,N;return z&&Rr(Rr({},z),{},{data:Rr(Rr({},z.data),{},{brands:((V=(N=z.data)===null||N===void 0?void 0:N.brands)!==null&&V!==void 0?V:[]).map(function(ne){return ne.id===G?Rr(Rr({},ne),{},{settings:Rr(Rr({},ne.settings),{},{enableAutomaticAnalysis:Y.enableAutomaticAnalysis})}):ne})})})}),U.a(2,{previous:q})}},M)}));function P(M){return R.apply(this,arguments)}return P}(),onSuccess:function(){if(i&&i.settings&&i.settings.enableAutomaticAnalysis===!1)return b(!1);b(!j)},onError:function(P,M,I){I!=null&&I.previous&&S.setQueryData(rr(),I.previous)},onSettled:function(){var R=ep(Go().m(function M(){return Go().w(function(I){for(;;)switch(I.n){case 0:return I.n=1,Promise.all([S.invalidateQueries({queryKey:rr()}),S.invalidateQueries({queryKey:Hu()}),S.invalidateQueries({queryKey:zu(a)}),S.invalidateQueries({queryKey:Sr(a,"latest")}),S.invalidateQueries({queryKey:ir(a,"latest")}),S.invalidateQueries({queryKey:Sr(a,c)}),S.invalidateQueries({queryKey:ir(a,c)})]);case 1:return I.a(2)}},M)}));function P(){return R.apply(this,arguments)}return P}()}}),w=k.mutate,_=k.isPending,O=function(P){w({brandId:a,data:{enableAutomaticAnalysis:P}})},A=function(P){if(P){if(!T)return b(!0);if(!j)return O(!0);b(!0)}else O(!1)},T=Number(x==null?void 0:x.maxNumberOfActiveBrands)-Number(x==null?void 0:x.numberOfActiveBrands)>0||!!(i!=null&&(n=i.settings)!==null&&n!==void 0&&n.enableAutomaticAnalysis),j=R2(i==null?void 0:i.firstNextAnalysisOpportunity),B=(i==null?void 0:i.setupStatus)==="pendingQuerySelection";return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:ke("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":!s}),children:[g.jsx(E.Toggle,{id:"toggle-brand-".concat(i==null?void 0:i.id),checked:i==null||(r=i.settings)===null||r===void 0?void 0:r.enableAutomaticAnalysis,screenReaderLabel:"Enable or disable automatic analysis for this brand",onChange:A,disabled:(i==null?void 0:i.id)==="loading"||_}),g.jsxs("div",{className:"yst-font-medium",children:[(i==null?void 0:i.id)==="loading"?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-32"}):i==null?void 0:i.name,B&&g.jsx("div",{children:g.jsx(E.Link,{variant:"primary",onClick:function(){i.id?(y(i.id),f("/setup/".concat(i.id,"/queries"))):console.error("Brand ID is missing.")},children:"Finish setup"})}),(i==null?void 0:i.nextScheduledAnalysis)&&g.jsxs("div",{className:"yst-font-normal yst-italic yst-text-slate-500",children:["Next analysis:"," ",Hd(i.nextScheduledAnalysis)]})]}),g.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:(i==null?void 0:i.id)==="loading"?g.jsx(E.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):g.jsxs(E.Button,{size:"small",variant:"tertiary",className:"yst-gap-1 yst-text-red-600 *:hover:yst-text-red-700",onClick:function(){i!=null&&i.id&&o(i.id)},disabled:(i==null?void 0:i.id)==="loading",children:[g.jsx(Ff,{})," Delete brand"]})})]}),g.jsx(E.Modal,{isOpen:v,onClose:function(){return b(!1)},position:"center",as:"div",className:ke({"yst-mx-auto yst-max-w-xl":T}),children:T?g.jsx(E.Modal.Panel,{children:j?g.jsxs(g.Fragment,{children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Start brand analysis now?"})}),g.jsxs(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[g.jsx("p",{children:"Activating this brand will immediately start a new analysis."}),g.jsx("p",{children:"This will use one of your weekly analyses included in your subscription."})]}),g.jsxs(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[g.jsx(E.Button,{variant:"secondary",onClick:function(){return b(!1)},children:"Cancel"}),g.jsx(E.Button,{variant:"primary",onClick:function(){O(!0)},isLoading:_,children:"Yes, start analysis"})]})]}):g.jsxs(g.Fragment,{children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Automatic analysis enabled"})}),g.jsxs(E.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[g.jsx("p",{children:"You've turned on the weekly automatic analysis for this brand."}),g.jsxs("p",{children:["The next analysis will run on"," ",g.jsx("span",{className:"yst-font-medium",children:Hd(i==null?void 0:i.nextScheduledAnalysis)||"the next analysis cycle"}),"."]})]}),g.jsx(E.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:g.jsx(E.Button,{variant:"primary",onClick:function(){return b(!1)},children:"Got it"})})]})}):g.jsxs(E.Modal.Panel,{children:[g.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-center yst-text-lg yst-font-medium",children:"You've reached your active brand limit"})}),g.jsx(E.Modal.Container.Content,{children:g.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."})})]})}),g.jsx(E.Modal.Container.Footer,{children:g.jsxs("div",{className:"yst-flex yst-flex-col yst-justify-stretch yst-gap-2",children:[d&&g.jsxs(E.Button,{variant:"upsell",className:"yst-flex yst-gap-1",onClick:d,children:[g.jsx(x2,{}),"Add a subscription"]}),g.jsx(E.Button,{variant:"tertiary",className:"",onClick:function(){return b(!1)},children:"Manage active brands"})]})})]})})]})},np,rp,ip;function nd(e,t){return qD(e)||BD(e,t)||FD(e,t)||ND()}function ND(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1293
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FD(e,t){if(e){if(typeof e=="string")return sp(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)?sp(e,t):void 0}}function sp(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 BD(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function qD(e){if(Array.isArray(e))return e}function Ph(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var op=Ya(np||(np=Ph(["xl:yst-w-1/3"]))),ap=Ya(rp||(rp=Ph(["xl:yst-w-2/3"]))),lp=Ya(ip||(ip=Ph(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),zD=function(){var t,n,r,i,s=F.useState(!1),o=nd(s,2),a=o[0],l=o[1],u=F.useState(!1),c=nd(u,2),d=c[0],f=c[1],h=F.useState(null),y=nd(h,2),m=y[0],p=y[1],v=Uu({query:{select:function(w){var _=w.data;return _}}}),b=v.data,S=es({query:{select:function(w){var _=w.data;return _==null?void 0:_.brands},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),C=S.data,x=C==null?void 0:C.find(function(k){return k.id===m});return g.jsxs("form",{children:[g.jsxs(E.Card,{children:[g.jsx(Pb,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),g.jsxs(E.Card.Content,{children:[g.jsxs(lp,{children:[g.jsxs(op,{className:"yst-space-y-2",children:[g.jsx(E.Title,{size:"4",children:"Brands"}),g.jsxs("p",{children:["You have"," ",g.jsxs("b",{children:[(t=b==null?void 0:b.activeSubscriptions)!==null&&t!==void 0?t:"—"," subscription(s)"]}),". This gives you up to"," ",g.jsxs("b",{children:[(n=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),g.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),g.jsxs(ap,{children:[C&&g.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: ",(r=b==null?void 0:b.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=b==null?void 0:b.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),C&&C.length===0&&g.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",g.jsx(E.Link,{as:di,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(C!=null?C:[{id:"loading",name:"Loading..."}]).map(function(k,w,_){return g.jsx(RD,{brand:k,isLast:w===_.length-1,onDelete:function(O){p(O),l(!0)}},k.id)})]})]}),g.jsx(Xa,{}),g.jsxs(lp,{children:[g.jsxs(op,{className:"yst-space-y-2",children:[g.jsx(E.Title,{size:"4",children:"Delete all data"}),g.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),g.jsxs(ap,{className:"yst-space-y-4",children:[g.jsxs(E.Button,{variant:"error",onClick:function(){f(!0)},disabled:(C==null?void 0:C.length)===0,children:[g.jsx(Ff,{})," Delete all data"]}),g.jsx("p",{children:g.jsxs("i",{children:[g.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),g.jsx(AD,{isOpen:a,onClose:function(){l(!1),p(null)},brandId:m||"",brandName:x==null?void 0:x.name}),g.jsx(wD,{isOpen:d,onClose:function(){f(!1)}})]})};const HD=Object.freeze(Object.defineProperty({__proto__:null,default:zD},Symbol.toStringTag,{value:"Module"}));function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}var xf=[{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. 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. This process should take around 5 minutes."}],UD=function(t){return xf.find(function(n){return!!Vs(n.path,t)})||xf[0]};function GD(){var e=qt(),t=UD(e.pathname);return g.jsxs(E.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[g.jsx(dx,{title:g.jsx(gx,{currentStep:t,steps:xf}),description:t.description}),g.jsx(E.Paper.Content,{children:g.jsx(Ws,{})})]})}var gx=function(t){var n=t.title,r=t.currentStep,i=t.steps;return g.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[g.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[g.jsx("span",{className:"yst-text-slate-900",children:ku(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),g.jsx("span",{children:ku(r)==="object"?r.title:n||"Step ".concat(r)})]})};const KD=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:gx,default:GD},Symbol.toStringTag,{value:"Module"}));var yx=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,u=t.isLoading,c=u===void 0?!1:u;return g.jsx(zf,{nestedInPaperContent:!0,children:g.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&&g.jsx(E.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),g.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:g.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:c,children:[i==="ai"&&g.jsx(y6,{}),s]})})]})})},VD=[{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"}],WD=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],rd=[].concat(VD,WD,[{value:"OTHER",label:"Other"}]),QD=[{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"}],YD=[{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"ca",label:"Catalan"},{value:"zh",label:"Chinese"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"ka",label:"Georgian"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"no",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"es",label:"Spanish"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tl",label:"Tagalog"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"vi",label:"Vietnamese"}],XD=[].concat(QD,YD);function si(e){"@babel/helpers - typeof";return si=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},si(e)}function up(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 cp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?up(Object(n),!0).forEach(function(r){mx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mx(e,t,n){return(t=ZD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZD(e){var t=JD(e,"string");return si(t)=="symbol"?t:t+""}function JD(e,t){if(si(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(si(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wf(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return dn(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(dn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,dn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,dn(d,"constructor",u),dn(u,"constructor",l),l.displayName="GeneratorFunction",dn(u,i,"GeneratorFunction"),dn(d),dn(d,i,"Generator"),dn(d,r,function(){return this}),dn(d,"toString",function(){return"[object Generator]"}),(wf=function(){return{w:s,m:f}})()}function dn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}dn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){dn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},dn(e,t,n,r)}function dp(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function eI(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){dp(s,r,i,o,a,"next",l)}function a(l){dp(s,r,i,o,a,"throw",l)}o(void 0)})}}function as(e,t){return iI(e)||rI(e,t)||nI(e,t)||tI()}function tI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1294
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nI(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 rI(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function iI(e){if(Array.isArray(e))return e}var sI=function(){var t=xn(),n=Va(),r=Yt(),i=F.useState(),s=as(i,2),o=s[0],a=s[1],l=F.useState(!1),u=as(l,2),c=u[0],d=u[1],f=F.useState({name:"",url:"",description:"",language:"en",isLocal:!1,country:void 0,region:""}),h=as(f,2),y=h[0],m=h[1],p=F.useState(null),v=as(p,2),b=v[0],S=v[1],C=F.useState(""),x=as(C,2),k=x[0],w=x[1],_=F.useMemo(function(){var z;if(!y.country)return"";var V=rd.find(function(N){return N.value===y.country});return(z=V==null?void 0:V.label)!==null&&z!==void 0?z:""},[y.country]),O=F.useMemo(function(){var z=k.trim().toLowerCase();return z?rd.filter(function(V){var N=V.label.toLowerCase().includes(z),ne=V.value.toLowerCase().includes(z);return N||ne}):rd},[k]),A=y4({mutation:{onSuccess:function(){var z=eI(wf().m(function N(ne){var J;return wf().w(function(he){for(;;)switch(he.n){case 0:return J=ne.data.id,he.n=1,Promise.all([r.invalidateQueries({queryKey:Hu()}),r.invalidateQueries({queryKey:rr()})]);case 1:J&&n.setBrandId(J),ne!=null&&ne.status&&ne.status>=200&&ne.status<300&&J&&(n.setBrandId(J),a(J));case 2:return he.a(2)}},N)}));function V(N){return z.apply(this,arguments)}return V}(),onError:function(){d(!1)}}}),T=A.mutate,j=A.isPending,B=A.error,R=es({query:{enabled:!!o,select:function(V){var N=V.data;return N==null?void 0:N.brands},refetchInterval:function(V){var N;return((V==null||(N=V.state)===null||N===void 0||(N=N.data)===null||N===void 0||(N=N.data)===null||N===void 0?void 0:N.brands)||[]).find(function(ne){return ne.id===o})?!1:2*1e3}}}),P=R.data;F.useEffect(function(){o&&P!==null&&P!==void 0&&P.find(function(z){return z.id===o})&&t("/setup/".concat(o,"/queries"),{replace:!0})},[o,P,t]);var M=function(V,N){m(function(ne){return cp(cp({},ne),{},mx({},V,N))})},I=function(V){w(V.target.value)},G=function(V){M("country",V!=null?V:void 0),w("")},Y=function(V){if(V.preventDefault(),S(null),y.description.length>250){S("Your brand description is too long. Please keep it within the 250-character limit."),d(!1);return}d(!0);var N=y.url;N&&!/^https?:\/\//i.test(N)&&(N="https://".concat(N)),T({data:{name:y.name,url:N,description:y.description,focusLanguage:y.language,country:y.country,regionOrCity:y.region}})};function q(z){return si(z)==="object"&&z!==null&&"response"in z&&si(z.response)==="object"&&z.response!==void 0&&"data"in z.response}var U=q(B)?B.response.data.errors:void 0;return g.jsxs("form",{onSubmit:Y,children:[g.jsxs("div",{className:"yst-space-y-6",children:[g.jsx(E.Title,{size:"2",children:"Brand info"}),!!B&&g.jsx(E.Alert,{variant:"error",title:"Error",isVisible:!!B,children:g.jsx("ul",{children:U&&si(U)==="object"?Object.entries(U).flatMap(function(z){var V=as(z,2),N=V[0],ne=V[1];return Array.isArray(ne)?ne.map(function(J,he){return g.jsx("li",{children:J},"".concat(N,"-").concat(he))}):null}):"There was an error creating the brand."})}),b&&g.jsx(E.Alert,{variant:"error",title:"Error",isVisible:!!b,children:g.jsx("ul",{children:g.jsx("li",{children:"Your brand description is too long. Please keep it within the 250-character limit."})})}),g.jsx(E.TextField,{id:"name",label:"Brand name",value:y.name,onChange:function(z){return M("name",z.target.value)},maxLength:255}),g.jsx(E.TextField,{id:"url",label:"Website URL (optional)",placeholder:"Example: https://yourwebsite.com",value:y.url,maxLength:247,onChange:function(z){return M("url",z.target.value)}}),g.jsxs("div",{id:"brand-description-textarea",children:[g.jsx(E.TextareaField,{id:"brand-description",label:"Brand description",value:y.description,onChange:function(z){var V=z.target.value;M("description",V)},...y.description.length>250?{validation:{variant:"error",message:"Your brand description is too long. Please keep it within the 250-character limit."}}:{},placeholder:"e.g. We design eco-friendly yoga mats for busy professionals who want sustainable gear that’s durable, stylish and kind to the planet."}),g.jsxs("div",{className:"yst-mt-1 yst-flex",children:[g.jsxs("div",{className:"yst-flex-grow yst-flex-col",children:[y.description.length>250&&g.jsx("div",{className:"yst-mb-2 yst-text-red-500",children:"Your brand description is too long. Please keep it within the 250-character limit."}),"Tell us about your brand: what you do, who it’s for and what makes it special."]}),g.jsxs("div",{className:ke("yst-ml-6 yst-mt-[-4px] yst-text-xs",{"yst-text-slate-500":y.description.length<=250,"yst-text-red-500":y.description.length>250}),children:[y.description.length,"/250"]})]})]}),g.jsxs("div",{className:"yst-space-y-2",children:[g.jsx(E.Select,{className:"yst-max-w-sm",id:"language-select",label:"Target language",value:y.language,onChange:function(z){return M("language",z)},options:XD.map(function(z){return{label:z.label,value:z.value}})}),g.jsx("p",{children:"The main language your brand uses to communicate or create content."})]})]}),g.jsx(Xa,{}),g.jsxs("div",{className:"yst-space-y-6",children:[g.jsx(E.Title,{size:"2",children:"Location info"}),g.jsx("p",{children:"Specify a location to enhance the accuracy of the analysis."}),g.jsx(E.Autocomplete,{className:"yst-max-w-sm",id:"country-select",label:"Target country (optional)",value:y.country||null,nullable:!0,placeholder:"Search countries...",onQueryChange:I,onChange:G,selectedLabel:_,children:O.map(function(z){return g.jsx(E.Autocomplete.Option,{value:z.value,children:z.label},z.value)})}),y.country&&g.jsx(E.TextField,{id:"region",label:"Target city, state, or region (optional)",value:y.region,onChange:function(z){return M("region",z.target.value)},description:`Enter a city, state, or region to narrow down the analysis. For
|
|
1295
|
+
example: California, Bavaria, or Paris.`,maxLength:255})]}),g.jsx(yx,{onBack:function(){return t(-1)},buttonText:"Generate queries",isButtonDisabled:j||!!o||c,isLoading:j||!!o})]})};const oI=Object.freeze(Object.defineProperty({__proto__:null,default:sI},Symbol.toStringTag,{value:"Module"})),hp=e=>D.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},D.createElement("path",{d:"M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z",stroke:"url(#paint0_linear_3891_2757)",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),D.createElement("defs",null,D.createElement("linearGradient",{id:"paint0_linear_3891_2757",x1:1.99951,y1:2,x2:15.3308,y2:3.72773,gradientUnits:"userSpaceOnUse"},D.createElement("stop",{stopColor:"#A61E69"}),D.createElement("stop",{offset:1,stopColor:"#6366F1"}))));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 aI(e){return cI(e)||uI(e)||px(e)||lI()}function lI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1296
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uI(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cI(e){if(Array.isArray(e))return Cf(e)}function gp(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 _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gp(Object(n),!0).forEach(function(r){dI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dI(e,t,n){return(t=fI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fI(e){var t=hI(e,"string");return Aa(t)=="symbol"?t:t+""}function hI(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 Sf(){/*! 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,y,m,p){var v=y&&y.prototype instanceof a?y:a,b=Object.create(v.prototype);return fn(b,"_invoke",function(S,C,x){var k,w,_,O=0,A=x||[],T=!1,j={p:0,n:0,v:e,a:B,f:B.bind(e,4),d:function(P,M){return k=P,w=0,_=e,j.n=M,o}};function B(R,P){for(w=R,_=P,t=0;!T&&O&&!M&&t<A.length;t++){var M,I=A[t],G=j.p,Y=I[2];R>3?(M=Y===P)&&(_=I[(w=I[4])?5:(w=3,3)],I[4]=I[5]=e):I[0]<=G&&((M=R<2&&G<I[1])?(w=0,j.v=P,j.n=I[1]):G<Y&&(M=R<3||I[0]>P||P>Y)&&(I[4]=R,I[5]=P,j.n=Y,w=0))}if(M||R>1)return o;throw T=!0,P}return function(R,P,M){if(O>1)throw TypeError("Generator is already running");for(T&&P===1&&B(P,M),w=P,_=M;(t=w<2?e:_)||!T;){k||(w?w<3?(w>1&&(j.n=-1),B(w,_)):j.n=_:j.v=_);try{if(O=2,k){if(w||(R="next"),t=k[R]){if(!(t=t.call(k,_)))throw TypeError("iterator result is not an object");if(!t.done)return t;_=t.value,w<2&&(w=0)}else w===1&&(t=k.return)&&t.call(k),w<2&&(_=TypeError("The iterator does not provide a '"+R+"' method"),w=1);k=e}else if((t=(T=j.n<0)?_:S.call(C,j))!==o)break}catch(I){k=e,w=1,_=I}finally{O=1}}return{value:t,done:T}}}(h,m,p),!0),b}var o={};function a(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(fn(t={},r,function(){return this}),t),d=u.prototype=a.prototype=Object.create(c);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,fn(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=u,fn(d,"constructor",u),fn(u,"constructor",l),l.displayName="GeneratorFunction",fn(u,i,"GeneratorFunction"),fn(d),fn(d,i,"Generator"),fn(d,r,function(){return this}),fn(d,"toString",function(){return"[object Generator]"}),(Sf=function(){return{w:s,m:f}})()}function fn(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}fn=function(o,a,l,u){if(a)i?i(o,a,{value:l,enumerable:!u,configurable:!u,writable:!u}):o[a]=l;else{var c=function(f,h){fn(o,f,function(y){return this._invoke(f,h,y)})};c("next",0),c("throw",1),c("return",2)}},fn(e,t,n,r)}function yp(e,t,n,r,i,s,o){try{var a=e[s](o),l=a.value}catch(u){return void n(u)}a.done?t(l):Promise.resolve(l).then(r,i)}function gI(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function o(l){yp(s,r,i,o,a,"next",l)}function a(l){yp(s,r,i,o,a,"throw",l)}o(void 0)})}}function Nr(e,t){return pI(e)||mI(e,t)||px(e,t)||yI()}function yI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1297
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function px(e,t){if(e){if(typeof e=="string")return Cf(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)?Cf(e,t):void 0}}function Cf(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 mI(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,u=!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(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function pI(e){if(Array.isArray(e))return e}var fs=5,Ko="Generating...",vI="Re-generating...",bI=100,xI=800,wI=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],SI=Array.from({length:fs},function(e,t){return{id:"query-".concat(t),text:Ko,isRegenerating:!0}}),CI=function(){var t,n,r,i=Eu(),s=i.brandId,o="/setup/".concat(s,"/analysis"),a=xn(),l=Yt(),u=qf(),c=F.useRef(!1),d=F.useState(SI),f=Nr(d,2),h=f[0],y=f[1],m=F.useState(!1),p=Nr(m,2),v=p[0],b=p[1],S=F.useState([]),C=Nr(S,2),x=C[0],k=C[1],w=F.useState([]),_=Nr(w,2),O=_[0],A=_[1],T=F.useState(!1),j=Nr(T,2),B=j[0],R=j[1],P=F.useState(null),M=Nr(P,2),I=M[0],G=M[1],Y=F.useState(!1),q=Nr(Y,2),U=q[0],z=q[1],V=F.useState(!1),N=Nr(V,2),ne=N[0],J=N[1],he=T4(s||"",{query:{enabled:!!s}}),X=he.data,ge=he.isRefetching,ye=he.error,je=he.isError,se=he.refetch,nt=ou(s||"",{query:{enabled:!!s}}),Ie=nt.data,st=F.useCallback(function(oe){var pe;if(!(Ie!=null&&(pe=Ie.data)!==null&&pe!==void 0&&pe.name))return!1;var Oe=Ie.data.name.toLowerCase().trim();return Oe?oe.toLowerCase().includes(Oe):!1},[Ie==null||(t=Ie.data)===null||t===void 0?void 0:t.name]),ze=F.useCallback(function(){return h.some(function(oe){return st(oe.text)})},[h,st]),Ke=function(){z(!1)},ee=function(){z(!1),s&&Ne({brandId:s,data:{queries:h.map(function(pe){return pe.text})}})},$e=function(){z(!1);var pe=h.findIndex(function(Oe){return st(Oe.text)});pe!==-1&&setTimeout(function(){var Oe=document.getElementById("query-text-".concat(pe));Oe&&(Oe.focus(),Oe.select())},bI)},ot=k4({mutation:{onSuccess:function(){var oe=gI(Sf().m(function Oe(Ee){return Sf().w(function(He){for(;;)switch(He.n){case 0:if(G(null),!(Ee!=null&&Ee.status&&Ee.status>=200&&Ee.status<300)){He.n=2;break}return He.n=1,Promise.all([l.invalidateQueries({queryKey:zu(s||"")}),l.invalidateQueries({queryKey:rr()})]);case 1:a(o);case 2:return He.a(2)}},Oe)}));function pe(Oe){return oe.apply(this,arguments)}return pe}(),onError:function(pe){var Oe,Ee;if((pe==null||(Oe=pe.response)===null||Oe===void 0||(Oe=Oe.data)===null||Oe===void 0?void 0:Oe.message)==="Cannot update queries for a brand that has existing analyses."){a(o,{replace:!0});return}var He=(pe==null||(Ee=pe.response)===null||Ee===void 0||(Ee=Ee.data)===null||Ee===void 0?void 0:Ee.message)||(pe==null?void 0:pe.message)||"An unexpected error occurred.";G(He)}}}),Ne=ot.mutate,Le=ot.isPending;F.useEffect(function(){s||a("/setup",{replace:!0})},[s,a,u]),F.useEffect(function(){var oe;!(Ie!=null&&(oe=Ie.data)!==null&&oe!==void 0&&oe.setupStatus)||c.current||(c.current=!0,Ie.data.setupStatus!=="pendingQuerySelection"&&(u("Queries cannot be changed for a brand with a pending analysis.",{variant:"warning"}),a(o,{replace:!0})))},[Ie==null||(n=Ie.data)===null||n===void 0?void 0:n.setupStatus,s,a,o,u]),F.useEffect(function(){var oe;if(X!=null&&(oe=X.data)!==null&&oe!==void 0&&oe.queries&&Array.isArray(X.data.queries)){var pe=X.data.queries.slice(0,fs);y(pe.map(function(Oe,Ee){return{id:"query-".concat(Ee),text:Oe,isRegenerating:!1}})),A(X.data.queries.slice(fs))}else je&&(y(Array.from({length:fs},function(Oe,Ee){return{id:"query-".concat(Ee),text:"",isRegenerating:!1}})),A([]))},[X,je]);var de=F.useCallback(function(oe){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;setTimeout(function(){y(function(Oe){return Oe.map(function(Ee,He){var Et=x.indexOf(He.toString());return Et>=0&&oe[Et]?_n(_n({},Ee),{},{text:oe[Et],isRegenerating:!1}):_n(_n({},Ee),{},{isRegenerating:!1})})}),k([]),R(!1),b(!1),pe&&A(function(Oe){var Ee=new Set(oe);return Oe.filter(function(He){return!Ee.has(He)})})},xI)},[x]);F.useEffect(function(){if(B&&!ge){var oe;if(X!=null&&(oe=X.data)!==null&&oe!==void 0&&oe.queries&&Array.isArray(X.data.queries)){var pe=X.data.queries.slice(0,fs),Oe=x.map(Number);y(function(Ee){return Ee.map(function(He,Et){var tn=Oe.indexOf(Et);return _n(_n({},He),{},{text:tn>=0&&pe[tn]?pe[tn]:He.text,isRegenerating:!1})})}),k([]),R(!1),b(!1)}else je&&(y(function(Ee){return Ee.map(function(He){return _n(_n({},He),{},{isRegenerating:!1})})}),k([]),R(!1),b(!1))}},[X,ge,B,x,je]);var me=F.useCallback(function(oe,pe){var Oe=new Set(pe);return O.filter(function(Ee){return!Oe.has(Ee)}).slice(0,oe)},[O]),fe=F.useMemo(function(){return ge||h.length===0||h.some(function(oe){return oe.isRegenerating||oe.text===Ko&&!je||oe.text.trim()===""})||v},[ge,h,v,je]),Fe=ge||h.some(function(oe){return oe.text===Ko})&&!je,Zt=F.useCallback(function(oe){var pe=oe.toString();k(function(Oe){return Oe.includes(pe)?Oe.filter(function(Ee){return Ee!==pe}):[].concat(aI(Oe),[pe])})},[]),It=F.useCallback(function(oe,pe){y(function(Oe){return Oe.map(function(Ee,He){return He===oe?_n(_n({},Ee),{},{text:pe}):Ee})})},[]),Jt=function(){b(!v),k([])},en=F.useCallback(function(){if(!(ge||x.length===0)){y(function(He){return He.map(function(Et,tn){return _n(_n({},Et),{},{isRegenerating:x.includes(tn.toString())})})});var oe=h.map(function(He){return He.text}),pe=x.length,Oe=me(pe,oe),Ee=Oe.length>=pe;Ee?de(Oe,!0):(R(!0),se())}},[ge,x,se,h,me,de]),Ae=F.useCallback(function(oe){if(oe.preventDefault(),!!s){if(ze()){z(!0);return}Ne({brandId:s,data:{queries:h.map(function(pe){return pe.text})}})}},[s,h,Ne,ze]),Ve=function(){J(!0)};return g.jsxs("div",{children:[I&&g.jsx(E.Alert,{className:"yst-mb-4",variant:"error",children:I}),g.jsxs("form",{onSubmit:Ae,children:[g.jsxs("div",{className:"yst-mb-8",children:[g.jsx(E.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),g.jsxs("div",{className:"yst-space-y-4",children:[g.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),g.jsx("div",{className:ke("yst-flex yst-gap-2",v?"yst-justify-end":"yst-justify-start"),children:v?g.jsxs(g.Fragment,{children:[g.jsx(E.Button,{size:"small",variant:"secondary",onClick:Jt,children:"Done"}),g.jsxs(E.Button,{variant:"secondary",size:"small",onClick:en,className:"yst-gap-1",isLoading:ge||B,disabled:B||ge||x.length===0,children:[g.jsx(hp,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):g.jsxs(E.Button,{size:"small",variant:"secondary",onClick:Jt,className:"yst-gap-1.5",disabled:Fe||je,children:[g.jsx(n6,{}),"Select queries to regenerate"]})})]})]}),g.jsx("div",{className:"yst-mb-8",children:h.length===0?wI.map(function(oe,pe){return g.jsx("div",{className:ke("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:g.jsx(E.SkeletonLoader,{children:oe||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(pe))}):h.slice(0,fs).map(function(oe,pe){var Oe=oe.isRegenerating?oe.text===Ko?Ko:vI:oe.text;return g.jsx("div",{className:ke("yst-mb-4"),children:g.jsxs("div",{className:"yst-flex yst-gap-2",children:[v&&g.jsx("div",{className:"yst-flex yst-items-center",children:g.jsx(E.Checkbox,{id:"query-regenerate-".concat(pe),name:"query-regenerate-".concat(pe),value:pe.toString(),checked:x.includes(pe.toString()),onChange:function(){return Zt(pe)},disabled:ge})}),g.jsx("div",{className:"yst-flex-1",children:g.jsx(E.TextField,{id:"query-text-".concat(pe),label:"Query ".concat(pe+1),type:"text",value:Oe,onChange:function(Ee){oe.isRegenerating||It(pe,Ee.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:oe.isRegenerating,required:!0,minLength:3,maxLength:255,validation:st(oe.text)?{variant:"warning",message:"For more accurate insights, avoid using your brand name in the query."}:void 0})})]})},oe.id)})}),g.jsx(yx,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:fe,isLoading:Le})]}),g.jsx(E.Modal,{isOpen:je&&M5(ye)&&(ye==null||(r=ye.response)===null||r===void 0?void 0:r.status)===429&&!ne,onClose:Ve,position:"center",as:"div",children:g.jsx(E.Modal.Panel,{children:g.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[g.jsx("div",{children:g.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:g.jsx(Fd,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Query regeneration limit reached"})}),g.jsx(E.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You’ve used all your query regenerations for this brand analysis, but you can still edit your queries manually."})}),g.jsx(E.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:g.jsx(E.Button,{variant:"primary",onClick:Ve,children:"Edit queries manually"})})]})]})})}),g.jsx(E.Modal,{isOpen:U,onClose:Ke,position:"center",as:"div",children:g.jsx(E.Modal.Panel,{children:g.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[g.jsx("div",{children:g.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:g.jsx(Fd,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),g.jsxs("div",{className:"yst-flex-1",children:[g.jsx(E.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:g.jsx(E.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Brand name detected in your queries"})}),g.jsxs(E.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:[g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"We found your brand name in one or more of your queries. Using your brand name in queries often show more mentions and more positive sentiment, which can skew your results."}),g.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"For more balanced results, remove your brand name or make the queries more general."})]}),g.jsxs(E.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[g.jsxs(E.Button,{onClick:ee,variant:"secondary",className:"yst-gap-1.5",disabled:Le,isLoading:Le,children:[g.jsx(hp,{}),"Run analysis anyway"]}),g.jsx(E.Button,{variant:"primary",onClick:$e,children:"Review and edit queries"})]})]})]})})})]})};const _I=Object.freeze(Object.defineProperty({__proto__:null,default:CI},Symbol.toStringTag,{value:"Module"}));var kI=["min","max","progress","className"];function OI(e,t){if(e==null)return{};var n,r,i=EI(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 EI(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 vx=F.forwardRef(function(e,t){var n=e.min,r=e.max,i=e.progress,s=e.className,o=OI(e,kI),a=F.useMemo(function(){var u=Math.max(0,r-n);if(u===0)return 0;var c=(i-n)/u*100;return Math.max(0,Math.min(100,c))},[n,r,i]),l=Math.min(Math.max(i,n),r);return g.jsx("div",{ref:t,role:"progressbar","aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":"".concat(Math.round(a),"%"),className:ke(s),...o,children:g.jsx("div",{className:"yst-relative yst-h-2 yst-w-full yst-overflow-hidden yst-rounded-full yst-bg-slate-200/40",children:g.jsx("div",{className:"yst-absolute yst-left-0 yst-top-0 yst-h-full yst-rounded-full yst-bg-[linear-gradient(97.38deg,_#A61E69_0%,_#6366F1_100%)] yst-transition-[width] yst-duration-300 yst-ease-out",style:{width:"".concat(a,"%")}})})})});vx.displayName="ProgressBarGradient";var ls=[{labelAbove:"Running queries...",label:"Running queries",threshold:99},{labelAbove:"Done!",label:"Building analysis",threshold:100}],bx=function(t){var n=t.progress,r=n===void 0?0:n,i=t.className,s=i===void 0?"":i,o=function(){for(var u=0;u<ls.length;u++)if(r<=ls[u].threshold)return ls[u];return ls[ls.length-1]},a=o();return g.jsxs("div",{className:ke("yst-font-medium yst-text-slate-800",s),children:[g.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?g.jsx(E.Spinner,{}):g.jsx(_2,{className:"yst-text-green-400"}),g.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:a.labelAbove})]}),g.jsx(vx,{className:"yst-mt-3",progress:r,min:0,max:100}),g.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:ls.map(function(l){return g.jsx("span",{children:g.jsx(Ku,{disabled:a.label!==l.label,children:l.label})},l.label)})})]})};bx.propTypes={progress:zd.number,className:zd.string};var AI=function(t){switch(t){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},TI=function(){var t,n,r,i=xn(),s=Yt(),o=Eu(),a=Gn(),l=a.brandId,u=o.brandId||l,c=ou(u,{query:{enabled:!!u,select:function(C){var x=C.data;return x}}}),d=c.data,f=J5(u,"latest",{query:{enabled:!!u,select:function(C){var x=C.data;return x},refetchInterval:function(C){var x,k=C==null||(x=C.state)===null||x===void 0||(x=x.data)===null||x===void 0?void 0:x.data;return AI(k==null?void 0:k.status)}}}),h=f.data,y=h==null?void 0:h.id,m=y?"/brands/".concat(u,"/analysis/").concat(y):"/brands/".concat(u);F.useEffect(function(){var S=(h==null?void 0:h.status)==="pending"||(h==null?void 0:h.status)==="processing"||(h==null?void 0:h.status)==="completed";d!=null&&d.nextScheduledAnalysis&&h!==null&&h!==void 0&&h.status&&F7(d.nextScheduledAnalysis,5)&&!S&&i("/brands/".concat(u),{replace:!0})},[d==null?void 0:d.nextScheduledAnalysis,u,i,h==null?void 0:h.status]),F.useEffect(function(){((d==null?void 0:d.setupStatus)==="completed"||(d==null?void 0:d.setupStatus)==="scheduledFirstAnalysis"&&d!==null&&d!==void 0&&d.firstNextAnalysisOpportunity&&!R2(d.firstNextAnalysisOpportunity,2))&&i(m,{replace:!0})},[d==null?void 0:d.firstNextAnalysisOpportunity,d==null?void 0:d.setupStatus,m,i]);var p=d==null||(t=d.queries)===null||t===void 0?void 0:t.length,v=(h==null||(n=h.completedQueries)===null||n===void 0?void 0:n.length)||0,b=function(){if(p&&p>0){var S=80/p,C=v*S;return(h==null?void 0:h.status)==="completed"?100:Math.round(Math.min(C,80))}return 0}();return g.jsxs("div",{children:[g.jsxs("div",{className:"yst-space-y-8",children:[g.jsx(bx,{progress:b}),g.jsx(Xa,{}),g.jsx("div",{className:"yst-space-y-8",children:d==null||(r=d.queries)===null||r===void 0?void 0:r.map(function(S){var C,x=S.id,k=S.query,w=x&&(h==null||(C=h.completedQueries)===null||C===void 0?void 0:C.includes(x));return g.jsxs("div",{className:ke("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[w===!0?g.jsx(_2,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):g.jsx(E.Spinner,{}),g.jsx("span",{className:"yst-flex-1 yst-text-sm",children:k})]},"result-item-".concat(k))})})]}),g.jsx("div",{className:"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 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",children:g.jsx(E.Button,{as:di,to:m,onClick:function(S){if(b!==100){S.preventDefault();return}s.clear()},disabled:b!==100,children:"Continue →"})})]})};const PI=Object.freeze(Object.defineProperty({__proto__:null,default:TI},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=xT;exports.setApiBaseUrl=f2;
|
|
1298
1298
|
//# sourceMappingURL=ai-insights-client.cjs.js.map
|