react-semaphor 0.0.533 → 0.0.534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-plus-LY9WbqgF.js → dashboard-plus-CiSC595N.js} +1 -1
- package/dist/chunks/{dashboard-plus-CBqYgo9v.js → dashboard-plus-ClDAhHk0.js} +1 -1
- package/dist/chunks/{index-BhTIunBg.js → index-BPlKV5_b.js} +1 -1
- package/dist/chunks/{index-DmhuwPdU.js → index-qsaiQ8Ey.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import { E as J, F as za, w as Z, A as zt, G as Ye, H as yn, I as Ks, J as V, P as Me, K as xn, L as vn, M as Nn, N as bn, O as K, Q as _e, R as Qn, T as Cn, U as wn, V as le, W as Sn, X as Qs, Y as Gt, Z as Jl, _ as ks, $ as Zs, a0 as G, a1 as La, a2 as ke, a3 as Wl, a4 as fe, a5 as ge, a6 as ye, a7 as xe, a8 as Tt, a9 as Dt, aa as te, ab as Xs, ac as Ke, ad as Qe, ae as Yl, af as Lt, ag as mt, ah as _t, ai as Le, aj as Fe, ak as Pe, al as Je, am as er, an as kn, ao as Tn, ap as tr, aq as Dn, ar as wa, as as nr, at as Ze, au as ar, av as Kl, aw as Un, ax as sr, ay as nt, az as rr, aA as Zn, aB as _a, aC as Ql, aD as Ee, aE as ie, aF as we, aG as Kt, aH as Xe, aI as Qt, aJ as Zl, aK as wt, aL as We, aM as Ht, aN as Xn, aO as ln, aP as Fa, aQ as on, aR as et, aS as Ft, aT as Mn, aU as On, aV as lr, aW as Pt, aX as Pa, aY as Va, aZ as ja, a_ as ir, a$ as qe, b0 as Xl, b1 as Zt, b2 as En, b3 as or, b4 as Ba, b5 as ea, b6 as Ua, b7 as ei, b8 as ti, b9 as qa, ba as ni, bb as ai, bc as Vt, bd as jt, be as Ie, bf as yt, bg as si, bh as ri, bi as cr, bj as dr, bk as ur, bl as mr, bm as hr, bn as pr, bo as fr, bp as gr, bq as yr, br as li, bs as ii, bt as Ts, bu as oi, bv as $a, bw as ci, bx as di, by as ui, bz as Ga, B as A, bA as xr, bB as mi, bC as Ha, bD as Jt, bE as cn, bF as Bt, bG as In, bH as An, bI as Rn, bJ as zn, bK as Mt, bL as Xt, bM as dn, v as tt, bN as vr, m as Nr, l as br, f as He, bO as hi, g as at, bP as pi, h as Rt, j as st, k as fi, bQ as gi, bR as yi, bS as vt, bT as xt, bU as Cr, bV as xi, C as se, e as wr, bW as un, bX as ht, bY as vi, bZ as Sa, b_ as Ja, b$ as Ln, c0 as lt, c1 as Sr, r as qn, q as Ds, c2 as Ve, c3 as jn, c4 as kr, c5 as Ni, c6 as bi, c7 as Ci, c8 as Tr, c9 as wi, ca as ta, cb as Si, cc as ki, cd as Ti, ce as ka, cf as pt, cg as ze, ch as ft, ci as Di, cj as Wa, ck as Dr, cl as Mr, cm as Mi, cn as Oi, co as Ei, cp as Ii, cq as ha, cr as Ai, cs as Ms, ct as Ri, cu as Os, cv as zi, cw as Li, cx as _i, cy as Fi, cz as Ya, cA as Pi, cB as Vi, cC as Ka, cD as Or, cE as Bn, cF as Er, cG as ji, cH as Bi, cI as Ui, cJ as Ir, cK as Ar, cL as na, cM as Rr, cN as qi, cO as $i, cP as Gi, cQ as zr, cR as Qa, cS as Lr, cT as Hi, cU as Es, cV as Za, cW as aa, cX as sa, cY as Ji, cZ as Wi, c_ as Yi, c$ as ct, d0 as Ne, d1 as be, d2 as Ce, d3 as Ki, d4 as Qi, d5 as Zi, d6 as Xi, s as eo, d7 as Is, d8 as _r, d9 as to, da as no, db as ao, dc as Fr, dd as Xa, de as en, df as es, dg as Nt, dh as so, di as tn, dj as Pr, dk as ro, dl as lo, dm as io, dn as oo, dp as co, dq as As, dr as uo, ds as mo, dt as ho, du as po, dv as fo, dw as go, dx as yo, dy as Vr, dz as xo, dA as vo, dB as No, dC as bo, dD as Co, dE as jr, dF as Ta, dG as pa, dH as rt, dI as Br, dJ as ra, dK as $n, dL as wo, dM as So, dN as Ur, dO as ts, dP as ko, dQ as To, dR as mn, dS as Da, dT as Do, dU as Mo, dV as Rs, dW as Ma, dX as Oa, dY as Gn, dZ as Wt, d_ as hn, d$ as zs, e0 as Oo, e1 as qr, e2 as Eo, e3 as Io, S as Ao, e4 as Ro, e5 as zo, e6 as Lo } from "./index-
|
|
2
|
+
import { E as J, F as za, w as Z, A as zt, G as Ye, H as yn, I as Ks, J as V, P as Me, K as xn, L as vn, M as Nn, N as bn, O as K, Q as _e, R as Qn, T as Cn, U as wn, V as le, W as Sn, X as Qs, Y as Gt, Z as Jl, _ as ks, $ as Zs, a0 as G, a1 as La, a2 as ke, a3 as Wl, a4 as fe, a5 as ge, a6 as ye, a7 as xe, a8 as Tt, a9 as Dt, aa as te, ab as Xs, ac as Ke, ad as Qe, ae as Yl, af as Lt, ag as mt, ah as _t, ai as Le, aj as Fe, ak as Pe, al as Je, am as er, an as kn, ao as Tn, ap as tr, aq as Dn, ar as wa, as as nr, at as Ze, au as ar, av as Kl, aw as Un, ax as sr, ay as nt, az as rr, aA as Zn, aB as _a, aC as Ql, aD as Ee, aE as ie, aF as we, aG as Kt, aH as Xe, aI as Qt, aJ as Zl, aK as wt, aL as We, aM as Ht, aN as Xn, aO as ln, aP as Fa, aQ as on, aR as et, aS as Ft, aT as Mn, aU as On, aV as lr, aW as Pt, aX as Pa, aY as Va, aZ as ja, a_ as ir, a$ as qe, b0 as Xl, b1 as Zt, b2 as En, b3 as or, b4 as Ba, b5 as ea, b6 as Ua, b7 as ei, b8 as ti, b9 as qa, ba as ni, bb as ai, bc as Vt, bd as jt, be as Ie, bf as yt, bg as si, bh as ri, bi as cr, bj as dr, bk as ur, bl as mr, bm as hr, bn as pr, bo as fr, bp as gr, bq as yr, br as li, bs as ii, bt as Ts, bu as oi, bv as $a, bw as ci, bx as di, by as ui, bz as Ga, B as A, bA as xr, bB as mi, bC as Ha, bD as Jt, bE as cn, bF as Bt, bG as In, bH as An, bI as Rn, bJ as zn, bK as Mt, bL as Xt, bM as dn, v as tt, bN as vr, m as Nr, l as br, f as He, bO as hi, g as at, bP as pi, h as Rt, j as st, k as fi, bQ as gi, bR as yi, bS as vt, bT as xt, bU as Cr, bV as xi, C as se, e as wr, bW as un, bX as ht, bY as vi, bZ as Sa, b_ as Ja, b$ as Ln, c0 as lt, c1 as Sr, r as qn, q as Ds, c2 as Ve, c3 as jn, c4 as kr, c5 as Ni, c6 as bi, c7 as Ci, c8 as Tr, c9 as wi, ca as ta, cb as Si, cc as ki, cd as Ti, ce as ka, cf as pt, cg as ze, ch as ft, ci as Di, cj as Wa, ck as Dr, cl as Mr, cm as Mi, cn as Oi, co as Ei, cp as Ii, cq as ha, cr as Ai, cs as Ms, ct as Ri, cu as Os, cv as zi, cw as Li, cx as _i, cy as Fi, cz as Ya, cA as Pi, cB as Vi, cC as Ka, cD as Or, cE as Bn, cF as Er, cG as ji, cH as Bi, cI as Ui, cJ as Ir, cK as Ar, cL as na, cM as Rr, cN as qi, cO as $i, cP as Gi, cQ as zr, cR as Qa, cS as Lr, cT as Hi, cU as Es, cV as Za, cW as aa, cX as sa, cY as Ji, cZ as Wi, c_ as Yi, c$ as ct, d0 as Ne, d1 as be, d2 as Ce, d3 as Ki, d4 as Qi, d5 as Zi, d6 as Xi, s as eo, d7 as Is, d8 as _r, d9 as to, da as no, db as ao, dc as Fr, dd as Xa, de as en, df as es, dg as Nt, dh as so, di as tn, dj as Pr, dk as ro, dl as lo, dm as io, dn as oo, dp as co, dq as As, dr as uo, ds as mo, dt as ho, du as po, dv as fo, dw as go, dx as yo, dy as Vr, dz as xo, dA as vo, dB as No, dC as bo, dD as Co, dE as jr, dF as Ta, dG as pa, dH as rt, dI as Br, dJ as ra, dK as $n, dL as wo, dM as So, dN as Ur, dO as ts, dP as ko, dQ as To, dR as mn, dS as Da, dT as Do, dU as Mo, dV as Rs, dW as Ma, dX as Oa, dY as Gn, dZ as Wt, d_ as hn, d$ as zs, e0 as Oo, e1 as qr, e2 as Eo, e3 as Io, S as Ao, e4 as Ro, e5 as zo, e6 as Lo } from "./index-qsaiQ8Ey.js";
|
|
3
3
|
import * as kt from "react";
|
|
4
4
|
import Oe, { useState as P, useEffect as Te, useMemo as je, useCallback as pe, useRef as it, Suspense as $r } from "react";
|
|
5
5
|
import "react-dom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),s=require("./index-BPlKV5_b.js"),M=require("react");require("react-dom");function Zt(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return a.default=t,Object.freeze(a)}const ye=Zt(M);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
*/var BN;function nY(){return BN||(BN=1,process.env.NODE_ENV!=="production"&&function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=R,n=T0,r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;Xv.useSyncExternalStoreWithSelector=function(c,u,d,h,p){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function y(S){if(!v){if(v=!0,x=S,S=h(S),p!==void 0&&m.hasValue){var E=m.value;if(p(E,S))return C=E}return C=S}if(E=C,r(x,S))return E;var k=h(S);return p!==void 0&&p(E,k)?(x=S,E):(x=S,C=k)}var v=!1,x,C,_=d===void 0?null:d;return[function(){return y(u())},_===null?void 0:function(){return y(_())}]},[u,d,h,p]);var b=o(c,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=b},[b]),l(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Xv}process.env.NODE_ENV==="production"?x1.exports=tY():x1.exports=nY();var rY=x1.exports;const oY=Fa(rY),eO={},{useDebugValue:iY}=R,{useSyncExternalStoreWithSelector:sY}=oY;let VN=!1;const aY=e=>e;function lY(e,t=aY,n){(eO?"production":void 0)!=="production"&&n&&!VN&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),VN=!0);const r=sY(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return iY(r),r}const HN=e=>{(eO?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?ZG(e):e,n=(r,o)=>lY(t,r,o);return Object.assign(n,t),n},Ps=e=>e?HN(e):HN;var tO=Symbol.for("immer-nothing"),WN=Symbol.for("immer-draftable"),fo=Symbol.for("immer-state"),cY=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function zr(e,...t){if(process.env.NODE_ENV!=="production"){const n=cY[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bu=Object.getPrototypeOf;function Vu(e){return!!e&&!!e[fo]}function Gl(e){var t;return e?nO(e)||Array.isArray(e)||!!e[WN]||!!((t=e.constructor)!=null&&t[WN])||O0(e)||F0(e):!1}var uY=Object.prototype.constructor.toString();function nO(e){if(!e||typeof e!="object")return!1;const t=Bu(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===uY}function nb(e,t){j0(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function j0(e){const t=e[fo];return t?t.type_:Array.isArray(e)?1:O0(e)?2:F0(e)?3:0}function C1(e,t){return j0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rO(e,t,n){const r=j0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function dY(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function O0(e){return e instanceof Map}function F0(e){return e instanceof Set}function ll(e){return e.copy_||e.base_}function S1(e,t){if(O0(e))return new Map(e);if(F0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=nO(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[fo];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){const s=o[i],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(Bu(e),r)}else{const r=Bu(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function _E(e,t=!1){return $0(e)||Vu(e)||!Gl(e)||(j0(e)>1&&(e.set=e.add=e.clear=e.delete=fY),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>_E(r,!0))),e}function fY(){zr(2)}function $0(e){return Object.isFrozen(e)}var hY={};function Yl(e){const t=hY[e];return t||zr(0,e),t}var rh;function oO(){return rh}function pY(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function UN(e,t){t&&(Yl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function E1(e){_1(e),e.drafts_.forEach(mY),e.drafts_=null}function _1(e){e===rh&&(rh=e.parent_)}function qN(e){return rh=pY(rh,e)}function mY(e){const t=e[fo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function GN(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[fo].modified_&&(E1(t),zr(4)),Gl(e)&&(e=rb(t,e),t.parent_||ob(t,e)),t.patches_&&Yl("Patches").generateReplacementPatches_(n[fo].base_,e,t.patches_,t.inversePatches_)):e=rb(t,n,[]),E1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==tO?e:void 0}function rb(e,t,n){if($0(t))return t;const r=t[fo];if(!r)return nb(t,(o,i)=>YN(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ob(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),nb(i,(a,l)=>YN(e,r,o,a,l,n,s)),ob(e,o,!1),n&&e.patches_&&Yl("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function YN(e,t,n,r,o,i,s){if(process.env.NODE_ENV!=="production"&&o===n&&zr(5),Vu(o)){const a=i&&t&&t.type_!==3&&!C1(t.assigned_,r)?i.concat(r):void 0,l=rb(e,o,a);if(rO(n,r,l),Vu(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Gl(o)&&!$0(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rb(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ob(e,o)}}function ob(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_E(t,n)}function gY(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:oO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=RE;n&&(o=[r],i=oh);const{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var RE={get(e,t){if(t===fo)return e;const n=ll(e);if(!C1(n,t))return bY(e,n,t);const r=n[t];return e.finalized_||!Gl(r)?r:r===Qv(e.base_,t)?(Zv(e),e.copy_[t]=k1(r,e)):r},has(e,t){return t in ll(e)},ownKeys(e){return Reflect.ownKeys(ll(e))},set(e,t,n){const r=iO(ll(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Qv(ll(e),t),i=o==null?void 0:o[fo];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(dY(n,o)&&(n!==void 0||C1(e.base_,t)))return!0;Zv(e),R1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Qv(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zv(e),R1(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ll(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){zr(11)},getPrototypeOf(e){return Bu(e.base_)},setPrototypeOf(){zr(12)}},oh={};nb(RE,(e,t)=>{oh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});oh.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&zr(13),oh.set.call(this,e,t,void 0)};oh.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&zr(14),RE.set.call(this,e[0],t,n,e[0])};function Qv(e,t){const n=e[fo];return(n?ll(n):e)[t]}function bY(e,t,n){var o;const r=iO(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function iO(e,t){if(!(t in e))return;let n=Bu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Bu(n)}}function R1(e){e.modified_||(e.modified_=!0,e.parent_&&R1(e.parent_))}function Zv(e){e.copy_||(e.copy_=S1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yY=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&zr(6),r!==void 0&&typeof r!="function"&&zr(7);let o;if(Gl(t)){const i=qN(this),s=k1(t,void 0);let a=!0;try{o=n(s),a=!1}finally{a?E1(i):_1(i)}return UN(i,r),GN(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===tO&&(o=void 0),this.autoFreeze_&&_E(o,!0),r){const i=[],s=[];Yl("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else zr(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Gl(e)||zr(8),Vu(e)&&(e=vY(e));const t=qN(this),n=k1(e,void 0);return n[fo].isManual_=!0,_1(t),n}finishDraft(e,t){const n=e&&e[fo];(!n||!n.isManual_)&&zr(9);const{scope_:r}=n;return UN(r,t),GN(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Yl("Patches").applyPatches_;return Vu(e)?r(e,t):this.produce(e,o=>r(o,t))}};function k1(e,t){const n=O0(e)?Yl("MapSet").proxyMap_(e,t):F0(e)?Yl("MapSet").proxySet_(e,t):gY(e,t);return(t?t.scope_:oO()).drafts_.push(n),n}function vY(e){return Vu(e)||zr(10,e),sO(e)}function sO(e){if(!Gl(e)||$0(e))return e;const t=e[fo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=S1(e,t.scope_.immer_.useStrictShallowCopy_)}else n=S1(e,!0);return nb(n,(r,o)=>{rO(n,r,sO(o))}),t&&(t.finalized_=!1),n}var ho=new yY,xY=ho.produce;ho.produceWithPatches.bind(ho);ho.setAutoFreeze.bind(ho);ho.setUseStrictShallowCopy.bind(ho);ho.applyPatches.bind(ho);ho.createDraft.bind(ho);ho.finishDraft.bind(ho);const wY=e=>(t,n,r)=>(r.setState=(o,i,...s)=>{const a=typeof o=="function"?xY(o):o;return t(a,i,...s)},e(r.setState,n,r)),lp=wY;var N1,gm=an;if(process.env.NODE_ENV==="production")N1=gm.createRoot,gm.hydrateRoot;else{var KN=gm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;N1=function(e,t){KN.usingClientEntryPoint=!0;try{return gm.createRoot(e,t)}finally{KN.usingClientEntryPoint=!1}}}var aO={},lO={},kE={exports:{}},tt=String,cO=function(){return{isColorSupported:!1,reset:tt,bold:tt,dim:tt,italic:tt,underline:tt,inverse:tt,hidden:tt,strikethrough:tt,black:tt,red:tt,green:tt,yellow:tt,blue:tt,magenta:tt,cyan:tt,white:tt,gray:tt,bgBlack:tt,bgRed:tt,bgGreen:tt,bgYellow:tt,bgBlue:tt,bgMagenta:tt,bgCyan:tt,bgWhite:tt,blackBright:tt,redBright:tt,greenBright:tt,yellowBright:tt,blueBright:tt,magentaBright:tt,cyanBright:tt,whiteBright:tt,bgBlackBright:tt,bgRedBright:tt,bgGreenBright:tt,bgYellowBright:tt,bgBlueBright:tt,bgMagentaBright:tt,bgCyanBright:tt,bgWhiteBright:tt}};kE.exports=cO();kE.exports.createColors=cO;var CY=kE.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,c){for(var u in c)Object.defineProperty(l,u,{enumerable:!0,get:c[u]})}t(e,{dim:function(){return s},default:function(){return a}});const n=r(CY);function r(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,c,u){typeof process<"u"&&process.env.JEST_WORKER_ID||u&&o.has(u)||(u&&o.add(u),console.warn(""),c.forEach(d=>console.warn(l,"-",d)))}function s(l){return n.default.dim(l)}const a={info(l,c){i(n.default.bold(n.default.cyan("info")),...Array.isArray(l)?[l]:[c,l])},warn(l,c){i(n.default.bold(n.default.yellow("warn")),...Array.isArray(l)?[l]:[c,l])},risk(l,c){i(n.default.bold(n.default.magenta("risk")),...Array.isArray(l)?[l]:[c,l])}}})(lO);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=n(lO);function n(i){return i&&i.__esModule?i:{default:i}}function r({version:i,from:s,to:a}){t.default.warn(`${s}-color-renamed`,[`As of Tailwind CSS ${i}, \`${s}\` has been renamed to \`${a}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(aO);let Jv=aO;var SY=(Jv.__esModule?Jv:{default:Jv}).default;const Mt=Fa(SY),ib=!1,NE=`import pandas as pd
|
|
34
34
|
df = pd.DataFrame(data) # 'data' contains the query result
|
|
35
35
|
result = df.to_dict('records') # must return 'result' as [dict] type
|
|
36
|
-
`,uO=["_forecast"],sb="dm",ih=[{locale:"en-US",currency:"USD",currencyName:"US Dollar"},{locale:"en-GB",currency:"GBP",currencyName:"British Pound"},{locale:"en-CA",currency:"CAD",currencyName:"Canadian Dollar"},{locale:"en-AU",currency:"AUD",currencyName:"Australian Dollar"},{locale:"en-IN",currency:"INR",currencyName:"Indian Rupee"},{locale:"ja-JP",currency:"JPY",currencyName:"Japanese Yen"},{locale:"de-DE",currency:"EUR",currencyName:"Germany (Eurozone)"},{locale:"fr-FR",currency:"EUR",currencyName:"France (Eurozone)"},{locale:"es-ES",currency:"EUR",currencyName:"Spain (Eurozone)"},{locale:"it-IT",currency:"EUR",currencyName:"Italy (Eurozone)"},{locale:"fi-FI",currency:"EUR",currencyName:"Finland (Eurozone)"},{locale:"nl-NL",currency:"EUR",currencyName:"Netherlands (Eurozone)"},{locale:"zh-CN",currency:"CNY",currencyName:"Chinese Yuan"},{locale:"ru-RU",currency:"RUB",currencyName:"Russian Ruble"},{locale:"pt-BR",currency:"BRL",currencyName:"Brazilian Real"},{locale:"ko-KR",currency:"KRW",currencyName:"South Korean Won"},{locale:"ar-SA",currency:"SAR",currencyName:"Saudi Riyal"},{locale:"sv-SE",currency:"SEK",currencyName:"Swedish Krona"},{locale:"no-NO",currency:"NOK",currencyName:"Norwegian Krone"},{locale:"da-DK",currency:"DKK",currencyName:"Danish Krone"},{locale:"pl-PL",currency:"PLN",currencyName:"Polish Zloty"},{locale:"tr-TR",currency:"TRY",currencyName:"Turkish Lira"},{locale:"he-IL",currency:"ILS",currencyName:"Israeli Shekel"},{locale:"th-TH",currency:"THB",currencyName:"Thai Baht"},{locale:"vi-VN",currency:"VND",currencyName:"Vietnamese Dong"},{locale:"id-ID",currency:"IDR",currencyName:"Indonesian Rupiah"},{locale:"mx-MX",currency:"MXN",currencyName:"Mexican Peso"},{locale:"za-ZA",currency:"ZAR",currencyName:"South African Rand"},{locale:"sg-SG",currency:"SGD",currencyName:"Singapore Dollar"},{locale:"hk-HK",currency:"HKD",currencyName:"Hong Kong Dollar"},{locale:"ch-CH",currency:"CHF",currencyName:"Swiss Franc"},{locale:"my-MY",currency:"MYR",currencyName:"Malaysian Ringgit"},{locale:"ph-PH",currency:"PHP",currencyName:"Philippine Peso"},{locale:"eg-EG",currency:"EGP",currencyName:"Egyptian Pound"},{locale:"nz-NZ",currency:"NZD",currencyName:"New Zealand Dollar"}],EY=[{label:"English",locales:[{code:"en-US",name:"US English"},{code:"en-GB",name:"British English"},{code:"en-AU",name:"Australian English"},{code:"en-CA",name:"Canadian English"}]},{label:"French",locales:[{code:"fr-FR",name:"France French"},{code:"fr-CA",name:"Canadian French"}]},{label:"Spanish",locales:[{code:"es-ES",name:"Spain Spanish"},{code:"es-MX",name:"Mexican Spanish"},{code:"es-419",name:"Latin American Spanish"}]},{label:"German",locales:[{code:"de-DE",name:"Germany German"},{code:"de-CH",name:"Swiss German"}]},{label:"Chinese",locales:[{code:"zh-CN",name:"Simplified Chinese (China)"},{code:"zh-TW",name:"Traditional Chinese (Taiwan)"},{code:"zh-HK",name:"Hong Kong Chinese"}]},{label:"Japanese",locales:[{code:"ja-JP",name:"Japanese"}]},{label:"Arabic",locales:[{code:"ar-EG",name:"Egypt Arabic"},{code:"ar-SA",name:"Saudi Arabia Arabic"}]},{label:"Russian",locales:[{code:"ru-RU",name:"Russian"}]},{label:"Portuguese",locales:[{code:"pt-PT",name:"Portugal Portuguese"},{code:"pt-BR",name:"Brazil Portuguese"}]},{label:"Indian Languages",locales:[{code:"hi-IN",name:"Hindi (India)"},{code:"ta-IN",name:"Tamil (India)"}]},{label:"Korean",locales:[{code:"ko-KR",name:"Korean"}]},{label:"Italian",locales:[{code:"it-IT",name:"Italian (Italy)"}]},{label:"Dutch",locales:[{code:"nl-NL",name:"Dutch (Netherlands)"}]},{label:"Swedish",locales:[{code:"sv-SE",name:"Swedish (Sweden)"}]},{label:"Turkish",locales:[{code:"tr-TR",name:"Turkish (Turkey)"}]},{label:"Hebrew",locales:[{code:"he-IL",name:"Hebrew (Israel)"}]},{label:"Thai",locales:[{code:"th-TH",name:"Thai (Thailand)"}]},{label:"Polish",locales:[{code:"pl-PL",name:"Polish (Poland)"}]},{label:"Greek",locales:[{code:"el-GR",name:"Greek (Greece)"}]},{label:"Norwegian",locales:[{code:"no-NO",name:"Norwegian (Norway)"}]}],ME=["lg","md","sm","xs","xxs"],ab={default:{dashboardPanel:"",dashboardTabsContainer:"",gridLayout:{className:""},chart:{font:{family:"Open Sans, Arial, sans-serif"},dataset:{backgroundColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]],borderColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]]},options:{interaction:{mode:"index"},plugins:{datalabels:{display:!1,color:M1},title:{display:!0},tooltip:{backgroundColor:"#fff",bodyColor:"#000",borderWidth:.25,titleColor:"#000",borderColor:"rgb(128,131,139)",cornerRadius:4,usePointStyle:!0,pointStyle:"rectRounded",boxPadding:4},legend:{position:"top",align:"center",maxHeight:0,labels:{useBorderRadius:!0,borderRadius:2}}},scales:{y:{grid:{display:!0},title:{display:!0,text:""},beginAtZero:!0,ticks:{precision:0}},x:{grid:{display:!0},title:{display:!0}}},layout:{padding:{top:-40}},borderRadius:2,responsive:!0,maintainAspectRatio:!1}}},dark:{chart:{dataset:{datalables:{color:M1},backgroundColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]],borderColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]]},options:{plugins:{tooltip:{backgroundColor:"#000",bodyColor:"#fff",borderWidth:.25,titleColor:"#fff",borderColor:"rgb(128,131,139)",cornerRadius:2,boxPadding:4}},datalabels:{display:!1},scales:{x:{grid:{display:!0,color:Mt.slate[800]}},y:{grid:{display:!0,color:Mt.slate[800]}}}}}}};function M1(e){var r,o,i,s,a,l;const t=(a=(s=(i=(o=(r=e==null?void 0:e.chart)==null?void 0:r.config)==null?void 0:o._config)==null?void 0:i.options)==null?void 0:s.plugins)==null?void 0:a.datalabels;let n=(l=e==null?void 0:e.dataset)==null?void 0:l.backgroundColor;return(t==null?void 0:t.align)==="end"&&(t==null?void 0:t.anchor)==="end"&&(n=sh()),(t==null?void 0:t.align)==="start"&&(t==null?void 0:t.anchor)==="start"&&(n=sh()),Hu(n)}function sh(){return re.getState().theme==="dark"?"#000000":"#FFFFFF"}function Hu(e){let t=0,n=0,r=0,o=0;const i=u=>{if(!u)return Mt.gray[500];const d=u.replace("#",""),h=parseInt(d.substring(0,2),16),p=parseInt(d.substring(2,4),16),g=parseInt(d.substring(4,6),16);t+=h,n+=p,r+=g,o++};Array.isArray(e)?e.forEach(u=>{i(u)}):i(e);const s=t/o,a=n/o,l=r/o;return(s*299+a*587+l*114)/1e3>=180?"black":"white"}const _Y=["text","nullable(string)","name","enum","varchar","nvarchar","nvarchar2","char","character","longtext","nchar","char varying","nchar varying","character varying","string"],RY=["number","integer","int","int64","bigint","smallint","tinyint","byteint","numeric","decimal","dec","double","real","double precision","float","float4","float8","float64"],kY=["date","datetime","time","timestamp","timestamp without time zone","timestamp_ns"],NY=["boolean"];function DE(e){return e.match(/[A-Z]/)?`"${e}"`:e}function L0(e){return _Y.includes(e.toLowerCase())||/varchar/i.test(e)}function cp(e){return RY.includes(e.toLowerCase())||/int|decimal|float|double/i.test(e)}function pc(e){return kY.includes(e.toLowerCase())||/date|time|timestamp/i.test(e)}function PE(e){return NY.includes(e.toLowerCase())||/boolean/i.test(e)}function MY(e,t,n,r,o,i){const{measures:s,dimensions:a}=e,l=s==null?void 0:s.map(h=>`${h.calc}(${h.name}) as ${h.calc}_${h.name.replace(/"/g,"")}`).join(", "),c=(a==null?void 0:a.join(", "))||"";let u="";const d=r?`${sb}.${r}`:AE({schemaName:t,tableName:n,connectionType:o,databaseName:i});if(l&&c)return u=`SELECT ${c}, COUNT(*) as count, ${l} FROM ${d} GROUP BY ${c} ORDER BY ${c} DESC LIMIT 100`,u;if(!l&&c)return u=`SELECT ${c}, COUNT(*) as count FROM ${d} GROUP BY ${c} ORDER BY ${c} DESC LIMIT 100`,u;if(l&&!c)return u=`SELECT ${l} FROM ${d} LIMIT 100`,u}function DY(e,t,n="AVG"){var i,s,a,l;let r={};const o=DE(e.column_name);return L0(e.data_type)&&(((i=t.dimensions)==null?void 0:i.includes(o))?r={...t,dimensions:(s=t.dimensions)==null?void 0:s.filter(u=>u!==o)}:r={...t,dimensions:[...t.dimensions||[],o]}),cp(e.data_type)&&(((a=t.measures)==null?void 0:a.some(u=>u.name===o&&u.calc===n))?r={...t,measures:(l=t.measures)==null?void 0:l.filter(u=>!(u.name===o&&u.calc===n))}:r={...t,measures:[...t.measures||[],{name:o,calc:n||"SUM"}]}),r}function hu(e){return L0(e.dataType)?"string":cp(e.dataType)?"number":pc(e.dataType)?"date":PE(e.dataType)?"boolean":"string"}function PY(e){let t;const n=e.data_type.toLowerCase();return L0(n)?t="T":cp(n)?t="#":pc(n)?t="D":PE(n)?t="B":t="?",t}function AY(e,t){const{dimensions:n,measures:r}=t,o=n==null?void 0:n.includes(e.column_name),i=r==null?void 0:r.some(s=>s.name===e.column_name);return o||i}function dO(e){return e?e!=null&&e.startsWith(`${sb}.`)?e:`${sb}.${e}`:""}function fO({schemaName:e,tableName:t,modelName:n,connectionType:r,databaseName:o}){let i=AE({schemaName:e,tableName:t,connectionType:r,databaseName:o});n&&(i=dO(n));let s=i;return(l=>/[A-Z]/.test(l))(t)&&(s=s.split(".").map(c=>`"${c}"`).join(".")),s}function AE({schemaName:e,tableName:t,connectionType:n,databaseName:r}){return t==="api"||e===DE("NA")||n==="S3"||n==="API"?t:n==="S3Tables"?`${r}.${e}.${t}`:e?`${e}.${t}`:`${t}`}const IY=e=>{const t=new Date(e);return!isNaN(t.getTime())},TY=e=>!isNaN(Number(e))&&!isNaN(parseFloat(e)),z0=e=>{let t;return typeof e=="number"?t="number":typeof e=="string"?IY(e)?t="date":TY(e)?t="number":t="string":typeof e=="boolean"?t="boolean":e instanceof Date?t="date":t="unknown",t};function jY({get:e,dataPoint:t,card:n}){var h;const{addOrUpdateFilterValue:r,addFilteringCard:o,removeFilterValues:i,replaceFilterValue:s,removeFilteringCard:a}=e().actions,l=e().filteringCards,{columnName:c,columnValue:u}=t,d={filterId:n.id,connectionId:n==null?void 0:n.connectionId,tableName:n.lastSelectedTable,name:c,expression:(h=n.preferences)==null?void 0:h.filterOnClickField,valueType:z0(u),operation:"=",values:[u]};if(l!=null&&l.find(p=>p.id===n.id)){const p=n.id;if(u==null){a(n),i(p);return}else s(d)}o(n),r(d)}function XN({id:e,layouts:t,initialHeight:n,y:r,x:o,w:i,minH:s}){const a={i:e,x:o??0,y:r??1/0,w:i||20,h:n||35,minW:6,minH:s||10},l=t?{...t}:{};return ME.forEach(c=>{l[c]||(l[c]=[]);const u=l[c].reduce((d,h)=>Math.max(d,h.y+h.h),0);a.y=a.y===1/0?u:a.y,l[c].push({...a})}),l}function QN(e,t){if(!t)return;const n={...t};return ME.forEach(r=>{n[r]&&(n[r]=n[r].filter(o=>o.i!==e))}),n}function hO(e){const t=re.getState().dashboard.globalCacheConfig,{card:n,filter:r}=e;return t}const re=Ps()(lp((e,t)=>({isSessionExpired:!1,currentBreakpoint:"lg",dashboard:{id:"",style:ab},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!1,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],isDashboardPanelOpen:!1,actions:{setInitStore:()=>{e(n=>{n.isSessionExpired=!1,n.currentBreakpoint="lg",n.dashboard={id:"",style:ab},n.showContext=!1,n.selectedSheetId=null,n.selectedCardId=null,n.selectedFrameId=null,n.selectedCard=null,n.showFilters=!1,n.isDashboardEditing=!0,n.isVisualEditing=!1,n.showDashboardJSON=!1,n.filteringCards=[],n.selectedLensId=void 0,n.filterValues=void 0})},setAiContext:n=>{e(r=>{r.dashboard.aiContext=n})},setHandleOpenAssistantProfile:n=>{e(r=>{r.handleOpenAssistantProfile=n})},setFilterMode:(n,r)=>{const o=r==="exclude"?"not in":"in";e(i=>{var a,l,c;const s=(a=i.dashboard.filters)==null?void 0:a.find(u=>u.id===n);s&&(s.operation=o,i.dashboard.filters=(l=i.dashboard.filters)==null?void 0:l.map(u=>u.id===n?s:u),i.filterValues&&i.filterValues.length>0&&(i.filterValues=(c=i.filterValues)==null?void 0:c.map(u=>u.filterId===n?{...u,operation:o}:u)))})},updateEmailSettings:n=>{e(r=>{r.dashboard.emailSettings=n})},setDefaultFilterValues:n=>{e(r=>{r.dashboard.defaultFilterValues=n})},setIsDownloadingPdf:n=>{e(r=>{r.isDownloadingPdf=n})},setGlobalCacheConfig:n=>{e(r=>{r.dashboard.globalCacheConfig=n})},setLenses:n=>{e(r=>{r.lenses=n})},setSelectedLensId:n=>{e(r=>{r.selectedLensId=n})},deleteSheet:n=>{e(r=>{var i,s,a,l,c,u,d,h;const o=(i=r.dashboard.sheets)==null?void 0:i.findIndex(p=>p.id===n);if(o!==void 0&&o>-1){(s=r.dashboard.sheets)==null||s.splice(o,1);const p=(a=r.dashboard.filters)==null?void 0:a.filter(m=>m.sheetId===n),g=(l=r.filterValues)==null?void 0:l.filter(m=>p==null?void 0:p.some(b=>b.id===m.filterId));r.filterValues=(c=r.filterValues)==null?void 0:c.filter(m=>!(g!=null&&g.some(b=>b.filterId===m.filterId))),r.dashboard.filters=(u=r.dashboard.filters)==null?void 0:u.filter(m=>m.sheetId!==n),r.selectedSheetId=(h=(d=r.dashboard.sheets)==null?void 0:d[0])==null?void 0:h.id}})},addSheet:n=>{e(r=>{r.dashboard.sheets||(r.dashboard.sheets=[]);const o=r.dashboard.filters;let i={};o==null||o.forEach(a=>{ME.forEach(l=>{i!=null&&i[l]||(i={...i,[l]:[]});const c={i:a.id,x:0,y:0,w:10,h:8};i[l].push(c)})});const s={...n,layouts:i};r.dashboard.sheets.push(s)})},setGlobalStyle:n=>{e(r=>{r.dashboard.globalStyle=n})},setAIScopeTables:n=>{e(r=>{r.dashboard.aiScopeTables=n})},addToAIScope:n=>{e(r=>{const{connectionId:o,connectionType:i,databaseName:s,schemaName:a,tableName:l,datamodelName:c,datamodelId:u}=n,d={connectionId:o||"",connectionType:i||"",databaseName:s||"",schemaName:a||"",tableName:l||"",datamodelName:c||"",datamodelId:u||""};let p=[...r.dashboard.aiScopeTables||[],d];p=p.filter((g,m,b)=>b.findIndex(y=>y.tableName===g.tableName&&y.datamodelName===g.datamodelName)===m),r.dashboard.aiScopeTables=p})},removeFromAIScope:n=>{e(r=>{const{connectionId:o,tableName:i,datamodelName:s}=n,a=r.dashboard.aiScopeTables||[];if(s){const l=a.filter(c=>!(c.datamodelName===s&&c.connectionId===o));r.dashboard.aiScopeTables=l}else if(i){const l=a.filter(c=>!(c.tableName===i&&c.connectionId===o));r.dashboard.aiScopeTables=l}})},setIsSessionExpired:n=>{e(()=>({isSessionExpired:n}))},setCardPython:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===o.selectedSheetId);i&&((l=i==null?void 0:i.frames)==null||l.forEach(c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===n);u&&(u.python=r)}))})},addBaseQuery:n=>{e(r=>{var o;r.dashboard.baseQueries||(r.dashboard.baseQueries=[]),(o=r.dashboard.baseQueries)==null||o.push(n)})},removeBaseQuery:n=>{e(r=>{var i,s;const o=(i=r.dashboard.baseQueries)==null?void 0:i.findIndex(a=>a.id===n);o!=null&&o>-1&&((s=r.dashboard.baseQueries)==null||s.splice(o,1))})},setBaseQueries:n=>{e(r=>{r.dashboard.baseQueries=n})},setCurrentBreakpoint:n=>{e(()=>({currentBreakpoint:n}))},setFilteringCards:n=>{e(()=>({filteringCards:n}))},addFilteringCard:n=>{e(r=>{var o;(o=r.filteringCards)==null||o.push(n)})},removeFilteringCard:n=>{e(r=>{var i,s;const o=(i=r.filteringCards)==null?void 0:i.findIndex(a=>a.id===n.id);o!==void 0&&o>-1&&((s=r.filteringCards)==null||s.splice(o,1))})},setCustomCards:n=>{e(r=>{r.dashboard.customCards=n})},setAuthToken:n=>{e(()=>({authToken:n}))},setThemeStyle:n=>{e(()=>({themeStyle:n}))},setDashboard:n=>e({dashboard:n}),setDashboardWithFilterValues:(n,r)=>{e(o=>{o.dashboard=n,o.filterValues=r})},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setSheetTitle:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.title=r)})},setCardTitle:(n,r,o)=>{e(i=>{var a,l,c;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(u=>u.id===n);s&&((c=s==null?void 0:s.frames)==null||c.forEach(u=>{var h;const d=(h=u.cards)==null?void 0:h.find(p=>p.id===r);d&&(d.title=o)}))})},setCardInfo:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===o.selectedSheetId);i&&((l=i==null?void 0:i.frames)==null||l.forEach(c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===n);u&&(u.info=r)}))})},setCardDescription:(n,r,o)=>{e(i=>{var a,l,c;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(u=>u.id===n);s&&((c=s==null?void 0:s.frames)==null||c.forEach(u=>{var h;const d=(h=u.cards)==null?void 0:h.find(p=>p.id===r);d&&(d.description=o)}))})},setCardSql:(n,r,o)=>{e(i=>{var a,l,c,u;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){const d=(c=s.cards)==null?void 0:c.find(h=>h.id===r);d&&(d.sql=o,(u=i.onUpdateCard)==null||u.call(i,d,n))}})},setSheetLayout:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.layout=r)})},setSheetLayouts:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.layouts=r)})},setShowContext:n=>{e(()=>({showContext:n}))},setShowFilters:n=>{e(()=>({showFilters:n}))},setFilterValues:n=>{e(()=>({filterValues:n}))},addOrUpdateFilterValue:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.findIndex(i=>i.filterId===n.filterId);o>-1?r.filterValues.splice(o,1,n):r.filterValues.push(n)}else r.filterValues=[n]})},addOrUpdateFilterValues:n=>{e(r=>{r.filterValues?n.forEach(o=>{var s,a,l,c;const i=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(u=>u.filterId===o.filterId);if(o.values.length===0){r.filterValues=(a=r.filterValues)==null?void 0:a.filter(u=>u.filterId!==o.filterId);return}i!==void 0&&i>-1?(l=r.filterValues)==null||l.splice(i,1,o):(c=r.filterValues)==null||c.push(o)}):r.filterValues=n})},removeFilterValues:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.filter(i=>i.filterId!==n&&!i.filterId.startsWith(n));r.filterValues=o}})},replaceFilterValue:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.findIndex(i=>i.filterId===n.filterId);o>-1&&r.filterValues.splice(o,1,n)}})},addFilter:n=>{e(r=>{var i,s;r.dashboard.filters?(i=r.dashboard.filters)==null||i.push(n):r.dashboard.filters=[n],(s=r.dashboard.sheets)==null||s.find(a=>a.id===r.selectedSheetId);const o=r.dashboard.sheets;o==null||o.forEach(a=>{XN({id:n.id,layouts:a.layouts,y:0,initialHeight:8,minH:7,w:10})})})},removeFilter:n=>{e(r=>{var o,i,s;if(r.dashboard.filters){const a=(o=r.dashboard.filters)==null?void 0:o.findIndex(l=>l.id===n);if(a>-1){(i=r.dashboard.filters)==null||i.splice(a,1),(s=r.dashboard.sheets)==null||s.find(c=>c.id===r.selectedSheetId);const l=r.dashboard.sheets;l==null||l.forEach(c=>{const u=QN(n,c.layouts);c.layouts=u})}}})},updateCurrentDashboardCard:n=>{e(r=>{var a,l,c,u,d;const o=(l=(a=r.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===r.selectedSheetId),i=(c=o==null?void 0:o.frames)==null?void 0:c.find(h=>h.id===r.selectedFrameId),s=(u=i==null?void 0:i.cards)==null?void 0:u.findIndex(h=>h.id===n.id);typeof s=="number"&&s>=0&&((d=i==null?void 0:i.cards)==null||d.splice(s,1,n))})},updateFrameCard:(n,r,o)=>{e(i=>{var l,c,u,d,h;const s=(c=(l=i.dashboard)==null?void 0:l.sheets)==null?void 0:c.find(p=>p.id===n);if(!s)return;const a=(u=s==null?void 0:s.frames)==null?void 0:u.find(p=>p.id===r);if(a){const p=(d=a.cards)==null?void 0:d.findIndex(g=>g.id===o.id);p>-1&&((h=a.cards)==null||h.splice(p,1,o))}})},updateFilter:n=>{e(r=>{var o,i;if(r.dashboard.filters){const s=(o=r.dashboard.filters)==null?void 0:o.findIndex(a=>a.id===n.id);s>-1&&((i=r.dashboard.filters)==null||i.splice(s,1,n))}})},updateFilterId:(n,r)=>{e(o=>{var a,l;const i=(a=o.dashboard.filters)==null?void 0:a.find(c=>c.id===n),s=(l=o.dashboard.filters)==null?void 0:l.some(c=>c.id===r);i&&!s&&(i.id=r)})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(n,r,o)=>{e(i=>{var a,l,c,u;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){s.frames||(s.frames=[]),(c=s.frames)==null||c.push(r);let d=1/0;const h=0;o==="start"&&(d=0);const p=XN({id:r.id,layouts:s.layouts,minH:10,x:h,y:d});s.layouts=p,(u=i.onAddFrame)==null||u.call(i,r,n)}})},removeFrame:(n,r)=>{e(o=>{var s,a,l,c,u;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(d=>d.id===n);if(i){const d=(l=i.frames)==null?void 0:l.findIndex(h=>h.id===r);console.log(d),typeof d=="number"&&d>-1&&((c=i.frames)==null||c.splice(d,1),(u=i.layout)==null||u.splice(d,1),QN(r,i.layouts))}})},updateFrame:(n,r)=>{e(o=>{var a,l,c,u,d;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=i==null?void 0:i.frames)==null?void 0:c.findIndex(h=>h.id===r.id);i&&((u=i.frames)==null||u.splice(s,1,r)),(d=o.onAcceptChanges)==null||d.call(o,r,o.dashboard)})},updateCard:(n,r)=>{e(o=>{var a,l,c,u,d;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=i==null?void 0:i.cards)==null?void 0:c.findIndex(h=>h.id===r.id);i&&((u=i.cards)==null||u.splice(s,1,r),(d=o.onUpdateCard)==null||d.call(o,r,n))})},removeCard:(n,r)=>{e(o=>{var a,l,c,u,d,h;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=i==null?void 0:i.cards)==null?void 0:c.findIndex(p=>p.id===r.id);i&&((u=i.cards)==null||u.splice(s,1),(d=i.layout)==null||d.splice(s,1),(h=o.onRemoveCard)==null||h.call(o,r,n))})},setStyle:n=>{e(r=>{r.dashboard&&(r.dashboard.style=n)})},setSelectedCardId:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===n);i&&(((l=i.cards)==null?void 0:l.find(u=>u.id===r))?o.selectedCardId=r:o.selectedCardId=null)})},setSelectedFrameId:n=>{e(r=>{var i,s;((s=(i=r.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(a=>a.id===r.selectedSheetId))&&(r.selectedFrameId=n)})},setSelectedSheetId:n=>{e(r=>{var i,s;((s=(i=r.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(a=>a.id===n))&&(r.selectedSheetId=n)})},setOnSaveFunction:n=>{e(()=>({onSaveFunction:n}))},setOnAddCard:n=>{e(()=>({onAddCard:n}))},setOnAcceptChanges:n=>{e(()=>({onAcceptChanges:n}))},setOnUpdateCard:n=>{e(()=>({onUpdateCard:n}))},setOnRemoveCard:n=>{e(()=>({onRemoveCard:n}))},setOnEvent:n=>{e(()=>({onEvent:n}))},getDashboard:()=>t().dashboard,getSelectedSheet:()=>{var n,r;return(r=(n=t().dashboard)==null?void 0:n.sheets)==null?void 0:r.find(o=>o.id===t().selectedSheetId)},getCardFrame:n=>{var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((i=a[l].cards)==null?void 0:i.find(u=>u.id===n))return a[l]}}},getSelectedFrame:()=>{var r,o,i;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(s=>s.id===t().selectedSheetId);return(i=n==null?void 0:n.frames)==null?void 0:i.find(s=>s.id===t().selectedFrameId)},getCard:n=>{var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a)for(let l=0;l<a.length;l++){const c=(i=a[l].cards)==null?void 0:i.find(u=>u.id===n);if(c)return c}}},getSelectedSheetLayout:()=>{var r,o;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(i=>i.id===t().selectedSheetId);return n==null?void 0:n.layout},getSelectedSheetLayouts:()=>{var r,o;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(i=>i.id===t().selectedSheetId);return n==null?void 0:n.layouts},getStyle:()=>{var n;return(n=t().dashboard)==null?void 0:n.style},getCardSheet(n){var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((i=a[l].cards)==null?void 0:i.find(u=>u.id===n))return r[s]}}},handleDataPointClickAction:(n,r)=>{jY({card:n,dataPoint:r,get:t})},setIsDashboardPanelOpen:n=>{e(()=>({isDashboardPanelOpen:n}))}}}))),pO=()=>re(t=>{var i,s,a,l,c;const n=(s=(i=t.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(u=>u.id===t.selectedSheetId),r=(a=n==null?void 0:n.frames)==null?void 0:a.find(u=>u.id===t.selectedFrameId);return((l=r==null?void 0:r.cards)==null?void 0:l.find(u=>u.id===(r==null?void 0:r.activeCardId)))||((c=r==null?void 0:r.cards)==null?void 0:c[0])}),mO=()=>{var n;const e=re(r=>{var o,i;return(i=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:i.find(s=>s.id===r.selectedSheetId)});return(((n=e==null?void 0:e.frames)==null?void 0:n.map(r=>{var o;return(o=r.cards)==null?void 0:o.find(i=>i.id===r.activeCardId)}))||[]).filter(r=>r!==void 0)},gO=()=>{var t,n,r;const e=pO();return{metricFields:((t=e==null?void 0:e.config)==null?void 0:t.metricColumns)||[],groupByFields:((n=e==null?void 0:e.config)==null?void 0:n.groupByColumns)||[],pivotByFields:((r=e==null?void 0:e.config)==null?void 0:r.pivotByColumns)||[]}},Gt=()=>re(e=>e.actions);async function OY(e,t){const n=t.slice(0,16),r=new TextEncoder,o=await window.crypto.subtle.importKey("raw",r.encode(n),{name:"PBKDF2"},!1,["deriveKey"]),i=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:r.encode(n),iterations:1e5,hash:"SHA-256"},o,{name:"AES-GCM",length:256},!1,["encrypt"]),s=window.crypto.getRandomValues(new Uint8Array(12)),a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,r.encode(e)),l=new Uint8Array(s.length+a.byteLength);return l.set(s,0),l.set(new Uint8Array(a),s.length),{payload:btoa(String.fromCharCode(...l))}}async function bO(e,t){const n=t.slice(0,16),r=new TextEncoder,o=new TextDecoder,i=await window.crypto.subtle.importKey("raw",r.encode(n),{name:"PBKDF2"},!1,["deriveKey"]),s=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:r.encode(n),iterations:1e5,hash:"SHA-256"},i,{name:"AES-GCM",length:256},!1,["decrypt"]),a=Uint8Array.from(atob(e),h=>h.charCodeAt(0)),l=a.slice(0,12),c=a.slice(a.length-16),u=a.slice(12,a.length-16),d=new Uint8Array(u.length+c.length);d.set(u),d.set(c,u.length);try{const h=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:l},s,d);return{decryptedData:o.decode(h)}}catch(h){throw new Error(`Decryption failed: ${h}`)}}function oe(...e){return YG(ql(e))}const FY=e=>Object.keys(e).length===0;async function Tn(e,t,n={}){try{const r=new URLSearchParams(n).toString(),o=`${e}?${r}`,i=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!i.ok){const a=await i.json();throw new Error((a==null?void 0:a.error)||`HTTP error! status: ${i.status}`)}return await i.json()}catch(r){throw console.error("Error during fetch:",r),r}}async function yO(e,t,n={}){try{const r=JSON.stringify(n),o=await OY(r,t),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(o)});if(!i.ok)return i.json().then(a=>{throw console.log(a.detail||"Unknown error occurred"),new Error((a==null?void 0:a.error)||`HTTP error! status: ${i.status}`)});const s=await i.json();if(s.payload){const a=await bO(s.payload,t);return JSON.parse(a.decryptedData)}return s}catch(r){throw console.error("Error during fetch:",r),r}}async function up(e,t,n={},r="POST"){try{const o=await fetch(e,{method:r,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(n)});return o.ok?await o.json():o.json().then(s=>{throw console.log(s.detail||"Unknown error occurred"),new Error((s==null?void 0:s.error)||`HTTP error! status: ${o.status}`)})}catch(o){throw console.error("Error during fetch:",o),o}}function $Y(e){if(!e)return{tenantId:"",endUserId:""};const t=ap(e);return{tenantId:t==null?void 0:t.tenantId,endUserId:t==null?void 0:t.endUserId}}function LY(e){return e?ap(e).assistantProfileId:void 0}function zY(e){if(!e)return;const t=ap(e);if(t.params&&t.params.currencyFormat)return t.params.currencyFormat}function vO(e){return e?ap(e).params:void 0}function IE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Di(e){return e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase())}function xO(e){return e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())}const Ar="focus:ring-1 focus:ring-offset-0 focus-visible:ring-1 focus-visible:ring-offset-0",xs="focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 focus:ring-0 focus:ring-ring focus:ring-offset-0";async function BY(){var o,i;const e=(i=(o=re.getState())==null?void 0:o.authToken)==null?void 0:i.accessToken;if(!e)return;const n=await fetch("https://semaphor.cloud/api/v1/invalidate-token",{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw new Error("Failed to invalidate token");const r=await n.json();return console.log("invalidateToken",r),r}async function VY(e,t={}){if(!e)return null;let n="https://semaphor.cloud/api/v1/dashboard";const r=Object.fromEntries(Object.entries(t).filter(([a,l])=>l!==void 0)),o=new URLSearchParams(r).toString();o&&(n+=`?${o}`);let s=await(await fetch(n,{headers:{Authorization:`Bearer ${e}`}})).json();if("payload"in s){const a=await bO(atob(s.payload),e);s=JSON.parse(a.decryptedData)}return s}async function HY(e){return e?await(await fetch("https://semaphor.cloud/api/v1/plugins",{headers:{Authorization:`Bearer ${e}`}})).json():null}const wO=e=>/boolean/i.test(e)?"boolean":/date|timestamp/i.test(e)?"date":/int|decimal|float|double|num/i.test(e)?"number":/json/i.test(e)?"json":/geo|geography|geometry/i.test(e)?"geo":"string";var lb={exports:{}};lb.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,i=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",y="[object Null]",v="[object Object]",x="[object Proxy]",C="[object RegExp]",_="[object Set]",S="[object String]",E="[object Undefined]",k="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",P="[object Float64Array]",j="[object Int8Array]",F="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",L="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,D={};D[I]=D[P]=D[j]=D[F]=D[T]=D[O]=D[L]=D[B]=D[z]=!0,D[a]=D[l]=D[N]=D[u]=D[M]=D[d]=D[h]=D[p]=D[m]=D[b]=D[v]=D[C]=D[_]=D[S]=D[k]=!1;var H=typeof ps=="object"&&ps&&ps.Object===Object&&ps,V=typeof self=="object"&&self&&self.Object===Object&&self,G=H||V||Function("return this")(),q=t&&!t.nodeType&&t,K=q&&!0&&e&&!e.nodeType&&e,Y=K&&K.exports===q,Q=Y&&H.process,ne=function(){try{var U=K&&K.require&&K.require("util").types;return U||Q&&Q.binding&&Q.binding("util")}catch{}}(),Z=ne&&ne.isTypedArray;function ie(U,J,se){switch(se.length){case 0:return U.call(J);case 1:return U.call(J,se[0]);case 2:return U.call(J,se[0],se[1]);case 3:return U.call(J,se[0],se[1],se[2])}return U.apply(J,se)}function te(U,J){for(var se=-1,Me=Array(U);++se<U;)Me[se]=J(se);return Me}function ce(U){return function(J){return U(J)}}function de(U,J){return U==null?void 0:U[J]}function ke(U,J){return function(se){return U(J(se))}}var we=Array.prototype,Ce=Function.prototype,Pe=Object.prototype,Ye=G["__core-js_shared__"],_t=Ce.toString,ge=Pe.hasOwnProperty,je=function(){var U=/[^.]+$/.exec(Ye&&Ye.keys&&Ye.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Ae=Pe.toString,ee=_t.call(Object),le=RegExp("^"+_t.call(ge).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=Y?G.Buffer:void 0,De=G.Symbol,Ue=G.Uint8Array;Re&&Re.allocUnsafe;var jt=ke(Object.getPrototypeOf,Object),Pn=Object.create,vn=Pe.propertyIsEnumerable,ye=we.splice,xn=De?De.toStringTag:void 0,Ot=function(){try{var U=Fv(Object,"defineProperty");return U({},"",{}),U}catch{}}(),go=Re?Re.isBuffer:void 0,Bn=Math.max,Tc=Date.now,Ka=Fv(G,"Map"),Ki=Fv(Object,"create"),cn=function(){function U(){}return function(J){if(!Za(J))return{};if(Pn)return Pn(J);U.prototype=J;var se=new U;return U.prototype=void 0,se}}();function Rt(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function Vn(){this.__data__=Ki?Ki(null):{},this.size=0}function Ie(U){var J=this.has(U)&&delete this.__data__[U];return this.size-=J?1:0,J}function qe(U){var J=this.__data__;if(Ki){var se=J[U];return se===r?void 0:se}return ge.call(J,U)?J[U]:void 0}function rt(U){var J=this.__data__;return Ki?J[U]!==void 0:ge.call(J,U)}function nn(U,J){var se=this.__data__;return this.size+=this.has(U)?0:1,se[U]=Ki&&J===void 0?r:J,this}Rt.prototype.clear=Vn,Rt.prototype.delete=Ie,Rt.prototype.get=qe,Rt.prototype.has=rt,Rt.prototype.set=nn;function Ft(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function $t(){this.__data__=[],this.size=0}function Fn(U){var J=this.__data__,se=dm(J,U);if(se<0)return!1;var Me=J.length-1;return se==Me?J.pop():ye.call(J,se,1),--this.size,!0}function rn(U){var J=this.__data__,se=dm(J,U);return se<0?void 0:J[se][1]}function wn(U){return dm(this.__data__,U)>-1}function Xa(U,J){var se=this.__data__,Me=dm(se,U);return Me<0?(++this.size,se.push([U,J])):se[Me][1]=J,this}Ft.prototype.clear=$t,Ft.prototype.delete=Fn,Ft.prototype.get=rn,Ft.prototype.has=wn,Ft.prototype.set=Xa;function bo(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function li(){this.size=0,this.__data__={hash:new Rt,map:new(Ka||Ft),string:new Rt}}function Qa(U){var J=hm(this,U).delete(U);return this.size-=J?1:0,J}function Vd(U){return hm(this,U).get(U)}function Nq(U){return hm(this,U).has(U)}function Mq(U,J){var se=hm(this,U),Me=se.size;return se.set(U,J),this.size+=se.size==Me?0:1,this}bo.prototype.clear=li,bo.prototype.delete=Qa,bo.prototype.get=Vd,bo.prototype.has=Nq,bo.prototype.set=Mq;function jc(U){var J=this.__data__=new Ft(U);this.size=J.size}function Dq(){this.__data__=new Ft,this.size=0}function Pq(U){var J=this.__data__,se=J.delete(U);return this.size=J.size,se}function Aq(U){return this.__data__.get(U)}function Iq(U){return this.__data__.has(U)}function Tq(U,J){var se=this.__data__;if(se instanceof Ft){var Me=se.__data__;if(!Ka||Me.length<n-1)return Me.push([U,J]),this.size=++se.size,this;se=this.__data__=new bo(Me)}return se.set(U,J),this.size=se.size,this}jc.prototype.clear=Dq,jc.prototype.delete=Pq,jc.prototype.get=Aq,jc.prototype.has=Iq,jc.prototype.set=Tq;function jq(U,J){var se=zv(U),Me=!se&&Lv(U),mt=!se&&!Me&&kN(U),Vt=!se&&!Me&&!mt&&MN(U),on=se||Me||mt||Vt,xt=on?te(U.length,String):[],sn=xt.length;for(var Fo in U)on&&(Fo=="length"||mt&&(Fo=="offset"||Fo=="parent")||Vt&&(Fo=="buffer"||Fo=="byteLength"||Fo=="byteOffset")||_N(Fo,sn))||xt.push(Fo);return xt}function jv(U,J,se){(se!==void 0&&!pm(U[J],se)||se===void 0&&!(J in U))&&Ov(U,J,se)}function Oq(U,J,se){var Me=U[J];(!(ge.call(U,J)&&pm(Me,se))||se===void 0&&!(J in U))&&Ov(U,J,se)}function dm(U,J){for(var se=U.length;se--;)if(pm(U[se][0],J))return se;return-1}function Ov(U,J,se){J=="__proto__"&&Ot?Ot(U,J,{configurable:!0,enumerable:!0,value:se,writable:!0}):U[J]=se}var Fq=Xq();function fm(U){return U==null?U===void 0?E:y:xn&&xn in Object(U)?Qq(U):rG(U)}function SN(U){return Hd(U)&&fm(U)==a}function $q(U){if(!Za(U)||tG(U))return!1;var J=Vv(U)?le:W;return J.test(aG(U))}function Lq(U){return Hd(U)&&NN(U.length)&&!!D[fm(U)]}function zq(U){if(!Za(U))return nG(U);var J=RN(U),se=[];for(var Me in U)Me=="constructor"&&(J||!ge.call(U,Me))||se.push(Me);return se}function EN(U,J,se,Me,mt){U!==J&&Fq(J,function(Vt,on){if(mt||(mt=new jc),Za(Vt))Bq(U,J,on,se,EN,Me,mt);else{var xt=Me?Me($v(U,on),Vt,on+"",U,J,mt):void 0;xt===void 0&&(xt=Vt),jv(U,on,xt)}},DN)}function Bq(U,J,se,Me,mt,Vt,on){var xt=$v(U,se),sn=$v(J,se),Fo=on.get(sn);if(Fo){jv(U,se,Fo);return}var Qr=Vt?Vt(xt,sn,se+"",U,J,on):void 0,Wd=Qr===void 0;if(Wd){var Hv=zv(sn),Wv=!Hv&&kN(sn),AN=!Hv&&!Wv&&MN(sn);Qr=sn,Hv||Wv||AN?zv(xt)?Qr=xt:lG(xt)?Qr=Gq(xt):Wv?(Wd=!1,Qr=Wq(sn)):AN?(Wd=!1,Qr=qq(sn)):Qr=[]:cG(sn)||Lv(sn)?(Qr=xt,Lv(xt)?Qr=uG(xt):(!Za(xt)||Vv(xt))&&(Qr=Zq(sn))):Wd=!1}Wd&&(on.set(sn,Qr),mt(Qr,sn,Me,Vt,on),on.delete(sn)),jv(U,se,Qr)}function Vq(U,J){return iG(oG(U,J,PN),U+"")}var Hq=Ot?function(U,J){return Ot(U,"toString",{configurable:!0,enumerable:!1,value:fG(J),writable:!0})}:PN;function Wq(U,J){return U.slice()}function Uq(U){var J=new U.constructor(U.byteLength);return new Ue(J).set(new Ue(U)),J}function qq(U,J){var se=Uq(U.buffer);return new U.constructor(se,U.byteOffset,U.length)}function Gq(U,J){var se=-1,Me=U.length;for(J||(J=Array(Me));++se<Me;)J[se]=U[se];return J}function Yq(U,J,se,Me){var mt=!se;se||(se={});for(var Vt=-1,on=J.length;++Vt<on;){var xt=J[Vt],sn=void 0;sn===void 0&&(sn=U[xt]),mt?Ov(se,xt,sn):Oq(se,xt,sn)}return se}function Kq(U){return Vq(function(J,se){var Me=-1,mt=se.length,Vt=mt>1?se[mt-1]:void 0,on=mt>2?se[2]:void 0;for(Vt=U.length>3&&typeof Vt=="function"?(mt--,Vt):void 0,on&&Jq(se[0],se[1],on)&&(Vt=mt<3?void 0:Vt,mt=1),J=Object(J);++Me<mt;){var xt=se[Me];xt&&U(J,xt,Me,Vt)}return J})}function Xq(U){return function(J,se,Me){for(var mt=-1,Vt=Object(J),on=Me(J),xt=on.length;xt--;){var sn=on[++mt];if(se(Vt[sn],sn,Vt)===!1)break}return J}}function hm(U,J){var se=U.__data__;return eG(J)?se[typeof J=="string"?"string":"hash"]:se.map}function Fv(U,J){var se=de(U,J);return $q(se)?se:void 0}function Qq(U){var J=ge.call(U,xn),se=U[xn];try{U[xn]=void 0;var Me=!0}catch{}var mt=Ae.call(U);return Me&&(J?U[xn]=se:delete U[xn]),mt}function Zq(U){return typeof U.constructor=="function"&&!RN(U)?cn(jt(U)):{}}function _N(U,J){var se=typeof U;return J=J??s,!!J&&(se=="number"||se!="symbol"&&$.test(U))&&U>-1&&U%1==0&&U<J}function Jq(U,J,se){if(!Za(se))return!1;var Me=typeof J;return(Me=="number"?Bv(se)&&_N(J,se.length):Me=="string"&&J in se)?pm(se[J],U):!1}function eG(U){var J=typeof U;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?U!=="__proto__":U===null}function tG(U){return!!je&&je in U}function RN(U){var J=U&&U.constructor,se=typeof J=="function"&&J.prototype||Pe;return U===se}function nG(U){var J=[];if(U!=null)for(var se in Object(U))J.push(se);return J}function rG(U){return Ae.call(U)}function oG(U,J,se){return J=Bn(J===void 0?U.length-1:J,0),function(){for(var Me=arguments,mt=-1,Vt=Bn(Me.length-J,0),on=Array(Vt);++mt<Vt;)on[mt]=Me[J+mt];mt=-1;for(var xt=Array(J+1);++mt<J;)xt[mt]=Me[mt];return xt[J]=se(on),ie(U,this,xt)}}function $v(U,J){if(!(J==="constructor"&&typeof U[J]=="function")&&J!="__proto__")return U[J]}var iG=sG(Hq);function sG(U){var J=0,se=0;return function(){var Me=Tc(),mt=i-(Me-se);if(se=Me,mt>0){if(++J>=o)return arguments[0]}else J=0;return U.apply(void 0,arguments)}}function aG(U){if(U!=null){try{return _t.call(U)}catch{}try{return U+""}catch{}}return""}function pm(U,J){return U===J||U!==U&&J!==J}var Lv=SN(function(){return arguments}())?SN:function(U){return Hd(U)&&ge.call(U,"callee")&&!vn.call(U,"callee")},zv=Array.isArray;function Bv(U){return U!=null&&NN(U.length)&&!Vv(U)}function lG(U){return Hd(U)&&Bv(U)}var kN=go||hG;function Vv(U){if(!Za(U))return!1;var J=fm(U);return J==p||J==g||J==c||J==x}function NN(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=s}function Za(U){var J=typeof U;return U!=null&&(J=="object"||J=="function")}function Hd(U){return U!=null&&typeof U=="object"}function cG(U){if(!Hd(U)||fm(U)!=v)return!1;var J=jt(U);if(J===null)return!0;var se=ge.call(J,"constructor")&&J.constructor;return typeof se=="function"&&se instanceof se&&_t.call(se)==ee}var MN=Z?ce(Z):Lq;function uG(U){return Yq(U,DN(U))}function DN(U){return Bv(U)?jq(U):zq(U)}var dG=Kq(function(U,J,se){EN(U,J,se)});function fG(U){return function(){return U}}function PN(U){return U}function hG(){return!1}e.exports=dG})(lb,lb.exports);var WY=lb.exports;const ah=Fa(WY),UY={theme:"system",setTheme:()=>null},CO=R.createContext(UY);function qY({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=R.useState(()=>localStorage.getItem(n)||t);R.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),o==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(o)},[o]);const s={theme:o,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return f.jsx(CO.Provider,{...r,value:s,children:e})}const SO=()=>{const e=R.useContext(CO);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var mc=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(){}},Kl=typeof window>"u"||"Deno"in globalThis;function Co(){}function GY(e,t){return typeof e=="function"?e(t):e}function D1(e){return typeof e=="number"&&e>=0&&e!==1/0}function EO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pu(e,t){return typeof e=="function"?e(t):e}function Ho(e,t){return typeof e=="function"?e(t):e}function ZN(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==TE(s,t.options))return!1}else if(!lh(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function JN(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Xl(t.options.mutationKey)!==Xl(i))return!1}else if(!lh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function TE(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xl)(e)}function Xl(e){return JSON.stringify(e,(t,n)=>P1(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function lh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!lh(e[n],t[n])):!1}function cb(e,t){if(e===t)return e;const n=eM(e)&&eM(t);if(n||P1(e)&&P1(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=cb(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return o===s&&l===o?e:a}return t}function ub(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 eM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function P1(e){if(!tM(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tM(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tM(e){return Object.prototype.toString.call(e)==="[object Object]"}function YY(e){return new Promise(t=>{setTimeout(t,e)})}function A1(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 cb(e,t)}catch(r){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}`)}return cb(e,t)}return t}function KY(e){return e}function XY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var db=Symbol();function _O(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===db&&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===db?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Sl,Js,Ru,Fj,ZY=(Fj=class extends mc{constructor(){super();Ne(this,Sl);Ne(this,Js);Ne(this,Ru);be(this,Ru,t=>{if(!Kl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){X(this,Js)||this.setEventListener(X(this,Ru))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Js))==null||t.call(this),be(this,Js,void 0))}setEventListener(t){var n;be(this,Ru,t),(n=X(this,Js))==null||n.call(this),be(this,Js,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){X(this,Sl)!==t&&(be(this,Sl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof X(this,Sl)=="boolean"?X(this,Sl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sl=new WeakMap,Js=new WeakMap,Ru=new WeakMap,Fj),jE=new ZY,ku,ea,Nu,$j,JY=($j=class extends mc{constructor(){super();Ne(this,ku,!0);Ne(this,ea);Ne(this,Nu);be(this,Nu,t=>{if(!Kl&&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(){X(this,ea)||this.setEventListener(X(this,Nu))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,ea))==null||t.call(this),be(this,ea,void 0))}setEventListener(t){var n;be(this,Nu,t),(n=X(this,ea))==null||n.call(this),be(this,ea,t(this.setOnline.bind(this)))}setOnline(t){X(this,ku)!==t&&(be(this,ku,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return X(this,ku)}},ku=new WeakMap,ea=new WeakMap,Nu=new WeakMap,$j),fb=new JY;function I1(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function eK(e){return Math.min(1e3*2**e,3e4)}function RO(e){return(e??"online")==="online"?fb.isOnline():!0}var kO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ex(e){return e instanceof kO}function NO(e){let t=!1,n=0,r=!1,o;const i=I1(),s=m=>{var b;r||(h(new kO(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>jE.isFocused()&&(e.networkMode==="always"||fb.isOnline())&&e.canRun(),u=()=>RO(e.networkMode)&&e.canRun(),d=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),o==null||o(),i.resolve(m))},h=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),o==null||o(),i.reject(m))},p=()=>new Promise(m=>{var b;o=y=>{(r||c())&&m(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;o=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var S;if(r)return;const v=e.retry??(Kl?0:3),x=e.retryDelay??eK,C=typeof x=="function"?x(n,y):x,_=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!_){h(y);return}n++,(S=e.onFail)==null||S.call(e,n,y),YY(C).then(()=>c()?void 0:p()).then(()=>{t?h(y):g()})})};return{promise:i,cancel:s,continue:()=>(o==null||o(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():p().then(g),i)}}function tK(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=a=>setTimeout(a,0);const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var dn=tK(),El,Lj,MO=(Lj=class{constructor(){Ne(this,El)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),D1(this.gcTime)&&be(this,El,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kl?1/0:5*60*1e3))}clearGcTimeout(){X(this,El)&&(clearTimeout(X(this,El)),be(this,El,void 0))}},El=new WeakMap,Lj),Mu,Du,vo,_l,tr,ep,Rl,Bo,ts,zj,nK=(zj=class extends MO{constructor(t){super();Ne(this,Bo);Ne(this,Mu);Ne(this,Du);Ne(this,vo);Ne(this,_l);Ne(this,tr);Ne(this,ep);Ne(this,Rl);be(this,Rl,!1),be(this,ep,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,_l,t.client),be(this,vo,X(this,_l).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,Mu,rK(this.options)),this.state=t.state??X(this,Mu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,tr))==null?void 0:t.promise}setOptions(t){this.options={...X(this,ep),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,vo).remove(this)}setData(t,n){const r=A1(this.state.data,t,this.options);return Oe(this,Bo,ts).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Oe(this,Bo,ts).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=X(this,tr))==null?void 0:r.promise;return(o=X(this,tr))==null||o.cancel(t),n?n.then(Co).catch(Co):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,Mu))}isActive(){return this.observers.some(t=>Ho(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===db||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!EO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,tr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,tr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,vo).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(X(this,tr)&&(X(this,Rl)?X(this,tr).cancel({revert:!0}):X(this,tr).cancelRetry()),this.scheduleGc()),X(this,vo).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,Bo,ts).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(X(this,tr))return X(this,tr).continueRetry(),X(this,tr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.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,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(be(this,Rl,!0),r.signal)})},i=()=>{const d=_O(this.options,n),h={client:X(this,_l),queryKey:this.queryKey,meta:this.meta};return o(h),be(this,Rl,!1),this.options.persister?this.options.persister(d,h,this):d(h)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:X(this,_l),state:this.state,fetchFn:i};o(s),(l=this.options.behavior)==null||l.onFetch(s,this),be(this,Du,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Oe(this,Bo,ts).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,p,g,m;ex(d)&&d.silent||Oe(this,Bo,ts).call(this,{type:"error",error:d}),ex(d)||((p=(h=X(this,vo).config).onError)==null||p.call(h,d,this),(m=(g=X(this,vo).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return be(this,tr,NO({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,p,g,m;if(d===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}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(b){a(b);return}(p=(h=X(this,vo).config).onSuccess)==null||p.call(h,d,this),(m=(g=X(this,vo).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{Oe(this,Bo,ts).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Oe(this,Bo,ts).call(this,{type:"pause"})},onContinue:()=>{Oe(this,Bo,ts).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),X(this,tr).start()}},Mu=new WeakMap,Du=new WeakMap,vo=new WeakMap,_l=new WeakMap,tr=new WeakMap,ep=new WeakMap,Rl=new WeakMap,Bo=new WeakSet,ts=function(t){const n=r=>{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,...DO(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ex(o)&&o.revert&&X(this,Du)?{...X(this,Du),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),dn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),X(this,vo).notify({query:this,type:"updated",action:t})})},zj);function DO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:RO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rK(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fi,Bj,PO=(Bj=class extends mc{constructor(t={}){super();Ne(this,fi);this.config=t,be(this,fi,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??TE(o,n);let s=this.get(i);return s||(s=new nK({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){X(this,fi).has(t.queryHash)||(X(this,fi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=X(this,fi).get(t.queryHash);n&&(t.destroy(),n===t&&X(this,fi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,fi).get(t)}getAll(){return[...X(this,fi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ZN(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ZN(t,r)):n}notify(t){dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fi=new WeakMap,Bj),hi,mr,kl,pi,qs,Vj,oK=(Vj=class extends MO{constructor(t){super();Ne(this,pi);Ne(this,hi);Ne(this,mr);Ne(this,kl);this.mutationId=t.mutationId,be(this,mr,t.mutationCache),be(this,hi,[]),this.state=t.state||AO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,hi).includes(t)||(X(this,hi).push(t),this.clearGcTimeout(),X(this,mr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,hi,X(this,hi).filter(n=>n!==t)),this.scheduleGc(),X(this,mr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,hi).length||(this.state.status==="pending"?this.scheduleGc():X(this,mr).remove(this))}continue(){var t;return((t=X(this,kl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,s,a,l,c,u,d,h,p,g,m,b,y,v,x,C,_,S,E;be(this,kl,NO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,N)=>{Oe(this,pi,qs).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{Oe(this,pi,qs).call(this,{type:"pause"})},onContinue:()=>{Oe(this,pi,qs).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,mr).canRun(this)}));const n=this.state.status==="pending",r=!X(this,kl).canStart();try{if(!n){Oe(this,pi,qs).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=X(this,mr).config).onMutate)==null?void 0:i.call(o,t,this));const N=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));N!==this.state.context&&Oe(this,pi,qs).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const k=await X(this,kl).start();return await((c=(l=X(this,mr).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((p=(h=X(this,mr).config).onSettled)==null?void 0:p.call(h,k,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,k,null,t,this.state.context)),Oe(this,pi,qs).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(b=X(this,mr).config).onError)==null?void 0:y.call(b,k,t,this.state.context,this)),await((x=(v=this.options).onError)==null?void 0:x.call(v,k,t,this.state.context)),await((_=(C=X(this,mr).config).onSettled)==null?void 0:_.call(C,void 0,k,this.state.variables,this.state.context,this)),await((E=(S=this.options).onSettled)==null?void 0:E.call(S,void 0,k,t,this.state.context)),k}finally{Oe(this,pi,qs).call(this,{type:"error",error:k})}}finally{X(this,mr).runNext(this)}}},hi=new WeakMap,mr=new WeakMap,kl=new WeakMap,pi=new WeakSet,qs=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),dn.batch(()=>{X(this,hi).forEach(r=>{r.onMutationUpdate(t)}),X(this,mr).notify({mutation:this,type:"updated",action:t})})},Vj);function AO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var as,Vo,tp,Hj,iK=(Hj=class extends mc{constructor(t={}){super();Ne(this,as);Ne(this,Vo);Ne(this,tp);this.config=t,be(this,as,new Set),be(this,Vo,new Map),be(this,tp,0)}build(t,n,r){const o=new oK({mutationCache:this,mutationId:++mm(this,tp)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){X(this,as).add(t);const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n);r?r.push(t):X(this,Vo).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,as).delete(t)){const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&X(this,Vo).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=bm(t);if(typeof n=="string"){const o=(r=X(this,Vo).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dn.batch(()=>{X(this,as).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,as).clear(),X(this,Vo).clear()})}getAll(){return Array.from(X(this,as))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>JN(n,r))}findAll(t={}){return this.getAll().filter(n=>JN(t,n))}notify(t){dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return dn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Co))))}},as=new WeakMap,Vo=new WeakMap,tp=new WeakMap,Hj);function bm(e){var t;return(t=e.options.scope)==null?void 0:t.id}function nM(e){return{onFetch:(t,n)=>{var u,d,h,p,g;const r=t.options,o=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=_O(t.options,t.fetchOptions),v=async(x,C,_)=>{if(m)return Promise.reject();if(C==null&&x.pages.length)return Promise.resolve(x);const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};b(S);const E=await y(S),{maxPages:k}=t.options,N=_?QY:XY;return{pages:N(x.pages,E,k),pageParams:N(x.pageParams,C,k)}};if(o&&i.length){const x=o==="backward",C=x?sK:rM,_={pages:i,pageParams:s},S=C(r,_);a=await v(_,S,x)}else{const x=e??i.length;do{const C=l===0?s[0]??r.initialPageParam:rM(r,a);if(l>0&&C==null)break;a=await v(a,C),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function rM(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 sK(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 un,ta,na,Pu,Au,ra,Iu,Tu,Wj,aK=(Wj=class{constructor(e={}){Ne(this,un);Ne(this,ta);Ne(this,na);Ne(this,Pu);Ne(this,Au);Ne(this,ra);Ne(this,Iu);Ne(this,Tu);be(this,un,e.queryCache||new PO),be(this,ta,e.mutationCache||new iK),be(this,na,e.defaultOptions||{}),be(this,Pu,new Map),be(this,Au,new Map),be(this,ra,0)}mount(){mm(this,ra)._++,X(this,ra)===1&&(be(this,Iu,jE.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,un).onFocus())})),be(this,Tu,fb.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,un).onOnline())})))}unmount(){var e,t;mm(this,ra)._--,X(this,ra)===0&&((e=X(this,Iu))==null||e.call(this),be(this,Iu,void 0),(t=X(this,Tu))==null||t.call(this),be(this,Tu,void 0))}isFetching(e){return X(this,un).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,ta).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,un).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=X(this,un).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pu(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return X(this,un).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=X(this,un).get(r.queryHash),i=o==null?void 0:o.state.data,s=GY(t,i);if(s!==void 0)return X(this,un).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return dn.batch(()=>X(this,un).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,un).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=X(this,un);dn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=X(this,un);return dn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=dn.batch(()=>X(this,un).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Co).catch(Co)}invalidateQueries(e,t={}){return dn.batch(()=>(X(this,un).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=dn.batch(()=>X(this,un).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Co)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Co)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=X(this,un).build(this,t);return n.isStaleByTime(pu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Co).catch(Co)}fetchInfiniteQuery(e){return e.behavior=nM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Co).catch(Co)}ensureInfiniteQueryData(e){return e.behavior=nM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fb.isOnline()?X(this,ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,un)}getMutationCache(){return X(this,ta)}getDefaultOptions(){return X(this,na)}setDefaultOptions(e){be(this,na,e)}setQueryDefaults(e,t){X(this,Pu).set(Xl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,Pu).values()],n={};return t.forEach(r=>{lh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){X(this,Au).set(Xl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,Au).values()],n={};return t.forEach(r=>{lh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,na).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=TE(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===db&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,na).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,un).clear(),X(this,ta).clear()}},un=new WeakMap,ta=new WeakMap,na=new WeakMap,Pu=new WeakMap,Au=new WeakMap,ra=new WeakMap,Iu=new WeakMap,Tu=new WeakMap,Wj),Or,ft,np,gr,Nl,ju,oa,mi,rp,Ou,Fu,Ml,Dl,ia,$u,It,df,T1,j1,O1,F1,$1,L1,z1,IO,Uj,OE=(Uj=class extends mc{constructor(t,n){super();Ne(this,It);Ne(this,Or);Ne(this,ft);Ne(this,np);Ne(this,gr);Ne(this,Nl);Ne(this,ju);Ne(this,oa);Ne(this,mi);Ne(this,rp);Ne(this,Ou);Ne(this,Fu);Ne(this,Ml);Ne(this,Dl);Ne(this,ia);Ne(this,$u,new Set);this.options=n,be(this,Or,t),be(this,mi,null),be(this,oa,I1()),this.options.experimental_prefetchInRender||X(this,oa).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&&(X(this,ft).addObserver(this),oM(X(this,ft),this.options)?Oe(this,It,df).call(this):this.updateResult(),Oe(this,It,F1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B1(X(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B1(X(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,It,$1).call(this),Oe(this,It,L1).call(this),X(this,ft).removeObserver(this)}setOptions(t,n){const r=this.options,o=X(this,ft);if(this.options=X(this,Or).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ho(this.options.enabled,X(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,It,z1).call(this),X(this,ft).setOptions(this.options),r._defaulted&&!ub(this.options,r)&&X(this,Or).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,ft),observer:this});const i=this.hasListeners();i&&iM(X(this,ft),o,this.options,r)&&Oe(this,It,df).call(this),this.updateResult(n),i&&(X(this,ft)!==o||Ho(this.options.enabled,X(this,ft))!==Ho(r.enabled,X(this,ft))||pu(this.options.staleTime,X(this,ft))!==pu(r.staleTime,X(this,ft)))&&Oe(this,It,T1).call(this);const s=Oe(this,It,j1).call(this);i&&(X(this,ft)!==o||Ho(this.options.enabled,X(this,ft))!==Ho(r.enabled,X(this,ft))||s!==X(this,ia))&&Oe(this,It,O1).call(this,s)}getOptimisticResult(t){const n=X(this,Or).getQueryCache().build(X(this,Or),t),r=this.createResult(n,t);return cK(this,r)&&(be(this,gr,r),be(this,ju,this.options),be(this,Nl,X(this,ft).state)),r}getCurrentResult(){return X(this,gr)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){X(this,$u).add(t)}getCurrentQuery(){return X(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=X(this,Or).defaultQueryOptions(t),r=X(this,Or).getQueryCache().build(X(this,Or),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,It,df).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,gr)))}createResult(t,n){var k;const r=X(this,ft),o=this.options,i=X(this,gr),s=X(this,Nl),a=X(this,ju),c=t!==r?t.state:X(this,np),{state:u}=t;let d={...u},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&oM(t,n),I=N&&iM(t,r,n,o);(M||I)&&(d={...d,...DO(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:b}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(s==null?void 0:s.data)&&n.select===X(this,rp))p=X(this,Ou);else try{be(this,rp,n.select),p=n.select(d.data),p=A1(i==null?void 0:i.data,p,n),be(this,Ou,p),be(this,mi,null)}catch(N){be(this,mi,N)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=i.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((k=X(this,Fu))==null?void 0:k.state.data,X(this,Fu)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),be(this,mi,null)}catch(M){be(this,mi,M)}N!==void 0&&(b="success",p=A1(i==null?void 0:i.data,N,n),h=!0)}X(this,mi)&&(g=X(this,mi),p=X(this,Ou),m=Date.now(),b="error");const y=d.fetchStatus==="fetching",v=b==="pending",x=b==="error",C=v&&y,_=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:v,isSuccess:b==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:x&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:x&&_,isStale:FE(t,n),refetch:this.refetch,promise:X(this,oa)};if(this.options.experimental_prefetchInRender){const N=P=>{E.status==="error"?P.reject(E.error):E.data!==void 0&&P.resolve(E.data)},M=()=>{const P=be(this,oa,E.promise=I1());N(P)},I=X(this,oa);switch(I.status){case"pending":t.queryHash===r.queryHash&&N(I);break;case"fulfilled":(E.status==="error"||E.data!==I.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==I.reason)&&M();break}}return E}updateResult(t){const n=X(this,gr),r=this.createResult(X(this,ft),this.options);if(be(this,Nl,X(this,ft).state),be(this,ju,this.options),X(this,Nl).data!==void 0&&be(this,Fu,X(this,ft)),ub(r,n))return;be(this,gr,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!X(this,$u).size)return!0;const l=new Set(a??X(this,$u));return this.options.throwOnError&&l.add("error"),Object.keys(X(this,gr)).some(c=>{const u=c;return X(this,gr)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),Oe(this,It,IO).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,It,F1).call(this)}},Or=new WeakMap,ft=new WeakMap,np=new WeakMap,gr=new WeakMap,Nl=new WeakMap,ju=new WeakMap,oa=new WeakMap,mi=new WeakMap,rp=new WeakMap,Ou=new WeakMap,Fu=new WeakMap,Ml=new WeakMap,Dl=new WeakMap,ia=new WeakMap,$u=new WeakMap,It=new WeakSet,df=function(t){Oe(this,It,z1).call(this);let n=X(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Co)),n},T1=function(){Oe(this,It,$1).call(this);const t=pu(this.options.staleTime,X(this,ft));if(Kl||X(this,gr).isStale||!D1(t))return;const r=EO(X(this,gr).dataUpdatedAt,t)+1;be(this,Ml,setTimeout(()=>{X(this,gr).isStale||this.updateResult()},r))},j1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,ft)):this.options.refetchInterval)??!1},O1=function(t){Oe(this,It,L1).call(this),be(this,ia,t),!(Kl||Ho(this.options.enabled,X(this,ft))===!1||!D1(X(this,ia))||X(this,ia)===0)&&be(this,Dl,setInterval(()=>{(this.options.refetchIntervalInBackground||jE.isFocused())&&Oe(this,It,df).call(this)},X(this,ia)))},F1=function(){Oe(this,It,T1).call(this),Oe(this,It,O1).call(this,Oe(this,It,j1).call(this))},$1=function(){X(this,Ml)&&(clearTimeout(X(this,Ml)),be(this,Ml,void 0))},L1=function(){X(this,Dl)&&(clearInterval(X(this,Dl)),be(this,Dl,void 0))},z1=function(){const t=X(this,Or).getQueryCache().build(X(this,Or),this.options);if(t===X(this,ft))return;const n=X(this,ft);be(this,ft,t),be(this,np,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},IO=function(t){dn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(X(this,gr))}),X(this,Or).getQueryCache().notify({query:X(this,ft),type:"observerResultsUpdated"})})},Uj);function lK(e,t){return Ho(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function oM(e,t){return lK(e,t)||e.state.data!==void 0&&B1(e,t,t.refetchOnMount)}function B1(e,t,n){if(Ho(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&FE(e,t)}return!1}function iM(e,t,n,r){return(e!==t||Ho(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&FE(e,n)}function FE(e,t){return Ho(t.enabled,e)!==!1&&e.isStaleByTime(pu(t.staleTime,e))}function cK(e,t){return!ub(e.getCurrentResult(),t)}function sM(e,t){return e.filter(n=>!t.includes(n))}function uK(e,t,n){const r=e.slice(0);return r[t]=n,r}var Pl,xo,Lu,zu,wo,sa,op,ip,sp,Xn,V1,H1,W1,U1,q1,qj,dK=(qj=class extends mc{constructor(t,n,r){super();Ne(this,Xn);Ne(this,Pl);Ne(this,xo);Ne(this,Lu);Ne(this,zu);Ne(this,wo);Ne(this,sa);Ne(this,op);Ne(this,ip);Ne(this,sp,[]);be(this,Pl,t),be(this,zu,r),be(this,Lu,[]),be(this,wo,[]),be(this,xo,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&X(this,wo).forEach(t=>{t.subscribe(n=>{Oe(this,Xn,U1).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,X(this,wo).forEach(t=>{t.destroy()})}setQueries(t,n,r){if(be(this,Lu,t),be(this,zu,n),process.env.NODE_ENV!=="production"){const o=t.map(i=>X(this,Pl).defaultQueryOptions(i).queryHash);new Set(o).size!==o.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}dn.batch(()=>{const o=X(this,wo),i=Oe(this,Xn,W1).call(this,X(this,Lu));be(this,sp,i),i.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions,r));const s=i.map(c=>c.observer),a=s.map(c=>c.getCurrentResult()),l=s.some((c,u)=>c!==o[u]);o.length===s.length&&!l||(be(this,wo,s),be(this,xo,a),this.hasListeners()&&(sM(o,s).forEach(c=>{c.destroy()}),sM(s,o).forEach(c=>{c.subscribe(u=>{Oe(this,Xn,U1).call(this,c,u)})}),Oe(this,Xn,q1).call(this)))})}getCurrentResult(){return X(this,xo)}getQueries(){return X(this,wo).map(t=>t.getCurrentQuery())}getObservers(){return X(this,wo)}getOptimisticResult(t,n){const r=Oe(this,Xn,W1).call(this,t),o=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>Oe(this,Xn,H1).call(this,i??o,n),()=>Oe(this,Xn,V1).call(this,o,r)]}},Pl=new WeakMap,xo=new WeakMap,Lu=new WeakMap,zu=new WeakMap,wo=new WeakMap,sa=new WeakMap,op=new WeakMap,ip=new WeakMap,sp=new WeakMap,Xn=new WeakSet,V1=function(t,n){return n.map((r,o)=>{const i=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,s=>{n.forEach(a=>{a.observer.trackProp(s)})})})},H1=function(t,n){return n?((!X(this,sa)||X(this,xo)!==X(this,ip)||n!==X(this,op))&&(be(this,op,n),be(this,ip,X(this,xo)),be(this,sa,cb(X(this,sa),n(t)))),X(this,sa)):t},W1=function(t){const n=new Map(X(this,wo).map(o=>[o.options.queryHash,o])),r=[];return t.forEach(o=>{const i=X(this,Pl).defaultQueryOptions(o),s=n.get(i.queryHash);s?r.push({defaultedQueryOptions:i,observer:s}):r.push({defaultedQueryOptions:i,observer:new OE(X(this,Pl),i)})}),r},U1=function(t,n){const r=X(this,wo).indexOf(t);r!==-1&&(be(this,xo,uK(X(this,xo),r,n)),Oe(this,Xn,q1).call(this))},q1=function(){var t;if(this.hasListeners()){const n=X(this,sa),r=Oe(this,Xn,V1).call(this,X(this,xo),X(this,sp)),o=Oe(this,Xn,H1).call(this,r,(t=X(this,zu))==null?void 0:t.combine);n!==o&&dn.batch(()=>{this.listeners.forEach(i=>{i(X(this,xo))})})}},qj),aa,la,Fr,ls,_s,$g,G1,Gj,fK=(Gj=class extends mc{constructor(n,r){super();Ne(this,_s);Ne(this,aa);Ne(this,la);Ne(this,Fr);Ne(this,ls);be(this,aa,n),this.setOptions(r),this.bindMethods(),Oe(this,_s,$g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=X(this,aa).defaultMutationOptions(n),ub(this.options,r)||X(this,aa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,Fr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Xl(r.mutationKey)!==Xl(this.options.mutationKey)?this.reset():((o=X(this,Fr))==null?void 0:o.state.status)==="pending"&&X(this,Fr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=X(this,Fr))==null||n.removeObserver(this)}onMutationUpdate(n){Oe(this,_s,$g).call(this),Oe(this,_s,G1).call(this,n)}getCurrentResult(){return X(this,la)}reset(){var n;(n=X(this,Fr))==null||n.removeObserver(this),be(this,Fr,void 0),Oe(this,_s,$g).call(this),Oe(this,_s,G1).call(this)}mutate(n,r){var o;return be(this,ls,r),(o=X(this,Fr))==null||o.removeObserver(this),be(this,Fr,X(this,aa).getMutationCache().build(X(this,aa),this.options)),X(this,Fr).addObserver(this),X(this,Fr).execute(n)}},aa=new WeakMap,la=new WeakMap,Fr=new WeakMap,ls=new WeakMap,_s=new WeakSet,$g=function(){var r;const n=((r=X(this,Fr))==null?void 0:r.state)??AO();be(this,la,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},G1=function(n){dn.batch(()=>{var r,o,i,s,a,l,c,u;if(X(this,ls)&&this.hasListeners()){const d=X(this,la).variables,h=X(this,la).context;(n==null?void 0:n.type)==="success"?((o=(r=X(this,ls)).onSuccess)==null||o.call(r,n.data,d,h),(s=(i=X(this,ls)).onSettled)==null||s.call(i,n.data,null,d,h)):(n==null?void 0:n.type)==="error"&&((l=(a=X(this,ls)).onError)==null||l.call(a,n.error,d,h),(u=(c=X(this,ls)).onSettled)==null||u.call(c,void 0,n.error,d,h))}this.listeners.forEach(d=>{d(X(this,la))})})},Gj),$E=w.createContext(void 0),Qn=e=>{const t=w.useContext($E);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hK=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx($E.Provider,{value:e,children:t})),TO=w.createContext(!1),jO=()=>w.useContext(TO);TO.Provider;function pK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mK=w.createContext(pK()),OO=()=>w.useContext(mK);function FO(e,t){return typeof e=="function"?e(...t):!!e}function hb(){}var $O=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},LO=e=>{w.useEffect(()=>{e.clearReset()},[e])},zO=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||FO(n,[e.error,r])),BO=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},VO=(e,t)=>e.isLoading&&e.isFetching&&!t,Y1=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,pb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function gK({queries:e,...t},n){const r=Qn(),o=jO(),i=OO(),s=w.useMemo(()=>e.map(m=>{const b=r.defaultQueryOptions(m);return b._optimisticResults=o?"isRestoring":"optimistic",b}),[e,r,o]);s.forEach(m=>{BO(m),$O(m,i)}),LO(i);const[a]=w.useState(()=>new dK(r,s,t)),[l,c,u]=a.getOptimisticResult(s,t.combine),d=!o&&t.subscribed!==!1;w.useSyncExternalStore(w.useCallback(m=>d?a.subscribe(dn.batchCalls(m)):hb,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(s,t,{listeners:!1})},[s,t,a]);const p=l.some((m,b)=>Y1(s[b],m))?l.flatMap((m,b)=>{const y=s[b];if(y){const v=new OE(r,y);if(Y1(y,m))return pb(y,v,i);VO(m,o)&&pb(y,v,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const g=l.find((m,b)=>{const y=s[b];return y&&zO({result:m,errorResetBoundary:i,throwOnError:y.throwOnError,query:r.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(g!=null&&g.error)throw g.error;return c(u())}function bK(e,t,n){var d,h,p,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Qn(),o=jO(),i=OO(),s=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.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`)),s._optimisticResults=o?"isRestoring":"optimistic",BO(s),$O(s,i),LO(i);const a=!r.getQueryCache().get(s.queryHash),[l]=w.useState(()=>new t(r,s)),c=l.getOptimisticResult(s),u=!o&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(b=>{const y=u?l.subscribe(dn.batchCalls(b)):hb;return l.updateResult(),y},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),Y1(s,c))throw pb(s,l,i);if(zO({result:c,errorResetBoundary:i,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((g=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,s,c),s.experimental_prefetchInRender&&!Kl&&VO(c,o)){const b=a?pb(s,l,i):(m=r.getQueryCache().get(s.queryHash))==null?void 0:m.promise;b==null||b.catch(hb).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function hn(e,t){return bK(e,OE)}function gc(e,t){const n=Qn(),[r]=w.useState(()=>new fK(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const o=w.useSyncExternalStore(w.useCallback(s=>r.subscribe(dn.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=w.useCallback((s,a)=>{r.mutate(s,a).catch(hb)},[r]);if(o.error&&FO(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function yK(){const e=R.useContext($E);if(e&&e.isSemaphorClient)return e}function HO({children:e}){const{setIsSessionExpired:t}=Gt(),n=yK(),[r]=R.useState(()=>{const o=new aK({queryCache:new PO({onError:i=>{i instanceof Error?(console.error(`Something went wrong: ${i.message}`),i.message==="invalid token"&&t(!0)):console.error("Something went wrong:",i)}}),defaultOptions:{queries:{gcTime:36e5,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}}});return o.isSemaphorClient=!0,o});return n?f.jsx(f.Fragment,{children:e}):f.jsx(hK,{client:r,children:e})}const ri=R.forwardRef(({children:e,className:t,...n},r)=>f.jsx("div",{className:oe("semaphor-scope",t),ref:r,...n,children:e})),vK={id:"",authToken:void 0,tokenProps:{}},LE=R.createContext(vK),WO=({children:e,dashboardProps:t})=>{const n=R.useMemo(()=>{let r={};const o=t.authToken;return o&&(r=ap(o.accessToken)),{...t,tokenProps:r}},[t]);return f.jsx(HO,{children:f.jsx(LE.Provider,{value:n,children:f.jsx(ri,{style:{height:"100%"},children:e})})})};function Bt(){const e=R.useContext(LE);if(e===void 0)throw new Error("useApplicationContext must be used within a ApplicationContextProvider");return e}const bc=Ps()(lp(e=>({selectedDashboard:null,selectedVisual:null,lastSelectedDashboard:null,lastSelectedVisual:null,actions:{selectDashboard:t=>{e(n=>{var r;((r=n.selectedDashboard)==null?void 0:r.id)!==t.id&&(n.lastSelectedDashboard=n.selectedDashboard,n.selectedDashboard=t)})},selectVisual:t=>{e(n=>{n.lastSelectedVisual=n.selectedVisual,n.selectedVisual=t})},clearSelectedDashboard:()=>{e(t=>{t.lastSelectedDashboard=t.selectedDashboard,t.selectedDashboard=null})},clearSelectedVisual:()=>{e(t=>{t.lastSelectedVisual=t.selectedVisual,t.selectedVisual=null})}}}))),UO=()=>bc(e=>e.selectedVisual),qO=()=>bc(e=>e.actions),xK=e=>bc(t=>{var n;return((n=t.selectedDashboard)==null?void 0:n.id)===e}),wK=e=>bc(t=>{var n;return((n=t.selectedVisual)==null?void 0:n.id)===e});function CK(){const e=bc(c=>c.selectedDashboard),{authToken:t,version:n}=Bt(),r=re(c=>c.selectedLensId);function o(){if(!(t!=null&&t.accessToken))return!1}const{data:i,isLoading:s,isFetching:a,isError:l}=hn({queryKey:["dashboard",r,t==null?void 0:t.accessToken,e==null?void 0:e.id],queryFn:()=>VY(t==null?void 0:t.accessToken,{lensId:r,version:n,dashboardId:e==null?void 0:e.id}),enabled:o()});return{data:i,isLoading:s,isFetching:a,isError:l}}function SK(){const{authToken:e}=Bt(),t=re(r=>r.authToken),{setAuthToken:n}=Gt();return R.useEffect(()=>{e&&(e==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&n(e)},[e,t,n]),e}const GO=(e,t)=>{const n={};if(e===null||t===null)return t;const r=new Set([...Object.keys(e),...Object.keys(t)]);for(const o of r){if(!(o in e)&&o in t){n[o]=t[o];continue}if(o in e&&!(o in t)){n[o]=void 0;continue}const i=e[o],s=t[o];if(!K1(i,s))if(Array.isArray(i)&&Array.isArray(s))n[o]=s;else if(aM(i)&&aM(s)){const a=GO(i,s);Object.keys(a).length>0&&(n[o]=a)}else n[o]=s}return n},K1=(e,t)=>{if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((o,i)=>K1(o,t[i]));const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(o=>K1(e[o],t[o]))}return!1},aM=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),ch=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(n=>ch(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=ch(e[n]));return t};function YO(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function lM(e,t){const n=YO(e);return n==="dark"?ah({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function EK({customStyle:e,currentTheme:t,onSave:n,onEvent:r,defaultFilterValues:o,selectedSheetId:i,onFilterValuesChange:s}){const{authToken:a}=Bt();SK();const l=re(O=>O.selectedLensId),{data:c,isLoading:u,isFetching:d,isError:h}=CK(),[p,g]=R.useState(o||[]),{theme:m,setTheme:b}=SO(),y=re(O=>O.dashboard.globalStyle),{setDashboard:v,setDashboardWithFilterValues:x,setSelectedSheetId:C,setStyle:_,setOnSaveFunction:S,setLenses:E,setSelectedLensId:k,setInitStore:N}=Gt();re(O=>O.actions.setCustomCards);const M=re(O=>O.actions.setFilterValues),I=re(O=>O.filterValues),P=re(O=>O.actions.setThemeStyle),j=re(O=>O.actions.setDashboardTheme),F=re(O=>O.actions.setOnEvent);R.useEffect(()=>{a&&N()},[a,N]),R.useEffect(()=>{if(m){const O=YO(m);j(O)}},[m,j]),R.useEffect(()=>{t&&b(t)},[t,b]);const T=R.useCallback(()=>{const O=ch(ab),L=ah(O,y);if(e){const B=ah(L,e),z=lM(m,B);P(z),_(B)}else{const B=lM(m,L);P(B),_(ab)}},[m,e,y,P,_]);return R.useEffect(()=>{c&&c.dashboard&&T()},[m,e,y,T,c]),R.useEffect(()=>{var $,D;function O(H,V){const G=H.filters||[],q=[];for(const K of V){const Y=G.find(Q=>Q.id===K.filterId);Y&&q.push({filterId:K.filterId,connectionType:Y.database==="NA"?"api":"database",name:Y.column,operation:Y.operation,valueType:hu(Y),values:K.values})}return q}if(!c||!c.dashboard)return;const{dashboard:L,filterValues:B,defaultLensId:z,lenses:A}=c;function W(){var V;if(B&&(B==null?void 0:B.length)>0)return B;const H=O(L,p||[]);return H&&(H==null?void 0:H.length)>0?H:L.defaultFilterValues&&((V=L.defaultFilterValues)==null?void 0:V.length)>0?L.defaultFilterValues:[]}x(L,W()),A&&E(A),z&&k(z),C(i||((D=($=L==null?void 0:L.sheets)==null?void 0:$[0])==null?void 0:D.id)||null)},[c,v,C,M,l,E,x,k,p,i]),R.useEffect(()=>{s&&I&&s(I)},[I,s]),R.useEffect(()=>{n&&S(n),r&&F(r)},[n,S,r,F]),{isFetching:d,isLoading:u,isError:h}}function ws({className:e,...t}){return f.jsx("div",{className:oe("animate-pulse rounded-md bg-muted",e),...t})}const mb=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));mb.displayName="Card";const Wu=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("flex flex-col space-y-1.5 p-6",e),...t}));Wu.displayName="CardHeader";const wa=w.forwardRef(({className:e,...t},n)=>f.jsx("h3",{ref:n,className:oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));wa.displayName="CardTitle";const zE=w.forwardRef(({className:e,...t},n)=>f.jsx("p",{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));zE.displayName="CardDescription";const uh=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("px-6 pt-0",e),...t}));uh.displayName="CardContent";const KO=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("flex items-center p-6 pt-0",e),...t}));KO.displayName="CardFooter";function XO({className:e,customStyle:t,onSave:n,onEvent:r,LoadingComponent:o,ErrorComponent:i,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,showAssistant:h,defaultFilterValues:p,onFilterValuesChange:g,selectedSheetId:m,eventHandlers:b,...y}){const{placeholders:v}=Bt(),x=re(E=>E.themeStyle),C=re(E=>E.isSessionExpired),{isLoading:_,isError:S}=EK({customStyle:t,currentTheme:c,onSave:n,onEvent:r,defaultFilterValues:p,onFilterValuesChange:g,selectedSheetId:m});return _||!l?(r==null||r({type:"info",message:"Loading dashboard"}),o?f.jsx(o,{message:"loading"}):f.jsx("div",{className:"flex items-center gap-3",children:f.jsx(ws,{className:"h-1 w-full dark:h-[2px]"})})):S?(r==null||r({type:"error",message:"Error fetching dashboard"}),i?(console.log("Error fetching dashboard"),f.jsx(i,{})):f.jsx("div",{children:"Error"})):C?(r==null||r({type:"error",message:"Session Expired"}),v!=null&&v.SessionExpired?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx("div",{children:v.SessionExpired})}):f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsxs("div",{className:"space-y-4 rounded-md border border-muted p-10",children:[f.jsx(wa,{children:"Session Expired"}),f.jsx("p",{className:"text-muted-foreground",children:"Please refresh your page to continue"})]})})):f.jsx("div",{className:oe("isolate flex grow flex-col",x==null?void 0:x.dashboardPanel,e),style:{},"data-role":"dashboard-panel",...y})}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _K(e,t){const n=w.createContext(t),r=i=>{const{children:s,...a}=i,l=w.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=w.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function On(e,t=[]){let n=[];function r(i,s){const a=w.createContext(s),l=n.length;n=[...n,s];const c=d=>{var y;const{scope:h,children:p,...g}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=w.useMemo(()=>g,Object.values(g));return f.jsx(m.Provider,{value:b,children:p})};c.displayName=i+"Provider";function u(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,g=w.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(s=>w.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,RK(o,...t)]}function RK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function cM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Sr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=cM(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():cM(e[o],null)}}}}function He(...e){return w.useCallback(Sr(...e),e)}var X1=w.forwardRef((e,t)=>{const{children:n,...r}=e,o=w.Children.toArray(n),i=o.find(NK);if(i){const s=i.props.children,a=o.map(l=>l===i?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:l);return f.jsx(Q1,{...r,ref:t,children:w.isValidElement(s)?w.cloneElement(s,void 0,a):null})}return f.jsx(Q1,{...r,ref:t,children:n})});X1.displayName="Slot";var Q1=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const o=DK(n),i=MK(r,n.props);return n.type!==w.Fragment&&(i.ref=t?Sr(t,o):o),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});Q1.displayName="SlotClone";var kK=({children:e})=>f.jsx(f.Fragment,{children:e});function NK(e){return w.isValidElement(e)&&e.type===kK}function MK(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function DK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function B0(e){const t=e+"CollectionProvider",[n,r]=On(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:g,children:m}=p,b=R.useRef(null),y=R.useRef(new Map).current;return f.jsx(o,{scope:g,itemMap:y,collectionRef:b,children:m})};s.displayName=t;const a=e+"CollectionSlot",l=R.forwardRef((p,g)=>{const{scope:m,children:b}=p,y=i(a,m),v=He(g,y.collectionRef);return f.jsx(X1,{ref:v,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=R.forwardRef((p,g)=>{const{scope:m,children:b,...y}=p,v=R.useRef(null),x=He(g,v),C=i(c,m);return R.useEffect(()=>(C.itemMap.set(v,{ref:v,...y}),()=>void C.itemMap.delete(v))),f.jsx(X1,{[u]:"",ref:x,children:b})});d.displayName=c;function h(p){const g=i(e+"CollectionConsumer",p);return R.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((C,_)=>y.indexOf(C.ref.current)-y.indexOf(_.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,r]}var Yn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},PK=w.useId||(()=>{}),AK=0;function Nn(e){const[t,n]=w.useState(PK());return Yn(()=>{n(r=>r??String(AK++))},[e]),t?`radix-${t}`:""}var QO=w.forwardRef((e,t)=>{const{children:n,...r}=e,o=w.Children.toArray(n),i=o.find(TK);if(i){const s=i.props.children,a=o.map(l=>l===i?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:l);return f.jsx(Z1,{...r,ref:t,children:w.isValidElement(s)?w.cloneElement(s,void 0,a):null})}return f.jsx(Z1,{...r,ref:t,children:n})});QO.displayName="Slot";var Z1=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const o=OK(n),i=jK(r,n.props);return n.type!==w.Fragment&&(i.ref=t?Sr(t,o):o),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});Z1.displayName="SlotClone";var IK=({children:e})=>f.jsx(f.Fragment,{children:e});function TK(e){return w.isValidElement(e)&&e.type===IK}function jK(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function OK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=FK.reduce((e,t)=>{const n=w.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?QO:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZO(e,t){e&&Rs.flushSync(()=>e.dispatchEvent(t))}function In(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function dr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$K({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=In(n),l=w.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[i,e,o,a]);return[s,l]}function $K({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,o=w.useRef(r),i=In(t);return w.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var LK=w.createContext(void 0);function yc(e){const t=w.useContext(LK);return e||t||"ltr"}var tx="rovingFocusGroup.onEntryFocus",zK={bubbles:!1,cancelable:!0},V0="RovingFocusGroup",[J1,JO,BK]=B0(V0),[VK,gd]=On(V0,[BK]),[HK,WK]=VK(V0),e5=w.forwardRef((e,t)=>f.jsx(J1.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(J1.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(UK,{...e,ref:t})})}));e5.displayName=V0;var UK=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,h=w.useRef(null),p=He(t,h),g=yc(i),[m=null,b]=dr({prop:s,defaultProp:a,onChange:l}),[y,v]=w.useState(!1),x=In(c),C=JO(n),_=w.useRef(!1),[S,E]=w.useState(0);return w.useEffect(()=>{const k=h.current;if(k)return k.addEventListener(tx,x),()=>k.removeEventListener(tx,x)},[x]),f.jsx(HK,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:w.useCallback(k=>b(k),[b]),onItemShiftTab:w.useCallback(()=>v(!0),[]),onFocusableItemAdd:w.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:w.useCallback(()=>E(k=>k-1),[]),children:f.jsx(_e.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:he(e.onMouseDown,()=>{_.current=!0}),onFocus:he(e.onFocus,k=>{const N=!_.current;if(k.target===k.currentTarget&&N&&!y){const M=new CustomEvent(tx,zK);if(k.currentTarget.dispatchEvent(M),!M.defaultPrevented){const I=C().filter(O=>O.focusable),P=I.find(O=>O.active),j=I.find(O=>O.id===m),T=[P,j,...I].filter(Boolean).map(O=>O.ref.current);r5(T,u)}}_.current=!1}),onBlur:he(e.onBlur,()=>v(!1))})})}),t5="RovingFocusGroupItem",n5=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=Nn(),l=i||a,c=WK(t5,n),u=c.currentTabStopId===l,d=JO(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return w.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),f.jsx(J1.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:f.jsx(_e.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:he(e.onMouseDown,g=>{r?c.onItemFocus(l):g.preventDefault()}),onFocus:he(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:he(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=YK(g,c.orientation,c.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let y=d().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const v=y.indexOf(g.currentTarget);y=c.loop?KK(y,v+1):y.slice(v+1)}setTimeout(()=>r5(y))}})})})});n5.displayName=t5;var qK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function GK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function YK(e,t,n){const r=GK(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qK[r]}function r5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function KK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BE=e5,VE=n5;function XK(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var gn=e=>{const{present:t,children:n}=e,r=QK(t),o=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=He(r.ref,ZK(o));return typeof n=="function"||r.isPresent?w.cloneElement(o,{ref:i}):null};gn.displayName="Presence";function QK(e){const[t,n]=w.useState(),r=w.useRef({}),o=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[a,l]=XK(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=ym(r.current);i.current=a==="mounted"?c:"none"},[a]),Yn(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,p=ym(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Yn(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const m=ym(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(i.current=ym(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ym(e){return(e==null?void 0:e.animationName)||"none"}function ZK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var HE="Tabs",[JK,Y$e]=On(HE,[gd]),o5=gd(),[eX,WE]=JK(HE),i5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=yc(a),[d,h]=dr({prop:r,onChange:o,defaultProp:i});return f.jsx(eX,{scope:n,baseId:Nn(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l,children:f.jsx(_e.div,{dir:u,"data-orientation":s,...c,ref:t})})});i5.displayName=HE;var s5="TabsList",a5=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=WE(s5,n),s=o5(n);return f.jsx(BE,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:f.jsx(_e.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});a5.displayName=s5;var l5="TabsTrigger",c5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=WE(l5,n),a=o5(n),l=f5(s.baseId,r),c=h5(s.baseId,r),u=r===s.value;return f.jsx(VE,{asChild:!0,...a,focusable:!o,active:u,children:f.jsx(_e.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:he(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:he(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:he(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(r)})})})});c5.displayName=l5;var u5="TabsContent",d5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=WE(u5,n),l=f5(a.baseId,r),c=h5(a.baseId,r),u=r===a.value,d=w.useRef(u);return w.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),f.jsx(gn,{present:o||u,children:({present:h})=>f.jsx(_e.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&i})})});d5.displayName=u5;function f5(e,t){return`${e}-trigger-${t}`}function h5(e,t){return`${e}-content-${t}`}var tX=i5,p5=a5,m5=c5,g5=d5;const bd=tX,vc=w.forwardRef(({className:e,...t},n)=>f.jsx(p5,{ref:n,className:oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));vc.displayName=p5.displayName;const io=w.forwardRef(({className:e,...t},n)=>f.jsx(m5,{ref:n,className:oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));io.displayName=m5.displayName;const xi=w.forwardRef(({className:e,...t},n)=>f.jsx(g5,{ref:n,className:oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xi.displayName=g5.displayName;var b5={exports:{}},dp={},eC={exports:{}};(function(e,t){(function(n,r){r(t)})(ps,function(n){function r(K){return function(Q,ne,Z,ie,te,ce,de){return K(Q,ne,de)}}function o(K){return function(Q,ne,Z,ie){if(!Q||!ne||typeof Q!="object"||typeof ne!="object")return K(Q,ne,Z,ie);var te=ie.get(Q),ce=ie.get(ne);if(te&&ce)return te===ne&&ce===Q;ie.set(Q,ne),ie.set(ne,Q);var de=K(Q,ne,Z,ie);return ie.delete(Q),ie.delete(ne),de}}function i(K,Y){var Q={};for(var ne in K)Q[ne]=K[ne];for(var ne in Y)Q[ne]=Y[ne];return Q}function s(K){return K.constructor===Object||K.constructor==null}function a(K){return typeof K.then=="function"}function l(K,Y){return K===Y||K!==K&&Y!==Y}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",h="[object RegExp]",p="[object Map]",g="[object Number]",m="[object Object]",b="[object Set]",y="[object String]",v=Object.prototype.toString;function x(K){var Y=K.areArraysEqual,Q=K.areDatesEqual,ne=K.areMapsEqual,Z=K.areObjectsEqual,ie=K.areRegExpsEqual,te=K.areSetsEqual,ce=K.createIsNestedEqual,de=ce(ke);function ke(we,Ce,Pe){if(we===Ce)return!0;if(!we||!Ce||typeof we!="object"||typeof Ce!="object")return we!==we&&Ce!==Ce;if(s(we)&&s(Ce))return Z(we,Ce,de,Pe);var Ye=Array.isArray(we),_t=Array.isArray(Ce);if(Ye||_t)return Ye===_t&&Y(we,Ce,de,Pe);var ge=v.call(we);return ge!==v.call(Ce)?!1:ge===d?Q(we,Ce,de,Pe):ge===h?ie(we,Ce,de,Pe):ge===p?ne(we,Ce,de,Pe):ge===b?te(we,Ce,de,Pe):ge===m||ge===c?a(we)||a(Ce)?!1:Z(we,Ce,de,Pe):ge===u||ge===g||ge===y?l(we.valueOf(),Ce.valueOf()):!1}return ke}function C(K,Y,Q,ne){var Z=K.length;if(Y.length!==Z)return!1;for(;Z-- >0;)if(!Q(K[Z],Y[Z],Z,Z,K,Y,ne))return!1;return!0}var _=o(C);function S(K,Y){return l(K.valueOf(),Y.valueOf())}function E(K,Y,Q,ne){var Z=K.size===Y.size;if(!Z)return!1;if(!K.size)return!0;var ie={},te=0;return K.forEach(function(ce,de){if(Z){var ke=!1,we=0;Y.forEach(function(Ce,Pe){!ke&&!ie[we]&&(ke=Q(de,Pe,te,we,K,Y,ne)&&Q(ce,Ce,de,Pe,K,Y,ne))&&(ie[we]=!0),we++}),te++,Z=ke}}),Z}var k=o(E),N="_owner",M=Object.prototype.hasOwnProperty;function I(K,Y,Q,ne){var Z=Object.keys(K),ie=Z.length;if(Object.keys(Y).length!==ie)return!1;for(var te;ie-- >0;){if(te=Z[ie],te===N){var ce=!!K.$$typeof,de=!!Y.$$typeof;if((ce||de)&&ce!==de)return!1}if(!M.call(Y,te)||!Q(K[te],Y[te],te,te,K,Y,ne))return!1}return!0}var P=o(I);function j(K,Y){return K.source===Y.source&&K.flags===Y.flags}function F(K,Y,Q,ne){var Z=K.size===Y.size;if(!Z)return!1;if(!K.size)return!0;var ie={};return K.forEach(function(te,ce){if(Z){var de=!1,ke=0;Y.forEach(function(we,Ce){!de&&!ie[ke]&&(de=Q(te,we,ce,Ce,K,Y,ne))&&(ie[ke]=!0),ke++}),Z=de}}),Z}var T=o(F),O=Object.freeze({areArraysEqual:C,areDatesEqual:S,areMapsEqual:E,areObjectsEqual:I,areRegExpsEqual:j,areSetsEqual:F,createIsNestedEqual:r}),L=Object.freeze({areArraysEqual:_,areDatesEqual:S,areMapsEqual:k,areObjectsEqual:P,areRegExpsEqual:j,areSetsEqual:T,createIsNestedEqual:r}),B=x(O);function z(K,Y){return B(K,Y,void 0)}var A=x(i(O,{createIsNestedEqual:function(){return l}}));function W(K,Y){return A(K,Y,void 0)}var $=x(L);function D(K,Y){return $(K,Y,new WeakMap)}var H=x(i(L,{createIsNestedEqual:function(){return l}}));function V(K,Y){return H(K,Y,new WeakMap)}function G(K){return x(i(O,K(O)))}function q(K){var Y=x(i(L,K(L)));return function(Q,ne,Z){return Z===void 0&&(Z=new WeakMap),Y(Q,ne,Z)}}n.circularDeepEqual=D,n.circularShallowEqual=V,n.createCustomCircularEqual=q,n.createCustomEqual=G,n.deepEqual=z,n.sameValueZeroEqual=l,n.shallowEqual=W,Object.defineProperty(n,"__esModule",{value:!0})})})(eC,eC.exports);var UE=eC.exports;const qE=EE(gG);var lt={},nX=function(t,n,r){return t===n?!0:t.className===n.className&&r(t.style,n.style)&&t.width===n.width&&t.autoSize===n.autoSize&&t.cols===n.cols&&t.draggableCancel===n.draggableCancel&&t.draggableHandle===n.draggableHandle&&r(t.verticalCompact,n.verticalCompact)&&r(t.compactType,n.compactType)&&r(t.layout,n.layout)&&r(t.margin,n.margin)&&r(t.containerPadding,n.containerPadding)&&t.rowHeight===n.rowHeight&&t.maxRows===n.maxRows&&t.isBounded===n.isBounded&&t.isDraggable===n.isDraggable&&t.isResizable===n.isResizable&&t.allowOverlap===n.allowOverlap&&t.preventCollision===n.preventCollision&&t.useCSSTransforms===n.useCSSTransforms&&t.transformScale===n.transformScale&&t.isDroppable===n.isDroppable&&r(t.resizeHandles,n.resizeHandles)&&r(t.resizeHandle,n.resizeHandle)&&t.onLayoutChange===n.onLayoutChange&&t.onDragStart===n.onDragStart&&t.onDrag===n.onDrag&&t.onDragStop===n.onDragStop&&t.onResizeStart===n.onResizeStart&&t.onResize===n.onResize&&t.onResizeStop===n.onResizeStop&&t.onDrop===n.onDrop&&r(t.droppingItem,n.droppingItem)&&r(t.innerRef,n.innerRef)};Object.defineProperty(lt,"__esModule",{value:!0});lt.bottom=GE;lt.childrenEqual=sX;lt.cloneLayout=y5;lt.cloneLayoutItem=Al;lt.collides=H0;lt.compact=x5;lt.compactItem=w5;lt.compactType=vX;lt.correctBounds=C5;lt.fastPositionEqual=aX;lt.fastRGLPropsEqual=void 0;lt.getAllCollisions=S5;lt.getFirstCollision=gl;lt.getLayoutItem=YE;lt.getStatics=KE;lt.modifyLayout=v5;lt.moveElement=hf;lt.moveElementAwayFromCollision=nC;lt.noop=void 0;lt.perc=cX;lt.resizeItemInDirection=mX;lt.setTopLeft=bX;lt.setTransform=gX;lt.sortLayoutItems=t_;lt.sortLayoutItemsByColRow=N5;lt.sortLayoutItemsByRowCol=k5;lt.synchronizeLayoutWithChildren=yX;lt.validateLayout=M5;lt.withLayoutItem=iX;var uM=UE,ff=rX(R);function rX(e){return e&&e.__esModule?e:{default:e}}const oX=process.env.NODE_ENV==="production";function GE(e){let t=0,n;for(let r=0,o=e.length;r<o;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function y5(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Al(e[n]);return t}function v5(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function iX(e,t,n){let r=YE(e,t);return r?(r=n(Al(r)),e=v5(e,r),[e,r]):[e,null]}function Al(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function sX(e,t){return(0,uM.deepEqual)(ff.default.Children.map(e,n=>n==null?void 0:n.key),ff.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,uM.deepEqual)(ff.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),ff.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}lt.fastRGLPropsEqual=nX;function aX(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function H0(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function x5(e,t,n,r){const o=KE(e),i=t_(e,t),s=Array(e.length);for(let a=0,l=i.length;a<l;a++){let c=Al(i[a]);c.static||(c=w5(o,c,t,n,i,r),o.push(c)),s[e.indexOf(i[a])]=c,c.moved=!1}return s}const lX={x:"w",y:"h"};function tC(e,t,n,r){const o=lX[r];t[r]+=1;const i=e.map(s=>s.i).indexOf(t.i);for(let s=i+1;s<e.length;s++){const a=e[s];if(!a.static){if(a.y>t.y+t.h)break;H0(t,a)&&tC(e,a,n+t[o],r)}}t[r]=n}function w5(e,t,n,r,o,i){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(GE(e),t.y);t.y>0&&!gl(e,t);)t.y--;else if(a)for(;t.x>0&&!gl(e,t);)t.x--;let l;for(;(l=gl(e,t))&&!(n===null&&i);)if(a?tC(o,t,l.x+l.w,"x"):tC(o,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!gl(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function C5(e,t){const n=KE(e);for(let r=0,o=e.length;r<o;r++){const i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;gl(n,i);)i.y++}return e}function YE(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function gl(e,t){for(let n=0,r=e.length;n<r;n++)if(H0(e[n],t))return e[n]}function S5(e,t){return e.filter(n=>H0(n,t))}function KE(e){return e.filter(t=>t.static)}function hf(e,t,n,r,o,i,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;const c=t.x,u=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=t_(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const p=S5(d,t),g=p.length>0;if(g&&l)return y5(e);if(g&&i)return`${t.i}`,t.x=c,t.y=u,t.moved=!1,e;for(let m=0,b=p.length;m<b;m++){const y=p[m];`${t.i}${t.x}${t.y}${y.i}${y.x}${y.y}`,!y.moved&&(y.static?e=nC(e,y,t,o,s):e=nC(e,t,y,o,s))}return e}function nC(e,t,n,r,o,i){const s=o==="horizontal",a=o==="vertical",l=t.static;if(r){r=!1;const d={x:s?Math.max(t.x-n.w,0):n.x,y:a?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},h=gl(e,d),p=h&&h.y+h.h>t.y,g=h&&t.x+t.w>h.x;if(h){if(p&&a)return hf(e,n,void 0,t.y+1,r,l,o);if(p&&o==null)return t.y=n.y,n.y=n.y+n.h,e;if(g&&s)return hf(e,t,n.x,void 0,r,l,o)}else return`${n.i}${d.x}${d.y}`,hf(e,n,s?d.x:void 0,a?d.y:void 0,r,l,o)}const c=s?n.x+1:void 0,u=a?n.y+1:void 0;return c==null&&u==null?e:hf(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,o)}function cX(e){return e*100+"%"}const E5=(e,t,n,r)=>e+n>r?t:n,_5=(e,t,n)=>e<0?t:n,R5=e=>Math.max(0,e),XE=e=>Math.max(0,e),QE=(e,t,n)=>{let{left:r,height:o,width:i}=t;const s=e.top-(o-e.height);return{left:r,width:i,height:_5(s,e.height,o),top:XE(s)}},ZE=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{top:r,height:i,width:E5(e.left,e.width,s,n),left:R5(o)}},JE=(e,t,n)=>{let{top:r,height:o,width:i}=t;const s=e.left-(i-e.width);return{height:o,width:s<0?e.width:E5(e.left,e.width,i,n),top:XE(r),left:R5(s)}},e_=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{width:s,left:o,height:_5(r,e.height,i),top:XE(r)}},uX=function(){return QE(arguments.length<=0?void 0:arguments[0],ZE(...arguments))},dX=function(){return QE(arguments.length<=0?void 0:arguments[0],JE(...arguments))},fX=function(){return e_(arguments.length<=0?void 0:arguments[0],ZE(...arguments))},hX=function(){return e_(arguments.length<=0?void 0:arguments[0],JE(...arguments))},pX={n:QE,ne:uX,e:ZE,se:fX,s:e_,sw:hX,w:JE,nw:dX};function mX(e,t,n,r){const o=pX[e];return o?o(t,{...t,...n},r):n}function gX(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}}function bX(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}}function t_(e,t){return t==="horizontal"?N5(e):t==="vertical"?k5(e):e}function k5(e){return e.slice(0).sort(function(t,n){return t.y>n.y||t.y===n.y&&t.x>n.x?1:t.y===n.y&&t.x===n.x?0:-1})}function N5(e){return e.slice(0).sort(function(t,n){return t.x>n.x||t.x===n.x&&t.y>n.y?1:-1})}function yX(e,t,n,r,o){e=e||[];const i=[];ff.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=YE(e,String(a.key)),c=a.props["data-grid"];l&&c==null?i.push(Al(l)):c?(oX||M5([c],"ReactGridLayout.children"),i.push(Al({...c,i:a.key}))):i.push(Al({w:1,h:1,x:0,y:GE(i),i:String(a.key)}))});const s=C5(i,{cols:n});return o?s:x5(s,r,n)}function M5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const i=e[r];for(let s=0;s<n.length;s++){const a=n[s],l=i[a];if(typeof l!="number"||Number.isNaN(l))throw new Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${l} (${typeof l})`)}if(typeof i.i<"u"&&typeof i.i!="string")throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${i.i} (${typeof i.i})`)}}function vX(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}const xX=()=>{};lt.noop=xX;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.calcGridColWidth=W0;zi.calcGridItemPosition=wX;zi.calcGridItemWHPx=rC;zi.calcWH=SX;zi.calcXY=CX;zi.clamp=bl;function W0(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function rC(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function wX(e,t,n,r,o,i){const{margin:s,containerPadding:a,rowHeight:l}=e,c=W0(e),u={};return i&&i.resizing?(u.width=Math.round(i.resizing.width),u.height=Math.round(i.resizing.height)):(u.width=rC(r,c,s[0]),u.height=rC(o,l,s[1])),i&&i.dragging?(u.top=Math.round(i.dragging.top),u.left=Math.round(i.dragging.left)):i&&i.resizing&&typeof i.resizing.top=="number"&&typeof i.resizing.left=="number"?(u.top=Math.round(i.resizing.top),u.left=Math.round(i.resizing.left)):(u.top=Math.round((l+s[1])*n+a[1]),u.left=Math.round((c+s[0])*t+a[0])),u}function CX(e,t,n,r,o){const{margin:i,containerPadding:s,cols:a,rowHeight:l,maxRows:c}=e,u=W0(e);let d=Math.round((n-s[0])/(u+i[0])),h=Math.round((t-s[1])/(l+i[1]));return d=bl(d,0,a-r),h=bl(h,0,c-o),{x:d,y:h}}function SX(e,t,n,r,o,i){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=W0(e);let d=Math.round((t+s[0])/(u+s[0])),h=Math.round((n+s[1])/(c+s[1])),p=bl(d,0,l-r),g=bl(h,0,a-o);return["sw","w","nw"].indexOf(i)!==-1&&(p=bl(d,0,l)),["nw","n","ne"].indexOf(i)!==-1&&(g=bl(h,0,a)),{w:p,h:g}}function bl(e,t,n){return Math.max(Math.min(e,n),t)}var U0={},oC={exports:{}},vm={exports:{}},kt={};/** @license React v16.13.1
|
|
36
|
+
`,uO=["_forecast"],sb="dm",ih=[{locale:"en-US",currency:"USD",currencyName:"US Dollar"},{locale:"en-GB",currency:"GBP",currencyName:"British Pound"},{locale:"en-CA",currency:"CAD",currencyName:"Canadian Dollar"},{locale:"en-AU",currency:"AUD",currencyName:"Australian Dollar"},{locale:"en-IN",currency:"INR",currencyName:"Indian Rupee"},{locale:"ja-JP",currency:"JPY",currencyName:"Japanese Yen"},{locale:"de-DE",currency:"EUR",currencyName:"Germany (Eurozone)"},{locale:"fr-FR",currency:"EUR",currencyName:"France (Eurozone)"},{locale:"es-ES",currency:"EUR",currencyName:"Spain (Eurozone)"},{locale:"it-IT",currency:"EUR",currencyName:"Italy (Eurozone)"},{locale:"fi-FI",currency:"EUR",currencyName:"Finland (Eurozone)"},{locale:"nl-NL",currency:"EUR",currencyName:"Netherlands (Eurozone)"},{locale:"zh-CN",currency:"CNY",currencyName:"Chinese Yuan"},{locale:"ru-RU",currency:"RUB",currencyName:"Russian Ruble"},{locale:"pt-BR",currency:"BRL",currencyName:"Brazilian Real"},{locale:"ko-KR",currency:"KRW",currencyName:"South Korean Won"},{locale:"ar-SA",currency:"SAR",currencyName:"Saudi Riyal"},{locale:"sv-SE",currency:"SEK",currencyName:"Swedish Krona"},{locale:"no-NO",currency:"NOK",currencyName:"Norwegian Krone"},{locale:"da-DK",currency:"DKK",currencyName:"Danish Krone"},{locale:"pl-PL",currency:"PLN",currencyName:"Polish Zloty"},{locale:"tr-TR",currency:"TRY",currencyName:"Turkish Lira"},{locale:"he-IL",currency:"ILS",currencyName:"Israeli Shekel"},{locale:"th-TH",currency:"THB",currencyName:"Thai Baht"},{locale:"vi-VN",currency:"VND",currencyName:"Vietnamese Dong"},{locale:"id-ID",currency:"IDR",currencyName:"Indonesian Rupiah"},{locale:"mx-MX",currency:"MXN",currencyName:"Mexican Peso"},{locale:"za-ZA",currency:"ZAR",currencyName:"South African Rand"},{locale:"sg-SG",currency:"SGD",currencyName:"Singapore Dollar"},{locale:"hk-HK",currency:"HKD",currencyName:"Hong Kong Dollar"},{locale:"ch-CH",currency:"CHF",currencyName:"Swiss Franc"},{locale:"my-MY",currency:"MYR",currencyName:"Malaysian Ringgit"},{locale:"ph-PH",currency:"PHP",currencyName:"Philippine Peso"},{locale:"eg-EG",currency:"EGP",currencyName:"Egyptian Pound"},{locale:"nz-NZ",currency:"NZD",currencyName:"New Zealand Dollar"}],EY=[{label:"English",locales:[{code:"en-US",name:"US English"},{code:"en-GB",name:"British English"},{code:"en-AU",name:"Australian English"},{code:"en-CA",name:"Canadian English"}]},{label:"French",locales:[{code:"fr-FR",name:"France French"},{code:"fr-CA",name:"Canadian French"}]},{label:"Spanish",locales:[{code:"es-ES",name:"Spain Spanish"},{code:"es-MX",name:"Mexican Spanish"},{code:"es-419",name:"Latin American Spanish"}]},{label:"German",locales:[{code:"de-DE",name:"Germany German"},{code:"de-CH",name:"Swiss German"}]},{label:"Chinese",locales:[{code:"zh-CN",name:"Simplified Chinese (China)"},{code:"zh-TW",name:"Traditional Chinese (Taiwan)"},{code:"zh-HK",name:"Hong Kong Chinese"}]},{label:"Japanese",locales:[{code:"ja-JP",name:"Japanese"}]},{label:"Arabic",locales:[{code:"ar-EG",name:"Egypt Arabic"},{code:"ar-SA",name:"Saudi Arabia Arabic"}]},{label:"Russian",locales:[{code:"ru-RU",name:"Russian"}]},{label:"Portuguese",locales:[{code:"pt-PT",name:"Portugal Portuguese"},{code:"pt-BR",name:"Brazil Portuguese"}]},{label:"Indian Languages",locales:[{code:"hi-IN",name:"Hindi (India)"},{code:"ta-IN",name:"Tamil (India)"}]},{label:"Korean",locales:[{code:"ko-KR",name:"Korean"}]},{label:"Italian",locales:[{code:"it-IT",name:"Italian (Italy)"}]},{label:"Dutch",locales:[{code:"nl-NL",name:"Dutch (Netherlands)"}]},{label:"Swedish",locales:[{code:"sv-SE",name:"Swedish (Sweden)"}]},{label:"Turkish",locales:[{code:"tr-TR",name:"Turkish (Turkey)"}]},{label:"Hebrew",locales:[{code:"he-IL",name:"Hebrew (Israel)"}]},{label:"Thai",locales:[{code:"th-TH",name:"Thai (Thailand)"}]},{label:"Polish",locales:[{code:"pl-PL",name:"Polish (Poland)"}]},{label:"Greek",locales:[{code:"el-GR",name:"Greek (Greece)"}]},{label:"Norwegian",locales:[{code:"no-NO",name:"Norwegian (Norway)"}]}],ME=["lg","md","sm","xs","xxs"],ab={default:{dashboardPanel:"",dashboardTabsContainer:"",gridLayout:{className:""},chart:{font:{family:"Open Sans, Arial, sans-serif"},dataset:{backgroundColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]],borderColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]]},options:{interaction:{mode:"index"},plugins:{datalabels:{display:!1,color:M1},title:{display:!0},tooltip:{backgroundColor:"#fff",bodyColor:"#000",borderWidth:.25,titleColor:"#000",borderColor:"rgb(128,131,139)",cornerRadius:4,usePointStyle:!0,pointStyle:"rectRounded",boxPadding:4},legend:{position:"top",align:"center",maxHeight:0,labels:{useBorderRadius:!0,borderRadius:2}}},scales:{y:{grid:{display:!0},title:{display:!0,text:""},beginAtZero:!0,ticks:{precision:0}},x:{grid:{display:!0},title:{display:!0}}},layout:{padding:{top:-40}},borderRadius:2,responsive:!0,maintainAspectRatio:!1}}},dark:{chart:{dataset:{datalables:{color:M1},backgroundColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]],borderColor:[Mt.teal[500],Mt.teal[300],Mt.gray[700],Mt.gray[500],Mt.gray[300]]},options:{plugins:{tooltip:{backgroundColor:"#000",bodyColor:"#fff",borderWidth:.25,titleColor:"#fff",borderColor:"rgb(128,131,139)",cornerRadius:2,boxPadding:4}},datalabels:{display:!1},scales:{x:{grid:{display:!0,color:Mt.slate[800]}},y:{grid:{display:!0,color:Mt.slate[800]}}}}}}};function M1(e){var r,o,i,s,a,l;const t=(a=(s=(i=(o=(r=e==null?void 0:e.chart)==null?void 0:r.config)==null?void 0:o._config)==null?void 0:i.options)==null?void 0:s.plugins)==null?void 0:a.datalabels;let n=(l=e==null?void 0:e.dataset)==null?void 0:l.backgroundColor;return(t==null?void 0:t.align)==="end"&&(t==null?void 0:t.anchor)==="end"&&(n=sh()),(t==null?void 0:t.align)==="start"&&(t==null?void 0:t.anchor)==="start"&&(n=sh()),Hu(n)}function sh(){return re.getState().theme==="dark"?"#000000":"#FFFFFF"}function Hu(e){let t=0,n=0,r=0,o=0;const i=u=>{if(!u)return Mt.gray[500];const d=u.replace("#",""),h=parseInt(d.substring(0,2),16),p=parseInt(d.substring(2,4),16),g=parseInt(d.substring(4,6),16);t+=h,n+=p,r+=g,o++};Array.isArray(e)?e.forEach(u=>{i(u)}):i(e);const s=t/o,a=n/o,l=r/o;return(s*299+a*587+l*114)/1e3>=180?"black":"white"}const _Y=["text","nullable(string)","name","enum","varchar","nvarchar","nvarchar2","char","character","longtext","nchar","char varying","nchar varying","character varying","string"],RY=["number","integer","int","int64","bigint","smallint","tinyint","byteint","numeric","decimal","dec","double","real","double precision","float","float4","float8","float64"],kY=["date","datetime","time","timestamp","timestamp without time zone","timestamp_ns"],NY=["boolean"];function DE(e){return e.match(/[A-Z]/)?`"${e}"`:e}function L0(e){return _Y.includes(e.toLowerCase())||/varchar/i.test(e)}function cp(e){return RY.includes(e.toLowerCase())||/int|decimal|float|double/i.test(e)}function pc(e){return kY.includes(e.toLowerCase())||/date|time|timestamp/i.test(e)}function PE(e){return NY.includes(e.toLowerCase())||/boolean/i.test(e)}function MY(e,t,n,r,o,i){const{measures:s,dimensions:a}=e,l=s==null?void 0:s.map(h=>`${h.calc}(${h.name}) as ${h.calc}_${h.name.replace(/"/g,"")}`).join(", "),c=(a==null?void 0:a.join(", "))||"";let u="";const d=r?`${sb}.${r}`:AE({schemaName:t,tableName:n,connectionType:o,databaseName:i});if(l&&c)return u=`SELECT ${c}, COUNT(*) as count, ${l} FROM ${d} GROUP BY ${c} ORDER BY ${c} DESC LIMIT 100`,u;if(!l&&c)return u=`SELECT ${c}, COUNT(*) as count FROM ${d} GROUP BY ${c} ORDER BY ${c} DESC LIMIT 100`,u;if(l&&!c)return u=`SELECT ${l} FROM ${d} LIMIT 100`,u}function DY(e,t,n="AVG"){var i,s,a,l;let r={};const o=DE(e.column_name);return L0(e.data_type)&&(((i=t.dimensions)==null?void 0:i.includes(o))?r={...t,dimensions:(s=t.dimensions)==null?void 0:s.filter(u=>u!==o)}:r={...t,dimensions:[...t.dimensions||[],o]}),cp(e.data_type)&&(((a=t.measures)==null?void 0:a.some(u=>u.name===o&&u.calc===n))?r={...t,measures:(l=t.measures)==null?void 0:l.filter(u=>!(u.name===o&&u.calc===n))}:r={...t,measures:[...t.measures||[],{name:o,calc:n||"SUM"}]}),r}function hu(e){return L0(e.dataType)?"string":cp(e.dataType)?"number":pc(e.dataType)?"date":PE(e.dataType)?"boolean":"string"}function PY(e){let t;const n=e.data_type.toLowerCase();return L0(n)?t="T":cp(n)?t="#":pc(n)?t="D":PE(n)?t="B":t="?",t}function AY(e,t){const{dimensions:n,measures:r}=t,o=n==null?void 0:n.includes(e.column_name),i=r==null?void 0:r.some(s=>s.name===e.column_name);return o||i}function dO(e){return e?e!=null&&e.startsWith(`${sb}.`)?e:`${sb}.${e}`:""}function fO({schemaName:e,tableName:t,modelName:n,connectionType:r,databaseName:o}){let i=AE({schemaName:e,tableName:t,connectionType:r,databaseName:o});n&&(i=dO(n));let s=i;return(l=>/[A-Z]/.test(l))(t)&&(s=s.split(".").map(c=>`"${c}"`).join(".")),s}function AE({schemaName:e,tableName:t,connectionType:n,databaseName:r}){return t==="api"||e===DE("NA")||n==="S3"||n==="API"?t:n==="S3Tables"?`${r}.${e}.${t}`:e?`${e}.${t}`:`${t}`}const IY=e=>{const t=new Date(e);return!isNaN(t.getTime())},TY=e=>!isNaN(Number(e))&&!isNaN(parseFloat(e)),z0=e=>{let t;return typeof e=="number"?t="number":typeof e=="string"?IY(e)?t="date":TY(e)?t="number":t="string":typeof e=="boolean"?t="boolean":e instanceof Date?t="date":t="unknown",t};function jY({get:e,dataPoint:t,card:n}){var h;const{addOrUpdateFilterValue:r,addFilteringCard:o,removeFilterValues:i,replaceFilterValue:s,removeFilteringCard:a}=e().actions,l=e().filteringCards,{columnName:c,columnValue:u}=t,d={filterId:n.id,connectionId:n==null?void 0:n.connectionId,tableName:n.lastSelectedTable,name:c,expression:(h=n.preferences)==null?void 0:h.filterOnClickField,valueType:z0(u),operation:"=",values:[u]};if(l!=null&&l.find(p=>p.id===n.id)){const p=n.id;if(u==null){a(n),i(p);return}else s(d)}o(n),r(d)}function XN({id:e,layouts:t,initialHeight:n,y:r,x:o,w:i,minH:s}){const a={i:e,x:o??0,y:r??1/0,w:i||20,h:n||35,minW:6,minH:s||10},l=t?{...t}:{};return ME.forEach(c=>{l[c]||(l[c]=[]);const u=l[c].reduce((d,h)=>Math.max(d,h.y+h.h),0);a.y=a.y===1/0?u:a.y,l[c].push({...a})}),l}function QN(e,t){if(!t)return;const n={...t};return ME.forEach(r=>{n[r]&&(n[r]=n[r].filter(o=>o.i!==e))}),n}function hO(e){const t=re.getState().dashboard.globalCacheConfig,{card:n,filter:r}=e;return t}const re=Ps()(lp((e,t)=>({isSessionExpired:!1,currentBreakpoint:"lg",dashboard:{id:"",style:ab},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!1,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],isDashboardPanelOpen:!1,actions:{setInitStore:()=>{e(n=>{n.isSessionExpired=!1,n.currentBreakpoint="lg",n.dashboard={id:"",style:ab},n.showContext=!1,n.selectedSheetId=null,n.selectedCardId=null,n.selectedFrameId=null,n.selectedCard=null,n.showFilters=!1,n.isDashboardEditing=!1,n.isVisualEditing=!1,n.showDashboardJSON=!1,n.filteringCards=[],n.selectedLensId=void 0,n.filterValues=void 0})},setAiContext:n=>{e(r=>{r.dashboard.aiContext=n})},setHandleOpenAssistantProfile:n=>{e(r=>{r.handleOpenAssistantProfile=n})},setFilterMode:(n,r)=>{const o=r==="exclude"?"not in":"in";e(i=>{var a,l,c;const s=(a=i.dashboard.filters)==null?void 0:a.find(u=>u.id===n);s&&(s.operation=o,i.dashboard.filters=(l=i.dashboard.filters)==null?void 0:l.map(u=>u.id===n?s:u),i.filterValues&&i.filterValues.length>0&&(i.filterValues=(c=i.filterValues)==null?void 0:c.map(u=>u.filterId===n?{...u,operation:o}:u)))})},updateEmailSettings:n=>{e(r=>{r.dashboard.emailSettings=n})},setDefaultFilterValues:n=>{e(r=>{r.dashboard.defaultFilterValues=n})},setIsDownloadingPdf:n=>{e(r=>{r.isDownloadingPdf=n})},setGlobalCacheConfig:n=>{e(r=>{r.dashboard.globalCacheConfig=n})},setLenses:n=>{e(r=>{r.lenses=n})},setSelectedLensId:n=>{e(r=>{r.selectedLensId=n})},deleteSheet:n=>{e(r=>{var i,s,a,l,c,u,d,h;const o=(i=r.dashboard.sheets)==null?void 0:i.findIndex(p=>p.id===n);if(o!==void 0&&o>-1){(s=r.dashboard.sheets)==null||s.splice(o,1);const p=(a=r.dashboard.filters)==null?void 0:a.filter(m=>m.sheetId===n),g=(l=r.filterValues)==null?void 0:l.filter(m=>p==null?void 0:p.some(b=>b.id===m.filterId));r.filterValues=(c=r.filterValues)==null?void 0:c.filter(m=>!(g!=null&&g.some(b=>b.filterId===m.filterId))),r.dashboard.filters=(u=r.dashboard.filters)==null?void 0:u.filter(m=>m.sheetId!==n),r.selectedSheetId=(h=(d=r.dashboard.sheets)==null?void 0:d[0])==null?void 0:h.id}})},addSheet:n=>{e(r=>{r.dashboard.sheets||(r.dashboard.sheets=[]);const o=r.dashboard.filters;let i={};o==null||o.forEach(a=>{ME.forEach(l=>{i!=null&&i[l]||(i={...i,[l]:[]});const c={i:a.id,x:0,y:0,w:10,h:8};i[l].push(c)})});const s={...n,layouts:i};r.dashboard.sheets.push(s)})},setGlobalStyle:n=>{e(r=>{r.dashboard.globalStyle=n})},setAIScopeTables:n=>{e(r=>{r.dashboard.aiScopeTables=n})},addToAIScope:n=>{e(r=>{const{connectionId:o,connectionType:i,databaseName:s,schemaName:a,tableName:l,datamodelName:c,datamodelId:u}=n,d={connectionId:o||"",connectionType:i||"",databaseName:s||"",schemaName:a||"",tableName:l||"",datamodelName:c||"",datamodelId:u||""};let p=[...r.dashboard.aiScopeTables||[],d];p=p.filter((g,m,b)=>b.findIndex(y=>y.tableName===g.tableName&&y.datamodelName===g.datamodelName)===m),r.dashboard.aiScopeTables=p})},removeFromAIScope:n=>{e(r=>{const{connectionId:o,tableName:i,datamodelName:s}=n,a=r.dashboard.aiScopeTables||[];if(s){const l=a.filter(c=>!(c.datamodelName===s&&c.connectionId===o));r.dashboard.aiScopeTables=l}else if(i){const l=a.filter(c=>!(c.tableName===i&&c.connectionId===o));r.dashboard.aiScopeTables=l}})},setIsSessionExpired:n=>{e(()=>({isSessionExpired:n}))},setCardPython:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===o.selectedSheetId);i&&((l=i==null?void 0:i.frames)==null||l.forEach(c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===n);u&&(u.python=r)}))})},addBaseQuery:n=>{e(r=>{var o;r.dashboard.baseQueries||(r.dashboard.baseQueries=[]),(o=r.dashboard.baseQueries)==null||o.push(n)})},removeBaseQuery:n=>{e(r=>{var i,s;const o=(i=r.dashboard.baseQueries)==null?void 0:i.findIndex(a=>a.id===n);o!=null&&o>-1&&((s=r.dashboard.baseQueries)==null||s.splice(o,1))})},setBaseQueries:n=>{e(r=>{r.dashboard.baseQueries=n})},setCurrentBreakpoint:n=>{e(()=>({currentBreakpoint:n}))},setFilteringCards:n=>{e(()=>({filteringCards:n}))},addFilteringCard:n=>{e(r=>{var o;(o=r.filteringCards)==null||o.push(n)})},removeFilteringCard:n=>{e(r=>{var i,s;const o=(i=r.filteringCards)==null?void 0:i.findIndex(a=>a.id===n.id);o!==void 0&&o>-1&&((s=r.filteringCards)==null||s.splice(o,1))})},setCustomCards:n=>{e(r=>{r.dashboard.customCards=n})},setAuthToken:n=>{e(()=>({authToken:n}))},setThemeStyle:n=>{e(()=>({themeStyle:n}))},setDashboard:n=>e({dashboard:n}),setDashboardWithFilterValues:(n,r)=>{e(o=>{o.dashboard=n,o.filterValues=r})},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setSheetTitle:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.title=r)})},setCardTitle:(n,r,o)=>{e(i=>{var a,l,c;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(u=>u.id===n);s&&((c=s==null?void 0:s.frames)==null||c.forEach(u=>{var h;const d=(h=u.cards)==null?void 0:h.find(p=>p.id===r);d&&(d.title=o)}))})},setCardInfo:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===o.selectedSheetId);i&&((l=i==null?void 0:i.frames)==null||l.forEach(c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===n);u&&(u.info=r)}))})},setCardDescription:(n,r,o)=>{e(i=>{var a,l,c;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(u=>u.id===n);s&&((c=s==null?void 0:s.frames)==null||c.forEach(u=>{var h;const d=(h=u.cards)==null?void 0:h.find(p=>p.id===r);d&&(d.description=o)}))})},setCardSql:(n,r,o)=>{e(i=>{var a,l,c,u;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){const d=(c=s.cards)==null?void 0:c.find(h=>h.id===r);d&&(d.sql=o,(u=i.onUpdateCard)==null||u.call(i,d,n))}})},setSheetLayout:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.layout=r)})},setSheetLayouts:(n,r)=>{e(o=>{var s,a;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);i&&(i.layouts=r)})},setShowContext:n=>{e(()=>({showContext:n}))},setShowFilters:n=>{e(()=>({showFilters:n}))},setFilterValues:n=>{e(()=>({filterValues:n}))},addOrUpdateFilterValue:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.findIndex(i=>i.filterId===n.filterId);o>-1?r.filterValues.splice(o,1,n):r.filterValues.push(n)}else r.filterValues=[n]})},addOrUpdateFilterValues:n=>{e(r=>{r.filterValues?n.forEach(o=>{var s,a,l,c;const i=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(u=>u.filterId===o.filterId);if(o.values.length===0){r.filterValues=(a=r.filterValues)==null?void 0:a.filter(u=>u.filterId!==o.filterId);return}i!==void 0&&i>-1?(l=r.filterValues)==null||l.splice(i,1,o):(c=r.filterValues)==null||c.push(o)}):r.filterValues=n})},removeFilterValues:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.filter(i=>i.filterId!==n&&!i.filterId.startsWith(n));r.filterValues=o}})},replaceFilterValue:n=>{e(r=>{if(r.filterValues){const o=r.filterValues.findIndex(i=>i.filterId===n.filterId);o>-1&&r.filterValues.splice(o,1,n)}})},addFilter:n=>{e(r=>{var i,s;r.dashboard.filters?(i=r.dashboard.filters)==null||i.push(n):r.dashboard.filters=[n],(s=r.dashboard.sheets)==null||s.find(a=>a.id===r.selectedSheetId);const o=r.dashboard.sheets;o==null||o.forEach(a=>{XN({id:n.id,layouts:a.layouts,y:0,initialHeight:8,minH:7,w:10})})})},removeFilter:n=>{e(r=>{var o,i,s;if(r.dashboard.filters){const a=(o=r.dashboard.filters)==null?void 0:o.findIndex(l=>l.id===n);if(a>-1){(i=r.dashboard.filters)==null||i.splice(a,1),(s=r.dashboard.sheets)==null||s.find(c=>c.id===r.selectedSheetId);const l=r.dashboard.sheets;l==null||l.forEach(c=>{const u=QN(n,c.layouts);c.layouts=u})}}})},updateCurrentDashboardCard:n=>{e(r=>{var a,l,c,u,d;const o=(l=(a=r.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===r.selectedSheetId),i=(c=o==null?void 0:o.frames)==null?void 0:c.find(h=>h.id===r.selectedFrameId),s=(u=i==null?void 0:i.cards)==null?void 0:u.findIndex(h=>h.id===n.id);typeof s=="number"&&s>=0&&((d=i==null?void 0:i.cards)==null||d.splice(s,1,n))})},updateFrameCard:(n,r,o)=>{e(i=>{var l,c,u,d,h;const s=(c=(l=i.dashboard)==null?void 0:l.sheets)==null?void 0:c.find(p=>p.id===n);if(!s)return;const a=(u=s==null?void 0:s.frames)==null?void 0:u.find(p=>p.id===r);if(a){const p=(d=a.cards)==null?void 0:d.findIndex(g=>g.id===o.id);p>-1&&((h=a.cards)==null||h.splice(p,1,o))}})},updateFilter:n=>{e(r=>{var o,i;if(r.dashboard.filters){const s=(o=r.dashboard.filters)==null?void 0:o.findIndex(a=>a.id===n.id);s>-1&&((i=r.dashboard.filters)==null||i.splice(s,1,n))}})},updateFilterId:(n,r)=>{e(o=>{var a,l;const i=(a=o.dashboard.filters)==null?void 0:a.find(c=>c.id===n),s=(l=o.dashboard.filters)==null?void 0:l.some(c=>c.id===r);i&&!s&&(i.id=r)})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(n,r,o)=>{e(i=>{var a,l,c,u;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){s.frames||(s.frames=[]),(c=s.frames)==null||c.push(r);let d=1/0;const h=0;o==="start"&&(d=0);const p=XN({id:r.id,layouts:s.layouts,minH:10,x:h,y:d});s.layouts=p,(u=i.onAddFrame)==null||u.call(i,r,n)}})},removeFrame:(n,r)=>{e(o=>{var s,a,l,c,u;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(d=>d.id===n);if(i){const d=(l=i.frames)==null?void 0:l.findIndex(h=>h.id===r);console.log(d),typeof d=="number"&&d>-1&&((c=i.frames)==null||c.splice(d,1),(u=i.layout)==null||u.splice(d,1),QN(r,i.layouts))}})},updateFrame:(n,r)=>{e(o=>{var a,l,c,u,d;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=i==null?void 0:i.frames)==null?void 0:c.findIndex(h=>h.id===r.id);i&&((u=i.frames)==null||u.splice(s,1,r)),(d=o.onAcceptChanges)==null||d.call(o,r,o.dashboard)})},updateCard:(n,r)=>{e(o=>{var a,l,c,u,d;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=i==null?void 0:i.cards)==null?void 0:c.findIndex(h=>h.id===r.id);i&&((u=i.cards)==null||u.splice(s,1,r),(d=o.onUpdateCard)==null||d.call(o,r,n))})},removeCard:(n,r)=>{e(o=>{var a,l,c,u,d,h;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=i==null?void 0:i.cards)==null?void 0:c.findIndex(p=>p.id===r.id);i&&((u=i.cards)==null||u.splice(s,1),(d=i.layout)==null||d.splice(s,1),(h=o.onRemoveCard)==null||h.call(o,r,n))})},setStyle:n=>{e(r=>{r.dashboard&&(r.dashboard.style=n)})},setSelectedCardId:(n,r)=>{e(o=>{var s,a,l;const i=(a=(s=o.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===n);i&&(((l=i.cards)==null?void 0:l.find(u=>u.id===r))?o.selectedCardId=r:o.selectedCardId=null)})},setSelectedFrameId:n=>{e(r=>{var i,s;((s=(i=r.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(a=>a.id===r.selectedSheetId))&&(r.selectedFrameId=n)})},setSelectedSheetId:n=>{e(r=>{var i,s;((s=(i=r.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(a=>a.id===n))&&(r.selectedSheetId=n)})},setOnSaveFunction:n=>{e(()=>({onSaveFunction:n}))},setOnAddCard:n=>{e(()=>({onAddCard:n}))},setOnAcceptChanges:n=>{e(()=>({onAcceptChanges:n}))},setOnUpdateCard:n=>{e(()=>({onUpdateCard:n}))},setOnRemoveCard:n=>{e(()=>({onRemoveCard:n}))},setOnEvent:n=>{e(()=>({onEvent:n}))},getDashboard:()=>t().dashboard,getSelectedSheet:()=>{var n,r;return(r=(n=t().dashboard)==null?void 0:n.sheets)==null?void 0:r.find(o=>o.id===t().selectedSheetId)},getCardFrame:n=>{var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((i=a[l].cards)==null?void 0:i.find(u=>u.id===n))return a[l]}}},getSelectedFrame:()=>{var r,o,i;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(s=>s.id===t().selectedSheetId);return(i=n==null?void 0:n.frames)==null?void 0:i.find(s=>s.id===t().selectedFrameId)},getCard:n=>{var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a)for(let l=0;l<a.length;l++){const c=(i=a[l].cards)==null?void 0:i.find(u=>u.id===n);if(c)return c}}},getSelectedSheetLayout:()=>{var r,o;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(i=>i.id===t().selectedSheetId);return n==null?void 0:n.layout},getSelectedSheetLayouts:()=>{var r,o;const n=(o=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:o.find(i=>i.id===t().selectedSheetId);return n==null?void 0:n.layouts},getStyle:()=>{var n;return(n=t().dashboard)==null?void 0:n.style},getCardSheet(n){var o,i;const r=(o=t().dashboard)==null?void 0:o.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((i=a[l].cards)==null?void 0:i.find(u=>u.id===n))return r[s]}}},handleDataPointClickAction:(n,r)=>{jY({card:n,dataPoint:r,get:t})},setIsDashboardPanelOpen:n=>{e(()=>({isDashboardPanelOpen:n}))}}}))),pO=()=>re(t=>{var i,s,a,l,c;const n=(s=(i=t.dashboard)==null?void 0:i.sheets)==null?void 0:s.find(u=>u.id===t.selectedSheetId),r=(a=n==null?void 0:n.frames)==null?void 0:a.find(u=>u.id===t.selectedFrameId);return((l=r==null?void 0:r.cards)==null?void 0:l.find(u=>u.id===(r==null?void 0:r.activeCardId)))||((c=r==null?void 0:r.cards)==null?void 0:c[0])}),mO=()=>{var n;const e=re(r=>{var o,i;return(i=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:i.find(s=>s.id===r.selectedSheetId)});return(((n=e==null?void 0:e.frames)==null?void 0:n.map(r=>{var o;return(o=r.cards)==null?void 0:o.find(i=>i.id===r.activeCardId)}))||[]).filter(r=>r!==void 0)},gO=()=>{var t,n,r;const e=pO();return{metricFields:((t=e==null?void 0:e.config)==null?void 0:t.metricColumns)||[],groupByFields:((n=e==null?void 0:e.config)==null?void 0:n.groupByColumns)||[],pivotByFields:((r=e==null?void 0:e.config)==null?void 0:r.pivotByColumns)||[]}},Gt=()=>re(e=>e.actions);async function OY(e,t){const n=t.slice(0,16),r=new TextEncoder,o=await window.crypto.subtle.importKey("raw",r.encode(n),{name:"PBKDF2"},!1,["deriveKey"]),i=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:r.encode(n),iterations:1e5,hash:"SHA-256"},o,{name:"AES-GCM",length:256},!1,["encrypt"]),s=window.crypto.getRandomValues(new Uint8Array(12)),a=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,r.encode(e)),l=new Uint8Array(s.length+a.byteLength);return l.set(s,0),l.set(new Uint8Array(a),s.length),{payload:btoa(String.fromCharCode(...l))}}async function bO(e,t){const n=t.slice(0,16),r=new TextEncoder,o=new TextDecoder,i=await window.crypto.subtle.importKey("raw",r.encode(n),{name:"PBKDF2"},!1,["deriveKey"]),s=await window.crypto.subtle.deriveKey({name:"PBKDF2",salt:r.encode(n),iterations:1e5,hash:"SHA-256"},i,{name:"AES-GCM",length:256},!1,["decrypt"]),a=Uint8Array.from(atob(e),h=>h.charCodeAt(0)),l=a.slice(0,12),c=a.slice(a.length-16),u=a.slice(12,a.length-16),d=new Uint8Array(u.length+c.length);d.set(u),d.set(c,u.length);try{const h=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:l},s,d);return{decryptedData:o.decode(h)}}catch(h){throw new Error(`Decryption failed: ${h}`)}}function oe(...e){return YG(ql(e))}const FY=e=>Object.keys(e).length===0;async function Tn(e,t,n={}){try{const r=new URLSearchParams(n).toString(),o=`${e}?${r}`,i=await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});if(!i.ok){const a=await i.json();throw new Error((a==null?void 0:a.error)||`HTTP error! status: ${i.status}`)}return await i.json()}catch(r){throw console.error("Error during fetch:",r),r}}async function yO(e,t,n={}){try{const r=JSON.stringify(n),o=await OY(r,t),i=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(o)});if(!i.ok)return i.json().then(a=>{throw console.log(a.detail||"Unknown error occurred"),new Error((a==null?void 0:a.error)||`HTTP error! status: ${i.status}`)});const s=await i.json();if(s.payload){const a=await bO(s.payload,t);return JSON.parse(a.decryptedData)}return s}catch(r){throw console.error("Error during fetch:",r),r}}async function up(e,t,n={},r="POST"){try{const o=await fetch(e,{method:r,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(n)});return o.ok?await o.json():o.json().then(s=>{throw console.log(s.detail||"Unknown error occurred"),new Error((s==null?void 0:s.error)||`HTTP error! status: ${o.status}`)})}catch(o){throw console.error("Error during fetch:",o),o}}function $Y(e){if(!e)return{tenantId:"",endUserId:""};const t=ap(e);return{tenantId:t==null?void 0:t.tenantId,endUserId:t==null?void 0:t.endUserId}}function LY(e){return e?ap(e).assistantProfileId:void 0}function zY(e){if(!e)return;const t=ap(e);if(t.params&&t.params.currencyFormat)return t.params.currencyFormat}function vO(e){return e?ap(e).params:void 0}function IE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Di(e){return e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substring(1).toLowerCase())}function xO(e){return e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase())}const Ar="focus:ring-1 focus:ring-offset-0 focus-visible:ring-1 focus-visible:ring-offset-0",xs="focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 focus:ring-0 focus:ring-ring focus:ring-offset-0";async function BY(){var o,i;const e=(i=(o=re.getState())==null?void 0:o.authToken)==null?void 0:i.accessToken;if(!e)return;const n=await fetch("https://semaphor.cloud/api/v1/invalidate-token",{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw new Error("Failed to invalidate token");const r=await n.json();return console.log("invalidateToken",r),r}async function VY(e,t={}){if(!e)return null;let n="https://semaphor.cloud/api/v1/dashboard";const r=Object.fromEntries(Object.entries(t).filter(([a,l])=>l!==void 0)),o=new URLSearchParams(r).toString();o&&(n+=`?${o}`);let s=await(await fetch(n,{headers:{Authorization:`Bearer ${e}`}})).json();if("payload"in s){const a=await bO(atob(s.payload),e);s=JSON.parse(a.decryptedData)}return s}async function HY(e){return e?await(await fetch("https://semaphor.cloud/api/v1/plugins",{headers:{Authorization:`Bearer ${e}`}})).json():null}const wO=e=>/boolean/i.test(e)?"boolean":/date|timestamp/i.test(e)?"date":/int|decimal|float|double|num/i.test(e)?"number":/json/i.test(e)?"json":/geo|geography|geometry/i.test(e)?"geo":"string";var lb={exports:{}};lb.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=800,i=16,s=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",y="[object Null]",v="[object Object]",x="[object Proxy]",C="[object RegExp]",_="[object Set]",S="[object String]",E="[object Undefined]",k="[object WeakMap]",N="[object ArrayBuffer]",M="[object DataView]",I="[object Float32Array]",P="[object Float64Array]",j="[object Int8Array]",F="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",L="[object Uint8ClampedArray]",B="[object Uint16Array]",z="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,$=/^(?:0|[1-9]\d*)$/,D={};D[I]=D[P]=D[j]=D[F]=D[T]=D[O]=D[L]=D[B]=D[z]=!0,D[a]=D[l]=D[N]=D[u]=D[M]=D[d]=D[h]=D[p]=D[m]=D[b]=D[v]=D[C]=D[_]=D[S]=D[k]=!1;var H=typeof ps=="object"&&ps&&ps.Object===Object&&ps,V=typeof self=="object"&&self&&self.Object===Object&&self,G=H||V||Function("return this")(),q=t&&!t.nodeType&&t,K=q&&!0&&e&&!e.nodeType&&e,Y=K&&K.exports===q,Q=Y&&H.process,ne=function(){try{var U=K&&K.require&&K.require("util").types;return U||Q&&Q.binding&&Q.binding("util")}catch{}}(),Z=ne&&ne.isTypedArray;function ie(U,J,se){switch(se.length){case 0:return U.call(J);case 1:return U.call(J,se[0]);case 2:return U.call(J,se[0],se[1]);case 3:return U.call(J,se[0],se[1],se[2])}return U.apply(J,se)}function te(U,J){for(var se=-1,Me=Array(U);++se<U;)Me[se]=J(se);return Me}function ce(U){return function(J){return U(J)}}function de(U,J){return U==null?void 0:U[J]}function ke(U,J){return function(se){return U(J(se))}}var we=Array.prototype,Ce=Function.prototype,Pe=Object.prototype,Ye=G["__core-js_shared__"],_t=Ce.toString,ge=Pe.hasOwnProperty,je=function(){var U=/[^.]+$/.exec(Ye&&Ye.keys&&Ye.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""}(),Ae=Pe.toString,ee=_t.call(Object),le=RegExp("^"+_t.call(ge).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=Y?G.Buffer:void 0,De=G.Symbol,Ue=G.Uint8Array;Re&&Re.allocUnsafe;var jt=ke(Object.getPrototypeOf,Object),Pn=Object.create,vn=Pe.propertyIsEnumerable,ye=we.splice,xn=De?De.toStringTag:void 0,Ot=function(){try{var U=Fv(Object,"defineProperty");return U({},"",{}),U}catch{}}(),go=Re?Re.isBuffer:void 0,Bn=Math.max,Tc=Date.now,Ka=Fv(G,"Map"),Ki=Fv(Object,"create"),cn=function(){function U(){}return function(J){if(!Za(J))return{};if(Pn)return Pn(J);U.prototype=J;var se=new U;return U.prototype=void 0,se}}();function Rt(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function Vn(){this.__data__=Ki?Ki(null):{},this.size=0}function Ie(U){var J=this.has(U)&&delete this.__data__[U];return this.size-=J?1:0,J}function qe(U){var J=this.__data__;if(Ki){var se=J[U];return se===r?void 0:se}return ge.call(J,U)?J[U]:void 0}function rt(U){var J=this.__data__;return Ki?J[U]!==void 0:ge.call(J,U)}function nn(U,J){var se=this.__data__;return this.size+=this.has(U)?0:1,se[U]=Ki&&J===void 0?r:J,this}Rt.prototype.clear=Vn,Rt.prototype.delete=Ie,Rt.prototype.get=qe,Rt.prototype.has=rt,Rt.prototype.set=nn;function Ft(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function $t(){this.__data__=[],this.size=0}function Fn(U){var J=this.__data__,se=dm(J,U);if(se<0)return!1;var Me=J.length-1;return se==Me?J.pop():ye.call(J,se,1),--this.size,!0}function rn(U){var J=this.__data__,se=dm(J,U);return se<0?void 0:J[se][1]}function wn(U){return dm(this.__data__,U)>-1}function Xa(U,J){var se=this.__data__,Me=dm(se,U);return Me<0?(++this.size,se.push([U,J])):se[Me][1]=J,this}Ft.prototype.clear=$t,Ft.prototype.delete=Fn,Ft.prototype.get=rn,Ft.prototype.has=wn,Ft.prototype.set=Xa;function bo(U){var J=-1,se=U==null?0:U.length;for(this.clear();++J<se;){var Me=U[J];this.set(Me[0],Me[1])}}function li(){this.size=0,this.__data__={hash:new Rt,map:new(Ka||Ft),string:new Rt}}function Qa(U){var J=hm(this,U).delete(U);return this.size-=J?1:0,J}function Vd(U){return hm(this,U).get(U)}function Nq(U){return hm(this,U).has(U)}function Mq(U,J){var se=hm(this,U),Me=se.size;return se.set(U,J),this.size+=se.size==Me?0:1,this}bo.prototype.clear=li,bo.prototype.delete=Qa,bo.prototype.get=Vd,bo.prototype.has=Nq,bo.prototype.set=Mq;function jc(U){var J=this.__data__=new Ft(U);this.size=J.size}function Dq(){this.__data__=new Ft,this.size=0}function Pq(U){var J=this.__data__,se=J.delete(U);return this.size=J.size,se}function Aq(U){return this.__data__.get(U)}function Iq(U){return this.__data__.has(U)}function Tq(U,J){var se=this.__data__;if(se instanceof Ft){var Me=se.__data__;if(!Ka||Me.length<n-1)return Me.push([U,J]),this.size=++se.size,this;se=this.__data__=new bo(Me)}return se.set(U,J),this.size=se.size,this}jc.prototype.clear=Dq,jc.prototype.delete=Pq,jc.prototype.get=Aq,jc.prototype.has=Iq,jc.prototype.set=Tq;function jq(U,J){var se=zv(U),Me=!se&&Lv(U),mt=!se&&!Me&&kN(U),Vt=!se&&!Me&&!mt&&MN(U),on=se||Me||mt||Vt,xt=on?te(U.length,String):[],sn=xt.length;for(var Fo in U)on&&(Fo=="length"||mt&&(Fo=="offset"||Fo=="parent")||Vt&&(Fo=="buffer"||Fo=="byteLength"||Fo=="byteOffset")||_N(Fo,sn))||xt.push(Fo);return xt}function jv(U,J,se){(se!==void 0&&!pm(U[J],se)||se===void 0&&!(J in U))&&Ov(U,J,se)}function Oq(U,J,se){var Me=U[J];(!(ge.call(U,J)&&pm(Me,se))||se===void 0&&!(J in U))&&Ov(U,J,se)}function dm(U,J){for(var se=U.length;se--;)if(pm(U[se][0],J))return se;return-1}function Ov(U,J,se){J=="__proto__"&&Ot?Ot(U,J,{configurable:!0,enumerable:!0,value:se,writable:!0}):U[J]=se}var Fq=Xq();function fm(U){return U==null?U===void 0?E:y:xn&&xn in Object(U)?Qq(U):rG(U)}function SN(U){return Hd(U)&&fm(U)==a}function $q(U){if(!Za(U)||tG(U))return!1;var J=Vv(U)?le:W;return J.test(aG(U))}function Lq(U){return Hd(U)&&NN(U.length)&&!!D[fm(U)]}function zq(U){if(!Za(U))return nG(U);var J=RN(U),se=[];for(var Me in U)Me=="constructor"&&(J||!ge.call(U,Me))||se.push(Me);return se}function EN(U,J,se,Me,mt){U!==J&&Fq(J,function(Vt,on){if(mt||(mt=new jc),Za(Vt))Bq(U,J,on,se,EN,Me,mt);else{var xt=Me?Me($v(U,on),Vt,on+"",U,J,mt):void 0;xt===void 0&&(xt=Vt),jv(U,on,xt)}},DN)}function Bq(U,J,se,Me,mt,Vt,on){var xt=$v(U,se),sn=$v(J,se),Fo=on.get(sn);if(Fo){jv(U,se,Fo);return}var Qr=Vt?Vt(xt,sn,se+"",U,J,on):void 0,Wd=Qr===void 0;if(Wd){var Hv=zv(sn),Wv=!Hv&&kN(sn),AN=!Hv&&!Wv&&MN(sn);Qr=sn,Hv||Wv||AN?zv(xt)?Qr=xt:lG(xt)?Qr=Gq(xt):Wv?(Wd=!1,Qr=Wq(sn)):AN?(Wd=!1,Qr=qq(sn)):Qr=[]:cG(sn)||Lv(sn)?(Qr=xt,Lv(xt)?Qr=uG(xt):(!Za(xt)||Vv(xt))&&(Qr=Zq(sn))):Wd=!1}Wd&&(on.set(sn,Qr),mt(Qr,sn,Me,Vt,on),on.delete(sn)),jv(U,se,Qr)}function Vq(U,J){return iG(oG(U,J,PN),U+"")}var Hq=Ot?function(U,J){return Ot(U,"toString",{configurable:!0,enumerable:!1,value:fG(J),writable:!0})}:PN;function Wq(U,J){return U.slice()}function Uq(U){var J=new U.constructor(U.byteLength);return new Ue(J).set(new Ue(U)),J}function qq(U,J){var se=Uq(U.buffer);return new U.constructor(se,U.byteOffset,U.length)}function Gq(U,J){var se=-1,Me=U.length;for(J||(J=Array(Me));++se<Me;)J[se]=U[se];return J}function Yq(U,J,se,Me){var mt=!se;se||(se={});for(var Vt=-1,on=J.length;++Vt<on;){var xt=J[Vt],sn=void 0;sn===void 0&&(sn=U[xt]),mt?Ov(se,xt,sn):Oq(se,xt,sn)}return se}function Kq(U){return Vq(function(J,se){var Me=-1,mt=se.length,Vt=mt>1?se[mt-1]:void 0,on=mt>2?se[2]:void 0;for(Vt=U.length>3&&typeof Vt=="function"?(mt--,Vt):void 0,on&&Jq(se[0],se[1],on)&&(Vt=mt<3?void 0:Vt,mt=1),J=Object(J);++Me<mt;){var xt=se[Me];xt&&U(J,xt,Me,Vt)}return J})}function Xq(U){return function(J,se,Me){for(var mt=-1,Vt=Object(J),on=Me(J),xt=on.length;xt--;){var sn=on[++mt];if(se(Vt[sn],sn,Vt)===!1)break}return J}}function hm(U,J){var se=U.__data__;return eG(J)?se[typeof J=="string"?"string":"hash"]:se.map}function Fv(U,J){var se=de(U,J);return $q(se)?se:void 0}function Qq(U){var J=ge.call(U,xn),se=U[xn];try{U[xn]=void 0;var Me=!0}catch{}var mt=Ae.call(U);return Me&&(J?U[xn]=se:delete U[xn]),mt}function Zq(U){return typeof U.constructor=="function"&&!RN(U)?cn(jt(U)):{}}function _N(U,J){var se=typeof U;return J=J??s,!!J&&(se=="number"||se!="symbol"&&$.test(U))&&U>-1&&U%1==0&&U<J}function Jq(U,J,se){if(!Za(se))return!1;var Me=typeof J;return(Me=="number"?Bv(se)&&_N(J,se.length):Me=="string"&&J in se)?pm(se[J],U):!1}function eG(U){var J=typeof U;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?U!=="__proto__":U===null}function tG(U){return!!je&&je in U}function RN(U){var J=U&&U.constructor,se=typeof J=="function"&&J.prototype||Pe;return U===se}function nG(U){var J=[];if(U!=null)for(var se in Object(U))J.push(se);return J}function rG(U){return Ae.call(U)}function oG(U,J,se){return J=Bn(J===void 0?U.length-1:J,0),function(){for(var Me=arguments,mt=-1,Vt=Bn(Me.length-J,0),on=Array(Vt);++mt<Vt;)on[mt]=Me[J+mt];mt=-1;for(var xt=Array(J+1);++mt<J;)xt[mt]=Me[mt];return xt[J]=se(on),ie(U,this,xt)}}function $v(U,J){if(!(J==="constructor"&&typeof U[J]=="function")&&J!="__proto__")return U[J]}var iG=sG(Hq);function sG(U){var J=0,se=0;return function(){var Me=Tc(),mt=i-(Me-se);if(se=Me,mt>0){if(++J>=o)return arguments[0]}else J=0;return U.apply(void 0,arguments)}}function aG(U){if(U!=null){try{return _t.call(U)}catch{}try{return U+""}catch{}}return""}function pm(U,J){return U===J||U!==U&&J!==J}var Lv=SN(function(){return arguments}())?SN:function(U){return Hd(U)&&ge.call(U,"callee")&&!vn.call(U,"callee")},zv=Array.isArray;function Bv(U){return U!=null&&NN(U.length)&&!Vv(U)}function lG(U){return Hd(U)&&Bv(U)}var kN=go||hG;function Vv(U){if(!Za(U))return!1;var J=fm(U);return J==p||J==g||J==c||J==x}function NN(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=s}function Za(U){var J=typeof U;return U!=null&&(J=="object"||J=="function")}function Hd(U){return U!=null&&typeof U=="object"}function cG(U){if(!Hd(U)||fm(U)!=v)return!1;var J=jt(U);if(J===null)return!0;var se=ge.call(J,"constructor")&&J.constructor;return typeof se=="function"&&se instanceof se&&_t.call(se)==ee}var MN=Z?ce(Z):Lq;function uG(U){return Yq(U,DN(U))}function DN(U){return Bv(U)?jq(U):zq(U)}var dG=Kq(function(U,J,se){EN(U,J,se)});function fG(U){return function(){return U}}function PN(U){return U}function hG(){return!1}e.exports=dG})(lb,lb.exports);var WY=lb.exports;const ah=Fa(WY),UY={theme:"system",setTheme:()=>null},CO=R.createContext(UY);function qY({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=R.useState(()=>localStorage.getItem(n)||t);R.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),o==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(o)},[o]);const s={theme:o,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return f.jsx(CO.Provider,{...r,value:s,children:e})}const SO=()=>{const e=R.useContext(CO);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var mc=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(){}},Kl=typeof window>"u"||"Deno"in globalThis;function Co(){}function GY(e,t){return typeof e=="function"?e(t):e}function D1(e){return typeof e=="number"&&e>=0&&e!==1/0}function EO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pu(e,t){return typeof e=="function"?e(t):e}function Ho(e,t){return typeof e=="function"?e(t):e}function ZN(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==TE(s,t.options))return!1}else if(!lh(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function JN(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Xl(t.options.mutationKey)!==Xl(i))return!1}else if(!lh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function TE(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xl)(e)}function Xl(e){return JSON.stringify(e,(t,n)=>P1(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function lh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!lh(e[n],t[n])):!1}function cb(e,t){if(e===t)return e;const n=eM(e)&&eM(t);if(n||P1(e)&&P1(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=cb(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return o===s&&l===o?e:a}return t}function ub(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 eM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function P1(e){if(!tM(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tM(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tM(e){return Object.prototype.toString.call(e)==="[object Object]"}function YY(e){return new Promise(t=>{setTimeout(t,e)})}function A1(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 cb(e,t)}catch(r){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}`)}return cb(e,t)}return t}function KY(e){return e}function XY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function QY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var db=Symbol();function _O(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===db&&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===db?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Sl,Js,Ru,Fj,ZY=(Fj=class extends mc{constructor(){super();Ne(this,Sl);Ne(this,Js);Ne(this,Ru);be(this,Ru,t=>{if(!Kl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){X(this,Js)||this.setEventListener(X(this,Ru))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Js))==null||t.call(this),be(this,Js,void 0))}setEventListener(t){var n;be(this,Ru,t),(n=X(this,Js))==null||n.call(this),be(this,Js,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){X(this,Sl)!==t&&(be(this,Sl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof X(this,Sl)=="boolean"?X(this,Sl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sl=new WeakMap,Js=new WeakMap,Ru=new WeakMap,Fj),jE=new ZY,ku,ea,Nu,$j,JY=($j=class extends mc{constructor(){super();Ne(this,ku,!0);Ne(this,ea);Ne(this,Nu);be(this,Nu,t=>{if(!Kl&&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(){X(this,ea)||this.setEventListener(X(this,Nu))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,ea))==null||t.call(this),be(this,ea,void 0))}setEventListener(t){var n;be(this,Nu,t),(n=X(this,ea))==null||n.call(this),be(this,ea,t(this.setOnline.bind(this)))}setOnline(t){X(this,ku)!==t&&(be(this,ku,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return X(this,ku)}},ku=new WeakMap,ea=new WeakMap,Nu=new WeakMap,$j),fb=new JY;function I1(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function eK(e){return Math.min(1e3*2**e,3e4)}function RO(e){return(e??"online")==="online"?fb.isOnline():!0}var kO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ex(e){return e instanceof kO}function NO(e){let t=!1,n=0,r=!1,o;const i=I1(),s=m=>{var b;r||(h(new kO(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>jE.isFocused()&&(e.networkMode==="always"||fb.isOnline())&&e.canRun(),u=()=>RO(e.networkMode)&&e.canRun(),d=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),o==null||o(),i.resolve(m))},h=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),o==null||o(),i.reject(m))},p=()=>new Promise(m=>{var b;o=y=>{(r||c())&&m(y)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;o=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var S;if(r)return;const v=e.retry??(Kl?0:3),x=e.retryDelay??eK,C=typeof x=="function"?x(n,y):x,_=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(t||!_){h(y);return}n++,(S=e.onFail)==null||S.call(e,n,y),YY(C).then(()=>c()?void 0:p()).then(()=>{t?h(y):g()})})};return{promise:i,cancel:s,continue:()=>(o==null||o(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():p().then(g),i)}}function tK(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=a=>setTimeout(a,0);const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var dn=tK(),El,Lj,MO=(Lj=class{constructor(){Ne(this,El)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),D1(this.gcTime)&&be(this,El,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kl?1/0:5*60*1e3))}clearGcTimeout(){X(this,El)&&(clearTimeout(X(this,El)),be(this,El,void 0))}},El=new WeakMap,Lj),Mu,Du,vo,_l,tr,ep,Rl,Bo,ts,zj,nK=(zj=class extends MO{constructor(t){super();Ne(this,Bo);Ne(this,Mu);Ne(this,Du);Ne(this,vo);Ne(this,_l);Ne(this,tr);Ne(this,ep);Ne(this,Rl);be(this,Rl,!1),be(this,ep,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,_l,t.client),be(this,vo,X(this,_l).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,Mu,rK(this.options)),this.state=t.state??X(this,Mu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,tr))==null?void 0:t.promise}setOptions(t){this.options={...X(this,ep),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,vo).remove(this)}setData(t,n){const r=A1(this.state.data,t,this.options);return Oe(this,Bo,ts).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Oe(this,Bo,ts).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=X(this,tr))==null?void 0:r.promise;return(o=X(this,tr))==null||o.cancel(t),n?n.then(Co).catch(Co):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,Mu))}isActive(){return this.observers.some(t=>Ho(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===db||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!EO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,tr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,tr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,vo).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(X(this,tr)&&(X(this,Rl)?X(this,tr).cancel({revert:!0}):X(this,tr).cancelRetry()),this.scheduleGc()),X(this,vo).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,Bo,ts).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(X(this,tr))return X(this,tr).continueRetry(),X(this,tr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.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,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(be(this,Rl,!0),r.signal)})},i=()=>{const d=_O(this.options,n),h={client:X(this,_l),queryKey:this.queryKey,meta:this.meta};return o(h),be(this,Rl,!1),this.options.persister?this.options.persister(d,h,this):d(h)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:X(this,_l),state:this.state,fetchFn:i};o(s),(l=this.options.behavior)==null||l.onFetch(s,this),be(this,Du,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Oe(this,Bo,ts).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var h,p,g,m;ex(d)&&d.silent||Oe(this,Bo,ts).call(this,{type:"error",error:d}),ex(d)||((p=(h=X(this,vo).config).onError)==null||p.call(h,d,this),(m=(g=X(this,vo).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return be(this,tr,NO({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var h,p,g,m;if(d===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}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(b){a(b);return}(p=(h=X(this,vo).config).onSuccess)==null||p.call(h,d,this),(m=(g=X(this,vo).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,h)=>{Oe(this,Bo,ts).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Oe(this,Bo,ts).call(this,{type:"pause"})},onContinue:()=>{Oe(this,Bo,ts).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),X(this,tr).start()}},Mu=new WeakMap,Du=new WeakMap,vo=new WeakMap,_l=new WeakMap,tr=new WeakMap,ep=new WeakMap,Rl=new WeakMap,Bo=new WeakSet,ts=function(t){const n=r=>{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,...DO(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return ex(o)&&o.revert&&X(this,Du)?{...X(this,Du),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),dn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),X(this,vo).notify({query:this,type:"updated",action:t})})},zj);function DO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:RO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rK(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fi,Bj,PO=(Bj=class extends mc{constructor(t={}){super();Ne(this,fi);this.config=t,be(this,fi,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??TE(o,n);let s=this.get(i);return s||(s=new nK({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){X(this,fi).has(t.queryHash)||(X(this,fi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=X(this,fi).get(t.queryHash);n&&(t.destroy(),n===t&&X(this,fi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,fi).get(t)}getAll(){return[...X(this,fi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ZN(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ZN(t,r)):n}notify(t){dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fi=new WeakMap,Bj),hi,mr,kl,pi,qs,Vj,oK=(Vj=class extends MO{constructor(t){super();Ne(this,pi);Ne(this,hi);Ne(this,mr);Ne(this,kl);this.mutationId=t.mutationId,be(this,mr,t.mutationCache),be(this,hi,[]),this.state=t.state||AO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,hi).includes(t)||(X(this,hi).push(t),this.clearGcTimeout(),X(this,mr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,hi,X(this,hi).filter(n=>n!==t)),this.scheduleGc(),X(this,mr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,hi).length||(this.state.status==="pending"?this.scheduleGc():X(this,mr).remove(this))}continue(){var t;return((t=X(this,kl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,s,a,l,c,u,d,h,p,g,m,b,y,v,x,C,_,S,E;be(this,kl,NO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,N)=>{Oe(this,pi,qs).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{Oe(this,pi,qs).call(this,{type:"pause"})},onContinue:()=>{Oe(this,pi,qs).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,mr).canRun(this)}));const n=this.state.status==="pending",r=!X(this,kl).canStart();try{if(!n){Oe(this,pi,qs).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=X(this,mr).config).onMutate)==null?void 0:i.call(o,t,this));const N=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));N!==this.state.context&&Oe(this,pi,qs).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const k=await X(this,kl).start();return await((c=(l=X(this,mr).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((p=(h=X(this,mr).config).onSettled)==null?void 0:p.call(h,k,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,k,null,t,this.state.context)),Oe(this,pi,qs).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(b=X(this,mr).config).onError)==null?void 0:y.call(b,k,t,this.state.context,this)),await((x=(v=this.options).onError)==null?void 0:x.call(v,k,t,this.state.context)),await((_=(C=X(this,mr).config).onSettled)==null?void 0:_.call(C,void 0,k,this.state.variables,this.state.context,this)),await((E=(S=this.options).onSettled)==null?void 0:E.call(S,void 0,k,t,this.state.context)),k}finally{Oe(this,pi,qs).call(this,{type:"error",error:k})}}finally{X(this,mr).runNext(this)}}},hi=new WeakMap,mr=new WeakMap,kl=new WeakMap,pi=new WeakSet,qs=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),dn.batch(()=>{X(this,hi).forEach(r=>{r.onMutationUpdate(t)}),X(this,mr).notify({mutation:this,type:"updated",action:t})})},Vj);function AO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var as,Vo,tp,Hj,iK=(Hj=class extends mc{constructor(t={}){super();Ne(this,as);Ne(this,Vo);Ne(this,tp);this.config=t,be(this,as,new Set),be(this,Vo,new Map),be(this,tp,0)}build(t,n,r){const o=new oK({mutationCache:this,mutationId:++mm(this,tp)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){X(this,as).add(t);const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n);r?r.push(t):X(this,Vo).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,as).delete(t)){const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&X(this,Vo).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=bm(t);if(typeof n=="string"){const r=X(this,Vo).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=bm(t);if(typeof n=="string"){const o=(r=X(this,Vo).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dn.batch(()=>{X(this,as).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,as).clear(),X(this,Vo).clear()})}getAll(){return Array.from(X(this,as))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>JN(n,r))}findAll(t={}){return this.getAll().filter(n=>JN(t,n))}notify(t){dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return dn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Co))))}},as=new WeakMap,Vo=new WeakMap,tp=new WeakMap,Hj);function bm(e){var t;return(t=e.options.scope)==null?void 0:t.id}function nM(e){return{onFetch:(t,n)=>{var u,d,h,p,g;const r=t.options,o=(h=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=_O(t.options,t.fetchOptions),v=async(x,C,_)=>{if(m)return Promise.reject();if(C==null&&x.pages.length)return Promise.resolve(x);const S={client:t.client,queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};b(S);const E=await y(S),{maxPages:k}=t.options,N=_?QY:XY;return{pages:N(x.pages,E,k),pageParams:N(x.pageParams,C,k)}};if(o&&i.length){const x=o==="backward",C=x?sK:rM,_={pages:i,pageParams:s},S=C(r,_);a=await v(_,S,x)}else{const x=e??i.length;do{const C=l===0?s[0]??r.initialPageParam:rM(r,a);if(l>0&&C==null)break;a=await v(a,C),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function rM(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 sK(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 un,ta,na,Pu,Au,ra,Iu,Tu,Wj,aK=(Wj=class{constructor(e={}){Ne(this,un);Ne(this,ta);Ne(this,na);Ne(this,Pu);Ne(this,Au);Ne(this,ra);Ne(this,Iu);Ne(this,Tu);be(this,un,e.queryCache||new PO),be(this,ta,e.mutationCache||new iK),be(this,na,e.defaultOptions||{}),be(this,Pu,new Map),be(this,Au,new Map),be(this,ra,0)}mount(){mm(this,ra)._++,X(this,ra)===1&&(be(this,Iu,jE.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,un).onFocus())})),be(this,Tu,fb.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,un).onOnline())})))}unmount(){var e,t;mm(this,ra)._--,X(this,ra)===0&&((e=X(this,Iu))==null||e.call(this),be(this,Iu,void 0),(t=X(this,Tu))==null||t.call(this),be(this,Tu,void 0))}isFetching(e){return X(this,un).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,ta).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,un).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=X(this,un).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(pu(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return X(this,un).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=X(this,un).get(r.queryHash),i=o==null?void 0:o.state.data,s=GY(t,i);if(s!==void 0)return X(this,un).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return dn.batch(()=>X(this,un).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,un).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=X(this,un);dn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=X(this,un);return dn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=dn.batch(()=>X(this,un).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Co).catch(Co)}invalidateQueries(e,t={}){return dn.batch(()=>(X(this,un).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=dn.batch(()=>X(this,un).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Co)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Co)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=X(this,un).build(this,t);return n.isStaleByTime(pu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Co).catch(Co)}fetchInfiniteQuery(e){return e.behavior=nM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Co).catch(Co)}ensureInfiniteQueryData(e){return e.behavior=nM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fb.isOnline()?X(this,ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,un)}getMutationCache(){return X(this,ta)}getDefaultOptions(){return X(this,na)}setDefaultOptions(e){be(this,na,e)}setQueryDefaults(e,t){X(this,Pu).set(Xl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,Pu).values()],n={};return t.forEach(r=>{lh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){X(this,Au).set(Xl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,Au).values()],n={};return t.forEach(r=>{lh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,na).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=TE(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===db&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,na).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,un).clear(),X(this,ta).clear()}},un=new WeakMap,ta=new WeakMap,na=new WeakMap,Pu=new WeakMap,Au=new WeakMap,ra=new WeakMap,Iu=new WeakMap,Tu=new WeakMap,Wj),Or,ft,np,gr,Nl,ju,oa,mi,rp,Ou,Fu,Ml,Dl,ia,$u,It,df,T1,j1,O1,F1,$1,L1,z1,IO,Uj,OE=(Uj=class extends mc{constructor(t,n){super();Ne(this,It);Ne(this,Or);Ne(this,ft);Ne(this,np);Ne(this,gr);Ne(this,Nl);Ne(this,ju);Ne(this,oa);Ne(this,mi);Ne(this,rp);Ne(this,Ou);Ne(this,Fu);Ne(this,Ml);Ne(this,Dl);Ne(this,ia);Ne(this,$u,new Set);this.options=n,be(this,Or,t),be(this,mi,null),be(this,oa,I1()),this.options.experimental_prefetchInRender||X(this,oa).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&&(X(this,ft).addObserver(this),oM(X(this,ft),this.options)?Oe(this,It,df).call(this):this.updateResult(),Oe(this,It,F1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B1(X(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B1(X(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,It,$1).call(this),Oe(this,It,L1).call(this),X(this,ft).removeObserver(this)}setOptions(t,n){const r=this.options,o=X(this,ft);if(this.options=X(this,Or).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ho(this.options.enabled,X(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,It,z1).call(this),X(this,ft).setOptions(this.options),r._defaulted&&!ub(this.options,r)&&X(this,Or).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,ft),observer:this});const i=this.hasListeners();i&&iM(X(this,ft),o,this.options,r)&&Oe(this,It,df).call(this),this.updateResult(n),i&&(X(this,ft)!==o||Ho(this.options.enabled,X(this,ft))!==Ho(r.enabled,X(this,ft))||pu(this.options.staleTime,X(this,ft))!==pu(r.staleTime,X(this,ft)))&&Oe(this,It,T1).call(this);const s=Oe(this,It,j1).call(this);i&&(X(this,ft)!==o||Ho(this.options.enabled,X(this,ft))!==Ho(r.enabled,X(this,ft))||s!==X(this,ia))&&Oe(this,It,O1).call(this,s)}getOptimisticResult(t){const n=X(this,Or).getQueryCache().build(X(this,Or),t),r=this.createResult(n,t);return cK(this,r)&&(be(this,gr,r),be(this,ju,this.options),be(this,Nl,X(this,ft).state)),r}getCurrentResult(){return X(this,gr)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){X(this,$u).add(t)}getCurrentQuery(){return X(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=X(this,Or).defaultQueryOptions(t),r=X(this,Or).getQueryCache().build(X(this,Or),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,It,df).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,gr)))}createResult(t,n){var k;const r=X(this,ft),o=this.options,i=X(this,gr),s=X(this,Nl),a=X(this,ju),c=t!==r?t.state:X(this,np),{state:u}=t;let d={...u},h=!1,p;if(n._optimisticResults){const N=this.hasListeners(),M=!N&&oM(t,n),I=N&&iM(t,r,n,o);(M||I)&&(d={...d,...DO(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:b}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(s==null?void 0:s.data)&&n.select===X(this,rp))p=X(this,Ou);else try{be(this,rp,n.select),p=n.select(d.data),p=A1(i==null?void 0:i.data,p,n),be(this,Ou,p),be(this,mi,null)}catch(N){be(this,mi,N)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&b==="pending"){let N;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=i.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((k=X(this,Fu))==null?void 0:k.state.data,X(this,Fu)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),be(this,mi,null)}catch(M){be(this,mi,M)}N!==void 0&&(b="success",p=A1(i==null?void 0:i.data,N,n),h=!0)}X(this,mi)&&(g=X(this,mi),p=X(this,Ou),m=Date.now(),b="error");const y=d.fetchStatus==="fetching",v=b==="pending",x=b==="error",C=v&&y,_=p!==void 0,E={status:b,fetchStatus:d.fetchStatus,isPending:v,isSuccess:b==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!v,isLoadingError:x&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:x&&_,isStale:FE(t,n),refetch:this.refetch,promise:X(this,oa)};if(this.options.experimental_prefetchInRender){const N=P=>{E.status==="error"?P.reject(E.error):E.data!==void 0&&P.resolve(E.data)},M=()=>{const P=be(this,oa,E.promise=I1());N(P)},I=X(this,oa);switch(I.status){case"pending":t.queryHash===r.queryHash&&N(I);break;case"fulfilled":(E.status==="error"||E.data!==I.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==I.reason)&&M();break}}return E}updateResult(t){const n=X(this,gr),r=this.createResult(X(this,ft),this.options);if(be(this,Nl,X(this,ft).state),be(this,ju,this.options),X(this,Nl).data!==void 0&&be(this,Fu,X(this,ft)),ub(r,n))return;be(this,gr,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!X(this,$u).size)return!0;const l=new Set(a??X(this,$u));return this.options.throwOnError&&l.add("error"),Object.keys(X(this,gr)).some(c=>{const u=c;return X(this,gr)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),Oe(this,It,IO).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,It,F1).call(this)}},Or=new WeakMap,ft=new WeakMap,np=new WeakMap,gr=new WeakMap,Nl=new WeakMap,ju=new WeakMap,oa=new WeakMap,mi=new WeakMap,rp=new WeakMap,Ou=new WeakMap,Fu=new WeakMap,Ml=new WeakMap,Dl=new WeakMap,ia=new WeakMap,$u=new WeakMap,It=new WeakSet,df=function(t){Oe(this,It,z1).call(this);let n=X(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Co)),n},T1=function(){Oe(this,It,$1).call(this);const t=pu(this.options.staleTime,X(this,ft));if(Kl||X(this,gr).isStale||!D1(t))return;const r=EO(X(this,gr).dataUpdatedAt,t)+1;be(this,Ml,setTimeout(()=>{X(this,gr).isStale||this.updateResult()},r))},j1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,ft)):this.options.refetchInterval)??!1},O1=function(t){Oe(this,It,L1).call(this),be(this,ia,t),!(Kl||Ho(this.options.enabled,X(this,ft))===!1||!D1(X(this,ia))||X(this,ia)===0)&&be(this,Dl,setInterval(()=>{(this.options.refetchIntervalInBackground||jE.isFocused())&&Oe(this,It,df).call(this)},X(this,ia)))},F1=function(){Oe(this,It,T1).call(this),Oe(this,It,O1).call(this,Oe(this,It,j1).call(this))},$1=function(){X(this,Ml)&&(clearTimeout(X(this,Ml)),be(this,Ml,void 0))},L1=function(){X(this,Dl)&&(clearInterval(X(this,Dl)),be(this,Dl,void 0))},z1=function(){const t=X(this,Or).getQueryCache().build(X(this,Or),this.options);if(t===X(this,ft))return;const n=X(this,ft);be(this,ft,t),be(this,np,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},IO=function(t){dn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(X(this,gr))}),X(this,Or).getQueryCache().notify({query:X(this,ft),type:"observerResultsUpdated"})})},Uj);function lK(e,t){return Ho(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function oM(e,t){return lK(e,t)||e.state.data!==void 0&&B1(e,t,t.refetchOnMount)}function B1(e,t,n){if(Ho(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&FE(e,t)}return!1}function iM(e,t,n,r){return(e!==t||Ho(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&FE(e,n)}function FE(e,t){return Ho(t.enabled,e)!==!1&&e.isStaleByTime(pu(t.staleTime,e))}function cK(e,t){return!ub(e.getCurrentResult(),t)}function sM(e,t){return e.filter(n=>!t.includes(n))}function uK(e,t,n){const r=e.slice(0);return r[t]=n,r}var Pl,xo,Lu,zu,wo,sa,op,ip,sp,Xn,V1,H1,W1,U1,q1,qj,dK=(qj=class extends mc{constructor(t,n,r){super();Ne(this,Xn);Ne(this,Pl);Ne(this,xo);Ne(this,Lu);Ne(this,zu);Ne(this,wo);Ne(this,sa);Ne(this,op);Ne(this,ip);Ne(this,sp,[]);be(this,Pl,t),be(this,zu,r),be(this,Lu,[]),be(this,wo,[]),be(this,xo,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&X(this,wo).forEach(t=>{t.subscribe(n=>{Oe(this,Xn,U1).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,X(this,wo).forEach(t=>{t.destroy()})}setQueries(t,n,r){if(be(this,Lu,t),be(this,zu,n),process.env.NODE_ENV!=="production"){const o=t.map(i=>X(this,Pl).defaultQueryOptions(i).queryHash);new Set(o).size!==o.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}dn.batch(()=>{const o=X(this,wo),i=Oe(this,Xn,W1).call(this,X(this,Lu));be(this,sp,i),i.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions,r));const s=i.map(c=>c.observer),a=s.map(c=>c.getCurrentResult()),l=s.some((c,u)=>c!==o[u]);o.length===s.length&&!l||(be(this,wo,s),be(this,xo,a),this.hasListeners()&&(sM(o,s).forEach(c=>{c.destroy()}),sM(s,o).forEach(c=>{c.subscribe(u=>{Oe(this,Xn,U1).call(this,c,u)})}),Oe(this,Xn,q1).call(this)))})}getCurrentResult(){return X(this,xo)}getQueries(){return X(this,wo).map(t=>t.getCurrentQuery())}getObservers(){return X(this,wo)}getOptimisticResult(t,n){const r=Oe(this,Xn,W1).call(this,t),o=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>Oe(this,Xn,H1).call(this,i??o,n),()=>Oe(this,Xn,V1).call(this,o,r)]}},Pl=new WeakMap,xo=new WeakMap,Lu=new WeakMap,zu=new WeakMap,wo=new WeakMap,sa=new WeakMap,op=new WeakMap,ip=new WeakMap,sp=new WeakMap,Xn=new WeakSet,V1=function(t,n){return n.map((r,o)=>{const i=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,s=>{n.forEach(a=>{a.observer.trackProp(s)})})})},H1=function(t,n){return n?((!X(this,sa)||X(this,xo)!==X(this,ip)||n!==X(this,op))&&(be(this,op,n),be(this,ip,X(this,xo)),be(this,sa,cb(X(this,sa),n(t)))),X(this,sa)):t},W1=function(t){const n=new Map(X(this,wo).map(o=>[o.options.queryHash,o])),r=[];return t.forEach(o=>{const i=X(this,Pl).defaultQueryOptions(o),s=n.get(i.queryHash);s?r.push({defaultedQueryOptions:i,observer:s}):r.push({defaultedQueryOptions:i,observer:new OE(X(this,Pl),i)})}),r},U1=function(t,n){const r=X(this,wo).indexOf(t);r!==-1&&(be(this,xo,uK(X(this,xo),r,n)),Oe(this,Xn,q1).call(this))},q1=function(){var t;if(this.hasListeners()){const n=X(this,sa),r=Oe(this,Xn,V1).call(this,X(this,xo),X(this,sp)),o=Oe(this,Xn,H1).call(this,r,(t=X(this,zu))==null?void 0:t.combine);n!==o&&dn.batch(()=>{this.listeners.forEach(i=>{i(X(this,xo))})})}},qj),aa,la,Fr,ls,_s,$g,G1,Gj,fK=(Gj=class extends mc{constructor(n,r){super();Ne(this,_s);Ne(this,aa);Ne(this,la);Ne(this,Fr);Ne(this,ls);be(this,aa,n),this.setOptions(r),this.bindMethods(),Oe(this,_s,$g).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=X(this,aa).defaultMutationOptions(n),ub(this.options,r)||X(this,aa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,Fr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Xl(r.mutationKey)!==Xl(this.options.mutationKey)?this.reset():((o=X(this,Fr))==null?void 0:o.state.status)==="pending"&&X(this,Fr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=X(this,Fr))==null||n.removeObserver(this)}onMutationUpdate(n){Oe(this,_s,$g).call(this),Oe(this,_s,G1).call(this,n)}getCurrentResult(){return X(this,la)}reset(){var n;(n=X(this,Fr))==null||n.removeObserver(this),be(this,Fr,void 0),Oe(this,_s,$g).call(this),Oe(this,_s,G1).call(this)}mutate(n,r){var o;return be(this,ls,r),(o=X(this,Fr))==null||o.removeObserver(this),be(this,Fr,X(this,aa).getMutationCache().build(X(this,aa),this.options)),X(this,Fr).addObserver(this),X(this,Fr).execute(n)}},aa=new WeakMap,la=new WeakMap,Fr=new WeakMap,ls=new WeakMap,_s=new WeakSet,$g=function(){var r;const n=((r=X(this,Fr))==null?void 0:r.state)??AO();be(this,la,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},G1=function(n){dn.batch(()=>{var r,o,i,s,a,l,c,u;if(X(this,ls)&&this.hasListeners()){const d=X(this,la).variables,h=X(this,la).context;(n==null?void 0:n.type)==="success"?((o=(r=X(this,ls)).onSuccess)==null||o.call(r,n.data,d,h),(s=(i=X(this,ls)).onSettled)==null||s.call(i,n.data,null,d,h)):(n==null?void 0:n.type)==="error"&&((l=(a=X(this,ls)).onError)==null||l.call(a,n.error,d,h),(u=(c=X(this,ls)).onSettled)==null||u.call(c,void 0,n.error,d,h))}this.listeners.forEach(d=>{d(X(this,la))})})},Gj),$E=w.createContext(void 0),Qn=e=>{const t=w.useContext($E);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hK=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx($E.Provider,{value:e,children:t})),TO=w.createContext(!1),jO=()=>w.useContext(TO);TO.Provider;function pK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mK=w.createContext(pK()),OO=()=>w.useContext(mK);function FO(e,t){return typeof e=="function"?e(...t):!!e}function hb(){}var $O=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},LO=e=>{w.useEffect(()=>{e.clearReset()},[e])},zO=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||FO(n,[e.error,r])),BO=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},VO=(e,t)=>e.isLoading&&e.isFetching&&!t,Y1=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,pb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function gK({queries:e,...t},n){const r=Qn(),o=jO(),i=OO(),s=w.useMemo(()=>e.map(m=>{const b=r.defaultQueryOptions(m);return b._optimisticResults=o?"isRestoring":"optimistic",b}),[e,r,o]);s.forEach(m=>{BO(m),$O(m,i)}),LO(i);const[a]=w.useState(()=>new dK(r,s,t)),[l,c,u]=a.getOptimisticResult(s,t.combine),d=!o&&t.subscribed!==!1;w.useSyncExternalStore(w.useCallback(m=>d?a.subscribe(dn.batchCalls(m)):hb,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(s,t,{listeners:!1})},[s,t,a]);const p=l.some((m,b)=>Y1(s[b],m))?l.flatMap((m,b)=>{const y=s[b];if(y){const v=new OE(r,y);if(Y1(y,m))return pb(y,v,i);VO(m,o)&&pb(y,v,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const g=l.find((m,b)=>{const y=s[b];return y&&zO({result:m,errorResetBoundary:i,throwOnError:y.throwOnError,query:r.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(g!=null&&g.error)throw g.error;return c(u())}function bK(e,t,n){var d,h,p,g,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Qn(),o=jO(),i=OO(),s=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.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`)),s._optimisticResults=o?"isRestoring":"optimistic",BO(s),$O(s,i),LO(i);const a=!r.getQueryCache().get(s.queryHash),[l]=w.useState(()=>new t(r,s)),c=l.getOptimisticResult(s),u=!o&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(b=>{const y=u?l.subscribe(dn.batchCalls(b)):hb;return l.updateResult(),y},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),Y1(s,c))throw pb(s,l,i);if(zO({result:c,errorResetBoundary:i,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((g=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||g.call(p,s,c),s.experimental_prefetchInRender&&!Kl&&VO(c,o)){const b=a?pb(s,l,i):(m=r.getQueryCache().get(s.queryHash))==null?void 0:m.promise;b==null||b.catch(hb).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function hn(e,t){return bK(e,OE)}function gc(e,t){const n=Qn(),[r]=w.useState(()=>new fK(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const o=w.useSyncExternalStore(w.useCallback(s=>r.subscribe(dn.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=w.useCallback((s,a)=>{r.mutate(s,a).catch(hb)},[r]);if(o.error&&FO(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function yK(){const e=R.useContext($E);if(e&&e.isSemaphorClient)return e}function HO({children:e}){const{setIsSessionExpired:t}=Gt(),n=yK(),[r]=R.useState(()=>{const o=new aK({queryCache:new PO({onError:i=>{i instanceof Error?(console.error(`Something went wrong: ${i.message}`),i.message==="invalid token"&&t(!0)):console.error("Something went wrong:",i)}}),defaultOptions:{queries:{gcTime:36e5,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}}});return o.isSemaphorClient=!0,o});return n?f.jsx(f.Fragment,{children:e}):f.jsx(hK,{client:r,children:e})}const ri=R.forwardRef(({children:e,className:t,...n},r)=>f.jsx("div",{className:oe("semaphor-scope",t),ref:r,...n,children:e})),vK={id:"",authToken:void 0,tokenProps:{}},LE=R.createContext(vK),WO=({children:e,dashboardProps:t})=>{const n=R.useMemo(()=>{let r={};const o=t.authToken;return o&&(r=ap(o.accessToken)),{...t,tokenProps:r}},[t]);return f.jsx(HO,{children:f.jsx(LE.Provider,{value:n,children:f.jsx(ri,{style:{height:"100%"},children:e})})})};function Bt(){const e=R.useContext(LE);if(e===void 0)throw new Error("useApplicationContext must be used within a ApplicationContextProvider");return e}const bc=Ps()(lp(e=>({selectedDashboard:null,selectedVisual:null,lastSelectedDashboard:null,lastSelectedVisual:null,actions:{selectDashboard:t=>{e(n=>{var r;((r=n.selectedDashboard)==null?void 0:r.id)!==t.id&&(n.lastSelectedDashboard=n.selectedDashboard,n.selectedDashboard=t)})},selectVisual:t=>{e(n=>{n.lastSelectedVisual=n.selectedVisual,n.selectedVisual=t})},clearSelectedDashboard:()=>{e(t=>{t.lastSelectedDashboard=t.selectedDashboard,t.selectedDashboard=null})},clearSelectedVisual:()=>{e(t=>{t.lastSelectedVisual=t.selectedVisual,t.selectedVisual=null})}}}))),UO=()=>bc(e=>e.selectedVisual),qO=()=>bc(e=>e.actions),xK=e=>bc(t=>{var n;return((n=t.selectedDashboard)==null?void 0:n.id)===e}),wK=e=>bc(t=>{var n;return((n=t.selectedVisual)==null?void 0:n.id)===e});function CK(){const e=bc(c=>c.selectedDashboard),{authToken:t,version:n}=Bt(),r=re(c=>c.selectedLensId);function o(){if(!(t!=null&&t.accessToken))return!1}const{data:i,isLoading:s,isFetching:a,isError:l}=hn({queryKey:["dashboard",r,t==null?void 0:t.accessToken,e==null?void 0:e.id],queryFn:()=>VY(t==null?void 0:t.accessToken,{lensId:r,version:n,dashboardId:e==null?void 0:e.id}),enabled:o()});return{data:i,isLoading:s,isFetching:a,isError:l}}function SK(){const{authToken:e}=Bt(),t=re(r=>r.authToken),{setAuthToken:n}=Gt();return R.useEffect(()=>{e&&(e==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&n(e)},[e,t,n]),e}const GO=(e,t)=>{const n={};if(e===null||t===null)return t;const r=new Set([...Object.keys(e),...Object.keys(t)]);for(const o of r){if(!(o in e)&&o in t){n[o]=t[o];continue}if(o in e&&!(o in t)){n[o]=void 0;continue}const i=e[o],s=t[o];if(!K1(i,s))if(Array.isArray(i)&&Array.isArray(s))n[o]=s;else if(aM(i)&&aM(s)){const a=GO(i,s);Object.keys(a).length>0&&(n[o]=a)}else n[o]=s}return n},K1=(e,t)=>{if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((o,i)=>K1(o,t[i]));const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(o=>K1(e[o],t[o]))}return!1},aM=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),ch=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(n=>ch(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=ch(e[n]));return t};function YO(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function lM(e,t){const n=YO(e);return n==="dark"?ah({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function EK({customStyle:e,currentTheme:t,onSave:n,onEvent:r,defaultFilterValues:o,selectedSheetId:i,onFilterValuesChange:s}){const{authToken:a}=Bt();SK();const l=re(O=>O.selectedLensId),{data:c,isLoading:u,isFetching:d,isError:h}=CK(),[p,g]=R.useState(o||[]),{theme:m,setTheme:b}=SO(),y=re(O=>O.dashboard.globalStyle),{setDashboard:v,setDashboardWithFilterValues:x,setSelectedSheetId:C,setStyle:_,setOnSaveFunction:S,setLenses:E,setSelectedLensId:k,setInitStore:N}=Gt();re(O=>O.actions.setCustomCards);const M=re(O=>O.actions.setFilterValues),I=re(O=>O.filterValues),P=re(O=>O.actions.setThemeStyle),j=re(O=>O.actions.setDashboardTheme),F=re(O=>O.actions.setOnEvent);R.useEffect(()=>{a&&N()},[a,N]),R.useEffect(()=>{if(m){const O=YO(m);j(O)}},[m,j]),R.useEffect(()=>{t&&b(t)},[t,b]);const T=R.useCallback(()=>{const O=ch(ab),L=ah(O,y);if(e){const B=ah(L,e),z=lM(m,B);P(z),_(B)}else{const B=lM(m,L);P(B),_(ab)}},[m,e,y,P,_]);return R.useEffect(()=>{c&&c.dashboard&&T()},[m,e,y,T,c]),R.useEffect(()=>{var $,D;function O(H,V){const G=H.filters||[],q=[];for(const K of V){const Y=G.find(Q=>Q.id===K.filterId);Y&&q.push({filterId:K.filterId,connectionType:Y.database==="NA"?"api":"database",name:Y.column,operation:Y.operation,valueType:hu(Y),values:K.values})}return q}if(!c||!c.dashboard)return;const{dashboard:L,filterValues:B,defaultLensId:z,lenses:A}=c;function W(){var V;if(B&&(B==null?void 0:B.length)>0)return B;const H=O(L,p||[]);return H&&(H==null?void 0:H.length)>0?H:L.defaultFilterValues&&((V=L.defaultFilterValues)==null?void 0:V.length)>0?L.defaultFilterValues:[]}x(L,W()),A&&E(A),z&&k(z),C(i||((D=($=L==null?void 0:L.sheets)==null?void 0:$[0])==null?void 0:D.id)||null)},[c,v,C,M,l,E,x,k,p,i]),R.useEffect(()=>{s&&I&&s(I)},[I,s]),R.useEffect(()=>{n&&S(n),r&&F(r)},[n,S,r,F]),{isFetching:d,isLoading:u,isError:h}}function ws({className:e,...t}){return f.jsx("div",{className:oe("animate-pulse rounded-md bg-muted",e),...t})}const mb=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));mb.displayName="Card";const Wu=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("flex flex-col space-y-1.5 p-6",e),...t}));Wu.displayName="CardHeader";const wa=w.forwardRef(({className:e,...t},n)=>f.jsx("h3",{ref:n,className:oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));wa.displayName="CardTitle";const zE=w.forwardRef(({className:e,...t},n)=>f.jsx("p",{ref:n,className:oe("text-sm text-muted-foreground",e),...t}));zE.displayName="CardDescription";const uh=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("px-6 pt-0",e),...t}));uh.displayName="CardContent";const KO=w.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:oe("flex items-center p-6 pt-0",e),...t}));KO.displayName="CardFooter";function XO({className:e,customStyle:t,onSave:n,onEvent:r,LoadingComponent:o,ErrorComponent:i,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,showAssistant:h,defaultFilterValues:p,onFilterValuesChange:g,selectedSheetId:m,eventHandlers:b,...y}){const{placeholders:v}=Bt(),x=re(E=>E.themeStyle),C=re(E=>E.isSessionExpired),{isLoading:_,isError:S}=EK({customStyle:t,currentTheme:c,onSave:n,onEvent:r,defaultFilterValues:p,onFilterValuesChange:g,selectedSheetId:m});return _||!l?(r==null||r({type:"info",message:"Loading dashboard"}),o?f.jsx(o,{message:"loading"}):f.jsx("div",{className:"flex items-center gap-3",children:f.jsx(ws,{className:"h-1 w-full dark:h-[2px]"})})):S?(r==null||r({type:"error",message:"Error fetching dashboard"}),i?(console.log("Error fetching dashboard"),f.jsx(i,{})):f.jsx("div",{children:"Error"})):C?(r==null||r({type:"error",message:"Session Expired"}),v!=null&&v.SessionExpired?f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsx("div",{children:v.SessionExpired})}):f.jsx("div",{className:"flex h-full items-center justify-center",children:f.jsxs("div",{className:"space-y-4 rounded-md border border-muted p-10",children:[f.jsx(wa,{children:"Session Expired"}),f.jsx("p",{className:"text-muted-foreground",children:"Please refresh your page to continue"})]})})):f.jsx("div",{className:oe("isolate flex grow flex-col",x==null?void 0:x.dashboardPanel,e),style:{},"data-role":"dashboard-panel",...y})}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _K(e,t){const n=w.createContext(t),r=i=>{const{children:s,...a}=i,l=w.useMemo(()=>a,Object.values(a));return f.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=w.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function On(e,t=[]){let n=[];function r(i,s){const a=w.createContext(s),l=n.length;n=[...n,s];const c=d=>{var y;const{scope:h,children:p,...g}=d,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,b=w.useMemo(()=>g,Object.values(g));return f.jsx(m.Provider,{value:b,children:p})};c.displayName=i+"Provider";function u(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,g=w.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(s=>w.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,RK(o,...t)]}function RK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function cM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Sr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=cM(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():cM(e[o],null)}}}}function He(...e){return w.useCallback(Sr(...e),e)}var X1=w.forwardRef((e,t)=>{const{children:n,...r}=e,o=w.Children.toArray(n),i=o.find(NK);if(i){const s=i.props.children,a=o.map(l=>l===i?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:l);return f.jsx(Q1,{...r,ref:t,children:w.isValidElement(s)?w.cloneElement(s,void 0,a):null})}return f.jsx(Q1,{...r,ref:t,children:n})});X1.displayName="Slot";var Q1=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const o=DK(n),i=MK(r,n.props);return n.type!==w.Fragment&&(i.ref=t?Sr(t,o):o),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});Q1.displayName="SlotClone";var kK=({children:e})=>f.jsx(f.Fragment,{children:e});function NK(e){return w.isValidElement(e)&&e.type===kK}function MK(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function DK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function B0(e){const t=e+"CollectionProvider",[n,r]=On(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:g,children:m}=p,b=R.useRef(null),y=R.useRef(new Map).current;return f.jsx(o,{scope:g,itemMap:y,collectionRef:b,children:m})};s.displayName=t;const a=e+"CollectionSlot",l=R.forwardRef((p,g)=>{const{scope:m,children:b}=p,y=i(a,m),v=He(g,y.collectionRef);return f.jsx(X1,{ref:v,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=R.forwardRef((p,g)=>{const{scope:m,children:b,...y}=p,v=R.useRef(null),x=He(g,v),C=i(c,m);return R.useEffect(()=>(C.itemMap.set(v,{ref:v,...y}),()=>void C.itemMap.delete(v))),f.jsx(X1,{[u]:"",ref:x,children:b})});d.displayName=c;function h(p){const g=i(e+"CollectionConsumer",p);return R.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((C,_)=>y.indexOf(C.ref.current)-y.indexOf(_.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,r]}var Yn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},PK=w.useId||(()=>{}),AK=0;function Nn(e){const[t,n]=w.useState(PK());return Yn(()=>{n(r=>r??String(AK++))},[e]),t?`radix-${t}`:""}var QO=w.forwardRef((e,t)=>{const{children:n,...r}=e,o=w.Children.toArray(n),i=o.find(TK);if(i){const s=i.props.children,a=o.map(l=>l===i?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:l);return f.jsx(Z1,{...r,ref:t,children:w.isValidElement(s)?w.cloneElement(s,void 0,a):null})}return f.jsx(Z1,{...r,ref:t,children:n})});QO.displayName="Slot";var Z1=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const o=OK(n),i=jK(r,n.props);return n.type!==w.Fragment&&(i.ref=t?Sr(t,o):o),w.cloneElement(n,i)}return w.Children.count(n)>1?w.Children.only(null):null});Z1.displayName="SlotClone";var IK=({children:e})=>f.jsx(f.Fragment,{children:e});function TK(e){return w.isValidElement(e)&&e.type===IK}function jK(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function OK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_e=FK.reduce((e,t)=>{const n=w.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?QO:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ZO(e,t){e&&Rs.flushSync(()=>e.dispatchEvent(t))}function In(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function dr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=$K({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=In(n),l=w.useCallback(c=>{if(i){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else o(c)},[i,e,o,a]);return[s,l]}function $K({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,o=w.useRef(r),i=In(t);return w.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var LK=w.createContext(void 0);function yc(e){const t=w.useContext(LK);return e||t||"ltr"}var tx="rovingFocusGroup.onEntryFocus",zK={bubbles:!1,cancelable:!0},V0="RovingFocusGroup",[J1,JO,BK]=B0(V0),[VK,gd]=On(V0,[BK]),[HK,WK]=VK(V0),e5=w.forwardRef((e,t)=>f.jsx(J1.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(J1.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(UK,{...e,ref:t})})}));e5.displayName=V0;var UK=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,h=w.useRef(null),p=He(t,h),g=yc(i),[m=null,b]=dr({prop:s,defaultProp:a,onChange:l}),[y,v]=w.useState(!1),x=In(c),C=JO(n),_=w.useRef(!1),[S,E]=w.useState(0);return w.useEffect(()=>{const k=h.current;if(k)return k.addEventListener(tx,x),()=>k.removeEventListener(tx,x)},[x]),f.jsx(HK,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:m,onItemFocus:w.useCallback(k=>b(k),[b]),onItemShiftTab:w.useCallback(()=>v(!0),[]),onFocusableItemAdd:w.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:w.useCallback(()=>E(k=>k-1),[]),children:f.jsx(_e.div,{tabIndex:y||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:he(e.onMouseDown,()=>{_.current=!0}),onFocus:he(e.onFocus,k=>{const N=!_.current;if(k.target===k.currentTarget&&N&&!y){const M=new CustomEvent(tx,zK);if(k.currentTarget.dispatchEvent(M),!M.defaultPrevented){const I=C().filter(O=>O.focusable),P=I.find(O=>O.active),j=I.find(O=>O.id===m),T=[P,j,...I].filter(Boolean).map(O=>O.ref.current);r5(T,u)}}_.current=!1}),onBlur:he(e.onBlur,()=>v(!1))})})}),t5="RovingFocusGroupItem",n5=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=Nn(),l=i||a,c=WK(t5,n),u=c.currentTabStopId===l,d=JO(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return w.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),f.jsx(J1.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:f.jsx(_e.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:he(e.onMouseDown,g=>{r?c.onItemFocus(l):g.preventDefault()}),onFocus:he(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:he(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){c.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=YK(g,c.orientation,c.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let y=d().filter(v=>v.focusable).map(v=>v.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const v=y.indexOf(g.currentTarget);y=c.loop?KK(y,v+1):y.slice(v+1)}setTimeout(()=>r5(y))}})})})});n5.displayName=t5;var qK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function GK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function YK(e,t,n){const r=GK(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qK[r]}function r5(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function KK(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BE=e5,VE=n5;function XK(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var gn=e=>{const{present:t,children:n}=e,r=QK(t),o=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=He(r.ref,ZK(o));return typeof n=="function"||r.isPresent?w.cloneElement(o,{ref:i}):null};gn.displayName="Presence";function QK(e){const[t,n]=w.useState(),r=w.useRef({}),o=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[a,l]=XK(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=ym(r.current);i.current=a==="mounted"?c:"none"},[a]),Yn(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,p=ym(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Yn(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=p=>{const m=ym(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(i.current=ym(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ym(e){return(e==null?void 0:e.animationName)||"none"}function ZK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var HE="Tabs",[JK,Y$e]=On(HE,[gd]),o5=gd(),[eX,WE]=JK(HE),i5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=yc(a),[d,h]=dr({prop:r,onChange:o,defaultProp:i});return f.jsx(eX,{scope:n,baseId:Nn(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l,children:f.jsx(_e.div,{dir:u,"data-orientation":s,...c,ref:t})})});i5.displayName=HE;var s5="TabsList",a5=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=WE(s5,n),s=o5(n);return f.jsx(BE,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:f.jsx(_e.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});a5.displayName=s5;var l5="TabsTrigger",c5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=WE(l5,n),a=o5(n),l=f5(s.baseId,r),c=h5(s.baseId,r),u=r===s.value;return f.jsx(VE,{asChild:!0,...a,focusable:!o,active:u,children:f.jsx(_e.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:he(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:he(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:he(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(r)})})})});c5.displayName=l5;var u5="TabsContent",d5=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=WE(u5,n),l=f5(a.baseId,r),c=h5(a.baseId,r),u=r===a.value,d=w.useRef(u);return w.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),f.jsx(gn,{present:o||u,children:({present:h})=>f.jsx(_e.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&i})})});d5.displayName=u5;function f5(e,t){return`${e}-trigger-${t}`}function h5(e,t){return`${e}-content-${t}`}var tX=i5,p5=a5,m5=c5,g5=d5;const bd=tX,vc=w.forwardRef(({className:e,...t},n)=>f.jsx(p5,{ref:n,className:oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));vc.displayName=p5.displayName;const io=w.forwardRef(({className:e,...t},n)=>f.jsx(m5,{ref:n,className:oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));io.displayName=m5.displayName;const xi=w.forwardRef(({className:e,...t},n)=>f.jsx(g5,{ref:n,className:oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xi.displayName=g5.displayName;var b5={exports:{}},dp={},eC={exports:{}};(function(e,t){(function(n,r){r(t)})(ps,function(n){function r(K){return function(Q,ne,Z,ie,te,ce,de){return K(Q,ne,de)}}function o(K){return function(Q,ne,Z,ie){if(!Q||!ne||typeof Q!="object"||typeof ne!="object")return K(Q,ne,Z,ie);var te=ie.get(Q),ce=ie.get(ne);if(te&&ce)return te===ne&&ce===Q;ie.set(Q,ne),ie.set(ne,Q);var de=K(Q,ne,Z,ie);return ie.delete(Q),ie.delete(ne),de}}function i(K,Y){var Q={};for(var ne in K)Q[ne]=K[ne];for(var ne in Y)Q[ne]=Y[ne];return Q}function s(K){return K.constructor===Object||K.constructor==null}function a(K){return typeof K.then=="function"}function l(K,Y){return K===Y||K!==K&&Y!==Y}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",h="[object RegExp]",p="[object Map]",g="[object Number]",m="[object Object]",b="[object Set]",y="[object String]",v=Object.prototype.toString;function x(K){var Y=K.areArraysEqual,Q=K.areDatesEqual,ne=K.areMapsEqual,Z=K.areObjectsEqual,ie=K.areRegExpsEqual,te=K.areSetsEqual,ce=K.createIsNestedEqual,de=ce(ke);function ke(we,Ce,Pe){if(we===Ce)return!0;if(!we||!Ce||typeof we!="object"||typeof Ce!="object")return we!==we&&Ce!==Ce;if(s(we)&&s(Ce))return Z(we,Ce,de,Pe);var Ye=Array.isArray(we),_t=Array.isArray(Ce);if(Ye||_t)return Ye===_t&&Y(we,Ce,de,Pe);var ge=v.call(we);return ge!==v.call(Ce)?!1:ge===d?Q(we,Ce,de,Pe):ge===h?ie(we,Ce,de,Pe):ge===p?ne(we,Ce,de,Pe):ge===b?te(we,Ce,de,Pe):ge===m||ge===c?a(we)||a(Ce)?!1:Z(we,Ce,de,Pe):ge===u||ge===g||ge===y?l(we.valueOf(),Ce.valueOf()):!1}return ke}function C(K,Y,Q,ne){var Z=K.length;if(Y.length!==Z)return!1;for(;Z-- >0;)if(!Q(K[Z],Y[Z],Z,Z,K,Y,ne))return!1;return!0}var _=o(C);function S(K,Y){return l(K.valueOf(),Y.valueOf())}function E(K,Y,Q,ne){var Z=K.size===Y.size;if(!Z)return!1;if(!K.size)return!0;var ie={},te=0;return K.forEach(function(ce,de){if(Z){var ke=!1,we=0;Y.forEach(function(Ce,Pe){!ke&&!ie[we]&&(ke=Q(de,Pe,te,we,K,Y,ne)&&Q(ce,Ce,de,Pe,K,Y,ne))&&(ie[we]=!0),we++}),te++,Z=ke}}),Z}var k=o(E),N="_owner",M=Object.prototype.hasOwnProperty;function I(K,Y,Q,ne){var Z=Object.keys(K),ie=Z.length;if(Object.keys(Y).length!==ie)return!1;for(var te;ie-- >0;){if(te=Z[ie],te===N){var ce=!!K.$$typeof,de=!!Y.$$typeof;if((ce||de)&&ce!==de)return!1}if(!M.call(Y,te)||!Q(K[te],Y[te],te,te,K,Y,ne))return!1}return!0}var P=o(I);function j(K,Y){return K.source===Y.source&&K.flags===Y.flags}function F(K,Y,Q,ne){var Z=K.size===Y.size;if(!Z)return!1;if(!K.size)return!0;var ie={};return K.forEach(function(te,ce){if(Z){var de=!1,ke=0;Y.forEach(function(we,Ce){!de&&!ie[ke]&&(de=Q(te,we,ce,Ce,K,Y,ne))&&(ie[ke]=!0),ke++}),Z=de}}),Z}var T=o(F),O=Object.freeze({areArraysEqual:C,areDatesEqual:S,areMapsEqual:E,areObjectsEqual:I,areRegExpsEqual:j,areSetsEqual:F,createIsNestedEqual:r}),L=Object.freeze({areArraysEqual:_,areDatesEqual:S,areMapsEqual:k,areObjectsEqual:P,areRegExpsEqual:j,areSetsEqual:T,createIsNestedEqual:r}),B=x(O);function z(K,Y){return B(K,Y,void 0)}var A=x(i(O,{createIsNestedEqual:function(){return l}}));function W(K,Y){return A(K,Y,void 0)}var $=x(L);function D(K,Y){return $(K,Y,new WeakMap)}var H=x(i(L,{createIsNestedEqual:function(){return l}}));function V(K,Y){return H(K,Y,new WeakMap)}function G(K){return x(i(O,K(O)))}function q(K){var Y=x(i(L,K(L)));return function(Q,ne,Z){return Z===void 0&&(Z=new WeakMap),Y(Q,ne,Z)}}n.circularDeepEqual=D,n.circularShallowEqual=V,n.createCustomCircularEqual=q,n.createCustomEqual=G,n.deepEqual=z,n.sameValueZeroEqual=l,n.shallowEqual=W,Object.defineProperty(n,"__esModule",{value:!0})})})(eC,eC.exports);var UE=eC.exports;const qE=EE(gG);var lt={},nX=function(t,n,r){return t===n?!0:t.className===n.className&&r(t.style,n.style)&&t.width===n.width&&t.autoSize===n.autoSize&&t.cols===n.cols&&t.draggableCancel===n.draggableCancel&&t.draggableHandle===n.draggableHandle&&r(t.verticalCompact,n.verticalCompact)&&r(t.compactType,n.compactType)&&r(t.layout,n.layout)&&r(t.margin,n.margin)&&r(t.containerPadding,n.containerPadding)&&t.rowHeight===n.rowHeight&&t.maxRows===n.maxRows&&t.isBounded===n.isBounded&&t.isDraggable===n.isDraggable&&t.isResizable===n.isResizable&&t.allowOverlap===n.allowOverlap&&t.preventCollision===n.preventCollision&&t.useCSSTransforms===n.useCSSTransforms&&t.transformScale===n.transformScale&&t.isDroppable===n.isDroppable&&r(t.resizeHandles,n.resizeHandles)&&r(t.resizeHandle,n.resizeHandle)&&t.onLayoutChange===n.onLayoutChange&&t.onDragStart===n.onDragStart&&t.onDrag===n.onDrag&&t.onDragStop===n.onDragStop&&t.onResizeStart===n.onResizeStart&&t.onResize===n.onResize&&t.onResizeStop===n.onResizeStop&&t.onDrop===n.onDrop&&r(t.droppingItem,n.droppingItem)&&r(t.innerRef,n.innerRef)};Object.defineProperty(lt,"__esModule",{value:!0});lt.bottom=GE;lt.childrenEqual=sX;lt.cloneLayout=y5;lt.cloneLayoutItem=Al;lt.collides=H0;lt.compact=x5;lt.compactItem=w5;lt.compactType=vX;lt.correctBounds=C5;lt.fastPositionEqual=aX;lt.fastRGLPropsEqual=void 0;lt.getAllCollisions=S5;lt.getFirstCollision=gl;lt.getLayoutItem=YE;lt.getStatics=KE;lt.modifyLayout=v5;lt.moveElement=hf;lt.moveElementAwayFromCollision=nC;lt.noop=void 0;lt.perc=cX;lt.resizeItemInDirection=mX;lt.setTopLeft=bX;lt.setTransform=gX;lt.sortLayoutItems=t_;lt.sortLayoutItemsByColRow=N5;lt.sortLayoutItemsByRowCol=k5;lt.synchronizeLayoutWithChildren=yX;lt.validateLayout=M5;lt.withLayoutItem=iX;var uM=UE,ff=rX(R);function rX(e){return e&&e.__esModule?e:{default:e}}const oX=process.env.NODE_ENV==="production";function GE(e){let t=0,n;for(let r=0,o=e.length;r<o;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function y5(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Al(e[n]);return t}function v5(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function iX(e,t,n){let r=YE(e,t);return r?(r=n(Al(r)),e=v5(e,r),[e,r]):[e,null]}function Al(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function sX(e,t){return(0,uM.deepEqual)(ff.default.Children.map(e,n=>n==null?void 0:n.key),ff.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,uM.deepEqual)(ff.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),ff.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}lt.fastRGLPropsEqual=nX;function aX(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function H0(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function x5(e,t,n,r){const o=KE(e),i=t_(e,t),s=Array(e.length);for(let a=0,l=i.length;a<l;a++){let c=Al(i[a]);c.static||(c=w5(o,c,t,n,i,r),o.push(c)),s[e.indexOf(i[a])]=c,c.moved=!1}return s}const lX={x:"w",y:"h"};function tC(e,t,n,r){const o=lX[r];t[r]+=1;const i=e.map(s=>s.i).indexOf(t.i);for(let s=i+1;s<e.length;s++){const a=e[s];if(!a.static){if(a.y>t.y+t.h)break;H0(t,a)&&tC(e,a,n+t[o],r)}}t[r]=n}function w5(e,t,n,r,o,i){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(GE(e),t.y);t.y>0&&!gl(e,t);)t.y--;else if(a)for(;t.x>0&&!gl(e,t);)t.x--;let l;for(;(l=gl(e,t))&&!(n===null&&i);)if(a?tC(o,t,l.x+l.w,"x"):tC(o,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!gl(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function C5(e,t){const n=KE(e);for(let r=0,o=e.length;r<o;r++){const i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;gl(n,i);)i.y++}return e}function YE(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function gl(e,t){for(let n=0,r=e.length;n<r;n++)if(H0(e[n],t))return e[n]}function S5(e,t){return e.filter(n=>H0(n,t))}function KE(e){return e.filter(t=>t.static)}function hf(e,t,n,r,o,i,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;const c=t.x,u=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=t_(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const p=S5(d,t),g=p.length>0;if(g&&l)return y5(e);if(g&&i)return`${t.i}`,t.x=c,t.y=u,t.moved=!1,e;for(let m=0,b=p.length;m<b;m++){const y=p[m];`${t.i}${t.x}${t.y}${y.i}${y.x}${y.y}`,!y.moved&&(y.static?e=nC(e,y,t,o,s):e=nC(e,t,y,o,s))}return e}function nC(e,t,n,r,o,i){const s=o==="horizontal",a=o==="vertical",l=t.static;if(r){r=!1;const d={x:s?Math.max(t.x-n.w,0):n.x,y:a?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},h=gl(e,d),p=h&&h.y+h.h>t.y,g=h&&t.x+t.w>h.x;if(h){if(p&&a)return hf(e,n,void 0,t.y+1,r,l,o);if(p&&o==null)return t.y=n.y,n.y=n.y+n.h,e;if(g&&s)return hf(e,t,n.x,void 0,r,l,o)}else return`${n.i}${d.x}${d.y}`,hf(e,n,s?d.x:void 0,a?d.y:void 0,r,l,o)}const c=s?n.x+1:void 0,u=a?n.y+1:void 0;return c==null&&u==null?e:hf(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,o)}function cX(e){return e*100+"%"}const E5=(e,t,n,r)=>e+n>r?t:n,_5=(e,t,n)=>e<0?t:n,R5=e=>Math.max(0,e),XE=e=>Math.max(0,e),QE=(e,t,n)=>{let{left:r,height:o,width:i}=t;const s=e.top-(o-e.height);return{left:r,width:i,height:_5(s,e.height,o),top:XE(s)}},ZE=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{top:r,height:i,width:E5(e.left,e.width,s,n),left:R5(o)}},JE=(e,t,n)=>{let{top:r,height:o,width:i}=t;const s=e.left-(i-e.width);return{height:o,width:s<0?e.width:E5(e.left,e.width,i,n),top:XE(r),left:R5(s)}},e_=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{width:s,left:o,height:_5(r,e.height,i),top:XE(r)}},uX=function(){return QE(arguments.length<=0?void 0:arguments[0],ZE(...arguments))},dX=function(){return QE(arguments.length<=0?void 0:arguments[0],JE(...arguments))},fX=function(){return e_(arguments.length<=0?void 0:arguments[0],ZE(...arguments))},hX=function(){return e_(arguments.length<=0?void 0:arguments[0],JE(...arguments))},pX={n:QE,ne:uX,e:ZE,se:fX,s:e_,sw:hX,w:JE,nw:dX};function mX(e,t,n,r){const o=pX[e];return o?o(t,{...t,...n},r):n}function gX(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}}function bX(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}}function t_(e,t){return t==="horizontal"?N5(e):t==="vertical"?k5(e):e}function k5(e){return e.slice(0).sort(function(t,n){return t.y>n.y||t.y===n.y&&t.x>n.x?1:t.y===n.y&&t.x===n.x?0:-1})}function N5(e){return e.slice(0).sort(function(t,n){return t.x>n.x||t.x===n.x&&t.y>n.y?1:-1})}function yX(e,t,n,r,o){e=e||[];const i=[];ff.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=YE(e,String(a.key)),c=a.props["data-grid"];l&&c==null?i.push(Al(l)):c?(oX||M5([c],"ReactGridLayout.children"),i.push(Al({...c,i:a.key}))):i.push(Al({w:1,h:1,x:0,y:GE(i),i:String(a.key)}))});const s=C5(i,{cols:n});return o?s:x5(s,r,n)}function M5(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const i=e[r];for(let s=0;s<n.length;s++){const a=n[s],l=i[a];if(typeof l!="number"||Number.isNaN(l))throw new Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${l} (${typeof l})`)}if(typeof i.i<"u"&&typeof i.i!="string")throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${i.i} (${typeof i.i})`)}}function vX(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}const xX=()=>{};lt.noop=xX;var zi={};Object.defineProperty(zi,"__esModule",{value:!0});zi.calcGridColWidth=W0;zi.calcGridItemPosition=wX;zi.calcGridItemWHPx=rC;zi.calcWH=SX;zi.calcXY=CX;zi.clamp=bl;function W0(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function rC(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function wX(e,t,n,r,o,i){const{margin:s,containerPadding:a,rowHeight:l}=e,c=W0(e),u={};return i&&i.resizing?(u.width=Math.round(i.resizing.width),u.height=Math.round(i.resizing.height)):(u.width=rC(r,c,s[0]),u.height=rC(o,l,s[1])),i&&i.dragging?(u.top=Math.round(i.dragging.top),u.left=Math.round(i.dragging.left)):i&&i.resizing&&typeof i.resizing.top=="number"&&typeof i.resizing.left=="number"?(u.top=Math.round(i.resizing.top),u.left=Math.round(i.resizing.left)):(u.top=Math.round((l+s[1])*n+a[1]),u.left=Math.round((c+s[0])*t+a[0])),u}function CX(e,t,n,r,o){const{margin:i,containerPadding:s,cols:a,rowHeight:l,maxRows:c}=e,u=W0(e);let d=Math.round((n-s[0])/(u+i[0])),h=Math.round((t-s[1])/(l+i[1]));return d=bl(d,0,a-r),h=bl(h,0,c-o),{x:d,y:h}}function SX(e,t,n,r,o,i){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=W0(e);let d=Math.round((t+s[0])/(u+s[0])),h=Math.round((n+s[1])/(c+s[1])),p=bl(d,0,l-r),g=bl(h,0,a-o);return["sw","w","nw"].indexOf(i)!==-1&&(p=bl(d,0,l)),["nw","n","ne"].indexOf(i)!==-1&&(g=bl(h,0,a)),{w:p,h:g}}function bl(e,t,n){return Math.max(Math.min(e,n),t)}var U0={},oC={exports:{}},vm={exports:{}},kt={};/** @license React v16.13.1
|
|
37
37
|
* react-is.production.min.js
|
|
38
38
|
*
|
|
39
39
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -4226,7 +4226,7 @@ const oe = La()(
|
|
|
4226
4226
|
n.isSessionExpired = !1, n.currentBreakpoint = "lg", n.dashboard = {
|
|
4227
4227
|
id: "",
|
|
4228
4228
|
style: rb
|
|
4229
|
-
}, n.showContext = !1, n.selectedSheetId = null, n.selectedCardId = null, n.selectedFrameId = null, n.selectedCard = null, n.showFilters = !1, n.isDashboardEditing = !
|
|
4229
|
+
}, n.showContext = !1, n.selectedSheetId = null, n.selectedCardId = null, n.selectedFrameId = null, n.selectedCard = null, n.showFilters = !1, n.isDashboardEditing = !1, n.isVisualEditing = !1, n.showDashboardJSON = !1, n.filteringCards = [], n.selectedLensId = void 0, n.filterValues = void 0;
|
|
4230
4230
|
});
|
|
4231
4231
|
},
|
|
4232
4232
|
setAiContext: (n) => {
|
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BPlKV5_b.js"),r=require("../types/index.cjs");exports.Dashboard=e.Dashboard;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/dashboard/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-BPlKV5_b.js"),t=require("./types/index.cjs"),a=require("./chunks/dashboard-plus-ClDAhHk0.js");require("react/jsx-runtime");require("react");require("react-dom");const r=["MM-DD-YYYY","YYYY-MM-DD","MM/DD/YYYY","DD/MM/YYYY","MMMM DD, YYYY","MMM DD, YYYY","DD MMM YYYY","YYYY-MM","MMMM YYYY","custom"];exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getFormattedTableNameForQuery=e.getFormattedTableNameForQuery;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.invalidateToken=e.invalidateToken;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.resolveDatamodelName=e.resolveDatamodelName;exports.useCard=e.useCard;exports.useCurrentActiveCard=e.useCurrentActiveCard;exports.useCurrentCardConfig=e.useCurrentCardConfig;exports.useCurrentSheetActiveCards=e.useCurrentSheetActiveCards;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorAside=e.useEditorAside;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.EMPTY_SELECTION=t.EMPTY_SELECTION;exports.ResourceManagementPanel=a.ResourceManagementPanel;exports.ScheduleDashboard=a.ScheduleDashboard;exports.SelectComponent=a.SelectComponent;exports.Surfboard=a.DashboardPlus;exports.cleanCard=a.cleanCard;exports.downloadPdf=a.downloadPdf;exports.getDashbaordStateWithoutData=a.getDashbaordStateWithoutData;exports.DATE_FORMAT_VALUES=r;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as Y, d as D, S as i, b as u, b as d, m as n, f as M, o as l, n as m, q as p, s as C, l as S, i as T, k as c, p as h, j as b, h as g, g as f, t as y, r as A, c as v, x, z as E, y as F, A as N, w as P, e as k, u as q, C as Q, v as R, B as _, a as w } from "./chunks/index-
|
|
1
|
+
import { D as Y, d as D, S as i, b as u, b as d, m as n, f as M, o as l, n as m, q as p, s as C, l as S, i as T, k as c, p as h, j as b, h as g, g as f, t as y, r as A, c as v, x, z as E, y as F, A as N, w as P, e as k, u as q, C as Q, v as R, B as _, a as w } from "./chunks/index-qsaiQ8Ey.js";
|
|
2
2
|
import { EMPTY_SELECTION as G } from "./types/index.js";
|
|
3
|
-
import { R as I, S as L, a as O, D as V, c as W, d as j, g as z } from "./chunks/dashboard-plus-
|
|
3
|
+
import { R as I, S as L, a as O, D as V, c as W, d as j, g as z } from "./chunks/dashboard-plus-CiSC595N.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-dom";
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-ClDAhHk0.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
|
package/dist/surfboard/index.js
CHANGED