@platforma-sdk/ui-vue 1.7.25 → 1.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @platforma-sdk/ui-vue
2
2
 
3
+ ## 1.7.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 812ba42: PlAgDataTable loadingError changed
8
+
9
+ ## 1.7.26
10
+
11
+ ### Patch Changes
12
+
13
+ - bc5e60e: Preserve column order after sort
14
+
3
15
  ## 1.7.25
4
16
 
5
17
  ### Patch Changes
package/dist/lib.js CHANGED
@@ -16213,7 +16213,7 @@ function eI(r, e, t) {
16213
16213
  const f = r[c].toString(), h = e[c].data[l], m = e[c].type;
16214
16214
  K1(e[c].absent, l) ? u[f] = void 0 : Th(h, m) || h === null ? u[f] = null : u[f] = gp(h, m);
16215
16215
  }
16216
- u.id = t++, a.push(u);
16216
+ u.id = (t++).toString(), a.push(u);
16217
16217
  }
16218
16218
  return a;
16219
16219
  }
@@ -16410,6 +16410,10 @@ const rI = { class: "ap-ag-data-table-container" }, iI = {
16410
16410
  onRowDataUpdated: (b) => {
16411
16411
  b.api.autoSizeAllColumns();
16412
16412
  },
16413
+ maintainColumnOrder: !0,
16414
+ localeText: {
16415
+ loadingError: "..."
16416
+ },
16413
16417
  rowModelType: "clientSide",
16414
16418
  maxBlocksInCache: 1e3,
16415
16419
  cacheBlockSize: 100,
@@ -16554,7 +16558,7 @@ const rI = { class: "ap-ag-data-table-container" }, iI = {
16554
16558
  }, null, 8, ["grid-options"]))
16555
16559
  ]));
16556
16560
  }
16557
- }), w3 = /* @__PURE__ */ Ju(sI, [["__scopeId", "data-v-e541f5d0"]]), aI = {
16561
+ }), w3 = /* @__PURE__ */ Ju(sI, [["__scopeId", "data-v-751fd5cf"]]), aI = {
16558
16562
  key: 1,
16559
16563
  class: "alert-error"
16560
16564
  }, oI = { key: 2 }, x3 = /* @__PURE__ */ ce({
package/dist/lib.umd.cjs CHANGED
@@ -44,4 +44,4 @@ __p += '`),Re&&(H+=`' +
44
44
  function print() { __p += __j.call(arguments, '') }
45
45
  `:`;
46
46
  `)+H+`return __p
47
- }`;var Ve=rh(function(){return Pe(_,se+"return "+H).apply(t,k)});if(Ve.source=H,Cc(Ve))throw Ve;return Ve}function a2(r){return Fe(r).toLowerCase()}function s2(r){return Fe(r).toUpperCase()}function l2(r,o,l){if(r=Fe(r),r&&(l||o===t))return ff(r);if(!r||!(o=Lt(o)))return r;var f=mn(r),m=mn(o),_=pf(f,m),k=hf(f,m)+1;return hr(f,_,k).join("")}function c2(r,o,l){if(r=Fe(r),r&&(l||o===t))return r.slice(0,gf(r)+1);if(!r||!(o=Lt(o)))return r;var f=mn(r),m=hf(f,mn(o))+1;return hr(f,0,m).join("")}function d2(r,o,l){if(r=Fe(r),r&&(l||o===t))return r.replace(Cl,"");if(!r||!(o=Lt(o)))return r;var f=mn(r),m=pf(f,mn(o));return hr(f,m).join("")}function u2(r,o){var l=W,f=F;if(Ye(o)){var m="separator"in o?o.separator:m;l="length"in o?Ee(o.length):l,f="omission"in o?Lt(o.omission):f}r=Fe(r);var _=r.length;if(ui(r)){var k=mn(r);_=k.length}if(l>=_)return r;var v=l-fi(f);if(v<1)return f;var V=k?hr(k,0,v).join(""):r.slice(0,v);if(m===t)return V+f;if(k&&(v+=V.length-v),Ec(m)){if(r.slice(v).search(m)){var z,Z=V;for(m.global||(m=zl(m.source,Fe(Ru.exec(m))+"g")),m.lastIndex=0;z=m.exec(Z);)var H=z.index;V=V.slice(0,H===t?v:H)}}else if(r.indexOf(Lt(m),v)!=v){var X=V.lastIndexOf(m);X>-1&&(V=V.slice(0,X))}return V+f}function f2(r){return r=Fe(r),r&&vC.test(r)?r.replace(Nu,zE):r}var p2=wi(function(r,o,l){return r+(l?" ":"")+o.toUpperCase()}),Vc=ip("toUpperCase");function nh(r,o,l){return r=Fe(r),o=l?t:o,o===t?ME(r)?jE(r):TE(r):r.match(o)||[]}var rh=Be(function(r,o){try{return Mt(r,t,o)}catch(l){return Cc(l)?l:new be(l)}}),h2=Ln(function(r,o){return jt(o,function(l){l=Tn(l),Mn(r,l,xc(r[l],r))}),r});function m2(r){var o=r==null?0:r.length,l=ue();return r=o?He(r,function(f){if(typeof f[1]!="function")throw new Wt(d);return[l(f[0]),f[1]]}):[],Be(function(f){for(var m=-1;++m<o;){var _=r[m];if(Mt(_[0],this,f))return Mt(_[1],this,f)}})}function g2(r){return zS(qt(r,x))}function Bc(r){return function(){return r}}function y2(r,o){return r==null||r!==r?o:r}var _2=ap(),w2=ap(!0);function Bt(r){return r}function Nc(r){return Mf(typeof r=="function"?r:qt(r,x))}function b2(r){return Lf(qt(r,x))}function k2(r,o){return Ff(r,qt(o,x))}var x2=Be(function(r,o){return function(l){return Vo(l,r,o)}}),v2=Be(function(r,o){return function(l){return Vo(r,l,o)}});function Oc(r,o,l){var f=ct(o),m=za(o,f);l==null&&!(Ye(o)&&(m.length||!f.length))&&(l=o,o=r,r=this,m=za(o,ct(o)));var _=!(Ye(l)&&"chain"in l)||!!l.chain,k=$n(r);return jt(m,function(v){var V=o[v];r[v]=V,k&&(r.prototype[v]=function(){var z=this.__chain__;if(_||z){var Z=r(this.__wrapped__),H=Z.__actions__=St(this.__actions__);return H.push({func:V,args:arguments,thisArg:r}),Z.__chain__=z,Z}return V.apply(r,lr([this.value()],arguments))})}),r}function C2(){return dt._===this&&(dt._=YE),this}function Ac(){}function E2(r){return r=Ee(r),Be(function(o){return $f(o,r)})}var S2=cc(He),T2=cc(sf),V2=cc(Dl);function ih(r){return gc(r)?Il(Tn(r)):iT(r)}function B2(r){return function(o){return r==null?t:Lr(r,o)}}var N2=lp(),O2=lp(!0);function Rc(){return[]}function Dc(){return!1}function A2(){return{}}function R2(){return""}function D2(){return!0}function I2(r,o){if(r=Ee(r),r<1||r>Ne)return[];var l=Et,f=gt(r,Et);o=ue(o),r-=Et;for(var m=Ll(f,o);++l<r;)o(l);return m}function M2(r){return ke(r)?He(r,Tn):Ft(r)?[r]:St(Cp(Fe(r)))}function P2(r){var o=++GE;return Fe(r)+o}var L2=qa(function(r,o){return r+o},0),F2=dc("ceil"),$2=qa(function(r,o){return r/o},1),z2=dc("floor");function Z2(r){return r&&r.length?$a(r,Bt,Kl):t}function U2(r,o){return r&&r.length?$a(r,ue(o,2),Kl):t}function j2(r){return df(r,Bt)}function W2(r,o){return df(r,ue(o,2))}function H2(r){return r&&r.length?$a(r,Bt,Ql):t}function q2(r,o){return r&&r.length?$a(r,ue(o,2),Ql):t}var G2=qa(function(r,o){return r*o},1),K2=dc("round"),Y2=qa(function(r,o){return r-o},0);function J2(r){return r&&r.length?Pl(r,Bt):0}function X2(r,o){return r&&r.length?Pl(r,ue(o,2)):0}return y.after=bB,y.ary=Ip,y.assign=sN,y.assignIn=Kp,y.assignInWith=as,y.assignWith=lN,y.at=cN,y.before=Mp,y.bind=xc,y.bindAll=h2,y.bindKey=Pp,y.castArray=AB,y.chain=Ap,y.chunk=zT,y.compact=ZT,y.concat=UT,y.cond=m2,y.conforms=g2,y.constant=Bc,y.countBy=JV,y.create=dN,y.curry=Lp,y.curryRight=Fp,y.debounce=$p,y.defaults=uN,y.defaultsDeep=fN,y.defer=kB,y.delay=xB,y.difference=jT,y.differenceBy=WT,y.differenceWith=HT,y.drop=qT,y.dropRight=GT,y.dropRightWhile=KT,y.dropWhile=YT,y.fill=JT,y.filter=QV,y.flatMap=nB,y.flatMapDeep=rB,y.flatMapDepth=iB,y.flatten=Vp,y.flattenDeep=XT,y.flattenDepth=QT,y.flip=vB,y.flow=_2,y.flowRight=w2,y.fromPairs=eV,y.functions=wN,y.functionsIn=bN,y.groupBy=oB,y.initial=nV,y.intersection=rV,y.intersectionBy=iV,y.intersectionWith=oV,y.invert=xN,y.invertBy=vN,y.invokeMap=sB,y.iteratee=Nc,y.keyBy=lB,y.keys=ct,y.keysIn=Vt,y.map=es,y.mapKeys=EN,y.mapValues=SN,y.matches=b2,y.matchesProperty=k2,y.memoize=ns,y.merge=TN,y.mergeWith=Yp,y.method=x2,y.methodOf=v2,y.mixin=Oc,y.negate=rs,y.nthArg=E2,y.omit=VN,y.omitBy=BN,y.once=CB,y.orderBy=cB,y.over=S2,y.overArgs=EB,y.overEvery=T2,y.overSome=V2,y.partial=vc,y.partialRight=zp,y.partition=dB,y.pick=NN,y.pickBy=Jp,y.property=ih,y.propertyOf=B2,y.pull=cV,y.pullAll=Np,y.pullAllBy=dV,y.pullAllWith=uV,y.pullAt=fV,y.range=N2,y.rangeRight=O2,y.rearg=SB,y.reject=pB,y.remove=pV,y.rest=TB,y.reverse=bc,y.sampleSize=mB,y.set=AN,y.setWith=RN,y.shuffle=gB,y.slice=hV,y.sortBy=wB,y.sortedUniq=kV,y.sortedUniqBy=xV,y.split=n2,y.spread=VB,y.tail=vV,y.take=CV,y.takeRight=EV,y.takeRightWhile=SV,y.takeWhile=TV,y.tap=ZV,y.throttle=BB,y.thru=Qa,y.toArray=Hp,y.toPairs=Xp,y.toPairsIn=Qp,y.toPath=M2,y.toPlainObject=Gp,y.transform=DN,y.unary=NB,y.union=VV,y.unionBy=BV,y.unionWith=NV,y.uniq=OV,y.uniqBy=AV,y.uniqWith=RV,y.unset=IN,y.unzip=kc,y.unzipWith=Op,y.update=MN,y.updateWith=PN,y.values=xi,y.valuesIn=LN,y.without=DV,y.words=nh,y.wrap=OB,y.xor=IV,y.xorBy=MV,y.xorWith=PV,y.zip=LV,y.zipObject=FV,y.zipObjectDeep=$V,y.zipWith=zV,y.entries=Xp,y.entriesIn=Qp,y.extend=Kp,y.extendWith=as,Oc(y,y),y.add=L2,y.attempt=rh,y.camelCase=ZN,y.capitalize=eh,y.ceil=F2,y.clamp=FN,y.clone=RB,y.cloneDeep=IB,y.cloneDeepWith=MB,y.cloneWith=DB,y.conformsTo=PB,y.deburr=th,y.defaultTo=y2,y.divide=$2,y.endsWith=UN,y.eq=yn,y.escape=jN,y.escapeRegExp=WN,y.every=XV,y.find=eB,y.findIndex=Sp,y.findKey=pN,y.findLast=tB,y.findLastIndex=Tp,y.findLastKey=hN,y.floor=z2,y.forEach=Rp,y.forEachRight=Dp,y.forIn=mN,y.forInRight=gN,y.forOwn=yN,y.forOwnRight=_N,y.get=Sc,y.gt=LB,y.gte=FB,y.has=kN,y.hasIn=Tc,y.head=Bp,y.identity=Bt,y.includes=aB,y.indexOf=tV,y.inRange=$N,y.invoke=CN,y.isArguments=zr,y.isArray=ke,y.isArrayBuffer=$B,y.isArrayLike=Tt,y.isArrayLikeObject=et,y.isBoolean=zB,y.isBuffer=mr,y.isDate=ZB,y.isElement=UB,y.isEmpty=jB,y.isEqual=WB,y.isEqualWith=HB,y.isError=Cc,y.isFinite=qB,y.isFunction=$n,y.isInteger=Zp,y.isLength=is,y.isMap=Up,y.isMatch=GB,y.isMatchWith=KB,y.isNaN=YB,y.isNative=JB,y.isNil=QB,y.isNull=XB,y.isNumber=jp,y.isObject=Ye,y.isObjectLike=Xe,y.isPlainObject=Do,y.isRegExp=Ec,y.isSafeInteger=eN,y.isSet=Wp,y.isString=os,y.isSymbol=Ft,y.isTypedArray=ki,y.isUndefined=tN,y.isWeakMap=nN,y.isWeakSet=rN,y.join=aV,y.kebabCase=HN,y.last=Kt,y.lastIndexOf=sV,y.lowerCase=qN,y.lowerFirst=GN,y.lt=iN,y.lte=oN,y.max=Z2,y.maxBy=U2,y.mean=j2,y.meanBy=W2,y.min=H2,y.minBy=q2,y.stubArray=Rc,y.stubFalse=Dc,y.stubObject=A2,y.stubString=R2,y.stubTrue=D2,y.multiply=G2,y.nth=lV,y.noConflict=C2,y.noop=Ac,y.now=ts,y.pad=KN,y.padEnd=YN,y.padStart=JN,y.parseInt=XN,y.random=zN,y.reduce=uB,y.reduceRight=fB,y.repeat=QN,y.replace=e2,y.result=ON,y.round=K2,y.runInContext=E,y.sample=hB,y.size=yB,y.snakeCase=t2,y.some=_B,y.sortedIndex=mV,y.sortedIndexBy=gV,y.sortedIndexOf=yV,y.sortedLastIndex=_V,y.sortedLastIndexBy=wV,y.sortedLastIndexOf=bV,y.startCase=r2,y.startsWith=i2,y.subtract=Y2,y.sum=J2,y.sumBy=X2,y.template=o2,y.times=I2,y.toFinite=zn,y.toInteger=Ee,y.toLength=qp,y.toLower=a2,y.toNumber=Yt,y.toSafeInteger=aN,y.toString=Fe,y.toUpper=s2,y.trim=l2,y.trimEnd=c2,y.trimStart=d2,y.truncate=u2,y.unescape=f2,y.uniqueId=P2,y.upperCase=p2,y.upperFirst=Vc,y.each=Rp,y.eachRight=Dp,y.first=Bp,Oc(y,function(){var r={};return En(y,function(o,l){$e.call(y.prototype,l)||(r[l]=o)}),r}(),{chain:!1}),y.VERSION=a,jt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),jt(["drop","take"],function(r,o){Ae.prototype[r]=function(l){l=l===t?1:ot(Ee(l),0);var f=this.__filtered__&&!o?new Ae(this):this.clone();return f.__filtered__?f.__takeCount__=gt(l,f.__takeCount__):f.__views__.push({size:gt(l,Et),type:r+(f.__dir__<0?"Right":"")}),f},Ae.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),jt(["filter","map","takeWhile"],function(r,o){var l=o+1,f=l==de||l==J;Ae.prototype[r]=function(m){var _=this.clone();return _.__iteratees__.push({iteratee:ue(m,3),type:l}),_.__filtered__=_.__filtered__||f,_}}),jt(["head","last"],function(r,o){var l="take"+(o?"Right":"");Ae.prototype[r]=function(){return this[l](1).value()[0]}}),jt(["initial","tail"],function(r,o){var l="drop"+(o?"":"Right");Ae.prototype[r]=function(){return this.__filtered__?new Ae(this):this[l](1)}}),Ae.prototype.compact=function(){return this.filter(Bt)},Ae.prototype.find=function(r){return this.filter(r).head()},Ae.prototype.findLast=function(r){return this.reverse().find(r)},Ae.prototype.invokeMap=Be(function(r,o){return typeof r=="function"?new Ae(this):this.map(function(l){return Vo(l,r,o)})}),Ae.prototype.reject=function(r){return this.filter(rs(ue(r)))},Ae.prototype.slice=function(r,o){r=Ee(r);var l=this;return l.__filtered__&&(r>0||o<0)?new Ae(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),o!==t&&(o=Ee(o),l=o<0?l.dropRight(-o):l.take(o-r)),l)},Ae.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ae.prototype.toArray=function(){return this.take(Et)},En(Ae.prototype,function(r,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),f=/^(?:head|last)$/.test(o),m=y[f?"take"+(o=="last"?"Right":""):o],_=f||/^find/.test(o);m&&(y.prototype[o]=function(){var k=this.__wrapped__,v=f?[1]:arguments,V=k instanceof Ae,z=v[0],Z=V||ke(k),H=function(Oe){var Re=m.apply(y,lr([Oe],v));return f&&X?Re[0]:Re};Z&&l&&typeof z=="function"&&z.length!=1&&(V=Z=!1);var X=this.__chain__,se=!!this.__actions__.length,pe=_&&!X,Ve=V&&!se;if(!_&&Z){k=Ve?k:new Ae(this);var he=r.apply(k,v);return he.__actions__.push({func:Qa,args:[H],thisArg:t}),new Ht(he,X)}return pe&&Ve?r.apply(this,v):(he=this.thru(H),pe?f?he.value()[0]:he.value():he)})}),jt(["pop","push","shift","sort","splice","unshift"],function(r){var o=Ea[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);y.prototype[r]=function(){var m=arguments;if(f&&!this.__chain__){var _=this.value();return o.apply(ke(_)?_:[],m)}return this[l](function(k){return o.apply(ke(k)?k:[],m)})}}),En(Ae.prototype,function(r,o){var l=y[o];if(l){var f=l.name+"";$e.call(gi,f)||(gi[f]=[]),gi[f].push({name:o,func:l})}}),gi[Ha(t,b).name]=[{name:"wrapper",func:t}],Ae.prototype.clone=fS,Ae.prototype.reverse=pS,Ae.prototype.value=hS,y.prototype.at=UV,y.prototype.chain=jV,y.prototype.commit=WV,y.prototype.next=HV,y.prototype.plant=GV,y.prototype.reverse=KV,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=YV,y.prototype.first=y.prototype.head,ko&&(y.prototype[ko]=qV),y},pi=WE();Rr?((Rr.exports=pi)._=pi,Nl._=pi):dt._=pi}).call(vi)}(ua,ua.exports);var Je=ua.exports;const Iv={class:"grid-overlay-container"},hu=n.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",Iv,[e.params.notReady?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),t[1]||(t[1]=n.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t[2]||(t[2]=n.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),t[3]||(t[3]=n.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),Mv={},Pv={class:"grid-overlay-container"};function Lv(i,e){return n.openBlock(),n.createElementBlock("div",Pv,e[0]||(e[0]=[n.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),n.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const mu=ll(Mv,[["render",Lv]]);async function Fv(i,e){throw Error("not implemented")}function $v(i){return i.axesSpec.filter(e=>{var t;return((t=e.annotations)==null?void 0:t["pl7.app/axisNature"])==="heterogeneous"})}function zv(i,e){const t=[];for(const a of e)if(i[a].type==="column"){const s=$v(i[a].spec);for(const c of s){if(c.type!=="String"){console.warn("heterogeneous axis with string type expected, got",c,"skipping");continue}const d=od(c),u=i.findIndex(p=>Je.isEqual(p.id,d));if(u===-1)throw console.error("axis not found",a,d,i),Error("axis not found");t.push({columnIdx:a,axisIdx:u})}}return t}const gu=(i,e)=>(i+e).toString();function Zv(i,e,t,a,s,c){if(i.length>1)throw Error("hColumns.length > 1 is not supported");const d=i[0];let u=-1,p=-1;for(let x=0;x<c.length;++x)c[x]===d.axisIdx&&(u=x),c[x]===d.columnIdx&&(p=x);const h=(()=>{const T=a[u].data.filter(B=>B!==null);return Array.from(new Set(T))})();h.sort(),p>u?(t.splice(p,1),t.splice(u,1)):(t.splice(u,1),t.splice(p,1));const g=Uv(s,a,u,p,h,e.rows);for(let x=0;x<h.length;++x){const T=h[x],B=T+"@"+x;t.push({colId:B,field:gu(a.length,x),headerName:T,valueFormatter:yu})}return{rowModelType:"clientSide",columnDefs:t,rowData:g}}function Uv(i,e,t,a,s,c){const d=new Map;let u=0;for(let h=0;h<c;h++){const g={};for(let C=0;C<e.length;++C){if(C===t||C===a)continue;const A=i[C].toString();g[A]=e[C].data[h]}let x;const T=Ci(Object.values(g))??"";d.has(T)?x=d.get(T):(d.set(T,g),x=g,x.id=u.toString(),u++);const B=s.indexOf(e[t].data[h]);if(B===-1)throw Error("index not found");const O=gu(e.length,B);x[O]=e[a].data[h]}return Array.from(d.values())}function jv(i){return Ci({type:i.type,id:i.id})}function Wv(i){return JSON.parse(i)}const yu=i=>i?i.value===void 0?"NULL":i.value===null?"NA":i.value.toString():"ERROR";function Hv(i,e){var t,a;return{colId:jv(e),field:i.toString(),headerName:((a=(t=e.spec.annotations)==null?void 0:t["pl7.app/label"])==null?void 0:a.trim())??"Unlabeled "+e.type+" "+i.toString(),lockPosition:e.type==="axis",valueFormatter:yu,cellDataType:(s=>{switch(s){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${s}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function _u(i,e){switch(e){case"Int":return i;case"Long":return typeof i=="bigint"?Number(i):i;case"Float":return i;case"Double":return i;case"String":return i;case"Bytes":return Buffer.from(i).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function wu(i){const e=[];return Ho(i,t=>(e.push(t),t)),e}async function qv(i,e,t){return t.length?(await i.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Je.uniqWith(t.map(s=>Es(s.spec.axesSpec).map(Je.cloneDeep)).flat(),Je.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function Gv(i,e,t){const a=wu(t),c=(await qv(i,e,a)).filter(d=>!Je.find(a,u=>d.columnId===u.columnId));return c.length===0?t:{type:"outer",primary:t,secondary:c.map(d=>({type:"column",column:d}))}}async function Kv(i,e,t,a){const s=t.filter(g=>g.type!=="Bytes"),c=wu(a),d=s.map(g=>[]),u=s.map(g=>null);for(let g=0;g<c.length;++g){const x=Es(c[g].spec.axesSpec);for(let T=0;T<x.length;++T){const B=Je.findIndex(s,O=>Je.isEqual(O,x[T]));B===-1||u[B]||(x.length===1&&c[g].spec.name==="pl7.app/label"?(d[B]=[[g,T]],u[B]=c[g].columnId):d[B].push([g,T]))}}for(let g=s.length-1;g>=0;--g)d[g].length||(u.splice(g,1),d.splice(g,1),s.splice(g,1));const p=100,h=s.map(g=>new Set);e:for(let g=s.length-1;g>=0;--g){for(const[x,T]of d[g]){const B=await i.getUniqueValues(e,{columnId:c[x].columnId,...!u[g]&&{axis:Je.cloneDeep(s[g])},filters:[],limit:p});if(B.overflow){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}const O=B.values.type;for(const C of B.values.data)if(!(id(C,O)||C===null)&&(h[g].add(_u(C,O)),h[g].size===p)){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}}if(!h[g].size){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}}return s.map((g,x)=>{const T=[...h[x]].map(O=>({value:O,text:O.toString()})),B=T[0].value;return{axis:Je.cloneDeep(g),...u[x]&&{column:u[x]},options:T,defaultValue:B}})}function Yv(i,e,t){const a=e.length,s=[];for(let c=0;c<e[0].data.length;++c){const d={};for(let u=0;u<a;++u){const p=i[u].toString(),h=e[u].data[c],g=e[u].type;Vm(e[u].absent,c)?d[p]=void 0:id(h,g)||h===null?d[p]=null:d[p]=_u(h,g)}d.id=t++,s.push(d)}return s}const Jv=i=>i.type==="column"&&i.spec.axesSpec.length===1&&i.spec.name==="pl7.app/label";async function Xv(i,e,t){const a=await i.getSpec(e),s=[...a.keys()].filter(T=>!Je.find(t,B=>Je.isEqual(B.axis,a[T].id)||Je.isEqual(B.column,a[T].id))),c=Je.cloneDeep(s),d=zv(a,s);for(let T=s.length-1;T>=0;--T){const B=s[T];if(!Jv(a[B]))continue;const O=Es(a[B].spec.axesSpec)[0],C=Je.findIndex(s,A=>Je.isEqual(a[A].id,O));if(C!==-1){s[C]=B;for(const A of d)A.axisIdx===B&&(A.axisIdx=C);s.splice(T,1),c.splice(T,1)}}const u=await i.getShape(e),p=u.rows,h=c.map(T=>Hv(T,a[T]));if(d.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",d.length," transposition will not be applied."),d.length===1)return Zv(d,u,h,await i.getData(e,s),c,s);let g;return{rowModelType:"serverSide",columnDefs:h,serverSideDatasource:{getRows:async T=>{try{if(p==0){T.success({rowData:[],rowCount:p}),T.api.showNoRowsOverlay(),T.api.setGridOption("loading",!1);return}if(g&&!Je.isEqual(g.request.sortModel,T.request.sortModel)){g=void 0,T.fail(),T.api.setGridOption("loading",!0);return}g=T;let B=0,O=[];if(p>0&&T.request.startRow!==void 0&&T.request.endRow!==void 0&&(B=Math.min(p,T.request.endRow)-T.request.startRow,B>0)){const C=await i.getData(e,s,{offset:T.request.startRow,length:B});O=Yv(c,C,T.request.startRow)}T.success({rowData:O,rowCount:p}),T.api.autoSizeAllColumns(),T.api.setGridOption("loading",!1)}catch{T.fail(),T.api.setGridOption("loading",!0)}}}}}const Qv={class:"ap-ag-data-table-container"},eC={key:0,class:"ap-ag-data-table-sheets"},tC=ll(n.defineComponent({__name:"PlAgDataTable",props:n.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){wr.ModuleRegistry.registerModules([Mo.ClientSideRowModelModule,zc.ClipboardModule,$c.ServerSideRowModelModule,Zc.RangeSelectionModule]);const e=n.useModel(i,"modelValue"),t=i,{settings:a}=n.toRefs(t);n.watch(()=>a.value,async(b,D)=>{if(b.sourceType!=="pframe"||!b.pFrame||!b.join||D&&D.sourceType==="pframe"&&Je.isEqual(b.pFrame,D.pFrame)&&Je.isEqual(b.join,D.join))return;const $=window.platforma;if(!$)throw Error("platforma not set");const j=$.pFrameDriver;if(!j)throw Error("platforma.pFrameDriver not set");const P=await Gv(j,b.pFrame,b.join),U=e.value;U.pTableParams||(U.pTableParams={sorting:[],filters:[]}),U.pTableParams.join=P,e.value=U});const s=bu(()=>a.value.sourceType,async b=>{var $;const D=a.value.sourceType;switch(D){case"pframe":{const j=window.platforma;if(!j)throw Error("platforma not set");const P=j.pFrameDriver;if(!P)throw Error("platforma.pFrameDriver not set");if(!a.value.pFrame)return[];const U=a.value.pFrame,N=($=e.value.pTableParams)==null?void 0:$.join;return N?await Kv(P,U,a.value.sheetAxes,N):[]}case"ptable":return a.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${D}`)}});function c(b){if(!(a.value.sourceType!=="ptable"&&a.value.sourceType!=="pframe"))return(b==null?void 0:b.sortModel.map(D=>({column:Wv(D.colId),ascending:D.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const d=n.computed({get:()=>{const b=e.value;return{columnOrder:b.gridState.columnOrder,sort:b.gridState.sort}},set:b=>{const D=e.value,$=x.value.rowModelType==="clientSide"?void 0:c(b.sort);D.gridState.columnOrder=b.columnOrder,D.gridState.sort=b.sort,(a.value.sourceType==="ptable"||a.value.sourceType==="pframe")&&(D.pTableParams||(D.pTableParams={sorting:[],filters:[]}),D.pTableParams.sorting=$),e.value=D}}),u=b=>Ci(b);function p(b){var D;if(!(a.value.sourceType!=="ptable"&&a.value.sourceType!=="pframe"))return((D=s.value)==null?void 0:D.map($=>({type:"bySingleColumn",column:$.column?{type:"column",id:$.column}:{type:"axis",id:$.axis},predicate:{operator:"Equal",reference:b[u($.axis)]}})))??[]}const h=n.computed({get:()=>e.value.gridState.sheets??{},set:b=>{const D=p(b),$=e.value;$.gridState.sheets=b,(a.value.sourceType==="ptable"||a.value.sourceType==="pframe")&&($.pTableParams||($.pTableParams={sorting:[],filters:[]}),$.pTableParams.filters=D),e.value=$}});n.watch(()=>[a.value,s.value],(b,D)=>{const[$,j]=b;if(!j)return;if(D){const[U,N]=D;if(($.sourceType==="ptable"||$.sourceType==="pframe")&&$.sourceType===(U==null?void 0:U.sourceType)&&Je.isEqual(j,N))return}if($.sourceType!=="ptable"&&$.sourceType!=="pframe"){h.value={};return}const P=h.value;for(const U of j){const N=u(U.axis);P[N]||(P[N]=U.defaultValue??U.options[0].value)}h.value=P},{immediate:!0});const g=n.shallowRef(),x=n.ref({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:d.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:b=>{b.api.autoSizeAllColumns()},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:b=>b.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:hu,noRowsOverlayComponent:mu}),T=b=>{const D=b.api;g.value=new Proxy(D,{get($,j,P){switch(j){case"setGridOption":return(U,N)=>{const S=x.value;S[U]=N,x.value=S,D.updateGridOptions(S)};case"updateGridOptions":return U=>{x.value={...x.value,...U},D.updateGridOptions(U)};default:return Reflect.get($,j,P)}}})},B=b=>{d.value={columnOrder:b.state.columnOrder,sort:b.state.sort},x.value.initialState=d.value},O=()=>{const b=g.value.getState();d.value={columnOrder:b.columnOrder,sort:b.sort},x.value.initialState=d.value,g.value=void 0},C=n.ref(0);n.watch(()=>[g.value,d.value],(b,D)=>{if(Je.isEqual(b,D))return;const[$,j]=b;if(!$)return;const P=$.getState(),U={columnOrder:P.columnOrder,sort:P.sort};Je.isEqual(j,U)||(x.value.initialState=j,++C.value)}),n.watch(()=>x.value,(b,D)=>{D&&b.rowModelType!=D.rowModelType&&++C.value});const A=(b,D)=>{var j;const $=h.value;$[b]!==D&&($[b]=D,h.value=$,(j=g.value)==null||j.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))};return n.watch(()=>[g.value,a.value,s.value],async(b,D)=>{if(Je.isEqual(b,D))return;const[$,j,P]=b;if(!$)return;const U=window.platforma;if(!U)throw Error("platforma not set");const N=j.sourceType;switch(N){case"pframe":case"ptable":{const S=U.pFrameDriver;if(!S)throw Error("platforma.pFrameDriver not set");const M=j.pTable;if(!M||!P)return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const W=await Xv(S,M,P);return $.updateGridOptions({loading:W.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...W})}case"xsv":{const S=U.blobDriver;if(!S)throw Error("platforma.blobDriver not set");const M=j.xsvFile;if(!(M!=null&&M.ok)||!M.value)return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const W=await Fv(S,M.value);return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...W})}default:throw Error(`unsupported source type: ${N}`)}}),(b,D)=>(n.openBlock(),n.createElementBlock("div",Qv,[n.createVNode(n.Transition,{name:"ap-ag-data-table-sheets-transition"},{default:n.withCtx(()=>[n.unref(s).value&&n.unref(s).value.length>0?(n.openBlock(),n.createElementBlock("div",eC,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(s).value,($,j)=>(n.openBlock(),n.createBlock(n.unref(Kd),{key:j,"model-value":h.value[u($.axis)],options:$.options,"onUpdate:modelValue":P=>A(u($.axis),P)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):n.createCommentVNode("",!0)]),_:1}),(n.openBlock(),n.createBlock(n.unref(ph.AgGridVue),{class:"ap-ag-data-table-grid","grid-options":x.value,key:C.value,onGridReady:T,onStateUpdated:B,onGridPreDestroyed:O},null,8,["grid-options"]))]))}}),[["__scopeId","data-v-e541f5d0"]]),nC={key:1,class:"alert-error"},rC={key:2},iC=n.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(i){const e=i,t=n.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),a=n.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=n.computed(()=>t.value===void 0&&a.value===void 0);return(c,d)=>(n.openBlock(),n.createElementBlock("div",null,[t.value!==void 0?n.renderSlot(c.$slots,"default",n.normalizeProps(n.mergeProps({key:0},{value:t.value}))):n.createCommentVNode("",!0),a.value?(n.openBlock(),n.createElementBlock("div",nC,n.toDisplayString(a.value),1)):n.createCommentVNode("",!0),s.value?(n.openBlock(),n.createElementBlock("div",rC,"Unresolved")):n.createCommentVNode("",!0)]))}}),fa=new Map;function oC(i,e){const t=n.getCurrentScope()??n.effectScope(),a=t.run(()=>(n.onScopeDispose(()=>{fa.delete(i)}),n.reactive(e())));return a[Symbol.dispose]=()=>{t.stop()},a}function aC(i){const e=Symbol();return()=>(fa.has(e)||fa.set(e,oC(e,i)),fa.get(e))}function sC(i){return n.computed(()=>{try{return jc(i())}catch(e){return{errors:[String(e)],value:void 0}}})}function bu(i,e,t){const a=n.ref(0),s=n.reactive({loading:n.computed(()=>a.value>0),loadingRef:a,value:void 0,error:void 0}),c=gh(e);return n.watch(i,async d=>{s.error=void 0,a.value++,c(d).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{a.value--})},Object.assign({immediate:!0,deep:!0},t??{})),s}const ni=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ku=new Set,cl=typeof process=="object"&&process?process:{},xu=(i,e,t,a)=>{typeof cl.emitWarning=="function"?cl.emitWarning(i,e,t,a):console.error(`[${t}] ${e}: ${i}`)};let pa=globalThis.AbortController,vu=globalThis.AbortSignal;if(typeof pa>"u"){vu=class{constructor(){Le(this,"onabort");Le(this,"_onabort",[]);Le(this,"reason");Le(this,"aborted",!1)}addEventListener(a,s){this._onabort.push(s)}},pa=class{constructor(){Le(this,"signal",new vu);e()}abort(a){var s,c;if(!this.signal.aborted){this.signal.reason=a,this.signal.aborted=!0;for(const d of this.signal._onabort)d(a);(c=(s=this.signal).onabort)==null||c.call(s,a)}}};let i=((Eu=cl.env)==null?void 0:Eu.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{i&&(i=!1,xu("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const lC=i=>!ku.has(i),ir=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),Cu=i=>ir(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?ha:null:null;class ha extends Array{constructor(e){super(e),this.fill(0)}}const Vr=class Vr{constructor(e,t){Le(this,"heap");Le(this,"length");if(!w(Vr,ri))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=Cu(e);if(!t)return[];fe(Vr,ri,!0);const a=new Vr(e,t);return fe(Vr,ri,!1),a}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ri=new WeakMap,Me(Vr,ri,!1);let dl=Vr;const pl=class pl{constructor(e){Me(this,Y);Me(this,on);Me(this,At);Me(this,an);Me(this,sn);Me(this,ii);Me(this,oi);Le(this,"ttl");Le(this,"ttlResolution");Le(this,"ttlAutopurge");Le(this,"updateAgeOnGet");Le(this,"updateAgeOnHas");Le(this,"allowStale");Le(this,"noDisposeOnSet");Le(this,"noUpdateTTL");Le(this,"maxEntrySize");Le(this,"sizeCalculation");Le(this,"noDeleteOnFetchRejection");Le(this,"noDeleteOnStaleGet");Le(this,"allowStaleOnFetchAbort");Le(this,"allowStaleOnFetchRejection");Le(this,"ignoreFetchAbort");Me(this,rt);Me(this,ln);Me(this,nt);Me(this,Ue);Me(this,we);Me(this,bt);Me(this,Rt);Me(this,mt);Me(this,st);Me(this,cn);Me(this,lt);Me(this,dn);Me(this,un);Me(this,Dt);Me(this,fn);Me(this,or);Me(this,kt);Me(this,Br,()=>{});Me(this,An,()=>{});Me(this,uo,()=>{});Me(this,It,()=>!1);Me(this,Nr,e=>{});Me(this,ai,(e,t,a)=>{});Me(this,fo,(e,t,a,s)=>{if(a||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Le(this,Su,"LRUCache");const{max:t=0,ttl:a,ttlResolution:s=1,ttlAutopurge:c,updateAgeOnGet:d,updateAgeOnHas:u,allowStale:p,dispose:h,disposeAfter:g,noDisposeOnSet:x,noUpdateTTL:T,maxSize:B=0,maxEntrySize:O=0,sizeCalculation:C,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:j,allowStaleOnFetchAbort:P,ignoreFetchAbort:U}=e;if(t!==0&&!ir(t))throw new TypeError("max option must be a nonnegative integer");const N=t?Cu(t):Array;if(!N)throw new Error("invalid max value: "+t);if(fe(this,on,t),fe(this,At,B),this.maxEntrySize=O||w(this,At),this.sizeCalculation=C,this.sizeCalculation){if(!w(this,At)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(fe(this,oi,b),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(fe(this,ii,A),fe(this,or,!!A),fe(this,nt,new Map),fe(this,Ue,new Array(t).fill(void 0)),fe(this,we,new Array(t).fill(void 0)),fe(this,bt,new N(t)),fe(this,Rt,new N(t)),fe(this,mt,0),fe(this,st,0),fe(this,cn,dl.create(t)),fe(this,rt,0),fe(this,ln,0),typeof h=="function"&&fe(this,an,h),typeof g=="function"?(fe(this,sn,g),fe(this,lt,[])):(fe(this,sn,void 0),fe(this,lt,void 0)),fe(this,fn,!!w(this,an)),fe(this,kt,!!w(this,sn)),this.noDisposeOnSet=!!x,this.noUpdateTTL=!!T,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!j,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(w(this,At)!==0&&!ir(w(this,At)))throw new TypeError("maxSize must be a positive integer if specified");if(!ir(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ie(this,Y,sh).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!$,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!u,this.ttlResolution=ir(s)||s===0?s:1,this.ttlAutopurge=!!c,this.ttl=a||0,this.ttl){if(!ir(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ie(this,Y,Mc).call(this)}if(w(this,on)===0&&this.ttl===0&&w(this,At)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!w(this,on)&&!w(this,At)){const S="LRU_CACHE_UNBOUNDED";lC(S)&&(ku.add(S),xu("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,pl))}}static unsafeExposeInternals(e){return{starts:w(e,un),ttls:w(e,Dt),sizes:w(e,dn),keyMap:w(e,nt),keyList:w(e,Ue),valList:w(e,we),next:w(e,bt),prev:w(e,Rt),get head(){return w(e,mt)},get tail(){return w(e,st)},free:w(e,cn),isBackgroundFetch:t=>{var a;return ie(a=e,Y,We).call(a,t)},backgroundFetch:(t,a,s,c)=>{var d;return ie(d=e,Y,cs).call(d,t,a,s,c)},moveToTail:t=>{var a;return ie(a=e,Y,Io).call(a,t)},indexes:t=>{var a;return ie(a=e,Y,gr).call(a,t)},rindexes:t=>{var a;return ie(a=e,Y,yr).call(a,t)},isStale:t=>{var a;return w(a=e,It).call(a,t)}}}get max(){return w(this,on)}get maxSize(){return w(this,At)}get calculatedSize(){return w(this,ln)}get size(){return w(this,rt)}get fetchMethod(){return w(this,ii)}get memoMethod(){return w(this,oi)}get dispose(){return w(this,an)}get disposeAfter(){return w(this,sn)}getRemainingTTL(e){return w(this,nt).has(e)?1/0:0}*entries(){for(const e of ie(this,Y,gr).call(this))w(this,we)[e]!==void 0&&w(this,Ue)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield[w(this,Ue)[e],w(this,we)[e]])}*rentries(){for(const e of ie(this,Y,yr).call(this))w(this,we)[e]!==void 0&&w(this,Ue)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield[w(this,Ue)[e],w(this,we)[e]])}*keys(){for(const e of ie(this,Y,gr).call(this)){const t=w(this,Ue)[e];t!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield t)}}*rkeys(){for(const e of ie(this,Y,yr).call(this)){const t=w(this,Ue)[e];t!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield t)}}*values(){for(const e of ie(this,Y,gr).call(this))w(this,we)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield w(this,we)[e])}*rvalues(){for(const e of ie(this,Y,yr).call(this))w(this,we)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield w(this,we)[e])}[(Tu=Symbol.iterator,Su=Symbol.toStringTag,Tu)](){return this.entries()}find(e,t={}){for(const a of ie(this,Y,gr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;if(c!==void 0&&e(c,w(this,Ue)[a],this))return this.get(w(this,Ue)[a],t)}}forEach(e,t=this){for(const a of ie(this,Y,gr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(t,c,w(this,Ue)[a],this)}}rforEach(e,t=this){for(const a of ie(this,Y,yr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(t,c,w(this,Ue)[a],this)}}purgeStale(){let e=!1;for(const t of ie(this,Y,yr).call(this,{allowStale:!0}))w(this,It).call(this,t)&&(ie(this,Y,_r).call(this,w(this,Ue)[t],"expire"),e=!0);return e}info(e){const t=w(this,nt).get(e);if(t===void 0)return;const a=w(this,we)[t],s=ie(this,Y,We).call(this,a)?a.__staleWhileFetching:a;if(s===void 0)return;const c={value:s};if(w(this,Dt)&&w(this,un)){const d=w(this,Dt)[t],u=w(this,un)[t];if(d&&u){const p=d-(ni.now()-u);c.ttl=p,c.start=Date.now()}}return w(this,dn)&&(c.size=w(this,dn)[t]),c}dump(){const e=[];for(const t of ie(this,Y,gr).call(this,{allowStale:!0})){const a=w(this,Ue)[t],s=w(this,we)[t],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;if(c===void 0||a===void 0)continue;const d={value:c};if(w(this,Dt)&&w(this,un)){d.ttl=w(this,Dt)[t];const u=ni.now()-w(this,un)[t];d.start=Math.floor(Date.now()-u)}w(this,dn)&&(d.size=w(this,dn)[t]),e.unshift([a,d])}return e}load(e){this.clear();for(const[t,a]of e){if(a.start){const s=Date.now()-a.start;a.start=ni.now()-s}this.set(t,a.value,a)}}set(e,t,a={}){var T,B,O,C,A;if(t===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:c,noDisposeOnSet:d=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=a;let{noUpdateTTL:h=this.noUpdateTTL}=a;const g=w(this,fo).call(this,e,t,a.size||0,u);if(this.maxEntrySize&&g>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ie(this,Y,_r).call(this,e,"set"),this;let x=w(this,rt)===0?void 0:w(this,nt).get(e);if(x===void 0)x=w(this,rt)===0?w(this,st):w(this,cn).length!==0?w(this,cn).pop():w(this,rt)===w(this,on)?ie(this,Y,ls).call(this,!1):w(this,rt),w(this,Ue)[x]=e,w(this,we)[x]=t,w(this,nt).set(e,x),w(this,bt)[w(this,st)]=x,w(this,Rt)[x]=w(this,st),fe(this,st,x),ss(this,rt)._++,w(this,ai).call(this,x,g,p),p&&(p.set="add"),h=!1;else{ie(this,Y,Io).call(this,x);const b=w(this,we)[x];if(t!==b){if(w(this,or)&&ie(this,Y,We).call(this,b)){b.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:D}=b;D!==void 0&&!d&&(w(this,fn)&&((T=w(this,an))==null||T.call(this,D,e,"set")),w(this,kt)&&((B=w(this,lt))==null||B.push([D,e,"set"])))}else d||(w(this,fn)&&((O=w(this,an))==null||O.call(this,b,e,"set")),w(this,kt)&&((C=w(this,lt))==null||C.push([b,e,"set"])));if(w(this,Nr).call(this,x),w(this,ai).call(this,x,g,p),w(this,we)[x]=t,p){p.set="replace";const D=b&&ie(this,Y,We).call(this,b)?b.__staleWhileFetching:b;D!==void 0&&(p.oldValue=D)}}else p&&(p.set="update")}if(s!==0&&!w(this,Dt)&&ie(this,Y,Mc).call(this),w(this,Dt)&&(h||w(this,uo).call(this,x,s,c),p&&w(this,An).call(this,p,x)),!d&&w(this,kt)&&w(this,lt)){const b=w(this,lt);let D;for(;D=b==null?void 0:b.shift();)(A=w(this,sn))==null||A.call(this,...D)}return this}pop(){var e;try{for(;w(this,rt);){const t=w(this,we)[w(this,mt)];if(ie(this,Y,ls).call(this,!0),ie(this,Y,We).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(w(this,kt)&&w(this,lt)){const t=w(this,lt);let a;for(;a=t==null?void 0:t.shift();)(e=w(this,sn))==null||e.call(this,...a)}}}has(e,t={}){const{updateAgeOnHas:a=this.updateAgeOnHas,status:s}=t,c=w(this,nt).get(e);if(c!==void 0){const d=w(this,we)[c];if(ie(this,Y,We).call(this,d)&&d.__staleWhileFetching===void 0)return!1;if(w(this,It).call(this,c))s&&(s.has="stale",w(this,An).call(this,s,c));else return a&&w(this,Br).call(this,c),s&&(s.has="hit",w(this,An).call(this,s,c)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){const{allowStale:a=this.allowStale}=t,s=w(this,nt).get(e);if(s===void 0||!a&&w(this,It).call(this,s))return;const c=w(this,we)[s];return ie(this,Y,We).call(this,c)?c.__staleWhileFetching:c}async fetch(e,t={}){const{allowStale:a=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,ttl:d=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL,noDeleteOnFetchRejection:x=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:T=this.allowStaleOnFetchRejection,ignoreFetchAbort:B=this.ignoreFetchAbort,allowStaleOnFetchAbort:O=this.allowStaleOnFetchAbort,context:C,forceRefresh:A=!1,status:b,signal:D}=t;if(!w(this,or))return b&&(b.fetch="get"),this.get(e,{allowStale:a,updateAgeOnGet:s,noDeleteOnStaleGet:c,status:b});const $={allowStale:a,updateAgeOnGet:s,noDeleteOnStaleGet:c,ttl:d,noDisposeOnSet:u,size:p,sizeCalculation:h,noUpdateTTL:g,noDeleteOnFetchRejection:x,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:O,ignoreFetchAbort:B,status:b,signal:D};let j=w(this,nt).get(e);if(j===void 0){b&&(b.fetch="miss");const P=ie(this,Y,cs).call(this,e,j,$,C);return P.__returned=P}else{const P=w(this,we)[j];if(ie(this,Y,We).call(this,P)){const W=a&&P.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",W&&(b.returnedStale=!0)),W?P.__staleWhileFetching:P.__returned=P}const U=w(this,It).call(this,j);if(!A&&!U)return b&&(b.fetch="hit"),ie(this,Y,Io).call(this,j),s&&w(this,Br).call(this,j),b&&w(this,An).call(this,b,j),P;const N=ie(this,Y,cs).call(this,e,j,$,C),M=N.__staleWhileFetching!==void 0&&a;return b&&(b.fetch=U?"stale":"refresh",M&&U&&(b.returnedStale=!0)),M?N.__staleWhileFetching:N.__returned=N}}async forceFetch(e,t={}){const a=await this.fetch(e,t);if(a===void 0)throw new Error("fetch() returned undefined");return a}memo(e,t={}){const a=w(this,oi);if(!a)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:c,...d}=t,u=this.get(e,d);if(!c&&u!==void 0)return u;const p=a(e,u,{options:d,context:s});return this.set(e,p,d),p}get(e,t={}){const{allowStale:a=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,status:d}=t,u=w(this,nt).get(e);if(u!==void 0){const p=w(this,we)[u],h=ie(this,Y,We).call(this,p);return d&&w(this,An).call(this,d,u),w(this,It).call(this,u)?(d&&(d.get="stale"),h?(d&&a&&p.__staleWhileFetching!==void 0&&(d.returnedStale=!0),a?p.__staleWhileFetching:void 0):(c||ie(this,Y,_r).call(this,e,"expire"),d&&a&&(d.returnedStale=!0),a?p:void 0)):(d&&(d.get="hit"),h?p.__staleWhileFetching:(ie(this,Y,Io).call(this,u),s&&w(this,Br).call(this,u),p))}else d&&(d.get="miss")}delete(e){return ie(this,Y,_r).call(this,e,"delete")}clear(){return ie(this,Y,Fc).call(this,"delete")}};on=new WeakMap,At=new WeakMap,an=new WeakMap,sn=new WeakMap,ii=new WeakMap,oi=new WeakMap,rt=new WeakMap,ln=new WeakMap,nt=new WeakMap,Ue=new WeakMap,we=new WeakMap,bt=new WeakMap,Rt=new WeakMap,mt=new WeakMap,st=new WeakMap,cn=new WeakMap,lt=new WeakMap,dn=new WeakMap,un=new WeakMap,Dt=new WeakMap,fn=new WeakMap,or=new WeakMap,kt=new WeakMap,Y=new WeakSet,Mc=function(){const e=new ha(w(this,on)),t=new ha(w(this,on));fe(this,Dt,e),fe(this,un,t),fe(this,uo,(c,d,u=ni.now())=>{if(t[c]=d!==0?u:0,e[c]=d,d!==0&&this.ttlAutopurge){const p=setTimeout(()=>{w(this,It).call(this,c)&&ie(this,Y,_r).call(this,w(this,Ue)[c],"expire")},d+1);p.unref&&p.unref()}}),fe(this,Br,c=>{t[c]=e[c]!==0?ni.now():0}),fe(this,An,(c,d)=>{if(e[d]){const u=e[d],p=t[d];if(!u||!p)return;c.ttl=u,c.start=p,c.now=a||s();const h=c.now-p;c.remainingTTL=u-h}});let a=0;const s=()=>{const c=ni.now();if(this.ttlResolution>0){a=c;const d=setTimeout(()=>a=0,this.ttlResolution);d.unref&&d.unref()}return c};this.getRemainingTTL=c=>{const d=w(this,nt).get(c);if(d===void 0)return 0;const u=e[d],p=t[d];if(!u||!p)return 1/0;const h=(a||s())-p;return u-h},fe(this,It,c=>{const d=t[c],u=e[c];return!!u&&!!d&&(a||s())-d>u})},Br=new WeakMap,An=new WeakMap,uo=new WeakMap,It=new WeakMap,sh=function(){const e=new ha(w(this,on));fe(this,ln,0),fe(this,dn,e),fe(this,Nr,t=>{fe(this,ln,w(this,ln)-e[t]),e[t]=0}),fe(this,fo,(t,a,s,c)=>{if(ie(this,Y,We).call(this,a))return 0;if(!ir(s))if(c){if(typeof c!="function")throw new TypeError("sizeCalculation must be a function");if(s=c(a,t),!ir(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),fe(this,ai,(t,a,s)=>{if(e[t]=a,w(this,At)){const c=w(this,At)-e[t];for(;w(this,ln)>c;)ie(this,Y,ls).call(this,!0)}fe(this,ln,w(this,ln)+e[t]),s&&(s.entrySize=a,s.totalCalculatedSize=w(this,ln))})},Nr=new WeakMap,ai=new WeakMap,fo=new WeakMap,gr=function*({allowStale:e=this.allowStale}={}){if(w(this,rt))for(let t=w(this,st);!(!ie(this,Y,Pc).call(this,t)||((e||!w(this,It).call(this,t))&&(yield t),t===w(this,mt)));)t=w(this,Rt)[t]},yr=function*({allowStale:e=this.allowStale}={}){if(w(this,rt))for(let t=w(this,mt);!(!ie(this,Y,Pc).call(this,t)||((e||!w(this,It).call(this,t))&&(yield t),t===w(this,st)));)t=w(this,bt)[t]},Pc=function(e){return e!==void 0&&w(this,nt).get(w(this,Ue)[e])===e},ls=function(e){var c,d;const t=w(this,mt),a=w(this,Ue)[t],s=w(this,we)[t];return w(this,or)&&ie(this,Y,We).call(this,s)?s.__abortController.abort(new Error("evicted")):(w(this,fn)||w(this,kt))&&(w(this,fn)&&((c=w(this,an))==null||c.call(this,s,a,"evict")),w(this,kt)&&((d=w(this,lt))==null||d.push([s,a,"evict"]))),w(this,Nr).call(this,t),e&&(w(this,Ue)[t]=void 0,w(this,we)[t]=void 0,w(this,cn).push(t)),w(this,rt)===1?(fe(this,mt,fe(this,st,0)),w(this,cn).length=0):fe(this,mt,w(this,bt)[t]),w(this,nt).delete(a),ss(this,rt)._--,t},cs=function(e,t,a,s){const c=t===void 0?void 0:w(this,we)[t];if(ie(this,Y,We).call(this,c))return c;const d=new pa,{signal:u}=a;u==null||u.addEventListener("abort",()=>d.abort(u.reason),{signal:d.signal});const p={signal:d.signal,options:a,context:s},h=(C,A=!1)=>{const{aborted:b}=d.signal,D=a.ignoreFetchAbort&&C!==void 0;if(a.status&&(b&&!A?(a.status.fetchAborted=!0,a.status.fetchError=d.signal.reason,D&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),b&&!D&&!A)return x(d.signal.reason);const $=B;return w(this,we)[t]===B&&(C===void 0?$.__staleWhileFetching?w(this,we)[t]=$.__staleWhileFetching:ie(this,Y,_r).call(this,e,"fetch"):(a.status&&(a.status.fetchUpdated=!0),this.set(e,C,p.options))),C},g=C=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=C),x(C)),x=C=>{const{aborted:A}=d.signal,b=A&&a.allowStaleOnFetchAbort,D=b||a.allowStaleOnFetchRejection,$=D||a.noDeleteOnFetchRejection,j=B;if(w(this,we)[t]===B&&(!$||j.__staleWhileFetching===void 0?ie(this,Y,_r).call(this,e,"fetch"):b||(w(this,we)[t]=j.__staleWhileFetching)),D)return a.status&&j.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),j.__staleWhileFetching;if(j.__returned===j)throw C},T=(C,A)=>{var D;const b=(D=w(this,ii))==null?void 0:D.call(this,e,c,p);b&&b instanceof Promise&&b.then($=>C($===void 0?void 0:$),A),d.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(C(void 0),a.allowStaleOnFetchAbort&&(C=$=>h($,!0)))})};a.status&&(a.status.fetchDispatched=!0);const B=new Promise(T).then(h,g),O=Object.assign(B,{__abortController:d,__staleWhileFetching:c,__returned:void 0});return t===void 0?(this.set(e,O,{...p.options,status:void 0}),t=w(this,nt).get(e)):w(this,we)[t]=O,O},We=function(e){if(!w(this,or))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof pa},Lc=function(e,t){w(this,Rt)[t]=e,w(this,bt)[e]=t},Io=function(e){e!==w(this,st)&&(e===w(this,mt)?fe(this,mt,w(this,bt)[e]):ie(this,Y,Lc).call(this,w(this,Rt)[e],w(this,bt)[e]),ie(this,Y,Lc).call(this,w(this,st),e),fe(this,st,e))},_r=function(e,t){var s,c,d,u;let a=!1;if(w(this,rt)!==0){const p=w(this,nt).get(e);if(p!==void 0)if(a=!0,w(this,rt)===1)ie(this,Y,Fc).call(this,t);else{w(this,Nr).call(this,p);const h=w(this,we)[p];if(ie(this,Y,We).call(this,h)?h.__abortController.abort(new Error("deleted")):(w(this,fn)||w(this,kt))&&(w(this,fn)&&((s=w(this,an))==null||s.call(this,h,e,t)),w(this,kt)&&((c=w(this,lt))==null||c.push([h,e,t]))),w(this,nt).delete(e),w(this,Ue)[p]=void 0,w(this,we)[p]=void 0,p===w(this,st))fe(this,st,w(this,Rt)[p]);else if(p===w(this,mt))fe(this,mt,w(this,bt)[p]);else{const g=w(this,Rt)[p];w(this,bt)[g]=w(this,bt)[p];const x=w(this,bt)[p];w(this,Rt)[x]=w(this,Rt)[p]}ss(this,rt)._--,w(this,cn).push(p)}}if(w(this,kt)&&((d=w(this,lt))!=null&&d.length)){const p=w(this,lt);let h;for(;h=p==null?void 0:p.shift();)(u=w(this,sn))==null||u.call(this,...h)}return a},Fc=function(e){var t,a,s;for(const c of ie(this,Y,yr).call(this,{allowStale:!0})){const d=w(this,we)[c];if(ie(this,Y,We).call(this,d))d.__abortController.abort(new Error("deleted"));else{const u=w(this,Ue)[c];w(this,fn)&&((t=w(this,an))==null||t.call(this,d,u,e)),w(this,kt)&&((a=w(this,lt))==null||a.push([d,u,e]))}}if(w(this,nt).clear(),w(this,we).fill(void 0),w(this,Ue).fill(void 0),w(this,Dt)&&w(this,un)&&(w(this,Dt).fill(0),w(this,un).fill(0)),w(this,dn)&&w(this,dn).fill(0),fe(this,mt,0),fe(this,st,0),w(this,cn).length=0,fe(this,ln,0),fe(this,rt,0),w(this,kt)&&w(this,lt)){const c=w(this,lt);let d;for(;d=c==null?void 0:c.shift();)(s=w(this,sn))==null||s.call(this,...d)}};let ul=pl;const cC={cacheSize:15e6};class dC{constructor(e){Le(this,"_str");Le(this,"_rawJson");Le(this,"_zodSchema");Le(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Or=class Or{constructor(e){Le(this,"fileDataCache");Le(this,"fileDataRefs",new Map);const t={...cC,...e??{}};this.fileDataCache=new ul({maxSize:t.cacheSize,fetchMethod:async a=>new dC(await Nm().blobDriver.getContent(a)),sizeCalculation:a=>a.bytes.length,dispose:(a,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const t=this.fileDataRefs.get(e);if(t!==void 0)return t;const a=n.shallowRef();return this.fileDataRefs.set(e,a),(async()=>{try{const s=await this.fileDataCache.fetch(e);a.value=s}catch(s){console.error(s)}})(),a}getContentBytes(e){if(e===void 0)return;const t=this.getDataRef(e);return n.computed(()=>{var a;return(a=t.value)==null?void 0:a.bytes})}getContentString(e){if(e===void 0)return;const t=this.getDataRef(e);return n.computed(()=>{var a;return(a=t==null?void 0:t.value)==null?void 0:a.str})}getContentJson(e,t){if(e===void 0)return;const a=this.getDataRef(e);return n.computed(()=>{var s,c;return t===void 0?(s=a==null?void 0:a.value)==null?void 0:s.rawJson:(c=a==null?void 0:a.value)==null?void 0:c.validatedJson(t)})}static getContentBytes(e){return Or.globalInstance.getContentBytes(e)}static getContentString(e){return Or.globalInstance.getContentString(e)}static getContentJson(e,t){return Or.globalInstance.getContentJson(e,t)}};Le(Or,"globalInstance",new Or);let fl=Or;R.BlockLayout=Dv,R.ContextProvider=Uk,R.DataTable=c_,R.DemoData=Ev,R.DropdownListItem=ea,R.GridTable=fy,R.LongText=Gd,R.MaskIcon16=Wi,R.MaskIcon24=Cr,R.MultiError=fs,R.PlAgDataTable=tC,R.PlAgOverlayLoading=hu,R.PlAgOverlayNoRows=mu,R.PlAlert=P_,R.PlBlockPage=x_,R.PlBtnAccent=Z_,R.PlBtnDanger=j_,R.PlBtnGhost=Pd,R.PlBtnGroup=f0,R.PlBtnLink=G_,R.PlBtnPrimary=Md,R.PlBtnSecondary=Hs,R.PlCheckbox=Uw,R.PlCheckboxGroup=qw,R.PlChip=Qs,R.PlContainer=C_,R.PlDialogModal=Yd,R.PlDropdown=Xs,R.PlDropdownLine=Kd,R.PlDropdownMulti=zw,R.PlDropdownRef=rw,R.PlFileDialog=Jd,R.PlFileInput=Zk,R.PlGrid=O_,R.PlLogView=pb,R.PlNumberField=Sw,R.PlProgressBar=ww,R.PlRow=S_,R.PlSlideModal=sb,R.PlSpacer=B_,R.PlTextArea=I0,R.PlTextField=jd,R.PlToggleSwitch=db,R.PlTooltip=Zt,R.ReactiveFileContent=fl,R.Scrollable=D1,R.Slider=e1,R.SliderRange=N1,R.SliderRangeTriple=_1,R.ThemeSwitcher=m_,R.UnresolvedError=us,R.ValueOrErrorsComponent=iC,R.activateAgGrid=ad,R.animate=Td,R.animateInfinite=dy,R.call=xd,R.computedResult=sC,R.createModel=_s,R.debounce=Vd,R.defineApp=Am,R.defineStore=aC,R.delay=vd,R.detectOutside=M0,R.ensureError=ms,R.eventListener=Ys,R.formatZodError=ys,R.getElementScrollPosition=Hd,R.identity=hs,R.isDefined=kh,R.isElementVisible=Wd,R.isJsonEqual=ps,R.isZodError=gs,R.listToOptions=uy,R.makeEaseInOut=cy,R.makeEaseOut=Sd,R.maskIcons16=vv,R.maskIcons24=Cv,R.normalizeListOptions=Gr,R.notEmpty=Ms,R.randomInt=Ed,R.randomString=ly,R.requestTick=Ps,R.scrollIntoView=Qo,R.showContextMenu=$s,R.throttle=Ls,R.timeout=Cd,R.unwrapOptionalResult=bh,R.unwrapValueOrErrors=Uc,R.useClickOutside=Xo,R.useDraggable=s1,R.useEventListener=Ge,R.useFormState=o1,R.useHover=Is,R.useInterval=i1,R.useLabelNotch=vr,R.useLocalStorage=Ad,R.useMouse=Ds,R.useMouseCapture=Yn,R.usePosition=Ld,R.useQuery=a1,R.useResizeObserver=fu,R.useScroll=t1,R.useSdkPlugin=Ss,R.useSortable=r1,R.useTheme=Dd,R.useWatchFetch=bu,R.wrapOptionalResult=jc,R.wrapValueOrErrors=wh,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
47
+ }`;var Ve=rh(function(){return Pe(_,se+"return "+H).apply(t,k)});if(Ve.source=H,Cc(Ve))throw Ve;return Ve}function a2(r){return Fe(r).toLowerCase()}function s2(r){return Fe(r).toUpperCase()}function l2(r,o,l){if(r=Fe(r),r&&(l||o===t))return ff(r);if(!r||!(o=Lt(o)))return r;var f=mn(r),m=mn(o),_=pf(f,m),k=hf(f,m)+1;return hr(f,_,k).join("")}function c2(r,o,l){if(r=Fe(r),r&&(l||o===t))return r.slice(0,gf(r)+1);if(!r||!(o=Lt(o)))return r;var f=mn(r),m=hf(f,mn(o))+1;return hr(f,0,m).join("")}function d2(r,o,l){if(r=Fe(r),r&&(l||o===t))return r.replace(Cl,"");if(!r||!(o=Lt(o)))return r;var f=mn(r),m=pf(f,mn(o));return hr(f,m).join("")}function u2(r,o){var l=W,f=F;if(Ye(o)){var m="separator"in o?o.separator:m;l="length"in o?Ee(o.length):l,f="omission"in o?Lt(o.omission):f}r=Fe(r);var _=r.length;if(ui(r)){var k=mn(r);_=k.length}if(l>=_)return r;var v=l-fi(f);if(v<1)return f;var V=k?hr(k,0,v).join(""):r.slice(0,v);if(m===t)return V+f;if(k&&(v+=V.length-v),Ec(m)){if(r.slice(v).search(m)){var z,Z=V;for(m.global||(m=zl(m.source,Fe(Ru.exec(m))+"g")),m.lastIndex=0;z=m.exec(Z);)var H=z.index;V=V.slice(0,H===t?v:H)}}else if(r.indexOf(Lt(m),v)!=v){var X=V.lastIndexOf(m);X>-1&&(V=V.slice(0,X))}return V+f}function f2(r){return r=Fe(r),r&&vC.test(r)?r.replace(Nu,zE):r}var p2=wi(function(r,o,l){return r+(l?" ":"")+o.toUpperCase()}),Vc=ip("toUpperCase");function nh(r,o,l){return r=Fe(r),o=l?t:o,o===t?ME(r)?jE(r):TE(r):r.match(o)||[]}var rh=Be(function(r,o){try{return Mt(r,t,o)}catch(l){return Cc(l)?l:new be(l)}}),h2=Ln(function(r,o){return jt(o,function(l){l=Tn(l),Mn(r,l,xc(r[l],r))}),r});function m2(r){var o=r==null?0:r.length,l=ue();return r=o?He(r,function(f){if(typeof f[1]!="function")throw new Wt(d);return[l(f[0]),f[1]]}):[],Be(function(f){for(var m=-1;++m<o;){var _=r[m];if(Mt(_[0],this,f))return Mt(_[1],this,f)}})}function g2(r){return zS(qt(r,x))}function Bc(r){return function(){return r}}function y2(r,o){return r==null||r!==r?o:r}var _2=ap(),w2=ap(!0);function Bt(r){return r}function Nc(r){return Mf(typeof r=="function"?r:qt(r,x))}function b2(r){return Lf(qt(r,x))}function k2(r,o){return Ff(r,qt(o,x))}var x2=Be(function(r,o){return function(l){return Vo(l,r,o)}}),v2=Be(function(r,o){return function(l){return Vo(r,l,o)}});function Oc(r,o,l){var f=ct(o),m=za(o,f);l==null&&!(Ye(o)&&(m.length||!f.length))&&(l=o,o=r,r=this,m=za(o,ct(o)));var _=!(Ye(l)&&"chain"in l)||!!l.chain,k=$n(r);return jt(m,function(v){var V=o[v];r[v]=V,k&&(r.prototype[v]=function(){var z=this.__chain__;if(_||z){var Z=r(this.__wrapped__),H=Z.__actions__=St(this.__actions__);return H.push({func:V,args:arguments,thisArg:r}),Z.__chain__=z,Z}return V.apply(r,lr([this.value()],arguments))})}),r}function C2(){return dt._===this&&(dt._=YE),this}function Ac(){}function E2(r){return r=Ee(r),Be(function(o){return $f(o,r)})}var S2=cc(He),T2=cc(sf),V2=cc(Dl);function ih(r){return gc(r)?Il(Tn(r)):iT(r)}function B2(r){return function(o){return r==null?t:Lr(r,o)}}var N2=lp(),O2=lp(!0);function Rc(){return[]}function Dc(){return!1}function A2(){return{}}function R2(){return""}function D2(){return!0}function I2(r,o){if(r=Ee(r),r<1||r>Ne)return[];var l=Et,f=gt(r,Et);o=ue(o),r-=Et;for(var m=Ll(f,o);++l<r;)o(l);return m}function M2(r){return ke(r)?He(r,Tn):Ft(r)?[r]:St(Cp(Fe(r)))}function P2(r){var o=++GE;return Fe(r)+o}var L2=qa(function(r,o){return r+o},0),F2=dc("ceil"),$2=qa(function(r,o){return r/o},1),z2=dc("floor");function Z2(r){return r&&r.length?$a(r,Bt,Kl):t}function U2(r,o){return r&&r.length?$a(r,ue(o,2),Kl):t}function j2(r){return df(r,Bt)}function W2(r,o){return df(r,ue(o,2))}function H2(r){return r&&r.length?$a(r,Bt,Ql):t}function q2(r,o){return r&&r.length?$a(r,ue(o,2),Ql):t}var G2=qa(function(r,o){return r*o},1),K2=dc("round"),Y2=qa(function(r,o){return r-o},0);function J2(r){return r&&r.length?Pl(r,Bt):0}function X2(r,o){return r&&r.length?Pl(r,ue(o,2)):0}return y.after=bB,y.ary=Ip,y.assign=sN,y.assignIn=Kp,y.assignInWith=as,y.assignWith=lN,y.at=cN,y.before=Mp,y.bind=xc,y.bindAll=h2,y.bindKey=Pp,y.castArray=AB,y.chain=Ap,y.chunk=zT,y.compact=ZT,y.concat=UT,y.cond=m2,y.conforms=g2,y.constant=Bc,y.countBy=JV,y.create=dN,y.curry=Lp,y.curryRight=Fp,y.debounce=$p,y.defaults=uN,y.defaultsDeep=fN,y.defer=kB,y.delay=xB,y.difference=jT,y.differenceBy=WT,y.differenceWith=HT,y.drop=qT,y.dropRight=GT,y.dropRightWhile=KT,y.dropWhile=YT,y.fill=JT,y.filter=QV,y.flatMap=nB,y.flatMapDeep=rB,y.flatMapDepth=iB,y.flatten=Vp,y.flattenDeep=XT,y.flattenDepth=QT,y.flip=vB,y.flow=_2,y.flowRight=w2,y.fromPairs=eV,y.functions=wN,y.functionsIn=bN,y.groupBy=oB,y.initial=nV,y.intersection=rV,y.intersectionBy=iV,y.intersectionWith=oV,y.invert=xN,y.invertBy=vN,y.invokeMap=sB,y.iteratee=Nc,y.keyBy=lB,y.keys=ct,y.keysIn=Vt,y.map=es,y.mapKeys=EN,y.mapValues=SN,y.matches=b2,y.matchesProperty=k2,y.memoize=ns,y.merge=TN,y.mergeWith=Yp,y.method=x2,y.methodOf=v2,y.mixin=Oc,y.negate=rs,y.nthArg=E2,y.omit=VN,y.omitBy=BN,y.once=CB,y.orderBy=cB,y.over=S2,y.overArgs=EB,y.overEvery=T2,y.overSome=V2,y.partial=vc,y.partialRight=zp,y.partition=dB,y.pick=NN,y.pickBy=Jp,y.property=ih,y.propertyOf=B2,y.pull=cV,y.pullAll=Np,y.pullAllBy=dV,y.pullAllWith=uV,y.pullAt=fV,y.range=N2,y.rangeRight=O2,y.rearg=SB,y.reject=pB,y.remove=pV,y.rest=TB,y.reverse=bc,y.sampleSize=mB,y.set=AN,y.setWith=RN,y.shuffle=gB,y.slice=hV,y.sortBy=wB,y.sortedUniq=kV,y.sortedUniqBy=xV,y.split=n2,y.spread=VB,y.tail=vV,y.take=CV,y.takeRight=EV,y.takeRightWhile=SV,y.takeWhile=TV,y.tap=ZV,y.throttle=BB,y.thru=Qa,y.toArray=Hp,y.toPairs=Xp,y.toPairsIn=Qp,y.toPath=M2,y.toPlainObject=Gp,y.transform=DN,y.unary=NB,y.union=VV,y.unionBy=BV,y.unionWith=NV,y.uniq=OV,y.uniqBy=AV,y.uniqWith=RV,y.unset=IN,y.unzip=kc,y.unzipWith=Op,y.update=MN,y.updateWith=PN,y.values=xi,y.valuesIn=LN,y.without=DV,y.words=nh,y.wrap=OB,y.xor=IV,y.xorBy=MV,y.xorWith=PV,y.zip=LV,y.zipObject=FV,y.zipObjectDeep=$V,y.zipWith=zV,y.entries=Xp,y.entriesIn=Qp,y.extend=Kp,y.extendWith=as,Oc(y,y),y.add=L2,y.attempt=rh,y.camelCase=ZN,y.capitalize=eh,y.ceil=F2,y.clamp=FN,y.clone=RB,y.cloneDeep=IB,y.cloneDeepWith=MB,y.cloneWith=DB,y.conformsTo=PB,y.deburr=th,y.defaultTo=y2,y.divide=$2,y.endsWith=UN,y.eq=yn,y.escape=jN,y.escapeRegExp=WN,y.every=XV,y.find=eB,y.findIndex=Sp,y.findKey=pN,y.findLast=tB,y.findLastIndex=Tp,y.findLastKey=hN,y.floor=z2,y.forEach=Rp,y.forEachRight=Dp,y.forIn=mN,y.forInRight=gN,y.forOwn=yN,y.forOwnRight=_N,y.get=Sc,y.gt=LB,y.gte=FB,y.has=kN,y.hasIn=Tc,y.head=Bp,y.identity=Bt,y.includes=aB,y.indexOf=tV,y.inRange=$N,y.invoke=CN,y.isArguments=zr,y.isArray=ke,y.isArrayBuffer=$B,y.isArrayLike=Tt,y.isArrayLikeObject=et,y.isBoolean=zB,y.isBuffer=mr,y.isDate=ZB,y.isElement=UB,y.isEmpty=jB,y.isEqual=WB,y.isEqualWith=HB,y.isError=Cc,y.isFinite=qB,y.isFunction=$n,y.isInteger=Zp,y.isLength=is,y.isMap=Up,y.isMatch=GB,y.isMatchWith=KB,y.isNaN=YB,y.isNative=JB,y.isNil=QB,y.isNull=XB,y.isNumber=jp,y.isObject=Ye,y.isObjectLike=Xe,y.isPlainObject=Do,y.isRegExp=Ec,y.isSafeInteger=eN,y.isSet=Wp,y.isString=os,y.isSymbol=Ft,y.isTypedArray=ki,y.isUndefined=tN,y.isWeakMap=nN,y.isWeakSet=rN,y.join=aV,y.kebabCase=HN,y.last=Kt,y.lastIndexOf=sV,y.lowerCase=qN,y.lowerFirst=GN,y.lt=iN,y.lte=oN,y.max=Z2,y.maxBy=U2,y.mean=j2,y.meanBy=W2,y.min=H2,y.minBy=q2,y.stubArray=Rc,y.stubFalse=Dc,y.stubObject=A2,y.stubString=R2,y.stubTrue=D2,y.multiply=G2,y.nth=lV,y.noConflict=C2,y.noop=Ac,y.now=ts,y.pad=KN,y.padEnd=YN,y.padStart=JN,y.parseInt=XN,y.random=zN,y.reduce=uB,y.reduceRight=fB,y.repeat=QN,y.replace=e2,y.result=ON,y.round=K2,y.runInContext=E,y.sample=hB,y.size=yB,y.snakeCase=t2,y.some=_B,y.sortedIndex=mV,y.sortedIndexBy=gV,y.sortedIndexOf=yV,y.sortedLastIndex=_V,y.sortedLastIndexBy=wV,y.sortedLastIndexOf=bV,y.startCase=r2,y.startsWith=i2,y.subtract=Y2,y.sum=J2,y.sumBy=X2,y.template=o2,y.times=I2,y.toFinite=zn,y.toInteger=Ee,y.toLength=qp,y.toLower=a2,y.toNumber=Yt,y.toSafeInteger=aN,y.toString=Fe,y.toUpper=s2,y.trim=l2,y.trimEnd=c2,y.trimStart=d2,y.truncate=u2,y.unescape=f2,y.uniqueId=P2,y.upperCase=p2,y.upperFirst=Vc,y.each=Rp,y.eachRight=Dp,y.first=Bp,Oc(y,function(){var r={};return En(y,function(o,l){$e.call(y.prototype,l)||(r[l]=o)}),r}(),{chain:!1}),y.VERSION=a,jt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){y[r].placeholder=y}),jt(["drop","take"],function(r,o){Ae.prototype[r]=function(l){l=l===t?1:ot(Ee(l),0);var f=this.__filtered__&&!o?new Ae(this):this.clone();return f.__filtered__?f.__takeCount__=gt(l,f.__takeCount__):f.__views__.push({size:gt(l,Et),type:r+(f.__dir__<0?"Right":"")}),f},Ae.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),jt(["filter","map","takeWhile"],function(r,o){var l=o+1,f=l==de||l==J;Ae.prototype[r]=function(m){var _=this.clone();return _.__iteratees__.push({iteratee:ue(m,3),type:l}),_.__filtered__=_.__filtered__||f,_}}),jt(["head","last"],function(r,o){var l="take"+(o?"Right":"");Ae.prototype[r]=function(){return this[l](1).value()[0]}}),jt(["initial","tail"],function(r,o){var l="drop"+(o?"":"Right");Ae.prototype[r]=function(){return this.__filtered__?new Ae(this):this[l](1)}}),Ae.prototype.compact=function(){return this.filter(Bt)},Ae.prototype.find=function(r){return this.filter(r).head()},Ae.prototype.findLast=function(r){return this.reverse().find(r)},Ae.prototype.invokeMap=Be(function(r,o){return typeof r=="function"?new Ae(this):this.map(function(l){return Vo(l,r,o)})}),Ae.prototype.reject=function(r){return this.filter(rs(ue(r)))},Ae.prototype.slice=function(r,o){r=Ee(r);var l=this;return l.__filtered__&&(r>0||o<0)?new Ae(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),o!==t&&(o=Ee(o),l=o<0?l.dropRight(-o):l.take(o-r)),l)},Ae.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Ae.prototype.toArray=function(){return this.take(Et)},En(Ae.prototype,function(r,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),f=/^(?:head|last)$/.test(o),m=y[f?"take"+(o=="last"?"Right":""):o],_=f||/^find/.test(o);m&&(y.prototype[o]=function(){var k=this.__wrapped__,v=f?[1]:arguments,V=k instanceof Ae,z=v[0],Z=V||ke(k),H=function(Oe){var Re=m.apply(y,lr([Oe],v));return f&&X?Re[0]:Re};Z&&l&&typeof z=="function"&&z.length!=1&&(V=Z=!1);var X=this.__chain__,se=!!this.__actions__.length,pe=_&&!X,Ve=V&&!se;if(!_&&Z){k=Ve?k:new Ae(this);var he=r.apply(k,v);return he.__actions__.push({func:Qa,args:[H],thisArg:t}),new Ht(he,X)}return pe&&Ve?r.apply(this,v):(he=this.thru(H),pe?f?he.value()[0]:he.value():he)})}),jt(["pop","push","shift","sort","splice","unshift"],function(r){var o=Ea[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);y.prototype[r]=function(){var m=arguments;if(f&&!this.__chain__){var _=this.value();return o.apply(ke(_)?_:[],m)}return this[l](function(k){return o.apply(ke(k)?k:[],m)})}}),En(Ae.prototype,function(r,o){var l=y[o];if(l){var f=l.name+"";$e.call(gi,f)||(gi[f]=[]),gi[f].push({name:o,func:l})}}),gi[Ha(t,b).name]=[{name:"wrapper",func:t}],Ae.prototype.clone=fS,Ae.prototype.reverse=pS,Ae.prototype.value=hS,y.prototype.at=UV,y.prototype.chain=jV,y.prototype.commit=WV,y.prototype.next=HV,y.prototype.plant=GV,y.prototype.reverse=KV,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=YV,y.prototype.first=y.prototype.head,ko&&(y.prototype[ko]=qV),y},pi=WE();Rr?((Rr.exports=pi)._=pi,Nl._=pi):dt._=pi}).call(vi)}(ua,ua.exports);var Je=ua.exports;const Iv={class:"grid-overlay-container"},hu=n.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",Iv,[e.params.notReady?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[t[0]||(t[0]=n.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),t[1]||(t[1]=n.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t[2]||(t[2]=n.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),t[3]||(t[3]=n.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),Mv={},Pv={class:"grid-overlay-container"};function Lv(i,e){return n.openBlock(),n.createElementBlock("div",Pv,e[0]||(e[0]=[n.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),n.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const mu=ll(Mv,[["render",Lv]]);async function Fv(i,e){throw Error("not implemented")}function $v(i){return i.axesSpec.filter(e=>{var t;return((t=e.annotations)==null?void 0:t["pl7.app/axisNature"])==="heterogeneous"})}function zv(i,e){const t=[];for(const a of e)if(i[a].type==="column"){const s=$v(i[a].spec);for(const c of s){if(c.type!=="String"){console.warn("heterogeneous axis with string type expected, got",c,"skipping");continue}const d=od(c),u=i.findIndex(p=>Je.isEqual(p.id,d));if(u===-1)throw console.error("axis not found",a,d,i),Error("axis not found");t.push({columnIdx:a,axisIdx:u})}}return t}const gu=(i,e)=>(i+e).toString();function Zv(i,e,t,a,s,c){if(i.length>1)throw Error("hColumns.length > 1 is not supported");const d=i[0];let u=-1,p=-1;for(let x=0;x<c.length;++x)c[x]===d.axisIdx&&(u=x),c[x]===d.columnIdx&&(p=x);const h=(()=>{const T=a[u].data.filter(B=>B!==null);return Array.from(new Set(T))})();h.sort(),p>u?(t.splice(p,1),t.splice(u,1)):(t.splice(u,1),t.splice(p,1));const g=Uv(s,a,u,p,h,e.rows);for(let x=0;x<h.length;++x){const T=h[x],B=T+"@"+x;t.push({colId:B,field:gu(a.length,x),headerName:T,valueFormatter:yu})}return{rowModelType:"clientSide",columnDefs:t,rowData:g}}function Uv(i,e,t,a,s,c){const d=new Map;let u=0;for(let h=0;h<c;h++){const g={};for(let C=0;C<e.length;++C){if(C===t||C===a)continue;const A=i[C].toString();g[A]=e[C].data[h]}let x;const T=Ci(Object.values(g))??"";d.has(T)?x=d.get(T):(d.set(T,g),x=g,x.id=u.toString(),u++);const B=s.indexOf(e[t].data[h]);if(B===-1)throw Error("index not found");const O=gu(e.length,B);x[O]=e[a].data[h]}return Array.from(d.values())}function jv(i){return Ci({type:i.type,id:i.id})}function Wv(i){return JSON.parse(i)}const yu=i=>i?i.value===void 0?"NULL":i.value===null?"NA":i.value.toString():"ERROR";function Hv(i,e){var t,a;return{colId:jv(e),field:i.toString(),headerName:((a=(t=e.spec.annotations)==null?void 0:t["pl7.app/label"])==null?void 0:a.trim())??"Unlabeled "+e.type+" "+i.toString(),lockPosition:e.type==="axis",valueFormatter:yu,cellDataType:(s=>{switch(s){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${s}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function _u(i,e){switch(e){case"Int":return i;case"Long":return typeof i=="bigint"?Number(i):i;case"Float":return i;case"Double":return i;case"String":return i;case"Bytes":return Buffer.from(i).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function wu(i){const e=[];return Ho(i,t=>(e.push(t),t)),e}async function qv(i,e,t){return t.length?(await i.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Je.uniqWith(t.map(s=>Es(s.spec.axesSpec).map(Je.cloneDeep)).flat(),Je.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function Gv(i,e,t){const a=wu(t),c=(await qv(i,e,a)).filter(d=>!Je.find(a,u=>d.columnId===u.columnId));return c.length===0?t:{type:"outer",primary:t,secondary:c.map(d=>({type:"column",column:d}))}}async function Kv(i,e,t,a){const s=t.filter(g=>g.type!=="Bytes"),c=wu(a),d=s.map(g=>[]),u=s.map(g=>null);for(let g=0;g<c.length;++g){const x=Es(c[g].spec.axesSpec);for(let T=0;T<x.length;++T){const B=Je.findIndex(s,O=>Je.isEqual(O,x[T]));B===-1||u[B]||(x.length===1&&c[g].spec.name==="pl7.app/label"?(d[B]=[[g,T]],u[B]=c[g].columnId):d[B].push([g,T]))}}for(let g=s.length-1;g>=0;--g)d[g].length||(u.splice(g,1),d.splice(g,1),s.splice(g,1));const p=100,h=s.map(g=>new Set);e:for(let g=s.length-1;g>=0;--g){for(const[x,T]of d[g]){const B=await i.getUniqueValues(e,{columnId:c[x].columnId,...!u[g]&&{axis:Je.cloneDeep(s[g])},filters:[],limit:p});if(B.overflow){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}const O=B.values.type;for(const C of B.values.data)if(!(id(C,O)||C===null)&&(h[g].add(_u(C,O)),h[g].size===p)){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}}if(!h[g].size){u.splice(g,1),d.splice(g,1),s.splice(g,1);continue e}}return s.map((g,x)=>{const T=[...h[x]].map(O=>({value:O,text:O.toString()})),B=T[0].value;return{axis:Je.cloneDeep(g),...u[x]&&{column:u[x]},options:T,defaultValue:B}})}function Yv(i,e,t){const a=e.length,s=[];for(let c=0;c<e[0].data.length;++c){const d={};for(let u=0;u<a;++u){const p=i[u].toString(),h=e[u].data[c],g=e[u].type;Vm(e[u].absent,c)?d[p]=void 0:id(h,g)||h===null?d[p]=null:d[p]=_u(h,g)}d.id=(t++).toString(),s.push(d)}return s}const Jv=i=>i.type==="column"&&i.spec.axesSpec.length===1&&i.spec.name==="pl7.app/label";async function Xv(i,e,t){const a=await i.getSpec(e),s=[...a.keys()].filter(T=>!Je.find(t,B=>Je.isEqual(B.axis,a[T].id)||Je.isEqual(B.column,a[T].id))),c=Je.cloneDeep(s),d=zv(a,s);for(let T=s.length-1;T>=0;--T){const B=s[T];if(!Jv(a[B]))continue;const O=Es(a[B].spec.axesSpec)[0],C=Je.findIndex(s,A=>Je.isEqual(a[A].id,O));if(C!==-1){s[C]=B;for(const A of d)A.axisIdx===B&&(A.axisIdx=C);s.splice(T,1),c.splice(T,1)}}const u=await i.getShape(e),p=u.rows,h=c.map(T=>Hv(T,a[T]));if(d.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",d.length," transposition will not be applied."),d.length===1)return Zv(d,u,h,await i.getData(e,s),c,s);let g;return{rowModelType:"serverSide",columnDefs:h,serverSideDatasource:{getRows:async T=>{try{if(p==0){T.success({rowData:[],rowCount:p}),T.api.showNoRowsOverlay(),T.api.setGridOption("loading",!1);return}if(g&&!Je.isEqual(g.request.sortModel,T.request.sortModel)){g=void 0,T.fail(),T.api.setGridOption("loading",!0);return}g=T;let B=0,O=[];if(p>0&&T.request.startRow!==void 0&&T.request.endRow!==void 0&&(B=Math.min(p,T.request.endRow)-T.request.startRow,B>0)){const C=await i.getData(e,s,{offset:T.request.startRow,length:B});O=Yv(c,C,T.request.startRow)}T.success({rowData:O,rowCount:p}),T.api.autoSizeAllColumns(),T.api.setGridOption("loading",!1)}catch{T.fail(),T.api.setGridOption("loading",!0)}}}}}const Qv={class:"ap-ag-data-table-container"},eC={key:0,class:"ap-ag-data-table-sheets"},tC=ll(n.defineComponent({__name:"PlAgDataTable",props:n.mergeModels({settings:{}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:["update:modelValue"],setup(i){wr.ModuleRegistry.registerModules([Mo.ClientSideRowModelModule,zc.ClipboardModule,$c.ServerSideRowModelModule,Zc.RangeSelectionModule]);const e=n.useModel(i,"modelValue"),t=i,{settings:a}=n.toRefs(t);n.watch(()=>a.value,async(b,D)=>{if(b.sourceType!=="pframe"||!b.pFrame||!b.join||D&&D.sourceType==="pframe"&&Je.isEqual(b.pFrame,D.pFrame)&&Je.isEqual(b.join,D.join))return;const $=window.platforma;if(!$)throw Error("platforma not set");const j=$.pFrameDriver;if(!j)throw Error("platforma.pFrameDriver not set");const P=await Gv(j,b.pFrame,b.join),U=e.value;U.pTableParams||(U.pTableParams={sorting:[],filters:[]}),U.pTableParams.join=P,e.value=U});const s=bu(()=>a.value.sourceType,async b=>{var $;const D=a.value.sourceType;switch(D){case"pframe":{const j=window.platforma;if(!j)throw Error("platforma not set");const P=j.pFrameDriver;if(!P)throw Error("platforma.pFrameDriver not set");if(!a.value.pFrame)return[];const U=a.value.pFrame,N=($=e.value.pTableParams)==null?void 0:$.join;return N?await Kv(P,U,a.value.sheetAxes,N):[]}case"ptable":return a.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${D}`)}});function c(b){if(!(a.value.sourceType!=="ptable"&&a.value.sourceType!=="pframe"))return(b==null?void 0:b.sortModel.map(D=>({column:Wv(D.colId),ascending:D.sort==="asc",naAndAbsentAreLeastValues:!0})))??[]}const d=n.computed({get:()=>{const b=e.value;return{columnOrder:b.gridState.columnOrder,sort:b.gridState.sort}},set:b=>{const D=e.value,$=x.value.rowModelType==="clientSide"?void 0:c(b.sort);D.gridState.columnOrder=b.columnOrder,D.gridState.sort=b.sort,(a.value.sourceType==="ptable"||a.value.sourceType==="pframe")&&(D.pTableParams||(D.pTableParams={sorting:[],filters:[]}),D.pTableParams.sorting=$),e.value=D}}),u=b=>Ci(b);function p(b){var D;if(!(a.value.sourceType!=="ptable"&&a.value.sourceType!=="pframe"))return((D=s.value)==null?void 0:D.map($=>({type:"bySingleColumn",column:$.column?{type:"column",id:$.column}:{type:"axis",id:$.axis},predicate:{operator:"Equal",reference:b[u($.axis)]}})))??[]}const h=n.computed({get:()=>e.value.gridState.sheets??{},set:b=>{const D=p(b),$=e.value;$.gridState.sheets=b,(a.value.sourceType==="ptable"||a.value.sourceType==="pframe")&&($.pTableParams||($.pTableParams={sorting:[],filters:[]}),$.pTableParams.filters=D),e.value=$}});n.watch(()=>[a.value,s.value],(b,D)=>{const[$,j]=b;if(!j)return;if(D){const[U,N]=D;if(($.sourceType==="ptable"||$.sourceType==="pframe")&&$.sourceType===(U==null?void 0:U.sourceType)&&Je.isEqual(j,N))return}if($.sourceType!=="ptable"&&$.sourceType!=="pframe"){h.value={};return}const P=h.value;for(const U of j){const N=u(U.axis);P[N]||(P[N]=U.defaultValue??U.options[0].value)}h.value=P},{immediate:!0});const g=n.shallowRef(),x=n.ref({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:d.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:b=>{b.api.autoSizeAllColumns()},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:b=>b.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:hu,noRowsOverlayComponent:mu}),T=b=>{const D=b.api;g.value=new Proxy(D,{get($,j,P){switch(j){case"setGridOption":return(U,N)=>{const S=x.value;S[U]=N,x.value=S,D.updateGridOptions(S)};case"updateGridOptions":return U=>{x.value={...x.value,...U},D.updateGridOptions(U)};default:return Reflect.get($,j,P)}}})},B=b=>{d.value={columnOrder:b.state.columnOrder,sort:b.state.sort},x.value.initialState=d.value},O=()=>{const b=g.value.getState();d.value={columnOrder:b.columnOrder,sort:b.sort},x.value.initialState=d.value,g.value=void 0},C=n.ref(0);n.watch(()=>[g.value,d.value],(b,D)=>{if(Je.isEqual(b,D))return;const[$,j]=b;if(!$)return;const P=$.getState(),U={columnOrder:P.columnOrder,sort:P.sort};Je.isEqual(j,U)||(x.value.initialState=j,++C.value)}),n.watch(()=>x.value,(b,D)=>{D&&b.rowModelType!=D.rowModelType&&++C.value});const A=(b,D)=>{var j;const $=h.value;$[b]!==D&&($[b]=D,h.value=$,(j=g.value)==null||j.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))};return n.watch(()=>[g.value,a.value,s.value],async(b,D)=>{if(Je.isEqual(b,D))return;const[$,j,P]=b;if(!$)return;const U=window.platforma;if(!U)throw Error("platforma not set");const N=j.sourceType;switch(N){case"pframe":case"ptable":{const S=U.pFrameDriver;if(!S)throw Error("platforma.pFrameDriver not set");const M=j.pTable;if(!M||!P)return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const W=await Xv(S,M,P);return $.updateGridOptions({loading:W.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...W})}case"xsv":{const S=U.blobDriver;if(!S)throw Error("platforma.blobDriver not set");const M=j.xsvFile;if(!(M!=null&&M.ok)||!M.value)return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const W=await Fv(S,M.value);return $.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...W})}default:throw Error(`unsupported source type: ${N}`)}}),(b,D)=>(n.openBlock(),n.createElementBlock("div",Qv,[n.createVNode(n.Transition,{name:"ap-ag-data-table-sheets-transition"},{default:n.withCtx(()=>[n.unref(s).value&&n.unref(s).value.length>0?(n.openBlock(),n.createElementBlock("div",eC,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(s).value,($,j)=>(n.openBlock(),n.createBlock(n.unref(Kd),{key:j,"model-value":h.value[u($.axis)],options:$.options,"onUpdate:modelValue":P=>A(u($.axis),P)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):n.createCommentVNode("",!0)]),_:1}),(n.openBlock(),n.createBlock(n.unref(ph.AgGridVue),{class:"ap-ag-data-table-grid","grid-options":x.value,key:C.value,onGridReady:T,onStateUpdated:B,onGridPreDestroyed:O},null,8,["grid-options"]))]))}}),[["__scopeId","data-v-751fd5cf"]]),nC={key:1,class:"alert-error"},rC={key:2},iC=n.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(i){const e=i,t=n.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),a=n.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=n.computed(()=>t.value===void 0&&a.value===void 0);return(c,d)=>(n.openBlock(),n.createElementBlock("div",null,[t.value!==void 0?n.renderSlot(c.$slots,"default",n.normalizeProps(n.mergeProps({key:0},{value:t.value}))):n.createCommentVNode("",!0),a.value?(n.openBlock(),n.createElementBlock("div",nC,n.toDisplayString(a.value),1)):n.createCommentVNode("",!0),s.value?(n.openBlock(),n.createElementBlock("div",rC,"Unresolved")):n.createCommentVNode("",!0)]))}}),fa=new Map;function oC(i,e){const t=n.getCurrentScope()??n.effectScope(),a=t.run(()=>(n.onScopeDispose(()=>{fa.delete(i)}),n.reactive(e())));return a[Symbol.dispose]=()=>{t.stop()},a}function aC(i){const e=Symbol();return()=>(fa.has(e)||fa.set(e,oC(e,i)),fa.get(e))}function sC(i){return n.computed(()=>{try{return jc(i())}catch(e){return{errors:[String(e)],value:void 0}}})}function bu(i,e,t){const a=n.ref(0),s=n.reactive({loading:n.computed(()=>a.value>0),loadingRef:a,value:void 0,error:void 0}),c=gh(e);return n.watch(i,async d=>{s.error=void 0,a.value++,c(d).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{a.value--})},Object.assign({immediate:!0,deep:!0},t??{})),s}const ni=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ku=new Set,cl=typeof process=="object"&&process?process:{},xu=(i,e,t,a)=>{typeof cl.emitWarning=="function"?cl.emitWarning(i,e,t,a):console.error(`[${t}] ${e}: ${i}`)};let pa=globalThis.AbortController,vu=globalThis.AbortSignal;if(typeof pa>"u"){vu=class{constructor(){Le(this,"onabort");Le(this,"_onabort",[]);Le(this,"reason");Le(this,"aborted",!1)}addEventListener(a,s){this._onabort.push(s)}},pa=class{constructor(){Le(this,"signal",new vu);e()}abort(a){var s,c;if(!this.signal.aborted){this.signal.reason=a,this.signal.aborted=!0;for(const d of this.signal._onabort)d(a);(c=(s=this.signal).onabort)==null||c.call(s,a)}}};let i=((Eu=cl.env)==null?void 0:Eu.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{i&&(i=!1,xu("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const lC=i=>!ku.has(i),ir=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),Cu=i=>ir(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?ha:null:null;class ha extends Array{constructor(e){super(e),this.fill(0)}}const Vr=class Vr{constructor(e,t){Le(this,"heap");Le(this,"length");if(!w(Vr,ri))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}static create(e){const t=Cu(e);if(!t)return[];fe(Vr,ri,!0);const a=new Vr(e,t);return fe(Vr,ri,!1),a}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ri=new WeakMap,Me(Vr,ri,!1);let dl=Vr;const pl=class pl{constructor(e){Me(this,Y);Me(this,on);Me(this,At);Me(this,an);Me(this,sn);Me(this,ii);Me(this,oi);Le(this,"ttl");Le(this,"ttlResolution");Le(this,"ttlAutopurge");Le(this,"updateAgeOnGet");Le(this,"updateAgeOnHas");Le(this,"allowStale");Le(this,"noDisposeOnSet");Le(this,"noUpdateTTL");Le(this,"maxEntrySize");Le(this,"sizeCalculation");Le(this,"noDeleteOnFetchRejection");Le(this,"noDeleteOnStaleGet");Le(this,"allowStaleOnFetchAbort");Le(this,"allowStaleOnFetchRejection");Le(this,"ignoreFetchAbort");Me(this,rt);Me(this,ln);Me(this,nt);Me(this,Ue);Me(this,we);Me(this,bt);Me(this,Rt);Me(this,mt);Me(this,st);Me(this,cn);Me(this,lt);Me(this,dn);Me(this,un);Me(this,Dt);Me(this,fn);Me(this,or);Me(this,kt);Me(this,Br,()=>{});Me(this,An,()=>{});Me(this,uo,()=>{});Me(this,It,()=>!1);Me(this,Nr,e=>{});Me(this,ai,(e,t,a)=>{});Me(this,fo,(e,t,a,s)=>{if(a||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Le(this,Su,"LRUCache");const{max:t=0,ttl:a,ttlResolution:s=1,ttlAutopurge:c,updateAgeOnGet:d,updateAgeOnHas:u,allowStale:p,dispose:h,disposeAfter:g,noDisposeOnSet:x,noUpdateTTL:T,maxSize:B=0,maxEntrySize:O=0,sizeCalculation:C,fetchMethod:A,memoMethod:b,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:$,allowStaleOnFetchRejection:j,allowStaleOnFetchAbort:P,ignoreFetchAbort:U}=e;if(t!==0&&!ir(t))throw new TypeError("max option must be a nonnegative integer");const N=t?Cu(t):Array;if(!N)throw new Error("invalid max value: "+t);if(fe(this,on,t),fe(this,At,B),this.maxEntrySize=O||w(this,At),this.sizeCalculation=C,this.sizeCalculation){if(!w(this,At)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(fe(this,oi,b),A!==void 0&&typeof A!="function")throw new TypeError("fetchMethod must be a function if specified");if(fe(this,ii,A),fe(this,or,!!A),fe(this,nt,new Map),fe(this,Ue,new Array(t).fill(void 0)),fe(this,we,new Array(t).fill(void 0)),fe(this,bt,new N(t)),fe(this,Rt,new N(t)),fe(this,mt,0),fe(this,st,0),fe(this,cn,dl.create(t)),fe(this,rt,0),fe(this,ln,0),typeof h=="function"&&fe(this,an,h),typeof g=="function"?(fe(this,sn,g),fe(this,lt,[])):(fe(this,sn,void 0),fe(this,lt,void 0)),fe(this,fn,!!w(this,an)),fe(this,kt,!!w(this,sn)),this.noDisposeOnSet=!!x,this.noUpdateTTL=!!T,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!j,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(w(this,At)!==0&&!ir(w(this,At)))throw new TypeError("maxSize must be a positive integer if specified");if(!ir(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ie(this,Y,sh).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!$,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!u,this.ttlResolution=ir(s)||s===0?s:1,this.ttlAutopurge=!!c,this.ttl=a||0,this.ttl){if(!ir(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ie(this,Y,Mc).call(this)}if(w(this,on)===0&&this.ttl===0&&w(this,At)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!w(this,on)&&!w(this,At)){const S="LRU_CACHE_UNBOUNDED";lC(S)&&(ku.add(S),xu("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,pl))}}static unsafeExposeInternals(e){return{starts:w(e,un),ttls:w(e,Dt),sizes:w(e,dn),keyMap:w(e,nt),keyList:w(e,Ue),valList:w(e,we),next:w(e,bt),prev:w(e,Rt),get head(){return w(e,mt)},get tail(){return w(e,st)},free:w(e,cn),isBackgroundFetch:t=>{var a;return ie(a=e,Y,We).call(a,t)},backgroundFetch:(t,a,s,c)=>{var d;return ie(d=e,Y,cs).call(d,t,a,s,c)},moveToTail:t=>{var a;return ie(a=e,Y,Io).call(a,t)},indexes:t=>{var a;return ie(a=e,Y,gr).call(a,t)},rindexes:t=>{var a;return ie(a=e,Y,yr).call(a,t)},isStale:t=>{var a;return w(a=e,It).call(a,t)}}}get max(){return w(this,on)}get maxSize(){return w(this,At)}get calculatedSize(){return w(this,ln)}get size(){return w(this,rt)}get fetchMethod(){return w(this,ii)}get memoMethod(){return w(this,oi)}get dispose(){return w(this,an)}get disposeAfter(){return w(this,sn)}getRemainingTTL(e){return w(this,nt).has(e)?1/0:0}*entries(){for(const e of ie(this,Y,gr).call(this))w(this,we)[e]!==void 0&&w(this,Ue)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield[w(this,Ue)[e],w(this,we)[e]])}*rentries(){for(const e of ie(this,Y,yr).call(this))w(this,we)[e]!==void 0&&w(this,Ue)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield[w(this,Ue)[e],w(this,we)[e]])}*keys(){for(const e of ie(this,Y,gr).call(this)){const t=w(this,Ue)[e];t!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield t)}}*rkeys(){for(const e of ie(this,Y,yr).call(this)){const t=w(this,Ue)[e];t!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield t)}}*values(){for(const e of ie(this,Y,gr).call(this))w(this,we)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield w(this,we)[e])}*rvalues(){for(const e of ie(this,Y,yr).call(this))w(this,we)[e]!==void 0&&!ie(this,Y,We).call(this,w(this,we)[e])&&(yield w(this,we)[e])}[(Tu=Symbol.iterator,Su=Symbol.toStringTag,Tu)](){return this.entries()}find(e,t={}){for(const a of ie(this,Y,gr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;if(c!==void 0&&e(c,w(this,Ue)[a],this))return this.get(w(this,Ue)[a],t)}}forEach(e,t=this){for(const a of ie(this,Y,gr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(t,c,w(this,Ue)[a],this)}}rforEach(e,t=this){for(const a of ie(this,Y,yr).call(this)){const s=w(this,we)[a],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(t,c,w(this,Ue)[a],this)}}purgeStale(){let e=!1;for(const t of ie(this,Y,yr).call(this,{allowStale:!0}))w(this,It).call(this,t)&&(ie(this,Y,_r).call(this,w(this,Ue)[t],"expire"),e=!0);return e}info(e){const t=w(this,nt).get(e);if(t===void 0)return;const a=w(this,we)[t],s=ie(this,Y,We).call(this,a)?a.__staleWhileFetching:a;if(s===void 0)return;const c={value:s};if(w(this,Dt)&&w(this,un)){const d=w(this,Dt)[t],u=w(this,un)[t];if(d&&u){const p=d-(ni.now()-u);c.ttl=p,c.start=Date.now()}}return w(this,dn)&&(c.size=w(this,dn)[t]),c}dump(){const e=[];for(const t of ie(this,Y,gr).call(this,{allowStale:!0})){const a=w(this,Ue)[t],s=w(this,we)[t],c=ie(this,Y,We).call(this,s)?s.__staleWhileFetching:s;if(c===void 0||a===void 0)continue;const d={value:c};if(w(this,Dt)&&w(this,un)){d.ttl=w(this,Dt)[t];const u=ni.now()-w(this,un)[t];d.start=Math.floor(Date.now()-u)}w(this,dn)&&(d.size=w(this,dn)[t]),e.unshift([a,d])}return e}load(e){this.clear();for(const[t,a]of e){if(a.start){const s=Date.now()-a.start;a.start=ni.now()-s}this.set(t,a.value,a)}}set(e,t,a={}){var T,B,O,C,A;if(t===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:c,noDisposeOnSet:d=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=a;let{noUpdateTTL:h=this.noUpdateTTL}=a;const g=w(this,fo).call(this,e,t,a.size||0,u);if(this.maxEntrySize&&g>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ie(this,Y,_r).call(this,e,"set"),this;let x=w(this,rt)===0?void 0:w(this,nt).get(e);if(x===void 0)x=w(this,rt)===0?w(this,st):w(this,cn).length!==0?w(this,cn).pop():w(this,rt)===w(this,on)?ie(this,Y,ls).call(this,!1):w(this,rt),w(this,Ue)[x]=e,w(this,we)[x]=t,w(this,nt).set(e,x),w(this,bt)[w(this,st)]=x,w(this,Rt)[x]=w(this,st),fe(this,st,x),ss(this,rt)._++,w(this,ai).call(this,x,g,p),p&&(p.set="add"),h=!1;else{ie(this,Y,Io).call(this,x);const b=w(this,we)[x];if(t!==b){if(w(this,or)&&ie(this,Y,We).call(this,b)){b.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:D}=b;D!==void 0&&!d&&(w(this,fn)&&((T=w(this,an))==null||T.call(this,D,e,"set")),w(this,kt)&&((B=w(this,lt))==null||B.push([D,e,"set"])))}else d||(w(this,fn)&&((O=w(this,an))==null||O.call(this,b,e,"set")),w(this,kt)&&((C=w(this,lt))==null||C.push([b,e,"set"])));if(w(this,Nr).call(this,x),w(this,ai).call(this,x,g,p),w(this,we)[x]=t,p){p.set="replace";const D=b&&ie(this,Y,We).call(this,b)?b.__staleWhileFetching:b;D!==void 0&&(p.oldValue=D)}}else p&&(p.set="update")}if(s!==0&&!w(this,Dt)&&ie(this,Y,Mc).call(this),w(this,Dt)&&(h||w(this,uo).call(this,x,s,c),p&&w(this,An).call(this,p,x)),!d&&w(this,kt)&&w(this,lt)){const b=w(this,lt);let D;for(;D=b==null?void 0:b.shift();)(A=w(this,sn))==null||A.call(this,...D)}return this}pop(){var e;try{for(;w(this,rt);){const t=w(this,we)[w(this,mt)];if(ie(this,Y,ls).call(this,!0),ie(this,Y,We).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(w(this,kt)&&w(this,lt)){const t=w(this,lt);let a;for(;a=t==null?void 0:t.shift();)(e=w(this,sn))==null||e.call(this,...a)}}}has(e,t={}){const{updateAgeOnHas:a=this.updateAgeOnHas,status:s}=t,c=w(this,nt).get(e);if(c!==void 0){const d=w(this,we)[c];if(ie(this,Y,We).call(this,d)&&d.__staleWhileFetching===void 0)return!1;if(w(this,It).call(this,c))s&&(s.has="stale",w(this,An).call(this,s,c));else return a&&w(this,Br).call(this,c),s&&(s.has="hit",w(this,An).call(this,s,c)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){const{allowStale:a=this.allowStale}=t,s=w(this,nt).get(e);if(s===void 0||!a&&w(this,It).call(this,s))return;const c=w(this,we)[s];return ie(this,Y,We).call(this,c)?c.__staleWhileFetching:c}async fetch(e,t={}){const{allowStale:a=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,ttl:d=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL,noDeleteOnFetchRejection:x=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:T=this.allowStaleOnFetchRejection,ignoreFetchAbort:B=this.ignoreFetchAbort,allowStaleOnFetchAbort:O=this.allowStaleOnFetchAbort,context:C,forceRefresh:A=!1,status:b,signal:D}=t;if(!w(this,or))return b&&(b.fetch="get"),this.get(e,{allowStale:a,updateAgeOnGet:s,noDeleteOnStaleGet:c,status:b});const $={allowStale:a,updateAgeOnGet:s,noDeleteOnStaleGet:c,ttl:d,noDisposeOnSet:u,size:p,sizeCalculation:h,noUpdateTTL:g,noDeleteOnFetchRejection:x,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:O,ignoreFetchAbort:B,status:b,signal:D};let j=w(this,nt).get(e);if(j===void 0){b&&(b.fetch="miss");const P=ie(this,Y,cs).call(this,e,j,$,C);return P.__returned=P}else{const P=w(this,we)[j];if(ie(this,Y,We).call(this,P)){const W=a&&P.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",W&&(b.returnedStale=!0)),W?P.__staleWhileFetching:P.__returned=P}const U=w(this,It).call(this,j);if(!A&&!U)return b&&(b.fetch="hit"),ie(this,Y,Io).call(this,j),s&&w(this,Br).call(this,j),b&&w(this,An).call(this,b,j),P;const N=ie(this,Y,cs).call(this,e,j,$,C),M=N.__staleWhileFetching!==void 0&&a;return b&&(b.fetch=U?"stale":"refresh",M&&U&&(b.returnedStale=!0)),M?N.__staleWhileFetching:N.__returned=N}}async forceFetch(e,t={}){const a=await this.fetch(e,t);if(a===void 0)throw new Error("fetch() returned undefined");return a}memo(e,t={}){const a=w(this,oi);if(!a)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:c,...d}=t,u=this.get(e,d);if(!c&&u!==void 0)return u;const p=a(e,u,{options:d,context:s});return this.set(e,p,d),p}get(e,t={}){const{allowStale:a=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,status:d}=t,u=w(this,nt).get(e);if(u!==void 0){const p=w(this,we)[u],h=ie(this,Y,We).call(this,p);return d&&w(this,An).call(this,d,u),w(this,It).call(this,u)?(d&&(d.get="stale"),h?(d&&a&&p.__staleWhileFetching!==void 0&&(d.returnedStale=!0),a?p.__staleWhileFetching:void 0):(c||ie(this,Y,_r).call(this,e,"expire"),d&&a&&(d.returnedStale=!0),a?p:void 0)):(d&&(d.get="hit"),h?p.__staleWhileFetching:(ie(this,Y,Io).call(this,u),s&&w(this,Br).call(this,u),p))}else d&&(d.get="miss")}delete(e){return ie(this,Y,_r).call(this,e,"delete")}clear(){return ie(this,Y,Fc).call(this,"delete")}};on=new WeakMap,At=new WeakMap,an=new WeakMap,sn=new WeakMap,ii=new WeakMap,oi=new WeakMap,rt=new WeakMap,ln=new WeakMap,nt=new WeakMap,Ue=new WeakMap,we=new WeakMap,bt=new WeakMap,Rt=new WeakMap,mt=new WeakMap,st=new WeakMap,cn=new WeakMap,lt=new WeakMap,dn=new WeakMap,un=new WeakMap,Dt=new WeakMap,fn=new WeakMap,or=new WeakMap,kt=new WeakMap,Y=new WeakSet,Mc=function(){const e=new ha(w(this,on)),t=new ha(w(this,on));fe(this,Dt,e),fe(this,un,t),fe(this,uo,(c,d,u=ni.now())=>{if(t[c]=d!==0?u:0,e[c]=d,d!==0&&this.ttlAutopurge){const p=setTimeout(()=>{w(this,It).call(this,c)&&ie(this,Y,_r).call(this,w(this,Ue)[c],"expire")},d+1);p.unref&&p.unref()}}),fe(this,Br,c=>{t[c]=e[c]!==0?ni.now():0}),fe(this,An,(c,d)=>{if(e[d]){const u=e[d],p=t[d];if(!u||!p)return;c.ttl=u,c.start=p,c.now=a||s();const h=c.now-p;c.remainingTTL=u-h}});let a=0;const s=()=>{const c=ni.now();if(this.ttlResolution>0){a=c;const d=setTimeout(()=>a=0,this.ttlResolution);d.unref&&d.unref()}return c};this.getRemainingTTL=c=>{const d=w(this,nt).get(c);if(d===void 0)return 0;const u=e[d],p=t[d];if(!u||!p)return 1/0;const h=(a||s())-p;return u-h},fe(this,It,c=>{const d=t[c],u=e[c];return!!u&&!!d&&(a||s())-d>u})},Br=new WeakMap,An=new WeakMap,uo=new WeakMap,It=new WeakMap,sh=function(){const e=new ha(w(this,on));fe(this,ln,0),fe(this,dn,e),fe(this,Nr,t=>{fe(this,ln,w(this,ln)-e[t]),e[t]=0}),fe(this,fo,(t,a,s,c)=>{if(ie(this,Y,We).call(this,a))return 0;if(!ir(s))if(c){if(typeof c!="function")throw new TypeError("sizeCalculation must be a function");if(s=c(a,t),!ir(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),fe(this,ai,(t,a,s)=>{if(e[t]=a,w(this,At)){const c=w(this,At)-e[t];for(;w(this,ln)>c;)ie(this,Y,ls).call(this,!0)}fe(this,ln,w(this,ln)+e[t]),s&&(s.entrySize=a,s.totalCalculatedSize=w(this,ln))})},Nr=new WeakMap,ai=new WeakMap,fo=new WeakMap,gr=function*({allowStale:e=this.allowStale}={}){if(w(this,rt))for(let t=w(this,st);!(!ie(this,Y,Pc).call(this,t)||((e||!w(this,It).call(this,t))&&(yield t),t===w(this,mt)));)t=w(this,Rt)[t]},yr=function*({allowStale:e=this.allowStale}={}){if(w(this,rt))for(let t=w(this,mt);!(!ie(this,Y,Pc).call(this,t)||((e||!w(this,It).call(this,t))&&(yield t),t===w(this,st)));)t=w(this,bt)[t]},Pc=function(e){return e!==void 0&&w(this,nt).get(w(this,Ue)[e])===e},ls=function(e){var c,d;const t=w(this,mt),a=w(this,Ue)[t],s=w(this,we)[t];return w(this,or)&&ie(this,Y,We).call(this,s)?s.__abortController.abort(new Error("evicted")):(w(this,fn)||w(this,kt))&&(w(this,fn)&&((c=w(this,an))==null||c.call(this,s,a,"evict")),w(this,kt)&&((d=w(this,lt))==null||d.push([s,a,"evict"]))),w(this,Nr).call(this,t),e&&(w(this,Ue)[t]=void 0,w(this,we)[t]=void 0,w(this,cn).push(t)),w(this,rt)===1?(fe(this,mt,fe(this,st,0)),w(this,cn).length=0):fe(this,mt,w(this,bt)[t]),w(this,nt).delete(a),ss(this,rt)._--,t},cs=function(e,t,a,s){const c=t===void 0?void 0:w(this,we)[t];if(ie(this,Y,We).call(this,c))return c;const d=new pa,{signal:u}=a;u==null||u.addEventListener("abort",()=>d.abort(u.reason),{signal:d.signal});const p={signal:d.signal,options:a,context:s},h=(C,A=!1)=>{const{aborted:b}=d.signal,D=a.ignoreFetchAbort&&C!==void 0;if(a.status&&(b&&!A?(a.status.fetchAborted=!0,a.status.fetchError=d.signal.reason,D&&(a.status.fetchAbortIgnored=!0)):a.status.fetchResolved=!0),b&&!D&&!A)return x(d.signal.reason);const $=B;return w(this,we)[t]===B&&(C===void 0?$.__staleWhileFetching?w(this,we)[t]=$.__staleWhileFetching:ie(this,Y,_r).call(this,e,"fetch"):(a.status&&(a.status.fetchUpdated=!0),this.set(e,C,p.options))),C},g=C=>(a.status&&(a.status.fetchRejected=!0,a.status.fetchError=C),x(C)),x=C=>{const{aborted:A}=d.signal,b=A&&a.allowStaleOnFetchAbort,D=b||a.allowStaleOnFetchRejection,$=D||a.noDeleteOnFetchRejection,j=B;if(w(this,we)[t]===B&&(!$||j.__staleWhileFetching===void 0?ie(this,Y,_r).call(this,e,"fetch"):b||(w(this,we)[t]=j.__staleWhileFetching)),D)return a.status&&j.__staleWhileFetching!==void 0&&(a.status.returnedStale=!0),j.__staleWhileFetching;if(j.__returned===j)throw C},T=(C,A)=>{var D;const b=(D=w(this,ii))==null?void 0:D.call(this,e,c,p);b&&b instanceof Promise&&b.then($=>C($===void 0?void 0:$),A),d.signal.addEventListener("abort",()=>{(!a.ignoreFetchAbort||a.allowStaleOnFetchAbort)&&(C(void 0),a.allowStaleOnFetchAbort&&(C=$=>h($,!0)))})};a.status&&(a.status.fetchDispatched=!0);const B=new Promise(T).then(h,g),O=Object.assign(B,{__abortController:d,__staleWhileFetching:c,__returned:void 0});return t===void 0?(this.set(e,O,{...p.options,status:void 0}),t=w(this,nt).get(e)):w(this,we)[t]=O,O},We=function(e){if(!w(this,or))return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof pa},Lc=function(e,t){w(this,Rt)[t]=e,w(this,bt)[e]=t},Io=function(e){e!==w(this,st)&&(e===w(this,mt)?fe(this,mt,w(this,bt)[e]):ie(this,Y,Lc).call(this,w(this,Rt)[e],w(this,bt)[e]),ie(this,Y,Lc).call(this,w(this,st),e),fe(this,st,e))},_r=function(e,t){var s,c,d,u;let a=!1;if(w(this,rt)!==0){const p=w(this,nt).get(e);if(p!==void 0)if(a=!0,w(this,rt)===1)ie(this,Y,Fc).call(this,t);else{w(this,Nr).call(this,p);const h=w(this,we)[p];if(ie(this,Y,We).call(this,h)?h.__abortController.abort(new Error("deleted")):(w(this,fn)||w(this,kt))&&(w(this,fn)&&((s=w(this,an))==null||s.call(this,h,e,t)),w(this,kt)&&((c=w(this,lt))==null||c.push([h,e,t]))),w(this,nt).delete(e),w(this,Ue)[p]=void 0,w(this,we)[p]=void 0,p===w(this,st))fe(this,st,w(this,Rt)[p]);else if(p===w(this,mt))fe(this,mt,w(this,bt)[p]);else{const g=w(this,Rt)[p];w(this,bt)[g]=w(this,bt)[p];const x=w(this,bt)[p];w(this,Rt)[x]=w(this,Rt)[p]}ss(this,rt)._--,w(this,cn).push(p)}}if(w(this,kt)&&((d=w(this,lt))!=null&&d.length)){const p=w(this,lt);let h;for(;h=p==null?void 0:p.shift();)(u=w(this,sn))==null||u.call(this,...h)}return a},Fc=function(e){var t,a,s;for(const c of ie(this,Y,yr).call(this,{allowStale:!0})){const d=w(this,we)[c];if(ie(this,Y,We).call(this,d))d.__abortController.abort(new Error("deleted"));else{const u=w(this,Ue)[c];w(this,fn)&&((t=w(this,an))==null||t.call(this,d,u,e)),w(this,kt)&&((a=w(this,lt))==null||a.push([d,u,e]))}}if(w(this,nt).clear(),w(this,we).fill(void 0),w(this,Ue).fill(void 0),w(this,Dt)&&w(this,un)&&(w(this,Dt).fill(0),w(this,un).fill(0)),w(this,dn)&&w(this,dn).fill(0),fe(this,mt,0),fe(this,st,0),w(this,cn).length=0,fe(this,ln,0),fe(this,rt,0),w(this,kt)&&w(this,lt)){const c=w(this,lt);let d;for(;d=c==null?void 0:c.shift();)(s=w(this,sn))==null||s.call(this,...d)}};let ul=pl;const cC={cacheSize:15e6};class dC{constructor(e){Le(this,"_str");Le(this,"_rawJson");Le(this,"_zodSchema");Le(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Or=class Or{constructor(e){Le(this,"fileDataCache");Le(this,"fileDataRefs",new Map);const t={...cC,...e??{}};this.fileDataCache=new ul({maxSize:t.cacheSize,fetchMethod:async a=>new dC(await Nm().blobDriver.getContent(a)),sizeCalculation:a=>a.bytes.length,dispose:(a,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const t=this.fileDataRefs.get(e);if(t!==void 0)return t;const a=n.shallowRef();return this.fileDataRefs.set(e,a),(async()=>{try{const s=await this.fileDataCache.fetch(e);a.value=s}catch(s){console.error(s)}})(),a}getContentBytes(e){if(e===void 0)return;const t=this.getDataRef(e);return n.computed(()=>{var a;return(a=t.value)==null?void 0:a.bytes})}getContentString(e){if(e===void 0)return;const t=this.getDataRef(e);return n.computed(()=>{var a;return(a=t==null?void 0:t.value)==null?void 0:a.str})}getContentJson(e,t){if(e===void 0)return;const a=this.getDataRef(e);return n.computed(()=>{var s,c;return t===void 0?(s=a==null?void 0:a.value)==null?void 0:s.rawJson:(c=a==null?void 0:a.value)==null?void 0:c.validatedJson(t)})}static getContentBytes(e){return Or.globalInstance.getContentBytes(e)}static getContentString(e){return Or.globalInstance.getContentString(e)}static getContentJson(e,t){return Or.globalInstance.getContentJson(e,t)}};Le(Or,"globalInstance",new Or);let fl=Or;R.BlockLayout=Dv,R.ContextProvider=Uk,R.DataTable=c_,R.DemoData=Ev,R.DropdownListItem=ea,R.GridTable=fy,R.LongText=Gd,R.MaskIcon16=Wi,R.MaskIcon24=Cr,R.MultiError=fs,R.PlAgDataTable=tC,R.PlAgOverlayLoading=hu,R.PlAgOverlayNoRows=mu,R.PlAlert=P_,R.PlBlockPage=x_,R.PlBtnAccent=Z_,R.PlBtnDanger=j_,R.PlBtnGhost=Pd,R.PlBtnGroup=f0,R.PlBtnLink=G_,R.PlBtnPrimary=Md,R.PlBtnSecondary=Hs,R.PlCheckbox=Uw,R.PlCheckboxGroup=qw,R.PlChip=Qs,R.PlContainer=C_,R.PlDialogModal=Yd,R.PlDropdown=Xs,R.PlDropdownLine=Kd,R.PlDropdownMulti=zw,R.PlDropdownRef=rw,R.PlFileDialog=Jd,R.PlFileInput=Zk,R.PlGrid=O_,R.PlLogView=pb,R.PlNumberField=Sw,R.PlProgressBar=ww,R.PlRow=S_,R.PlSlideModal=sb,R.PlSpacer=B_,R.PlTextArea=I0,R.PlTextField=jd,R.PlToggleSwitch=db,R.PlTooltip=Zt,R.ReactiveFileContent=fl,R.Scrollable=D1,R.Slider=e1,R.SliderRange=N1,R.SliderRangeTriple=_1,R.ThemeSwitcher=m_,R.UnresolvedError=us,R.ValueOrErrorsComponent=iC,R.activateAgGrid=ad,R.animate=Td,R.animateInfinite=dy,R.call=xd,R.computedResult=sC,R.createModel=_s,R.debounce=Vd,R.defineApp=Am,R.defineStore=aC,R.delay=vd,R.detectOutside=M0,R.ensureError=ms,R.eventListener=Ys,R.formatZodError=ys,R.getElementScrollPosition=Hd,R.identity=hs,R.isDefined=kh,R.isElementVisible=Wd,R.isJsonEqual=ps,R.isZodError=gs,R.listToOptions=uy,R.makeEaseInOut=cy,R.makeEaseOut=Sd,R.maskIcons16=vv,R.maskIcons24=Cv,R.normalizeListOptions=Gr,R.notEmpty=Ms,R.randomInt=Ed,R.randomString=ly,R.requestTick=Ps,R.scrollIntoView=Qo,R.showContextMenu=$s,R.throttle=Ls,R.timeout=Cd,R.unwrapOptionalResult=bh,R.unwrapValueOrErrors=Uc,R.useClickOutside=Xo,R.useDraggable=s1,R.useEventListener=Ge,R.useFormState=o1,R.useHover=Is,R.useInterval=i1,R.useLabelNotch=vr,R.useLocalStorage=Ad,R.useMouse=Ds,R.useMouseCapture=Yn,R.usePosition=Ld,R.useQuery=a1,R.useResizeObserver=fu,R.useScroll=t1,R.useSdkPlugin=Ss,R.useSortable=r1,R.useTheme=Dd,R.useWatchFetch=bu,R.wrapOptionalResult=jc,R.wrapValueOrErrors=wh,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- {"version":3,"file":"PlAgDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/PlAgDataTable.vue"],"names":[],"mappings":"AAAA,OAmcO,gBAAgB,CAAC;AAiBxB,OAAO,KAAK,EAAU,gBAAgB,EAAqC,MAAM,sBAAsB,CAAC;AASxG,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,SAAS,CAAC;AAOrE,QAAA,IAAI,eAAe,EAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC;AAgXF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,eAAe,CAAC;;;;;;AAwK3B,wBAOG"}
1
+ {"version":3,"file":"PlAgDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/PlAgDataTable.vue"],"names":[],"mappings":"AAAA,OAucO,gBAAgB,CAAC;AAiBxB,OAAO,KAAK,EAAU,gBAAgB,EAAqC,MAAM,sBAAsB,CAAC;AASxG,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,SAAS,CAAC;AAOrE,QAAA,IAAI,eAAe,EAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;CACzC,CAAC;AAoXF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC7B,GAAG,OAAO,eAAe,CAAC;;;;;;AAwK3B,wBAOG"}