react-semaphor 0.0.129 → 0.0.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var Yi = Object.defineProperty;
2
2
  var Xi = (e, t, n) => t in e ? Yi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Kr = (e, t, n) => (Xi(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { d as In, s as Gn, m as Vn, c as z, g as Zi, a as D, b as v, e as U, o as Dt, i as E, S as R, f as G, h as I, j as ze, k as F, l as Ji, n as Et, p as or, q as j, r as es, t as bn, F as qo, u as Mo, v as V, $ as ct, w as xn, x as jn, y as Be, z as Se, A as ke, I as ts, B as ir, C as M, D as en, E as Br, G as ns, H as Ct, J as Ht, K as Rr, L as J, P as rs, M as os, N as is, O as Mn, Q as ss, R as ls, T as as, U as Pn, V as cs, W as us } from "./index-jyE0UTAE.js";
4
+ import { d as In, s as Gn, m as Vn, c as z, g as Zi, a as D, b as v, e as U, o as Dt, i as E, S as R, f as G, h as I, j as ze, k as F, l as Ji, n as Et, p as or, q as j, r as es, t as bn, F as qo, u as Mo, v as V, $ as ct, w as xn, x as jn, y as Be, z as Se, A as ke, I as ts, B as ir, C as M, D as en, E as Br, G as ns, H as Ct, J as Ht, K as Rr, L as J, P as rs, M as os, N as is, O as Mn, Q as ss, R as ls, T as as, U as Pn, V as cs, W as us } from "./index-4NI8h_Oz.js";
5
5
  import "react";
6
6
  import "react-dom";
7
7
  var Po = {
@@ -8562,7 +8562,7 @@ var Xve = (e, t = !1) => {
8562
8562
  const t = Wz(() => {
8563
8563
  const [n] = K(this, Vc), [r] = K(this, Hc), [i] = K(this, Wc), [o] = K(this, Uc), [s] = K(this, Bc);
8564
8564
  let a;
8565
- K(this, qc) ? a = K(this, qc) : (a = Dz(() => import("./2DAFLIRC-q0QZvyUX.js")), Te(this, qc, a)), BB(K(this, $f));
8565
+ K(this, qc) ? a = K(this, qc) : (a = Dz(() => import("./2DAFLIRC-QFhun_wr.js")), Te(this, qc, a)), BB(K(this, $f));
8566
8566
  const l = this;
8567
8567
  return $z(a, Rz({
8568
8568
  get queryFlavor() {
@@ -12567,7 +12567,7 @@ const Zs = /* @__PURE__ */ Rf(hc), vE = ["lg", "md", "sm", "xs", "xxs"], pe = Fk
12567
12567
  selectedCard: null,
12568
12568
  showFilters: !1,
12569
12569
  //This shpu;d be false by default
12570
- isDashboardEditing: !0,
12570
+ isDashboardEditing: !1,
12571
12571
  // This should be false by defaultdashboard.
12572
12572
  isVisualEditing: !1,
12573
12573
  // This should be false by defaultdashboard.
@@ -1,4 +1,4 @@
1
- import { a7 as t, a6 as r, Z as d, a2 as D, a1 as i, a0 as T, _ as l, a5 as u, a3 as A, am as n, an as E, a4 as h, ap as S, aa as b, a8 as m, aq as _, ac as C, ao as p, ab as g, ae as c, a9 as P, ad as Y, ah as f, af as y, X as q, Y as N, aj as O, ai as k, al as B, ag as v, ak as F } from "./index-jyE0UTAE.js";
1
+ import { a7 as t, a6 as r, Z as d, a2 as D, a1 as i, a0 as T, _ as l, a5 as u, a3 as A, am as n, an as E, a4 as h, ap as S, aa as b, a8 as m, aq as _, ac as C, ao as p, ab as g, ae as c, a9 as P, ad as Y, ah as f, af as y, X as q, Y as N, aj as O, ai as k, al as B, ag as v, ak as F } from "./index-4NI8h_Oz.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
@@ -82,7 +82,7 @@ __p += '`),Ut&&(Oe+=`' +
82
82
  function print() { __p += __j.call(arguments, '') }
83
83
  `:`;
84
84
  `)+Oe+`return __p
85
- }`;var Nt=qL(function(){return nn(j,rt+"return "+Oe).apply(n,W)});if(Nt.source=Oe,E2(Nt))throw Nt;return Nt}function h_e(f){return un(f).toLowerCase()}function p_e(f){return un(f).toUpperCase()}function g_e(f,g,S){if(f=un(f),f&&(S||g===n))return J8(f);if(!f||!(g=jo(g)))return f;var O=Li(f),A=Li(g),j=eN(O,A),W=tN(O,A)+1;return Sl(O,j,W).join("")}function m_e(f,g,S){if(f=un(f),f&&(S||g===n))return f.slice(0,rN(f)+1);if(!f||!(g=jo(g)))return f;var O=Li(f),A=tN(O,Li(g))+1;return Sl(O,0,A).join("")}function v_e(f,g,S){if(f=un(f),f&&(S||g===n))return f.replace(Ss,"");if(!f||!(g=jo(g)))return f;var O=Li(f),A=eN(O,Li(g));return Sl(O,A).join("")}function b_e(f,g){var S=F,O=R;if(zn(g)){var A="separator"in g?g.separator:A;S="length"in g?Tt(g.length):S,O="omission"in g?jo(g.omission):O}f=un(f);var j=f.length;if(Nd(f)){var W=Li(f);j=W.length}if(S>=j)return f;var J=S-Ld(O);if(J<1)return O;var ae=W?Sl(W,0,J).join(""):f.slice(0,J);if(A===n)return ae+O;if(W&&(J+=ae.length-J),k2(A)){if(f.slice(J).search(A)){var we,Se=ae;for(A.global||(A=V_(A.source,un(it.exec(A))+"g")),A.lastIndex=0;we=A.exec(Se);)var Oe=we.index;ae=ae.slice(0,Oe===n?J:Oe)}}else if(f.indexOf(jo(A),J)!=J){var Ve=ae.lastIndexOf(A);Ve>-1&&(ae=ae.slice(0,Ve))}return ae+O}function y_e(f){return f=un(f),f&&ci.test(f)?f.replace(Kn,Kye):f}var x_e=Hd(function(f,g,S){return f+(S?" ":"")+g.toUpperCase()}),D2=WN("toUpperCase");function HL(f,g,S){return f=un(f),g=S?n:g,g===n?Hye(f)?Qye(f):Iye(f):f.match(g)||[]}var qL=Ft(function(f,g){try{return Fo(f,n,g)}catch(S){return E2(S)?S:new wt(S)}}),w_e=ua(function(f,g){return di(g,function(S){S=Es(S),la(f,S,C2(f[S],f))}),f});function S_e(f){var g=f==null?0:f.length,S=ct();return f=g?Ln(f,function(O){if(typeof O[1]!="function")throw new fi(s);return[S(O[0]),O[1]]}):[],Ft(function(O){for(var A=-1;++A<g;){var j=f[A];if(Fo(j[0],this,O))return Fo(j[1],this,O)}})}function C_e(f){return K1e(pi(f,d))}function M2(f){return function(){return f}}function __e(f,g){return f==null||f!==f?g:f}var E_e=GN(),k_e=GN(!0);function ho(f){return f}function $2(f){return CN(typeof f=="function"?f:pi(f,d))}function O_e(f){return EN(pi(f,d))}function P_e(f,g){return kN(f,pi(g,d))}var D_e=Ft(function(f,g){return function(S){return jp(S,f,g)}}),M_e=Ft(function(f,g){return function(S){return jp(f,S,g)}});function T2(f,g,S){var O=vr(g),A=pb(g,O);S==null&&!(zn(g)&&(A.length||!O.length))&&(S=g,g=f,f=this,A=pb(g,vr(g)));var j=!(zn(S)&&"chain"in S)||!!S.chain,W=fa(f);return di(A,function(J){var ae=g[J];f[J]=ae,W&&(f.prototype[J]=function(){var we=this.__chain__;if(j||we){var Se=f(this.__wrapped__),Oe=Se.__actions__=co(this.__actions__);return Oe.push({func:ae,args:arguments,thisArg:f}),Se.__chain__=we,Se}return ae.apply(f,ml([this.value()],arguments))})}),f}function $_e(){return Er._===this&&(Er._=r1e),this}function A2(){}function T_e(f){return f=Tt(f),Ft(function(g){return ON(g,f)})}var A_e=u2(Ln),I_e=u2(K8),N_e=u2(N_);function WL(f){return v2(f)?L_(Es(f)):dxe(f)}function L_e(f){return function(g){return f==null?n:Vc(f,g)}}var F_e=YN(),R_e=YN(!0);function I2(){return[]}function N2(){return!1}function j_e(){return{}}function z_e(){return""}function B_e(){return!0}function V_e(f,g){if(f=Tt(f),f<1||f>Z)return[];var S=H,O=Fr(f,H);g=ct(g),f-=H;for(var A=j_(O,g);++S<f;)g(S);return A}function H_e(f){return kt(f)?Ln(f,Es):zo(f)?[f]:co(dL(un(f)))}function q_e(f){var g=++t1e;return un(f)+g}var W_e=xb(function(f,g){return f+g},0),U_e=d2("ceil"),G_e=xb(function(f,g){return f/g},1),K_e=d2("floor");function Y_e(f){return f&&f.length?hb(f,ho,X_):n}function X_e(f,g){return f&&f.length?hb(f,ct(g,2),X_):n}function Q_e(f){return Q8(f,ho)}function Z_e(f,g){return Q8(f,ct(g,2))}function J_e(f){return f&&f.length?hb(f,ho,e2):n}function e2e(f,g){return f&&f.length?hb(f,ct(g,2),e2):n}var t2e=xb(function(f,g){return f*g},1),n2e=d2("round"),r2e=xb(function(f,g){return f-g},0);function o2e(f){return f&&f.length?R_(f,ho):0}function i2e(f,g){return f&&f.length?R_(f,ct(g,2)):0}return L.after=OSe,L.ary=SL,L.assign=pCe,L.assignIn=LL,L.assignInWith=Ab,L.assignWith=gCe,L.at=mCe,L.before=CL,L.bind=C2,L.bindAll=w_e,L.bindKey=_L,L.castArray=jSe,L.chain=yL,L.chunk=Kxe,L.compact=Yxe,L.concat=Xxe,L.cond=S_e,L.conforms=C_e,L.constant=M2,L.countBy=oSe,L.create=vCe,L.curry=EL,L.curryRight=kL,L.debounce=OL,L.defaults=bCe,L.defaultsDeep=yCe,L.defer=PSe,L.delay=DSe,L.difference=Qxe,L.differenceBy=Zxe,L.differenceWith=Jxe,L.drop=ewe,L.dropRight=twe,L.dropRightWhile=nwe,L.dropWhile=rwe,L.fill=owe,L.filter=sSe,L.flatMap=cSe,L.flatMapDeep=uSe,L.flatMapDepth=dSe,L.flatten=gL,L.flattenDeep=iwe,L.flattenDepth=swe,L.flip=MSe,L.flow=E_e,L.flowRight=k_e,L.fromPairs=awe,L.functions=kCe,L.functionsIn=OCe,L.groupBy=fSe,L.initial=cwe,L.intersection=uwe,L.intersectionBy=dwe,L.intersectionWith=fwe,L.invert=DCe,L.invertBy=MCe,L.invokeMap=pSe,L.iteratee=$2,L.keyBy=gSe,L.keys=vr,L.keysIn=fo,L.map=Ob,L.mapKeys=TCe,L.mapValues=ACe,L.matches=O_e,L.matchesProperty=P_e,L.memoize=Db,L.merge=ICe,L.mergeWith=FL,L.method=D_e,L.methodOf=M_e,L.mixin=T2,L.negate=Mb,L.nthArg=T_e,L.omit=NCe,L.omitBy=LCe,L.once=$Se,L.orderBy=mSe,L.over=A_e,L.overArgs=TSe,L.overEvery=I_e,L.overSome=N_e,L.partial=_2,L.partialRight=PL,L.partition=vSe,L.pick=FCe,L.pickBy=RL,L.property=WL,L.propertyOf=L_e,L.pull=mwe,L.pullAll=vL,L.pullAllBy=vwe,L.pullAllWith=bwe,L.pullAt=ywe,L.range=F_e,L.rangeRight=R_e,L.rearg=ASe,L.reject=xSe,L.remove=xwe,L.rest=ISe,L.reverse=w2,L.sampleSize=SSe,L.set=jCe,L.setWith=zCe,L.shuffle=CSe,L.slice=wwe,L.sortBy=kSe,L.sortedUniq=Pwe,L.sortedUniqBy=Dwe,L.split=c_e,L.spread=NSe,L.tail=Mwe,L.take=$we,L.takeRight=Twe,L.takeRightWhile=Awe,L.takeWhile=Iwe,L.tap=Ywe,L.throttle=LSe,L.thru=kb,L.toArray=AL,L.toPairs=jL,L.toPairsIn=zL,L.toPath=H_e,L.toPlainObject=NL,L.transform=BCe,L.unary=FSe,L.union=Nwe,L.unionBy=Lwe,L.unionWith=Fwe,L.uniq=Rwe,L.uniqBy=jwe,L.uniqWith=zwe,L.unset=VCe,L.unzip=S2,L.unzipWith=bL,L.update=HCe,L.updateWith=qCe,L.values=Ud,L.valuesIn=WCe,L.without=Bwe,L.words=HL,L.wrap=RSe,L.xor=Vwe,L.xorBy=Hwe,L.xorWith=qwe,L.zip=Wwe,L.zipObject=Uwe,L.zipObjectDeep=Gwe,L.zipWith=Kwe,L.entries=jL,L.entriesIn=zL,L.extend=LL,L.extendWith=Ab,T2(L,L),L.add=W_e,L.attempt=qL,L.camelCase=YCe,L.capitalize=BL,L.ceil=U_e,L.clamp=UCe,L.clone=zSe,L.cloneDeep=VSe,L.cloneDeepWith=HSe,L.cloneWith=BSe,L.conformsTo=qSe,L.deburr=VL,L.defaultTo=__e,L.divide=G_e,L.endsWith=XCe,L.eq=Ri,L.escape=QCe,L.escapeRegExp=ZCe,L.every=iSe,L.find=aSe,L.findIndex=hL,L.findKey=xCe,L.findLast=lSe,L.findLastIndex=pL,L.findLastKey=wCe,L.floor=K_e,L.forEach=xL,L.forEachRight=wL,L.forIn=SCe,L.forInRight=CCe,L.forOwn=_Ce,L.forOwnRight=ECe,L.get=O2,L.gt=WSe,L.gte=USe,L.has=PCe,L.hasIn=P2,L.head=mL,L.identity=ho,L.includes=hSe,L.indexOf=lwe,L.inRange=GCe,L.invoke=$Ce,L.isArguments=Wc,L.isArray=kt,L.isArrayBuffer=GSe,L.isArrayLike=uo,L.isArrayLikeObject=Yn,L.isBoolean=KSe,L.isBuffer=Cl,L.isDate=YSe,L.isElement=XSe,L.isEmpty=QSe,L.isEqual=ZSe,L.isEqualWith=JSe,L.isError=E2,L.isFinite=eCe,L.isFunction=fa,L.isInteger=DL,L.isLength=$b,L.isMap=ML,L.isMatch=tCe,L.isMatchWith=nCe,L.isNaN=rCe,L.isNative=oCe,L.isNil=sCe,L.isNull=iCe,L.isNumber=$L,L.isObject=zn,L.isObjectLike=Wn,L.isPlainObject=Wp,L.isRegExp=k2,L.isSafeInteger=aCe,L.isSet=TL,L.isString=Tb,L.isSymbol=zo,L.isTypedArray=Wd,L.isUndefined=lCe,L.isWeakMap=cCe,L.isWeakSet=uCe,L.join=hwe,L.kebabCase=JCe,L.last=mi,L.lastIndexOf=pwe,L.lowerCase=e_e,L.lowerFirst=t_e,L.lt=dCe,L.lte=fCe,L.max=Y_e,L.maxBy=X_e,L.mean=Q_e,L.meanBy=Z_e,L.min=J_e,L.minBy=e2e,L.stubArray=I2,L.stubFalse=N2,L.stubObject=j_e,L.stubString=z_e,L.stubTrue=B_e,L.multiply=t2e,L.nth=gwe,L.noConflict=$_e,L.noop=A2,L.now=Pb,L.pad=n_e,L.padEnd=r_e,L.padStart=o_e,L.parseInt=i_e,L.random=KCe,L.reduce=bSe,L.reduceRight=ySe,L.repeat=s_e,L.replace=a_e,L.result=RCe,L.round=n2e,L.runInContext=oe,L.sample=wSe,L.size=_Se,L.snakeCase=l_e,L.some=ESe,L.sortedIndex=Swe,L.sortedIndexBy=Cwe,L.sortedIndexOf=_we,L.sortedLastIndex=Ewe,L.sortedLastIndexBy=kwe,L.sortedLastIndexOf=Owe,L.startCase=u_e,L.startsWith=d_e,L.subtract=r2e,L.sum=o2e,L.sumBy=i2e,L.template=f_e,L.times=V_e,L.toFinite=ha,L.toInteger=Tt,L.toLength=IL,L.toLower=h_e,L.toNumber=vi,L.toSafeInteger=hCe,L.toString=un,L.toUpper=p_e,L.trim=g_e,L.trimEnd=m_e,L.trimStart=v_e,L.truncate=b_e,L.unescape=y_e,L.uniqueId=q_e,L.upperCase=x_e,L.upperFirst=D2,L.each=xL,L.eachRight=wL,L.first=mL,T2(L,function(){var f={};return Cs(L,function(g,S){hn.call(L.prototype,S)||(f[S]=g)}),f}(),{chain:!1}),L.VERSION=r,di(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){L[f].placeholder=L}),di(["drop","take"],function(f,g){qt.prototype[f]=function(S){S=S===n?1:dr(Tt(S),0);var O=this.__filtered__&&!g?new qt(this):this.clone();return O.__filtered__?O.__takeCount__=Fr(S,O.__takeCount__):O.__views__.push({size:Fr(S,H),type:f+(O.__dir__<0?"Right":"")}),O},qt.prototype[f+"Right"]=function(S){return this.reverse()[f](S).reverse()}}),di(["filter","map","takeWhile"],function(f,g){var S=g+1,O=S==q||S==X;qt.prototype[f]=function(A){var j=this.clone();return j.__iteratees__.push({iteratee:ct(A,3),type:S}),j.__filtered__=j.__filtered__||O,j}}),di(["head","last"],function(f,g){var S="take"+(g?"Right":"");qt.prototype[f]=function(){return this[S](1).value()[0]}}),di(["initial","tail"],function(f,g){var S="drop"+(g?"":"Right");qt.prototype[f]=function(){return this.__filtered__?new qt(this):this[S](1)}}),qt.prototype.compact=function(){return this.filter(ho)},qt.prototype.find=function(f){return this.filter(f).head()},qt.prototype.findLast=function(f){return this.reverse().find(f)},qt.prototype.invokeMap=Ft(function(f,g){return typeof f=="function"?new qt(this):this.map(function(S){return jp(S,f,g)})}),qt.prototype.reject=function(f){return this.filter(Mb(ct(f)))},qt.prototype.slice=function(f,g){f=Tt(f);var S=this;return S.__filtered__&&(f>0||g<0)?new qt(S):(f<0?S=S.takeRight(-f):f&&(S=S.drop(f)),g!==n&&(g=Tt(g),S=g<0?S.dropRight(-g):S.take(g-f)),S)},qt.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},qt.prototype.toArray=function(){return this.take(H)},Cs(qt.prototype,function(f,g){var S=/^(?:filter|find|map|reject)|While$/.test(g),O=/^(?:head|last)$/.test(g),A=L[O?"take"+(g=="last"?"Right":""):g],j=O||/^find/.test(g);A&&(L.prototype[g]=function(){var W=this.__wrapped__,J=O?[1]:arguments,ae=W instanceof qt,we=J[0],Se=ae||kt(W),Oe=function(Ht){var Ut=A.apply(L,ml([Ht],J));return O&&Ve?Ut[0]:Ut};Se&&S&&typeof we=="function"&&we.length!=1&&(ae=Se=!1);var Ve=this.__chain__,rt=!!this.__actions__.length,dt=j&&!Ve,Nt=ae&&!rt;if(!j&&Se){W=Nt?W:new qt(this);var ft=f.apply(W,J);return ft.__actions__.push({func:kb,args:[Oe],thisArg:n}),new hi(ft,Ve)}return dt&&Nt?f.apply(this,J):(ft=this.thru(Oe),dt?O?ft.value()[0]:ft.value():ft)})}),di(["pop","push","shift","sort","splice","unshift"],function(f){var g=Zv[f],S=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",O=/^(?:pop|shift)$/.test(f);L.prototype[f]=function(){var A=arguments;if(O&&!this.__chain__){var j=this.value();return g.apply(kt(j)?j:[],A)}return this[S](function(W){return g.apply(kt(W)?W:[],A)})}}),Cs(qt.prototype,function(f,g){var S=L[g];if(S){var O=S.name+"";hn.call(zd,O)||(zd[O]=[]),zd[O].push({name:g,func:S})}}),zd[yb(n,w).name]=[{name:"wrapper",func:n}],qt.prototype.clone=y1e,qt.prototype.reverse=x1e,qt.prototype.value=w1e,L.prototype.at=Xwe,L.prototype.chain=Qwe,L.prototype.commit=Zwe,L.prototype.next=Jwe,L.prototype.plant=tSe,L.prototype.reverse=nSe,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=rSe,L.prototype.first=L.prototype.head,Tp&&(L.prototype[Tp]=eSe),L},Fd=Zye();Fc?((Fc.exports=Fd)._=Fd,$_._=Fd):Er._=Fd}).call(ma)}(Eg,Eg.exports);var iu=Eg.exports;const Sa=Gd(iu),N5=["lg","md","sm","xs","xxs"],me=dE()(CE((e,t)=>({currentBreakpoint:"lg",dashboard:{id:"",style:oy},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!0,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],actions:{setCardPython:(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===o.selectedSheetId);i&&iu.forEach(i.frames,l=>{var u;const c=(u=l.cards)==null?void 0:u.find(d=>d.id===n);c&&(c.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}))},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}),setBookmarkKey:n=>{e(()=>({bookmarkKey:n}))},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setCardTitle:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.title=o)})})},setCardInfo:(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===o.selectedSheetId);i&&iu.forEach(i.frames,l=>{var u;const c=(u=l.cards)==null?void 0:u.find(d=>d.id===n);c&&(c.info=r)})})},setCardDescription:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.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))}})},setFrameCardData:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.data=o)})})},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;const i=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(c=>c.filterId===o.filterId);i&&i>-1?(a=r.filterValues)==null||a.splice(i,1,o):(l=r.filterValues)==null||l.push(o)}):r.filterValues=n})},removeFilterValue: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 o;r.dashboard.filters?(o=r.dashboard.filters)==null||o.push(n):r.dashboard.filters=[n]})},removeFilter: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);console.log("index",s),s>-1&&((i=r.dashboard.filters)==null||i.splice(s,1))}})},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(m=>m.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))}})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(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){i.frames||(i.frames=[]),(l=i.frames)==null||l.push(r);const d={i:r.id,x:0,y:1/0,w:20,h:7,minW:6,minH:2};(c=i.layout)==null||c.push(d),i!=null&&i.layouts||(i.layouts={}),N5.forEach(h=>{i.layouts[h]||(i.layouts[h]=[]),i.layouts[h].push(d)}),(u=o.onAddFrame)==null||u.call(o,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),i.layouts=N5.reduce((h,p)=>{if(h&&h[p]){const m=h[p].findIndex(v=>v.i===r);typeof m=="number"&&m>-1&&h[p].splice(m,1)}return h},i.layouts))}})},updateFrame:(n,r)=>{e(o=>{var a,l,c,u;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n),s=(c=i==null?void 0:i.frames)==null?void 0:c.findIndex(d=>d.id===r.id);i&&((u=i.frames)==null||u.splice(s,1,r))})},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}))},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)},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},handleDataPointClickAction:(n,r)=>{Cj({card:n,dataPoint:r,set:e,get:t})}}}))),Al=()=>me(e=>e.actions);process.env.NODE_ENV==="development"&&EE("DashboardStore",me);const _j={theme:"system",setTheme:()=>null},L5=b.createContext(_j);function Ej({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=b.useState(()=>localStorage.getItem(n)||t);b.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 x.jsx(L5.Provider,{...r,value:s,children:e})}const Ly=()=>{const e=b.useContext(L5);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};async function kj(e,t,n){return await(await fetch(`https://semaphor.cloud/api/v1/dashboard?id=${e}&version=${t}`,{headers:{Authorization:`Bearer ${n}`}})).json()}function F5(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function R5(e,t){const n=F5(e);return n==="dark"?Sa.merge({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function j5({id:e,version:t,authToken:n,customStyle:r,currentTheme:o,onSave:i,onEvent:s}){const{data:a,refetch:l,isLoading:c,isError:u}=yi({queryKey:[e],queryFn:()=>kj(e,t||"",n==null?void 0:n.accessToken),enabled:!1}),{theme:d,setTheme:h}=Ly(),{setDashboard:p,setSelectedSheetId:m,setStyle:v,setOnSaveFunction:y}=me(D=>D.actions);me(D=>D.actions.setCustomCards);const w=me(D=>D.actions.setFilterValues),C=me(D=>D.actions.setBookmarkKey),_=me(D=>D.actions.setAuthToken),k=me(D=>D.actions.setThemeStyle),E=me(D=>D.actions.setDashboardTheme),P=me(D=>D.actions.setOnEvent);return b.useEffect(()=>{if(d){const D=F5(d);E(D)}},[d,E]),b.useEffect(()=>{o&&h(o)},[o,h]),b.useEffect(()=>{const D=Sa.cloneDeep(oy);if(r){const M=Sa.merge(D,r),I=R5(d,M);k(I),v(M)}else{const M=R5(d,D);k(M),v(oy)}},[d,r,v,k]),b.useEffect(()=>{var R;if(!a||!a.dashboard)return;const D=a.dashboard,M=Ua(D.id),I=JSON.parse(localStorage.getItem(M)||"[]"),F=I.find(B=>B.default===!0);if(F)p(F.template),C(F.name),F.filterValues&&w(F.filterValues);else{p(D);const B=I.find(ie=>(ie==null?void 0:ie.name)==="Original");B?B.template=D:I.push({name:"Original",template:D,default:!1}),localStorage.setItem(M,JSON.stringify(I))}m((R=D.sheets)==null?void 0:R[0].id)},[a,p,m,w,C]),b.useEffect(()=>{i&&y(i),s&&P(s)},[i,y,s,P]),b.useEffect(()=>{n&&n.accessToken&&(_(n),l())},[n,l,_]),{isLoading:c,isError:u}}function Fy({className:e,...t}){return x.jsx("div",{className:$e("animate-pulse rounded-md bg-muted",e),...t})}function z5({className:e,style:t,onSave:n,onEvent:r,LoadingComponent:o,ErrorComponent:i,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,...h}){me(w=>w.selectedSheetId);const p=me(w=>w.themeStyle),m=me(w=>w.onEvent),{isLoading:v,isError:y}=j5({id:a,version:u,authToken:l,customStyle:t,currentTheme:c,onSave:n,onEvent:r});return v||!l?(m==null||m({type:"info",message:`isLoading: ${v}, accessToken: ${l==null?void 0:l.accessToken}`}),o?x.jsx(o,{message:"loading"}):x.jsx("div",{className:"flex items-center gap-3",children:x.jsx(Fy,{className:"h-1 w-full dark:h-[2px]"})})):y?(m==null||m({type:"error",message:"Error fetching dashboard"}),i?(console.log("Error fetching dashboard"),x.jsx(i,{})):x.jsx("div",{children:"Error"})):x.jsx("div",{className:$e("flex h-full grow flex-col justify-between",p==null?void 0:p.dashboardPanel,e),role:"dashboard-panel",...h})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function Ie(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 fr(e,t=[]){let n=[];function r(i,s){const a=b.createContext(s),l=n.length;n=[...n,s];function c(d){const{scope:h,children:p,...m}=d,v=(h==null?void 0:h[e][l])||a,y=b.useMemo(()=>m,Object.values(m));return b.createElement(v.Provider,{value:y},p)}function u(d,h){const p=(h==null?void 0:h[e][l])||a,m=b.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(s=>b.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Oj(o,...t)]}function Oj(...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 b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Pj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kg(...e){return t=>e.forEach(n=>Pj(n,t))}function St(...e){return b.useCallback(kg(...e),e)}const Ms=b.forwardRef((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),i=o.find(Dj);if(i){const s=i.props.children,a=o.map(l=>l===i?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:l);return b.createElement(Ry,de({},r,{ref:t}),b.isValidElement(s)?b.cloneElement(s,void 0,a):null)}return b.createElement(Ry,de({},r,{ref:t}),n)});Ms.displayName="Slot";const Ry=b.forwardRef((e,t)=>{const{children:n,...r}=e;return b.isValidElement(n)?b.cloneElement(n,{...Mj(r,n.props),ref:t?kg(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});Ry.displayName="SlotClone";const B5=({children:e})=>b.createElement(b.Fragment,null,e);function Dj(e){return b.isValidElement(e)&&e.type===B5}function Mj(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 Og(e){const t=e+"CollectionProvider",[n,r]=fr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:v}=p,y=b.useRef(null),w=b.useRef(new Map).current;return b.createElement(o,{scope:m,itemMap:w,collectionRef:y},v)},a=e+"CollectionSlot",l=b.forwardRef((p,m)=>{const{scope:v,children:y}=p,w=i(a,v),C=St(m,w.collectionRef);return b.createElement(Ms,{ref:C},y)}),c=e+"CollectionItemSlot",u="data-radix-collection-item",d=b.forwardRef((p,m)=>{const{scope:v,children:y,...w}=p,C=b.useRef(null),_=St(m,C),k=i(c,v);return b.useEffect(()=>(k.itemMap.set(C,{ref:C,...w}),()=>void k.itemMap.delete(C))),b.createElement(Ms,{[u]:"",ref:_},y)});function h(p){const m=i(e+"CollectionConsumer",p);return b.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,r]}const Pr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},$j=he.useId||(()=>{});let Tj=0;function Xr(e){const[t,n]=he.useState($j());return Pr(()=>{e||n(r=>r??String(Tj++))},[e]),e||(t?`radix-${t}`:"")}const ot=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=b.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Ms:t;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,de({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function V5(e,t){e&&Jt.flushSync(()=>e.dispatchEvent(t))}function or(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Dr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Aj({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=or(n),l=b.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 Aj({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,o=b.useRef(r),i=or(t);return b.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Ij=b.createContext(void 0);function Il(e){const t=b.useContext(Ij);return e||t||"ltr"}const jy="rovingFocusGroup.onEntryFocus",Nj={bubbles:!1,cancelable:!0},zy="RovingFocusGroup",[By,H5,Lj]=Og(zy),[Fj,su]=fr(zy,[Lj]),[Rj,jj]=Fj(zy),zj=b.forwardRef((e,t)=>b.createElement(By.Provider,{scope:e.__scopeRovingFocusGroup},b.createElement(By.Slot,{scope:e.__scopeRovingFocusGroup},b.createElement(Bj,de({},e,{ref:t}))))),Bj=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...u}=e,d=b.useRef(null),h=St(t,d),p=Il(i),[m=null,v]=Dr({prop:s,defaultProp:a,onChange:l}),[y,w]=b.useState(!1),C=or(c),_=H5(n),k=b.useRef(!1),[E,P]=b.useState(0);return b.useEffect(()=>{const D=d.current;if(D)return D.addEventListener(jy,C),()=>D.removeEventListener(jy,C)},[C]),b.createElement(Rj,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:b.useCallback(D=>v(D),[v]),onItemShiftTab:b.useCallback(()=>w(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(D=>D+1),[]),onFocusableItemRemove:b.useCallback(()=>P(D=>D-1),[])},b.createElement(ot.div,de({tabIndex:y||E===0?-1:0,"data-orientation":r},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{k.current=!0}),onFocus:Ie(e.onFocus,D=>{const M=!k.current;if(D.target===D.currentTarget&&M&&!y){const I=new CustomEvent(jy,Nj);if(D.currentTarget.dispatchEvent(I),!I.defaultPrevented){const F=_().filter(z=>z.focusable),R=F.find(z=>z.active),B=F.find(z=>z.id===m),q=[R,B,...F].filter(Boolean).map(z=>z.ref.current);q5(q)}}k.current=!1}),onBlur:Ie(e.onBlur,()=>w(!1))})))}),Vj="RovingFocusGroupItem",Hj=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=Xr(),l=i||a,c=jj(Vj,n),u=c.currentTabStopId===l,d=H5(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return b.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),b.createElement(By.ItemSlot,{scope:n,id:l,focusable:r,active:o},b.createElement(ot.span,de({tabIndex:u?0:-1,"data-orientation":c.orientation},s,{ref:t,onMouseDown:Ie(e.onMouseDown,m=>{r?c.onItemFocus(l):m.preventDefault()}),onFocus:Ie(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ie(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Uj(m,c.orientation,c.dir);if(v!==void 0){m.preventDefault();let w=d().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const C=w.indexOf(m.currentTarget);w=c.loop?Gj(w,C+1):w.slice(C+1)}setTimeout(()=>q5(w))}})})))}),qj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Uj(e,t,n){const r=Wj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qj[r]}function q5(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Gj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Vy=zj,Hy=Hj;function Kj(e,t){return b.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Qn=e=>{const{present:t,children:n}=e,r=Yj(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=St(r.ref,o.ref);return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};Qn.displayName="Presence";function Yj(e){const[t,n]=b.useState(),r=b.useRef({}),o=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Kj(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Pg(r.current);i.current=a==="mounted"?c:"none"},[a]),Pr(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,p=Pg(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]),Pr(()=>{if(t){const c=d=>{const p=Pg(r.current).includes(d.animationName);d.target===t&&p&&Jt.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=Pg(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Pg(e){return(e==null?void 0:e.animationName)||"none"}const W5="Tabs",[Xj,f2e]=fr(W5,[su]),U5=su(),[Qj,qy]=Xj(W5),Zj=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Il(a),[d,h]=Dr({prop:r,onChange:o,defaultProp:i});return b.createElement(Qj,{scope:n,baseId:Xr(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l},b.createElement(ot.div,de({dir:u,"data-orientation":s},c,{ref:t})))}),Jj="TabsList",ez=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=qy(Jj,n),s=U5(n);return b.createElement(Vy,de({asChild:!0},s,{orientation:i.orientation,dir:i.dir,loop:r}),b.createElement(ot.div,de({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),tz="TabsTrigger",nz=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=qy(tz,n),a=U5(n),l=G5(s.baseId,r),c=K5(s.baseId,r),u=r===s.value;return b.createElement(Hy,de({asChild:!0},a,{focusable:!o,active:u}),b.createElement(ot.button,de({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:Ie(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:Ie(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:Ie(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(r)})})))}),rz="TabsContent",oz=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=qy(rz,n),l=G5(a.baseId,r),c=K5(a.baseId,r),u=r===a.value,d=b.useRef(u);return b.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),b.createElement(Qn,{present:o||u},({present:h})=>b.createElement(ot.div,de({"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}}),h&&i))});function G5(e,t){return`${e}-trigger-${t}`}function K5(e,t){return`${e}-content-${t}`}const iz=Zj,Y5=ez,X5=nz,Q5=oz,Z5=iz,J5=he.forwardRef(({className:e,...t},n)=>x.jsx(Y5,{ref:n,className:$e("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));J5.displayName=Y5.displayName;const Wy=he.forwardRef(({className:e,...t},n)=>x.jsx(X5,{ref:n,className:$e("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}));Wy.displayName=X5.displayName;const Dg=he.forwardRef(({className:e,...t},n)=>x.jsx(Q5,{ref:n,className:$e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Dg.displayName=Q5.displayName;var ek={exports:{}},gf={},Uy={exports:{}};(function(e,t){(function(n,r){r(t)})(ma,function(n){function r(se){return function(le,xe,K,Fe,ve,ze,Ze){return se(le,xe,Ze)}}function o(se){return function(le,xe,K,Fe){if(!le||!xe||typeof le!="object"||typeof xe!="object")return se(le,xe,K,Fe);var ve=Fe.get(le),ze=Fe.get(xe);if(ve&&ze)return ve===xe&&ze===le;Fe.set(le,xe),Fe.set(xe,le);var Ze=se(le,xe,K,Fe);return Fe.delete(le),Fe.delete(xe),Ze}}function i(se,ne){var le={};for(var xe in se)le[xe]=se[xe];for(var xe in ne)le[xe]=ne[xe];return le}function s(se){return se.constructor===Object||se.constructor==null}function a(se){return typeof se.then=="function"}function l(se,ne){return se===ne||se!==se&&ne!==ne}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",h="[object RegExp]",p="[object Map]",m="[object Number]",v="[object Object]",y="[object Set]",w="[object String]",C=Object.prototype.toString;function _(se){var ne=se.areArraysEqual,le=se.areDatesEqual,xe=se.areMapsEqual,K=se.areObjectsEqual,Fe=se.areRegExpsEqual,ve=se.areSetsEqual,ze=se.createIsNestedEqual,Ze=ze(et);function et(Xe,tt,_t){if(Xe===tt)return!0;if(!Xe||!tt||typeof Xe!="object"||typeof tt!="object")return Xe!==Xe&&tt!==tt;if(s(Xe)&&s(tt))return K(Xe,tt,Ze,_t);var Lt=Array.isArray(Xe),ln=Array.isArray(tt);if(Lt||ln)return Lt===ln&&ne(Xe,tt,Ze,_t);var Zt=C.call(Xe);return Zt!==C.call(tt)?!1:Zt===d?le(Xe,tt,Ze,_t):Zt===h?Fe(Xe,tt,Ze,_t):Zt===p?xe(Xe,tt,Ze,_t):Zt===y?ve(Xe,tt,Ze,_t):Zt===v||Zt===c?a(Xe)||a(tt)?!1:K(Xe,tt,Ze,_t):Zt===u||Zt===m||Zt===w?l(Xe.valueOf(),tt.valueOf()):!1}return et}function k(se,ne,le,xe){var K=se.length;if(ne.length!==K)return!1;for(;K-- >0;)if(!le(se[K],ne[K],K,K,se,ne,xe))return!1;return!0}var E=o(k);function P(se,ne){return l(se.valueOf(),ne.valueOf())}function D(se,ne,le,xe){var K=se.size===ne.size;if(!K)return!1;if(!se.size)return!0;var Fe={},ve=0;return se.forEach(function(ze,Ze){if(K){var et=!1,Xe=0;ne.forEach(function(tt,_t){!et&&!Fe[Xe]&&(et=le(Ze,_t,ve,Xe,se,ne,xe)&&le(ze,tt,Ze,_t,se,ne,xe))&&(Fe[Xe]=!0),Xe++}),ve++,K=et}}),K}var M=o(D),I="_owner",F=Object.prototype.hasOwnProperty;function R(se,ne,le,xe){var K=Object.keys(se),Fe=K.length;if(Object.keys(ne).length!==Fe)return!1;for(var ve;Fe-- >0;){if(ve=K[Fe],ve===I){var ze=!!se.$$typeof,Ze=!!ne.$$typeof;if((ze||Ze)&&ze!==Ze)return!1}if(!F.call(ne,ve)||!le(se[ve],ne[ve],ve,ve,se,ne,xe))return!1}return!0}var B=o(R);function ie(se,ne){return se.source===ne.source&&se.flags===ne.flags}function q(se,ne,le,xe){var K=se.size===ne.size;if(!K)return!1;if(!se.size)return!0;var Fe={};return se.forEach(function(ve,ze){if(K){var Ze=!1,et=0;ne.forEach(function(Xe,tt){!Ze&&!Fe[et]&&(Ze=le(ve,Xe,ze,tt,se,ne,xe))&&(Fe[et]=!0),et++}),K=Ze}}),K}var z=o(q),X=Object.freeze({areArraysEqual:k,areDatesEqual:P,areMapsEqual:D,areObjectsEqual:R,areRegExpsEqual:ie,areSetsEqual:q,createIsNestedEqual:r}),U=Object.freeze({areArraysEqual:E,areDatesEqual:P,areMapsEqual:M,areObjectsEqual:B,areRegExpsEqual:ie,areSetsEqual:z,createIsNestedEqual:r}),Z=_(X);function G(se,ne){return Z(se,ne,void 0)}var $=_(i(X,{createIsNestedEqual:function(){return l}}));function H(se,ne){return $(se,ne,void 0)}var re=_(U);function N(se,ne){return re(se,ne,new WeakMap)}var V=_(i(U,{createIsNestedEqual:function(){return l}}));function ue(se,ne){return V(se,ne,new WeakMap)}function ce(se){return _(i(X,se(X)))}function pe(se){var ne=_(i(U,se(U)));return function(le,xe,K){return K===void 0&&(K=new WeakMap),ne(le,xe,K)}}n.circularDeepEqual=N,n.circularShallowEqual=ue,n.createCustomCircularEqual=pe,n.createCustomEqual=ce,n.deepEqual=G,n.sameValueZeroEqual=l,n.shallowEqual=H,Object.defineProperty(n,"__esModule",{value:!0})})})(Uy,Uy.exports);var Gy=Uy.exports;const Ky=Lb(ZL);var Rt={},sz=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(Rt,"__esModule",{value:!0}),Rt.bottom=Yy,Rt.childrenEqual=uz,Rt.cloneLayout=nk,Rt.cloneLayoutItem=Nl,Rt.collides=Mg,Rt.compact=ok,Rt.compactItem=ik,Rt.compactType=xz,Rt.correctBounds=sk,Rt.fastPositionEqual=fz,Rt.fastRGLPropsEqual=void 0,Rt.getAllCollisions=ak,Rt.getFirstCollision=Ll,Rt.getLayoutItem=Qy,Rt.getStatics=Zy,Rt.modifyLayout=rk,Rt.moveElement=vf,Rt.moveElementAwayFromCollision=Jy,Rt.noop=void 0,Rt.perc=pz,Rt.resizeItemInDirection=mz,Rt.setTopLeft=bz,Rt.setTransform=vz,Rt.sortLayoutItems=i1,Rt.sortLayoutItemsByColRow=fk,Rt.sortLayoutItemsByRowCol=dk,Rt.synchronizeLayoutWithChildren=yz,Rt.validateLayout=hk,Rt.withLayoutItem=cz;var tk=Gy,mf=az(b);function az(e){return e&&e.__esModule?e:{default:e}}const lz=process.env.NODE_ENV==="production";function Yy(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 nk(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Nl(e[n]);return t}function rk(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 cz(e,t,n){let r=Qy(e,t);return r?(r=n(Nl(r)),e=rk(e,r),[e,r]):[e,null]}function Nl(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 uz(e,t){return(0,tk.deepEqual)(mf.default.Children.map(e,n=>n==null?void 0:n.key),mf.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,tk.deepEqual)(mf.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),mf.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}const dz=sz;Rt.fastRGLPropsEqual=dz;function fz(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function Mg(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 ok(e,t,n,r){const o=Zy(e),i=i1(e,t),s=Array(e.length);for(let a=0,l=i.length;a<l;a++){let c=Nl(i[a]);c.static||(c=ik(o,c,t,n,i,r),o.push(c)),s[e.indexOf(i[a])]=c,c.moved=!1}return s}const hz={x:"w",y:"h"};function Xy(e,t,n,r){const o=hz[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;Mg(t,a)&&Xy(e,a,n+t[o],r)}}t[r]=n}function ik(e,t,n,r,o,i){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(Yy(e),t.y);t.y>0&&!Ll(e,t);)t.y--;else if(a)for(;t.x>0&&!Ll(e,t);)t.x--;let l;for(;(l=Ll(e,t))&&!(n===null&&i);)if(a?Xy(o,t,l.x+l.w,"x"):Xy(o,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!Ll(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function sk(e,t){const n=Zy(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(;Ll(n,i);)i.y++}return e}function Qy(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function Ll(e,t){for(let n=0,r=e.length;n<r;n++)if(Mg(e[n],t))return e[n]}function ak(e,t){return e.filter(n=>Mg(n,t))}function Zy(e){return e.filter(t=>t.static)}function vf(e,t,n,r,o,i,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;"Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(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=i1(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const p=ak(d,t),m=p.length>0;if(m&&l)return nk(e);if(m&&i)return"Collision prevented on ".concat(t.i,", reverting."),t.x=c,t.y=u,t.moved=!1,e;for(let v=0,y=p.length;v<y;v++){const w=p[v];"Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(w.i," at [").concat(w.x,",").concat(w.y,"]"),!w.moved&&(w.static?e=Jy(e,w,t,o,s):e=Jy(e,t,w,o,s))}return e}function Jy(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=Ll(e,d),p=h&&h.y+h.h>t.y,m=h&&t.x+t.w>h.x;if(h){if(p&&a)return vf(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(m&&s)return vf(e,t,n.x,void 0,r,l,o)}else return"Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"]."),vf(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:vf(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,o)}function pz(e){return e*100+"%"}const lk=(e,t,n,r)=>e+n>r?t:n,ck=(e,t,n)=>e<0?t:n,uk=e=>Math.max(0,e),e1=e=>Math.max(0,e),t1=(e,t,n)=>{let{left:r,height:o,width:i}=t;const s=e.top-(o-e.height);return{left:r,width:i,height:ck(s,e.height,o),top:e1(s)}},n1=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{top:r,height:i,width:lk(e.left,e.width,s,n),left:uk(o)}},r1=(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:lk(e.left,e.width,i,n),top:e1(r),left:uk(s)}},o1=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{width:s,left:o,height:ck(r,e.height,i),top:e1(r)}},gz={n:t1,ne:function(){return t1(arguments.length<=0?void 0:arguments[0],n1(...arguments))},e:n1,se:function(){return o1(arguments.length<=0?void 0:arguments[0],n1(...arguments))},s:o1,sw:function(){return o1(arguments.length<=0?void 0:arguments[0],r1(...arguments))},w:r1,nw:function(){return t1(arguments.length<=0?void 0:arguments[0],r1(...arguments))}};function mz(e,t,n,r){const o=gz[e];return o?o(t,{...t,...n},r):n}function vz(e){let{top:t,left:n,width:r,height:o}=e;const i="translate(".concat(n,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function bz(e){let{top:t,left:n,width:r,height:o}=e;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function i1(e,t){return t==="horizontal"?fk(e):t==="vertical"?dk(e):e}function dk(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 fk(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 yz(e,t,n,r,o){e=e||[];const i=[];mf.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=Qy(e,String(a.key)),c=a.props["data-grid"];l&&c==null?i.push(Nl(l)):c?(lz||hk([c],"ReactGridLayout.children"),i.push(Nl({...c,i:a.key}))):i.push(Nl({w:1,h:1,x:0,y:Yy(i),i:String(a.key)}))});const s=sk(i,{cols:n});return o?s:ok(s,r,n)}function hk(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++)if(typeof i[n[s]]!="number")throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[s]+" must be a number!")}}function xz(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}function v2e(){}const wz=()=>{};Rt.noop=wz;var Hi={};Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.calcGridColWidth=$g,Hi.calcGridItemPosition=Sz,Hi.calcGridItemWHPx=s1,Hi.calcWH=_z,Hi.calcXY=Cz,Hi.clamp=Fl;function $g(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function s1(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Sz(e,t,n,r,o,i){const{margin:s,containerPadding:a,rowHeight:l}=e,c=$g(e),u={};return i&&i.resizing?(u.width=Math.round(i.resizing.width),u.height=Math.round(i.resizing.height)):(u.width=s1(r,c,s[0]),u.height=s1(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 Cz(e,t,n,r,o){const{margin:i,cols:s,rowHeight:a,maxRows:l}=e,c=$g(e);let u=Math.round((n-i[0])/(c+i[0])),d=Math.round((t-i[1])/(a+i[1]));return u=Fl(u,0,s-r),d=Fl(d,0,l-o),{x:u,y:d}}function _z(e,t,n,r,o,i){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=$g(e);let d=Math.round((t+s[0])/(u+s[0])),h=Math.round((n+s[1])/(c+s[1])),p=Fl(d,0,l-r),m=Fl(h,0,a-o);return["sw","w","nw"].indexOf(i)!==-1&&(p=Fl(d,0,l)),["nw","n","ne"].indexOf(i)!==-1&&(m=Fl(h,0,a)),{w:p,h:m}}function Fl(e,t,n){return Math.max(Math.min(e,n),t)}var Tg={},a1={exports:{}},l1,pk;function c1(){if(pk)return l1;pk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return l1=e,l1}var u1,gk;function Ez(){if(gk)return u1;gk=1;var e=c1();function t(){}function n(){}return n.resetWarningCache=t,u1=function(){function r(s,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},u1}var Ag={exports:{}},on={};/** @license React v16.13.1
85
+ }`;var Nt=qL(function(){return nn(j,rt+"return "+Oe).apply(n,W)});if(Nt.source=Oe,E2(Nt))throw Nt;return Nt}function h_e(f){return un(f).toLowerCase()}function p_e(f){return un(f).toUpperCase()}function g_e(f,g,S){if(f=un(f),f&&(S||g===n))return J8(f);if(!f||!(g=jo(g)))return f;var O=Li(f),A=Li(g),j=eN(O,A),W=tN(O,A)+1;return Sl(O,j,W).join("")}function m_e(f,g,S){if(f=un(f),f&&(S||g===n))return f.slice(0,rN(f)+1);if(!f||!(g=jo(g)))return f;var O=Li(f),A=tN(O,Li(g))+1;return Sl(O,0,A).join("")}function v_e(f,g,S){if(f=un(f),f&&(S||g===n))return f.replace(Ss,"");if(!f||!(g=jo(g)))return f;var O=Li(f),A=eN(O,Li(g));return Sl(O,A).join("")}function b_e(f,g){var S=F,O=R;if(zn(g)){var A="separator"in g?g.separator:A;S="length"in g?Tt(g.length):S,O="omission"in g?jo(g.omission):O}f=un(f);var j=f.length;if(Nd(f)){var W=Li(f);j=W.length}if(S>=j)return f;var J=S-Ld(O);if(J<1)return O;var ae=W?Sl(W,0,J).join(""):f.slice(0,J);if(A===n)return ae+O;if(W&&(J+=ae.length-J),k2(A)){if(f.slice(J).search(A)){var we,Se=ae;for(A.global||(A=V_(A.source,un(it.exec(A))+"g")),A.lastIndex=0;we=A.exec(Se);)var Oe=we.index;ae=ae.slice(0,Oe===n?J:Oe)}}else if(f.indexOf(jo(A),J)!=J){var Ve=ae.lastIndexOf(A);Ve>-1&&(ae=ae.slice(0,Ve))}return ae+O}function y_e(f){return f=un(f),f&&ci.test(f)?f.replace(Kn,Kye):f}var x_e=Hd(function(f,g,S){return f+(S?" ":"")+g.toUpperCase()}),D2=WN("toUpperCase");function HL(f,g,S){return f=un(f),g=S?n:g,g===n?Hye(f)?Qye(f):Iye(f):f.match(g)||[]}var qL=Ft(function(f,g){try{return Fo(f,n,g)}catch(S){return E2(S)?S:new wt(S)}}),w_e=ua(function(f,g){return di(g,function(S){S=Es(S),la(f,S,C2(f[S],f))}),f});function S_e(f){var g=f==null?0:f.length,S=ct();return f=g?Ln(f,function(O){if(typeof O[1]!="function")throw new fi(s);return[S(O[0]),O[1]]}):[],Ft(function(O){for(var A=-1;++A<g;){var j=f[A];if(Fo(j[0],this,O))return Fo(j[1],this,O)}})}function C_e(f){return K1e(pi(f,d))}function M2(f){return function(){return f}}function __e(f,g){return f==null||f!==f?g:f}var E_e=GN(),k_e=GN(!0);function ho(f){return f}function $2(f){return CN(typeof f=="function"?f:pi(f,d))}function O_e(f){return EN(pi(f,d))}function P_e(f,g){return kN(f,pi(g,d))}var D_e=Ft(function(f,g){return function(S){return jp(S,f,g)}}),M_e=Ft(function(f,g){return function(S){return jp(f,S,g)}});function T2(f,g,S){var O=vr(g),A=pb(g,O);S==null&&!(zn(g)&&(A.length||!O.length))&&(S=g,g=f,f=this,A=pb(g,vr(g)));var j=!(zn(S)&&"chain"in S)||!!S.chain,W=fa(f);return di(A,function(J){var ae=g[J];f[J]=ae,W&&(f.prototype[J]=function(){var we=this.__chain__;if(j||we){var Se=f(this.__wrapped__),Oe=Se.__actions__=co(this.__actions__);return Oe.push({func:ae,args:arguments,thisArg:f}),Se.__chain__=we,Se}return ae.apply(f,ml([this.value()],arguments))})}),f}function $_e(){return Er._===this&&(Er._=r1e),this}function A2(){}function T_e(f){return f=Tt(f),Ft(function(g){return ON(g,f)})}var A_e=u2(Ln),I_e=u2(K8),N_e=u2(N_);function WL(f){return v2(f)?L_(Es(f)):dxe(f)}function L_e(f){return function(g){return f==null?n:Vc(f,g)}}var F_e=YN(),R_e=YN(!0);function I2(){return[]}function N2(){return!1}function j_e(){return{}}function z_e(){return""}function B_e(){return!0}function V_e(f,g){if(f=Tt(f),f<1||f>Z)return[];var S=H,O=Fr(f,H);g=ct(g),f-=H;for(var A=j_(O,g);++S<f;)g(S);return A}function H_e(f){return kt(f)?Ln(f,Es):zo(f)?[f]:co(dL(un(f)))}function q_e(f){var g=++t1e;return un(f)+g}var W_e=xb(function(f,g){return f+g},0),U_e=d2("ceil"),G_e=xb(function(f,g){return f/g},1),K_e=d2("floor");function Y_e(f){return f&&f.length?hb(f,ho,X_):n}function X_e(f,g){return f&&f.length?hb(f,ct(g,2),X_):n}function Q_e(f){return Q8(f,ho)}function Z_e(f,g){return Q8(f,ct(g,2))}function J_e(f){return f&&f.length?hb(f,ho,e2):n}function e2e(f,g){return f&&f.length?hb(f,ct(g,2),e2):n}var t2e=xb(function(f,g){return f*g},1),n2e=d2("round"),r2e=xb(function(f,g){return f-g},0);function o2e(f){return f&&f.length?R_(f,ho):0}function i2e(f,g){return f&&f.length?R_(f,ct(g,2)):0}return L.after=OSe,L.ary=SL,L.assign=pCe,L.assignIn=LL,L.assignInWith=Ab,L.assignWith=gCe,L.at=mCe,L.before=CL,L.bind=C2,L.bindAll=w_e,L.bindKey=_L,L.castArray=jSe,L.chain=yL,L.chunk=Kxe,L.compact=Yxe,L.concat=Xxe,L.cond=S_e,L.conforms=C_e,L.constant=M2,L.countBy=oSe,L.create=vCe,L.curry=EL,L.curryRight=kL,L.debounce=OL,L.defaults=bCe,L.defaultsDeep=yCe,L.defer=PSe,L.delay=DSe,L.difference=Qxe,L.differenceBy=Zxe,L.differenceWith=Jxe,L.drop=ewe,L.dropRight=twe,L.dropRightWhile=nwe,L.dropWhile=rwe,L.fill=owe,L.filter=sSe,L.flatMap=cSe,L.flatMapDeep=uSe,L.flatMapDepth=dSe,L.flatten=gL,L.flattenDeep=iwe,L.flattenDepth=swe,L.flip=MSe,L.flow=E_e,L.flowRight=k_e,L.fromPairs=awe,L.functions=kCe,L.functionsIn=OCe,L.groupBy=fSe,L.initial=cwe,L.intersection=uwe,L.intersectionBy=dwe,L.intersectionWith=fwe,L.invert=DCe,L.invertBy=MCe,L.invokeMap=pSe,L.iteratee=$2,L.keyBy=gSe,L.keys=vr,L.keysIn=fo,L.map=Ob,L.mapKeys=TCe,L.mapValues=ACe,L.matches=O_e,L.matchesProperty=P_e,L.memoize=Db,L.merge=ICe,L.mergeWith=FL,L.method=D_e,L.methodOf=M_e,L.mixin=T2,L.negate=Mb,L.nthArg=T_e,L.omit=NCe,L.omitBy=LCe,L.once=$Se,L.orderBy=mSe,L.over=A_e,L.overArgs=TSe,L.overEvery=I_e,L.overSome=N_e,L.partial=_2,L.partialRight=PL,L.partition=vSe,L.pick=FCe,L.pickBy=RL,L.property=WL,L.propertyOf=L_e,L.pull=mwe,L.pullAll=vL,L.pullAllBy=vwe,L.pullAllWith=bwe,L.pullAt=ywe,L.range=F_e,L.rangeRight=R_e,L.rearg=ASe,L.reject=xSe,L.remove=xwe,L.rest=ISe,L.reverse=w2,L.sampleSize=SSe,L.set=jCe,L.setWith=zCe,L.shuffle=CSe,L.slice=wwe,L.sortBy=kSe,L.sortedUniq=Pwe,L.sortedUniqBy=Dwe,L.split=c_e,L.spread=NSe,L.tail=Mwe,L.take=$we,L.takeRight=Twe,L.takeRightWhile=Awe,L.takeWhile=Iwe,L.tap=Ywe,L.throttle=LSe,L.thru=kb,L.toArray=AL,L.toPairs=jL,L.toPairsIn=zL,L.toPath=H_e,L.toPlainObject=NL,L.transform=BCe,L.unary=FSe,L.union=Nwe,L.unionBy=Lwe,L.unionWith=Fwe,L.uniq=Rwe,L.uniqBy=jwe,L.uniqWith=zwe,L.unset=VCe,L.unzip=S2,L.unzipWith=bL,L.update=HCe,L.updateWith=qCe,L.values=Ud,L.valuesIn=WCe,L.without=Bwe,L.words=HL,L.wrap=RSe,L.xor=Vwe,L.xorBy=Hwe,L.xorWith=qwe,L.zip=Wwe,L.zipObject=Uwe,L.zipObjectDeep=Gwe,L.zipWith=Kwe,L.entries=jL,L.entriesIn=zL,L.extend=LL,L.extendWith=Ab,T2(L,L),L.add=W_e,L.attempt=qL,L.camelCase=YCe,L.capitalize=BL,L.ceil=U_e,L.clamp=UCe,L.clone=zSe,L.cloneDeep=VSe,L.cloneDeepWith=HSe,L.cloneWith=BSe,L.conformsTo=qSe,L.deburr=VL,L.defaultTo=__e,L.divide=G_e,L.endsWith=XCe,L.eq=Ri,L.escape=QCe,L.escapeRegExp=ZCe,L.every=iSe,L.find=aSe,L.findIndex=hL,L.findKey=xCe,L.findLast=lSe,L.findLastIndex=pL,L.findLastKey=wCe,L.floor=K_e,L.forEach=xL,L.forEachRight=wL,L.forIn=SCe,L.forInRight=CCe,L.forOwn=_Ce,L.forOwnRight=ECe,L.get=O2,L.gt=WSe,L.gte=USe,L.has=PCe,L.hasIn=P2,L.head=mL,L.identity=ho,L.includes=hSe,L.indexOf=lwe,L.inRange=GCe,L.invoke=$Ce,L.isArguments=Wc,L.isArray=kt,L.isArrayBuffer=GSe,L.isArrayLike=uo,L.isArrayLikeObject=Yn,L.isBoolean=KSe,L.isBuffer=Cl,L.isDate=YSe,L.isElement=XSe,L.isEmpty=QSe,L.isEqual=ZSe,L.isEqualWith=JSe,L.isError=E2,L.isFinite=eCe,L.isFunction=fa,L.isInteger=DL,L.isLength=$b,L.isMap=ML,L.isMatch=tCe,L.isMatchWith=nCe,L.isNaN=rCe,L.isNative=oCe,L.isNil=sCe,L.isNull=iCe,L.isNumber=$L,L.isObject=zn,L.isObjectLike=Wn,L.isPlainObject=Wp,L.isRegExp=k2,L.isSafeInteger=aCe,L.isSet=TL,L.isString=Tb,L.isSymbol=zo,L.isTypedArray=Wd,L.isUndefined=lCe,L.isWeakMap=cCe,L.isWeakSet=uCe,L.join=hwe,L.kebabCase=JCe,L.last=mi,L.lastIndexOf=pwe,L.lowerCase=e_e,L.lowerFirst=t_e,L.lt=dCe,L.lte=fCe,L.max=Y_e,L.maxBy=X_e,L.mean=Q_e,L.meanBy=Z_e,L.min=J_e,L.minBy=e2e,L.stubArray=I2,L.stubFalse=N2,L.stubObject=j_e,L.stubString=z_e,L.stubTrue=B_e,L.multiply=t2e,L.nth=gwe,L.noConflict=$_e,L.noop=A2,L.now=Pb,L.pad=n_e,L.padEnd=r_e,L.padStart=o_e,L.parseInt=i_e,L.random=KCe,L.reduce=bSe,L.reduceRight=ySe,L.repeat=s_e,L.replace=a_e,L.result=RCe,L.round=n2e,L.runInContext=oe,L.sample=wSe,L.size=_Se,L.snakeCase=l_e,L.some=ESe,L.sortedIndex=Swe,L.sortedIndexBy=Cwe,L.sortedIndexOf=_we,L.sortedLastIndex=Ewe,L.sortedLastIndexBy=kwe,L.sortedLastIndexOf=Owe,L.startCase=u_e,L.startsWith=d_e,L.subtract=r2e,L.sum=o2e,L.sumBy=i2e,L.template=f_e,L.times=V_e,L.toFinite=ha,L.toInteger=Tt,L.toLength=IL,L.toLower=h_e,L.toNumber=vi,L.toSafeInteger=hCe,L.toString=un,L.toUpper=p_e,L.trim=g_e,L.trimEnd=m_e,L.trimStart=v_e,L.truncate=b_e,L.unescape=y_e,L.uniqueId=q_e,L.upperCase=x_e,L.upperFirst=D2,L.each=xL,L.eachRight=wL,L.first=mL,T2(L,function(){var f={};return Cs(L,function(g,S){hn.call(L.prototype,S)||(f[S]=g)}),f}(),{chain:!1}),L.VERSION=r,di(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){L[f].placeholder=L}),di(["drop","take"],function(f,g){qt.prototype[f]=function(S){S=S===n?1:dr(Tt(S),0);var O=this.__filtered__&&!g?new qt(this):this.clone();return O.__filtered__?O.__takeCount__=Fr(S,O.__takeCount__):O.__views__.push({size:Fr(S,H),type:f+(O.__dir__<0?"Right":"")}),O},qt.prototype[f+"Right"]=function(S){return this.reverse()[f](S).reverse()}}),di(["filter","map","takeWhile"],function(f,g){var S=g+1,O=S==q||S==X;qt.prototype[f]=function(A){var j=this.clone();return j.__iteratees__.push({iteratee:ct(A,3),type:S}),j.__filtered__=j.__filtered__||O,j}}),di(["head","last"],function(f,g){var S="take"+(g?"Right":"");qt.prototype[f]=function(){return this[S](1).value()[0]}}),di(["initial","tail"],function(f,g){var S="drop"+(g?"":"Right");qt.prototype[f]=function(){return this.__filtered__?new qt(this):this[S](1)}}),qt.prototype.compact=function(){return this.filter(ho)},qt.prototype.find=function(f){return this.filter(f).head()},qt.prototype.findLast=function(f){return this.reverse().find(f)},qt.prototype.invokeMap=Ft(function(f,g){return typeof f=="function"?new qt(this):this.map(function(S){return jp(S,f,g)})}),qt.prototype.reject=function(f){return this.filter(Mb(ct(f)))},qt.prototype.slice=function(f,g){f=Tt(f);var S=this;return S.__filtered__&&(f>0||g<0)?new qt(S):(f<0?S=S.takeRight(-f):f&&(S=S.drop(f)),g!==n&&(g=Tt(g),S=g<0?S.dropRight(-g):S.take(g-f)),S)},qt.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},qt.prototype.toArray=function(){return this.take(H)},Cs(qt.prototype,function(f,g){var S=/^(?:filter|find|map|reject)|While$/.test(g),O=/^(?:head|last)$/.test(g),A=L[O?"take"+(g=="last"?"Right":""):g],j=O||/^find/.test(g);A&&(L.prototype[g]=function(){var W=this.__wrapped__,J=O?[1]:arguments,ae=W instanceof qt,we=J[0],Se=ae||kt(W),Oe=function(Ht){var Ut=A.apply(L,ml([Ht],J));return O&&Ve?Ut[0]:Ut};Se&&S&&typeof we=="function"&&we.length!=1&&(ae=Se=!1);var Ve=this.__chain__,rt=!!this.__actions__.length,dt=j&&!Ve,Nt=ae&&!rt;if(!j&&Se){W=Nt?W:new qt(this);var ft=f.apply(W,J);return ft.__actions__.push({func:kb,args:[Oe],thisArg:n}),new hi(ft,Ve)}return dt&&Nt?f.apply(this,J):(ft=this.thru(Oe),dt?O?ft.value()[0]:ft.value():ft)})}),di(["pop","push","shift","sort","splice","unshift"],function(f){var g=Zv[f],S=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",O=/^(?:pop|shift)$/.test(f);L.prototype[f]=function(){var A=arguments;if(O&&!this.__chain__){var j=this.value();return g.apply(kt(j)?j:[],A)}return this[S](function(W){return g.apply(kt(W)?W:[],A)})}}),Cs(qt.prototype,function(f,g){var S=L[g];if(S){var O=S.name+"";hn.call(zd,O)||(zd[O]=[]),zd[O].push({name:g,func:S})}}),zd[yb(n,w).name]=[{name:"wrapper",func:n}],qt.prototype.clone=y1e,qt.prototype.reverse=x1e,qt.prototype.value=w1e,L.prototype.at=Xwe,L.prototype.chain=Qwe,L.prototype.commit=Zwe,L.prototype.next=Jwe,L.prototype.plant=tSe,L.prototype.reverse=nSe,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=rSe,L.prototype.first=L.prototype.head,Tp&&(L.prototype[Tp]=eSe),L},Fd=Zye();Fc?((Fc.exports=Fd)._=Fd,$_._=Fd):Er._=Fd}).call(ma)}(Eg,Eg.exports);var iu=Eg.exports;const Sa=Gd(iu),N5=["lg","md","sm","xs","xxs"],me=dE()(CE((e,t)=>({currentBreakpoint:"lg",dashboard:{id:"",style:oy},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!1,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],actions:{setCardPython:(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===o.selectedSheetId);i&&iu.forEach(i.frames,l=>{var u;const c=(u=l.cards)==null?void 0:u.find(d=>d.id===n);c&&(c.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}))},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}),setBookmarkKey:n=>{e(()=>({bookmarkKey:n}))},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setCardTitle:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.title=o)})})},setCardInfo:(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===o.selectedSheetId);i&&iu.forEach(i.frames,l=>{var u;const c=(u=l.cards)==null?void 0:u.find(d=>d.id===n);c&&(c.info=r)})})},setCardDescription:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.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))}})},setFrameCardData:(n,r,o)=>{e(i=>{var a,l;const s=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&iu.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(h=>h.id===r);u&&(u.data=o)})})},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;const i=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(c=>c.filterId===o.filterId);i&&i>-1?(a=r.filterValues)==null||a.splice(i,1,o):(l=r.filterValues)==null||l.push(o)}):r.filterValues=n})},removeFilterValue: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 o;r.dashboard.filters?(o=r.dashboard.filters)==null||o.push(n):r.dashboard.filters=[n]})},removeFilter: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);console.log("index",s),s>-1&&((i=r.dashboard.filters)==null||i.splice(s,1))}})},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(m=>m.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))}})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(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){i.frames||(i.frames=[]),(l=i.frames)==null||l.push(r);const d={i:r.id,x:0,y:1/0,w:20,h:7,minW:6,minH:2};(c=i.layout)==null||c.push(d),i!=null&&i.layouts||(i.layouts={}),N5.forEach(h=>{i.layouts[h]||(i.layouts[h]=[]),i.layouts[h].push(d)}),(u=o.onAddFrame)==null||u.call(o,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),i.layouts=N5.reduce((h,p)=>{if(h&&h[p]){const m=h[p].findIndex(v=>v.i===r);typeof m=="number"&&m>-1&&h[p].splice(m,1)}return h},i.layouts))}})},updateFrame:(n,r)=>{e(o=>{var a,l,c,u;const i=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n),s=(c=i==null?void 0:i.frames)==null?void 0:c.findIndex(d=>d.id===r.id);i&&((u=i.frames)==null||u.splice(s,1,r))})},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}))},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)},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},handleDataPointClickAction:(n,r)=>{Cj({card:n,dataPoint:r,set:e,get:t})}}}))),Al=()=>me(e=>e.actions);process.env.NODE_ENV==="development"&&EE("DashboardStore",me);const _j={theme:"system",setTheme:()=>null},L5=b.createContext(_j);function Ej({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,i]=b.useState(()=>localStorage.getItem(n)||t);b.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 x.jsx(L5.Provider,{...r,value:s,children:e})}const Ly=()=>{const e=b.useContext(L5);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};async function kj(e,t,n){return await(await fetch(`https://semaphor.cloud/api/v1/dashboard?id=${e}&version=${t}`,{headers:{Authorization:`Bearer ${n}`}})).json()}function F5(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function R5(e,t){const n=F5(e);return n==="dark"?Sa.merge({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function j5({id:e,version:t,authToken:n,customStyle:r,currentTheme:o,onSave:i,onEvent:s}){const{data:a,refetch:l,isLoading:c,isError:u}=yi({queryKey:[e],queryFn:()=>kj(e,t||"",n==null?void 0:n.accessToken),enabled:!1}),{theme:d,setTheme:h}=Ly(),{setDashboard:p,setSelectedSheetId:m,setStyle:v,setOnSaveFunction:y}=me(D=>D.actions);me(D=>D.actions.setCustomCards);const w=me(D=>D.actions.setFilterValues),C=me(D=>D.actions.setBookmarkKey),_=me(D=>D.actions.setAuthToken),k=me(D=>D.actions.setThemeStyle),E=me(D=>D.actions.setDashboardTheme),P=me(D=>D.actions.setOnEvent);return b.useEffect(()=>{if(d){const D=F5(d);E(D)}},[d,E]),b.useEffect(()=>{o&&h(o)},[o,h]),b.useEffect(()=>{const D=Sa.cloneDeep(oy);if(r){const M=Sa.merge(D,r),I=R5(d,M);k(I),v(M)}else{const M=R5(d,D);k(M),v(oy)}},[d,r,v,k]),b.useEffect(()=>{var R;if(!a||!a.dashboard)return;const D=a.dashboard,M=Ua(D.id),I=JSON.parse(localStorage.getItem(M)||"[]"),F=I.find(B=>B.default===!0);if(F)p(F.template),C(F.name),F.filterValues&&w(F.filterValues);else{p(D);const B=I.find(ie=>(ie==null?void 0:ie.name)==="Original");B?B.template=D:I.push({name:"Original",template:D,default:!1}),localStorage.setItem(M,JSON.stringify(I))}m((R=D.sheets)==null?void 0:R[0].id)},[a,p,m,w,C]),b.useEffect(()=>{i&&y(i),s&&P(s)},[i,y,s,P]),b.useEffect(()=>{n&&n.accessToken&&(_(n),l())},[n,l,_]),{isLoading:c,isError:u}}function Fy({className:e,...t}){return x.jsx("div",{className:$e("animate-pulse rounded-md bg-muted",e),...t})}function z5({className:e,style:t,onSave:n,onEvent:r,LoadingComponent:o,ErrorComponent:i,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,...h}){me(w=>w.selectedSheetId);const p=me(w=>w.themeStyle),m=me(w=>w.onEvent),{isLoading:v,isError:y}=j5({id:a,version:u,authToken:l,customStyle:t,currentTheme:c,onSave:n,onEvent:r});return v||!l?(m==null||m({type:"info",message:`isLoading: ${v}, accessToken: ${l==null?void 0:l.accessToken}`}),o?x.jsx(o,{message:"loading"}):x.jsx("div",{className:"flex items-center gap-3",children:x.jsx(Fy,{className:"h-1 w-full dark:h-[2px]"})})):y?(m==null||m({type:"error",message:"Error fetching dashboard"}),i?(console.log("Error fetching dashboard"),x.jsx(i,{})):x.jsx("div",{children:"Error"})):x.jsx("div",{className:$e("flex h-full grow flex-col justify-between",p==null?void 0:p.dashboardPanel,e),role:"dashboard-panel",...h})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(this,arguments)}function Ie(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 fr(e,t=[]){let n=[];function r(i,s){const a=b.createContext(s),l=n.length;n=[...n,s];function c(d){const{scope:h,children:p,...m}=d,v=(h==null?void 0:h[e][l])||a,y=b.useMemo(()=>m,Object.values(m));return b.createElement(v.Provider,{value:y},p)}function u(d,h){const p=(h==null?void 0:h[e][l])||a,m=b.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(s=>b.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Oj(o,...t)]}function Oj(...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 b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Pj(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kg(...e){return t=>e.forEach(n=>Pj(n,t))}function St(...e){return b.useCallback(kg(...e),e)}const Ms=b.forwardRef((e,t)=>{const{children:n,...r}=e,o=b.Children.toArray(n),i=o.find(Dj);if(i){const s=i.props.children,a=o.map(l=>l===i?b.Children.count(s)>1?b.Children.only(null):b.isValidElement(s)?s.props.children:null:l);return b.createElement(Ry,de({},r,{ref:t}),b.isValidElement(s)?b.cloneElement(s,void 0,a):null)}return b.createElement(Ry,de({},r,{ref:t}),n)});Ms.displayName="Slot";const Ry=b.forwardRef((e,t)=>{const{children:n,...r}=e;return b.isValidElement(n)?b.cloneElement(n,{...Mj(r,n.props),ref:t?kg(t,n.ref):n.ref}):b.Children.count(n)>1?b.Children.only(null):null});Ry.displayName="SlotClone";const B5=({children:e})=>b.createElement(b.Fragment,null,e);function Dj(e){return b.isValidElement(e)&&e.type===B5}function Mj(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 Og(e){const t=e+"CollectionProvider",[n,r]=fr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:m,children:v}=p,y=b.useRef(null),w=b.useRef(new Map).current;return b.createElement(o,{scope:m,itemMap:w,collectionRef:y},v)},a=e+"CollectionSlot",l=b.forwardRef((p,m)=>{const{scope:v,children:y}=p,w=i(a,v),C=St(m,w.collectionRef);return b.createElement(Ms,{ref:C},y)}),c=e+"CollectionItemSlot",u="data-radix-collection-item",d=b.forwardRef((p,m)=>{const{scope:v,children:y,...w}=p,C=b.useRef(null),_=St(m,C),k=i(c,v);return b.useEffect(()=>(k.itemMap.set(C,{ref:C,...w}),()=>void k.itemMap.delete(C))),b.createElement(Ms,{[u]:"",ref:_},y)});function h(p){const m=i(e+"CollectionConsumer",p);return b.useCallback(()=>{const y=m.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},h,r]}const Pr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},$j=he.useId||(()=>{});let Tj=0;function Xr(e){const[t,n]=he.useState($j());return Pr(()=>{e||n(r=>r??String(Tj++))},[e]),e||(t?`radix-${t}`:"")}const ot=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=b.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Ms:t;return b.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),b.createElement(a,de({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function V5(e,t){e&&Jt.flushSync(()=>e.dispatchEvent(t))}function or(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Dr({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Aj({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=or(n),l=b.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 Aj({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,o=b.useRef(r),i=or(t);return b.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Ij=b.createContext(void 0);function Il(e){const t=b.useContext(Ij);return e||t||"ltr"}const jy="rovingFocusGroup.onEntryFocus",Nj={bubbles:!1,cancelable:!0},zy="RovingFocusGroup",[By,H5,Lj]=Og(zy),[Fj,su]=fr(zy,[Lj]),[Rj,jj]=Fj(zy),zj=b.forwardRef((e,t)=>b.createElement(By.Provider,{scope:e.__scopeRovingFocusGroup},b.createElement(By.Slot,{scope:e.__scopeRovingFocusGroup},b.createElement(Bj,de({},e,{ref:t}))))),Bj=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...u}=e,d=b.useRef(null),h=St(t,d),p=Il(i),[m=null,v]=Dr({prop:s,defaultProp:a,onChange:l}),[y,w]=b.useState(!1),C=or(c),_=H5(n),k=b.useRef(!1),[E,P]=b.useState(0);return b.useEffect(()=>{const D=d.current;if(D)return D.addEventListener(jy,C),()=>D.removeEventListener(jy,C)},[C]),b.createElement(Rj,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:b.useCallback(D=>v(D),[v]),onItemShiftTab:b.useCallback(()=>w(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(D=>D+1),[]),onFocusableItemRemove:b.useCallback(()=>P(D=>D-1),[])},b.createElement(ot.div,de({tabIndex:y||E===0?-1:0,"data-orientation":r},u,{ref:h,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{k.current=!0}),onFocus:Ie(e.onFocus,D=>{const M=!k.current;if(D.target===D.currentTarget&&M&&!y){const I=new CustomEvent(jy,Nj);if(D.currentTarget.dispatchEvent(I),!I.defaultPrevented){const F=_().filter(z=>z.focusable),R=F.find(z=>z.active),B=F.find(z=>z.id===m),q=[R,B,...F].filter(Boolean).map(z=>z.ref.current);q5(q)}}k.current=!1}),onBlur:Ie(e.onBlur,()=>w(!1))})))}),Vj="RovingFocusGroupItem",Hj=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=Xr(),l=i||a,c=jj(Vj,n),u=c.currentTabStopId===l,d=H5(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=c;return b.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),b.createElement(By.ItemSlot,{scope:n,id:l,focusable:r,active:o},b.createElement(ot.span,de({tabIndex:u?0:-1,"data-orientation":c.orientation},s,{ref:t,onMouseDown:Ie(e.onMouseDown,m=>{r?c.onItemFocus(l):m.preventDefault()}),onFocus:Ie(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ie(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=Uj(m,c.orientation,c.dir);if(v!==void 0){m.preventDefault();let w=d().filter(C=>C.focusable).map(C=>C.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const C=w.indexOf(m.currentTarget);w=c.loop?Gj(w,C+1):w.slice(C+1)}setTimeout(()=>q5(w))}})})))}),qj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wj(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Uj(e,t,n){const r=Wj(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qj[r]}function q5(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Gj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Vy=zj,Hy=Hj;function Kj(e,t){return b.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Qn=e=>{const{present:t,children:n}=e,r=Yj(t),o=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=St(r.ref,o.ref);return typeof n=="function"||r.isPresent?b.cloneElement(o,{ref:i}):null};Qn.displayName="Presence";function Yj(e){const[t,n]=b.useState(),r=b.useRef({}),o=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Kj(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Pg(r.current);i.current=a==="mounted"?c:"none"},[a]),Pr(()=>{const c=r.current,u=o.current;if(u!==e){const h=i.current,p=Pg(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]),Pr(()=>{if(t){const c=d=>{const p=Pg(r.current).includes(d.animationName);d.target===t&&p&&Jt.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=Pg(r.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Pg(e){return(e==null?void 0:e.animationName)||"none"}const W5="Tabs",[Xj,f2e]=fr(W5,[su]),U5=su(),[Qj,qy]=Xj(W5),Zj=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Il(a),[d,h]=Dr({prop:r,onChange:o,defaultProp:i});return b.createElement(Qj,{scope:n,baseId:Xr(),value:d,onValueChange:h,orientation:s,dir:u,activationMode:l},b.createElement(ot.div,de({dir:u,"data-orientation":s},c,{ref:t})))}),Jj="TabsList",ez=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=qy(Jj,n),s=U5(n);return b.createElement(Vy,de({asChild:!0},s,{orientation:i.orientation,dir:i.dir,loop:r}),b.createElement(ot.div,de({role:"tablist","aria-orientation":i.orientation},o,{ref:t})))}),tz="TabsTrigger",nz=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=qy(tz,n),a=U5(n),l=G5(s.baseId,r),c=K5(s.baseId,r),u=r===s.value;return b.createElement(Hy,de({asChild:!0},a,{focusable:!o,active:u}),b.createElement(ot.button,de({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:Ie(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:Ie(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:Ie(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(r)})})))}),rz="TabsContent",oz=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=qy(rz,n),l=G5(a.baseId,r),c=K5(a.baseId,r),u=r===a.value,d=b.useRef(u);return b.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),b.createElement(Qn,{present:o||u},({present:h})=>b.createElement(ot.div,de({"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}}),h&&i))});function G5(e,t){return`${e}-trigger-${t}`}function K5(e,t){return`${e}-content-${t}`}const iz=Zj,Y5=ez,X5=nz,Q5=oz,Z5=iz,J5=he.forwardRef(({className:e,...t},n)=>x.jsx(Y5,{ref:n,className:$e("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));J5.displayName=Y5.displayName;const Wy=he.forwardRef(({className:e,...t},n)=>x.jsx(X5,{ref:n,className:$e("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}));Wy.displayName=X5.displayName;const Dg=he.forwardRef(({className:e,...t},n)=>x.jsx(Q5,{ref:n,className:$e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Dg.displayName=Q5.displayName;var ek={exports:{}},gf={},Uy={exports:{}};(function(e,t){(function(n,r){r(t)})(ma,function(n){function r(se){return function(le,xe,K,Fe,ve,ze,Ze){return se(le,xe,Ze)}}function o(se){return function(le,xe,K,Fe){if(!le||!xe||typeof le!="object"||typeof xe!="object")return se(le,xe,K,Fe);var ve=Fe.get(le),ze=Fe.get(xe);if(ve&&ze)return ve===xe&&ze===le;Fe.set(le,xe),Fe.set(xe,le);var Ze=se(le,xe,K,Fe);return Fe.delete(le),Fe.delete(xe),Ze}}function i(se,ne){var le={};for(var xe in se)le[xe]=se[xe];for(var xe in ne)le[xe]=ne[xe];return le}function s(se){return se.constructor===Object||se.constructor==null}function a(se){return typeof se.then=="function"}function l(se,ne){return se===ne||se!==se&&ne!==ne}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",h="[object RegExp]",p="[object Map]",m="[object Number]",v="[object Object]",y="[object Set]",w="[object String]",C=Object.prototype.toString;function _(se){var ne=se.areArraysEqual,le=se.areDatesEqual,xe=se.areMapsEqual,K=se.areObjectsEqual,Fe=se.areRegExpsEqual,ve=se.areSetsEqual,ze=se.createIsNestedEqual,Ze=ze(et);function et(Xe,tt,_t){if(Xe===tt)return!0;if(!Xe||!tt||typeof Xe!="object"||typeof tt!="object")return Xe!==Xe&&tt!==tt;if(s(Xe)&&s(tt))return K(Xe,tt,Ze,_t);var Lt=Array.isArray(Xe),ln=Array.isArray(tt);if(Lt||ln)return Lt===ln&&ne(Xe,tt,Ze,_t);var Zt=C.call(Xe);return Zt!==C.call(tt)?!1:Zt===d?le(Xe,tt,Ze,_t):Zt===h?Fe(Xe,tt,Ze,_t):Zt===p?xe(Xe,tt,Ze,_t):Zt===y?ve(Xe,tt,Ze,_t):Zt===v||Zt===c?a(Xe)||a(tt)?!1:K(Xe,tt,Ze,_t):Zt===u||Zt===m||Zt===w?l(Xe.valueOf(),tt.valueOf()):!1}return et}function k(se,ne,le,xe){var K=se.length;if(ne.length!==K)return!1;for(;K-- >0;)if(!le(se[K],ne[K],K,K,se,ne,xe))return!1;return!0}var E=o(k);function P(se,ne){return l(se.valueOf(),ne.valueOf())}function D(se,ne,le,xe){var K=se.size===ne.size;if(!K)return!1;if(!se.size)return!0;var Fe={},ve=0;return se.forEach(function(ze,Ze){if(K){var et=!1,Xe=0;ne.forEach(function(tt,_t){!et&&!Fe[Xe]&&(et=le(Ze,_t,ve,Xe,se,ne,xe)&&le(ze,tt,Ze,_t,se,ne,xe))&&(Fe[Xe]=!0),Xe++}),ve++,K=et}}),K}var M=o(D),I="_owner",F=Object.prototype.hasOwnProperty;function R(se,ne,le,xe){var K=Object.keys(se),Fe=K.length;if(Object.keys(ne).length!==Fe)return!1;for(var ve;Fe-- >0;){if(ve=K[Fe],ve===I){var ze=!!se.$$typeof,Ze=!!ne.$$typeof;if((ze||Ze)&&ze!==Ze)return!1}if(!F.call(ne,ve)||!le(se[ve],ne[ve],ve,ve,se,ne,xe))return!1}return!0}var B=o(R);function ie(se,ne){return se.source===ne.source&&se.flags===ne.flags}function q(se,ne,le,xe){var K=se.size===ne.size;if(!K)return!1;if(!se.size)return!0;var Fe={};return se.forEach(function(ve,ze){if(K){var Ze=!1,et=0;ne.forEach(function(Xe,tt){!Ze&&!Fe[et]&&(Ze=le(ve,Xe,ze,tt,se,ne,xe))&&(Fe[et]=!0),et++}),K=Ze}}),K}var z=o(q),X=Object.freeze({areArraysEqual:k,areDatesEqual:P,areMapsEqual:D,areObjectsEqual:R,areRegExpsEqual:ie,areSetsEqual:q,createIsNestedEqual:r}),U=Object.freeze({areArraysEqual:E,areDatesEqual:P,areMapsEqual:M,areObjectsEqual:B,areRegExpsEqual:ie,areSetsEqual:z,createIsNestedEqual:r}),Z=_(X);function G(se,ne){return Z(se,ne,void 0)}var $=_(i(X,{createIsNestedEqual:function(){return l}}));function H(se,ne){return $(se,ne,void 0)}var re=_(U);function N(se,ne){return re(se,ne,new WeakMap)}var V=_(i(U,{createIsNestedEqual:function(){return l}}));function ue(se,ne){return V(se,ne,new WeakMap)}function ce(se){return _(i(X,se(X)))}function pe(se){var ne=_(i(U,se(U)));return function(le,xe,K){return K===void 0&&(K=new WeakMap),ne(le,xe,K)}}n.circularDeepEqual=N,n.circularShallowEqual=ue,n.createCustomCircularEqual=pe,n.createCustomEqual=ce,n.deepEqual=G,n.sameValueZeroEqual=l,n.shallowEqual=H,Object.defineProperty(n,"__esModule",{value:!0})})})(Uy,Uy.exports);var Gy=Uy.exports;const Ky=Lb(ZL);var Rt={},sz=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(Rt,"__esModule",{value:!0}),Rt.bottom=Yy,Rt.childrenEqual=uz,Rt.cloneLayout=nk,Rt.cloneLayoutItem=Nl,Rt.collides=Mg,Rt.compact=ok,Rt.compactItem=ik,Rt.compactType=xz,Rt.correctBounds=sk,Rt.fastPositionEqual=fz,Rt.fastRGLPropsEqual=void 0,Rt.getAllCollisions=ak,Rt.getFirstCollision=Ll,Rt.getLayoutItem=Qy,Rt.getStatics=Zy,Rt.modifyLayout=rk,Rt.moveElement=vf,Rt.moveElementAwayFromCollision=Jy,Rt.noop=void 0,Rt.perc=pz,Rt.resizeItemInDirection=mz,Rt.setTopLeft=bz,Rt.setTransform=vz,Rt.sortLayoutItems=i1,Rt.sortLayoutItemsByColRow=fk,Rt.sortLayoutItemsByRowCol=dk,Rt.synchronizeLayoutWithChildren=yz,Rt.validateLayout=hk,Rt.withLayoutItem=cz;var tk=Gy,mf=az(b);function az(e){return e&&e.__esModule?e:{default:e}}const lz=process.env.NODE_ENV==="production";function Yy(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 nk(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Nl(e[n]);return t}function rk(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 cz(e,t,n){let r=Qy(e,t);return r?(r=n(Nl(r)),e=rk(e,r),[e,r]):[e,null]}function Nl(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 uz(e,t){return(0,tk.deepEqual)(mf.default.Children.map(e,n=>n==null?void 0:n.key),mf.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,tk.deepEqual)(mf.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),mf.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}const dz=sz;Rt.fastRGLPropsEqual=dz;function fz(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function Mg(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 ok(e,t,n,r){const o=Zy(e),i=i1(e,t),s=Array(e.length);for(let a=0,l=i.length;a<l;a++){let c=Nl(i[a]);c.static||(c=ik(o,c,t,n,i,r),o.push(c)),s[e.indexOf(i[a])]=c,c.moved=!1}return s}const hz={x:"w",y:"h"};function Xy(e,t,n,r){const o=hz[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;Mg(t,a)&&Xy(e,a,n+t[o],r)}}t[r]=n}function ik(e,t,n,r,o,i){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(Yy(e),t.y);t.y>0&&!Ll(e,t);)t.y--;else if(a)for(;t.x>0&&!Ll(e,t);)t.x--;let l;for(;(l=Ll(e,t))&&!(n===null&&i);)if(a?Xy(o,t,l.x+l.w,"x"):Xy(o,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!Ll(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function sk(e,t){const n=Zy(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(;Ll(n,i);)i.y++}return e}function Qy(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function Ll(e,t){for(let n=0,r=e.length;n<r;n++)if(Mg(e[n],t))return e[n]}function ak(e,t){return e.filter(n=>Mg(n,t))}function Zy(e){return e.filter(t=>t.static)}function vf(e,t,n,r,o,i,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;"Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(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=i1(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const p=ak(d,t),m=p.length>0;if(m&&l)return nk(e);if(m&&i)return"Collision prevented on ".concat(t.i,", reverting."),t.x=c,t.y=u,t.moved=!1,e;for(let v=0,y=p.length;v<y;v++){const w=p[v];"Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(w.i," at [").concat(w.x,",").concat(w.y,"]"),!w.moved&&(w.static?e=Jy(e,w,t,o,s):e=Jy(e,t,w,o,s))}return e}function Jy(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=Ll(e,d),p=h&&h.y+h.h>t.y,m=h&&t.x+t.w>h.x;if(h){if(p&&a)return vf(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(m&&s)return vf(e,t,n.x,void 0,r,l,o)}else return"Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"]."),vf(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:vf(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,o)}function pz(e){return e*100+"%"}const lk=(e,t,n,r)=>e+n>r?t:n,ck=(e,t,n)=>e<0?t:n,uk=e=>Math.max(0,e),e1=e=>Math.max(0,e),t1=(e,t,n)=>{let{left:r,height:o,width:i}=t;const s=e.top-(o-e.height);return{left:r,width:i,height:ck(s,e.height,o),top:e1(s)}},n1=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{top:r,height:i,width:lk(e.left,e.width,s,n),left:uk(o)}},r1=(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:lk(e.left,e.width,i,n),top:e1(r),left:uk(s)}},o1=(e,t,n)=>{let{top:r,left:o,height:i,width:s}=t;return{width:s,left:o,height:ck(r,e.height,i),top:e1(r)}},gz={n:t1,ne:function(){return t1(arguments.length<=0?void 0:arguments[0],n1(...arguments))},e:n1,se:function(){return o1(arguments.length<=0?void 0:arguments[0],n1(...arguments))},s:o1,sw:function(){return o1(arguments.length<=0?void 0:arguments[0],r1(...arguments))},w:r1,nw:function(){return t1(arguments.length<=0?void 0:arguments[0],r1(...arguments))}};function mz(e,t,n,r){const o=gz[e];return o?o(t,{...t,...n},r):n}function vz(e){let{top:t,left:n,width:r,height:o}=e;const i="translate(".concat(n,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function bz(e){let{top:t,left:n,width:r,height:o}=e;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}}function i1(e,t){return t==="horizontal"?fk(e):t==="vertical"?dk(e):e}function dk(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 fk(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 yz(e,t,n,r,o){e=e||[];const i=[];mf.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=Qy(e,String(a.key)),c=a.props["data-grid"];l&&c==null?i.push(Nl(l)):c?(lz||hk([c],"ReactGridLayout.children"),i.push(Nl({...c,i:a.key}))):i.push(Nl({w:1,h:1,x:0,y:Yy(i),i:String(a.key)}))});const s=sk(i,{cols:n});return o?s:ok(s,r,n)}function hk(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++)if(typeof i[n[s]]!="number")throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[s]+" must be a number!")}}function xz(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}function v2e(){}const wz=()=>{};Rt.noop=wz;var Hi={};Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.calcGridColWidth=$g,Hi.calcGridItemPosition=Sz,Hi.calcGridItemWHPx=s1,Hi.calcWH=_z,Hi.calcXY=Cz,Hi.clamp=Fl;function $g(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-n[0]*2)/o}function s1(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Sz(e,t,n,r,o,i){const{margin:s,containerPadding:a,rowHeight:l}=e,c=$g(e),u={};return i&&i.resizing?(u.width=Math.round(i.resizing.width),u.height=Math.round(i.resizing.height)):(u.width=s1(r,c,s[0]),u.height=s1(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 Cz(e,t,n,r,o){const{margin:i,cols:s,rowHeight:a,maxRows:l}=e,c=$g(e);let u=Math.round((n-i[0])/(c+i[0])),d=Math.round((t-i[1])/(a+i[1]));return u=Fl(u,0,s-r),d=Fl(d,0,l-o),{x:u,y:d}}function _z(e,t,n,r,o,i){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=$g(e);let d=Math.round((t+s[0])/(u+s[0])),h=Math.round((n+s[1])/(c+s[1])),p=Fl(d,0,l-r),m=Fl(h,0,a-o);return["sw","w","nw"].indexOf(i)!==-1&&(p=Fl(d,0,l)),["nw","n","ne"].indexOf(i)!==-1&&(m=Fl(h,0,a)),{w:p,h:m}}function Fl(e,t,n){return Math.max(Math.min(e,n),t)}var Tg={},a1={exports:{}},l1,pk;function c1(){if(pk)return l1;pk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return l1=e,l1}var u1,gk;function Ez(){if(gk)return u1;gk=1;var e=c1();function t(){}function n(){}return n.resetWarningCache=t,u1=function(){function r(s,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},u1}var Ag={exports:{}},on={};/** @license React v16.13.1
86
86
  * react-is.development.js
87
87
  *
88
88
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.129",
8
+ "version": "0.0.130",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",