react-semaphor 0.0.352 → 0.0.354

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.
@@ -88,7 +88,7 @@ __p += '`),It&&(Se+=`' +
88
88
  function print() { __p += __j.call(arguments, '') }
89
89
  `:`;
90
90
  `)+Se+`return __p
91
- }`;var gt=BM(function(){return Vt(H,He+"return "+Se).apply(n,Q)});if(gt.source=Se,tx(gt))throw gt;return gt}function _q(f){return Yt(f).toLowerCase()}function Cq(f){return Yt(f).toUpperCase()}function Eq(f,g,w){if(f=Yt(f),f&&(w||g===n))return X2(f);if(!f||!(g=_i(g)))return f;var M=po(f),I=po(g),H=Q2(M,I),Q=J2(M,I)+1;return ha(M,H,Q).join("")}function Rq(f,g,w){if(f=Yt(f),f&&(w||g===n))return f.slice(0,eP(f)+1);if(!f||!(g=_i(g)))return f;var M=po(f),I=J2(M,po(g))+1;return ha(M,0,I).join("")}function Pq(f,g,w){if(f=Yt(f),f&&(w||g===n))return f.replace(bn,"");if(!f||!(g=_i(g)))return f;var M=po(f),I=Q2(M,po(g));return ha(M,I).join("")}function Mq(f,g){var w=F,M=j;if(Mn(g)){var I="separator"in g?g.separator:I;w="length"in g?ut(g.length):w,M="omission"in g?_i(g.omission):M}f=Yt(f);var H=f.length;if(Uc(f)){var Q=po(f);H=Q.length}if(w>=H)return f;var re=w-Gc(M);if(re<1)return M;var ue=Q?ha(Q,0,re).join(""):f.slice(0,re);if(I===n)return ue+M;if(Q&&(re+=ue.length-re),nx(I)){if(f.slice(re).search(I)){var ve,xe=ue;for(I.global||(I=yv(I.source,Yt($t.exec(I))+"g")),I.lastIndex=0;ve=I.exec(xe);)var Se=ve.index;ue=ue.slice(0,Se===n?re:Se)}}else if(f.indexOf(_i(I),re)!=re){var ke=ue.lastIndexOf(I);ke>-1&&(ue=ue.slice(0,ke))}return ue+M}function Tq(f){return f=Yt(f),f&&Ir.test(f)?f.replace(Lo,iH):f}var Oq=Zc(function(f,g,w){return f+(w?" ":"")+g.toUpperCase()}),ox=HP("toUpperCase");function zM(f,g,w){return f=Yt(f),g=w?n:g,g===n?ZB(f)?aH(f):WB(f):f.match(g)||[]}var BM=wt(function(f,g){try{return wi(f,n,g)}catch(w){return tx(w)?w:new ot(w)}}),Dq=Es(function(f,g){return qi(g,function(w){w=$o(w),_s(f,w,Zv(f[w],f))}),f});function Aq(f){var g=f==null?0:f.length,w=We();return f=g?Pn(f,function(M){if(typeof M[1]!="function")throw new Yi(s);return[w(M[0]),M[1]]}):[],wt(function(M){for(var I=-1;++I<g;){var H=f[I];if(wi(H[0],this,M))return wi(H[1],this,M)}})}function kq(f){return iV(Xi(f,d))}function sx(f){return function(){return f}}function Iq(f,g){return f==null||f!==f?g:f}var Nq=WP(),Lq=WP(!0);function ni(f){return f}function ax(f){return xP(typeof f=="function"?f:Xi(f,d))}function Fq(f){return SP(Xi(f,d))}function jq(f,g){return _P(f,Xi(g,d))}var $q=wt(function(f,g){return function(w){return tf(w,f,g)}}),zq=wt(function(f,g){return function(w){return tf(f,w,g)}});function lx(f,g,w){var M=or(g),I=wg(g,M);w==null&&!(Mn(g)&&(I.length||!M.length))&&(w=g,g=f,f=this,I=wg(g,or(g)));var H=!(Mn(w)&&"chain"in w)||!!w.chain,Q=Ps(f);return qi(I,function(re){var ue=g[re];f[re]=ue,Q&&(f.prototype[re]=function(){var ve=this.__chain__;if(H||ve){var xe=f(this.__wrapped__),Se=xe.__actions__=Zr(this.__actions__);return Se.push({func:ue,args:arguments,thisArg:f}),xe.__chain__=ve,xe}return ue.apply(f,aa([this.value()],arguments))})}),f}function Bq(){return dr._===this&&(dr._=hH),this}function cx(){}function Hq(f){return f=ut(f),wt(function(g){return CP(g,f)})}var Vq=zv(Pn),Wq=zv(U2),Uq=zv(dv);function HM(f){return qv(f)?fv($o(f)):wV(f)}function Gq(f){return function(g){return f==null?n:pl(f,g)}}var qq=GP(),Yq=GP(!0);function ux(){return[]}function dx(){return!1}function Kq(){return{}}function Xq(){return""}function Qq(){return!0}function Jq(f,g){if(f=ut(f),f<1||f>W)return[];var w=Y,M=xr(f,Y);g=We(g),f-=Y;for(var I=gv(M,g);++w<f;)g(w);return I}function Zq(f){return at(f)?Pn(f,$o):Ci(f)?[f]:Zr(lM(Yt(f)))}function eY(f){var g=++dH;return Yt(f)+g}var tY=Pg(function(f,g){return f+g},0),nY=Bv("ceil"),rY=Pg(function(f,g){return f/g},1),iY=Bv("floor");function oY(f){return f&&f.length?xg(f,ni,Rv):n}function sY(f,g){return f&&f.length?xg(f,We(g,2),Rv):n}function aY(f){return Y2(f,ni)}function lY(f,g){return Y2(f,We(g,2))}function cY(f){return f&&f.length?xg(f,ni,Ov):n}function uY(f,g){return f&&f.length?xg(f,We(g,2),Ov):n}var dY=Pg(function(f,g){return f*g},1),fY=Bv("round"),hY=Pg(function(f,g){return f-g},0);function pY(f){return f&&f.length?pv(f,ni):0}function gY(f,g){return f&&f.length?pv(f,We(g,2)):0}return z.after=FU,z.ary=vM,z.assign=CG,z.assignIn=kM,z.assignInWith=zg,z.assignWith=EG,z.at=RG,z.before=xM,z.bind=Zv,z.bindAll=Dq,z.bindKey=wM,z.castArray=KU,z.chain=mM,z.chunk=iW,z.compact=oW,z.concat=sW,z.cond=Aq,z.conforms=kq,z.constant=sx,z.countBy=pU,z.create=PG,z.curry=SM,z.curryRight=_M,z.debounce=CM,z.defaults=MG,z.defaultsDeep=TG,z.defer=jU,z.delay=$U,z.difference=aW,z.differenceBy=lW,z.differenceWith=cW,z.drop=uW,z.dropRight=dW,z.dropRightWhile=fW,z.dropWhile=hW,z.fill=pW,z.filter=mU,z.flatMap=vU,z.flatMapDeep=xU,z.flatMapDepth=wU,z.flatten=fM,z.flattenDeep=gW,z.flattenDepth=mW,z.flip=zU,z.flow=Nq,z.flowRight=Lq,z.fromPairs=bW,z.functions=LG,z.functionsIn=FG,z.groupBy=SU,z.initial=vW,z.intersection=xW,z.intersectionBy=wW,z.intersectionWith=SW,z.invert=$G,z.invertBy=zG,z.invokeMap=CU,z.iteratee=ax,z.keyBy=EU,z.keys=or,z.keysIn=ti,z.map=Ig,z.mapKeys=HG,z.mapValues=VG,z.matches=Fq,z.matchesProperty=jq,z.memoize=Lg,z.merge=WG,z.mergeWith=IM,z.method=$q,z.methodOf=zq,z.mixin=lx,z.negate=Fg,z.nthArg=Hq,z.omit=UG,z.omitBy=GG,z.once=BU,z.orderBy=RU,z.over=Vq,z.overArgs=HU,z.overEvery=Wq,z.overSome=Uq,z.partial=ex,z.partialRight=EM,z.partition=PU,z.pick=qG,z.pickBy=NM,z.property=HM,z.propertyOf=Gq,z.pull=RW,z.pullAll=pM,z.pullAllBy=PW,z.pullAllWith=MW,z.pullAt=TW,z.range=qq,z.rangeRight=Yq,z.rearg=VU,z.reject=OU,z.remove=OW,z.rest=WU,z.reverse=Qv,z.sampleSize=AU,z.set=KG,z.setWith=XG,z.shuffle=kU,z.slice=DW,z.sortBy=LU,z.sortedUniq=jW,z.sortedUniqBy=$W,z.split=vq,z.spread=UU,z.tail=zW,z.take=BW,z.takeRight=HW,z.takeRightWhile=VW,z.takeWhile=WW,z.tap=oU,z.throttle=GU,z.thru=kg,z.toArray=OM,z.toPairs=LM,z.toPairsIn=FM,z.toPath=Zq,z.toPlainObject=AM,z.transform=QG,z.unary=qU,z.union=UW,z.unionBy=GW,z.unionWith=qW,z.uniq=YW,z.uniqBy=KW,z.uniqWith=XW,z.unset=JG,z.unzip=Jv,z.unzipWith=gM,z.update=ZG,z.updateWith=eq,z.values=nu,z.valuesIn=tq,z.without=QW,z.words=zM,z.wrap=YU,z.xor=JW,z.xorBy=ZW,z.xorWith=eU,z.zip=tU,z.zipObject=nU,z.zipObjectDeep=rU,z.zipWith=iU,z.entries=LM,z.entriesIn=FM,z.extend=kM,z.extendWith=zg,lx(z,z),z.add=tY,z.attempt=BM,z.camelCase=oq,z.capitalize=jM,z.ceil=nY,z.clamp=nq,z.clone=XU,z.cloneDeep=JU,z.cloneDeepWith=ZU,z.cloneWith=QU,z.conformsTo=eG,z.deburr=$M,z.defaultTo=Iq,z.divide=rY,z.endsWith=sq,z.eq=mo,z.escape=aq,z.escapeRegExp=lq,z.every=gU,z.find=bU,z.findIndex=uM,z.findKey=OG,z.findLast=yU,z.findLastIndex=dM,z.findLastKey=DG,z.floor=iY,z.forEach=bM,z.forEachRight=yM,z.forIn=AG,z.forInRight=kG,z.forOwn=IG,z.forOwnRight=NG,z.get=rx,z.gt=tG,z.gte=nG,z.has=jG,z.hasIn=ix,z.head=hM,z.identity=ni,z.includes=_U,z.indexOf=yW,z.inRange=rq,z.invoke=BG,z.isArguments=bl,z.isArray=at,z.isArrayBuffer=rG,z.isArrayLike=ei,z.isArrayLikeObject=$n,z.isBoolean=iG,z.isBuffer=pa,z.isDate=oG,z.isElement=sG,z.isEmpty=aG,z.isEqual=lG,z.isEqualWith=cG,z.isError=tx,z.isFinite=uG,z.isFunction=Ps,z.isInteger=RM,z.isLength=jg,z.isMap=PM,z.isMatch=dG,z.isMatchWith=fG,z.isNaN=hG,z.isNative=pG,z.isNil=mG,z.isNull=gG,z.isNumber=MM,z.isObject=Mn,z.isObjectLike=Dn,z.isPlainObject=lf,z.isRegExp=nx,z.isSafeInteger=bG,z.isSet=TM,z.isString=$g,z.isSymbol=Ci,z.isTypedArray=tu,z.isUndefined=yG,z.isWeakMap=vG,z.isWeakSet=xG,z.join=_W,z.kebabCase=cq,z.last=Ji,z.lastIndexOf=CW,z.lowerCase=uq,z.lowerFirst=dq,z.lt=wG,z.lte=SG,z.max=oY,z.maxBy=sY,z.mean=aY,z.meanBy=lY,z.min=cY,z.minBy=uY,z.stubArray=ux,z.stubFalse=dx,z.stubObject=Kq,z.stubString=Xq,z.stubTrue=Qq,z.multiply=dY,z.nth=EW,z.noConflict=Bq,z.noop=cx,z.now=Ng,z.pad=fq,z.padEnd=hq,z.padStart=pq,z.parseInt=gq,z.random=iq,z.reduce=MU,z.reduceRight=TU,z.repeat=mq,z.replace=bq,z.result=YG,z.round=fY,z.runInContext=le,z.sample=DU,z.size=IU,z.snakeCase=yq,z.some=NU,z.sortedIndex=AW,z.sortedIndexBy=kW,z.sortedIndexOf=IW,z.sortedLastIndex=NW,z.sortedLastIndexBy=LW,z.sortedLastIndexOf=FW,z.startCase=xq,z.startsWith=wq,z.subtract=hY,z.sum=pY,z.sumBy=gY,z.template=Sq,z.times=Jq,z.toFinite=Ms,z.toInteger=ut,z.toLength=DM,z.toLower=_q,z.toNumber=Zi,z.toSafeInteger=_G,z.toString=Yt,z.toUpper=Cq,z.trim=Eq,z.trimEnd=Rq,z.trimStart=Pq,z.truncate=Mq,z.unescape=Tq,z.uniqueId=eY,z.upperCase=Oq,z.upperFirst=ox,z.each=bM,z.eachRight=yM,z.first=hM,lx(z,function(){var f={};return Fo(z,function(g,w){tn.call(z.prototype,w)||(f[w]=g)}),f}(),{chain:!1}),z.VERSION=r,qi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){z[f].placeholder=z}),qi(["drop","take"],function(f,g){At.prototype[f]=function(w){w=w===n?1:Zn(ut(w),0);var M=this.__filtered__&&!g?new At(this):this.clone();return M.__filtered__?M.__takeCount__=xr(w,M.__takeCount__):M.__views__.push({size:xr(w,Y),type:f+(M.__dir__<0?"Right":"")}),M},At.prototype[f+"Right"]=function(w){return this.reverse()[f](w).reverse()}}),qi(["filter","map","takeWhile"],function(f,g){var w=g+1,M=w==V||w==U;At.prototype[f]=function(I){var H=this.clone();return H.__iteratees__.push({iteratee:We(I,3),type:w}),H.__filtered__=H.__filtered__||M,H}}),qi(["head","last"],function(f,g){var w="take"+(g?"Right":"");At.prototype[f]=function(){return this[w](1).value()[0]}}),qi(["initial","tail"],function(f,g){var w="drop"+(g?"":"Right");At.prototype[f]=function(){return this.__filtered__?new At(this):this[w](1)}}),At.prototype.compact=function(){return this.filter(ni)},At.prototype.find=function(f){return this.filter(f).head()},At.prototype.findLast=function(f){return this.reverse().find(f)},At.prototype.invokeMap=wt(function(f,g){return typeof f=="function"?new At(this):this.map(function(w){return tf(w,f,g)})}),At.prototype.reject=function(f){return this.filter(Fg(We(f)))},At.prototype.slice=function(f,g){f=ut(f);var w=this;return w.__filtered__&&(f>0||g<0)?new At(w):(f<0?w=w.takeRight(-f):f&&(w=w.drop(f)),g!==n&&(g=ut(g),w=g<0?w.dropRight(-g):w.take(g-f)),w)},At.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},At.prototype.toArray=function(){return this.take(Y)},Fo(At.prototype,function(f,g){var w=/^(?:filter|find|map|reject)|While$/.test(g),M=/^(?:head|last)$/.test(g),I=z[M?"take"+(g=="last"?"Right":""):g],H=M||/^find/.test(g);I&&(z.prototype[g]=function(){var Q=this.__wrapped__,re=M?[1]:arguments,ue=Q instanceof At,ve=re[0],xe=ue||at(Q),Se=function(Rt){var It=I.apply(z,aa([Rt],re));return M&&ke?It[0]:It};xe&&w&&typeof ve=="function"&&ve.length!=1&&(ue=xe=!1);var ke=this.__chain__,He=!!this.__actions__.length,Ue=H&&!ke,gt=ue&&!He;if(!H&&xe){Q=gt?Q:new At(this);var Ge=f.apply(Q,re);return Ge.__actions__.push({func:kg,args:[Se],thisArg:n}),new Ki(Ge,ke)}return Ue&&gt?f.apply(this,re):(Ge=this.thru(Se),Ue?M?Ge.value()[0]:Ge.value():Ge)})}),qi(["pop","push","shift","sort","splice","unshift"],function(f){var g=og[f],w=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",M=/^(?:pop|shift)$/.test(f);z.prototype[f]=function(){var I=arguments;if(M&&!this.__chain__){var H=this.value();return g.apply(at(H)?H:[],I)}return this[w](function(Q){return g.apply(at(Q)?Q:[],I)})}}),Fo(At.prototype,function(f,g){var w=z[g];if(w){var M=w.name+"";tn.call(Xc,M)||(Xc[M]=[]),Xc[M].push({name:g,func:w})}}),Xc[Rg(n,x).name]=[{name:"wrapper",func:n}],At.prototype.clone=TH,At.prototype.reverse=OH,At.prototype.value=DH,z.prototype.at=sU,z.prototype.chain=aU,z.prototype.commit=lU,z.prototype.next=cU,z.prototype.plant=dU,z.prototype.reverse=fU,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=hU,z.prototype.first=z.prototype.head,Yd&&(z.prototype[Yd]=uU),z},qc=lH();cl?((cl.exports=qc)._=qc,av._=qc):dr._=qc}).call(Ca)})(wb,wb.exports);var Lf=wb.exports;const Jl=Oc(Lf);function lT({id:e,layouts:t,initialHeight:n,y:r,x:i,w:o,minH:s}){const a={i:e,x:i??0,y:r??1/0,w:o||20,h:n||35,minW:6,minH:s||10},l=t?{...t}:{};return Y_.forEach(c=>{l[c]||(l[c]=[]);const u=l[c].reduce((d,p)=>Math.max(d,p.y+p.h),0);a.y=a.y===1/0?u:a.y,l[c].push({...a})}),l}function cT(e,t){if(!t)return;const n={...t};return Y_.forEach(r=>{n[r]&&(n[r]=n[r].filter(i=>i.i!==e))}),n}function Q_(e){return ye.getState().dashboard.globalCacheConfig}const ye=eN()(aN((e,t)=>({isSessionExpired:!1,currentBreakpoint:"lg",dashboard:{id:"",style:xb},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!1,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],actions:{setInitStore:()=>{e(n=>{n.isSessionExpired=!1,n.currentBreakpoint="lg",n.dashboard={id:"",style:xb},n.showContext=!1,n.selectedSheetId=null,n.selectedCardId=null,n.selectedFrameId=null,n.selectedCard=null,n.showFilters=!1,n.isDashboardEditing=!1,n.isVisualEditing=!1,n.showDashboardJSON=!1,n.filteringCards=[],n.selectedLensId=void 0,n.filterValues=void 0})},setGlobalCacheConfig:n=>{e(r=>{r.dashboard.globalCacheConfig=n})},setLenses:n=>{e(r=>{r.lenses=n})},setSelectedLensId:n=>{e(r=>{r.selectedLensId=n})},deleteSheet:n=>{e(r=>{var o,s,a,l,c,u,d,p;const i=(o=r.dashboard.sheets)==null?void 0:o.findIndex(h=>h.id===n);if(i!==void 0&&i>-1){(s=r.dashboard.sheets)==null||s.splice(i,1);const h=(a=r.dashboard.filters)==null?void 0:a.filter(b=>b.sheetId===n),m=(l=r.filterValues)==null?void 0:l.filter(b=>h==null?void 0:h.some(v=>v.id===b.filterId));r.filterValues=(c=r.filterValues)==null?void 0:c.filter(b=>!(m!=null&&m.some(v=>v.filterId===b.filterId))),r.dashboard.filters=(u=r.dashboard.filters)==null?void 0:u.filter(b=>b.sheetId!==n),r.selectedSheetId=(p=(d=r.dashboard.sheets)==null?void 0:d[0])==null?void 0:p.id}})},addSheet:n=>{e(r=>{r.dashboard.sheets||(r.dashboard.sheets=[]);const i=r.dashboard.filters;let o={};i==null||i.forEach(a=>{Y_.forEach(l=>{o!=null&&o[l]||(o={...o,[l]:[]});const c={i:a.id,x:0,y:0,w:10,h:8};o[l].push(c)})});const s={...n,layouts:o};r.dashboard.sheets.push(s)})},setGlobalStyle:n=>{e(r=>{r.dashboard.globalStyle=n})},setAIScopeTables:n=>{e(r=>{r.dashboard.aiScopeTables=n})},setIsSessionExpired:n=>{e(()=>({isSessionExpired:n}))},setCardPython:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===i.selectedSheetId);o&&Lf.forEach(o.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 i;r.dashboard.baseQueries||(r.dashboard.baseQueries=[]),(i=r.dashboard.baseQueries)==null||i.push(n)})},removeBaseQuery:n=>{e(r=>{var o,s;const i=(o=r.dashboard.baseQueries)==null?void 0:o.findIndex(a=>a.id===n);i!=null&&i>-1&&((s=r.dashboard.baseQueries)==null||s.splice(i,1))})},setBaseQueries:n=>{e(r=>{r.dashboard.baseQueries=n})},setCurrentBreakpoint:n=>{e(()=>({currentBreakpoint:n}))},setFilteringCards:n=>{e(()=>({filteringCards:n}))},addFilteringCard:n=>{e(r=>{var i;(i=r.filteringCards)==null||i.push(n)})},removeFilteringCard:n=>{e(r=>{var o,s;const i=(o=r.filteringCards)==null?void 0:o.findIndex(a=>a.id===n.id);i!==void 0&&i>-1&&((s=r.filteringCards)==null||s.splice(i,1))})},setCustomCards:n=>{e(r=>{r.dashboard.customCards=n})},setAuthToken:n=>{e(()=>({authToken:n}))},setThemeStyle:n=>{e(()=>({themeStyle:n}))},setDashboard:n=>e({dashboard:n}),setDashboardWithFilterValues:(n,r)=>{e(i=>{i.dashboard=n,i.filterValues=r})},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setSheetTitle:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.title=r)})},setCardTitle:(n,r,i)=>{e(o=>{var a,l;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&Lf.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(p=>p.id===r);u&&(u.title=i)})})},setCardInfo:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===i.selectedSheetId);o&&Lf.forEach(o.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,i)=>{e(o=>{var a,l;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&Lf.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(p=>p.id===r);u&&(u.description=i)})})},setCardSql:(n,r,i)=>{e(o=>{var a,l,c,u;const s=(l=(a=o.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(p=>p.id===r);d&&(d.sql=i,(u=o.onUpdateCard)==null||u.call(o,d,n))}})},setSheetLayout:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.layout=r)})},setSheetLayouts:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.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 i=r.filterValues.findIndex(o=>o.filterId===n.filterId);i>-1?r.filterValues.splice(i,1,n):r.filterValues.push(n)}else r.filterValues=[n]})},addOrUpdateFilterValues:n=>{e(r=>{r.filterValues?n.forEach(i=>{var s,a,l;const o=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(c=>c.filterId===i.filterId);o!==void 0&&o>-1?(a=r.filterValues)==null||a.splice(o,1,i):(l=r.filterValues)==null||l.push(i)}):r.filterValues=n})},removeFilterValues:n=>{e(r=>{if(r.filterValues){const i=r.filterValues.filter(o=>o.filterId!==n&&!o.filterId.startsWith(n));r.filterValues=i}})},replaceFilterValue:n=>{e(r=>{if(r.filterValues){const i=r.filterValues.findIndex(o=>o.filterId===n.filterId);i>-1&&r.filterValues.splice(i,1,n)}})},addFilter:n=>{e(r=>{var o,s;r.dashboard.filters?(o=r.dashboard.filters)==null||o.push(n):r.dashboard.filters=[n],(s=r.dashboard.sheets)==null||s.find(a=>a.id===r.selectedSheetId);const i=r.dashboard.sheets;i==null||i.forEach(a=>{lT({id:n.id,layouts:a.layouts,y:0,initialHeight:8,minH:7,w:10})})})},removeFilter:n=>{e(r=>{var i,o,s;if(r.dashboard.filters){const a=(i=r.dashboard.filters)==null?void 0:i.findIndex(l=>l.id===n);if(a>-1){(o=r.dashboard.filters)==null||o.splice(a,1),(s=r.dashboard.sheets)==null||s.find(c=>c.id===r.selectedSheetId);const l=r.dashboard.sheets;l==null||l.forEach(c=>{const u=cT(n,c.layouts);c.layouts=u})}}})},updateFrameCard:(n,r,i)=>{e(o=>{var l,c,u,d,p;const s=(c=(l=o.dashboard)==null?void 0:l.sheets)==null?void 0:c.find(h=>h.id===n);if(!s)return;const a=(u=s==null?void 0:s.frames)==null?void 0:u.find(h=>h.id===r);if(a){const h=(d=a.cards)==null?void 0:d.findIndex(m=>m.id===i.id);h>-1&&((p=a.cards)==null||p.splice(h,1,i))}})},updateFilter:n=>{e(r=>{var i,o;if(r.dashboard.filters){const s=(i=r.dashboard.filters)==null?void 0:i.findIndex(a=>a.id===n.id);s>-1&&((o=r.dashboard.filters)==null||o.splice(s,1,n))}})},updateFilterId:(n,r)=>{e(i=>{var a,l;const o=(a=i.dashboard.filters)==null?void 0:a.find(c=>c.id===n),s=(l=i.dashboard.filters)==null?void 0:l.some(c=>c.id===r);o&&!s&&(o.id=r)})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(n,r,i)=>{e(o=>{var a,l,c,u;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){s.frames||(s.frames=[]),(c=s.frames)==null||c.push(r);let d=1/0;const p=0;i==="start"&&(d=0);const h=lT({id:r.id,layouts:s.layouts,minH:10,x:p,y:d});s.layouts=h,(u=o.onAddFrame)==null||u.call(o,r,n)}})},removeFrame:(n,r)=>{e(i=>{var s,a,l,c,u;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(d=>d.id===n);if(o){const d=(l=o.frames)==null?void 0:l.findIndex(p=>p.id===r);console.log(d),typeof d=="number"&&d>-1&&((c=o.frames)==null||c.splice(d,1),(u=o.layout)==null||u.splice(d,1),cT(r,o.layouts))}})},updateFrame:(n,r)=>{e(i=>{var a,l,c,u,d;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=o==null?void 0:o.frames)==null?void 0:c.findIndex(p=>p.id===r.id);o&&((u=o.frames)==null||u.splice(s,1,r)),(d=i.onAcceptChanges)==null||d.call(i,r,i.dashboard)})},updateCard:(n,r)=>{e(i=>{var a,l,c,u,d;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=o==null?void 0:o.cards)==null?void 0:c.findIndex(p=>p.id===r.id);o&&((u=o.cards)==null||u.splice(s,1,r),(d=i.onUpdateCard)==null||d.call(i,r,n))})},removeCard:(n,r)=>{e(i=>{var a,l,c,u,d,p;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=o==null?void 0:o.cards)==null?void 0:c.findIndex(h=>h.id===r.id);o&&((u=o.cards)==null||u.splice(s,1),(d=o.layout)==null||d.splice(s,1),(p=i.onRemoveCard)==null||p.call(i,r,n))})},setStyle:n=>{e(r=>{r.dashboard&&(r.dashboard.style=n)})},setSelectedCardId:(n,r)=>{e(i=>{var s,a,l;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===n);o&&(((l=o.cards)==null?void 0:l.find(u=>u.id===r))?i.selectedCardId=r:i.selectedCardId=null)})},setSelectedFrameId:n=>{e(r=>{var o,s;((s=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:s.find(a=>a.id===r.selectedSheetId))&&(r.selectedFrameId=n)})},setSelectedSheetId:n=>{e(r=>{var o,s;((s=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:s.find(a=>a.id===n))&&(r.selectedSheetId=n)})},setOnSaveFunction:n=>{e(()=>({onSaveFunction:n}))},setOnAddCard:n=>{e(()=>({onAddCard:n}))},setOnAcceptChanges:n=>{e(()=>({onAcceptChanges:n}))},setOnUpdateCard:n=>{e(()=>({onUpdateCard:n}))},setOnRemoveCard:n=>{e(()=>({onRemoveCard:n}))},setOnEvent:n=>{e(()=>({onEvent:n}))},getDashboard:()=>t().dashboard,getSelectedSheet:()=>{var n,r;return(r=(n=t().dashboard)==null?void 0:n.sheets)==null?void 0:r.find(i=>i.id===t().selectedSheetId)},getCardFrame:n=>{var i,o;const r=(i=t().dashboard)==null?void 0:i.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((o=a[l].cards)==null?void 0:o.find(u=>u.id===n))return a[l]}}},getSelectedFrame:()=>{var r,i,o;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(s=>s.id===t().selectedSheetId);return(o=n==null?void 0:n.frames)==null?void 0:o.find(s=>s.id===t().selectedFrameId)},getCard:n=>{var i,o;const r=(i=t().dashboard)==null?void 0:i.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=(o=a[l].cards)==null?void 0:o.find(u=>u.id===n);if(c)return c}}},getSelectedSheetLayout:()=>{var r,i;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(o=>o.id===t().selectedSheetId);return n==null?void 0:n.layout},getSelectedSheetLayouts:()=>{var r,i;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(o=>o.id===t().selectedSheetId);return n==null?void 0:n.layouts},getStyle:()=>{var n;return(n=t().dashboard)==null?void 0:n.style},getCardSheet(n){var i,o;const r=(i=t().dashboard)==null?void 0:i.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((o=a[l].cards)==null?void 0:o.find(u=>u.id===n))return r[s]}}},handleDataPointClickAction:(n,r)=>{YK({card:n,dataPoint:r,set:e,get:t})}}}))),Hn=()=>ye(e=>e.actions),KK={theme:"system",setTheme:()=>null},hN=P.createContext(KK);function XK({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[i,o]=P.useState(()=>localStorage.getItem(n)||t);P.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),i==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(i)},[i]);const s={theme:i,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return y.jsx(hN.Provider,{...r,value:s,children:e})}const pN=()=>{const e=P.useContext(hN);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var vp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},mc=typeof window>"u"||"Deno"in globalThis;function no(){}function QK(e,t){return typeof e=="function"?e(t):e}function Ew(e){return typeof e=="number"&&e>=0&&e!==1/0}function gN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mu(e,t){return typeof e=="function"?e(t):e}function Co(e,t){return typeof e=="function"?e(t):e}function uT(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==J_(s,t.options))return!1}else if(!Eh(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function dT(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ch(t.options.mutationKey)!==Ch(o))return!1}else if(!Eh(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function J_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ch)(e)}function Ch(e){return JSON.stringify(e,(t,n)=>Mw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Eh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Eh(e[n],t[n])):!1}function Rw(e,t){if(e===t)return e;const n=fT(e)&&fT(t);if(n||Mw(e)&&Mw(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:o[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=Rw(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return i===s&&l===i?e:a}return t}function Pw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mw(e){if(!hT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hT(e){return Object.prototype.toString.call(e)==="[object Object]"}function JK(e){return new Promise(t=>{setTimeout(t,e)})}function Tw(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Rw(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Rw(e,t)}return t}function ZK(e){return e}function eX(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function tX(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sb=Symbol();function mN(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Sb&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ul,Ra,Bu,LI,nX=(LI=class extends vp{constructor(){super();Ze(this,Ul);Ze(this,Ra);Ze(this,Bu);je(this,Bu,t=>{if(!mc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){se(this,Ra)||this.setEventListener(se(this,Bu))}onUnsubscribe(){var t;this.hasListeners()||((t=se(this,Ra))==null||t.call(this),je(this,Ra,void 0))}setEventListener(t){var n;je(this,Bu,t),(n=se(this,Ra))==null||n.call(this),je(this,Ra,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){se(this,Ul)!==t&&(je(this,Ul,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof se(this,Ul)=="boolean"?se(this,Ul):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ul=new WeakMap,Ra=new WeakMap,Bu=new WeakMap,LI),Z_=new nX,Hu,Pa,Vu,FI,rX=(FI=class extends vp{constructor(){super();Ze(this,Hu,!0);Ze(this,Pa);Ze(this,Vu);je(this,Vu,t=>{if(!mc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){se(this,Pa)||this.setEventListener(se(this,Vu))}onUnsubscribe(){var t;this.hasListeners()||((t=se(this,Pa))==null||t.call(this),je(this,Pa,void 0))}setEventListener(t){var n;je(this,Vu,t),(n=se(this,Pa))==null||n.call(this),je(this,Pa,t(this.setOnline.bind(this)))}setOnline(t){se(this,Hu)!==t&&(je(this,Hu,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return se(this,Hu)}},Hu=new WeakMap,Pa=new WeakMap,Vu=new WeakMap,FI),_b=new rX;function Ow(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function iX(e){return Math.min(1e3*2**e,3e4)}function bN(e){return(e??"online")==="online"?_b.isOnline():!0}var yN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wx(e){return e instanceof yN}function vN(e){let t=!1,n=0,r=!1,i;const o=Ow(),s=b=>{var v;r||(p(new yN(b)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Z_.isFocused()&&(e.networkMode==="always"||_b.isOnline())&&e.canRun(),u=()=>bN(e.networkMode)&&e.canRun(),d=b=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,b),i==null||i(),o.resolve(b))},p=b=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,b),i==null||i(),o.reject(b))},h=()=>new Promise(b=>{var v;i=x=>{(r||c())&&b(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var b;i=void 0,r||(b=e.onContinue)==null||b.call(e)}),m=()=>{if(r)return;let b;const v=n===0?e.initialPromise:void 0;try{b=v??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(d).catch(x=>{var T;if(r)return;const S=e.retry??(mc?0:3),_=e.retryDelay??iX,E=typeof _=="function"?_(n,x):_,C=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!C){p(x);return}n++,(T=e.onFail)==null||T.call(e,n,x),JK(E).then(()=>c()?void 0:h()).then(()=>{t?p(x):m()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():h().then(m),o)}}function oX(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var gr=oX(),Gl,jI,xN=(jI=class{constructor(){Ze(this,Gl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ew(this.gcTime)&&je(this,Gl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mc?1/0:5*60*1e3))}clearGcTimeout(){se(this,Gl)&&(clearTimeout(se(this,Gl)),je(this,Gl,void 0))}},Gl=new WeakMap,jI),Wu,Uu,to,Er,pp,ql,So,Is,$I,sX=($I=class extends xN{constructor(t){super();Ze(this,So);Ze(this,Wu);Ze(this,Uu);Ze(this,to);Ze(this,Er);Ze(this,pp);Ze(this,ql);je(this,ql,!1),je(this,pp,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,to,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,Wu,aX(this.options)),this.state=t.state??se(this,Wu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=se(this,Er))==null?void 0:t.promise}setOptions(t){this.options={...se(this,pp),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&se(this,to).remove(this)}setData(t,n){const r=Tw(this.state.data,t,this.options);return Nt(this,So,Is).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Nt(this,So,Is).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=se(this,Er))==null?void 0:r.promise;return(i=se(this,Er))==null||i.cancel(t),n?n.then(no).catch(no):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(se(this,Wu))}isActive(){return this.observers.some(t=>Co(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!gN(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=se(this,Er))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=se(this,Er))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),se(this,to).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(se(this,Er)&&(se(this,ql)?se(this,Er).cancel({revert:!0}):se(this,Er).cancelRetry()),this.scheduleGc()),se(this,to).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Nt(this,So,Is).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(se(this,Er))return se(this,Er).continueRetry(),se(this,Er).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(je(this,ql,!0),r.signal)})},o=()=>{const d=mN(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return i(p),je(this,ql,!1),this.options.persister?this.options.persister(d,p,this):d(p)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),je(this,Uu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Nt(this,So,Is).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var p,h,m,b;wx(d)&&d.silent||Nt(this,So,Is).call(this,{type:"error",error:d}),wx(d)||((h=(p=se(this,to).config).onError)==null||h.call(p,d,this),(b=(m=se(this,to).config).onSettled)==null||b.call(m,this.state.data,d,this)),this.scheduleGc()};return je(this,Er,vN({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var p,h,m,b;if(d===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){a(v);return}(h=(p=se(this,to).config).onSuccess)==null||h.call(p,d,this),(b=(m=se(this,to).config).onSettled)==null||b.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,p)=>{Nt(this,So,Is).call(this,{type:"failed",failureCount:d,error:p})},onPause:()=>{Nt(this,So,Is).call(this,{type:"pause"})},onContinue:()=>{Nt(this,So,Is).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),se(this,Er).start()}},Wu=new WeakMap,Uu=new WeakMap,to=new WeakMap,Er=new WeakMap,pp=new WeakMap,ql=new WeakMap,So=new WeakSet,Is=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wN(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return wx(i)&&i.revert&&se(this,Uu)?{...se(this,Uu),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),gr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),se(this,to).notify({query:this,type:"updated",action:t})})},$I);function wN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function aX(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Uo,zI,SN=(zI=class extends vp{constructor(t={}){super();Ze(this,Uo);this.config=t,je(this,Uo,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??J_(i,n);let s=this.get(o);return s||(s=new sX({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){se(this,Uo).has(t.queryHash)||(se(this,Uo).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=se(this,Uo).get(t.queryHash);n&&(t.destroy(),n===t&&se(this,Uo).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){gr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return se(this,Uo).get(t)}getAll(){return[...se(this,Uo).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uT(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uT(t,r)):n}notify(t){gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){gr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){gr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Uo=new WeakMap,zI),Go,Br,Yl,qo,wa,BI,lX=(BI=class extends xN{constructor(t){super();Ze(this,qo);Ze(this,Go);Ze(this,Br);Ze(this,Yl);this.mutationId=t.mutationId,je(this,Br,t.mutationCache),je(this,Go,[]),this.state=t.state||cX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){se(this,Go).includes(t)||(se(this,Go).push(t),this.clearGcTimeout(),se(this,Br).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,Go,se(this,Go).filter(n=>n!==t)),this.scheduleGc(),se(this,Br).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){se(this,Go).length||(this.state.status==="pending"?this.scheduleGc():se(this,Br).remove(this))}continue(){var t;return((t=se(this,Yl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,l,c,u,d,p,h,m,b,v,x,S,_,E,C,T,O;je(this,Yl,vN({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,N)=>{Nt(this,qo,wa).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{Nt(this,qo,wa).call(this,{type:"pause"})},onContinue:()=>{Nt(this,qo,wa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>se(this,Br).canRun(this)}));const n=this.state.status==="pending",r=!se(this,Yl).canStart();try{if(!n){Nt(this,qo,wa).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=se(this,Br).config).onMutate)==null?void 0:o.call(i,t,this));const N=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));N!==this.state.context&&Nt(this,qo,wa).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const k=await se(this,Yl).start();return await((c=(l=se(this,Br).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((h=(p=se(this,Br).config).onSettled)==null?void 0:h.call(p,k,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,k,null,t,this.state.context)),Nt(this,qo,wa).call(this,{type:"success",data:k}),k}catch(k){try{throw await((x=(v=se(this,Br).config).onError)==null?void 0:x.call(v,k,t,this.state.context,this)),await((_=(S=this.options).onError)==null?void 0:_.call(S,k,t,this.state.context)),await((C=(E=se(this,Br).config).onSettled)==null?void 0:C.call(E,void 0,k,this.state.variables,this.state.context,this)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,k,t,this.state.context)),k}finally{Nt(this,qo,wa).call(this,{type:"error",error:k})}}finally{se(this,Br).runNext(this)}}},Go=new WeakMap,Br=new WeakMap,Yl=new WeakMap,qo=new WeakSet,wa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gr.batch(()=>{se(this,Go).forEach(r=>{r.onMutationUpdate(t)}),se(this,Br).notify({mutation:this,type:"updated",action:t})})},BI);function cX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bs,_o,gp,HI,uX=(HI=class extends vp{constructor(t={}){super();Ze(this,Bs);Ze(this,_o);Ze(this,gp);this.config=t,je(this,Bs,new Set),je(this,_o,new Map),je(this,gp,0)}build(t,n,r){const i=new lX({mutationCache:this,mutationId:++Bg(this,gp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){se(this,Bs).add(t);const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n);r?r.push(t):se(this,_o).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(se(this,Bs).delete(t)){const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&se(this,_o).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Wg(t);if(typeof n=="string"){const i=(r=se(this,_o).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gr.batch(()=>{se(this,Bs).forEach(t=>{this.notify({type:"removed",mutation:t})}),se(this,Bs).clear(),se(this,_o).clear()})}getAll(){return Array.from(se(this,Bs))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dT(n,r))}findAll(t={}){return this.getAll().filter(n=>dT(t,n))}notify(t){gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return gr.batch(()=>Promise.all(t.map(n=>n.continue().catch(no))))}},Bs=new WeakMap,_o=new WeakMap,gp=new WeakMap,HI);function Wg(e){var t;return(t=e.options.scope)==null?void 0:t.id}function pT(e){return{onFetch:(t,n)=>{var u,d,p,h,m;const r=t.options,i=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let b=!1;const v=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},x=mN(t.options,t.fetchOptions),S=async(_,E,C)=>{if(b)return Promise.reject();if(E==null&&_.pages.length)return Promise.resolve(_);const T={queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};v(T);const O=await x(T),{maxPages:k}=t.options,N=C?tX:eX;return{pages:N(_.pages,O,k),pageParams:N(_.pageParams,E,k)}};if(i&&o.length){const _=i==="backward",E=_?dX:gT,C={pages:o,pageParams:s},T=E(r,C);a=await S(C,T,_)}else{const _=e??o.length;do{const E=l===0?s[0]??r.initialPageParam:gT(r,a);if(l>0&&E==null)break;a=await S(a,E),l++}while(l<_)}return a};t.options.persister?t.fetchFn=()=>{var b,v;return(v=(b=t.options).persister)==null?void 0:v.call(b,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function gT(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function dX(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var An,Ma,Ta,Gu,qu,Oa,Yu,Ku,VI,fX=(VI=class{constructor(e={}){Ze(this,An);Ze(this,Ma);Ze(this,Ta);Ze(this,Gu);Ze(this,qu);Ze(this,Oa);Ze(this,Yu);Ze(this,Ku);je(this,An,e.queryCache||new SN),je(this,Ma,e.mutationCache||new uX),je(this,Ta,e.defaultOptions||{}),je(this,Gu,new Map),je(this,qu,new Map),je(this,Oa,0)}mount(){Bg(this,Oa)._++,se(this,Oa)===1&&(je(this,Yu,Z_.subscribe(async e=>{e&&(await this.resumePausedMutations(),se(this,An).onFocus())})),je(this,Ku,_b.subscribe(async e=>{e&&(await this.resumePausedMutations(),se(this,An).onOnline())})))}unmount(){var e,t;Bg(this,Oa)._--,se(this,Oa)===0&&((e=se(this,Yu))==null||e.call(this),je(this,Yu,void 0),(t=se(this,Ku))==null||t.call(this),je(this,Ku,void 0))}isFetching(e){return se(this,An).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return se(this,Ma).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=se(this,An).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=se(this,An).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Mu(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return se(this,An).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=se(this,An).get(r.queryHash),o=i==null?void 0:i.state.data,s=QK(t,o);if(s!==void 0)return se(this,An).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return gr.batch(()=>se(this,An).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=se(this,An).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=se(this,An);gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=se(this,An),r={type:"active",...e};return gr.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=gr.batch(()=>se(this,An).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(no).catch(no)}invalidateQueries(e,t={}){return gr.batch(()=>{if(se(this,An).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=gr.batch(()=>se(this,An).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(no)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(no)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=se(this,An).build(this,t);return n.isStaleByTime(Mu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(no).catch(no)}fetchInfiniteQuery(e){return e.behavior=pT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(no).catch(no)}ensureInfiniteQueryData(e){return e.behavior=pT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _b.isOnline()?se(this,Ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return se(this,An)}getMutationCache(){return se(this,Ma)}getDefaultOptions(){return se(this,Ta)}setDefaultOptions(e){je(this,Ta,e)}setQueryDefaults(e,t){se(this,Gu).set(Ch(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...se(this,Gu).values()],n={};return t.forEach(r=>{Eh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){se(this,qu).set(Ch(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...se(this,qu).values()];let n={};return t.forEach(r=>{Eh(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...se(this,Ta).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=J_(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...se(this,Ta).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){se(this,An).clear(),se(this,Ma).clear()}},An=new WeakMap,Ma=new WeakMap,Ta=new WeakMap,Gu=new WeakMap,qu=new WeakMap,Oa=new WeakMap,Yu=new WeakMap,Ku=new WeakMap,VI),ci,Lt,mp,Hr,Kl,Xu,Da,Yo,bp,Qu,Ju,Xl,Ql,Aa,Zu,Jt,Ff,Dw,Aw,kw,Iw,Nw,Lw,Fw,_N,WI,hX=(WI=class extends vp{constructor(t,n){super();Ze(this,Jt);Ze(this,ci);Ze(this,Lt);Ze(this,mp);Ze(this,Hr);Ze(this,Kl);Ze(this,Xu);Ze(this,Da);Ze(this,Yo);Ze(this,bp);Ze(this,Qu);Ze(this,Ju);Ze(this,Xl);Ze(this,Ql);Ze(this,Aa);Ze(this,Zu,new Set);this.options=n,je(this,ci,t),je(this,Yo,null),je(this,Da,Ow()),this.options.experimental_prefetchInRender||se(this,Da).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(se(this,Lt).addObserver(this),mT(se(this,Lt),this.options)?Nt(this,Jt,Ff).call(this):this.updateResult(),Nt(this,Jt,Iw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jw(se(this,Lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jw(se(this,Lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Nt(this,Jt,Nw).call(this),Nt(this,Jt,Lw).call(this),se(this,Lt).removeObserver(this)}setOptions(t,n){const r=this.options,i=se(this,Lt);if(this.options=se(this,ci).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Co(this.options.enabled,se(this,Lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Nt(this,Jt,Fw).call(this),se(this,Lt).setOptions(this.options),r._defaulted&&!Pw(this.options,r)&&se(this,ci).getQueryCache().notify({type:"observerOptionsUpdated",query:se(this,Lt),observer:this});const o=this.hasListeners();o&&bT(se(this,Lt),i,this.options,r)&&Nt(this,Jt,Ff).call(this),this.updateResult(n),o&&(se(this,Lt)!==i||Co(this.options.enabled,se(this,Lt))!==Co(r.enabled,se(this,Lt))||Mu(this.options.staleTime,se(this,Lt))!==Mu(r.staleTime,se(this,Lt)))&&Nt(this,Jt,Dw).call(this);const s=Nt(this,Jt,Aw).call(this);o&&(se(this,Lt)!==i||Co(this.options.enabled,se(this,Lt))!==Co(r.enabled,se(this,Lt))||s!==se(this,Aa))&&Nt(this,Jt,kw).call(this,s)}getOptimisticResult(t){const n=se(this,ci).getQueryCache().build(se(this,ci),t),r=this.createResult(n,t);return gX(this,r)&&(je(this,Hr,r),je(this,Xu,this.options),je(this,Kl,se(this,Lt).state)),r}getCurrentResult(){return se(this,Hr)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){se(this,Zu).add(t)}getCurrentQuery(){return se(this,Lt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=se(this,ci).defaultQueryOptions(t),r=se(this,ci).getQueryCache().build(se(this,ci),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Nt(this,Jt,Ff).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),se(this,Hr)))}createResult(t,n){var k;const r=se(this,Lt),i=this.options,o=se(this,Hr),s=se(this,Kl),a=se(this,Xu),c=t!==r?t.state:se(this,mp),{state:u}=t;let d={...u},p=!1,h;if(n._optimisticResults){const N=this.hasListeners(),F=!N&&mT(t,n),j=N&&bT(t,r,n,i);(F||j)&&(d={...d,...wN(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:b,status:v}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===se(this,bp))h=se(this,Qu);else try{je(this,bp,n.select),h=n.select(d.data),h=Tw(o==null?void 0:o.data,h,n),je(this,Qu,h),je(this,Yo,null)}catch(N){je(this,Yo,N)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&v==="pending"){let N;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=o.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((k=se(this,Ju))==null?void 0:k.state.data,se(this,Ju)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),je(this,Yo,null)}catch(F){je(this,Yo,F)}N!==void 0&&(v="success",h=Tw(o==null?void 0:o.data,N,n),p=!0)}se(this,Yo)&&(m=se(this,Yo),h=se(this,Qu),b=Date.now(),v="error");const x=d.fetchStatus==="fetching",S=v==="pending",_=v==="error",E=S&&x,C=h!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:S,isSuccess:v==="success",isError:_,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:b,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!S,isLoadingError:_&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&C,isStale:eC(t,n),refetch:this.refetch,promise:se(this,Da)};if(this.options.experimental_prefetchInRender){const N=$=>{O.status==="error"?$.reject(O.error):O.data!==void 0&&$.resolve(O.data)},F=()=>{const $=je(this,Da,O.promise=Ow());N($)},j=se(this,Da);switch(j.status){case"pending":t.queryHash===r.queryHash&&N(j);break;case"fulfilled":(O.status==="error"||O.data!==j.value)&&F();break;case"rejected":(O.status!=="error"||O.error!==j.reason)&&F();break}}return O}updateResult(t){const n=se(this,Hr),r=this.createResult(se(this,Lt),this.options);if(je(this,Kl,se(this,Lt).state),je(this,Xu,this.options),se(this,Kl).data!==void 0&&je(this,Ju,se(this,Lt)),Pw(r,n))return;je(this,Hr,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!se(this,Zu).size)return!0;const l=new Set(a??se(this,Zu));return this.options.throwOnError&&l.add("error"),Object.keys(se(this,Hr)).some(c=>{const u=c;return se(this,Hr)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Nt(this,Jt,_N).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Nt(this,Jt,Iw).call(this)}},ci=new WeakMap,Lt=new WeakMap,mp=new WeakMap,Hr=new WeakMap,Kl=new WeakMap,Xu=new WeakMap,Da=new WeakMap,Yo=new WeakMap,bp=new WeakMap,Qu=new WeakMap,Ju=new WeakMap,Xl=new WeakMap,Ql=new WeakMap,Aa=new WeakMap,Zu=new WeakMap,Jt=new WeakSet,Ff=function(t){Nt(this,Jt,Fw).call(this);let n=se(this,Lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(no)),n},Dw=function(){Nt(this,Jt,Nw).call(this);const t=Mu(this.options.staleTime,se(this,Lt));if(mc||se(this,Hr).isStale||!Ew(t))return;const r=gN(se(this,Hr).dataUpdatedAt,t)+1;je(this,Xl,setTimeout(()=>{se(this,Hr).isStale||this.updateResult()},r))},Aw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(se(this,Lt)):this.options.refetchInterval)??!1},kw=function(t){Nt(this,Jt,Lw).call(this),je(this,Aa,t),!(mc||Co(this.options.enabled,se(this,Lt))===!1||!Ew(se(this,Aa))||se(this,Aa)===0)&&je(this,Ql,setInterval(()=>{(this.options.refetchIntervalInBackground||Z_.isFocused())&&Nt(this,Jt,Ff).call(this)},se(this,Aa)))},Iw=function(){Nt(this,Jt,Dw).call(this),Nt(this,Jt,kw).call(this,Nt(this,Jt,Aw).call(this))},Nw=function(){se(this,Xl)&&(clearTimeout(se(this,Xl)),je(this,Xl,void 0))},Lw=function(){se(this,Ql)&&(clearInterval(se(this,Ql)),je(this,Ql,void 0))},Fw=function(){const t=se(this,ci).getQueryCache().build(se(this,ci),this.options);if(t===se(this,Lt))return;const n=se(this,Lt);je(this,Lt,t),je(this,mp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_N=function(t){gr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(se(this,Hr))}),se(this,ci).getQueryCache().notify({query:se(this,Lt),type:"observerResultsUpdated"})})},WI);function pX(e,t){return Co(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mT(e,t){return pX(e,t)||e.state.data!==void 0&&jw(e,t,t.refetchOnMount)}function jw(e,t,n){if(Co(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&eC(e,t)}return!1}function bT(e,t,n,r){return(e!==t||Co(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&eC(e,n)}function eC(e,t){return Co(t.enabled,e)!==!1&&e.isStaleByTime(Mu(t.staleTime,e))}function gX(e,t){return!Pw(e.getCurrentResult(),t)}var tC=R.createContext(void 0),nC=e=>{const t=R.useContext(tC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mX=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(tC.Provider,{value:e,children:t})),CN=R.createContext(!1),bX=()=>R.useContext(CN);CN.Provider;function yX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vX=R.createContext(yX()),xX=()=>R.useContext(vX);function wX(e,t){return typeof e=="function"?e(...t):!!e}function yT(){}var SX=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},_X=e=>{R.useEffect(()=>{e.clearReset()},[e])},CX=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&wX(n,[e.error,r]),EX=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},RX=(e,t)=>e.isLoading&&e.isFetching&&!t,PX=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,vT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function MX(e,t,n){var d,p,h,m,b;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=nC(),i=bX(),o=xX(),s=r.defaultQueryOptions(e);(p=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,s),s._optimisticResults=i?"isRestoring":"optimistic",EX(s),SX(s,o),_X(o);const a=!r.getQueryCache().get(s.queryHash),[l]=R.useState(()=>new t(r,s)),c=l.getOptimisticResult(s),u=!i&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(v=>{const x=u?l.subscribe(gr.batchCalls(v)):yT;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),PX(s,c))throw vT(s,l,o);if(CX({result:c,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw c.error;if((m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,s,c),s.experimental_prefetchInRender&&!mc&&RX(c,i)){const v=a?vT(s,l,o):(b=r.getQueryCache().get(s.queryHash))==null?void 0:b.promise;v==null||v.catch(yT).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function xp(e,t){return MX(e,hX)}function TX(){const e=P.useContext(tC);if(e&&e.isSemaphorClient)return e}function EN({children:e}){const{setIsSessionExpired:t}=Hn(),n=TX(),[r]=P.useState(()=>{const i=new fX({queryCache:new SN({onError:o=>{o instanceof Error?(console.error(`Something went wrong: ${o.message}`),o.message==="invalid token"&&t(!0)):console.error("Something went wrong:",o)}}),defaultOptions:{queries:{gcTime:36e5,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}}});return i.isSemaphorClient=!0,i});return n?y.jsx(y.Fragment,{children:e}):y.jsx(mX,{client:r,children:e})}const Dc=P.forwardRef(({children:e,className:t,...n},r)=>y.jsx("div",{className:be("semaphor-scope",t),ref:r,...n,children:e})),OX={id:"",authToken:void 0},RN=P.createContext(OX),PN=({children:e,dashboardProps:t})=>y.jsx(EN,{children:y.jsx(RN.Provider,{value:t,children:y.jsx(Dc,{style:{height:"100%"},children:e})})});function Vi(){const e=P.useContext(RN);if(e===void 0)throw new Error("useApplicationContext must be used within a ApplicationContextProvider");return e}function DX(){const{authToken:e,version:t}=Vi(),n=ye(a=>a.selectedLensId),{data:r,isLoading:i,isFetching:o,isError:s}=xp({queryKey:["dashboard",n,e==null?void 0:e.accessToken],queryFn:()=>cK(e==null?void 0:e.accessToken,{lensId:n,version:t,isEncrypted:!0}),enabled:!!(e!=null&&e.accessToken)});return{data:r,isLoading:i,isFetching:o,isError:s}}function AX(){const{authToken:e}=Vi(),t=ye(r=>r.authToken),{setAuthToken:n}=Hn();return P.useEffect(()=>{e&&(e==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&n(e)},[e,t,n]),e}function MN(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function xT(e,t){const n=MN(e);return n==="dark"?Jl.merge({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function kX({customStyle:e,currentTheme:t,onSave:n,onEvent:r,defaultFilterValues:i,onFilterValuesChange:o}){const{authToken:s}=Vi();AX();const a=ye(L=>L.selectedLensId),{data:l,isLoading:c,isFetching:u,isError:d}=DX(),[p,h]=P.useState(i||[]),{theme:m,setTheme:b}=pN(),v=ye(L=>L.dashboard.globalStyle),{setDashboard:x,setDashboardWithFilterValues:S,setSelectedSheetId:_,setStyle:E,setOnSaveFunction:C,setLenses:T,setSelectedLensId:O,setInitStore:k}=Hn();ye(L=>L.actions.setCustomCards);const N=ye(L=>L.actions.setFilterValues),F=ye(L=>L.filterValues),j=ye(L=>L.actions.setThemeStyle),$=ye(L=>L.actions.setDashboardTheme),X=ye(L=>L.actions.setOnEvent);P.useEffect(()=>{s&&k()},[s,k]),P.useEffect(()=>{if(m){const L=MN(m);$(L)}},[m,$]),P.useEffect(()=>{t&&b(t)},[t,b]);const V=P.useCallback(()=>{const L=Jl.cloneDeep(xb),U=Jl.merge(L,v);if(e){const B=Jl.merge(U,e),W=xT(m,B);j(W),E(B)}else{const B=xT(m,U);j(B),E(xb)}},[m,e,v,j,E]);return P.useEffect(()=>{l&&l.dashboard&&V()},[m,e,v,V,l]),P.useEffect(()=>{var Y,G;function L(D,ee){const K=D.filters||[],oe=[];for(const J of ee){const Z=K.find(ae=>ae.id===J.filterId);Z&&oe.push({filterId:J.filterId,connectionType:Z.database==="NA"?"api":"database",name:Z.column,operation:Z.operation,valueType:Pu(Z),values:J.values})}return oe}if(!l||!l.dashboard)return;const{dashboard:U,filterValues:B,defaultLensId:W,lenses:q}=l,A=L(U,p||[]);S(U,(!B||(B==null?void 0:B.length)===0?A:B)||[]),W&&O(W),q&&T(q),_(((G=(Y=U==null?void 0:U.sheets)==null?void 0:Y[0])==null?void 0:G.id)||null)},[l,x,_,N,a,T,S,O,p]),P.useEffect(()=>{o&&F&&o(F)},[F,o]),P.useEffect(()=>{n&&C(n),r&&X(r)},[n,C,r,X]),{isFetching:u,isLoading:c,isError:d}}function Tu({className:e,...t}){return y.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}const TN=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));TN.displayName="Card";const Ay=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));Ay.displayName="CardHeader";const Rd=R.forwardRef(({className:e,...t},n)=>y.jsx("h3",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));Rd.displayName="CardTitle";const rC=R.forwardRef(({className:e,...t},n)=>y.jsx("p",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));rC.displayName="CardDescription";const ky=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("px-6 pt-0",e),...t}));ky.displayName="CardContent";const ON=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));ON.displayName="CardFooter";function DN({className:e,customStyle:t,onSave:n,onEvent:r,LoadingComponent:i,ErrorComponent:o,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,showAssistant:p,defaultFilterValues:h,onFilterValuesChange:m,...b}){const{placeholders:v}=Vi(),x=ye(C=>C.themeStyle),S=ye(C=>C.isSessionExpired),{isLoading:_,isError:E}=kX({authToken:l,customStyle:t,currentTheme:c,onSave:n,onEvent:r,defaultFilterValues:h,onFilterValuesChange:m});return _||!l?(r==null||r({type:"info",message:"Loading dashboard"}),i?y.jsx(i,{message:"loading"}):y.jsx("div",{className:"flex items-center gap-3",children:y.jsx(Tu,{className:"h-1 w-full dark:h-[2px]"})})):E?(r==null||r({type:"error",message:"Error fetching dashboard"}),o?(console.log("Error fetching dashboard"),y.jsx(o,{})):y.jsx("div",{children:"Error"})):S?(r==null||r({type:"error",message:"Session Expired"}),v!=null&&v.SessionExpired?y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsx("div",{children:v.SessionExpired})}):y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsxs("div",{className:"space-y-4 rounded-md border border-muted p-10",children:[y.jsx(Rd,{children:"Session Expired"}),y.jsx("p",{className:"text-muted-foreground",children:"Please refresh your page to continue."})]})})):y.jsx("div",{className:be("flex h-full flex-col justify-between",x==null?void 0:x.dashboardPanel,e),style:{},role:"dashboard-panel",...b})}function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function IX(e,t){const n=R.createContext(t),r=o=>{const{children:s,...a}=o,l=R.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(o){const s=R.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function tr(e,t=[]){let n=[];function r(o,s){const a=R.createContext(s),l=n.length;n=[...n,s];const c=d=>{var x;const{scope:p,children:h,...m}=d,b=((x=p==null?void 0:p[e])==null?void 0:x[l])||a,v=R.useMemo(()=>m,Object.values(m));return y.jsx(b.Provider,{value:v,children:h})};c.displayName=o+"Provider";function u(d,p){var b;const h=((b=p==null?void 0:p[e])==null?void 0:b[l])||a,m=R.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[c,u]}const i=()=>{const o=n.map(s=>R.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return R.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,NX(i,...t)]}function NX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function wT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Iy(...e){return t=>{let n=!1;const r=e.map(i=>{const o=wT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():wT(e[i],null)}}}}function rt(...e){return R.useCallback(Iy(...e),e)}var Js=R.forwardRef((e,t)=>{const{children:n,...r}=e,i=R.Children.toArray(n),o=i.find(LX);if(o){const s=o.props.children,a=i.map(l=>l===o?R.Children.count(s)>1?R.Children.only(null):R.isValidElement(s)?s.props.children:null:l);return y.jsx($w,{...r,ref:t,children:R.isValidElement(s)?R.cloneElement(s,void 0,a):null})}return y.jsx($w,{...r,ref:t,children:n})});Js.displayName="Slot";var $w=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const i=jX(n);return R.cloneElement(n,{...FX(r,n.props),ref:t?Iy(t,i):i})}return R.Children.count(n)>1?R.Children.only(null):null});$w.displayName="SlotClone";var iC=({children:e})=>y.jsx(y.Fragment,{children:e});function LX(e){return R.isValidElement(e)&&e.type===iC}function FX(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function jX(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ny(e){const t=e+"CollectionProvider",[n,r]=tr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:m,children:b}=h,v=P.useRef(null),x=P.useRef(new Map).current;return y.jsx(i,{scope:m,itemMap:x,collectionRef:v,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=P.forwardRef((h,m)=>{const{scope:b,children:v}=h,x=o(a,b),S=rt(m,x.collectionRef);return y.jsx(Js,{ref:S,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=P.forwardRef((h,m)=>{const{scope:b,children:v,...x}=h,S=P.useRef(null),_=rt(m,S),E=o(c,b);return P.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),y.jsx(Js,{[u]:"",ref:_,children:v})});d.displayName=c;function p(h){const m=o(e+"CollectionConsumer",h);return P.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},p,r]}var mr=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},$X=R.useId||(()=>{}),zX=0;function qn(e){const[t,n]=R.useState($X());return mr(()=>{e||n(r=>r??String(zX++))},[e]),e||(t?`radix-${t}`:"")}var BX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ne=BX.reduce((e,t)=>{const n=R.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Js:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function AN(e,t){e&&hc.flushSync(()=>e.dispatchEvent(t))}function er(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ar({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=HX({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=er(n),l=R.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else i(c)},[o,e,i,a]);return[s,l]}function HX({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,i=R.useRef(r),o=er(t);return R.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var VX=R.createContext(void 0);function Ac(e){const t=R.useContext(VX);return e||t||"ltr"}var Sx="rovingFocusGroup.onEntryFocus",WX={bubbles:!1,cancelable:!0},Ly="RovingFocusGroup",[zw,kN,UX]=Ny(Ly),[GX,Pd]=tr(Ly,[UX]),[qX,YX]=GX(Ly),IN=R.forwardRef((e,t)=>y.jsx(zw.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(zw.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(KX,{...e,ref:t})})}));IN.displayName=Ly;var KX=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,p=R.useRef(null),h=rt(t,p),m=Ac(o),[b=null,v]=Ar({prop:s,defaultProp:a,onChange:l}),[x,S]=R.useState(!1),_=er(c),E=kN(n),C=R.useRef(!1),[T,O]=R.useState(0);return R.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(Sx,_),()=>k.removeEventListener(Sx,_)},[_]),y.jsx(qX,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:b,onItemFocus:R.useCallback(k=>v(k),[v]),onItemShiftTab:R.useCallback(()=>S(!0),[]),onFocusableItemAdd:R.useCallback(()=>O(k=>k+1),[]),onFocusableItemRemove:R.useCallback(()=>O(k=>k-1),[]),children:y.jsx(Ne.div,{tabIndex:x||T===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{C.current=!0}),onFocus:Re(e.onFocus,k=>{const N=!C.current;if(k.target===k.currentTarget&&N&&!x){const F=new CustomEvent(Sx,WX);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const j=E().filter(U=>U.focusable),$=j.find(U=>U.active),X=j.find(U=>U.id===b),L=[$,X,...j].filter(Boolean).map(U=>U.ref.current);FN(L,u)}}C.current=!1}),onBlur:Re(e.onBlur,()=>S(!1))})})}),NN="RovingFocusGroupItem",LN=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=qn(),l=o||a,c=YX(NN,n),u=c.currentTabStopId===l,d=kN(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=c;return R.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),y.jsx(zw.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:y.jsx(Ne.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Re(e.onMouseDown,m=>{r?c.onItemFocus(l):m.preventDefault()}),onFocus:Re(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Re(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const b=JX(m,c.orientation,c.dir);if(b!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=d().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(m.currentTarget);x=c.loop?ZX(x,S+1):x.slice(S+1)}setTimeout(()=>FN(x))}})})})});LN.displayName=NN;var XX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function QX(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JX(e,t,n){const r=QX(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return XX[r]}function FN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ZX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var oC=IN,sC=LN;function eQ(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var Yn=e=>{const{present:t,children:n}=e,r=tQ(t),i=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),o=rt(r.ref,nQ(i));return typeof n=="function"||r.isPresent?R.cloneElement(i,{ref:o}):null};Yn.displayName="Presence";function tQ(e){const[t,n]=R.useState(),r=R.useRef({}),i=R.useRef(e),o=R.useRef("none"),s=e?"mounted":"unmounted",[a,l]=eQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=Ug(r.current);o.current=a==="mounted"?c:"none"},[a]),mr(()=>{const c=r.current,u=i.current;if(u!==e){const p=o.current,h=Ug(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mr(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const b=Ug(r.current).includes(h.animationName);if(h.target===t&&b&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(o.current=Ug(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ug(e){return(e==null?void 0:e.animationName)||"none"}function nQ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var aC="Tabs",[rQ,QMe]=tr(aC,[Pd]),jN=Pd(),[iQ,lC]=rQ(aC),$N=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Ac(a),[d,p]=Ar({prop:r,onChange:i,defaultProp:o});return y.jsx(iQ,{scope:n,baseId:qn(),value:d,onValueChange:p,orientation:s,dir:u,activationMode:l,children:y.jsx(Ne.div,{dir:u,"data-orientation":s,...c,ref:t})})});$N.displayName=aC;var zN="TabsList",BN=R.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=lC(zN,n),s=jN(n);return y.jsx(oC,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:y.jsx(Ne.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});BN.displayName=zN;var HN="TabsTrigger",VN=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=lC(HN,n),a=jN(n),l=GN(s.baseId,r),c=qN(s.baseId,r),u=r===s.value;return y.jsx(sC,{asChild:!0,...a,focusable:!i,active:u,children:y.jsx(Ne.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:Re(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:Re(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:Re(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!i&&d&&s.onValueChange(r)})})})});VN.displayName=HN;var WN="TabsContent",UN=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=lC(WN,n),l=GN(a.baseId,r),c=qN(a.baseId,r),u=r===a.value,d=R.useRef(u);return R.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),y.jsx(Yn,{present:i||u,children:({present:p})=>y.jsx(Ne.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&o})})});UN.displayName=WN;function GN(e,t){return`${e}-trigger-${t}`}function qN(e,t){return`${e}-content-${t}`}var oQ=$N,YN=BN,KN=VN,XN=UN;const cC=oQ,Fy=R.forwardRef(({className:e,...t},n)=>y.jsx(YN,{ref:n,className:be("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Fy.displayName=YN.displayName;const jy=R.forwardRef(({className:e,...t},n)=>y.jsx(KN,{ref:n,className:be("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}));jy.displayName=KN.displayName;const uC=R.forwardRef(({className:e,...t},n)=>y.jsx(XN,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));uC.displayName=XN.displayName;var QN={exports:{}},wp={},Bw={exports:{}};(function(e,t){(function(n,r){r(t)})(Ca,function(n){function r(Z){return function(ce,pe,ie,ge,de,Ee,De){return Z(ce,pe,De)}}function i(Z){return function(ce,pe,ie,ge){if(!ce||!pe||typeof ce!="object"||typeof pe!="object")return Z(ce,pe,ie,ge);var de=ge.get(ce),Ee=ge.get(pe);if(de&&Ee)return de===pe&&Ee===ce;ge.set(ce,pe),ge.set(pe,ce);var De=Z(ce,pe,ie,ge);return ge.delete(ce),ge.delete(pe),De}}function o(Z,ae){var ce={};for(var pe in Z)ce[pe]=Z[pe];for(var pe in ae)ce[pe]=ae[pe];return ce}function s(Z){return Z.constructor===Object||Z.constructor==null}function a(Z){return typeof Z.then=="function"}function l(Z,ae){return Z===ae||Z!==Z&&ae!==ae}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",p="[object RegExp]",h="[object Map]",m="[object Number]",b="[object Object]",v="[object Set]",x="[object String]",S=Object.prototype.toString;function _(Z){var ae=Z.areArraysEqual,ce=Z.areDatesEqual,pe=Z.areMapsEqual,ie=Z.areObjectsEqual,ge=Z.areRegExpsEqual,de=Z.areSetsEqual,Ee=Z.createIsNestedEqual,De=Ee($e);function $e(Me,ze,yt){if(Me===ze)return!0;if(!Me||!ze||typeof Me!="object"||typeof ze!="object")return Me!==Me&&ze!==ze;if(s(Me)&&s(ze))return ie(Me,ze,De,yt);var Tt=Array.isArray(Me),mn=Array.isArray(ze);if(Tt||mn)return Tt===mn&&ae(Me,ze,De,yt);var Ot=S.call(Me);return Ot!==S.call(ze)?!1:Ot===d?ce(Me,ze,De,yt):Ot===p?ge(Me,ze,De,yt):Ot===h?pe(Me,ze,De,yt):Ot===v?de(Me,ze,De,yt):Ot===b||Ot===c?a(Me)||a(ze)?!1:ie(Me,ze,De,yt):Ot===u||Ot===m||Ot===x?l(Me.valueOf(),ze.valueOf()):!1}return $e}function E(Z,ae,ce,pe){var ie=Z.length;if(ae.length!==ie)return!1;for(;ie-- >0;)if(!ce(Z[ie],ae[ie],ie,ie,Z,ae,pe))return!1;return!0}var C=i(E);function T(Z,ae){return l(Z.valueOf(),ae.valueOf())}function O(Z,ae,ce,pe){var ie=Z.size===ae.size;if(!ie)return!1;if(!Z.size)return!0;var ge={},de=0;return Z.forEach(function(Ee,De){if(ie){var $e=!1,Me=0;ae.forEach(function(ze,yt){!$e&&!ge[Me]&&($e=ce(De,yt,de,Me,Z,ae,pe)&&ce(Ee,ze,De,yt,Z,ae,pe))&&(ge[Me]=!0),Me++}),de++,ie=$e}}),ie}var k=i(O),N="_owner",F=Object.prototype.hasOwnProperty;function j(Z,ae,ce,pe){var ie=Object.keys(Z),ge=ie.length;if(Object.keys(ae).length!==ge)return!1;for(var de;ge-- >0;){if(de=ie[ge],de===N){var Ee=!!Z.$$typeof,De=!!ae.$$typeof;if((Ee||De)&&Ee!==De)return!1}if(!F.call(ae,de)||!ce(Z[de],ae[de],de,de,Z,ae,pe))return!1}return!0}var $=i(j);function X(Z,ae){return Z.source===ae.source&&Z.flags===ae.flags}function V(Z,ae,ce,pe){var ie=Z.size===ae.size;if(!ie)return!1;if(!Z.size)return!0;var ge={};return Z.forEach(function(de,Ee){if(ie){var De=!1,$e=0;ae.forEach(function(Me,ze){!De&&!ge[$e]&&(De=ce(de,Me,Ee,ze,Z,ae,pe))&&(ge[$e]=!0),$e++}),ie=De}}),ie}var L=i(V),U=Object.freeze({areArraysEqual:E,areDatesEqual:T,areMapsEqual:O,areObjectsEqual:j,areRegExpsEqual:X,areSetsEqual:V,createIsNestedEqual:r}),B=Object.freeze({areArraysEqual:C,areDatesEqual:T,areMapsEqual:k,areObjectsEqual:$,areRegExpsEqual:X,areSetsEqual:L,createIsNestedEqual:r}),W=_(U);function q(Z,ae){return W(Z,ae,void 0)}var A=_(o(U,{createIsNestedEqual:function(){return l}}));function Y(Z,ae){return A(Z,ae,void 0)}var G=_(B);function D(Z,ae){return G(Z,ae,new WeakMap)}var ee=_(o(B,{createIsNestedEqual:function(){return l}}));function K(Z,ae){return ee(Z,ae,new WeakMap)}function oe(Z){return _(o(U,Z(U)))}function J(Z){var ae=_(o(B,Z(B)));return function(ce,pe,ie){return ie===void 0&&(ie=new WeakMap),ae(ce,pe,ie)}}n.circularDeepEqual=D,n.circularShallowEqual=K,n.createCustomCircularEqual=J,n.createCustomEqual=oe,n.deepEqual=q,n.sameValueZeroEqual=l,n.shallowEqual=Y,Object.defineProperty(n,"__esModule",{value:!0})})})(Bw,Bw.exports);var dC=Bw.exports;const fC=z_(xY);var Ct={},sQ=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(Ct,"__esModule",{value:!0});Ct.bottom=hC;Ct.childrenEqual=uQ;Ct.cloneLayout=JN;Ct.cloneLayoutItem=Zl;Ct.collides=$y;Ct.compact=e5;Ct.compactItem=t5;Ct.compactType=_Q;Ct.correctBounds=n5;Ct.fastPositionEqual=dQ;Ct.fastRGLPropsEqual=void 0;Ct.getAllCollisions=r5;Ct.getFirstCollision=Fl;Ct.getLayoutItem=pC;Ct.getStatics=gC;Ct.modifyLayout=ZN;Ct.moveElement=$f;Ct.moveElementAwayFromCollision=Vw;Ct.noop=void 0;Ct.perc=hQ;Ct.resizeItemInDirection=vQ;Ct.setTopLeft=wQ;Ct.setTransform=xQ;Ct.sortLayoutItems=wC;Ct.sortLayoutItemsByColRow=l5;Ct.sortLayoutItemsByRowCol=a5;Ct.synchronizeLayoutWithChildren=SQ;Ct.validateLayout=c5;Ct.withLayoutItem=cQ;var ST=dC,jf=aQ(P);function aQ(e){return e&&e.__esModule?e:{default:e}}const lQ=process.env.NODE_ENV==="production";function hC(e){let t=0,n;for(let r=0,i=e.length;r<i;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function JN(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Zl(e[n]);return t}function ZN(e,t){const n=Array(e.length);for(let r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function cQ(e,t,n){let r=pC(e,t);return r?(r=n(Zl(r)),e=ZN(e,r),[e,r]):[e,null]}function Zl(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 uQ(e,t){return(0,ST.deepEqual)(jf.default.Children.map(e,n=>n==null?void 0:n.key),jf.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,ST.deepEqual)(jf.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),jf.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}Ct.fastRGLPropsEqual=sQ;function dQ(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function $y(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 e5(e,t,n,r){const i=gC(e),o=wC(e,t),s=Array(e.length);for(let a=0,l=o.length;a<l;a++){let c=Zl(o[a]);c.static||(c=t5(i,c,t,n,o,r),i.push(c)),s[e.indexOf(o[a])]=c,c.moved=!1}return s}const fQ={x:"w",y:"h"};function Hw(e,t,n,r){const i=fQ[r];t[r]+=1;const o=e.map(s=>s.i).indexOf(t.i);for(let s=o+1;s<e.length;s++){const a=e[s];if(!a.static){if(a.y>t.y+t.h)break;$y(t,a)&&Hw(e,a,n+t[i],r)}}t[r]=n}function t5(e,t,n,r,i,o){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(hC(e),t.y);t.y>0&&!Fl(e,t);)t.y--;else if(a)for(;t.x>0&&!Fl(e,t);)t.x--;let l;for(;(l=Fl(e,t))&&!(n===null&&o);)if(a?Hw(i,t,l.x+l.w,"x"):Hw(i,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!Fl(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function n5(e,t){const n=gC(e);for(let r=0,i=e.length;r<i;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),!o.static)n.push(o);else for(;Fl(n,o);)o.y++}return e}function pC(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function Fl(e,t){for(let n=0,r=e.length;n<r;n++)if($y(e[n],t))return e[n]}function r5(e,t){return e.filter(n=>$y(n,t))}function gC(e){return e.filter(t=>t.static)}function $f(e,t,n,r,i,o,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;const c=t.x,u=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=wC(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const h=r5(d,t),m=h.length>0;if(m&&l)return JN(e);if(m&&o)return`${t.i}`,t.x=c,t.y=u,t.moved=!1,e;for(let b=0,v=h.length;b<v;b++){const x=h[b];`${t.i}${t.x}${t.y}${x.i}${x.x}${x.y}`,!x.moved&&(x.static?e=Vw(e,x,t,i,s):e=Vw(e,t,x,i,s))}return e}function Vw(e,t,n,r,i,o){const s=i==="horizontal",a=i==="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"},p=Fl(e,d),h=p&&p.y+p.h>t.y,m=p&&t.x+t.w>p.x;if(p){if(h&&a)return $f(e,n,void 0,t.y+1,r,l,i);if(h&&i==null)return t.y=n.y,n.y=n.y+n.h,e;if(m&&s)return $f(e,t,n.x,void 0,r,l,i)}else return`${n.i}${d.x}${d.y}`,$f(e,n,s?d.x:void 0,a?d.y:void 0,r,l,i)}const c=s?n.x+1:void 0,u=a?n.y+1:void 0;return c==null&&u==null?e:$f(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,i)}function hQ(e){return e*100+"%"}const i5=(e,t,n,r)=>e+n>r?t:n,o5=(e,t,n)=>e<0?t:n,s5=e=>Math.max(0,e),mC=e=>Math.max(0,e),bC=(e,t,n)=>{let{left:r,height:i,width:o}=t;const s=e.top-(i-e.height);return{left:r,width:o,height:o5(s,e.height,i),top:mC(s)}},yC=(e,t,n)=>{let{top:r,left:i,height:o,width:s}=t;return{top:r,height:o,width:i5(e.left,e.width,s,n),left:s5(i)}},vC=(e,t,n)=>{let{top:r,height:i,width:o}=t;const s=e.left-(o-e.width);return{height:i,width:s<0?e.width:i5(e.left,e.width,o,n),top:mC(r),left:s5(s)}},xC=(e,t,n)=>{let{top:r,left:i,height:o,width:s}=t;return{width:s,left:i,height:o5(r,e.height,o),top:mC(r)}},pQ=function(){return bC(arguments.length<=0?void 0:arguments[0],yC(...arguments))},gQ=function(){return bC(arguments.length<=0?void 0:arguments[0],vC(...arguments))},mQ=function(){return xC(arguments.length<=0?void 0:arguments[0],yC(...arguments))},bQ=function(){return xC(arguments.length<=0?void 0:arguments[0],vC(...arguments))},yQ={n:bC,ne:pQ,e:yC,se:mQ,s:xC,sw:bQ,w:vC,nw:gQ};function vQ(e,t,n,r){const i=yQ[e];return i?i(t,{...t,...n},r):n}function xQ(e){let{top:t,left:n,width:r,height:i}=e;const o=`translate(${n}px,${t}px)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${r}px`,height:`${i}px`,position:"absolute"}}function wQ(e){let{top:t,left:n,width:r,height:i}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${i}px`,position:"absolute"}}function wC(e,t){return t==="horizontal"?l5(e):t==="vertical"?a5(e):e}function a5(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 l5(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 SQ(e,t,n,r,i){e=e||[];const o=[];jf.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=pC(e,String(a.key)),c=a.props["data-grid"];l&&c==null?o.push(Zl(l)):c?(lQ||c5([c],"ReactGridLayout.children"),o.push(Zl({...c,i:a.key}))):o.push(Zl({w:1,h:1,x:0,y:hC(o),i:String(a.key)}))});const s=n5(o,{cols:n});return i?s:e5(s,r,n)}function c5(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,i=e.length;r<i;r++){const o=e[r];for(let s=0;s<n.length;s++){const a=n[s],l=o[a];if(typeof l!="number"||Number.isNaN(l))throw new Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${l} (${typeof l})`)}if(typeof o.i<"u"&&typeof o.i!="string")throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${o.i} (${typeof o.i})`)}}function _Q(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}const CQ=()=>{};Ct.noop=CQ;var hs={};Object.defineProperty(hs,"__esModule",{value:!0});hs.calcGridColWidth=zy;hs.calcGridItemPosition=EQ;hs.calcGridItemWHPx=Ww;hs.calcWH=PQ;hs.calcXY=RQ;hs.clamp=jl;function zy(e){const{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Ww(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function EQ(e,t,n,r,i,o){const{margin:s,containerPadding:a,rowHeight:l}=e,c=zy(e),u={};return o&&o.resizing?(u.width=Math.round(o.resizing.width),u.height=Math.round(o.resizing.height)):(u.width=Ww(r,c,s[0]),u.height=Ww(i,l,s[1])),o&&o.dragging?(u.top=Math.round(o.dragging.top),u.left=Math.round(o.dragging.left)):o&&o.resizing&&typeof o.resizing.top=="number"&&typeof o.resizing.left=="number"?(u.top=Math.round(o.resizing.top),u.left=Math.round(o.resizing.left)):(u.top=Math.round((l+s[1])*n+a[1]),u.left=Math.round((c+s[0])*t+a[0])),u}function RQ(e,t,n,r,i){const{margin:o,containerPadding:s,cols:a,rowHeight:l,maxRows:c}=e,u=zy(e);let d=Math.round((n-s[0])/(u+o[0])),p=Math.round((t-s[1])/(l+o[1]));return d=jl(d,0,a-r),p=jl(p,0,c-i),{x:d,y:p}}function PQ(e,t,n,r,i,o){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=zy(e);let d=Math.round((t+s[0])/(u+s[0])),p=Math.round((n+s[1])/(c+s[1])),h=jl(d,0,l-r),m=jl(p,0,a-i);return["sw","w","nw"].indexOf(o)!==-1&&(h=jl(d,0,l)),["nw","n","ne"].indexOf(o)!==-1&&(m=jl(p,0,a)),{w:h,h:m}}function jl(e,t,n){return Math.max(Math.min(e,n),t)}var By={},Uw={exports:{}},Gg={exports:{}},Kt={};/** @license React v16.13.1
91
+ }`;var gt=BM(function(){return Vt(H,He+"return "+Se).apply(n,Q)});if(gt.source=Se,tx(gt))throw gt;return gt}function _q(f){return Yt(f).toLowerCase()}function Cq(f){return Yt(f).toUpperCase()}function Eq(f,g,w){if(f=Yt(f),f&&(w||g===n))return X2(f);if(!f||!(g=_i(g)))return f;var M=po(f),I=po(g),H=Q2(M,I),Q=J2(M,I)+1;return ha(M,H,Q).join("")}function Rq(f,g,w){if(f=Yt(f),f&&(w||g===n))return f.slice(0,eP(f)+1);if(!f||!(g=_i(g)))return f;var M=po(f),I=J2(M,po(g))+1;return ha(M,0,I).join("")}function Pq(f,g,w){if(f=Yt(f),f&&(w||g===n))return f.replace(bn,"");if(!f||!(g=_i(g)))return f;var M=po(f),I=Q2(M,po(g));return ha(M,I).join("")}function Mq(f,g){var w=F,M=j;if(Mn(g)){var I="separator"in g?g.separator:I;w="length"in g?ut(g.length):w,M="omission"in g?_i(g.omission):M}f=Yt(f);var H=f.length;if(Uc(f)){var Q=po(f);H=Q.length}if(w>=H)return f;var re=w-Gc(M);if(re<1)return M;var ue=Q?ha(Q,0,re).join(""):f.slice(0,re);if(I===n)return ue+M;if(Q&&(re+=ue.length-re),nx(I)){if(f.slice(re).search(I)){var ve,xe=ue;for(I.global||(I=yv(I.source,Yt($t.exec(I))+"g")),I.lastIndex=0;ve=I.exec(xe);)var Se=ve.index;ue=ue.slice(0,Se===n?re:Se)}}else if(f.indexOf(_i(I),re)!=re){var ke=ue.lastIndexOf(I);ke>-1&&(ue=ue.slice(0,ke))}return ue+M}function Tq(f){return f=Yt(f),f&&Ir.test(f)?f.replace(Lo,iH):f}var Oq=Zc(function(f,g,w){return f+(w?" ":"")+g.toUpperCase()}),ox=HP("toUpperCase");function zM(f,g,w){return f=Yt(f),g=w?n:g,g===n?ZB(f)?aH(f):WB(f):f.match(g)||[]}var BM=wt(function(f,g){try{return wi(f,n,g)}catch(w){return tx(w)?w:new ot(w)}}),Dq=Es(function(f,g){return qi(g,function(w){w=$o(w),_s(f,w,Zv(f[w],f))}),f});function Aq(f){var g=f==null?0:f.length,w=We();return f=g?Pn(f,function(M){if(typeof M[1]!="function")throw new Yi(s);return[w(M[0]),M[1]]}):[],wt(function(M){for(var I=-1;++I<g;){var H=f[I];if(wi(H[0],this,M))return wi(H[1],this,M)}})}function kq(f){return iV(Xi(f,d))}function sx(f){return function(){return f}}function Iq(f,g){return f==null||f!==f?g:f}var Nq=WP(),Lq=WP(!0);function ni(f){return f}function ax(f){return xP(typeof f=="function"?f:Xi(f,d))}function Fq(f){return SP(Xi(f,d))}function jq(f,g){return _P(f,Xi(g,d))}var $q=wt(function(f,g){return function(w){return tf(w,f,g)}}),zq=wt(function(f,g){return function(w){return tf(f,w,g)}});function lx(f,g,w){var M=or(g),I=wg(g,M);w==null&&!(Mn(g)&&(I.length||!M.length))&&(w=g,g=f,f=this,I=wg(g,or(g)));var H=!(Mn(w)&&"chain"in w)||!!w.chain,Q=Ps(f);return qi(I,function(re){var ue=g[re];f[re]=ue,Q&&(f.prototype[re]=function(){var ve=this.__chain__;if(H||ve){var xe=f(this.__wrapped__),Se=xe.__actions__=Zr(this.__actions__);return Se.push({func:ue,args:arguments,thisArg:f}),xe.__chain__=ve,xe}return ue.apply(f,aa([this.value()],arguments))})}),f}function Bq(){return dr._===this&&(dr._=hH),this}function cx(){}function Hq(f){return f=ut(f),wt(function(g){return CP(g,f)})}var Vq=zv(Pn),Wq=zv(U2),Uq=zv(dv);function HM(f){return qv(f)?fv($o(f)):wV(f)}function Gq(f){return function(g){return f==null?n:pl(f,g)}}var qq=GP(),Yq=GP(!0);function ux(){return[]}function dx(){return!1}function Kq(){return{}}function Xq(){return""}function Qq(){return!0}function Jq(f,g){if(f=ut(f),f<1||f>W)return[];var w=Y,M=xr(f,Y);g=We(g),f-=Y;for(var I=gv(M,g);++w<f;)g(w);return I}function Zq(f){return at(f)?Pn(f,$o):Ci(f)?[f]:Zr(lM(Yt(f)))}function eY(f){var g=++dH;return Yt(f)+g}var tY=Pg(function(f,g){return f+g},0),nY=Bv("ceil"),rY=Pg(function(f,g){return f/g},1),iY=Bv("floor");function oY(f){return f&&f.length?xg(f,ni,Rv):n}function sY(f,g){return f&&f.length?xg(f,We(g,2),Rv):n}function aY(f){return Y2(f,ni)}function lY(f,g){return Y2(f,We(g,2))}function cY(f){return f&&f.length?xg(f,ni,Ov):n}function uY(f,g){return f&&f.length?xg(f,We(g,2),Ov):n}var dY=Pg(function(f,g){return f*g},1),fY=Bv("round"),hY=Pg(function(f,g){return f-g},0);function pY(f){return f&&f.length?pv(f,ni):0}function gY(f,g){return f&&f.length?pv(f,We(g,2)):0}return z.after=FU,z.ary=vM,z.assign=CG,z.assignIn=kM,z.assignInWith=zg,z.assignWith=EG,z.at=RG,z.before=xM,z.bind=Zv,z.bindAll=Dq,z.bindKey=wM,z.castArray=KU,z.chain=mM,z.chunk=iW,z.compact=oW,z.concat=sW,z.cond=Aq,z.conforms=kq,z.constant=sx,z.countBy=pU,z.create=PG,z.curry=SM,z.curryRight=_M,z.debounce=CM,z.defaults=MG,z.defaultsDeep=TG,z.defer=jU,z.delay=$U,z.difference=aW,z.differenceBy=lW,z.differenceWith=cW,z.drop=uW,z.dropRight=dW,z.dropRightWhile=fW,z.dropWhile=hW,z.fill=pW,z.filter=mU,z.flatMap=vU,z.flatMapDeep=xU,z.flatMapDepth=wU,z.flatten=fM,z.flattenDeep=gW,z.flattenDepth=mW,z.flip=zU,z.flow=Nq,z.flowRight=Lq,z.fromPairs=bW,z.functions=LG,z.functionsIn=FG,z.groupBy=SU,z.initial=vW,z.intersection=xW,z.intersectionBy=wW,z.intersectionWith=SW,z.invert=$G,z.invertBy=zG,z.invokeMap=CU,z.iteratee=ax,z.keyBy=EU,z.keys=or,z.keysIn=ti,z.map=Ig,z.mapKeys=HG,z.mapValues=VG,z.matches=Fq,z.matchesProperty=jq,z.memoize=Lg,z.merge=WG,z.mergeWith=IM,z.method=$q,z.methodOf=zq,z.mixin=lx,z.negate=Fg,z.nthArg=Hq,z.omit=UG,z.omitBy=GG,z.once=BU,z.orderBy=RU,z.over=Vq,z.overArgs=HU,z.overEvery=Wq,z.overSome=Uq,z.partial=ex,z.partialRight=EM,z.partition=PU,z.pick=qG,z.pickBy=NM,z.property=HM,z.propertyOf=Gq,z.pull=RW,z.pullAll=pM,z.pullAllBy=PW,z.pullAllWith=MW,z.pullAt=TW,z.range=qq,z.rangeRight=Yq,z.rearg=VU,z.reject=OU,z.remove=OW,z.rest=WU,z.reverse=Qv,z.sampleSize=AU,z.set=KG,z.setWith=XG,z.shuffle=kU,z.slice=DW,z.sortBy=LU,z.sortedUniq=jW,z.sortedUniqBy=$W,z.split=vq,z.spread=UU,z.tail=zW,z.take=BW,z.takeRight=HW,z.takeRightWhile=VW,z.takeWhile=WW,z.tap=oU,z.throttle=GU,z.thru=kg,z.toArray=OM,z.toPairs=LM,z.toPairsIn=FM,z.toPath=Zq,z.toPlainObject=AM,z.transform=QG,z.unary=qU,z.union=UW,z.unionBy=GW,z.unionWith=qW,z.uniq=YW,z.uniqBy=KW,z.uniqWith=XW,z.unset=JG,z.unzip=Jv,z.unzipWith=gM,z.update=ZG,z.updateWith=eq,z.values=nu,z.valuesIn=tq,z.without=QW,z.words=zM,z.wrap=YU,z.xor=JW,z.xorBy=ZW,z.xorWith=eU,z.zip=tU,z.zipObject=nU,z.zipObjectDeep=rU,z.zipWith=iU,z.entries=LM,z.entriesIn=FM,z.extend=kM,z.extendWith=zg,lx(z,z),z.add=tY,z.attempt=BM,z.camelCase=oq,z.capitalize=jM,z.ceil=nY,z.clamp=nq,z.clone=XU,z.cloneDeep=JU,z.cloneDeepWith=ZU,z.cloneWith=QU,z.conformsTo=eG,z.deburr=$M,z.defaultTo=Iq,z.divide=rY,z.endsWith=sq,z.eq=mo,z.escape=aq,z.escapeRegExp=lq,z.every=gU,z.find=bU,z.findIndex=uM,z.findKey=OG,z.findLast=yU,z.findLastIndex=dM,z.findLastKey=DG,z.floor=iY,z.forEach=bM,z.forEachRight=yM,z.forIn=AG,z.forInRight=kG,z.forOwn=IG,z.forOwnRight=NG,z.get=rx,z.gt=tG,z.gte=nG,z.has=jG,z.hasIn=ix,z.head=hM,z.identity=ni,z.includes=_U,z.indexOf=yW,z.inRange=rq,z.invoke=BG,z.isArguments=bl,z.isArray=at,z.isArrayBuffer=rG,z.isArrayLike=ei,z.isArrayLikeObject=$n,z.isBoolean=iG,z.isBuffer=pa,z.isDate=oG,z.isElement=sG,z.isEmpty=aG,z.isEqual=lG,z.isEqualWith=cG,z.isError=tx,z.isFinite=uG,z.isFunction=Ps,z.isInteger=RM,z.isLength=jg,z.isMap=PM,z.isMatch=dG,z.isMatchWith=fG,z.isNaN=hG,z.isNative=pG,z.isNil=mG,z.isNull=gG,z.isNumber=MM,z.isObject=Mn,z.isObjectLike=Dn,z.isPlainObject=lf,z.isRegExp=nx,z.isSafeInteger=bG,z.isSet=TM,z.isString=$g,z.isSymbol=Ci,z.isTypedArray=tu,z.isUndefined=yG,z.isWeakMap=vG,z.isWeakSet=xG,z.join=_W,z.kebabCase=cq,z.last=Ji,z.lastIndexOf=CW,z.lowerCase=uq,z.lowerFirst=dq,z.lt=wG,z.lte=SG,z.max=oY,z.maxBy=sY,z.mean=aY,z.meanBy=lY,z.min=cY,z.minBy=uY,z.stubArray=ux,z.stubFalse=dx,z.stubObject=Kq,z.stubString=Xq,z.stubTrue=Qq,z.multiply=dY,z.nth=EW,z.noConflict=Bq,z.noop=cx,z.now=Ng,z.pad=fq,z.padEnd=hq,z.padStart=pq,z.parseInt=gq,z.random=iq,z.reduce=MU,z.reduceRight=TU,z.repeat=mq,z.replace=bq,z.result=YG,z.round=fY,z.runInContext=le,z.sample=DU,z.size=IU,z.snakeCase=yq,z.some=NU,z.sortedIndex=AW,z.sortedIndexBy=kW,z.sortedIndexOf=IW,z.sortedLastIndex=NW,z.sortedLastIndexBy=LW,z.sortedLastIndexOf=FW,z.startCase=xq,z.startsWith=wq,z.subtract=hY,z.sum=pY,z.sumBy=gY,z.template=Sq,z.times=Jq,z.toFinite=Ms,z.toInteger=ut,z.toLength=DM,z.toLower=_q,z.toNumber=Zi,z.toSafeInteger=_G,z.toString=Yt,z.toUpper=Cq,z.trim=Eq,z.trimEnd=Rq,z.trimStart=Pq,z.truncate=Mq,z.unescape=Tq,z.uniqueId=eY,z.upperCase=Oq,z.upperFirst=ox,z.each=bM,z.eachRight=yM,z.first=hM,lx(z,function(){var f={};return Fo(z,function(g,w){tn.call(z.prototype,w)||(f[w]=g)}),f}(),{chain:!1}),z.VERSION=r,qi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){z[f].placeholder=z}),qi(["drop","take"],function(f,g){At.prototype[f]=function(w){w=w===n?1:Zn(ut(w),0);var M=this.__filtered__&&!g?new At(this):this.clone();return M.__filtered__?M.__takeCount__=xr(w,M.__takeCount__):M.__views__.push({size:xr(w,Y),type:f+(M.__dir__<0?"Right":"")}),M},At.prototype[f+"Right"]=function(w){return this.reverse()[f](w).reverse()}}),qi(["filter","map","takeWhile"],function(f,g){var w=g+1,M=w==V||w==U;At.prototype[f]=function(I){var H=this.clone();return H.__iteratees__.push({iteratee:We(I,3),type:w}),H.__filtered__=H.__filtered__||M,H}}),qi(["head","last"],function(f,g){var w="take"+(g?"Right":"");At.prototype[f]=function(){return this[w](1).value()[0]}}),qi(["initial","tail"],function(f,g){var w="drop"+(g?"":"Right");At.prototype[f]=function(){return this.__filtered__?new At(this):this[w](1)}}),At.prototype.compact=function(){return this.filter(ni)},At.prototype.find=function(f){return this.filter(f).head()},At.prototype.findLast=function(f){return this.reverse().find(f)},At.prototype.invokeMap=wt(function(f,g){return typeof f=="function"?new At(this):this.map(function(w){return tf(w,f,g)})}),At.prototype.reject=function(f){return this.filter(Fg(We(f)))},At.prototype.slice=function(f,g){f=ut(f);var w=this;return w.__filtered__&&(f>0||g<0)?new At(w):(f<0?w=w.takeRight(-f):f&&(w=w.drop(f)),g!==n&&(g=ut(g),w=g<0?w.dropRight(-g):w.take(g-f)),w)},At.prototype.takeRightWhile=function(f){return this.reverse().takeWhile(f).reverse()},At.prototype.toArray=function(){return this.take(Y)},Fo(At.prototype,function(f,g){var w=/^(?:filter|find|map|reject)|While$/.test(g),M=/^(?:head|last)$/.test(g),I=z[M?"take"+(g=="last"?"Right":""):g],H=M||/^find/.test(g);I&&(z.prototype[g]=function(){var Q=this.__wrapped__,re=M?[1]:arguments,ue=Q instanceof At,ve=re[0],xe=ue||at(Q),Se=function(Rt){var It=I.apply(z,aa([Rt],re));return M&&ke?It[0]:It};xe&&w&&typeof ve=="function"&&ve.length!=1&&(ue=xe=!1);var ke=this.__chain__,He=!!this.__actions__.length,Ue=H&&!ke,gt=ue&&!He;if(!H&&xe){Q=gt?Q:new At(this);var Ge=f.apply(Q,re);return Ge.__actions__.push({func:kg,args:[Se],thisArg:n}),new Ki(Ge,ke)}return Ue&&gt?f.apply(this,re):(Ge=this.thru(Se),Ue?M?Ge.value()[0]:Ge.value():Ge)})}),qi(["pop","push","shift","sort","splice","unshift"],function(f){var g=og[f],w=/^(?:push|sort|unshift)$/.test(f)?"tap":"thru",M=/^(?:pop|shift)$/.test(f);z.prototype[f]=function(){var I=arguments;if(M&&!this.__chain__){var H=this.value();return g.apply(at(H)?H:[],I)}return this[w](function(Q){return g.apply(at(Q)?Q:[],I)})}}),Fo(At.prototype,function(f,g){var w=z[g];if(w){var M=w.name+"";tn.call(Xc,M)||(Xc[M]=[]),Xc[M].push({name:g,func:w})}}),Xc[Rg(n,x).name]=[{name:"wrapper",func:n}],At.prototype.clone=TH,At.prototype.reverse=OH,At.prototype.value=DH,z.prototype.at=sU,z.prototype.chain=aU,z.prototype.commit=lU,z.prototype.next=cU,z.prototype.plant=dU,z.prototype.reverse=fU,z.prototype.toJSON=z.prototype.valueOf=z.prototype.value=hU,z.prototype.first=z.prototype.head,Yd&&(z.prototype[Yd]=uU),z},qc=lH();cl?((cl.exports=qc)._=qc,av._=qc):dr._=qc}).call(Ca)})(wb,wb.exports);var Lf=wb.exports;const Jl=Oc(Lf);function lT({id:e,layouts:t,initialHeight:n,y:r,x:i,w:o,minH:s}){const a={i:e,x:i??0,y:r??1/0,w:o||20,h:n||35,minW:6,minH:s||10},l=t?{...t}:{};return Y_.forEach(c=>{l[c]||(l[c]=[]);const u=l[c].reduce((d,p)=>Math.max(d,p.y+p.h),0);a.y=a.y===1/0?u:a.y,l[c].push({...a})}),l}function cT(e,t){if(!t)return;const n={...t};return Y_.forEach(r=>{n[r]&&(n[r]=n[r].filter(i=>i.i!==e))}),n}function Q_(e){return ye.getState().dashboard.globalCacheConfig}const ye=eN()(aN((e,t)=>({isSessionExpired:!1,currentBreakpoint:"lg",dashboard:{id:"",style:xb},showContext:!1,selectedSheetId:null,selectedCardId:null,selectedFrameId:null,selectedCard:null,showFilters:!1,isDashboardEditing:!1,isVisualEditing:!1,showDashboardJSON:!1,filteringCards:[],actions:{setInitStore:()=>{e(n=>{n.isSessionExpired=!1,n.currentBreakpoint="lg",n.dashboard={id:"",style:xb},n.showContext=!1,n.selectedSheetId=null,n.selectedCardId=null,n.selectedFrameId=null,n.selectedCard=null,n.showFilters=!1,n.isDashboardEditing=!1,n.isVisualEditing=!1,n.showDashboardJSON=!1,n.filteringCards=[],n.selectedLensId=void 0,n.filterValues=void 0})},setGlobalCacheConfig:n=>{e(r=>{r.dashboard.globalCacheConfig=n})},setLenses:n=>{e(r=>{r.lenses=n})},setSelectedLensId:n=>{e(r=>{r.selectedLensId=n})},deleteSheet:n=>{e(r=>{var o,s,a,l,c,u,d,p;const i=(o=r.dashboard.sheets)==null?void 0:o.findIndex(h=>h.id===n);if(i!==void 0&&i>-1){(s=r.dashboard.sheets)==null||s.splice(i,1);const h=(a=r.dashboard.filters)==null?void 0:a.filter(b=>b.sheetId===n),m=(l=r.filterValues)==null?void 0:l.filter(b=>h==null?void 0:h.some(v=>v.id===b.filterId));r.filterValues=(c=r.filterValues)==null?void 0:c.filter(b=>!(m!=null&&m.some(v=>v.filterId===b.filterId))),r.dashboard.filters=(u=r.dashboard.filters)==null?void 0:u.filter(b=>b.sheetId!==n),r.selectedSheetId=(p=(d=r.dashboard.sheets)==null?void 0:d[0])==null?void 0:p.id}})},addSheet:n=>{e(r=>{r.dashboard.sheets||(r.dashboard.sheets=[]);const i=r.dashboard.filters;let o={};i==null||i.forEach(a=>{Y_.forEach(l=>{o!=null&&o[l]||(o={...o,[l]:[]});const c={i:a.id,x:0,y:0,w:10,h:8};o[l].push(c)})});const s={...n,layouts:o};r.dashboard.sheets.push(s)})},setGlobalStyle:n=>{e(r=>{r.dashboard.globalStyle=n})},setAIScopeTables:n=>{e(r=>{r.dashboard.aiScopeTables=n})},setIsSessionExpired:n=>{e(()=>({isSessionExpired:n}))},setCardPython:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===i.selectedSheetId);o&&Lf.forEach(o.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 i;r.dashboard.baseQueries||(r.dashboard.baseQueries=[]),(i=r.dashboard.baseQueries)==null||i.push(n)})},removeBaseQuery:n=>{e(r=>{var o,s;const i=(o=r.dashboard.baseQueries)==null?void 0:o.findIndex(a=>a.id===n);i!=null&&i>-1&&((s=r.dashboard.baseQueries)==null||s.splice(i,1))})},setBaseQueries:n=>{e(r=>{r.dashboard.baseQueries=n})},setCurrentBreakpoint:n=>{e(()=>({currentBreakpoint:n}))},setFilteringCards:n=>{e(()=>({filteringCards:n}))},addFilteringCard:n=>{e(r=>{var i;(i=r.filteringCards)==null||i.push(n)})},removeFilteringCard:n=>{e(r=>{var o,s;const i=(o=r.filteringCards)==null?void 0:o.findIndex(a=>a.id===n.id);i!==void 0&&i>-1&&((s=r.filteringCards)==null||s.splice(i,1))})},setCustomCards:n=>{e(r=>{r.dashboard.customCards=n})},setAuthToken:n=>{e(()=>({authToken:n}))},setThemeStyle:n=>{e(()=>({themeStyle:n}))},setDashboard:n=>e({dashboard:n}),setDashboardWithFilterValues:(n,r)=>{e(i=>{i.dashboard=n,i.filterValues=r})},setDashboardTheme:n=>{e(r=>{r.theme=n})},setSheets:n=>{e(r=>{r.dashboard&&(r.dashboard.sheets=n)})},setSheetTitle:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.title=r)})},setCardTitle:(n,r,i)=>{e(o=>{var a,l;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&Lf.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(p=>p.id===r);u&&(u.title=i)})})},setCardInfo:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===i.selectedSheetId);o&&Lf.forEach(o.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,i)=>{e(o=>{var a,l;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(c=>c.id===n);s&&Lf.forEach(s.frames,c=>{var d;const u=(d=c.cards)==null?void 0:d.find(p=>p.id===r);u&&(u.description=i)})})},setCardSql:(n,r,i)=>{e(o=>{var a,l,c,u;const s=(l=(a=o.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(p=>p.id===r);d&&(d.sql=i,(u=o.onUpdateCard)==null||u.call(o,d,n))}})},setSheetLayout:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.layout=r)})},setSheetLayouts:(n,r)=>{e(i=>{var s,a;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(l=>l.id===n);o&&(o.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 i=r.filterValues.findIndex(o=>o.filterId===n.filterId);i>-1?r.filterValues.splice(i,1,n):r.filterValues.push(n)}else r.filterValues=[n]})},addOrUpdateFilterValues:n=>{e(r=>{r.filterValues?n.forEach(i=>{var s,a,l;const o=(s=r==null?void 0:r.filterValues)==null?void 0:s.findIndex(c=>c.filterId===i.filterId);o!==void 0&&o>-1?(a=r.filterValues)==null||a.splice(o,1,i):(l=r.filterValues)==null||l.push(i)}):r.filterValues=n})},removeFilterValues:n=>{e(r=>{if(r.filterValues){const i=r.filterValues.filter(o=>o.filterId!==n&&!o.filterId.startsWith(n));r.filterValues=i}})},replaceFilterValue:n=>{e(r=>{if(r.filterValues){const i=r.filterValues.findIndex(o=>o.filterId===n.filterId);i>-1&&r.filterValues.splice(i,1,n)}})},addFilter:n=>{e(r=>{var o,s;r.dashboard.filters?(o=r.dashboard.filters)==null||o.push(n):r.dashboard.filters=[n],(s=r.dashboard.sheets)==null||s.find(a=>a.id===r.selectedSheetId);const i=r.dashboard.sheets;i==null||i.forEach(a=>{lT({id:n.id,layouts:a.layouts,y:0,initialHeight:8,minH:7,w:10})})})},removeFilter:n=>{e(r=>{var i,o,s;if(r.dashboard.filters){const a=(i=r.dashboard.filters)==null?void 0:i.findIndex(l=>l.id===n);if(a>-1){(o=r.dashboard.filters)==null||o.splice(a,1),(s=r.dashboard.sheets)==null||s.find(c=>c.id===r.selectedSheetId);const l=r.dashboard.sheets;l==null||l.forEach(c=>{const u=cT(n,c.layouts);c.layouts=u})}}})},updateFrameCard:(n,r,i)=>{e(o=>{var l,c,u,d,p;const s=(c=(l=o.dashboard)==null?void 0:l.sheets)==null?void 0:c.find(h=>h.id===n);if(!s)return;const a=(u=s==null?void 0:s.frames)==null?void 0:u.find(h=>h.id===r);if(a){const h=(d=a.cards)==null?void 0:d.findIndex(m=>m.id===i.id);h>-1&&((p=a.cards)==null||p.splice(h,1,i))}})},updateFilter:n=>{e(r=>{var i,o;if(r.dashboard.filters){const s=(i=r.dashboard.filters)==null?void 0:i.findIndex(a=>a.id===n.id);s>-1&&((o=r.dashboard.filters)==null||o.splice(s,1,n))}})},updateFilterId:(n,r)=>{e(i=>{var a,l;const o=(a=i.dashboard.filters)==null?void 0:a.find(c=>c.id===n),s=(l=i.dashboard.filters)==null?void 0:l.some(c=>c.id===r);o&&!s&&(o.id=r)})},setIsDashboardEditing:n=>{e(()=>({isDashboardEditing:n}))},setShowDashboardJSON:n=>{e(()=>({showDashboardJSON:n}))},setIsVisualEditing:n=>{e(()=>({isVisualEditing:n}))},addFrame:(n,r,i)=>{e(o=>{var a,l,c,u;const s=(l=(a=o.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(d=>d.id===n);if(s){s.frames||(s.frames=[]),(c=s.frames)==null||c.push(r);let d=1/0;const p=0;i==="start"&&(d=0);const h=lT({id:r.id,layouts:s.layouts,minH:10,x:p,y:d});s.layouts=h,(u=o.onAddFrame)==null||u.call(o,r,n)}})},removeFrame:(n,r)=>{e(i=>{var s,a,l,c,u;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(d=>d.id===n);if(o){const d=(l=o.frames)==null?void 0:l.findIndex(p=>p.id===r);console.log(d),typeof d=="number"&&d>-1&&((c=o.frames)==null||c.splice(d,1),(u=o.layout)==null||u.splice(d,1),cT(r,o.layouts))}})},updateFrame:(n,r)=>{e(i=>{var a,l,c,u,d;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=o==null?void 0:o.frames)==null?void 0:c.findIndex(p=>p.id===r.id);o&&((u=o.frames)==null||u.splice(s,1,r)),(d=i.onAcceptChanges)==null||d.call(i,r,i.dashboard)})},updateCard:(n,r)=>{e(i=>{var a,l,c,u,d;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(p=>p.id===n),s=(c=o==null?void 0:o.cards)==null?void 0:c.findIndex(p=>p.id===r.id);o&&((u=o.cards)==null||u.splice(s,1,r),(d=i.onUpdateCard)==null||d.call(i,r,n))})},removeCard:(n,r)=>{e(i=>{var a,l,c,u,d,p;const o=(l=(a=i.dashboard)==null?void 0:a.sheets)==null?void 0:l.find(h=>h.id===n),s=(c=o==null?void 0:o.cards)==null?void 0:c.findIndex(h=>h.id===r.id);o&&((u=o.cards)==null||u.splice(s,1),(d=o.layout)==null||d.splice(s,1),(p=i.onRemoveCard)==null||p.call(i,r,n))})},setStyle:n=>{e(r=>{r.dashboard&&(r.dashboard.style=n)})},setSelectedCardId:(n,r)=>{e(i=>{var s,a,l;const o=(a=(s=i.dashboard)==null?void 0:s.sheets)==null?void 0:a.find(c=>c.id===n);o&&(((l=o.cards)==null?void 0:l.find(u=>u.id===r))?i.selectedCardId=r:i.selectedCardId=null)})},setSelectedFrameId:n=>{e(r=>{var o,s;((s=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:s.find(a=>a.id===r.selectedSheetId))&&(r.selectedFrameId=n)})},setSelectedSheetId:n=>{e(r=>{var o,s;((s=(o=r.dashboard)==null?void 0:o.sheets)==null?void 0:s.find(a=>a.id===n))&&(r.selectedSheetId=n)})},setOnSaveFunction:n=>{e(()=>({onSaveFunction:n}))},setOnAddCard:n=>{e(()=>({onAddCard:n}))},setOnAcceptChanges:n=>{e(()=>({onAcceptChanges:n}))},setOnUpdateCard:n=>{e(()=>({onUpdateCard:n}))},setOnRemoveCard:n=>{e(()=>({onRemoveCard:n}))},setOnEvent:n=>{e(()=>({onEvent:n}))},getDashboard:()=>t().dashboard,getSelectedSheet:()=>{var n,r;return(r=(n=t().dashboard)==null?void 0:n.sheets)==null?void 0:r.find(i=>i.id===t().selectedSheetId)},getCardFrame:n=>{var i,o;const r=(i=t().dashboard)==null?void 0:i.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((o=a[l].cards)==null?void 0:o.find(u=>u.id===n))return a[l]}}},getSelectedFrame:()=>{var r,i,o;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(s=>s.id===t().selectedSheetId);return(o=n==null?void 0:n.frames)==null?void 0:o.find(s=>s.id===t().selectedFrameId)},getCard:n=>{var i,o;const r=(i=t().dashboard)==null?void 0:i.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=(o=a[l].cards)==null?void 0:o.find(u=>u.id===n);if(c)return c}}},getSelectedSheetLayout:()=>{var r,i;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(o=>o.id===t().selectedSheetId);return n==null?void 0:n.layout},getSelectedSheetLayouts:()=>{var r,i;const n=(i=(r=t().dashboard)==null?void 0:r.sheets)==null?void 0:i.find(o=>o.id===t().selectedSheetId);return n==null?void 0:n.layouts},getStyle:()=>{var n;return(n=t().dashboard)==null?void 0:n.style},getCardSheet(n){var i,o;const r=(i=t().dashboard)==null?void 0:i.sheets;if(r)for(let s=0;s<r.length;s++){const a=r[s].frames;if(a){for(let l=0;l<a.length;l++)if((o=a[l].cards)==null?void 0:o.find(u=>u.id===n))return r[s]}}},handleDataPointClickAction:(n,r)=>{YK({card:n,dataPoint:r,set:e,get:t})}}}))),Hn=()=>ye(e=>e.actions),KK={theme:"system",setTheme:()=>null},hN=P.createContext(KK);function XK({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[i,o]=P.useState(()=>localStorage.getItem(n)||t);P.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),i==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(i)},[i]);const s={theme:i,setTheme:a=>{localStorage.setItem(n,a),o(a)}};return y.jsx(hN.Provider,{...r,value:s,children:e})}const pN=()=>{const e=P.useContext(hN);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};var vp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},mc=typeof window>"u"||"Deno"in globalThis;function no(){}function QK(e,t){return typeof e=="function"?e(t):e}function Ew(e){return typeof e=="number"&&e>=0&&e!==1/0}function gN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mu(e,t){return typeof e=="function"?e(t):e}function Co(e,t){return typeof e=="function"?e(t):e}function uT(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==J_(s,t.options))return!1}else if(!Eh(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function dT(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ch(t.options.mutationKey)!==Ch(o))return!1}else if(!Eh(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function J_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ch)(e)}function Ch(e){return JSON.stringify(e,(t,n)=>Mw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Eh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Eh(e[n],t[n])):!1}function Rw(e,t){if(e===t)return e;const n=fT(e)&&fT(t);if(n||Mw(e)&&Mw(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:o[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=Rw(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return i===s&&l===i?e:a}return t}function Pw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Mw(e){if(!hT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hT(e){return Object.prototype.toString.call(e)==="[object Object]"}function JK(e){return new Promise(t=>{setTimeout(t,e)})}function Tw(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Rw(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Rw(e,t)}return t}function ZK(e){return e}function eX(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function tX(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Sb=Symbol();function mN(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Sb&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Sb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ul,Ra,Bu,LI,nX=(LI=class extends vp{constructor(){super();Ze(this,Ul);Ze(this,Ra);Ze(this,Bu);je(this,Bu,t=>{if(!mc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){se(this,Ra)||this.setEventListener(se(this,Bu))}onUnsubscribe(){var t;this.hasListeners()||((t=se(this,Ra))==null||t.call(this),je(this,Ra,void 0))}setEventListener(t){var n;je(this,Bu,t),(n=se(this,Ra))==null||n.call(this),je(this,Ra,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){se(this,Ul)!==t&&(je(this,Ul,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof se(this,Ul)=="boolean"?se(this,Ul):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ul=new WeakMap,Ra=new WeakMap,Bu=new WeakMap,LI),Z_=new nX,Hu,Pa,Vu,FI,rX=(FI=class extends vp{constructor(){super();Ze(this,Hu,!0);Ze(this,Pa);Ze(this,Vu);je(this,Vu,t=>{if(!mc&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){se(this,Pa)||this.setEventListener(se(this,Vu))}onUnsubscribe(){var t;this.hasListeners()||((t=se(this,Pa))==null||t.call(this),je(this,Pa,void 0))}setEventListener(t){var n;je(this,Vu,t),(n=se(this,Pa))==null||n.call(this),je(this,Pa,t(this.setOnline.bind(this)))}setOnline(t){se(this,Hu)!==t&&(je(this,Hu,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return se(this,Hu)}},Hu=new WeakMap,Pa=new WeakMap,Vu=new WeakMap,FI),_b=new rX;function Ow(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function iX(e){return Math.min(1e3*2**e,3e4)}function bN(e){return(e??"online")==="online"?_b.isOnline():!0}var yN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wx(e){return e instanceof yN}function vN(e){let t=!1,n=0,r=!1,i;const o=Ow(),s=b=>{var v;r||(p(new yN(b)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Z_.isFocused()&&(e.networkMode==="always"||_b.isOnline())&&e.canRun(),u=()=>bN(e.networkMode)&&e.canRun(),d=b=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,b),i==null||i(),o.resolve(b))},p=b=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,b),i==null||i(),o.reject(b))},h=()=>new Promise(b=>{var v;i=x=>{(r||c())&&b(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var b;i=void 0,r||(b=e.onContinue)==null||b.call(e)}),m=()=>{if(r)return;let b;const v=n===0?e.initialPromise:void 0;try{b=v??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(d).catch(x=>{var T;if(r)return;const S=e.retry??(mc?0:3),_=e.retryDelay??iX,E=typeof _=="function"?_(n,x):_,C=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!C){p(x);return}n++,(T=e.onFail)==null||T.call(e,n,x),JK(E).then(()=>c()?void 0:h()).then(()=>{t?p(x):m()})})};return{promise:o,cancel:s,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?m():h().then(m),o)}}function oX(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var gr=oX(),Gl,jI,xN=(jI=class{constructor(){Ze(this,Gl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ew(this.gcTime)&&je(this,Gl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mc?1/0:5*60*1e3))}clearGcTimeout(){se(this,Gl)&&(clearTimeout(se(this,Gl)),je(this,Gl,void 0))}},Gl=new WeakMap,jI),Wu,Uu,to,Er,pp,ql,So,Is,$I,sX=($I=class extends xN{constructor(t){super();Ze(this,So);Ze(this,Wu);Ze(this,Uu);Ze(this,to);Ze(this,Er);Ze(this,pp);Ze(this,ql);je(this,ql,!1),je(this,pp,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,to,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,Wu,aX(this.options)),this.state=t.state??se(this,Wu),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=se(this,Er))==null?void 0:t.promise}setOptions(t){this.options={...se(this,pp),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&se(this,to).remove(this)}setData(t,n){const r=Tw(this.state.data,t,this.options);return Nt(this,So,Is).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Nt(this,So,Is).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=se(this,Er))==null?void 0:r.promise;return(i=se(this,Er))==null||i.cancel(t),n?n.then(no).catch(no):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(se(this,Wu))}isActive(){return this.observers.some(t=>Co(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Sb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!gN(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=se(this,Er))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=se(this,Er))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),se(this,to).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(se(this,Er)&&(se(this,ql)?se(this,Er).cancel({revert:!0}):se(this,Er).cancelRetry()),this.scheduleGc()),se(this,to).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Nt(this,So,Is).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(se(this,Er))return se(this,Er).continueRetry(),se(this,Er).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(p=>p.options.queryFn);d&&this.setOptions(d.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(je(this,ql,!0),r.signal)})},o=()=>{const d=mN(this.options,n),p={queryKey:this.queryKey,meta:this.meta};return i(p),je(this,ql,!1),this.options.persister?this.options.persister(d,p,this):d(p)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),je(this,Uu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&Nt(this,So,Is).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var p,h,m,b;wx(d)&&d.silent||Nt(this,So,Is).call(this,{type:"error",error:d}),wx(d)||((h=(p=se(this,to).config).onError)==null||h.call(p,d,this),(b=(m=se(this,to).config).onSettled)==null||b.call(m,this.state.data,d,this)),this.scheduleGc()};return je(this,Er,vN({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var p,h,m,b;if(d===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){a(v);return}(h=(p=se(this,to).config).onSuccess)==null||h.call(p,d,this),(b=(m=se(this,to).config).onSettled)==null||b.call(m,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,p)=>{Nt(this,So,Is).call(this,{type:"failed",failureCount:d,error:p})},onPause:()=>{Nt(this,So,Is).call(this,{type:"pause"})},onContinue:()=>{Nt(this,So,Is).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),se(this,Er).start()}},Wu=new WeakMap,Uu=new WeakMap,to=new WeakMap,Er=new WeakMap,pp=new WeakMap,ql=new WeakMap,So=new WeakSet,Is=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wN(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return wx(i)&&i.revert&&se(this,Uu)?{...se(this,Uu),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),gr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),se(this,to).notify({query:this,type:"updated",action:t})})},$I);function wN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function aX(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Uo,zI,SN=(zI=class extends vp{constructor(t={}){super();Ze(this,Uo);this.config=t,je(this,Uo,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??J_(i,n);let s=this.get(o);return s||(s=new sX({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){se(this,Uo).has(t.queryHash)||(se(this,Uo).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=se(this,Uo).get(t.queryHash);n&&(t.destroy(),n===t&&se(this,Uo).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){gr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return se(this,Uo).get(t)}getAll(){return[...se(this,Uo).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uT(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uT(t,r)):n}notify(t){gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){gr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){gr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Uo=new WeakMap,zI),Go,Br,Yl,qo,wa,BI,lX=(BI=class extends xN{constructor(t){super();Ze(this,qo);Ze(this,Go);Ze(this,Br);Ze(this,Yl);this.mutationId=t.mutationId,je(this,Br,t.mutationCache),je(this,Go,[]),this.state=t.state||cX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){se(this,Go).includes(t)||(se(this,Go).push(t),this.clearGcTimeout(),se(this,Br).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,Go,se(this,Go).filter(n=>n!==t)),this.scheduleGc(),se(this,Br).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){se(this,Go).length||(this.state.status==="pending"?this.scheduleGc():se(this,Br).remove(this))}continue(){var t;return((t=se(this,Yl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,l,c,u,d,p,h,m,b,v,x,S,_,E,C,T,O;je(this,Yl,vN({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,N)=>{Nt(this,qo,wa).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{Nt(this,qo,wa).call(this,{type:"pause"})},onContinue:()=>{Nt(this,qo,wa).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>se(this,Br).canRun(this)}));const n=this.state.status==="pending",r=!se(this,Yl).canStart();try{if(!n){Nt(this,qo,wa).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=se(this,Br).config).onMutate)==null?void 0:o.call(i,t,this));const N=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));N!==this.state.context&&Nt(this,qo,wa).call(this,{type:"pending",context:N,variables:t,isPaused:r})}const k=await se(this,Yl).start();return await((c=(l=se(this,Br).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((h=(p=se(this,Br).config).onSettled)==null?void 0:h.call(p,k,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,k,null,t,this.state.context)),Nt(this,qo,wa).call(this,{type:"success",data:k}),k}catch(k){try{throw await((x=(v=se(this,Br).config).onError)==null?void 0:x.call(v,k,t,this.state.context,this)),await((_=(S=this.options).onError)==null?void 0:_.call(S,k,t,this.state.context)),await((C=(E=se(this,Br).config).onSettled)==null?void 0:C.call(E,void 0,k,this.state.variables,this.state.context,this)),await((O=(T=this.options).onSettled)==null?void 0:O.call(T,void 0,k,t,this.state.context)),k}finally{Nt(this,qo,wa).call(this,{type:"error",error:k})}}finally{se(this,Br).runNext(this)}}},Go=new WeakMap,Br=new WeakMap,Yl=new WeakMap,qo=new WeakSet,wa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gr.batch(()=>{se(this,Go).forEach(r=>{r.onMutationUpdate(t)}),se(this,Br).notify({mutation:this,type:"updated",action:t})})},BI);function cX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bs,_o,gp,HI,uX=(HI=class extends vp{constructor(t={}){super();Ze(this,Bs);Ze(this,_o);Ze(this,gp);this.config=t,je(this,Bs,new Set),je(this,_o,new Map),je(this,gp,0)}build(t,n,r){const i=new lX({mutationCache:this,mutationId:++Bg(this,gp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){se(this,Bs).add(t);const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n);r?r.push(t):se(this,_o).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(se(this,Bs).delete(t)){const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&se(this,_o).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Wg(t);if(typeof n=="string"){const r=se(this,_o).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Wg(t);if(typeof n=="string"){const i=(r=se(this,_o).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gr.batch(()=>{se(this,Bs).forEach(t=>{this.notify({type:"removed",mutation:t})}),se(this,Bs).clear(),se(this,_o).clear()})}getAll(){return Array.from(se(this,Bs))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dT(n,r))}findAll(t={}){return this.getAll().filter(n=>dT(t,n))}notify(t){gr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return gr.batch(()=>Promise.all(t.map(n=>n.continue().catch(no))))}},Bs=new WeakMap,_o=new WeakMap,gp=new WeakMap,HI);function Wg(e){var t;return(t=e.options.scope)==null?void 0:t.id}function pT(e){return{onFetch:(t,n)=>{var u,d,p,h,m;const r=t.options,i=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let b=!1;const v=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},x=mN(t.options,t.fetchOptions),S=async(_,E,C)=>{if(b)return Promise.reject();if(E==null&&_.pages.length)return Promise.resolve(_);const T={queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};v(T);const O=await x(T),{maxPages:k}=t.options,N=C?tX:eX;return{pages:N(_.pages,O,k),pageParams:N(_.pageParams,E,k)}};if(i&&o.length){const _=i==="backward",E=_?dX:gT,C={pages:o,pageParams:s},T=E(r,C);a=await S(C,T,_)}else{const _=e??o.length;do{const E=l===0?s[0]??r.initialPageParam:gT(r,a);if(l>0&&E==null)break;a=await S(a,E),l++}while(l<_)}return a};t.options.persister?t.fetchFn=()=>{var b,v;return(v=(b=t.options).persister)==null?void 0:v.call(b,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function gT(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function dX(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var An,Ma,Ta,Gu,qu,Oa,Yu,Ku,VI,fX=(VI=class{constructor(e={}){Ze(this,An);Ze(this,Ma);Ze(this,Ta);Ze(this,Gu);Ze(this,qu);Ze(this,Oa);Ze(this,Yu);Ze(this,Ku);je(this,An,e.queryCache||new SN),je(this,Ma,e.mutationCache||new uX),je(this,Ta,e.defaultOptions||{}),je(this,Gu,new Map),je(this,qu,new Map),je(this,Oa,0)}mount(){Bg(this,Oa)._++,se(this,Oa)===1&&(je(this,Yu,Z_.subscribe(async e=>{e&&(await this.resumePausedMutations(),se(this,An).onFocus())})),je(this,Ku,_b.subscribe(async e=>{e&&(await this.resumePausedMutations(),se(this,An).onOnline())})))}unmount(){var e,t;Bg(this,Oa)._--,se(this,Oa)===0&&((e=se(this,Yu))==null||e.call(this),je(this,Yu,void 0),(t=se(this,Ku))==null||t.call(this),je(this,Ku,void 0))}isFetching(e){return se(this,An).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return se(this,Ma).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=se(this,An).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=se(this,An).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Mu(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return se(this,An).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=se(this,An).get(r.queryHash),o=i==null?void 0:i.state.data,s=QK(t,o);if(s!==void 0)return se(this,An).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return gr.batch(()=>se(this,An).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=se(this,An).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=se(this,An);gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=se(this,An),r={type:"active",...e};return gr.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=gr.batch(()=>se(this,An).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(no).catch(no)}invalidateQueries(e,t={}){return gr.batch(()=>{if(se(this,An).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=gr.batch(()=>se(this,An).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(no)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(no)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=se(this,An).build(this,t);return n.isStaleByTime(Mu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(no).catch(no)}fetchInfiniteQuery(e){return e.behavior=pT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(no).catch(no)}ensureInfiniteQueryData(e){return e.behavior=pT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _b.isOnline()?se(this,Ma).resumePausedMutations():Promise.resolve()}getQueryCache(){return se(this,An)}getMutationCache(){return se(this,Ma)}getDefaultOptions(){return se(this,Ta)}setDefaultOptions(e){je(this,Ta,e)}setQueryDefaults(e,t){se(this,Gu).set(Ch(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...se(this,Gu).values()],n={};return t.forEach(r=>{Eh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){se(this,qu).set(Ch(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...se(this,qu).values()];let n={};return t.forEach(r=>{Eh(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...se(this,Ta).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=J_(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Sb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...se(this,Ta).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){se(this,An).clear(),se(this,Ma).clear()}},An=new WeakMap,Ma=new WeakMap,Ta=new WeakMap,Gu=new WeakMap,qu=new WeakMap,Oa=new WeakMap,Yu=new WeakMap,Ku=new WeakMap,VI),ci,Lt,mp,Hr,Kl,Xu,Da,Yo,bp,Qu,Ju,Xl,Ql,Aa,Zu,Jt,Ff,Dw,Aw,kw,Iw,Nw,Lw,Fw,_N,WI,hX=(WI=class extends vp{constructor(t,n){super();Ze(this,Jt);Ze(this,ci);Ze(this,Lt);Ze(this,mp);Ze(this,Hr);Ze(this,Kl);Ze(this,Xu);Ze(this,Da);Ze(this,Yo);Ze(this,bp);Ze(this,Qu);Ze(this,Ju);Ze(this,Xl);Ze(this,Ql);Ze(this,Aa);Ze(this,Zu,new Set);this.options=n,je(this,ci,t),je(this,Yo,null),je(this,Da,Ow()),this.options.experimental_prefetchInRender||se(this,Da).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(se(this,Lt).addObserver(this),mT(se(this,Lt),this.options)?Nt(this,Jt,Ff).call(this):this.updateResult(),Nt(this,Jt,Iw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jw(se(this,Lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jw(se(this,Lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Nt(this,Jt,Nw).call(this),Nt(this,Jt,Lw).call(this),se(this,Lt).removeObserver(this)}setOptions(t,n){const r=this.options,i=se(this,Lt);if(this.options=se(this,ci).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Co(this.options.enabled,se(this,Lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Nt(this,Jt,Fw).call(this),se(this,Lt).setOptions(this.options),r._defaulted&&!Pw(this.options,r)&&se(this,ci).getQueryCache().notify({type:"observerOptionsUpdated",query:se(this,Lt),observer:this});const o=this.hasListeners();o&&bT(se(this,Lt),i,this.options,r)&&Nt(this,Jt,Ff).call(this),this.updateResult(n),o&&(se(this,Lt)!==i||Co(this.options.enabled,se(this,Lt))!==Co(r.enabled,se(this,Lt))||Mu(this.options.staleTime,se(this,Lt))!==Mu(r.staleTime,se(this,Lt)))&&Nt(this,Jt,Dw).call(this);const s=Nt(this,Jt,Aw).call(this);o&&(se(this,Lt)!==i||Co(this.options.enabled,se(this,Lt))!==Co(r.enabled,se(this,Lt))||s!==se(this,Aa))&&Nt(this,Jt,kw).call(this,s)}getOptimisticResult(t){const n=se(this,ci).getQueryCache().build(se(this,ci),t),r=this.createResult(n,t);return gX(this,r)&&(je(this,Hr,r),je(this,Xu,this.options),je(this,Kl,se(this,Lt).state)),r}getCurrentResult(){return se(this,Hr)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){se(this,Zu).add(t)}getCurrentQuery(){return se(this,Lt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=se(this,ci).defaultQueryOptions(t),r=se(this,ci).getQueryCache().build(se(this,ci),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Nt(this,Jt,Ff).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),se(this,Hr)))}createResult(t,n){var k;const r=se(this,Lt),i=this.options,o=se(this,Hr),s=se(this,Kl),a=se(this,Xu),c=t!==r?t.state:se(this,mp),{state:u}=t;let d={...u},p=!1,h;if(n._optimisticResults){const N=this.hasListeners(),F=!N&&mT(t,n),j=N&&bT(t,r,n,i);(F||j)&&(d={...d,...wN(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:b,status:v}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===se(this,bp))h=se(this,Qu);else try{je(this,bp,n.select),h=n.select(d.data),h=Tw(o==null?void 0:o.data,h,n),je(this,Qu,h),je(this,Yo,null)}catch(N){je(this,Yo,N)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&v==="pending"){let N;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))N=o.data;else if(N=typeof n.placeholderData=="function"?n.placeholderData((k=se(this,Ju))==null?void 0:k.state.data,se(this,Ju)):n.placeholderData,n.select&&N!==void 0)try{N=n.select(N),je(this,Yo,null)}catch(F){je(this,Yo,F)}N!==void 0&&(v="success",h=Tw(o==null?void 0:o.data,N,n),p=!0)}se(this,Yo)&&(m=se(this,Yo),h=se(this,Qu),b=Date.now(),v="error");const x=d.fetchStatus==="fetching",S=v==="pending",_=v==="error",E=S&&x,C=h!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:S,isSuccess:v==="success",isError:_,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:b,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!S,isLoadingError:_&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:_&&C,isStale:eC(t,n),refetch:this.refetch,promise:se(this,Da)};if(this.options.experimental_prefetchInRender){const N=$=>{O.status==="error"?$.reject(O.error):O.data!==void 0&&$.resolve(O.data)},F=()=>{const $=je(this,Da,O.promise=Ow());N($)},j=se(this,Da);switch(j.status){case"pending":t.queryHash===r.queryHash&&N(j);break;case"fulfilled":(O.status==="error"||O.data!==j.value)&&F();break;case"rejected":(O.status!=="error"||O.error!==j.reason)&&F();break}}return O}updateResult(t){const n=se(this,Hr),r=this.createResult(se(this,Lt),this.options);if(je(this,Kl,se(this,Lt).state),je(this,Xu,this.options),se(this,Kl).data!==void 0&&je(this,Ju,se(this,Lt)),Pw(r,n))return;je(this,Hr,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!se(this,Zu).size)return!0;const l=new Set(a??se(this,Zu));return this.options.throwOnError&&l.add("error"),Object.keys(se(this,Hr)).some(c=>{const u=c;return se(this,Hr)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Nt(this,Jt,_N).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Nt(this,Jt,Iw).call(this)}},ci=new WeakMap,Lt=new WeakMap,mp=new WeakMap,Hr=new WeakMap,Kl=new WeakMap,Xu=new WeakMap,Da=new WeakMap,Yo=new WeakMap,bp=new WeakMap,Qu=new WeakMap,Ju=new WeakMap,Xl=new WeakMap,Ql=new WeakMap,Aa=new WeakMap,Zu=new WeakMap,Jt=new WeakSet,Ff=function(t){Nt(this,Jt,Fw).call(this);let n=se(this,Lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(no)),n},Dw=function(){Nt(this,Jt,Nw).call(this);const t=Mu(this.options.staleTime,se(this,Lt));if(mc||se(this,Hr).isStale||!Ew(t))return;const r=gN(se(this,Hr).dataUpdatedAt,t)+1;je(this,Xl,setTimeout(()=>{se(this,Hr).isStale||this.updateResult()},r))},Aw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(se(this,Lt)):this.options.refetchInterval)??!1},kw=function(t){Nt(this,Jt,Lw).call(this),je(this,Aa,t),!(mc||Co(this.options.enabled,se(this,Lt))===!1||!Ew(se(this,Aa))||se(this,Aa)===0)&&je(this,Ql,setInterval(()=>{(this.options.refetchIntervalInBackground||Z_.isFocused())&&Nt(this,Jt,Ff).call(this)},se(this,Aa)))},Iw=function(){Nt(this,Jt,Dw).call(this),Nt(this,Jt,kw).call(this,Nt(this,Jt,Aw).call(this))},Nw=function(){se(this,Xl)&&(clearTimeout(se(this,Xl)),je(this,Xl,void 0))},Lw=function(){se(this,Ql)&&(clearInterval(se(this,Ql)),je(this,Ql,void 0))},Fw=function(){const t=se(this,ci).getQueryCache().build(se(this,ci),this.options);if(t===se(this,Lt))return;const n=se(this,Lt);je(this,Lt,t),je(this,mp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_N=function(t){gr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(se(this,Hr))}),se(this,ci).getQueryCache().notify({query:se(this,Lt),type:"observerResultsUpdated"})})},WI);function pX(e,t){return Co(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mT(e,t){return pX(e,t)||e.state.data!==void 0&&jw(e,t,t.refetchOnMount)}function jw(e,t,n){if(Co(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&eC(e,t)}return!1}function bT(e,t,n,r){return(e!==t||Co(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&eC(e,n)}function eC(e,t){return Co(t.enabled,e)!==!1&&e.isStaleByTime(Mu(t.staleTime,e))}function gX(e,t){return!Pw(e.getCurrentResult(),t)}var tC=R.createContext(void 0),nC=e=>{const t=R.useContext(tC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mX=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(tC.Provider,{value:e,children:t})),CN=R.createContext(!1),bX=()=>R.useContext(CN);CN.Provider;function yX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vX=R.createContext(yX()),xX=()=>R.useContext(vX);function wX(e,t){return typeof e=="function"?e(...t):!!e}function yT(){}var SX=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},_X=e=>{R.useEffect(()=>{e.clearReset()},[e])},CX=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&wX(n,[e.error,r]),EX=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},RX=(e,t)=>e.isLoading&&e.isFetching&&!t,PX=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,vT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function MX(e,t,n){var d,p,h,m,b;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=nC(),i=bX(),o=xX(),s=r.defaultQueryOptions(e);(p=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,s),s._optimisticResults=i?"isRestoring":"optimistic",EX(s),SX(s,o),_X(o);const a=!r.getQueryCache().get(s.queryHash),[l]=R.useState(()=>new t(r,s)),c=l.getOptimisticResult(s),u=!i&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(v=>{const x=u?l.subscribe(gr.batchCalls(v)):yT;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(s,{listeners:!1})},[s,l]),PX(s,c))throw vT(s,l,o);if(CX({result:c,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw c.error;if((m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,s,c),s.experimental_prefetchInRender&&!mc&&RX(c,i)){const v=a?vT(s,l,o):(b=r.getQueryCache().get(s.queryHash))==null?void 0:b.promise;v==null||v.catch(yT).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?c:l.trackResult(c)}function xp(e,t){return MX(e,hX)}function TX(){const e=P.useContext(tC);if(e&&e.isSemaphorClient)return e}function EN({children:e}){const{setIsSessionExpired:t}=Hn(),n=TX(),[r]=P.useState(()=>{const i=new fX({queryCache:new SN({onError:o=>{o instanceof Error?(console.error(`Something went wrong: ${o.message}`),o.message==="invalid token"&&t(!0)):console.error("Something went wrong:",o)}}),defaultOptions:{queries:{gcTime:36e5,staleTime:3e5,refetchOnWindowFocus:!1,retry:1}}});return i.isSemaphorClient=!0,i});return n?y.jsx(y.Fragment,{children:e}):y.jsx(mX,{client:r,children:e})}const Dc=P.forwardRef(({children:e,className:t,...n},r)=>y.jsx("div",{className:be("semaphor-scope",t),ref:r,...n,children:e})),OX={id:"",authToken:void 0},RN=P.createContext(OX),PN=({children:e,dashboardProps:t})=>y.jsx(EN,{children:y.jsx(RN.Provider,{value:t,children:y.jsx(Dc,{style:{height:"100%"},children:e})})});function Vi(){const e=P.useContext(RN);if(e===void 0)throw new Error("useApplicationContext must be used within a ApplicationContextProvider");return e}function DX(){const{authToken:e,version:t}=Vi(),n=ye(a=>a.selectedLensId),{data:r,isLoading:i,isFetching:o,isError:s}=xp({queryKey:["dashboard",n,e==null?void 0:e.accessToken],queryFn:()=>cK(e==null?void 0:e.accessToken,{lensId:n,version:t,payload:!0}),enabled:!!(e!=null&&e.accessToken)});return{data:r,isLoading:i,isFetching:o,isError:s}}function AX(){const{authToken:e}=Vi(),t=ye(r=>r.authToken),{setAuthToken:n}=Hn();return P.useEffect(()=>{e&&(e==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&n(e)},[e,t,n]),e}function MN(e){return e==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e}function xT(e,t){const n=MN(e);return n==="dark"?Jl.merge({...t==null?void 0:t.default},{...t==null?void 0:t.dark}):t==null?void 0:t.default}function kX({customStyle:e,currentTheme:t,onSave:n,onEvent:r,defaultFilterValues:i,onFilterValuesChange:o}){const{authToken:s}=Vi();AX();const a=ye(L=>L.selectedLensId),{data:l,isLoading:c,isFetching:u,isError:d}=DX(),[p,h]=P.useState(i||[]),{theme:m,setTheme:b}=pN(),v=ye(L=>L.dashboard.globalStyle),{setDashboard:x,setDashboardWithFilterValues:S,setSelectedSheetId:_,setStyle:E,setOnSaveFunction:C,setLenses:T,setSelectedLensId:O,setInitStore:k}=Hn();ye(L=>L.actions.setCustomCards);const N=ye(L=>L.actions.setFilterValues),F=ye(L=>L.filterValues),j=ye(L=>L.actions.setThemeStyle),$=ye(L=>L.actions.setDashboardTheme),X=ye(L=>L.actions.setOnEvent);P.useEffect(()=>{s&&k()},[s,k]),P.useEffect(()=>{if(m){const L=MN(m);$(L)}},[m,$]),P.useEffect(()=>{t&&b(t)},[t,b]);const V=P.useCallback(()=>{const L=Jl.cloneDeep(xb),U=Jl.merge(L,v);if(e){const B=Jl.merge(U,e),W=xT(m,B);j(W),E(B)}else{const B=xT(m,U);j(B),E(xb)}},[m,e,v,j,E]);return P.useEffect(()=>{l&&l.dashboard&&V()},[m,e,v,V,l]),P.useEffect(()=>{var Y,G;function L(D,ee){const K=D.filters||[],oe=[];for(const J of ee){const Z=K.find(ae=>ae.id===J.filterId);Z&&oe.push({filterId:J.filterId,connectionType:Z.database==="NA"?"api":"database",name:Z.column,operation:Z.operation,valueType:Pu(Z),values:J.values})}return oe}if(!l||!l.dashboard)return;const{dashboard:U,filterValues:B,defaultLensId:W,lenses:q}=l,A=L(U,p||[]);S(U,(!B||(B==null?void 0:B.length)===0?A:B)||[]),W&&O(W),q&&T(q),_(((G=(Y=U==null?void 0:U.sheets)==null?void 0:Y[0])==null?void 0:G.id)||null)},[l,x,_,N,a,T,S,O,p]),P.useEffect(()=>{o&&F&&o(F)},[F,o]),P.useEffect(()=>{n&&C(n),r&&X(r)},[n,C,r,X]),{isFetching:u,isLoading:c,isError:d}}function Tu({className:e,...t}){return y.jsx("div",{className:be("animate-pulse rounded-md bg-muted",e),...t})}const TN=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));TN.displayName="Card";const Ay=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));Ay.displayName="CardHeader";const Rd=R.forwardRef(({className:e,...t},n)=>y.jsx("h3",{ref:n,className:be("text-2xl font-semibold leading-none tracking-tight",e),...t}));Rd.displayName="CardTitle";const rC=R.forwardRef(({className:e,...t},n)=>y.jsx("p",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));rC.displayName="CardDescription";const ky=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("px-6 pt-0",e),...t}));ky.displayName="CardContent";const ON=R.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));ON.displayName="CardFooter";function DN({className:e,customStyle:t,onSave:n,onEvent:r,LoadingComponent:i,ErrorComponent:o,onChartElementClicked:s,id:a,authToken:l,currentTheme:c,version:u,customCards:d,showAssistant:p,defaultFilterValues:h,onFilterValuesChange:m,...b}){const{placeholders:v}=Vi(),x=ye(C=>C.themeStyle),S=ye(C=>C.isSessionExpired),{isLoading:_,isError:E}=kX({authToken:l,customStyle:t,currentTheme:c,onSave:n,onEvent:r,defaultFilterValues:h,onFilterValuesChange:m});return _||!l?(r==null||r({type:"info",message:"Loading dashboard"}),i?y.jsx(i,{message:"loading"}):y.jsx("div",{className:"flex items-center gap-3",children:y.jsx(Tu,{className:"h-1 w-full dark:h-[2px]"})})):E?(r==null||r({type:"error",message:"Error fetching dashboard"}),o?(console.log("Error fetching dashboard"),y.jsx(o,{})):y.jsx("div",{children:"Error"})):S?(r==null||r({type:"error",message:"Session Expired"}),v!=null&&v.SessionExpired?y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsx("div",{children:v.SessionExpired})}):y.jsx("div",{className:"flex h-full items-center justify-center",children:y.jsxs("div",{className:"space-y-4 rounded-md border border-muted p-10",children:[y.jsx(Rd,{children:"Session Expired"}),y.jsx("p",{className:"text-muted-foreground",children:"Please refresh your page to continue."})]})})):y.jsx("div",{className:be("flex h-full flex-col justify-between",x==null?void 0:x.dashboardPanel,e),style:{},role:"dashboard-panel",...b})}function Re(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function IX(e,t){const n=R.createContext(t),r=o=>{const{children:s,...a}=o,l=R.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(o){const s=R.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function tr(e,t=[]){let n=[];function r(o,s){const a=R.createContext(s),l=n.length;n=[...n,s];const c=d=>{var x;const{scope:p,children:h,...m}=d,b=((x=p==null?void 0:p[e])==null?void 0:x[l])||a,v=R.useMemo(()=>m,Object.values(m));return y.jsx(b.Provider,{value:v,children:h})};c.displayName=o+"Provider";function u(d,p){var b;const h=((b=p==null?void 0:p[e])==null?void 0:b[l])||a,m=R.useContext(h);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[c,u]}const i=()=>{const o=n.map(s=>R.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return R.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,NX(i,...t)]}function NX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return R.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function wT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Iy(...e){return t=>{let n=!1;const r=e.map(i=>{const o=wT(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():wT(e[i],null)}}}}function rt(...e){return R.useCallback(Iy(...e),e)}var Js=R.forwardRef((e,t)=>{const{children:n,...r}=e,i=R.Children.toArray(n),o=i.find(LX);if(o){const s=o.props.children,a=i.map(l=>l===o?R.Children.count(s)>1?R.Children.only(null):R.isValidElement(s)?s.props.children:null:l);return y.jsx($w,{...r,ref:t,children:R.isValidElement(s)?R.cloneElement(s,void 0,a):null})}return y.jsx($w,{...r,ref:t,children:n})});Js.displayName="Slot";var $w=R.forwardRef((e,t)=>{const{children:n,...r}=e;if(R.isValidElement(n)){const i=jX(n);return R.cloneElement(n,{...FX(r,n.props),ref:t?Iy(t,i):i})}return R.Children.count(n)>1?R.Children.only(null):null});$w.displayName="SlotClone";var iC=({children:e})=>y.jsx(y.Fragment,{children:e});function LX(e){return R.isValidElement(e)&&e.type===iC}function FX(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function jX(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Ny(e){const t=e+"CollectionProvider",[n,r]=tr(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:m,children:b}=h,v=P.useRef(null),x=P.useRef(new Map).current;return y.jsx(i,{scope:m,itemMap:x,collectionRef:v,children:b})};s.displayName=t;const a=e+"CollectionSlot",l=P.forwardRef((h,m)=>{const{scope:b,children:v}=h,x=o(a,b),S=rt(m,x.collectionRef);return y.jsx(Js,{ref:S,children:v})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",d=P.forwardRef((h,m)=>{const{scope:b,children:v,...x}=h,S=P.useRef(null),_=rt(m,S),E=o(c,b);return P.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),y.jsx(Js,{[u]:"",ref:_,children:v})});d.displayName=c;function p(h){const m=o(e+"CollectionConsumer",h);return P.useCallback(()=>{const v=m.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:s,Slot:l,ItemSlot:d},p,r]}var mr=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},$X=R.useId||(()=>{}),zX=0;function qn(e){const[t,n]=R.useState($X());return mr(()=>{e||n(r=>r??String(zX++))},[e]),e||(t?`radix-${t}`:"")}var BX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ne=BX.reduce((e,t)=>{const n=R.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Js:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function AN(e,t){e&&hc.flushSync(()=>e.dispatchEvent(t))}function er(e){const t=R.useRef(e);return R.useEffect(()=>{t.current=e}),R.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ar({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=HX({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=er(n),l=R.useCallback(c=>{if(o){const d=typeof c=="function"?c(e):c;d!==e&&a(d)}else i(c)},[o,e,i,a]);return[s,l]}function HX({defaultProp:e,onChange:t}){const n=R.useState(e),[r]=n,i=R.useRef(r),o=er(t);return R.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}var VX=R.createContext(void 0);function Ac(e){const t=R.useContext(VX);return e||t||"ltr"}var Sx="rovingFocusGroup.onEntryFocus",WX={bubbles:!1,cancelable:!0},Ly="RovingFocusGroup",[zw,kN,UX]=Ny(Ly),[GX,Pd]=tr(Ly,[UX]),[qX,YX]=GX(Ly),IN=R.forwardRef((e,t)=>y.jsx(zw.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(zw.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(KX,{...e,ref:t})})}));IN.displayName=Ly;var KX=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,p=R.useRef(null),h=rt(t,p),m=Ac(o),[b=null,v]=Ar({prop:s,defaultProp:a,onChange:l}),[x,S]=R.useState(!1),_=er(c),E=kN(n),C=R.useRef(!1),[T,O]=R.useState(0);return R.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(Sx,_),()=>k.removeEventListener(Sx,_)},[_]),y.jsx(qX,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:b,onItemFocus:R.useCallback(k=>v(k),[v]),onItemShiftTab:R.useCallback(()=>S(!0),[]),onFocusableItemAdd:R.useCallback(()=>O(k=>k+1),[]),onFocusableItemRemove:R.useCallback(()=>O(k=>k-1),[]),children:y.jsx(Ne.div,{tabIndex:x||T===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:Re(e.onMouseDown,()=>{C.current=!0}),onFocus:Re(e.onFocus,k=>{const N=!C.current;if(k.target===k.currentTarget&&N&&!x){const F=new CustomEvent(Sx,WX);if(k.currentTarget.dispatchEvent(F),!F.defaultPrevented){const j=E().filter(U=>U.focusable),$=j.find(U=>U.active),X=j.find(U=>U.id===b),L=[$,X,...j].filter(Boolean).map(U=>U.ref.current);FN(L,u)}}C.current=!1}),onBlur:Re(e.onBlur,()=>S(!1))})})}),NN="RovingFocusGroupItem",LN=R.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=qn(),l=o||a,c=YX(NN,n),u=c.currentTabStopId===l,d=kN(n),{onFocusableItemAdd:p,onFocusableItemRemove:h}=c;return R.useEffect(()=>{if(r)return p(),()=>h()},[r,p,h]),y.jsx(zw.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:y.jsx(Ne.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:Re(e.onMouseDown,m=>{r?c.onItemFocus(l):m.preventDefault()}),onFocus:Re(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Re(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){c.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const b=JX(m,c.orientation,c.dir);if(b!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let x=d().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(m.currentTarget);x=c.loop?ZX(x,S+1):x.slice(S+1)}setTimeout(()=>FN(x))}})})})});LN.displayName=NN;var XX={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function QX(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JX(e,t,n){const r=QX(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return XX[r]}function FN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ZX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var oC=IN,sC=LN;function eQ(e,t){return R.useReducer((n,r)=>t[n][r]??n,e)}var Yn=e=>{const{present:t,children:n}=e,r=tQ(t),i=typeof n=="function"?n({present:r.isPresent}):R.Children.only(n),o=rt(r.ref,nQ(i));return typeof n=="function"||r.isPresent?R.cloneElement(i,{ref:o}):null};Yn.displayName="Presence";function tQ(e){const[t,n]=R.useState(),r=R.useRef({}),i=R.useRef(e),o=R.useRef("none"),s=e?"mounted":"unmounted",[a,l]=eQ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const c=Ug(r.current);o.current=a==="mounted"?c:"none"},[a]),mr(()=>{const c=r.current,u=i.current;if(u!==e){const p=o.current,h=Ug(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),mr(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const b=Ug(r.current).includes(h.animationName);if(h.target===t&&b&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(o.current=Ug(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:R.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ug(e){return(e==null?void 0:e.animationName)||"none"}function nQ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var aC="Tabs",[rQ,QMe]=tr(aC,[Pd]),jN=Pd(),[iQ,lC]=rQ(aC),$N=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Ac(a),[d,p]=Ar({prop:r,onChange:i,defaultProp:o});return y.jsx(iQ,{scope:n,baseId:qn(),value:d,onValueChange:p,orientation:s,dir:u,activationMode:l,children:y.jsx(Ne.div,{dir:u,"data-orientation":s,...c,ref:t})})});$N.displayName=aC;var zN="TabsList",BN=R.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=lC(zN,n),s=jN(n);return y.jsx(oC,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:y.jsx(Ne.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});BN.displayName=zN;var HN="TabsTrigger",VN=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=lC(HN,n),a=jN(n),l=GN(s.baseId,r),c=qN(s.baseId,r),u=r===s.value;return y.jsx(sC,{asChild:!0,...a,focusable:!i,active:u,children:y.jsx(Ne.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:Re(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:Re(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:Re(e.onFocus,()=>{const d=s.activationMode!=="manual";!u&&!i&&d&&s.onValueChange(r)})})})});VN.displayName=HN;var WN="TabsContent",UN=R.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=lC(WN,n),l=GN(a.baseId,r),c=qN(a.baseId,r),u=r===a.value,d=R.useRef(u);return R.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),y.jsx(Yn,{present:i||u,children:({present:p})=>y.jsx(Ne.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&o})})});UN.displayName=WN;function GN(e,t){return`${e}-trigger-${t}`}function qN(e,t){return`${e}-content-${t}`}var oQ=$N,YN=BN,KN=VN,XN=UN;const cC=oQ,Fy=R.forwardRef(({className:e,...t},n)=>y.jsx(YN,{ref:n,className:be("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Fy.displayName=YN.displayName;const jy=R.forwardRef(({className:e,...t},n)=>y.jsx(KN,{ref:n,className:be("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}));jy.displayName=KN.displayName;const uC=R.forwardRef(({className:e,...t},n)=>y.jsx(XN,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));uC.displayName=XN.displayName;var QN={exports:{}},wp={},Bw={exports:{}};(function(e,t){(function(n,r){r(t)})(Ca,function(n){function r(Z){return function(ce,pe,ie,ge,de,Ee,De){return Z(ce,pe,De)}}function i(Z){return function(ce,pe,ie,ge){if(!ce||!pe||typeof ce!="object"||typeof pe!="object")return Z(ce,pe,ie,ge);var de=ge.get(ce),Ee=ge.get(pe);if(de&&Ee)return de===pe&&Ee===ce;ge.set(ce,pe),ge.set(pe,ce);var De=Z(ce,pe,ie,ge);return ge.delete(ce),ge.delete(pe),De}}function o(Z,ae){var ce={};for(var pe in Z)ce[pe]=Z[pe];for(var pe in ae)ce[pe]=ae[pe];return ce}function s(Z){return Z.constructor===Object||Z.constructor==null}function a(Z){return typeof Z.then=="function"}function l(Z,ae){return Z===ae||Z!==Z&&ae!==ae}var c="[object Arguments]",u="[object Boolean]",d="[object Date]",p="[object RegExp]",h="[object Map]",m="[object Number]",b="[object Object]",v="[object Set]",x="[object String]",S=Object.prototype.toString;function _(Z){var ae=Z.areArraysEqual,ce=Z.areDatesEqual,pe=Z.areMapsEqual,ie=Z.areObjectsEqual,ge=Z.areRegExpsEqual,de=Z.areSetsEqual,Ee=Z.createIsNestedEqual,De=Ee($e);function $e(Me,ze,yt){if(Me===ze)return!0;if(!Me||!ze||typeof Me!="object"||typeof ze!="object")return Me!==Me&&ze!==ze;if(s(Me)&&s(ze))return ie(Me,ze,De,yt);var Tt=Array.isArray(Me),mn=Array.isArray(ze);if(Tt||mn)return Tt===mn&&ae(Me,ze,De,yt);var Ot=S.call(Me);return Ot!==S.call(ze)?!1:Ot===d?ce(Me,ze,De,yt):Ot===p?ge(Me,ze,De,yt):Ot===h?pe(Me,ze,De,yt):Ot===v?de(Me,ze,De,yt):Ot===b||Ot===c?a(Me)||a(ze)?!1:ie(Me,ze,De,yt):Ot===u||Ot===m||Ot===x?l(Me.valueOf(),ze.valueOf()):!1}return $e}function E(Z,ae,ce,pe){var ie=Z.length;if(ae.length!==ie)return!1;for(;ie-- >0;)if(!ce(Z[ie],ae[ie],ie,ie,Z,ae,pe))return!1;return!0}var C=i(E);function T(Z,ae){return l(Z.valueOf(),ae.valueOf())}function O(Z,ae,ce,pe){var ie=Z.size===ae.size;if(!ie)return!1;if(!Z.size)return!0;var ge={},de=0;return Z.forEach(function(Ee,De){if(ie){var $e=!1,Me=0;ae.forEach(function(ze,yt){!$e&&!ge[Me]&&($e=ce(De,yt,de,Me,Z,ae,pe)&&ce(Ee,ze,De,yt,Z,ae,pe))&&(ge[Me]=!0),Me++}),de++,ie=$e}}),ie}var k=i(O),N="_owner",F=Object.prototype.hasOwnProperty;function j(Z,ae,ce,pe){var ie=Object.keys(Z),ge=ie.length;if(Object.keys(ae).length!==ge)return!1;for(var de;ge-- >0;){if(de=ie[ge],de===N){var Ee=!!Z.$$typeof,De=!!ae.$$typeof;if((Ee||De)&&Ee!==De)return!1}if(!F.call(ae,de)||!ce(Z[de],ae[de],de,de,Z,ae,pe))return!1}return!0}var $=i(j);function X(Z,ae){return Z.source===ae.source&&Z.flags===ae.flags}function V(Z,ae,ce,pe){var ie=Z.size===ae.size;if(!ie)return!1;if(!Z.size)return!0;var ge={};return Z.forEach(function(de,Ee){if(ie){var De=!1,$e=0;ae.forEach(function(Me,ze){!De&&!ge[$e]&&(De=ce(de,Me,Ee,ze,Z,ae,pe))&&(ge[$e]=!0),$e++}),ie=De}}),ie}var L=i(V),U=Object.freeze({areArraysEqual:E,areDatesEqual:T,areMapsEqual:O,areObjectsEqual:j,areRegExpsEqual:X,areSetsEqual:V,createIsNestedEqual:r}),B=Object.freeze({areArraysEqual:C,areDatesEqual:T,areMapsEqual:k,areObjectsEqual:$,areRegExpsEqual:X,areSetsEqual:L,createIsNestedEqual:r}),W=_(U);function q(Z,ae){return W(Z,ae,void 0)}var A=_(o(U,{createIsNestedEqual:function(){return l}}));function Y(Z,ae){return A(Z,ae,void 0)}var G=_(B);function D(Z,ae){return G(Z,ae,new WeakMap)}var ee=_(o(B,{createIsNestedEqual:function(){return l}}));function K(Z,ae){return ee(Z,ae,new WeakMap)}function oe(Z){return _(o(U,Z(U)))}function J(Z){var ae=_(o(B,Z(B)));return function(ce,pe,ie){return ie===void 0&&(ie=new WeakMap),ae(ce,pe,ie)}}n.circularDeepEqual=D,n.circularShallowEqual=K,n.createCustomCircularEqual=J,n.createCustomEqual=oe,n.deepEqual=q,n.sameValueZeroEqual=l,n.shallowEqual=Y,Object.defineProperty(n,"__esModule",{value:!0})})})(Bw,Bw.exports);var dC=Bw.exports;const fC=z_(xY);var Ct={},sQ=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(Ct,"__esModule",{value:!0});Ct.bottom=hC;Ct.childrenEqual=uQ;Ct.cloneLayout=JN;Ct.cloneLayoutItem=Zl;Ct.collides=$y;Ct.compact=e5;Ct.compactItem=t5;Ct.compactType=_Q;Ct.correctBounds=n5;Ct.fastPositionEqual=dQ;Ct.fastRGLPropsEqual=void 0;Ct.getAllCollisions=r5;Ct.getFirstCollision=Fl;Ct.getLayoutItem=pC;Ct.getStatics=gC;Ct.modifyLayout=ZN;Ct.moveElement=$f;Ct.moveElementAwayFromCollision=Vw;Ct.noop=void 0;Ct.perc=hQ;Ct.resizeItemInDirection=vQ;Ct.setTopLeft=wQ;Ct.setTransform=xQ;Ct.sortLayoutItems=wC;Ct.sortLayoutItemsByColRow=l5;Ct.sortLayoutItemsByRowCol=a5;Ct.synchronizeLayoutWithChildren=SQ;Ct.validateLayout=c5;Ct.withLayoutItem=cQ;var ST=dC,jf=aQ(P);function aQ(e){return e&&e.__esModule?e:{default:e}}const lQ=process.env.NODE_ENV==="production";function hC(e){let t=0,n;for(let r=0,i=e.length;r<i;r++)n=e[r].y+e[r].h,n>t&&(t=n);return t}function JN(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=Zl(e[n]);return t}function ZN(e,t){const n=Array(e.length);for(let r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function cQ(e,t,n){let r=pC(e,t);return r?(r=n(Zl(r)),e=ZN(e,r),[e,r]):[e,null]}function Zl(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 uQ(e,t){return(0,ST.deepEqual)(jf.default.Children.map(e,n=>n==null?void 0:n.key),jf.default.Children.map(t,n=>n==null?void 0:n.key))&&(0,ST.deepEqual)(jf.default.Children.map(e,n=>n==null?void 0:n.props["data-grid"]),jf.default.Children.map(t,n=>n==null?void 0:n.props["data-grid"]))}Ct.fastRGLPropsEqual=sQ;function dQ(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function $y(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 e5(e,t,n,r){const i=gC(e),o=wC(e,t),s=Array(e.length);for(let a=0,l=o.length;a<l;a++){let c=Zl(o[a]);c.static||(c=t5(i,c,t,n,o,r),i.push(c)),s[e.indexOf(o[a])]=c,c.moved=!1}return s}const fQ={x:"w",y:"h"};function Hw(e,t,n,r){const i=fQ[r];t[r]+=1;const o=e.map(s=>s.i).indexOf(t.i);for(let s=o+1;s<e.length;s++){const a=e[s];if(!a.static){if(a.y>t.y+t.h)break;$y(t,a)&&Hw(e,a,n+t[i],r)}}t[r]=n}function t5(e,t,n,r,i,o){const s=n==="vertical",a=n==="horizontal";if(s)for(t.y=Math.min(hC(e),t.y);t.y>0&&!Fl(e,t);)t.y--;else if(a)for(;t.x>0&&!Fl(e,t);)t.x--;let l;for(;(l=Fl(e,t))&&!(n===null&&o);)if(a?Hw(i,t,l.x+l.w,"x"):Hw(i,t,l.y+l.h,"y"),a&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!Fl(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function n5(e,t){const n=gC(e);for(let r=0,i=e.length;r<i;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),!o.static)n.push(o);else for(;Fl(n,o);)o.y++}return e}function pC(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function Fl(e,t){for(let n=0,r=e.length;n<r;n++)if($y(e[n],t))return e[n]}function r5(e,t){return e.filter(n=>$y(n,t))}function gC(e){return e.filter(t=>t.static)}function $f(e,t,n,r,i,o,s,a,l){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return e;`${t.i}${String(n)}${String(r)}${t.x}${t.y}`;const c=t.x,u=t.y;typeof n=="number"&&(t.x=n),typeof r=="number"&&(t.y=r),t.moved=!0;let d=wC(e,s);(s==="vertical"&&typeof r=="number"?u>=r:s==="horizontal"&&typeof n=="number"?c>=n:!1)&&(d=d.reverse());const h=r5(d,t),m=h.length>0;if(m&&l)return JN(e);if(m&&o)return`${t.i}`,t.x=c,t.y=u,t.moved=!1,e;for(let b=0,v=h.length;b<v;b++){const x=h[b];`${t.i}${t.x}${t.y}${x.i}${x.x}${x.y}`,!x.moved&&(x.static?e=Vw(e,x,t,i,s):e=Vw(e,t,x,i,s))}return e}function Vw(e,t,n,r,i,o){const s=i==="horizontal",a=i==="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"},p=Fl(e,d),h=p&&p.y+p.h>t.y,m=p&&t.x+t.w>p.x;if(p){if(h&&a)return $f(e,n,void 0,t.y+1,r,l,i);if(h&&i==null)return t.y=n.y,n.y=n.y+n.h,e;if(m&&s)return $f(e,t,n.x,void 0,r,l,i)}else return`${n.i}${d.x}${d.y}`,$f(e,n,s?d.x:void 0,a?d.y:void 0,r,l,i)}const c=s?n.x+1:void 0,u=a?n.y+1:void 0;return c==null&&u==null?e:$f(e,n,s?n.x+1:void 0,a?n.y+1:void 0,r,l,i)}function hQ(e){return e*100+"%"}const i5=(e,t,n,r)=>e+n>r?t:n,o5=(e,t,n)=>e<0?t:n,s5=e=>Math.max(0,e),mC=e=>Math.max(0,e),bC=(e,t,n)=>{let{left:r,height:i,width:o}=t;const s=e.top-(i-e.height);return{left:r,width:o,height:o5(s,e.height,i),top:mC(s)}},yC=(e,t,n)=>{let{top:r,left:i,height:o,width:s}=t;return{top:r,height:o,width:i5(e.left,e.width,s,n),left:s5(i)}},vC=(e,t,n)=>{let{top:r,height:i,width:o}=t;const s=e.left-(o-e.width);return{height:i,width:s<0?e.width:i5(e.left,e.width,o,n),top:mC(r),left:s5(s)}},xC=(e,t,n)=>{let{top:r,left:i,height:o,width:s}=t;return{width:s,left:i,height:o5(r,e.height,o),top:mC(r)}},pQ=function(){return bC(arguments.length<=0?void 0:arguments[0],yC(...arguments))},gQ=function(){return bC(arguments.length<=0?void 0:arguments[0],vC(...arguments))},mQ=function(){return xC(arguments.length<=0?void 0:arguments[0],yC(...arguments))},bQ=function(){return xC(arguments.length<=0?void 0:arguments[0],vC(...arguments))},yQ={n:bC,ne:pQ,e:yC,se:mQ,s:xC,sw:bQ,w:vC,nw:gQ};function vQ(e,t,n,r){const i=yQ[e];return i?i(t,{...t,...n},r):n}function xQ(e){let{top:t,left:n,width:r,height:i}=e;const o=`translate(${n}px,${t}px)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${r}px`,height:`${i}px`,position:"absolute"}}function wQ(e){let{top:t,left:n,width:r,height:i}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${i}px`,position:"absolute"}}function wC(e,t){return t==="horizontal"?l5(e):t==="vertical"?a5(e):e}function a5(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 l5(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 SQ(e,t,n,r,i){e=e||[];const o=[];jf.default.Children.forEach(t,a=>{if((a==null?void 0:a.key)==null)return;const l=pC(e,String(a.key)),c=a.props["data-grid"];l&&c==null?o.push(Zl(l)):c?(lQ||c5([c],"ReactGridLayout.children"),o.push(Zl({...c,i:a.key}))):o.push(Zl({w:1,h:1,x:0,y:hC(o),i:String(a.key)}))});const s=n5(o,{cols:n});return i?s:e5(s,r,n)}function c5(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,i=e.length;r<i;r++){const o=e[r];for(let s=0;s<n.length;s++){const a=n[s],l=o[a];if(typeof l!="number"||Number.isNaN(l))throw new Error(`ReactGridLayout: ${t}[${r}].${a} must be a number! Received: ${l} (${typeof l})`)}if(typeof o.i<"u"&&typeof o.i!="string")throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${o.i} (${typeof o.i})`)}}function _Q(e){const{verticalCompact:t,compactType:n}=e||{};return t===!1?null:n}const CQ=()=>{};Ct.noop=CQ;var hs={};Object.defineProperty(hs,"__esModule",{value:!0});hs.calcGridColWidth=zy;hs.calcGridItemPosition=EQ;hs.calcGridItemWHPx=Ww;hs.calcWH=PQ;hs.calcXY=RQ;hs.clamp=jl;function zy(e){const{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Ww(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function EQ(e,t,n,r,i,o){const{margin:s,containerPadding:a,rowHeight:l}=e,c=zy(e),u={};return o&&o.resizing?(u.width=Math.round(o.resizing.width),u.height=Math.round(o.resizing.height)):(u.width=Ww(r,c,s[0]),u.height=Ww(i,l,s[1])),o&&o.dragging?(u.top=Math.round(o.dragging.top),u.left=Math.round(o.dragging.left)):o&&o.resizing&&typeof o.resizing.top=="number"&&typeof o.resizing.left=="number"?(u.top=Math.round(o.resizing.top),u.left=Math.round(o.resizing.left)):(u.top=Math.round((l+s[1])*n+a[1]),u.left=Math.round((c+s[0])*t+a[0])),u}function RQ(e,t,n,r,i){const{margin:o,containerPadding:s,cols:a,rowHeight:l,maxRows:c}=e,u=zy(e);let d=Math.round((n-s[0])/(u+o[0])),p=Math.round((t-s[1])/(l+o[1]));return d=jl(d,0,a-r),p=jl(p,0,c-i),{x:d,y:p}}function PQ(e,t,n,r,i,o){const{margin:s,maxRows:a,cols:l,rowHeight:c}=e,u=zy(e);let d=Math.round((t+s[0])/(u+s[0])),p=Math.round((n+s[1])/(c+s[1])),h=jl(d,0,l-r),m=jl(p,0,a-i);return["sw","w","nw"].indexOf(o)!==-1&&(h=jl(d,0,l)),["nw","n","ne"].indexOf(o)!==-1&&(m=jl(p,0,a)),{w:h,h:m}}function jl(e,t,n){return Math.max(Math.min(e,n),t)}var By={},Uw={exports:{}},Gg={exports:{}},Kt={};/** @license React v16.13.1
92
92
  * react-is.production.min.js
93
93
  *
94
94
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -11091,7 +11091,7 @@ function EK() {
11091
11091
  queryFn: () => rY(e == null ? void 0 : e.accessToken, {
11092
11092
  lensId: n,
11093
11093
  version: t,
11094
- isEncrypted: !0
11094
+ payload: !0
11095
11095
  }),
11096
11096
  // staleTime: Infinity,
11097
11097
  enabled: !!(e != null && e.accessToken)
@@ -1,4 +1,4 @@
1
- import { c as R, u as vs, v as M, w as is, x as Se, y as e, z as Cs, A as Ns, H as O, o as Ss, J as ws, K as ks, M as zs, N as Os, O as H, Q as ie, R as ta, V as na, W as la, Y as ra, Z as st, _ as at, $ as tt, a0 as Gs, a1 as Y, a2 as Be, i as nt, a3 as u, a4 as lt, P as ia, F as oa, a5 as Ue, a6 as Ge, a7 as Ds, a8 as ca, a9 as Ms, aa as ue, ab as he, ac as me, ad as xe, ae as ve, af as pe, ag as Z, T as Is, ah as Fs, ai as Ts, aj as Ls, ak as da, al as ua, am as ce, an as rt, ao as it, ap as ha, aq as ot, C as ct, ar as dt, as as ma, B as ut, at as fe, au as ht, av as Ke, aw as xa, ax as gs, ay as be, az as ze, aA as Ce, aB as pa, aC as mt, aD as xt, aE as pt, aF as ft, l as gt, aG as jt, aH as bt, aI as De, aJ as te, aK as fa, aL as yt, aM as os, aN as vt, aO as Ct, aP as js, a as Nt, aQ as ss, aR as ye, aS as as, aT as St, aU as wt, aV as kt, aW as zt, aX as fs, aY as Ot, aZ as Ks, a_ as Dt, a$ as Qs, b0 as Mt, b1 as It, b2 as Ft, b3 as Tt, b4 as ga, b5 as Lt, b6 as Es, b7 as ja, b8 as Et, b9 as Vt, ba as Ze, bb as At, bc as qt, bd as ba, be as Rt, s as _t, bf as Ht, bg as $t, r as Pt, bh as cs, bi as ya, bj as va, bk as Ca, bl as Xe, bm as Na, bn as es, bo as Js, bp as Bt, bq as Ut, br as ds, bs as us, bt as hs, bu as Gt, I as Kt, X as Sa, bv as Qt, bw as Jt, bx as Wt, E as Yt, by as ms, bz as Oe, f as Zt, bA as $e, bB as Vs, bC as wa, bD as Xt, bE as en, bF as ts, bG as sn, bH as an, bI as tn, bJ as Ws, bK as ka, bL as nn, bM as ln, bN as rn, bO as on, bP as cn, bQ as dn, bR as un, bS as Me, bT as Q, bU as J, bV as As, bW as W, bX as hn, bY as za, bZ as mn, b_ as xn, b$ as pn, c0 as fn, c1 as gn, c2 as jn, c3 as bn, c4 as yn, c5 as vn } from "./index-DQqGCt9j.js";
1
+ import { c as R, u as vs, v as M, w as is, x as Se, y as e, z as Cs, A as Ns, H as O, o as Ss, J as ws, K as ks, M as zs, N as Os, O as H, Q as ie, R as ta, V as na, W as la, Y as ra, Z as st, _ as at, $ as tt, a0 as Gs, a1 as Y, a2 as Be, i as nt, a3 as u, a4 as lt, P as ia, F as oa, a5 as Ue, a6 as Ge, a7 as Ds, a8 as ca, a9 as Ms, aa as ue, ab as he, ac as me, ad as xe, ae as ve, af as pe, ag as Z, T as Is, ah as Fs, ai as Ts, aj as Ls, ak as da, al as ua, am as ce, an as rt, ao as it, ap as ha, aq as ot, C as ct, ar as dt, as as ma, B as ut, at as fe, au as ht, av as Ke, aw as xa, ax as gs, ay as be, az as ze, aA as Ce, aB as pa, aC as mt, aD as xt, aE as pt, aF as ft, l as gt, aG as jt, aH as bt, aI as De, aJ as te, aK as fa, aL as yt, aM as os, aN as vt, aO as Ct, aP as js, a as Nt, aQ as ss, aR as ye, aS as as, aT as St, aU as wt, aV as kt, aW as zt, aX as fs, aY as Ot, aZ as Ks, a_ as Dt, a$ as Qs, b0 as Mt, b1 as It, b2 as Ft, b3 as Tt, b4 as ga, b5 as Lt, b6 as Es, b7 as ja, b8 as Et, b9 as Vt, ba as Ze, bb as At, bc as qt, bd as ba, be as Rt, s as _t, bf as Ht, bg as $t, r as Pt, bh as cs, bi as ya, bj as va, bk as Ca, bl as Xe, bm as Na, bn as es, bo as Js, bp as Bt, bq as Ut, br as ds, bs as us, bt as hs, bu as Gt, I as Kt, X as Sa, bv as Qt, bw as Jt, bx as Wt, E as Yt, by as ms, bz as Oe, f as Zt, bA as $e, bB as Vs, bC as wa, bD as Xt, bE as en, bF as ts, bG as sn, bH as an, bI as tn, bJ as Ws, bK as ka, bL as nn, bM as ln, bN as rn, bO as on, bP as cn, bQ as dn, bR as un, bS as Me, bT as Q, bU as J, bV as As, bW as W, bX as hn, bY as za, bZ as mn, b_ as xn, b$ as pn, c0 as fn, c1 as gn, c2 as jn, c3 as bn, c4 as yn, c5 as vn } from "./index-WvZUoAR6.js";
2
2
  import * as Ys from "react";
3
3
  import Ne, { useState as q, useMemo as bs, useEffect as X, useRef as ns, useCallback as Oa, Suspense as Cn } from "react";
4
4
  import "react-dom";
@@ -2987,7 +2987,7 @@ function Wa(s) {
2987
2987
  const [n, a] = q(null);
2988
2988
  return X(() => {
2989
2989
  s && (async () => {
2990
- const r = (await import("./lucide-react-DY17LpJN.js"))[s];
2990
+ const r = (await import("./lucide-react-CmVFr7-K.js"))[s];
2991
2991
  a(r);
2992
2992
  })();
2993
2993
  }, [s]), n;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C7c7knpv.js"),a=require("./index-DG9M2GWN.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CmfbQklE.js"),a=require("./index-CI9YrNhd.js");/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,6 +1,6 @@
1
- import { c as a, B as e, C as t, a as c, b as h, d, e as o, f as y, g as i, h as s, i as n, E as r, j as k, F as p, k as l, G as u, I as M, l as v, L as g, m, P as x, n as L, o as w, S as C, p as f, q as I, r as S, T as q, s as b, U as H, X as A } from "./index-DQqGCt9j.js";
2
- import { t as Av } from "./index-DQqGCt9j.js";
3
- import { B as z, a as P, C as V, b as j, c as B, d as F, e as D, f as R, g as T, h as U, i as O, E as Z, j as G, k as W, G as E, H as X, l as N, m as K, K as J, L as Q, n as Y, o as _, p as $, M as a1, q as e1, N as t1, P as c1, r as h1, S as d1, s as o1, t as y1, u as i1, v as s1, T as n1, w as r1, x as k1, U as p1 } from "./index-xtZJkibK.js";
1
+ import { c as a, B as e, C as t, a as c, b as h, d, e as o, f as y, g as i, h as s, i as n, E as r, j as k, F as p, k as l, G as u, I as M, l as v, L as g, m, P as x, n as L, o as w, S as C, p as f, q as I, r as S, T as q, s as b, U as H, X as A } from "./index-WvZUoAR6.js";
2
+ import { t as Av } from "./index-WvZUoAR6.js";
3
+ import { B as z, a as P, C as V, b as j, c as B, d as F, e as D, f as R, g as T, h as U, i as O, E as Z, j as G, k as W, G as E, H as X, l as N, m as K, K as J, L as Q, n as Y, o as _, p as $, M as a1, q as e1, N as t1, P as c1, r as h1, S as d1, s as o1, t as y1, u as i1, v as s1, T as n1, w as r1, x as k1, U as p1 } from "./index-tPgzU4xS.js";
4
4
  /**
5
5
  * @license lucide-react v0.453.0 - ISC
6
6
  *
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-C7c7knpv.js");exports.Dashboard=e.Dashboard;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CmfbQklE.js");exports.Dashboard=e.Dashboard;
@@ -1,4 +1,4 @@
1
- import { D as r } from "../chunks/index-DQqGCt9j.js";
1
+ import { D as r } from "../chunks/index-WvZUoAR6.js";
2
2
  export {
3
3
  r as Dashboard
4
4
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-C7c7knpv.js"),a=require("./chunks/index-DG9M2GWN.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.SelectComponent=a.SelectComponent;exports.Surfboard=a.DashboardPlus;exports.cleanCard=a.cleanCard;exports.getDashbaordStateWithoutData=a.getDashbaordStateWithoutData;exports.useEditorAside=a.useEditorAside;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-CmfbQklE.js"),a=require("./chunks/index-CI9YrNhd.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isBooleanDataType=e.isBooleanDataType;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.isDateDataType=e.isDateDataType;exports.isNumberDataType=e.isNumberDataType;exports.isTextDataType=e.isTextDataType;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.useTextFilterHook=e.useTextFilterHook;exports.SelectComponent=a.SelectComponent;exports.Surfboard=a.DashboardPlus;exports.cleanCard=a.cleanCard;exports.getDashbaordStateWithoutData=a.getDashbaordStateWithoutData;exports.useEditorAside=a.useEditorAside;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as o, ca as r, c8 as i, c8 as l, ak as u, am as D, cc as c, cb as d, aw as p, al as m, ar as n, au as S, aq as T, ap as b, ao as y, cd as h, c9 as C, w as f, v as g, c6 as q, aJ as x, a3 as A, c7 as F } from "./chunks/index-DQqGCt9j.js";
2
- import { z as v, D as E, F as w, A as G, y as H } from "./chunks/index-xtZJkibK.js";
1
+ import { D as o, ca as r, c8 as i, c8 as l, ak as u, am as D, cc as c, cb as d, aw as p, al as m, ar as n, au as S, aq as T, ap as b, ao as y, cd as h, c9 as C, w as f, v as g, c6 as q, aJ as x, a3 as A, c7 as F } from "./chunks/index-WvZUoAR6.js";
2
+ import { z as v, D as E, F as w, A as G, y as H } from "./chunks/index-tPgzU4xS.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  export {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-DG9M2GWN.js");exports.Surfboard=e.DashboardPlus;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-CI9YrNhd.js");exports.Surfboard=e.DashboardPlus;
@@ -1,4 +1,4 @@
1
- import { D as a } from "../chunks/index-xtZJkibK.js";
1
+ import { D as a } from "../chunks/index-tPgzU4xS.js";
2
2
  export {
3
3
  a as Surfboard
4
4
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.352",
8
+ "version": "0.0.354",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",