@ws-ui/store 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +15 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1005 -982
- package/dist/index.es.js.map +1 -1
- package/dist/modules/model/types.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -138,8 +138,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
138
138
|
`)+j+`return __p
|
|
139
139
|
}`;var ve=xl(function(){return Ce(g,K+"return "+j).apply(r,y)});if(ve.source=j,cs(ve))throw ve;return ve}function f0(t){return Oe(t).toLowerCase()}function d0(t){return Oe(t).toUpperCase()}function p0(t,n,s){if(t=Oe(t),t&&(s||n===r))return Nu(t);if(!t||!(n=Mt(n)))return t;var c=er(t),d=er(n),g=$u(c,d),y=ku(c,d)+1;return Nr(c,g,y).join("")}function h0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.slice(0,ju(t)+1);if(!t||!(n=Mt(n)))return t;var c=er(t),d=ku(c,er(n))+1;return Nr(c,0,d).join("")}function v0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.replace(q,"");if(!t||!(n=Mt(n)))return t;var c=er(t),d=$u(c,er(n));return Nr(c,d).join("")}function g0(t,n){var s=Ge,c=Ue;if(Le(n)){var d="separator"in n?n.separator:d;s="length"in n?he(n.length):s,c="omission"in n?Mt(n.omission):c}t=Oe(t);var g=t.length;if(Cn(t)){var y=er(t);g=y.length}if(s>=g)return t;var w=s-On(c);if(w<1)return c;var T=y?Nr(y,0,w).join(""):t.slice(0,w);if(d===r)return T+c;if(y&&(w+=T.length-w),ls(d)){if(t.slice(w).search(d)){var D,M=T;for(d.global||(d=Ci(d.source,Oe(Bt.exec(d))+"g")),d.lastIndex=0;D=d.exec(M);)var j=D.index;T=T.slice(0,j===r?w:j)}}else if(t.indexOf(Mt(d),w)!=w){var H=T.lastIndexOf(d);H>-1&&(T=T.slice(0,H))}return T+c}function m0(t){return t=Oe(t),t&&Lo.test(t)?t.replace(ko,Gp):t}var y0=Nn(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),ps=Cc("toUpperCase");function Tl(t,n,s){return t=Oe(t),n=s?r:n,n===r?Bp(t)?Kp(t):Dp(t):t.match(n)||[]}var xl=ye(function(t,n){try{return It(t,r,n)}catch(s){return cs(s)?s:new ae(s)}}),b0=yr(function(t,n){return zt(n,function(s){s=cr(s),gr(t,s,ss(t[s],t))}),t});function _0(t){var n=t==null?0:t.length,s=X();return t=n?$e(t,function(c){if(typeof c[1]!="function")throw new Ht(l);return[s(c[0]),c[1]]}):[],ye(function(c){for(var d=-1;++d<n;){var g=t[d];if(It(g[0],this,c))return It(g[1],this,c)}})}function w0(t){return Gh(Gt(t,b))}function hs(t){return function(){return t}}function S0(t,n){return t==null||t!==t?n:t}var E0=Rc(),T0=Rc(!0);function xt(t){return t}function vs(t){return oc(typeof t=="function"?t:Gt(t,b))}function x0(t){return ic(Gt(t,b))}function C0(t,n){return sc(t,Gt(n,b))}var O0=ye(function(t,n){return function(s){return oo(s,t,n)}}),R0=ye(function(t,n){return function(s){return oo(t,s,n)}});function gs(t,n,s){var c=tt(n),d=ca(n,c);s==null&&!(Le(n)&&(d.length||!c.length))&&(s=n,n=t,t=this,d=ca(n,tt(n)));var g=!(Le(s)&&"chain"in s)||!!s.chain,y=_r(t);return zt(d,function(w){var T=n[w];t[w]=T,y&&(t.prototype[w]=function(){var D=this.__chain__;if(g||D){var M=t(this.__wrapped__),j=M.__actions__=St(this.__actions__);return j.push({func:T,args:arguments,thisArg:t}),M.__chain__=D,M}return T.apply(t,Rr([this.value()],arguments))})}),t}function A0(){return nt._===this&&(nt._=th),this}function ms(){}function P0(t){return t=he(t),ye(function(n){return uc(n,t)})}var I0=Yi($e),D0=Yi(Au),M0=Yi(bi);function Cl(t){return ts(t)?_i(cr(t)):cv(t)}function N0(t){return function(n){return t==null?r:dn(t,n)}}var $0=Pc(),k0=Pc(!0);function ys(){return[]}function bs(){return!1}function L0(){return{}}function j0(){return""}function F0(){return!0}function W0(t,n){if(t=he(t),t<1||t>Qe)return[];var s=z,c=at(t,z);n=X(n),t-=z;for(var d=Ei(c,n);++s<t;)n(s);return d}function B0(t){return ce(t)?$e(t,cr):Nt(t)?[t]:St(Gc(Oe(t)))}function U0(t){var n=++Qp;return Oe(t)+n}var z0=va(function(t,n){return t+n},0),H0=Ki("ceil"),q0=va(function(t,n){return t/n},1),G0=Ki("floor");function V0(t){return t&&t.length?ua(t,xt,Ni):r}function Y0(t,n){return t&&t.length?ua(t,X(n,2),Ni):r}function K0(t){return Du(t,xt)}function X0(t,n){return Du(t,X(n,2))}function Z0(t){return t&&t.length?ua(t,xt,ji):r}function J0(t,n){return t&&t.length?ua(t,X(n,2),ji):r}var Q0=va(function(t,n){return t*n},1),eb=Ki("round"),tb=va(function(t,n){return t-n},0);function rb(t){return t&&t.length?Si(t,xt):0}function nb(t,n){return t&&t.length?Si(t,X(n,2)):0}return v.after=xm,v.ary=nl,v.assign=dy,v.assignIn=ml,v.assignInWith=Ra,v.assignWith=py,v.at=hy,v.before=ol,v.bind=ss,v.bindAll=b0,v.bindKey=al,v.castArray=Lm,v.chain=el,v.chunk=Gv,v.compact=Vv,v.concat=Yv,v.cond=_0,v.conforms=w0,v.constant=hs,v.countBy=rm,v.create=vy,v.curry=il,v.curryRight=sl,v.debounce=ul,v.defaults=gy,v.defaultsDeep=my,v.defer=Cm,v.delay=Om,v.difference=Kv,v.differenceBy=Xv,v.differenceWith=Zv,v.drop=Jv,v.dropRight=Qv,v.dropRightWhile=eg,v.dropWhile=tg,v.fill=rg,v.filter=om,v.flatMap=sm,v.flatMapDeep=um,v.flatMapDepth=cm,v.flatten=Xc,v.flattenDeep=ng,v.flattenDepth=og,v.flip=Rm,v.flow=E0,v.flowRight=T0,v.fromPairs=ag,v.functions=Ty,v.functionsIn=xy,v.groupBy=lm,v.initial=sg,v.intersection=ug,v.intersectionBy=cg,v.intersectionWith=lg,v.invert=Oy,v.invertBy=Ry,v.invokeMap=dm,v.iteratee=vs,v.keyBy=pm,v.keys=tt,v.keysIn=Tt,v.map=Sa,v.mapKeys=Py,v.mapValues=Iy,v.matches=x0,v.matchesProperty=C0,v.memoize=Ta,v.merge=Dy,v.mergeWith=yl,v.method=O0,v.methodOf=R0,v.mixin=gs,v.negate=xa,v.nthArg=P0,v.omit=My,v.omitBy=Ny,v.once=Am,v.orderBy=hm,v.over=I0,v.overArgs=Pm,v.overEvery=D0,v.overSome=M0,v.partial=us,v.partialRight=cl,v.partition=vm,v.pick=$y,v.pickBy=bl,v.property=Cl,v.propertyOf=N0,v.pull=hg,v.pullAll=Jc,v.pullAllBy=vg,v.pullAllWith=gg,v.pullAt=mg,v.range=$0,v.rangeRight=k0,v.rearg=Im,v.reject=ym,v.remove=yg,v.rest=Dm,v.reverse=as,v.sampleSize=_m,v.set=Ly,v.setWith=jy,v.shuffle=wm,v.slice=bg,v.sortBy=Tm,v.sortedUniq=Cg,v.sortedUniqBy=Og,v.split=s0,v.spread=Mm,v.tail=Rg,v.take=Ag,v.takeRight=Pg,v.takeRightWhile=Ig,v.takeWhile=Dg,v.tap=Vg,v.throttle=Nm,v.thru=wa,v.toArray=hl,v.toPairs=_l,v.toPairsIn=wl,v.toPath=B0,v.toPlainObject=gl,v.transform=Fy,v.unary=$m,v.union=Mg,v.unionBy=Ng,v.unionWith=$g,v.uniq=kg,v.uniqBy=Lg,v.uniqWith=jg,v.unset=Wy,v.unzip=is,v.unzipWith=Qc,v.update=By,v.updateWith=Uy,v.values=Ln,v.valuesIn=zy,v.without=Fg,v.words=Tl,v.wrap=km,v.xor=Wg,v.xorBy=Bg,v.xorWith=Ug,v.zip=zg,v.zipObject=Hg,v.zipObjectDeep=qg,v.zipWith=Gg,v.entries=_l,v.entriesIn=wl,v.extend=ml,v.extendWith=Ra,gs(v,v),v.add=z0,v.attempt=xl,v.camelCase=Vy,v.capitalize=Sl,v.ceil=H0,v.clamp=Hy,v.clone=jm,v.cloneDeep=Wm,v.cloneDeepWith=Bm,v.cloneWith=Fm,v.conformsTo=Um,v.deburr=El,v.defaultTo=S0,v.divide=q0,v.endsWith=Yy,v.eq=rr,v.escape=Ky,v.escapeRegExp=Xy,v.every=nm,v.find=am,v.findIndex=Yc,v.findKey=yy,v.findLast=im,v.findLastIndex=Kc,v.findLastKey=by,v.floor=G0,v.forEach=tl,v.forEachRight=rl,v.forIn=_y,v.forInRight=wy,v.forOwn=Sy,v.forOwnRight=Ey,v.get=fs,v.gt=zm,v.gte=Hm,v.has=Cy,v.hasIn=ds,v.head=Zc,v.identity=xt,v.includes=fm,v.indexOf=ig,v.inRange=qy,v.invoke=Ay,v.isArguments=vn,v.isArray=ce,v.isArrayBuffer=qm,v.isArrayLike=Et,v.isArrayLikeObject=He,v.isBoolean=Gm,v.isBuffer=$r,v.isDate=Vm,v.isElement=Ym,v.isEmpty=Km,v.isEqual=Xm,v.isEqualWith=Zm,v.isError=cs,v.isFinite=Jm,v.isFunction=_r,v.isInteger=ll,v.isLength=Ca,v.isMap=fl,v.isMatch=Qm,v.isMatchWith=ey,v.isNaN=ty,v.isNative=ry,v.isNil=oy,v.isNull=ny,v.isNumber=dl,v.isObject=Le,v.isObjectLike=Be,v.isPlainObject=lo,v.isRegExp=ls,v.isSafeInteger=ay,v.isSet=pl,v.isString=Oa,v.isSymbol=Nt,v.isTypedArray=kn,v.isUndefined=iy,v.isWeakMap=sy,v.isWeakSet=uy,v.join=fg,v.kebabCase=Zy,v.last=Yt,v.lastIndexOf=dg,v.lowerCase=Jy,v.lowerFirst=Qy,v.lt=cy,v.lte=ly,v.max=V0,v.maxBy=Y0,v.mean=K0,v.meanBy=X0,v.min=Z0,v.minBy=J0,v.stubArray=ys,v.stubFalse=bs,v.stubObject=L0,v.stubString=j0,v.stubTrue=F0,v.multiply=Q0,v.nth=pg,v.noConflict=A0,v.noop=ms,v.now=Ea,v.pad=e0,v.padEnd=t0,v.padStart=r0,v.parseInt=n0,v.random=Gy,v.reduce=gm,v.reduceRight=mm,v.repeat=o0,v.replace=a0,v.result=ky,v.round=eb,v.runInContext=E,v.sample=bm,v.size=Sm,v.snakeCase=i0,v.some=Em,v.sortedIndex=_g,v.sortedIndexBy=wg,v.sortedIndexOf=Sg,v.sortedLastIndex=Eg,v.sortedLastIndexBy=Tg,v.sortedLastIndexOf=xg,v.startCase=u0,v.startsWith=c0,v.subtract=tb,v.sum=rb,v.sumBy=nb,v.template=l0,v.times=W0,v.toFinite=wr,v.toInteger=he,v.toLength=vl,v.toLower=f0,v.toNumber=Kt,v.toSafeInteger=fy,v.toString=Oe,v.toUpper=d0,v.trim=p0,v.trimEnd=h0,v.trimStart=v0,v.truncate=g0,v.unescape=m0,v.uniqueId=U0,v.upperCase=y0,v.upperFirst=ps,v.each=tl,v.eachRight=rl,v.first=Zc,gs(v,function(){var t={};return sr(v,function(n,s){Pe.call(v.prototype,s)||(t[s]=n)}),t}(),{chain:!1}),v.VERSION=a,zt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){v[t].placeholder=v}),zt(["drop","take"],function(t,n){we.prototype[t]=function(s){s=s===r?1:Xe(he(s),0);var c=this.__filtered__&&!n?new we(this):this.clone();return c.__filtered__?c.__takeCount__=at(s,c.__takeCount__):c.__views__.push({size:at(s,z),type:t+(c.__dir__<0?"Right":"")}),c},we.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),zt(["filter","map","takeWhile"],function(t,n){var s=n+1,c=s==Me||s==Je;we.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:X(d,3),type:s}),g.__filtered__=g.__filtered__||c,g}}),zt(["head","last"],function(t,n){var s="take"+(n?"Right":"");we.prototype[t]=function(){return this[s](1).value()[0]}}),zt(["initial","tail"],function(t,n){var s="drop"+(n?"":"Right");we.prototype[t]=function(){return this.__filtered__?new we(this):this[s](1)}}),we.prototype.compact=function(){return this.filter(xt)},we.prototype.find=function(t){return this.filter(t).head()},we.prototype.findLast=function(t){return this.reverse().find(t)},we.prototype.invokeMap=ye(function(t,n){return typeof t=="function"?new we(this):this.map(function(s){return oo(s,t,n)})}),we.prototype.reject=function(t){return this.filter(xa(X(t)))},we.prototype.slice=function(t,n){t=he(t);var s=this;return s.__filtered__&&(t>0||n<0)?new we(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==r&&(n=he(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},we.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},we.prototype.toArray=function(){return this.take(z)},sr(we.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),c=/^(?:head|last)$/.test(n),d=v[c?"take"+(n=="last"?"Right":""):n],g=c||/^find/.test(n);d&&(v.prototype[n]=function(){var y=this.__wrapped__,w=c?[1]:arguments,T=y instanceof we,D=w[0],M=T||ce(y),j=function(_e){var Ee=d.apply(v,Rr([_e],w));return c&&H?Ee[0]:Ee};M&&s&&typeof D=="function"&&D.length!=1&&(T=M=!1);var H=this.__chain__,K=!!this.__actions__.length,Z=g&&!H,ve=T&&!K;if(!g&&M){y=ve?y:new we(this);var J=t.apply(y,w);return J.__actions__.push({func:wa,args:[j],thisArg:r}),new qt(J,H)}return Z&&ve?t.apply(this,w):(J=this.thru(j),Z?c?J.value()[0]:J.value():J)})}),zt(["pop","push","shift","sort","splice","unshift"],function(t){var n=Vo[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);v.prototype[t]=function(){var d=arguments;if(c&&!this.__chain__){var g=this.value();return n.apply(ce(g)?g:[],d)}return this[s](function(y){return n.apply(ce(y)?y:[],d)})}}),sr(we.prototype,function(t,n){var s=v[n];if(s){var c=s.name+"";Pe.call(In,c)||(In[c]=[]),In[c].push({name:n,func:s})}}),In[ha(r,k).name]=[{name:"wrapper",func:r}],we.prototype.clone=mh,we.prototype.reverse=yh,we.prototype.value=bh,v.prototype.at=Yg,v.prototype.chain=Kg,v.prototype.commit=Xg,v.prototype.next=Zg,v.prototype.plant=Qg,v.prototype.reverse=em,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=tm,v.prototype.first=v.prototype.head,Zn&&(v.prototype[Zn]=Jg),v},Rn=Xp();sn?((sn.exports=Rn)._=Rn,vi._=Rn):nt._=Rn}).call(Ss)})(Jf,Jf.exports);var bo=Jf.exports;const QD=ze.createContext(void 0);ze.memo(({children:e,path:o})=>{const r=ze.useMemo(()=>({path:o}),[o]);return ME.jsx(QD.Provider,{value:r,children:e})});function Na(e){return typeof e=="function"}function ET(e){var o=function(a){Error.call(a),a.stack=new Error().stack},r=e(o);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Pb=ET(function(e){return function(o){e(this),this.message=o?o.length+` errors occurred during unsubscription:
|
|
140
140
|
`+o.map(function(r,a){return a+1+") "+r.toString()}).join(`
|
|
141
|
-
`):"",this.name="UnsubscriptionError",this.errors=o}});function b1(e,o){if(e){var r=e.indexOf(o);0<=r&&e.splice(r,1)}}var Rd=function(){function e(o){this.initialTeardown=o,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var o,r,a,i,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=l1(l),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){o={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}else l.remove(this);var m=this.initialTeardown;if(Na(m))try{m()}catch(C){u=C instanceof Pb?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var S=l1(b),x=S.next();!x.done;x=S.next()){var R=x.value;try{fS(R)}catch(C){u=u??[],C instanceof Pb?u=Yf(Yf([],f1(u)),f1(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{x&&!x.done&&(i=S.return)&&i.call(S)}finally{if(a)throw a.error}}}if(u)throw new Pb(u)}},e.prototype.add=function(o){var r;if(o&&o!==this)if(this.closed)fS(o);else{if(o instanceof e){if(o.closed||o._hasParent(this))return;o._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(o)}},e.prototype._hasParent=function(o){var r=this._parentage;return r===o||Array.isArray(r)&&r.includes(o)},e.prototype._addParent=function(o){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(o),r):r?[r,o]:o},e.prototype._removeParent=function(o){var r=this._parentage;r===o?this._parentage=null:Array.isArray(r)&&b1(r,o)},e.prototype.remove=function(o){var r=this._finalizers;r&&b1(r,o),o instanceof e&&o._removeParent(this)},e.EMPTY=function(){var o=new e;return o.closed=!0,o}(),e}(),TT=Rd.EMPTY;function xT(e){return e instanceof Rd||e&&"closed"in e&&Na(e.remove)&&Na(e.add)&&Na(e.unsubscribe)}function fS(e){Na(e)?e():e.unsubscribe()}var CT={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},e2={setTimeout:function(e,o){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return setTimeout.apply(void 0,Yf([e,o],f1(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function t2(e){e2.setTimeout(function(){throw e})}function dS(){}function Mf(e){e()}var OT=function(e){Sd(o,e);function o(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,xT(r)&&r.add(a)):a.destination=a2,a}return o.create=function(r,a,i){return new _1(r,a,i)},o.prototype.next=function(r){this.isStopped||this._next(r)},o.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},o.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(r){this.destination.next(r)},o.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(Rd),r2=Function.prototype.bind;function Ib(e,o){return r2.call(e,o)}var n2=function(){function e(o){this.partialObserver=o}return e.prototype.next=function(o){var r=this.partialObserver;if(r.next)try{r.next(o)}catch(a){bf(a)}},e.prototype.error=function(o){var r=this.partialObserver;if(r.error)try{r.error(o)}catch(a){bf(a)}else bf(o)},e.prototype.complete=function(){var o=this.partialObserver;if(o.complete)try{o.complete()}catch(r){bf(r)}},e}(),_1=function(e){Sd(o,e);function o(r,a,i){var u=e.call(this)||this,l;if(Na(r)||!r)l={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&CT.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},l={next:r.next&&Ib(r.next,f),error:r.error&&Ib(r.error,f),complete:r.complete&&Ib(r.complete,f)}):l=r}return u.destination=new n2(l),u}return o}(OT);function bf(e){t2(e)}function o2(e){throw e}var a2={closed:!0,next:dS,error:o2,complete:dS},i2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function s2(e){return e}function u2(e){return e.length===0?s2:e.length===1?e[0]:function(o){return e.reduce(function(r,a){return a(r)},o)}}var pS=function(){function e(o){o&&(this._subscribe=o)}return e.prototype.lift=function(o){var r=new e;return r.source=this,r.operator=o,r},e.prototype.subscribe=function(o,r,a){var i=this,u=l2(o)?o:new _1(o,r,a);return Mf(function(){var l=i,f=l.operator,p=l.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(o){try{return this._subscribe(o)}catch(r){o.error(r)}},e.prototype.forEach=function(o,r){var a=this;return r=hS(r),new r(function(i,u){var l=new _1({next:function(f){try{o(f)}catch(p){u(p),l.unsubscribe()}},error:u,complete:i});a.subscribe(l)})},e.prototype._subscribe=function(o){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(o)},e.prototype[i2]=function(){return this},e.prototype.pipe=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return u2(o)(this)},e.prototype.toPromise=function(o){var r=this;return o=hS(o),new o(function(a,i){var u;r.subscribe(function(l){return u=l},function(l){return i(l)},function(){return a(u)})})},e.create=function(o){return new e(o)},e}();function hS(e){var o;return(o=e??CT.Promise)!==null&&o!==void 0?o:Promise}function c2(e){return e&&Na(e.next)&&Na(e.error)&&Na(e.complete)}function l2(e){return e&&e instanceof OT||c2(e)&&xT(e)}var f2=ET(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ks=function(e){Sd(o,e);function o(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var a=new vS(this,this);return a.operator=r,a},o.prototype._throwIfClosed=function(){if(this.closed)throw new f2},o.prototype.next=function(r){var a=this;Mf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var l=l1(a.currentObservers),f=l.next();!f.done;f=l.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(i)throw i.error}}}})},o.prototype.error=function(r){var a=this;Mf(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=r;for(var i=a.observers;i.length;)i.shift().error(r)}})},o.prototype.complete=function(){var r=this;Mf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,l=i.isStopped,f=i.observers;return u||l?TT:(this.currentObservers=null,f.push(r),new Rd(function(){a.currentObservers=null,b1(f,r)}))},o.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,l=a.isStopped;i?r.error(u):l&&r.complete()},o.prototype.asObservable=function(){var r=new pS;return r.source=this,r},o.create=function(r,a){return new vS(r,a)},o}(pS),vS=function(e){Sd(o,e);function o(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return o.prototype.next=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.next)===null||i===void 0||i.call(a,r)},o.prototype.error=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.error)===null||i===void 0||i.call(a,r)},o.prototype.complete=function(){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||a===void 0||a.call(r)},o.prototype._subscribe=function(r){var a,i;return(i=(a=this.source)===null||a===void 0?void 0:a.subscribe(r))!==null&&i!==void 0?i:TT},o}(Ks),RT=(e=>(e.RELOAD="reload",e))(RT||{}),g_=(e=>(e.RENAME="rename",e))(g_||{});const AT=new Ks,d2=new Ks,Oo=new Ks;new Ks;var Ma=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e))(Ma||{});const Va=new Ks;function PT(e){if(e==="")throw new Error("Please enter a valid name");if(!/^[a-zA-Z]/i.test(e))throw new Error("The name can only start with a letter");if(!/^[\w-]+$/i.test(e))throw new Error("Invalid name");return!0}function IT(e){const o=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(o,"")}var Fs=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(Fs||{});const jt={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var ie=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.METHOD="method",e.CLASS="class",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e))(ie||{}),Xt=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(Xt||{}),m_=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(m_||{});const Wr="roles.json";function DT(e){const o=e.split("."),r=o.pop(),a=o.join(".").split("/")[0];switch(!0){case r==="4DModel":return ie.MODEL;case r==="WebForm":return ie.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&a===jt.METHODS):return ie.METHOD;case(["4dm","4qs","4qm"].includes(r)&&a===jt.CLASSES):return ie.CLASS;case e===Wr:return ie.ROLES;default:return ie.WEBFORM}}function ks(e,o=!1){switch(e){case jt.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case jt.CLASSES:case jt.METHODS:return o?"4qs":"4dm";default:return""}}class p2{constructor(){RA(this,"current",Promise.resolve())}lock(){let o;const r=new Promise(i=>{o=i}),a=this.current.then(()=>o);return this.current=r,a}}function MT(){const e=new p2;return async o=>{const r=await e.lock(),a=await o();return r(),a}}const mn=bo.curry((e,o,r)=>e&&bo.get(r,e)===o),h2=bo.curry((e,o,r)=>bo.get(r,e)!==o),v2=bo.curry((e,o)=>bo.get(o,"id")!==e),g2=bo.curry((e,o)=>bo.get(o,"id")===e);bo.curry((e,o)=>bo.get(o,"path")===e);function m2(e="id",o,r){return r.findIndex(mn(e,o))!==-1}function Qf(e){if(!e)return"";const{id:o,namespace:r}=e;return r?`${r}:${o}`:o}function y2(e){return e.dataType==="array"}function y_(e){return e.dataType==="object"}function b2(e){return e.type==="scalar"}function NT(e){return y2(e)||y_(e)||b2(e)}var ed=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(ed||{}),$T=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))($T||{});function b_(e){var o;let r={};try{const u=((o=e.match(/\/\/%attributes = (.*)/))==null?void 0:o[1])||"";r=JSON.parse(u)}catch{}const{published4DMobile:a,...i}=r;return{invisible:!1,shared:!1,executedOnServer:!1,preemptive:ed.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!a,publishedRestOptions:a||{table:"",scope:$T.table},...i}}function _2(e){const o={};return e.invisible&&(o.invisible=!0),e.shared&&(o.shared=!0),e.executedOnServer&&(o.executedOnServer=!0),e.preemptive&&[ed.capable,ed.incapable].includes(e.preemptive)&&(o.preemptive=e.preemptive),e.publishedSoap&&(o.publishedSoap=!0,e.publishedWsdl&&(o.publishedWsdl=!0)),e.publishedWeb&&(o.publishedWeb=!0),e.publishedSql&&(o.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(o.published4DMobile=e.publishedRestOptions),JSON.stringify(o).replace(/"(true|false)"/g,"$1")}function kT(e,o,r=!1){const a=bo.isString(o)?o:_2(o);if(!r&&w2(e))return e;const i=S2(e);return`//%attributes = ${a}\r
|
|
142
|
-
${i}`}function w2(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function S2(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const Jr="/rest/$designer",E2="/rest/$designer-ext",LT="/$shared";class gS extends Error{constructor(o,r,a){super(),this.url=o,this.response=r,this.data=a}log(){console.error("Error while sending the request",this)}}async function dr(e,o){const r=await window.fetch(e,o);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const i=await r.json();a=new gS(e,r,i)}catch{a=new gS(e,r)}throw a.log(),a}return await r.json()}const T2=()=>{const{host:e,protocol:o}=window.location,r=o==="https:";return{projectOpened:!1,remoteDebuggerMode:m_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function x2(){const{hostname:e,host:o,protocol:r}=window.location,a=r==="https:";try{const i=await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(i.rendererPath)return i.rendererPath;const l=`http://${e}:${i.webServerHTTPPort}`,f=`https://${e}:${i.webServerHTTPSPort}`;return i.webServerHTTPPort&&i.webServerHTTPSPort?a?f:l:i.webServerHTTPPort?l:f})();return{projectOpened:i.webServerHTTPSPort>0||i.webServerHTTPPort>0,remoteDebuggerMode:i.remoteDebuggerMode,baseUrl:u,qodly:typeof i.qodly>"u"?!0:i.qodly,urls:{renderer:i.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${a?"s":""}://${o}/remoteDebugger`,lsp:`ws${a?"s":""}://${o}/LSP`},isRestActive:i.isRESTActive}}catch(i){return console.error(i),T2()}}async function C2(e){return await dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function O2(...e){return(await Promise.all(e.map(o=>C2({root:o,verb:Xt.GET_FOLDER})))).map(({children:o})=>o.map(({name:r,date:a,type:i})=>({name:r,type:i,date:a,path:`${i}/${r}`}))).flat()}function R2(e){return dr(Jr,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(o=>({...o,content:[ie.METHOD,ie.CLASS].includes(o.type)?IT(o.content):o.content}))}async function A2(e){return e.type==="folder"?(await dr(E2,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function jT(...e){return await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function P2(){return await dr("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function I2({name:e,path:o="",root:r="root",asText:a=!1}){return dr(Jr,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:o,name:e,asText:a}),headers:new Headers({"Content-Type":"application/json"})})}async function D2(){try{const e=await dr(`${LT}/shared_datasources.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{}}}async function M2(){try{const e=await dr(`${LT}/shared_css.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{classes:[]}}}const N2=MT(),Qa=async e=>{const o={verb:Xt.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return N2(async()=>(await dr(Jr,{method:"POST",body:JSON.stringify(o),headers:new Headers({"Content-Type":"application/json"})}),e))},Ad=async e=>{const o=await dr(Jr,{method:"POST",body:JSON.stringify({...e,verb:Xt.SET_FILE_CONTENT,root:Fs.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=DT(`${e.path||"Sources"}/${e.name}`);return{...o,type:r,size:0}},__=async e=>await Ad({name:"crafted_components.json",path:jt.WEBFORMS,content:e});function $2(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function FT(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function w1(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ei(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(o=>Array.isArray(o)?o:{...o,content:["4dm","4qm","4qs"].includes(o.ext)?IT(o.content):o.content})}function k2(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}var xs=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(xs||{});const L2={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};var WT=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(WT||{}),$a=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))($a||{}),td=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(td||{}),BT=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(BT||{});const w_={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles"},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:$a.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},UT="4DWS_PREFS",zT=e=>`APP_STATE_${e}`;function HT(e){var o,r;try{const a=((r=(o=window==null?void 0:window.$$datastores)==null?void 0:o.ds)==null?void 0:r.getBaseID())||"",i=JSON.stringify(e);localStorage.setItem(zT(a),i)}catch(a){console.error(a)}}function qT(e){try{const o=JSON.stringify(e);localStorage.setItem(UT,o)}catch(o){console.error(o)}}function GT(){try{const e=localStorage.getItem(UT);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Xs(){var r,a;const e=((a=(r=window==null?void 0:window.$$datastores)==null?void 0:r.ds)==null?void 0:a.getBaseID())||"",o=localStorage.getItem(zT(e));if(o){const i=JSON.parse(o);return i.tabs=i.tabs.map(u=>({...u,flags:{...u.flags,enabled:!0}})),i}return w_}function Pd(e){const{name:o,type:r,path:a}=e,i=a.split(".").at(-1);switch(r){case ie.WEBFORM:return`${o}.WebForm`;case ie.METHOD:case ie.CLASS:return i?`${o}.${i}`:o;case ie.ROLES:return o;default:return`${o}.${r}`}}const VT=e=>{if(!e)return[];const o=new Map;return e.dataClasses.forEach(r=>{var u,l;const a=r.extraProperties||{},i={id:r.className,type:"table",position:{x:((u=a.position)==null?void 0:u.x)||0,y:((l=a.position)==null?void 0:l.y)||0},dragHandle:".custom-drag-handle",data:r};o.set(r.name,i)}),Array.from(o.values())};function YT(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function j2(){this.__data__=[],this.size=0}var F2=j2;function W2(e,o){return e===o||e!==e&&o!==o}var B2=W2,U2=B2;function z2(e,o){for(var r=e.length;r--;)if(U2(e[r][0],o))return r;return-1}var Id=z2,H2=Id,q2=Array.prototype,G2=q2.splice;function V2(e){var o=this.__data__,r=H2(o,e);if(r<0)return!1;var a=o.length-1;return r==a?o.pop():G2.call(o,r,1),--this.size,!0}var Y2=V2,K2=Id;function X2(e){var o=this.__data__,r=K2(o,e);return r<0?void 0:o[r][1]}var Z2=X2,J2=Id;function Q2(e){return J2(this.__data__,e)>-1}var eM=Q2,tM=Id;function rM(e,o){var r=this.__data__,a=tM(r,e);return a<0?(++this.size,r.push([e,o])):r[a][1]=o,this}var nM=rM,oM=F2,aM=Y2,iM=Z2,sM=eM,uM=nM;function Zs(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}Zs.prototype.clear=oM;Zs.prototype.delete=aM;Zs.prototype.get=iM;Zs.prototype.has=sM;Zs.prototype.set=uM;var Dd=Zs,cM=Dd;function lM(){this.__data__=new cM,this.size=0}var fM=lM;function dM(e){var o=this.__data__,r=o.delete(e);return this.size=o.size,r}var pM=dM;function hM(e){return this.__data__.get(e)}var vM=hM;function gM(e){return this.__data__.has(e)}var mM=gM,yM=md,bM=Zl,_M="[object AsyncFunction]",wM="[object Function]",SM="[object GeneratorFunction]",EM="[object Proxy]";function TM(e){if(!bM(e))return!1;var o=yM(e);return o==wM||o==SM||o==_M||o==EM}var xM=TM,CM=Po,OM=CM["__core-js_shared__"],RM=OM,Db=RM,mS=function(){var e=/[^.]+$/.exec(Db&&Db.keys&&Db.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function AM(e){return!!mS&&mS in e}var PM=AM,IM=Function.prototype,DM=IM.toString;function MM(e){if(e!=null){try{return DM.call(e)}catch{}try{return e+""}catch{}}return""}var KT=MM,NM=xM,$M=PM,kM=Zl,LM=KT,jM=/[\\^$.*+?()[\]{}|]/g,FM=/^\[object .+?Constructor\]$/,WM=Function.prototype,BM=Object.prototype,UM=WM.toString,zM=BM.hasOwnProperty,HM=RegExp("^"+UM.call(zM).replace(jM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qM(e){if(!kM(e)||$M(e))return!1;var o=NM(e)?HM:FM;return o.test(LM(e))}var GM=qM;function VM(e,o){return e==null?void 0:e[o]}var YM=VM,KM=GM,XM=YM;function ZM(e,o){var r=XM(e,o);return KM(r)?r:void 0}var Js=ZM,JM=Js,QM=Po,eN=JM(QM,"Map"),S_=eN,tN=Js,rN=tN(Object,"create"),Md=rN,yS=Md;function nN(){this.__data__=yS?yS(null):{},this.size=0}var oN=nN;function aN(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}var iN=aN,sN=Md,uN="__lodash_hash_undefined__",cN=Object.prototype,lN=cN.hasOwnProperty;function fN(e){var o=this.__data__;if(sN){var r=o[e];return r===uN?void 0:r}return lN.call(o,e)?o[e]:void 0}var dN=fN,pN=Md,hN=Object.prototype,vN=hN.hasOwnProperty;function gN(e){var o=this.__data__;return pN?o[e]!==void 0:vN.call(o,e)}var mN=gN,yN=Md,bN="__lodash_hash_undefined__";function _N(e,o){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yN&&o===void 0?bN:o,this}var wN=_N,SN=oN,EN=iN,TN=dN,xN=mN,CN=wN;function Qs(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}Qs.prototype.clear=SN;Qs.prototype.delete=EN;Qs.prototype.get=TN;Qs.prototype.has=xN;Qs.prototype.set=CN;var ON=Qs,bS=ON,RN=Dd,AN=S_;function PN(){this.size=0,this.__data__={hash:new bS,map:new(AN||RN),string:new bS}}var IN=PN;function DN(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}var MN=DN,NN=MN;function $N(e,o){var r=e.__data__;return NN(o)?r[typeof o=="string"?"string":"hash"]:r.map}var Nd=$N,kN=Nd;function LN(e){var o=kN(this,e).delete(e);return this.size-=o?1:0,o}var jN=LN,FN=Nd;function WN(e){return FN(this,e).get(e)}var BN=WN,UN=Nd;function zN(e){return UN(this,e).has(e)}var HN=zN,qN=Nd;function GN(e,o){var r=qN(this,e),a=r.size;return r.set(e,o),this.size+=r.size==a?0:1,this}var VN=GN,YN=IN,KN=jN,XN=BN,ZN=HN,JN=VN;function eu(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}eu.prototype.clear=YN;eu.prototype.delete=KN;eu.prototype.get=XN;eu.prototype.has=ZN;eu.prototype.set=JN;var XT=eu,QN=Dd,e$=S_,t$=XT,r$=200;function n$(e,o){var r=this.__data__;if(r instanceof QN){var a=r.__data__;if(!e$||a.length<r$-1)return a.push([e,o]),this.size=++r.size,this;r=this.__data__=new t$(a)}return r.set(e,o),this.size=r.size,this}var o$=n$,a$=Dd,i$=fM,s$=pM,u$=vM,c$=mM,l$=o$;function of(e){var o=this.__data__=new a$(e);this.size=o.size}of.prototype.clear=i$;of.prototype.delete=s$;of.prototype.get=u$;of.prototype.has=c$;of.prototype.set=l$;var f$="__lodash_hash_undefined__";function d$(e){return this.__data__.set(e,f$),this}var p$=d$;function h$(e){return this.__data__.has(e)}var v$=h$,g$=XT,m$=p$,y$=v$;function S1(e){var o=-1,r=e==null?0:e.length;for(this.__data__=new g$;++o<r;)this.add(e[o])}S1.prototype.add=S1.prototype.push=m$;S1.prototype.has=y$;var b$=Po;b$.Uint8Array;var _S=t_,wS=_S?_S.prototype:void 0;wS&&wS.valueOf;var _$=md,w$=r_,S$="[object Arguments]";function E$(e){return w$(e)&&_$(e)==S$}var T$=E$,SS=T$,x$=r_,ZT=Object.prototype,C$=ZT.hasOwnProperty,O$=ZT.propertyIsEnumerable;SS(function(){return arguments}());var rd={exports:{}};function R$(){return!1}var A$=R$;rd.exports;(function(e,o){var r=Po,a=A$,i=o&&!o.nodeType&&o,u=i&&!0&&e&&!e.nodeType&&e,l=u&&u.exports===i,f=l?r.Buffer:void 0,p=f?f.isBuffer:void 0,h=p||a;e.exports=h})(rd,rd.exports);rd.exports;var nd={exports:{}};nd.exports;(function(e,o){var r=IE,a=o&&!o.nodeType&&o,i=a&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===a,l=u&&r.process,f=function(){try{var p=i&&i.require&&i.require("util").types;return p||l&&l.binding&&l.binding("util")}catch{}}();e.exports=f})(nd,nd.exports);var P$=nd.exports,ES=P$;ES&&ES.isTypedArray;var I$=Js,D$=Po,M$=I$(D$,"DataView"),N$=M$,$$=Js,k$=Po,L$=$$(k$,"Promise"),j$=L$,F$=Js,W$=Po,B$=F$(W$,"Set"),U$=B$,z$=Js,H$=Po,q$=z$(H$,"WeakMap"),G$=q$,E1=N$,T1=S_,x1=j$,C1=U$,O1=G$,JT=md,tu=KT,TS="[object Map]",V$="[object Object]",xS="[object Promise]",CS="[object Set]",OS="[object WeakMap]",RS="[object DataView]",Y$=tu(E1),K$=tu(T1),X$=tu(x1),Z$=tu(C1),J$=tu(O1),Ds=JT;(E1&&Ds(new E1(new ArrayBuffer(1)))!=RS||T1&&Ds(new T1)!=TS||x1&&Ds(x1.resolve())!=xS||C1&&Ds(new C1)!=CS||O1&&Ds(new O1)!=OS)&&(Ds=function(e){var o=JT(e),r=o==V$?e.constructor:void 0,a=r?tu(r):"";if(a)switch(a){case Y$:return RS;case K$:return TS;case X$:return xS;case Z$:return CS;case J$:return OS}return o});const Q$="ROOT";TO(),EO();var AS;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(AS||(AS={}));var od={exports:{}};/**
|
|
141
|
+
`):"",this.name="UnsubscriptionError",this.errors=o}});function b1(e,o){if(e){var r=e.indexOf(o);0<=r&&e.splice(r,1)}}var Rd=function(){function e(o){this.initialTeardown=o,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var o,r,a,i,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=l1(l),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){o={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}else l.remove(this);var m=this.initialTeardown;if(Na(m))try{m()}catch(C){u=C instanceof Pb?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var S=l1(b),x=S.next();!x.done;x=S.next()){var R=x.value;try{fS(R)}catch(C){u=u??[],C instanceof Pb?u=Yf(Yf([],f1(u)),f1(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{x&&!x.done&&(i=S.return)&&i.call(S)}finally{if(a)throw a.error}}}if(u)throw new Pb(u)}},e.prototype.add=function(o){var r;if(o&&o!==this)if(this.closed)fS(o);else{if(o instanceof e){if(o.closed||o._hasParent(this))return;o._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(o)}},e.prototype._hasParent=function(o){var r=this._parentage;return r===o||Array.isArray(r)&&r.includes(o)},e.prototype._addParent=function(o){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(o),r):r?[r,o]:o},e.prototype._removeParent=function(o){var r=this._parentage;r===o?this._parentage=null:Array.isArray(r)&&b1(r,o)},e.prototype.remove=function(o){var r=this._finalizers;r&&b1(r,o),o instanceof e&&o._removeParent(this)},e.EMPTY=function(){var o=new e;return o.closed=!0,o}(),e}(),TT=Rd.EMPTY;function xT(e){return e instanceof Rd||e&&"closed"in e&&Na(e.remove)&&Na(e.add)&&Na(e.unsubscribe)}function fS(e){Na(e)?e():e.unsubscribe()}var CT={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},e2={setTimeout:function(e,o){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return setTimeout.apply(void 0,Yf([e,o],f1(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function t2(e){e2.setTimeout(function(){throw e})}function dS(){}function Mf(e){e()}var OT=function(e){Sd(o,e);function o(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,xT(r)&&r.add(a)):a.destination=a2,a}return o.create=function(r,a,i){return new _1(r,a,i)},o.prototype.next=function(r){this.isStopped||this._next(r)},o.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},o.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(r){this.destination.next(r)},o.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(Rd),r2=Function.prototype.bind;function Ib(e,o){return r2.call(e,o)}var n2=function(){function e(o){this.partialObserver=o}return e.prototype.next=function(o){var r=this.partialObserver;if(r.next)try{r.next(o)}catch(a){bf(a)}},e.prototype.error=function(o){var r=this.partialObserver;if(r.error)try{r.error(o)}catch(a){bf(a)}else bf(o)},e.prototype.complete=function(){var o=this.partialObserver;if(o.complete)try{o.complete()}catch(r){bf(r)}},e}(),_1=function(e){Sd(o,e);function o(r,a,i){var u=e.call(this)||this,l;if(Na(r)||!r)l={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&CT.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},l={next:r.next&&Ib(r.next,f),error:r.error&&Ib(r.error,f),complete:r.complete&&Ib(r.complete,f)}):l=r}return u.destination=new n2(l),u}return o}(OT);function bf(e){t2(e)}function o2(e){throw e}var a2={closed:!0,next:dS,error:o2,complete:dS},i2=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function s2(e){return e}function u2(e){return e.length===0?s2:e.length===1?e[0]:function(o){return e.reduce(function(r,a){return a(r)},o)}}var pS=function(){function e(o){o&&(this._subscribe=o)}return e.prototype.lift=function(o){var r=new e;return r.source=this,r.operator=o,r},e.prototype.subscribe=function(o,r,a){var i=this,u=l2(o)?o:new _1(o,r,a);return Mf(function(){var l=i,f=l.operator,p=l.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(o){try{return this._subscribe(o)}catch(r){o.error(r)}},e.prototype.forEach=function(o,r){var a=this;return r=hS(r),new r(function(i,u){var l=new _1({next:function(f){try{o(f)}catch(p){u(p),l.unsubscribe()}},error:u,complete:i});a.subscribe(l)})},e.prototype._subscribe=function(o){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(o)},e.prototype[i2]=function(){return this},e.prototype.pipe=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return u2(o)(this)},e.prototype.toPromise=function(o){var r=this;return o=hS(o),new o(function(a,i){var u;r.subscribe(function(l){return u=l},function(l){return i(l)},function(){return a(u)})})},e.create=function(o){return new e(o)},e}();function hS(e){var o;return(o=e??CT.Promise)!==null&&o!==void 0?o:Promise}function c2(e){return e&&Na(e.next)&&Na(e.error)&&Na(e.complete)}function l2(e){return e&&e instanceof OT||c2(e)&&xT(e)}var f2=ET(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ks=function(e){Sd(o,e);function o(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var a=new vS(this,this);return a.operator=r,a},o.prototype._throwIfClosed=function(){if(this.closed)throw new f2},o.prototype.next=function(r){var a=this;Mf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var l=l1(a.currentObservers),f=l.next();!f.done;f=l.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(i)throw i.error}}}})},o.prototype.error=function(r){var a=this;Mf(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=r;for(var i=a.observers;i.length;)i.shift().error(r)}})},o.prototype.complete=function(){var r=this;Mf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,l=i.isStopped,f=i.observers;return u||l?TT:(this.currentObservers=null,f.push(r),new Rd(function(){a.currentObservers=null,b1(f,r)}))},o.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,l=a.isStopped;i?r.error(u):l&&r.complete()},o.prototype.asObservable=function(){var r=new pS;return r.source=this,r},o.create=function(r,a){return new vS(r,a)},o}(pS),vS=function(e){Sd(o,e);function o(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return o.prototype.next=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.next)===null||i===void 0||i.call(a,r)},o.prototype.error=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.error)===null||i===void 0||i.call(a,r)},o.prototype.complete=function(){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||a===void 0||a.call(r)},o.prototype._subscribe=function(r){var a,i;return(i=(a=this.source)===null||a===void 0?void 0:a.subscribe(r))!==null&&i!==void 0?i:TT},o}(Ks),RT=(e=>(e.RELOAD="reload",e))(RT||{}),g_=(e=>(e.RENAME="rename",e))(g_||{});const AT=new Ks,d2=new Ks,Oo=new Ks;new Ks;var Ma=(e=>(e.WILL_SAVE="will-save",e.DID_SAVE="did-save",e.WILL_CREATE="will-create",e.WILL_RENAME="will-rename",e.WILL_DELETE="will-delete",e.DID_CREATE="did-create",e.DID_RENAME="did-rename",e.DID_DELETE="did-delete",e))(Ma||{});const Va=new Ks;function PT(e){if(e==="")throw new Error("Please enter a valid name");if(!/^[a-zA-Z]/i.test(e))throw new Error("The name can only start with a letter");if(!/^[\w-]+$/i.test(e))throw new Error("Invalid name");return!0}function IT(e){const o=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(o,"")}var Fs=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(Fs||{});const jt={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var ie=(e=>(e.FOLDER="folder",e.WEBFORM="webform",e.METHOD="method",e.CLASS="class",e.DEBUGGER="debugger",e.WELCOME="welcome",e.SETTINGS="settings",e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.DEBUGGERS="debugger",e.MODELS="models",e.ROLES="roles",e.MODEL="model",e.DATA_EXPLORER="dataexplorer",e.MOBILE="mobile",e.MOBILEFORM="mform",e.FILE="file",e))(ie||{}),Xt=(e=>(e.GET_FOLDER="getFolder",e.GET="get",e.SAVE="save",e.RENAME="rename",e.DROP="drop",e.ADD_FOLDER="addFolder",e.CREATE_FOLDER="mkdir",e.RENAME_FOLDER="renameFolder",e.DROP_FOLDER="dropFolder",e.REMOVE_ITEM="removeItem",e.MOVE_ITEM="moveItem",e.GET_INFO="getInfo",e.SAVE_CONTENT="save",e.UPDATE_CHECK="update:check",e.UPDATE_INSTALL="update:install",e.GET_APP_SETTINGS="getWebServerInfo",e.GET_FILE_CONTENT="getFileContent",e.SET_FILE_CONTENT="setFileContent",e.GET_FILES_INFO="getFilesInfo",e))(Xt||{}),m_=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(m_||{});const Wr="roles.json",y_="model.4DModel";function DT(e){const o=e.split("."),r=o.pop(),a=o.join(".").split("/")[0];switch(!0){case r==="4DModel":return ie.MODEL;case r==="WebForm":return ie.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&a===jt.METHODS):return ie.METHOD;case(["4dm","4qs","4qm"].includes(r)&&a===jt.CLASSES):return ie.CLASS;case e===Wr:return ie.ROLES;default:return ie.WEBFORM}}function ks(e,o=!1){switch(e){case jt.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case jt.CLASSES:case jt.METHODS:return o?"4qs":"4dm";default:return""}}class p2{constructor(){RA(this,"current",Promise.resolve())}lock(){let o;const r=new Promise(i=>{o=i}),a=this.current.then(()=>o);return this.current=r,a}}function MT(){const e=new p2;return async o=>{const r=await e.lock(),a=await o();return r(),a}}const mn=bo.curry((e,o,r)=>e&&bo.get(r,e)===o),h2=bo.curry((e,o,r)=>bo.get(r,e)!==o),v2=bo.curry((e,o)=>bo.get(o,"id")!==e),g2=bo.curry((e,o)=>bo.get(o,"id")===e);bo.curry((e,o)=>bo.get(o,"path")===e);function m2(e="id",o,r){return r.findIndex(mn(e,o))!==-1}function Qf(e){if(!e)return"";const{id:o,namespace:r}=e;return r?`${r}:${o}`:o}function y2(e){return e.dataType==="array"}function b_(e){return e.dataType==="object"}function b2(e){return e.type==="scalar"}function NT(e){return y2(e)||b_(e)||b2(e)}var ed=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(ed||{}),$T=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))($T||{});function __(e){var o;let r={};try{const u=((o=e.match(/\/\/%attributes = (.*)/))==null?void 0:o[1])||"";r=JSON.parse(u)}catch{}const{published4DMobile:a,...i}=r;return{invisible:!1,shared:!1,executedOnServer:!1,preemptive:ed.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!a,publishedRestOptions:a||{table:"",scope:$T.table},...i}}function _2(e){const o={};return e.invisible&&(o.invisible=!0),e.shared&&(o.shared=!0),e.executedOnServer&&(o.executedOnServer=!0),e.preemptive&&[ed.capable,ed.incapable].includes(e.preemptive)&&(o.preemptive=e.preemptive),e.publishedSoap&&(o.publishedSoap=!0,e.publishedWsdl&&(o.publishedWsdl=!0)),e.publishedWeb&&(o.publishedWeb=!0),e.publishedSql&&(o.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(o.published4DMobile=e.publishedRestOptions),JSON.stringify(o).replace(/"(true|false)"/g,"$1")}function kT(e,o,r=!1){const a=bo.isString(o)?o:_2(o);if(!r&&w2(e))return e;const i=S2(e);return`//%attributes = ${a}\r
|
|
142
|
+
${i}`}function w2(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function S2(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const Jr="/rest/$designer",E2="/rest/$designer-ext",LT="/$shared";class gS extends Error{constructor(o,r,a){super(),this.url=o,this.response=r,this.data=a}log(){console.error("Error while sending the request",this)}}async function dr(e,o){const r=await window.fetch(e,o);if(/401/.test(r.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(r.status.toString())){let a;try{const i=await r.json();a=new gS(e,r,i)}catch{a=new gS(e,r)}throw a.log(),a}return await r.json()}const T2=()=>{const{host:e,protocol:o}=window.location,r=o==="https:";return{projectOpened:!1,remoteDebuggerMode:m_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function x2(){const{hostname:e,host:o,protocol:r}=window.location,a=r==="https:";try{const i=await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(i.rendererPath)return i.rendererPath;const l=`http://${e}:${i.webServerHTTPPort}`,f=`https://${e}:${i.webServerHTTPSPort}`;return i.webServerHTTPPort&&i.webServerHTTPSPort?a?f:l:i.webServerHTTPPort?l:f})();return{projectOpened:i.webServerHTTPSPort>0||i.webServerHTTPPort>0,remoteDebuggerMode:i.remoteDebuggerMode,baseUrl:u,qodly:typeof i.qodly>"u"?!0:i.qodly,urls:{renderer:i.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${a?"s":""}://${o}/remoteDebugger`,lsp:`ws${a?"s":""}://${o}/LSP`},isRestActive:i.isRESTActive}}catch(i){return console.error(i),T2()}}async function C2(e){return await dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function O2(...e){return(await Promise.all(e.map(o=>C2({root:o,verb:Xt.GET_FOLDER})))).map(({children:o})=>o.map(({name:r,date:a,type:i})=>({name:r,type:i,date:a,path:`${i}/${r}`}))).flat()}function R2(e){return dr(Jr,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(o=>({...o,content:[ie.METHOD,ie.CLASS].includes(o.type)?IT(o.content):o.content}))}async function A2(e){return e.type==="folder"?(await dr(E2,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function jT(...e){return await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function P2(){return await dr("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function I2({name:e,path:o="",root:r="root",asText:a=!1}){return dr(Jr,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:o,name:e,asText:a}),headers:new Headers({"Content-Type":"application/json"})})}async function D2(){try{const e=await dr(`${LT}/shared_datasources.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{}}}async function M2(){try{const e=await dr(`${LT}/shared_css.json?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})});return typeof e=="string"?JSON.parse(e):e}catch{return{classes:[]}}}const N2=MT(),Qa=async e=>{const o={verb:Xt.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return N2(async()=>(await dr(Jr,{method:"POST",body:JSON.stringify(o),headers:new Headers({"Content-Type":"application/json"})}),e))},Ad=async e=>{const o=await dr(Jr,{method:"POST",body:JSON.stringify({...e,verb:Xt.SET_FILE_CONTENT,root:Fs.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=DT(`${e.path||"Sources"}/${e.name}`);return{...o,type:r,size:0}},w_=async e=>await Ad({name:"crafted_components.json",path:jt.WEBFORMS,content:e});function $2(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function FT(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function w1(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ei(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(o=>Array.isArray(o)?o:{...o,content:["4dm","4qm","4qs"].includes(o.ext)?IT(o.content):o.content})}function k2(e){return dr(Jr,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}var xs=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(xs||{});const L2={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};var WT=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(WT||{}),$a=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))($a||{}),td=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(td||{}),BT=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(BT||{});const S_={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles"},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:$a.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},UT="4DWS_PREFS",zT=e=>`APP_STATE_${e}`;function HT(e){var o,r;try{const a=((r=(o=window==null?void 0:window.$$datastores)==null?void 0:o.ds)==null?void 0:r.getBaseID())||"",i=JSON.stringify(e);localStorage.setItem(zT(a),i)}catch(a){console.error(a)}}function qT(e){try{const o=JSON.stringify(e);localStorage.setItem(UT,o)}catch(o){console.error(o)}}function GT(){try{const e=localStorage.getItem(UT);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Xs(){var r,a;const e=((a=(r=window==null?void 0:window.$$datastores)==null?void 0:r.ds)==null?void 0:a.getBaseID())||"",o=localStorage.getItem(zT(e));if(o){const i=JSON.parse(o);return i.tabs=i.tabs.map(u=>({...u,flags:{...u.flags,enabled:!0}})),i}return S_}function Pd(e){const{name:o,type:r,path:a}=e,i=a.split(".").at(-1);switch(r){case ie.WEBFORM:return`${o}.WebForm`;case ie.METHOD:case ie.CLASS:return i?`${o}.${i}`:o;case ie.ROLES:return o;default:return`${o}.${r}`}}const VT=e=>{if(!e)return[];const o=new Map;return e.dataClasses.forEach(r=>{var u,l;const a=r.extraProperties||{},i={id:r.className,type:"table",position:{x:((u=a.position)==null?void 0:u.x)||0,y:((l=a.position)==null?void 0:l.y)||0},dragHandle:".custom-drag-handle",data:r};o.set(r.name,i)}),Array.from(o.values())};function YT(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function j2(){this.__data__=[],this.size=0}var F2=j2;function W2(e,o){return e===o||e!==e&&o!==o}var B2=W2,U2=B2;function z2(e,o){for(var r=e.length;r--;)if(U2(e[r][0],o))return r;return-1}var Id=z2,H2=Id,q2=Array.prototype,G2=q2.splice;function V2(e){var o=this.__data__,r=H2(o,e);if(r<0)return!1;var a=o.length-1;return r==a?o.pop():G2.call(o,r,1),--this.size,!0}var Y2=V2,K2=Id;function X2(e){var o=this.__data__,r=K2(o,e);return r<0?void 0:o[r][1]}var Z2=X2,J2=Id;function Q2(e){return J2(this.__data__,e)>-1}var eM=Q2,tM=Id;function rM(e,o){var r=this.__data__,a=tM(r,e);return a<0?(++this.size,r.push([e,o])):r[a][1]=o,this}var nM=rM,oM=F2,aM=Y2,iM=Z2,sM=eM,uM=nM;function Zs(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}Zs.prototype.clear=oM;Zs.prototype.delete=aM;Zs.prototype.get=iM;Zs.prototype.has=sM;Zs.prototype.set=uM;var Dd=Zs,cM=Dd;function lM(){this.__data__=new cM,this.size=0}var fM=lM;function dM(e){var o=this.__data__,r=o.delete(e);return this.size=o.size,r}var pM=dM;function hM(e){return this.__data__.get(e)}var vM=hM;function gM(e){return this.__data__.has(e)}var mM=gM,yM=md,bM=Zl,_M="[object AsyncFunction]",wM="[object Function]",SM="[object GeneratorFunction]",EM="[object Proxy]";function TM(e){if(!bM(e))return!1;var o=yM(e);return o==wM||o==SM||o==_M||o==EM}var xM=TM,CM=Po,OM=CM["__core-js_shared__"],RM=OM,Db=RM,mS=function(){var e=/[^.]+$/.exec(Db&&Db.keys&&Db.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function AM(e){return!!mS&&mS in e}var PM=AM,IM=Function.prototype,DM=IM.toString;function MM(e){if(e!=null){try{return DM.call(e)}catch{}try{return e+""}catch{}}return""}var KT=MM,NM=xM,$M=PM,kM=Zl,LM=KT,jM=/[\\^$.*+?()[\]{}|]/g,FM=/^\[object .+?Constructor\]$/,WM=Function.prototype,BM=Object.prototype,UM=WM.toString,zM=BM.hasOwnProperty,HM=RegExp("^"+UM.call(zM).replace(jM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qM(e){if(!kM(e)||$M(e))return!1;var o=NM(e)?HM:FM;return o.test(LM(e))}var GM=qM;function VM(e,o){return e==null?void 0:e[o]}var YM=VM,KM=GM,XM=YM;function ZM(e,o){var r=XM(e,o);return KM(r)?r:void 0}var Js=ZM,JM=Js,QM=Po,eN=JM(QM,"Map"),E_=eN,tN=Js,rN=tN(Object,"create"),Md=rN,yS=Md;function nN(){this.__data__=yS?yS(null):{},this.size=0}var oN=nN;function aN(e){var o=this.has(e)&&delete this.__data__[e];return this.size-=o?1:0,o}var iN=aN,sN=Md,uN="__lodash_hash_undefined__",cN=Object.prototype,lN=cN.hasOwnProperty;function fN(e){var o=this.__data__;if(sN){var r=o[e];return r===uN?void 0:r}return lN.call(o,e)?o[e]:void 0}var dN=fN,pN=Md,hN=Object.prototype,vN=hN.hasOwnProperty;function gN(e){var o=this.__data__;return pN?o[e]!==void 0:vN.call(o,e)}var mN=gN,yN=Md,bN="__lodash_hash_undefined__";function _N(e,o){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yN&&o===void 0?bN:o,this}var wN=_N,SN=oN,EN=iN,TN=dN,xN=mN,CN=wN;function Qs(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}Qs.prototype.clear=SN;Qs.prototype.delete=EN;Qs.prototype.get=TN;Qs.prototype.has=xN;Qs.prototype.set=CN;var ON=Qs,bS=ON,RN=Dd,AN=E_;function PN(){this.size=0,this.__data__={hash:new bS,map:new(AN||RN),string:new bS}}var IN=PN;function DN(e){var o=typeof e;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?e!=="__proto__":e===null}var MN=DN,NN=MN;function $N(e,o){var r=e.__data__;return NN(o)?r[typeof o=="string"?"string":"hash"]:r.map}var Nd=$N,kN=Nd;function LN(e){var o=kN(this,e).delete(e);return this.size-=o?1:0,o}var jN=LN,FN=Nd;function WN(e){return FN(this,e).get(e)}var BN=WN,UN=Nd;function zN(e){return UN(this,e).has(e)}var HN=zN,qN=Nd;function GN(e,o){var r=qN(this,e),a=r.size;return r.set(e,o),this.size+=r.size==a?0:1,this}var VN=GN,YN=IN,KN=jN,XN=BN,ZN=HN,JN=VN;function eu(e){var o=-1,r=e==null?0:e.length;for(this.clear();++o<r;){var a=e[o];this.set(a[0],a[1])}}eu.prototype.clear=YN;eu.prototype.delete=KN;eu.prototype.get=XN;eu.prototype.has=ZN;eu.prototype.set=JN;var XT=eu,QN=Dd,e$=E_,t$=XT,r$=200;function n$(e,o){var r=this.__data__;if(r instanceof QN){var a=r.__data__;if(!e$||a.length<r$-1)return a.push([e,o]),this.size=++r.size,this;r=this.__data__=new t$(a)}return r.set(e,o),this.size=r.size,this}var o$=n$,a$=Dd,i$=fM,s$=pM,u$=vM,c$=mM,l$=o$;function of(e){var o=this.__data__=new a$(e);this.size=o.size}of.prototype.clear=i$;of.prototype.delete=s$;of.prototype.get=u$;of.prototype.has=c$;of.prototype.set=l$;var f$="__lodash_hash_undefined__";function d$(e){return this.__data__.set(e,f$),this}var p$=d$;function h$(e){return this.__data__.has(e)}var v$=h$,g$=XT,m$=p$,y$=v$;function S1(e){var o=-1,r=e==null?0:e.length;for(this.__data__=new g$;++o<r;)this.add(e[o])}S1.prototype.add=S1.prototype.push=m$;S1.prototype.has=y$;var b$=Po;b$.Uint8Array;var _S=t_,wS=_S?_S.prototype:void 0;wS&&wS.valueOf;var _$=md,w$=r_,S$="[object Arguments]";function E$(e){return w$(e)&&_$(e)==S$}var T$=E$,SS=T$,x$=r_,ZT=Object.prototype,C$=ZT.hasOwnProperty,O$=ZT.propertyIsEnumerable;SS(function(){return arguments}());var rd={exports:{}};function R$(){return!1}var A$=R$;rd.exports;(function(e,o){var r=Po,a=A$,i=o&&!o.nodeType&&o,u=i&&!0&&e&&!e.nodeType&&e,l=u&&u.exports===i,f=l?r.Buffer:void 0,p=f?f.isBuffer:void 0,h=p||a;e.exports=h})(rd,rd.exports);rd.exports;var nd={exports:{}};nd.exports;(function(e,o){var r=IE,a=o&&!o.nodeType&&o,i=a&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===a,l=u&&r.process,f=function(){try{var p=i&&i.require&&i.require("util").types;return p||l&&l.binding&&l.binding("util")}catch{}}();e.exports=f})(nd,nd.exports);var P$=nd.exports,ES=P$;ES&&ES.isTypedArray;var I$=Js,D$=Po,M$=I$(D$,"DataView"),N$=M$,$$=Js,k$=Po,L$=$$(k$,"Promise"),j$=L$,F$=Js,W$=Po,B$=F$(W$,"Set"),U$=B$,z$=Js,H$=Po,q$=z$(H$,"WeakMap"),G$=q$,E1=N$,T1=E_,x1=j$,C1=U$,O1=G$,JT=md,tu=KT,TS="[object Map]",V$="[object Object]",xS="[object Promise]",CS="[object Set]",OS="[object WeakMap]",RS="[object DataView]",Y$=tu(E1),K$=tu(T1),X$=tu(x1),Z$=tu(C1),J$=tu(O1),Ds=JT;(E1&&Ds(new E1(new ArrayBuffer(1)))!=RS||T1&&Ds(new T1)!=TS||x1&&Ds(x1.resolve())!=xS||C1&&Ds(new C1)!=CS||O1&&Ds(new O1)!=OS)&&(Ds=function(e){var o=JT(e),r=o==V$?e.constructor:void 0,a=r?tu(r):"";if(a)switch(a){case Y$:return RS;case K$:return TS;case X$:return xS;case Z$:return CS;case J$:return OS}return o});const Q$="ROOT";TO(),EO();var AS;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(AS||(AS={}));var od={exports:{}};/**
|
|
143
143
|
* @license
|
|
144
144
|
* Lodash <https://lodash.com/>
|
|
145
145
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -165,7 +165,7 @@ __p += '`),Ee&&(j+=`' +
|
|
|
165
165
|
function print() { __p += __j.call(arguments, '') }
|
|
166
166
|
`:`;
|
|
167
167
|
`)+j+`return __p
|
|
168
|
-
}`;var ve=xl(function(){return Ce(g,K+"return "+j).apply(r,y)});if(ve.source=j,cs(ve))throw ve;return ve}function f0(t){return Oe(t).toLowerCase()}function d0(t){return Oe(t).toUpperCase()}function p0(t,n,s){if(t=Oe(t),t&&(s||n===r))return Nu(t);if(!t||!(n=Mt(n)))return t;var c=er(t),d=er(n),g=$u(c,d),y=ku(c,d)+1;return Nr(c,g,y).join("")}function h0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.slice(0,ju(t)+1);if(!t||!(n=Mt(n)))return t;var c=er(t),d=ku(c,er(n))+1;return Nr(c,0,d).join("")}function v0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.replace(q,"");if(!t||!(n=Mt(n)))return t;var c=er(t),d=$u(c,er(n));return Nr(c,d).join("")}function g0(t,n){var s=Ge,c=Ue;if(Le(n)){var d="separator"in n?n.separator:d;s="length"in n?he(n.length):s,c="omission"in n?Mt(n.omission):c}t=Oe(t);var g=t.length;if(Cn(t)){var y=er(t);g=y.length}if(s>=g)return t;var w=s-On(c);if(w<1)return c;var T=y?Nr(y,0,w).join(""):t.slice(0,w);if(d===r)return T+c;if(y&&(w+=T.length-w),ls(d)){if(t.slice(w).search(d)){var D,M=T;for(d.global||(d=Ci(d.source,Oe(Bt.exec(d))+"g")),d.lastIndex=0;D=d.exec(M);)var j=D.index;T=T.slice(0,j===r?w:j)}}else if(t.indexOf(Mt(d),w)!=w){var H=T.lastIndexOf(d);H>-1&&(T=T.slice(0,H))}return T+c}function m0(t){return t=Oe(t),t&&Lo.test(t)?t.replace(ko,Gp):t}var y0=Nn(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),ps=Cc("toUpperCase");function Tl(t,n,s){return t=Oe(t),n=s?r:n,n===r?Bp(t)?Kp(t):Dp(t):t.match(n)||[]}var xl=ye(function(t,n){try{return It(t,r,n)}catch(s){return cs(s)?s:new ae(s)}}),b0=yr(function(t,n){return zt(n,function(s){s=cr(s),gr(t,s,ss(t[s],t))}),t});function _0(t){var n=t==null?0:t.length,s=X();return t=n?$e(t,function(c){if(typeof c[1]!="function")throw new Ht(l);return[s(c[0]),c[1]]}):[],ye(function(c){for(var d=-1;++d<n;){var g=t[d];if(It(g[0],this,c))return It(g[1],this,c)}})}function w0(t){return Gh(Gt(t,b))}function hs(t){return function(){return t}}function S0(t,n){return t==null||t!==t?n:t}var E0=Rc(),T0=Rc(!0);function xt(t){return t}function vs(t){return oc(typeof t=="function"?t:Gt(t,b))}function x0(t){return ic(Gt(t,b))}function C0(t,n){return sc(t,Gt(n,b))}var O0=ye(function(t,n){return function(s){return oo(s,t,n)}}),R0=ye(function(t,n){return function(s){return oo(t,s,n)}});function gs(t,n,s){var c=tt(n),d=ca(n,c);s==null&&!(Le(n)&&(d.length||!c.length))&&(s=n,n=t,t=this,d=ca(n,tt(n)));var g=!(Le(s)&&"chain"in s)||!!s.chain,y=_r(t);return zt(d,function(w){var T=n[w];t[w]=T,y&&(t.prototype[w]=function(){var D=this.__chain__;if(g||D){var M=t(this.__wrapped__),j=M.__actions__=St(this.__actions__);return j.push({func:T,args:arguments,thisArg:t}),M.__chain__=D,M}return T.apply(t,Rr([this.value()],arguments))})}),t}function A0(){return nt._===this&&(nt._=th),this}function ms(){}function P0(t){return t=he(t),ye(function(n){return uc(n,t)})}var I0=Yi($e),D0=Yi(Au),M0=Yi(bi);function Cl(t){return ts(t)?_i(cr(t)):cv(t)}function N0(t){return function(n){return t==null?r:dn(t,n)}}var $0=Pc(),k0=Pc(!0);function ys(){return[]}function bs(){return!1}function L0(){return{}}function j0(){return""}function F0(){return!0}function W0(t,n){if(t=he(t),t<1||t>Qe)return[];var s=z,c=at(t,z);n=X(n),t-=z;for(var d=Ei(c,n);++s<t;)n(s);return d}function B0(t){return ce(t)?$e(t,cr):Nt(t)?[t]:St(Gc(Oe(t)))}function U0(t){var n=++Qp;return Oe(t)+n}var z0=va(function(t,n){return t+n},0),H0=Ki("ceil"),q0=va(function(t,n){return t/n},1),G0=Ki("floor");function V0(t){return t&&t.length?ua(t,xt,Ni):r}function Y0(t,n){return t&&t.length?ua(t,X(n,2),Ni):r}function K0(t){return Du(t,xt)}function X0(t,n){return Du(t,X(n,2))}function Z0(t){return t&&t.length?ua(t,xt,ji):r}function J0(t,n){return t&&t.length?ua(t,X(n,2),ji):r}var Q0=va(function(t,n){return t*n},1),eb=Ki("round"),tb=va(function(t,n){return t-n},0);function rb(t){return t&&t.length?Si(t,xt):0}function nb(t,n){return t&&t.length?Si(t,X(n,2)):0}return v.after=xm,v.ary=nl,v.assign=dy,v.assignIn=ml,v.assignInWith=Ra,v.assignWith=py,v.at=hy,v.before=ol,v.bind=ss,v.bindAll=b0,v.bindKey=al,v.castArray=Lm,v.chain=el,v.chunk=Gv,v.compact=Vv,v.concat=Yv,v.cond=_0,v.conforms=w0,v.constant=hs,v.countBy=rm,v.create=vy,v.curry=il,v.curryRight=sl,v.debounce=ul,v.defaults=gy,v.defaultsDeep=my,v.defer=Cm,v.delay=Om,v.difference=Kv,v.differenceBy=Xv,v.differenceWith=Zv,v.drop=Jv,v.dropRight=Qv,v.dropRightWhile=eg,v.dropWhile=tg,v.fill=rg,v.filter=om,v.flatMap=sm,v.flatMapDeep=um,v.flatMapDepth=cm,v.flatten=Xc,v.flattenDeep=ng,v.flattenDepth=og,v.flip=Rm,v.flow=E0,v.flowRight=T0,v.fromPairs=ag,v.functions=Ty,v.functionsIn=xy,v.groupBy=lm,v.initial=sg,v.intersection=ug,v.intersectionBy=cg,v.intersectionWith=lg,v.invert=Oy,v.invertBy=Ry,v.invokeMap=dm,v.iteratee=vs,v.keyBy=pm,v.keys=tt,v.keysIn=Tt,v.map=Sa,v.mapKeys=Py,v.mapValues=Iy,v.matches=x0,v.matchesProperty=C0,v.memoize=Ta,v.merge=Dy,v.mergeWith=yl,v.method=O0,v.methodOf=R0,v.mixin=gs,v.negate=xa,v.nthArg=P0,v.omit=My,v.omitBy=Ny,v.once=Am,v.orderBy=hm,v.over=I0,v.overArgs=Pm,v.overEvery=D0,v.overSome=M0,v.partial=us,v.partialRight=cl,v.partition=vm,v.pick=$y,v.pickBy=bl,v.property=Cl,v.propertyOf=N0,v.pull=hg,v.pullAll=Jc,v.pullAllBy=vg,v.pullAllWith=gg,v.pullAt=mg,v.range=$0,v.rangeRight=k0,v.rearg=Im,v.reject=ym,v.remove=yg,v.rest=Dm,v.reverse=as,v.sampleSize=_m,v.set=Ly,v.setWith=jy,v.shuffle=wm,v.slice=bg,v.sortBy=Tm,v.sortedUniq=Cg,v.sortedUniqBy=Og,v.split=s0,v.spread=Mm,v.tail=Rg,v.take=Ag,v.takeRight=Pg,v.takeRightWhile=Ig,v.takeWhile=Dg,v.tap=Vg,v.throttle=Nm,v.thru=wa,v.toArray=hl,v.toPairs=_l,v.toPairsIn=wl,v.toPath=B0,v.toPlainObject=gl,v.transform=Fy,v.unary=$m,v.union=Mg,v.unionBy=Ng,v.unionWith=$g,v.uniq=kg,v.uniqBy=Lg,v.uniqWith=jg,v.unset=Wy,v.unzip=is,v.unzipWith=Qc,v.update=By,v.updateWith=Uy,v.values=Ln,v.valuesIn=zy,v.without=Fg,v.words=Tl,v.wrap=km,v.xor=Wg,v.xorBy=Bg,v.xorWith=Ug,v.zip=zg,v.zipObject=Hg,v.zipObjectDeep=qg,v.zipWith=Gg,v.entries=_l,v.entriesIn=wl,v.extend=ml,v.extendWith=Ra,gs(v,v),v.add=z0,v.attempt=xl,v.camelCase=Vy,v.capitalize=Sl,v.ceil=H0,v.clamp=Hy,v.clone=jm,v.cloneDeep=Wm,v.cloneDeepWith=Bm,v.cloneWith=Fm,v.conformsTo=Um,v.deburr=El,v.defaultTo=S0,v.divide=q0,v.endsWith=Yy,v.eq=rr,v.escape=Ky,v.escapeRegExp=Xy,v.every=nm,v.find=am,v.findIndex=Yc,v.findKey=yy,v.findLast=im,v.findLastIndex=Kc,v.findLastKey=by,v.floor=G0,v.forEach=tl,v.forEachRight=rl,v.forIn=_y,v.forInRight=wy,v.forOwn=Sy,v.forOwnRight=Ey,v.get=fs,v.gt=zm,v.gte=Hm,v.has=Cy,v.hasIn=ds,v.head=Zc,v.identity=xt,v.includes=fm,v.indexOf=ig,v.inRange=qy,v.invoke=Ay,v.isArguments=vn,v.isArray=ce,v.isArrayBuffer=qm,v.isArrayLike=Et,v.isArrayLikeObject=He,v.isBoolean=Gm,v.isBuffer=$r,v.isDate=Vm,v.isElement=Ym,v.isEmpty=Km,v.isEqual=Xm,v.isEqualWith=Zm,v.isError=cs,v.isFinite=Jm,v.isFunction=_r,v.isInteger=ll,v.isLength=Ca,v.isMap=fl,v.isMatch=Qm,v.isMatchWith=ey,v.isNaN=ty,v.isNative=ry,v.isNil=oy,v.isNull=ny,v.isNumber=dl,v.isObject=Le,v.isObjectLike=Be,v.isPlainObject=lo,v.isRegExp=ls,v.isSafeInteger=ay,v.isSet=pl,v.isString=Oa,v.isSymbol=Nt,v.isTypedArray=kn,v.isUndefined=iy,v.isWeakMap=sy,v.isWeakSet=uy,v.join=fg,v.kebabCase=Zy,v.last=Yt,v.lastIndexOf=dg,v.lowerCase=Jy,v.lowerFirst=Qy,v.lt=cy,v.lte=ly,v.max=V0,v.maxBy=Y0,v.mean=K0,v.meanBy=X0,v.min=Z0,v.minBy=J0,v.stubArray=ys,v.stubFalse=bs,v.stubObject=L0,v.stubString=j0,v.stubTrue=F0,v.multiply=Q0,v.nth=pg,v.noConflict=A0,v.noop=ms,v.now=Ea,v.pad=e0,v.padEnd=t0,v.padStart=r0,v.parseInt=n0,v.random=Gy,v.reduce=gm,v.reduceRight=mm,v.repeat=o0,v.replace=a0,v.result=ky,v.round=eb,v.runInContext=E,v.sample=bm,v.size=Sm,v.snakeCase=i0,v.some=Em,v.sortedIndex=_g,v.sortedIndexBy=wg,v.sortedIndexOf=Sg,v.sortedLastIndex=Eg,v.sortedLastIndexBy=Tg,v.sortedLastIndexOf=xg,v.startCase=u0,v.startsWith=c0,v.subtract=tb,v.sum=rb,v.sumBy=nb,v.template=l0,v.times=W0,v.toFinite=wr,v.toInteger=he,v.toLength=vl,v.toLower=f0,v.toNumber=Kt,v.toSafeInteger=fy,v.toString=Oe,v.toUpper=d0,v.trim=p0,v.trimEnd=h0,v.trimStart=v0,v.truncate=g0,v.unescape=m0,v.uniqueId=U0,v.upperCase=y0,v.upperFirst=ps,v.each=tl,v.eachRight=rl,v.first=Zc,gs(v,function(){var t={};return sr(v,function(n,s){Pe.call(v.prototype,s)||(t[s]=n)}),t}(),{chain:!1}),v.VERSION=a,zt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){v[t].placeholder=v}),zt(["drop","take"],function(t,n){we.prototype[t]=function(s){s=s===r?1:Xe(he(s),0);var c=this.__filtered__&&!n?new we(this):this.clone();return c.__filtered__?c.__takeCount__=at(s,c.__takeCount__):c.__views__.push({size:at(s,z),type:t+(c.__dir__<0?"Right":"")}),c},we.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),zt(["filter","map","takeWhile"],function(t,n){var s=n+1,c=s==Me||s==Je;we.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:X(d,3),type:s}),g.__filtered__=g.__filtered__||c,g}}),zt(["head","last"],function(t,n){var s="take"+(n?"Right":"");we.prototype[t]=function(){return this[s](1).value()[0]}}),zt(["initial","tail"],function(t,n){var s="drop"+(n?"":"Right");we.prototype[t]=function(){return this.__filtered__?new we(this):this[s](1)}}),we.prototype.compact=function(){return this.filter(xt)},we.prototype.find=function(t){return this.filter(t).head()},we.prototype.findLast=function(t){return this.reverse().find(t)},we.prototype.invokeMap=ye(function(t,n){return typeof t=="function"?new we(this):this.map(function(s){return oo(s,t,n)})}),we.prototype.reject=function(t){return this.filter(xa(X(t)))},we.prototype.slice=function(t,n){t=he(t);var s=this;return s.__filtered__&&(t>0||n<0)?new we(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==r&&(n=he(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},we.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},we.prototype.toArray=function(){return this.take(z)},sr(we.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),c=/^(?:head|last)$/.test(n),d=v[c?"take"+(n=="last"?"Right":""):n],g=c||/^find/.test(n);d&&(v.prototype[n]=function(){var y=this.__wrapped__,w=c?[1]:arguments,T=y instanceof we,D=w[0],M=T||ce(y),j=function(_e){var Ee=d.apply(v,Rr([_e],w));return c&&H?Ee[0]:Ee};M&&s&&typeof D=="function"&&D.length!=1&&(T=M=!1);var H=this.__chain__,K=!!this.__actions__.length,Z=g&&!H,ve=T&&!K;if(!g&&M){y=ve?y:new we(this);var J=t.apply(y,w);return J.__actions__.push({func:wa,args:[j],thisArg:r}),new qt(J,H)}return Z&&ve?t.apply(this,w):(J=this.thru(j),Z?c?J.value()[0]:J.value():J)})}),zt(["pop","push","shift","sort","splice","unshift"],function(t){var n=Vo[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);v.prototype[t]=function(){var d=arguments;if(c&&!this.__chain__){var g=this.value();return n.apply(ce(g)?g:[],d)}return this[s](function(y){return n.apply(ce(y)?y:[],d)})}}),sr(we.prototype,function(t,n){var s=v[n];if(s){var c=s.name+"";Pe.call(In,c)||(In[c]=[]),In[c].push({name:n,func:s})}}),In[ha(r,k).name]=[{name:"wrapper",func:r}],we.prototype.clone=mh,we.prototype.reverse=yh,we.prototype.value=bh,v.prototype.at=Yg,v.prototype.chain=Kg,v.prototype.commit=Xg,v.prototype.next=Zg,v.prototype.plant=Qg,v.prototype.reverse=em,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=tm,v.prototype.first=v.prototype.head,Zn&&(v.prototype[Zn]=Jg),v},Rn=Xp();sn?((sn.exports=Rn)._=Rn,vi._=Rn):nt._=Rn}).call(Pa)})(od,od.exports);var Ft=od.exports;const QT=gd(Ft);function E_(e){return`Debugger/${e}`}function ex(e,o){var a;const r=(a=o.name)==null?void 0:a.replace(/\.(4dm|4qs)$/,"");return`#${e} ${r}`}var R1={exports:{}},_f={exports:{}},yt={};/** @license React v16.13.1
|
|
168
|
+
}`;var ve=xl(function(){return Ce(g,K+"return "+j).apply(r,y)});if(ve.source=j,cs(ve))throw ve;return ve}function f0(t){return Oe(t).toLowerCase()}function d0(t){return Oe(t).toUpperCase()}function p0(t,n,s){if(t=Oe(t),t&&(s||n===r))return Nu(t);if(!t||!(n=Mt(n)))return t;var c=er(t),d=er(n),g=$u(c,d),y=ku(c,d)+1;return Nr(c,g,y).join("")}function h0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.slice(0,ju(t)+1);if(!t||!(n=Mt(n)))return t;var c=er(t),d=ku(c,er(n))+1;return Nr(c,0,d).join("")}function v0(t,n,s){if(t=Oe(t),t&&(s||n===r))return t.replace(q,"");if(!t||!(n=Mt(n)))return t;var c=er(t),d=$u(c,er(n));return Nr(c,d).join("")}function g0(t,n){var s=Ge,c=Ue;if(Le(n)){var d="separator"in n?n.separator:d;s="length"in n?he(n.length):s,c="omission"in n?Mt(n.omission):c}t=Oe(t);var g=t.length;if(Cn(t)){var y=er(t);g=y.length}if(s>=g)return t;var w=s-On(c);if(w<1)return c;var T=y?Nr(y,0,w).join(""):t.slice(0,w);if(d===r)return T+c;if(y&&(w+=T.length-w),ls(d)){if(t.slice(w).search(d)){var D,M=T;for(d.global||(d=Ci(d.source,Oe(Bt.exec(d))+"g")),d.lastIndex=0;D=d.exec(M);)var j=D.index;T=T.slice(0,j===r?w:j)}}else if(t.indexOf(Mt(d),w)!=w){var H=T.lastIndexOf(d);H>-1&&(T=T.slice(0,H))}return T+c}function m0(t){return t=Oe(t),t&&Lo.test(t)?t.replace(ko,Gp):t}var y0=Nn(function(t,n,s){return t+(s?" ":"")+n.toUpperCase()}),ps=Cc("toUpperCase");function Tl(t,n,s){return t=Oe(t),n=s?r:n,n===r?Bp(t)?Kp(t):Dp(t):t.match(n)||[]}var xl=ye(function(t,n){try{return It(t,r,n)}catch(s){return cs(s)?s:new ae(s)}}),b0=yr(function(t,n){return zt(n,function(s){s=cr(s),gr(t,s,ss(t[s],t))}),t});function _0(t){var n=t==null?0:t.length,s=X();return t=n?$e(t,function(c){if(typeof c[1]!="function")throw new Ht(l);return[s(c[0]),c[1]]}):[],ye(function(c){for(var d=-1;++d<n;){var g=t[d];if(It(g[0],this,c))return It(g[1],this,c)}})}function w0(t){return Gh(Gt(t,b))}function hs(t){return function(){return t}}function S0(t,n){return t==null||t!==t?n:t}var E0=Rc(),T0=Rc(!0);function xt(t){return t}function vs(t){return oc(typeof t=="function"?t:Gt(t,b))}function x0(t){return ic(Gt(t,b))}function C0(t,n){return sc(t,Gt(n,b))}var O0=ye(function(t,n){return function(s){return oo(s,t,n)}}),R0=ye(function(t,n){return function(s){return oo(t,s,n)}});function gs(t,n,s){var c=tt(n),d=ca(n,c);s==null&&!(Le(n)&&(d.length||!c.length))&&(s=n,n=t,t=this,d=ca(n,tt(n)));var g=!(Le(s)&&"chain"in s)||!!s.chain,y=_r(t);return zt(d,function(w){var T=n[w];t[w]=T,y&&(t.prototype[w]=function(){var D=this.__chain__;if(g||D){var M=t(this.__wrapped__),j=M.__actions__=St(this.__actions__);return j.push({func:T,args:arguments,thisArg:t}),M.__chain__=D,M}return T.apply(t,Rr([this.value()],arguments))})}),t}function A0(){return nt._===this&&(nt._=th),this}function ms(){}function P0(t){return t=he(t),ye(function(n){return uc(n,t)})}var I0=Yi($e),D0=Yi(Au),M0=Yi(bi);function Cl(t){return ts(t)?_i(cr(t)):cv(t)}function N0(t){return function(n){return t==null?r:dn(t,n)}}var $0=Pc(),k0=Pc(!0);function ys(){return[]}function bs(){return!1}function L0(){return{}}function j0(){return""}function F0(){return!0}function W0(t,n){if(t=he(t),t<1||t>Qe)return[];var s=z,c=at(t,z);n=X(n),t-=z;for(var d=Ei(c,n);++s<t;)n(s);return d}function B0(t){return ce(t)?$e(t,cr):Nt(t)?[t]:St(Gc(Oe(t)))}function U0(t){var n=++Qp;return Oe(t)+n}var z0=va(function(t,n){return t+n},0),H0=Ki("ceil"),q0=va(function(t,n){return t/n},1),G0=Ki("floor");function V0(t){return t&&t.length?ua(t,xt,Ni):r}function Y0(t,n){return t&&t.length?ua(t,X(n,2),Ni):r}function K0(t){return Du(t,xt)}function X0(t,n){return Du(t,X(n,2))}function Z0(t){return t&&t.length?ua(t,xt,ji):r}function J0(t,n){return t&&t.length?ua(t,X(n,2),ji):r}var Q0=va(function(t,n){return t*n},1),eb=Ki("round"),tb=va(function(t,n){return t-n},0);function rb(t){return t&&t.length?Si(t,xt):0}function nb(t,n){return t&&t.length?Si(t,X(n,2)):0}return v.after=xm,v.ary=nl,v.assign=dy,v.assignIn=ml,v.assignInWith=Ra,v.assignWith=py,v.at=hy,v.before=ol,v.bind=ss,v.bindAll=b0,v.bindKey=al,v.castArray=Lm,v.chain=el,v.chunk=Gv,v.compact=Vv,v.concat=Yv,v.cond=_0,v.conforms=w0,v.constant=hs,v.countBy=rm,v.create=vy,v.curry=il,v.curryRight=sl,v.debounce=ul,v.defaults=gy,v.defaultsDeep=my,v.defer=Cm,v.delay=Om,v.difference=Kv,v.differenceBy=Xv,v.differenceWith=Zv,v.drop=Jv,v.dropRight=Qv,v.dropRightWhile=eg,v.dropWhile=tg,v.fill=rg,v.filter=om,v.flatMap=sm,v.flatMapDeep=um,v.flatMapDepth=cm,v.flatten=Xc,v.flattenDeep=ng,v.flattenDepth=og,v.flip=Rm,v.flow=E0,v.flowRight=T0,v.fromPairs=ag,v.functions=Ty,v.functionsIn=xy,v.groupBy=lm,v.initial=sg,v.intersection=ug,v.intersectionBy=cg,v.intersectionWith=lg,v.invert=Oy,v.invertBy=Ry,v.invokeMap=dm,v.iteratee=vs,v.keyBy=pm,v.keys=tt,v.keysIn=Tt,v.map=Sa,v.mapKeys=Py,v.mapValues=Iy,v.matches=x0,v.matchesProperty=C0,v.memoize=Ta,v.merge=Dy,v.mergeWith=yl,v.method=O0,v.methodOf=R0,v.mixin=gs,v.negate=xa,v.nthArg=P0,v.omit=My,v.omitBy=Ny,v.once=Am,v.orderBy=hm,v.over=I0,v.overArgs=Pm,v.overEvery=D0,v.overSome=M0,v.partial=us,v.partialRight=cl,v.partition=vm,v.pick=$y,v.pickBy=bl,v.property=Cl,v.propertyOf=N0,v.pull=hg,v.pullAll=Jc,v.pullAllBy=vg,v.pullAllWith=gg,v.pullAt=mg,v.range=$0,v.rangeRight=k0,v.rearg=Im,v.reject=ym,v.remove=yg,v.rest=Dm,v.reverse=as,v.sampleSize=_m,v.set=Ly,v.setWith=jy,v.shuffle=wm,v.slice=bg,v.sortBy=Tm,v.sortedUniq=Cg,v.sortedUniqBy=Og,v.split=s0,v.spread=Mm,v.tail=Rg,v.take=Ag,v.takeRight=Pg,v.takeRightWhile=Ig,v.takeWhile=Dg,v.tap=Vg,v.throttle=Nm,v.thru=wa,v.toArray=hl,v.toPairs=_l,v.toPairsIn=wl,v.toPath=B0,v.toPlainObject=gl,v.transform=Fy,v.unary=$m,v.union=Mg,v.unionBy=Ng,v.unionWith=$g,v.uniq=kg,v.uniqBy=Lg,v.uniqWith=jg,v.unset=Wy,v.unzip=is,v.unzipWith=Qc,v.update=By,v.updateWith=Uy,v.values=Ln,v.valuesIn=zy,v.without=Fg,v.words=Tl,v.wrap=km,v.xor=Wg,v.xorBy=Bg,v.xorWith=Ug,v.zip=zg,v.zipObject=Hg,v.zipObjectDeep=qg,v.zipWith=Gg,v.entries=_l,v.entriesIn=wl,v.extend=ml,v.extendWith=Ra,gs(v,v),v.add=z0,v.attempt=xl,v.camelCase=Vy,v.capitalize=Sl,v.ceil=H0,v.clamp=Hy,v.clone=jm,v.cloneDeep=Wm,v.cloneDeepWith=Bm,v.cloneWith=Fm,v.conformsTo=Um,v.deburr=El,v.defaultTo=S0,v.divide=q0,v.endsWith=Yy,v.eq=rr,v.escape=Ky,v.escapeRegExp=Xy,v.every=nm,v.find=am,v.findIndex=Yc,v.findKey=yy,v.findLast=im,v.findLastIndex=Kc,v.findLastKey=by,v.floor=G0,v.forEach=tl,v.forEachRight=rl,v.forIn=_y,v.forInRight=wy,v.forOwn=Sy,v.forOwnRight=Ey,v.get=fs,v.gt=zm,v.gte=Hm,v.has=Cy,v.hasIn=ds,v.head=Zc,v.identity=xt,v.includes=fm,v.indexOf=ig,v.inRange=qy,v.invoke=Ay,v.isArguments=vn,v.isArray=ce,v.isArrayBuffer=qm,v.isArrayLike=Et,v.isArrayLikeObject=He,v.isBoolean=Gm,v.isBuffer=$r,v.isDate=Vm,v.isElement=Ym,v.isEmpty=Km,v.isEqual=Xm,v.isEqualWith=Zm,v.isError=cs,v.isFinite=Jm,v.isFunction=_r,v.isInteger=ll,v.isLength=Ca,v.isMap=fl,v.isMatch=Qm,v.isMatchWith=ey,v.isNaN=ty,v.isNative=ry,v.isNil=oy,v.isNull=ny,v.isNumber=dl,v.isObject=Le,v.isObjectLike=Be,v.isPlainObject=lo,v.isRegExp=ls,v.isSafeInteger=ay,v.isSet=pl,v.isString=Oa,v.isSymbol=Nt,v.isTypedArray=kn,v.isUndefined=iy,v.isWeakMap=sy,v.isWeakSet=uy,v.join=fg,v.kebabCase=Zy,v.last=Yt,v.lastIndexOf=dg,v.lowerCase=Jy,v.lowerFirst=Qy,v.lt=cy,v.lte=ly,v.max=V0,v.maxBy=Y0,v.mean=K0,v.meanBy=X0,v.min=Z0,v.minBy=J0,v.stubArray=ys,v.stubFalse=bs,v.stubObject=L0,v.stubString=j0,v.stubTrue=F0,v.multiply=Q0,v.nth=pg,v.noConflict=A0,v.noop=ms,v.now=Ea,v.pad=e0,v.padEnd=t0,v.padStart=r0,v.parseInt=n0,v.random=Gy,v.reduce=gm,v.reduceRight=mm,v.repeat=o0,v.replace=a0,v.result=ky,v.round=eb,v.runInContext=E,v.sample=bm,v.size=Sm,v.snakeCase=i0,v.some=Em,v.sortedIndex=_g,v.sortedIndexBy=wg,v.sortedIndexOf=Sg,v.sortedLastIndex=Eg,v.sortedLastIndexBy=Tg,v.sortedLastIndexOf=xg,v.startCase=u0,v.startsWith=c0,v.subtract=tb,v.sum=rb,v.sumBy=nb,v.template=l0,v.times=W0,v.toFinite=wr,v.toInteger=he,v.toLength=vl,v.toLower=f0,v.toNumber=Kt,v.toSafeInteger=fy,v.toString=Oe,v.toUpper=d0,v.trim=p0,v.trimEnd=h0,v.trimStart=v0,v.truncate=g0,v.unescape=m0,v.uniqueId=U0,v.upperCase=y0,v.upperFirst=ps,v.each=tl,v.eachRight=rl,v.first=Zc,gs(v,function(){var t={};return sr(v,function(n,s){Pe.call(v.prototype,s)||(t[s]=n)}),t}(),{chain:!1}),v.VERSION=a,zt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){v[t].placeholder=v}),zt(["drop","take"],function(t,n){we.prototype[t]=function(s){s=s===r?1:Xe(he(s),0);var c=this.__filtered__&&!n?new we(this):this.clone();return c.__filtered__?c.__takeCount__=at(s,c.__takeCount__):c.__views__.push({size:at(s,z),type:t+(c.__dir__<0?"Right":"")}),c},we.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),zt(["filter","map","takeWhile"],function(t,n){var s=n+1,c=s==Me||s==Je;we.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:X(d,3),type:s}),g.__filtered__=g.__filtered__||c,g}}),zt(["head","last"],function(t,n){var s="take"+(n?"Right":"");we.prototype[t]=function(){return this[s](1).value()[0]}}),zt(["initial","tail"],function(t,n){var s="drop"+(n?"":"Right");we.prototype[t]=function(){return this.__filtered__?new we(this):this[s](1)}}),we.prototype.compact=function(){return this.filter(xt)},we.prototype.find=function(t){return this.filter(t).head()},we.prototype.findLast=function(t){return this.reverse().find(t)},we.prototype.invokeMap=ye(function(t,n){return typeof t=="function"?new we(this):this.map(function(s){return oo(s,t,n)})}),we.prototype.reject=function(t){return this.filter(xa(X(t)))},we.prototype.slice=function(t,n){t=he(t);var s=this;return s.__filtered__&&(t>0||n<0)?new we(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),n!==r&&(n=he(n),s=n<0?s.dropRight(-n):s.take(n-t)),s)},we.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},we.prototype.toArray=function(){return this.take(z)},sr(we.prototype,function(t,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),c=/^(?:head|last)$/.test(n),d=v[c?"take"+(n=="last"?"Right":""):n],g=c||/^find/.test(n);d&&(v.prototype[n]=function(){var y=this.__wrapped__,w=c?[1]:arguments,T=y instanceof we,D=w[0],M=T||ce(y),j=function(_e){var Ee=d.apply(v,Rr([_e],w));return c&&H?Ee[0]:Ee};M&&s&&typeof D=="function"&&D.length!=1&&(T=M=!1);var H=this.__chain__,K=!!this.__actions__.length,Z=g&&!H,ve=T&&!K;if(!g&&M){y=ve?y:new we(this);var J=t.apply(y,w);return J.__actions__.push({func:wa,args:[j],thisArg:r}),new qt(J,H)}return Z&&ve?t.apply(this,w):(J=this.thru(j),Z?c?J.value()[0]:J.value():J)})}),zt(["pop","push","shift","sort","splice","unshift"],function(t){var n=Vo[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",c=/^(?:pop|shift)$/.test(t);v.prototype[t]=function(){var d=arguments;if(c&&!this.__chain__){var g=this.value();return n.apply(ce(g)?g:[],d)}return this[s](function(y){return n.apply(ce(y)?y:[],d)})}}),sr(we.prototype,function(t,n){var s=v[n];if(s){var c=s.name+"";Pe.call(In,c)||(In[c]=[]),In[c].push({name:n,func:s})}}),In[ha(r,k).name]=[{name:"wrapper",func:r}],we.prototype.clone=mh,we.prototype.reverse=yh,we.prototype.value=bh,v.prototype.at=Yg,v.prototype.chain=Kg,v.prototype.commit=Xg,v.prototype.next=Zg,v.prototype.plant=Qg,v.prototype.reverse=em,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=tm,v.prototype.first=v.prototype.head,Zn&&(v.prototype[Zn]=Jg),v},Rn=Xp();sn?((sn.exports=Rn)._=Rn,vi._=Rn):nt._=Rn}).call(Pa)})(od,od.exports);var Ft=od.exports;const QT=gd(Ft);function T_(e){return`Debugger/${e}`}function ex(e,o){var a;const r=(a=o.name)==null?void 0:a.replace(/\.(4dm|4qs)$/,"");return`#${e} ${r}`}var R1={exports:{}},_f={exports:{}},yt={};/** @license React v16.13.1
|
|
169
169
|
* react-is.production.min.js
|
|
170
170
|
*
|
|
171
171
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -183,8 +183,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
183
183
|
object-assign
|
|
184
184
|
(c) Sindre Sorhus
|
|
185
185
|
@license MIT
|
|
186
|
-
*/var Mb,MS;function
|
|
187
|
-
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var L=Q(oe,pe,re,ue,ee+"."+pe,r);if(L)return L}return null}return N(z)}function Me(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(Me);if(F===null||f(F))return!0;var z=b(F);if(z){var fe=z.call(F),se;if(z!==F.entries){for(;!(se=fe.next()).done;)if(!Me(se.value))return!1}else for(;!(se=fe.next()).done;){var re=se.value;if(re&&!Me(re[1]))return!1}}else return!1;return!0;default:return!1}}function ut(F,z){return F==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function Je(F){var z=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":ut(z,F)?"symbol":z}function je(F){if(typeof F>"u"||F===null)return""+F;var z=Je(F);if(z==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return z}function Qe(F){var z=je(F);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function ar(F){return!F.constructor||!F.constructor.name?S:F.constructor.name}return x.checkPropTypes=i,x.resetWarningCache=i.resetWarningCache,x.PropTypes=x,x},Lb}var jb,jS;function ok(){if(jS)return jb;jS=1;var e=
|
|
186
|
+
*/var Mb,MS;function x_(){if(MS)return Mb;MS=1;var e=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(u){if(u==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(u)}function i(){try{if(!Object.assign)return!1;var u=new String("abc");if(u[5]="de",Object.getOwnPropertyNames(u)[0]==="5")return!1;for(var l={},f=0;f<10;f++)l["_"+String.fromCharCode(f)]=f;var p=Object.getOwnPropertyNames(l).map(function(m){return l[m]});if(p.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(m){h[m]=m}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Mb=i()?Object.assign:function(u,l){for(var f,p=a(u),h,m=1;m<arguments.length;m++){f=Object(arguments[m]);for(var b in f)o.call(f,b)&&(p[b]=f[b]);if(e){h=e(f);for(var S=0;S<h.length;S++)r.call(f,h[S])&&(p[h[S]]=f[h[S]])}}return p},Mb}var Nb,NS;function C_(){if(NS)return Nb;NS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Nb=e,Nb}var $b,$S;function rx(){return $S||($S=1,$b=Function.call.bind(Object.prototype.hasOwnProperty)),$b}var kb,kS;function rk(){if(kS)return kb;kS=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var o=C_(),r={},a=rx();e=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function i(u,l,f,p,h){if(process.env.NODE_ENV!=="production"){for(var m in u)if(a(u,m)){var b;try{if(typeof u[m]!="function"){var S=Error((p||"React class")+": "+f+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}b=u[m](l,m,p,f,null,o)}catch(R){b=R}if(b&&!(b instanceof Error)&&e((p||"React class")+": type specification of "+f+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof b+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),b instanceof Error&&!(b.message in r)){r[b.message]=!0;var x=h?h():"";e("Failed "+f+" type: "+b.message+(x??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},kb=i,kb}var Lb,LS;function nk(){if(LS)return Lb;LS=1;var e=tx(),o=x_(),r=C_(),a=rx(),i=rk(),u=function(){};process.env.NODE_ENV!=="production"&&(u=function(f){var p="Warning: "+f;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function l(){return null}return Lb=function(f,p){var h=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(F){var z=F&&(h&&F[h]||F[m]);if(typeof z=="function")return z}var S="<<anonymous>>",x={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:W(),arrayOf:I,element:$(),elementType:O(),instanceOf:Y,node:Ge(),objectOf:G,oneOf:U,oneOfType:Se,shape:Pt,exact:me};function R(F,z){return F===z?F!==0||1/F===1/z:F!==F&&z!==z}function C(F,z){this.message=F,this.data=z&&typeof z=="object"?z:{},this.stack=""}C.prototype=Error.prototype;function N(F){if(process.env.NODE_ENV!=="production")var z={},fe=0;function se(ue,ee,oe,ne,de,pe,Q){if(ne=ne||S,pe=pe||oe,Q!==r){if(p){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ye=ne+":"+oe;!z[Ye]&&fe<3&&(u("You are manually calling a React.PropTypes validation function for the `"+pe+"` prop on `"+ne+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[Ye]=!0,fe++)}}return ee[oe]==null?ue?ee[oe]===null?new C("The "+de+" `"+pe+"` is marked as required "+("in `"+ne+"`, but its value is `null`.")):new C("The "+de+" `"+pe+"` is marked as required in "+("`"+ne+"`, but its value is `undefined`.")):null:F(ee,oe,ne,de,pe)}var re=se.bind(null,!1);return re.isRequired=se.bind(null,!0),re}function k(F){function z(fe,se,re,ue,ee,oe){var ne=fe[se],de=Je(ne);if(de!==F){var pe=je(ne);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+pe+"` supplied to `"+re+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return N(z)}function W(){return N(l)}function I(F){function z(fe,se,re,ue,ee){if(typeof F!="function")return new C("Property `"+ee+"` of component `"+re+"` has invalid PropType notation inside arrayOf.");var oe=fe[se];if(!Array.isArray(oe)){var ne=Je(oe);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected an array."))}for(var de=0;de<oe.length;de++){var pe=F(oe,de,re,ue,ee+"["+de+"]",r);if(pe instanceof Error)return pe}return null}return N(z)}function $(){function F(z,fe,se,re,ue){var ee=z[fe];if(!f(ee)){var oe=Je(ee);return new C("Invalid "+re+" `"+ue+"` of type "+("`"+oe+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return N(F)}function O(){function F(z,fe,se,re,ue){var ee=z[fe];if(!e.isValidElementType(ee)){var oe=Je(ee);return new C("Invalid "+re+" `"+ue+"` of type "+("`"+oe+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return N(F)}function Y(F){function z(fe,se,re,ue,ee){if(!(fe[se]instanceof F)){var oe=F.name||S,ne=ar(fe[se]);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected ")+("instance of `"+oe+"`."))}return null}return N(z)}function U(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?u("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):u("Invalid argument supplied to oneOf, expected an array.")),l;function z(fe,se,re,ue,ee){for(var oe=fe[se],ne=0;ne<F.length;ne++)if(R(oe,F[ne]))return null;var de=JSON.stringify(F,function(Q,L){var Ye=je(L);return Ye==="symbol"?String(L):L});return new C("Invalid "+ue+" `"+ee+"` of value `"+String(oe)+"` "+("supplied to `"+re+"`, expected one of "+de+"."))}return N(z)}function G(F){function z(fe,se,re,ue,ee){if(typeof F!="function")return new C("Property `"+ee+"` of component `"+re+"` has invalid PropType notation inside objectOf.");var oe=fe[se],ne=Je(oe);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected an object."));for(var de in oe)if(a(oe,de)){var pe=F(oe,de,re,ue,ee+"."+de,r);if(pe instanceof Error)return pe}return null}return N(z)}function Se(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&u("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var z=0;z<F.length;z++){var fe=F[z];if(typeof fe!="function")return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Qe(fe)+" at index "+z+"."),l}function se(re,ue,ee,oe,ne){for(var de=[],pe=0;pe<F.length;pe++){var Q=F[pe],L=Q(re,ue,ee,oe,ne,r);if(L==null)return null;L.data&&a(L.data,"expectedType")&&de.push(L.data.expectedType)}var Ye=de.length>0?", expected one of type ["+de.join(", ")+"]":"";return new C("Invalid "+oe+" `"+ne+"` supplied to "+("`"+ee+"`"+Ye+"."))}return N(se)}function Ge(){function F(z,fe,se,re,ue){return Me(z[fe])?null:new C("Invalid "+re+" `"+ue+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return N(F)}function Ue(F,z,fe,se,re){return new C((F||"React class")+": "+z+" type `"+fe+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function Pt(F){function z(fe,se,re,ue,ee){var oe=fe[se],ne=Je(oe);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));for(var de in F){var pe=F[de];if(typeof pe!="function")return Ue(re,ue,ee,de,je(pe));var Q=pe(oe,de,re,ue,ee+"."+de,r);if(Q)return Q}return null}return N(z)}function me(F){function z(fe,se,re,ue,ee){var oe=fe[se],ne=Je(oe);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));var de=o({},fe[se],F);for(var pe in de){var Q=F[pe];if(a(F,pe)&&typeof Q!="function")return Ue(re,ue,ee,pe,je(Q));if(!Q)return new C("Invalid "+ue+" `"+ee+"` key `"+pe+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify(fe[se],null," ")+`
|
|
187
|
+
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var L=Q(oe,pe,re,ue,ee+"."+pe,r);if(L)return L}return null}return N(z)}function Me(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(Me);if(F===null||f(F))return!0;var z=b(F);if(z){var fe=z.call(F),se;if(z!==F.entries){for(;!(se=fe.next()).done;)if(!Me(se.value))return!1}else for(;!(se=fe.next()).done;){var re=se.value;if(re&&!Me(re[1]))return!1}}else return!1;return!0;default:return!1}}function ut(F,z){return F==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function Je(F){var z=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":ut(z,F)?"symbol":z}function je(F){if(typeof F>"u"||F===null)return""+F;var z=Je(F);if(z==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return z}function Qe(F){var z=je(F);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function ar(F){return!F.constructor||!F.constructor.name?S:F.constructor.name}return x.checkPropTypes=i,x.resetWarningCache=i.resetWarningCache,x.PropTypes=x,x},Lb}var jb,jS;function ok(){if(jS)return jb;jS=1;var e=C_();function o(){}function r(){}return r.resetWarningCache=o,jb=function(){function a(l,f,p,h,m,b){if(b!==e){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}}a.isRequired=a;function i(){return a}var u={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:o};return u.PropTypes=u,u},jb}if(process.env.NODE_ENV!=="production"){var ak=tx(),ik=!0;R1.exports=nk()(ak.isElement,ik)}else R1.exports=ok()();var sk=R1.exports;const Ms=gd(sk);var Wa=ze.createContext(null);process.env.NODE_ENV!=="production"&&(Wa.displayName="ReactRedux");function uk(e){e()}var nx=uk,ck=function(o){return nx=o},lk=function(){return nx};function fk(){var e=lk(),o=null,r=null;return{clear:function(){o=null,r=null},notify:function(){e(function(){for(var i=o;i;)i.callback(),i=i.next})},get:function(){for(var i=[],u=o;u;)i.push(u),u=u.next;return i},subscribe:function(i){var u=!0,l=r={callback:i,next:null,prev:r};return l.prev?l.prev.next=l:o=l,function(){!u||o===null||(u=!1,l.next?l.next.prev=l.prev:r=l.prev,l.prev?l.prev.next=l.next:o=l.next)}}}}var FS={notify:function(){},get:function(){return[]}};function ox(e,o){var r,a=FS;function i(b){return p(),a.subscribe(b)}function u(){a.notify()}function l(){m.onStateChange&&m.onStateChange()}function f(){return!!r}function p(){r||(r=o?o.addNestedSub(l):e.subscribe(l),a=fk())}function h(){r&&(r(),r=void 0,a.clear(),a=FS)}var m={addNestedSub:i,notifyNestedSubs:u,handleChangeWrapper:l,isSubscribed:f,trySubscribe:p,tryUnsubscribe:h,getListeners:function(){return a}};return m}var A1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ze.useLayoutEffect:ze.useEffect;function ax(e){var o=e.store,r=e.context,a=e.children,i=ze.useMemo(function(){var f=ox(o);return{store:o,subscription:f}},[o]),u=ze.useMemo(function(){return o.getState()},[o]);A1(function(){var f=i.subscription;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==o.getState()&&f.notifyNestedSubs(),function(){f.tryUnsubscribe(),f.onStateChange=null}},[i,u]);var l=r||Wa;return ze.createElement(l.Provider,{value:i},a)}process.env.NODE_ENV!=="production"&&(ax.propTypes={store:Ms.shape({subscribe:Ms.func.isRequired,dispatch:Ms.func.isRequired,getState:Ms.func.isRequired}),context:Ms.object,children:Ms.any});var P1={exports:{}},_t={};/** @license React v16.13.1
|
|
188
188
|
* react-is.production.min.js
|
|
189
189
|
*
|
|
190
190
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -216,13 +216,13 @@ Valid keys: `+JSON.stringify(Object.keys(F),null," "));var L=Q(oe,pe,re,ue,ee+"
|
|
|
216
216
|
The error may be correlated with this previous error:
|
|
217
217
|
`+f.current.stack+`
|
|
218
218
|
|
|
219
|
-
`),R}return A1(function(){p.current=e,h.current=b,m.current=S,f.current=void 0}),A1(function(){function R(){try{var C=r.getState();if(C===h.current)return;var N=p.current(C);if(o(N,m.current))return;m.current=N,h.current=C}catch(k){f.current=k}u()}return l.onStateChange=R,l.trySubscribe(),R(),function(){return l.tryUnsubscribe()}},[r,l]),S}function Ek(e){e===void 0&&(e=Wa);var o=e===Wa?cx:function(){return ze.useContext(e)};return function(a,i){if(i===void 0&&(i=wk),process.env.NODE_ENV!=="production"){if(!a)throw new Error("You must pass a selector to useSelector");if(typeof a!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof i!="function")throw new Error("You must pass a function as an equality function to useSelector")}var u=o(),l=u.store,f=u.subscription,p=Sk(a,i,l,f);return ze.useDebugValue(p),p}}var Tk=Ek();ck(mO.unstable_batchedUpdates);const Ws=xe("catalog/fetchCatalog",async(e,{rejectWithValue:o})=>{var r;try{const a=await P2(),i=new Map,u=new Map;return(r=a==null?void 0:a.dataClasses)==null||r.forEach(({methods:l=[],...f})=>{const p={...f,methods:l};u.set(f.className,p),i.set(f.collectionName,p)}),{__BASEID:a.__BASEID,__UNIQID:a.__UNIQID,dataClassByCollectionName:Object.fromEntries(i.entries()),methods:a.methods||[],dataClasses:Object.fromEntries(u.entries())}}catch{return o("Error while loading the catalog")}});function xk(){const e=fx();return{get:()=>Os.getState().catalog,fetch:()=>e(Ws()),refresh:()=>af()}}function af(e=2e3){return setTimeout(()=>{Os.dispatch(Ws())},e)}const Ck=typeof process=="object"&&process&&process.platform==="win32";var Ok=Ck?{sep:"\\"}:{sep:"/"},Rk=dx;function dx(e,o,r){e instanceof RegExp&&(e=qS(e,r)),o instanceof RegExp&&(o=qS(o,r));var a=px(e,o,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+e.length,a[1]),post:r.slice(a[1]+o.length)}}function qS(e,o){var r=o.match(e);return r?r[0]:null}dx.range=px;function px(e,o,r){var a,i,u,l,f,p=r.indexOf(e),h=r.indexOf(o,p+1),m=p;if(p>=0&&h>0){if(e===o)return[p,h];for(a=[],u=r.length;m>=0&&!f;)m==p?(a.push(m),p=r.indexOf(e,m+1)):a.length==1?f=[a.pop(),h]:(i=a.pop(),i<u&&(u=i,l=h),h=r.indexOf(o,m+1)),m=p<h&&p>=0?p:h;a.length&&(f=[u,l])}return f}var hx=Rk,Ak=Dk,vx="\0SLASH"+Math.random()+"\0",gx="\0OPEN"+Math.random()+"\0",
|
|
219
|
+
`),R}return A1(function(){p.current=e,h.current=b,m.current=S,f.current=void 0}),A1(function(){function R(){try{var C=r.getState();if(C===h.current)return;var N=p.current(C);if(o(N,m.current))return;m.current=N,h.current=C}catch(k){f.current=k}u()}return l.onStateChange=R,l.trySubscribe(),R(),function(){return l.tryUnsubscribe()}},[r,l]),S}function Ek(e){e===void 0&&(e=Wa);var o=e===Wa?cx:function(){return ze.useContext(e)};return function(a,i){if(i===void 0&&(i=wk),process.env.NODE_ENV!=="production"){if(!a)throw new Error("You must pass a selector to useSelector");if(typeof a!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof i!="function")throw new Error("You must pass a function as an equality function to useSelector")}var u=o(),l=u.store,f=u.subscription,p=Sk(a,i,l,f);return ze.useDebugValue(p),p}}var Tk=Ek();ck(mO.unstable_batchedUpdates);const Ws=xe("catalog/fetchCatalog",async(e,{rejectWithValue:o})=>{var r;try{const a=await P2(),i=new Map,u=new Map;return(r=a==null?void 0:a.dataClasses)==null||r.forEach(({methods:l=[],...f})=>{const p={...f,methods:l};u.set(f.className,p),i.set(f.collectionName,p)}),{__BASEID:a.__BASEID,__UNIQID:a.__UNIQID,dataClassByCollectionName:Object.fromEntries(i.entries()),methods:a.methods||[],dataClasses:Object.fromEntries(u.entries())}}catch{return o("Error while loading the catalog")}});function xk(){const e=fx();return{get:()=>Os.getState().catalog,fetch:()=>e(Ws()),refresh:()=>af()}}function af(e=2e3){return setTimeout(()=>{Os.dispatch(Ws())},e)}const Ck=typeof process=="object"&&process&&process.platform==="win32";var Ok=Ck?{sep:"\\"}:{sep:"/"},Rk=dx;function dx(e,o,r){e instanceof RegExp&&(e=qS(e,r)),o instanceof RegExp&&(o=qS(o,r));var a=px(e,o,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+e.length,a[1]),post:r.slice(a[1]+o.length)}}function qS(e,o){var r=o.match(e);return r?r[0]:null}dx.range=px;function px(e,o,r){var a,i,u,l,f,p=r.indexOf(e),h=r.indexOf(o,p+1),m=p;if(p>=0&&h>0){if(e===o)return[p,h];for(a=[],u=r.length;m>=0&&!f;)m==p?(a.push(m),p=r.indexOf(e,m+1)):a.length==1?f=[a.pop(),h]:(i=a.pop(),i<u&&(u=i,l=h),h=r.indexOf(o,m+1)),m=p<h&&p>=0?p:h;a.length&&(f=[u,l])}return f}var hx=Rk,Ak=Dk,vx="\0SLASH"+Math.random()+"\0",gx="\0OPEN"+Math.random()+"\0",O_="\0CLOSE"+Math.random()+"\0",mx="\0COMMA"+Math.random()+"\0",yx="\0PERIOD"+Math.random()+"\0";function Fb(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Pk(e){return e.split("\\\\").join(vx).split("\\{").join(gx).split("\\}").join(O_).split("\\,").join(mx).split("\\.").join(yx)}function Ik(e){return e.split(vx).join("\\").split(gx).join("{").split(O_).join("}").split(mx).join(",").split(yx).join(".")}function bx(e){if(!e)return[""];var o=[],r=hx("{","}",e);if(!r)return e.split(",");var a=r.pre,i=r.body,u=r.post,l=a.split(",");l[l.length-1]+="{"+i+"}";var f=bx(u);return u.length&&(l[l.length-1]+=f.shift(),l.push.apply(l,f)),o.push.apply(o,l),o}function Dk(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Dl(Pk(e),!0).map(Ik)):[]}function Mk(e){return"{"+e+"}"}function Nk(e){return/^-?0\d/.test(e)}function $k(e,o){return e<=o}function kk(e,o){return e>=o}function Dl(e,o){var r=[],a=hx("{","}",e);if(!a)return[e];var i=a.pre,u=a.post.length?Dl(a.post,!1):[""];if(/\$$/.test(a.pre))for(var l=0;l<u.length;l++){var f=i+"{"+a.body+"}"+u[l];r.push(f)}else{var p=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),m=p||h,b=a.body.indexOf(",")>=0;if(!m&&!b)return a.post.match(/,.*\}/)?(e=a.pre+"{"+a.body+O_+a.post,Dl(e)):[e];var S;if(m)S=a.body.split(/\.\./);else if(S=bx(a.body),S.length===1&&(S=Dl(S[0],!1).map(Mk),S.length===1))return u.map(function(Ge){return a.pre+S[0]+Ge});var x;if(m){var R=Fb(S[0]),C=Fb(S[1]),N=Math.max(S[0].length,S[1].length),k=S.length==3?Math.abs(Fb(S[2])):1,W=$k,I=C<R;I&&(k*=-1,W=kk);var $=S.some(Nk);x=[];for(var O=R;W(O,C);O+=k){var Y;if(h)Y=String.fromCharCode(O),Y==="\\"&&(Y="");else if(Y=String(O),$){var U=N-Y.length;if(U>0){var G=new Array(U+1).join("0");O<0?Y="-"+G+Y.slice(1):Y=G+Y}}x.push(Y)}}else{x=[];for(var Se=0;Se<S.length;Se++)x.push.apply(x,Dl(S[Se],!1))}for(var Se=0;Se<x.length;Se++)for(var l=0;l<u.length;l++){var f=i+x[Se]+u[l];(!o||m||f)&&r.push(f)}}return r}const Wn=_x=(e,o,r={})=>(ad(o),!r.nocomment&&o.charAt(0)==="#"?!1:new $d(o,r).match(e));var _x=Wn;const I1=Ok;Wn.sep=I1.sep;const ho=Symbol("globstar **");Wn.GLOBSTAR=ho;const Lk=Ak,GS={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},D1="[^/]",Wb=D1+"*?",jk="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Fk="(?:(?!(?:\\/|^)\\.).)*?",wx=e=>e.split("").reduce((o,r)=>(o[r]=!0,o),{}),VS=wx("().*{}+?[]^$\\!"),Wk=wx("[.("),YS=/\/+/;Wn.filter=(e,o={})=>(r,a,i)=>Wn(r,e,o);const qa=(e,o={})=>{const r={};return Object.keys(e).forEach(a=>r[a]=e[a]),Object.keys(o).forEach(a=>r[a]=o[a]),r};Wn.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Wn;const o=Wn,r=(a,i,u)=>o(a,i,qa(e,u));return r.Minimatch=class extends o.Minimatch{constructor(i,u){super(i,qa(e,u))}},r.Minimatch.defaults=a=>o.defaults(qa(e,a)).Minimatch,r.filter=(a,i)=>o.filter(a,qa(e,i)),r.defaults=a=>o.defaults(qa(e,a)),r.makeRe=(a,i)=>o.makeRe(a,qa(e,i)),r.braceExpand=(a,i)=>o.braceExpand(a,qa(e,i)),r.match=(a,i,u)=>o.match(a,i,qa(e,u)),r};Wn.braceExpand=(e,o)=>Sx(e,o);const Sx=(e,o={})=>(ad(e),o.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Lk(e)),Bk=1024*64,ad=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Bk)throw new TypeError("pattern is too long")},Bb=Symbol("subparse");Wn.makeRe=(e,o)=>new $d(e,o||{}).makeRe();Wn.match=(e,o,r={})=>{const a=new $d(o,r);return e=e.filter(i=>a.match(i)),a.options.nonull&&!e.length&&e.push(o),e};const Uk=e=>e.replace(/\\(.)/g,"$1"),zk=e=>e.replace(/\\([^-\]])/g,"$1"),Hk=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qk=e=>e.replace(/[[\]\\]/g,"\\$&");class $d{constructor(o,r){ad(o),r||(r={}),this.options=r,this.set=[],this.pattern=o,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){const o=this.pattern,r=this.options;if(!r.nocomment&&o.charAt(0)==="#"){this.comment=!0;return}if(!o){this.empty=!0;return}this.parseNegate();let a=this.globSet=this.braceExpand();r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,a),a=this.globParts=a.map(i=>i.split(YS)),this.debug(this.pattern,a),a=a.map((i,u,l)=>i.map(this.parse,this)),this.debug(this.pattern,a),a=a.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,a),this.set=a}parseNegate(){if(this.options.nonegate)return;const o=this.pattern;let r=!1,a=0;for(let i=0;i<o.length&&o.charAt(i)==="!";i++)r=!r,a++;a&&(this.pattern=o.slice(a)),this.negate=r}matchOne(o,r,a){var i=this.options;this.debug("matchOne",{this:this,file:o,pattern:r}),this.debug("matchOne",o.length,r.length);for(var u=0,l=0,f=o.length,p=r.length;u<f&&l<p;u++,l++){this.debug("matchOne loop");var h=r[l],m=o[u];if(this.debug(r,h,m),h===!1)return!1;if(h===ho){this.debug("GLOBSTAR",[r,h,m]);var b=u,S=l+1;if(S===p){for(this.debug("** at the end");u<f;u++)if(o[u]==="."||o[u]===".."||!i.dot&&o[u].charAt(0)===".")return!1;return!0}for(;b<f;){var x=o[b];if(this.debug(`
|
|
220
220
|
globstar while`,o,b,r,S,x),this.matchOne(o.slice(b),r.slice(S),a))return this.debug("globstar found match!",b,f,x),!0;if(x==="."||x===".."||!i.dot&&x.charAt(0)==="."){this.debug("dot detected!",o,b,r,S);break}this.debug("globstar swallow a segment, and continue"),b++}return!!(a&&(this.debug(`
|
|
221
221
|
>>> no match, partial?`,o,b,r,S),b===f))}var R;if(typeof h=="string"?(R=m===h,this.debug("string match",h,m,R)):(R=m.match(h),this.debug("pattern match",h,m,R)),!R)return!1}if(u===f&&l===p)return!0;if(u===f)return a;if(l===p)return u===f-1&&o[u]==="";throw new Error("wtf?")}braceExpand(){return Sx(this.pattern,this.options)}parse(o,r){ad(o);const a=this.options;if(o==="**")if(a.noglobstar)o="*";else return ho;if(o==="")return"";let i="",u=!1,l=!1;const f=[],p=[];let h,m=!1,b=-1,S=-1,x,R,C,N=o.charAt(0)===".",k=a.dot||N;const W=()=>N?"":k?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",I=U=>U.charAt(0)==="."?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",$=()=>{if(h){switch(h){case"*":i+=Wb,u=!0;break;case"?":i+=D1,u=!0;break;default:i+="\\"+h;break}this.debug("clearStateChar %j %j",h,i),h=!1}};for(let U=0,G;U<o.length&&(G=o.charAt(U));U++){if(this.debug("%s %s %s %j",o,U,i,G),l){if(G==="/")return!1;VS[G]&&(i+="\\"),i+=G,l=!1;continue}switch(G){case"/":return!1;case"\\":if(m&&o.charAt(U+1)==="-"){i+=G;continue}$(),l=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",o,U,i,G),m){this.debug(" in class"),G==="!"&&U===S+1&&(G="^"),i+=G;continue}this.debug("call clearStateChar %j",h),$(),h=G,a.noext&&$();continue;case"(":{if(m){i+="(";continue}if(!h){i+="\\(";continue}const Se={type:h,start:U-1,reStart:i.length,open:GS[h].open,close:GS[h].close};this.debug(this.pattern," ",Se),f.push(Se),i+=Se.open,Se.start===0&&Se.type!=="!"&&(N=!0,i+=I(o.slice(U+1))),this.debug("plType %j %j",h,i),h=!1;continue}case")":{const Se=f[f.length-1];if(m||!Se){i+="\\)";continue}f.pop(),$(),u=!0,R=Se,i+=R.close,R.type==="!"&&p.push(Object.assign(R,{reEnd:i.length}));continue}case"|":{const Se=f[f.length-1];if(m||!Se){i+="\\|";continue}$(),i+="|",Se.start===0&&Se.type!=="!"&&(N=!0,i+=I(o.slice(U+1)));continue}case"[":if($(),m){i+="\\"+G;continue}m=!0,S=U,b=i.length,i+=G;continue;case"]":if(U===S+1||!m){i+="\\"+G;continue}x=o.substring(S+1,U);try{RegExp("["+qk(zk(x))+"]"),i+=G}catch{i=i.substring(0,b)+"(?:$.)"}u=!0,m=!1;continue;default:$(),VS[G]&&!(G==="^"&&m)&&(i+="\\"),i+=G;break}}for(m&&(x=o.slice(S+1),C=this.parse(x,Bb),i=i.substring(0,b)+"\\["+C[0],u=u||C[1]),R=f.pop();R;R=f.pop()){let U;U=i.slice(R.reStart+R.open.length),this.debug("setting tail",i,R),U=U.replace(/((?:\\{2}){0,64})(\\?)\|/g,(Se,Ge,Ue)=>(Ue||(Ue="\\"),Ge+Ge+Ue+"|")),this.debug(`tail=%j
|
|
222
|
-
%s`,U,U,R,i);const G=R.type==="*"?Wb:R.type==="?"?D1:"\\"+R.type;u=!0,i=i.slice(0,R.reStart)+G+"\\("+U}$(),l&&(i+="\\\\");const O=Wk[i.charAt(0)];for(let U=p.length-1;U>-1;U--){const G=p[U],Se=i.slice(0,G.reStart),Ge=i.slice(G.reStart,G.reEnd-8);let Ue=i.slice(G.reEnd);const Pt=i.slice(G.reEnd-8,G.reEnd)+Ue,me=Se.split(")").length,Me=Se.split("(").length-me;let ut=Ue;for(let je=0;je<Me;je++)ut=ut.replace(/\)[+*?]?/,"");Ue=ut;const Je=Ue===""&&r!==Bb?"(?:$|\\/)":"";i=Se+Ge+Ue+Je+Pt}if(i!==""&&u&&(i="(?=.)"+i),O&&(i=W()+i),r===Bb)return[i,u];if(a.nocase&&!u&&(u=o.toUpperCase()!==o.toLowerCase()),!u)return Uk(o);const Y=a.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",Y),{_glob:o,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const o=this.set;if(!o.length)return this.regexp=!1,this.regexp;const r=this.options,a=r.noglobstar?Wb:r.dot?jk:Fk,i=r.nocase?"i":"";let u=o.map(l=>(l=l.map(f=>typeof f=="string"?Hk(f):f===ho?ho:f._src).reduce((f,p)=>(f[f.length-1]===ho&&p===ho||f.push(p),f),[]),l.forEach((f,p)=>{f!==ho||l[p-1]===ho||(p===0?l.length>1?l[p+1]="(?:\\/|"+a+"\\/)?"+l[p+1]:l[p]=a:p===l.length-1?l[p-1]+="(?:\\/|"+a+")?":(l[p-1]+="(?:\\/|\\/"+a+"\\/)"+l[p+1],l[p+1]=ho))}),l.filter(f=>f!==ho).join("/"))).join("|");u="^(?:"+u+")$",this.negate&&(u="^(?!"+u+").*$");try{this.regexp=new RegExp(u,i)}catch{this.regexp=!1}return this.regexp}match(o,r=this.partial){if(this.debug("match",o,this.pattern),this.comment)return!1;if(this.empty)return o==="";if(o==="/"&&r)return!0;const a=this.options;I1.sep!=="/"&&(o=o.split(I1.sep).join("/")),o=o.split(YS),this.debug(this.pattern,"split",o);const i=this.set;this.debug(this.pattern,"set",i);let u;for(let l=o.length-1;l>=0&&(u=o[l],!u);l--);for(let l=0;l<i.length;l++){const f=i[l];let p=o;if(a.matchBase&&f.length===1&&(p=[u]),this.matchOne(p,f,r))return a.flipNegate?!0:!this.negate}return a.flipNegate?!1:this.negate}static defaults(o){return Wn.defaults(o).Minimatch}}Wn.Minimatch=$d;const Ex=gd(_x),Tx=[{pattern:Wr,editor:{key:"editors:roles"}},{pattern:"**/*.webform",editor:{key:"editors:webforms"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"Methods/*.4dm",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Methods/*.4qs",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4dm",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4qs",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(json)",editor:{key:"editors:code",config:{language:"json"}}},{pattern:"**/*.+(js)",editor:{key:"editors:code",config:{language:"js"}}},{pattern:"**/*.+(css)",editor:{key:"editors:code",config:{language:"css"}}},{pattern:"**/*.+(txt)",editor:{key:"editors:code",config:{language:""}}},{pattern:"Debugger/*",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(png|jpeg|jpg|gif|svg)",editor:{key:"editors:img"}}],xx=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function Cx(e){const o=e.split("/");return o.pop(),o.join("/")}function mo(e){const o=Tx.find(({pattern:r})=>Ex(e,r,{nocase:!0}));return o||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function Ox(e){const o=xx.find(({pattern:r})=>Ex(e,r,{nocase:!0}));return o?o.type:"text"}var M1=function(e,o){return M1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])},M1(e,o)};function kd(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");M1(e,o);function r(){this.constructor=e}e.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}function N1(e){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&e[o],a=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}function id(e,o){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,u=[],l;try{for(;(o===void 0||o-- >0)&&!(i=a.next()).done;)u.push(i.value)}catch(f){l={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(l)throw l.error}}return u}function sd(e,o,r){if(r||arguments.length===2)for(var a=0,i=o.length,u;a<i;a++)(u||!(a in o))&&(u||(u=Array.prototype.slice.call(o,0,a)),u[a]=o[a]);return e.concat(u||Array.prototype.slice.call(o))}function ka(e){return typeof e=="function"}function Rx(e){var o=function(a){Error.call(a),a.stack=new Error().stack},r=e(o);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ub=Rx(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
222
|
+
%s`,U,U,R,i);const G=R.type==="*"?Wb:R.type==="?"?D1:"\\"+R.type;u=!0,i=i.slice(0,R.reStart)+G+"\\("+U}$(),l&&(i+="\\\\");const O=Wk[i.charAt(0)];for(let U=p.length-1;U>-1;U--){const G=p[U],Se=i.slice(0,G.reStart),Ge=i.slice(G.reStart,G.reEnd-8);let Ue=i.slice(G.reEnd);const Pt=i.slice(G.reEnd-8,G.reEnd)+Ue,me=Se.split(")").length,Me=Se.split("(").length-me;let ut=Ue;for(let je=0;je<Me;je++)ut=ut.replace(/\)[+*?]?/,"");Ue=ut;const Je=Ue===""&&r!==Bb?"(?:$|\\/)":"";i=Se+Ge+Ue+Je+Pt}if(i!==""&&u&&(i="(?=.)"+i),O&&(i=W()+i),r===Bb)return[i,u];if(a.nocase&&!u&&(u=o.toUpperCase()!==o.toLowerCase()),!u)return Uk(o);const Y=a.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",Y),{_glob:o,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const o=this.set;if(!o.length)return this.regexp=!1,this.regexp;const r=this.options,a=r.noglobstar?Wb:r.dot?jk:Fk,i=r.nocase?"i":"";let u=o.map(l=>(l=l.map(f=>typeof f=="string"?Hk(f):f===ho?ho:f._src).reduce((f,p)=>(f[f.length-1]===ho&&p===ho||f.push(p),f),[]),l.forEach((f,p)=>{f!==ho||l[p-1]===ho||(p===0?l.length>1?l[p+1]="(?:\\/|"+a+"\\/)?"+l[p+1]:l[p]=a:p===l.length-1?l[p-1]+="(?:\\/|"+a+")?":(l[p-1]+="(?:\\/|\\/"+a+"\\/)"+l[p+1],l[p+1]=ho))}),l.filter(f=>f!==ho).join("/"))).join("|");u="^(?:"+u+")$",this.negate&&(u="^(?!"+u+").*$");try{this.regexp=new RegExp(u,i)}catch{this.regexp=!1}return this.regexp}match(o,r=this.partial){if(this.debug("match",o,this.pattern),this.comment)return!1;if(this.empty)return o==="";if(o==="/"&&r)return!0;const a=this.options;I1.sep!=="/"&&(o=o.split(I1.sep).join("/")),o=o.split(YS),this.debug(this.pattern,"split",o);const i=this.set;this.debug(this.pattern,"set",i);let u;for(let l=o.length-1;l>=0&&(u=o[l],!u);l--);for(let l=0;l<i.length;l++){const f=i[l];let p=o;if(a.matchBase&&f.length===1&&(p=[u]),this.matchOne(p,f,r))return a.flipNegate?!0:!this.negate}return a.flipNegate?!1:this.negate}static defaults(o){return Wn.defaults(o).Minimatch}}Wn.Minimatch=$d;const Ex=gd(_x),Tx=[{pattern:Wr,editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:y_,editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"**/*.webform",editor:{key:"editors:webforms"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:"Methods/*.4dm",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Methods/*.4qs",editor:{key:"editors:code:method",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4dm",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"Classes/*.4qs",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(json)",editor:{key:"editors:code",config:{language:"json"}}},{pattern:"**/*.+(js)",editor:{key:"editors:code",config:{language:"js"}}},{pattern:"**/*.+(css)",editor:{key:"editors:code",config:{language:"css"}}},{pattern:"**/*.+(txt)",editor:{key:"editors:code",config:{language:""}}},{pattern:"Debugger/*",editor:{key:"editors:code",config:{theme:"fd-dark",language:"4d"}}},{pattern:"**/*.+(png|jpeg|jpg|gif|svg)",editor:{key:"editors:img"}}],xx=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function Cx(e){const o=e.split("/");return o.pop(),o.join("/")}function mo(e){const o=Tx.find(({pattern:r})=>Ex(e,r,{nocase:!0}));return o||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function Ox(e){const o=xx.find(({pattern:r})=>Ex(e,r,{nocase:!0}));return o?o.type:"text"}var M1=function(e,o){return M1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])},M1(e,o)};function kd(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");M1(e,o);function r(){this.constructor=e}e.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}function N1(e){var o=typeof Symbol=="function"&&Symbol.iterator,r=o&&e[o],a=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")}function id(e,o){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,u=[],l;try{for(;(o===void 0||o-- >0)&&!(i=a.next()).done;)u.push(i.value)}catch(f){l={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(l)throw l.error}}return u}function sd(e,o,r){if(r||arguments.length===2)for(var a=0,i=o.length,u;a<i;a++)(u||!(a in o))&&(u||(u=Array.prototype.slice.call(o,0,a)),u[a]=o[a]);return e.concat(u||Array.prototype.slice.call(o))}function ka(e){return typeof e=="function"}function Rx(e){var o=function(a){Error.call(a),a.stack=new Error().stack},r=e(o);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Ub=Rx(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
223
223
|
`+r.map(function(a,i){return i+1+") "+a.toString()}).join(`
|
|
224
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function $1(e,o){if(e){var r=e.indexOf(o);0<=r&&e.splice(r,1)}}var Ld=function(){function e(o){this.initialTeardown=o,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var o,r,a,i,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=N1(l),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){o={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}else l.remove(this);var m=this.initialTeardown;if(ka(m))try{m()}catch(C){u=C instanceof Ub?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var S=N1(b),x=S.next();!x.done;x=S.next()){var R=x.value;try{KS(R)}catch(C){u=u??[],C instanceof Ub?u=sd(sd([],id(u)),id(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{x&&!x.done&&(i=S.return)&&i.call(S)}finally{if(a)throw a.error}}}if(u)throw new Ub(u)}},e.prototype.add=function(o){var r;if(o&&o!==this)if(this.closed)KS(o);else{if(o instanceof e){if(o.closed||o._hasParent(this))return;o._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(o)}},e.prototype._hasParent=function(o){var r=this._parentage;return r===o||Array.isArray(r)&&r.includes(o)},e.prototype._addParent=function(o){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(o),r):r?[r,o]:o},e.prototype._removeParent=function(o){var r=this._parentage;r===o?this._parentage=null:Array.isArray(r)&&$1(r,o)},e.prototype.remove=function(o){var r=this._finalizers;r&&$1(r,o),o instanceof e&&o._removeParent(this)},e.EMPTY=function(){var o=new e;return o.closed=!0,o}(),e}(),Ax=Ld.EMPTY;function Px(e){return e instanceof Ld||e&&"closed"in e&&ka(e.remove)&&ka(e.add)&&ka(e.unsubscribe)}function KS(e){ka(e)?e():e.unsubscribe()}var Ix={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},k1={setTimeout:function(e,o){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var i=k1.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,sd([e,o],id(r))):setTimeout.apply(void 0,sd([e,o],id(r)))},clearTimeout:function(e){var o=k1.delegate;return((o==null?void 0:o.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Gk(e){k1.setTimeout(function(){throw e})}function XS(){}function Nf(e){e()}var Dx=function(e){kd(o,e);function o(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,Px(r)&&r.add(a)):a.destination=Xk,a}return o.create=function(r,a,i){return new L1(r,a,i)},o.prototype.next=function(r){this.isStopped||this._next(r)},o.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},o.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(r){this.destination.next(r)},o.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(Ld),Vk=Function.prototype.bind;function zb(e,o){return Vk.call(e,o)}var Yk=function(){function e(o){this.partialObserver=o}return e.prototype.next=function(o){var r=this.partialObserver;if(r.next)try{r.next(o)}catch(a){wf(a)}},e.prototype.error=function(o){var r=this.partialObserver;if(r.error)try{r.error(o)}catch(a){wf(a)}else wf(o)},e.prototype.complete=function(){var o=this.partialObserver;if(o.complete)try{o.complete()}catch(r){wf(r)}},e}(),L1=function(e){kd(o,e);function o(r,a,i){var u=e.call(this)||this,l;if(ka(r)||!r)l={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&Ix.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},l={next:r.next&&zb(r.next,f),error:r.error&&zb(r.error,f),complete:r.complete&&zb(r.complete,f)}):l=r}return u.destination=new Yk(l),u}return o}(Dx);function wf(e){Gk(e)}function Kk(e){throw e}var Xk={closed:!0,next:XS,error:Kk,complete:XS},Zk=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Jk(e){return e}function Qk(e){return e.length===0?Jk:e.length===1?e[0]:function(r){return e.reduce(function(a,i){return i(a)},r)}}var ZS=function(){function e(o){o&&(this._subscribe=o)}return e.prototype.lift=function(o){var r=new e;return r.source=this,r.operator=o,r},e.prototype.subscribe=function(o,r,a){var i=this,u=tL(o)?o:new L1(o,r,a);return Nf(function(){var l=i,f=l.operator,p=l.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(o){try{return this._subscribe(o)}catch(r){o.error(r)}},e.prototype.forEach=function(o,r){var a=this;return r=JS(r),new r(function(i,u){var l=new L1({next:function(f){try{o(f)}catch(p){u(p),l.unsubscribe()}},error:u,complete:i});a.subscribe(l)})},e.prototype._subscribe=function(o){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(o)},e.prototype[Zk]=function(){return this},e.prototype.pipe=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return Qk(o)(this)},e.prototype.toPromise=function(o){var r=this;return o=JS(o),new o(function(a,i){var u;r.subscribe(function(l){return u=l},function(l){return i(l)},function(){return a(u)})})},e.create=function(o){return new e(o)},e}();function JS(e){var o;return(o=e??Ix.Promise)!==null&&o!==void 0?o:Promise}function eL(e){return e&&ka(e.next)&&ka(e.error)&&ka(e.complete)}function tL(e){return e&&e instanceof Dx||eL(e)&&Px(e)}var rL=Rx(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Mx=function(e){kd(o,e);function o(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var a=new QS(this,this);return a.operator=r,a},o.prototype._throwIfClosed=function(){if(this.closed)throw new rL},o.prototype.next=function(r){var a=this;Nf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var l=N1(a.currentObservers),f=l.next();!f.done;f=l.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(i)throw i.error}}}})},o.prototype.error=function(r){var a=this;Nf(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=r;for(var i=a.observers;i.length;)i.shift().error(r)}})},o.prototype.complete=function(){var r=this;Nf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,l=i.isStopped,f=i.observers;return u||l?Ax:(this.currentObservers=null,f.push(r),new Ld(function(){a.currentObservers=null,$1(f,r)}))},o.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,l=a.isStopped;i?r.error(u):l&&r.complete()},o.prototype.asObservable=function(){var r=new ZS;return r.source=this,r},o.create=function(r,a){return new QS(r,a)},o}(ZS),QS=function(e){kd(o,e);function o(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return o.prototype.next=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.next)===null||i===void 0||i.call(a,r)},o.prototype.error=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.error)===null||i===void 0||i.call(a,r)},o.prototype.complete=function(){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||a===void 0||a.call(r)},o.prototype._subscribe=function(r){var a,i;return(i=(a=this.source)===null||a===void 0?void 0:a.subscribe(r))!==null&&i!==void 0?i:Ax},o}(Mx);const Nx=new Mx,nL=()=>fx(),Io=Tk,O_=le(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),oL=le(O_,e=>e?e.dataClasses:[]),aL=le(O_,e=>e?e.methods:[]),$x=e=>le(o=>o,o=>{switch(o.catalog.state){case"loaded":const r=e?o.catalog.model.dataClasses[e]:o.catalog.model;return(r==null?void 0:r.methods)||[];default:return[]}}),iL=e=>Io($x(e),ux),sL=(e,o)=>le($x(e),r=>r.find(a=>`${a.applyTo}.${a.name}`===o)),uL=(e,o,r)=>Io(sL(e,`${r}.${o}`),ux),kx=le(e=>e,e=>e),cL=e=>le(Ba,o=>{var i;const r=o.tabs.find(({path:u})=>u===e),a=r==null?void 0:r.content.components;return!r||!a?[]:(i=Object.keys(a))==null?void 0:i.map(u=>({id:u,...a[u]}))}),Lx=e=>le(Ba,o=>{var a,i;const r=o.tabs.find(({path:u})=>u===e);return((i=(a=r==null?void 0:r.content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]}),lL=(e,o,r)=>le(kx,a=>{var i,u;if(o){const l=a.sharedDatasources.sources[o];return l?l.find(f=>f.id===e):void 0}else{const l=a.root.tabs.find(p=>p.path===r);return l?(u=(i=l.content.metadata)==null?void 0:i.datasources)==null?void 0:u.find(p=>p.id===e):void 0}}),jx=le(e=>e,e=>e.sharedDatasources.sources),fL=(e,o,r,a)=>le(Lx(e),jx,(i,u)=>{const l=Ft.flatten(Ft.values(u)),f=[...o!=="private"?i:[],...o!=="shared"?l:[]];return r?f.filter(p=>(!a||a.every(({id:h,namespace:m=""})=>p.id!==h||(p.namespace||"")!==m))&&(r.includes(p.type)||p.dataType&&(r.includes(p.dataType)||r.includes("objectFromArray")&&p.dataType==="object"&&p.from))):f}),dL=le(e=>e.debugger,e=>e.meta),Rs=le(e=>e.debugger,e=>e.list),_n=le(e=>e.debugger,e=>e.sessions),pL=le(_n,e=>e.length),Cs=(e,o,r,a)=>e.find(i=>i.filePath===o&&i.methodName===r&&(!a||i.className===a)),lr=(e,o)=>e.find(r=>r.threadId===o),Fx=(e,o)=>e.find(r=>r.tabPath===o),hL=(e,o)=>le(Rs,r=>{var a;return((a=Cs(r,e,o))==null?void 0:a.breakpoints.saved.locations)||[]}),vL=(e,o)=>le(Rs,r=>{var a;return((a=Cs(r,e,o))==null?void 0:a.breakpoints.draft.locations)||[]}),gL=e=>le(Rs,o=>o.filter(r=>r.filePath===e).reduce((r,a)=>[...r,...a.breakpoints.saved.locations.map(i=>({...i,line:i.line+(a.breakpoints.saved.offset||0)}))],[]).sort((r,a)=>r.line-a.line)),mL=e=>le(Rs,o=>o.filter(r=>r.filePath===e).reduce((r,a)=>[...r,...a.breakpoints.draft.locations.map(i=>({...i,line:i.line+(a.breakpoints.draft.offset||0)}))],[]).sort((r,a)=>r.line-a.line)),yL=e=>le(_n,o=>{const r=lr(o,e);return r!=null&&r.stopped?r.highlightedLines:null}),bL=e=>le(_n,o=>{const r=lr(o,e);return r!=null&&r.stopped?r.activeLine:null}),_L=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.expressions)||[]}),wL=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.stopped)||!1}),SL=(e,o)=>le(Rs,r=>{var a;return(a=Cs(r,e,o))==null?void 0:a.source}),EL=e=>le(_n,o=>{var r;return((r=Fx(o,e))==null?void 0:r.threadId)||-1}),TL=e=>le(_n,o=>{var r,a;return(a=(r=lr(o,e))==null?void 0:r.currentStackFrame)==null?void 0:a.source}),xL=e=>le(_n,o=>{var r;return(r=lr(o,e))==null?void 0:r.currentStackFrame}),CL=le(_n,e=>e.map(({channelId:o,threadId:r})=>({id:o,threadId:r}))),OL=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.stackFrames)||[]}),RL=e=>le(_n,o=>{var r,a;return((a=(r=lr(o,e))==null?void 0:r.variables)==null?void 0:a.callchain)||[]}),AL=e=>le(_n,o=>{var r,a;return((a=(r=lr(o,e))==null?void 0:r.variables)==null?void 0:a.expressions)||[]}),PL=(e,o="saved")=>le(Rs,r=>{const a=r.find(i=>i.filePath===e);return(a==null?void 0:a.breakpoints[o].offset)||0}),IL=(e,o,r,a)=>le(_n,i=>{var h;const u=((h=lr(i,e))==null?void 0:h.exceptions)||[],l=o===ie.CLASS,f=l&&a?`${a}.${r}`:r;return(f?u.filter(m=>m.location===f):u).map(m=>({...m,locationLine:l?m.locationLine:m.locationLine+1}))}),Ba=le(e=>e.root,e=>e),ru=le(Ba,e=>e.tabs),DL=le(Ba,e=>e.activeTab),ML=le(Ba,e=>e.recent.filter(({type:o})=>o!==ie.DEBUGGER)),NL=le(Ba,({tabs:e,activeTab:o})=>e.find(({path:r})=>r===o)),$L=le(Ba,({tabs:e})=>e.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null)),kL=le(ru,e=>e.filter(({type:o,flags:r})=>o===ie.WEBFORM&&r.enabled===!1).map(({path:o})=>o)),LL=le(ru,e=>e.length>0),sf=e=>le(Ba,o=>o.tabs.find(({path:r})=>r===e)),Wx=(e,o="")=>le(sf(e),r=>!r||!r.content||typeof r.content=="string"?r==null?void 0:r.content:Ft.get(r.content,o)),jL=e=>le(sf(e),o=>o==null?void 0:o.extra),FL=(e,o=r=>r)=>le(Wx(e,"components"),r=>o(r||{})),R_=le(ru,e=>e.filter(o=>o.flags.touched)),WL=le(R_,e=>e.length),BL=le(_n,e=>e.map(({threadId:o,currentStackFrame:{source:r},tabPath:a})=>({name:ex(o,r),path:a,type:ie.DEBUGGER,content:r==null?void 0:r.content,flags:{},extra:{source:r}}))),UL=le(e=>e,e=>e.explorer||[]),Bx=le(e=>e,e=>e.explorer.find(o=>o.path===jt.WEBFORMS)),Ux=le(e=>e,e=>e.explorer.find(o=>o.path===jt.METHODS)),zx=le(e=>e,e=>e.explorer.find(o=>o.path===jt.CLASSES)),zL=le(Ux,e=>(e==null?void 0:e.children)||[]),HL=le(Bx,e=>(e==null?void 0:e.children)||[]),qL=le(zx,e=>(e==null?void 0:e.children)||[]),GL=le(e=>e.modals,e=>e.list),VL=le(e=>e.roles,({roles:e})=>e),YL=le(e=>e.roles,({privileges:e})=>e),KL=le(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:o})=>o==="guest")),XL=le(e=>e.roles,({flags:e})=>e),ZL=le(e=>e.roles,({selectedTab:e})=>e),JL=le(e=>e.roles,({date:e})=>e),Hx=le(e=>e.settings,e=>e.session),QL=le(e=>e.settings,e=>e.project),e3=le(e=>e.settings,e=>e),A_=le(e=>e.settings,e=>e.server),t3=le(A_,e=>e.remoteDebuggerMode),r3=le(A_,e=>e.qodly),n3=le(Hx,e=>e["monaco.zoom"]),qx=["rounded-full","rounded-lg","border-gray-400","border-2","bg-red-500","bg-blue-500","bg-indigo-500","bg-transparent","bg-primary-dark","bg-green-500","bg-yellow-400","text-gray-500","text-4xl","text-white","px-4","py-2","primary","info","secondary","success","warning","danger","w-10","w-20","w-40","w-60","w-80","mb-2","mb-3","shadow","shadow-lg","shadow-xl","shadow-2xl"],Gx=qx.map(e=>({id:J1(),content:"",name:e,parentId:null,scope:xs.THEME})),P_=e=>le(sf(e),o=>{var r,a;return((a=(r=o==null?void 0:o.content)==null?void 0:r.metadata)==null?void 0:a.styles)||[]}),o3=(e,o)=>le(P_(e),r=>o.map(a=>{switch(!0){case a===xs.LOCAL:return r.map(i=>({...i,scope:xs.LOCAL}));case a===xs.THEME:return Gx;default:return[]}}).flat()),a3=e=>le(P_(e),o=>[...o.map(r=>({...r,scope:xs.LOCAL})),...Gx]),i3=le(e=>e,e=>{var o;return[...(((o=e.sharedCSS)==null?void 0:o.styles)||[]).map(r=>({...r,scope:xs.SHARED}))]}),s3=e=>le(sf(e),o=>o==null?void 0:o.flags),uf=le(e=>e.webforms,e=>e),Vx=le(uf,e=>(e==null?void 0:e.components)||[]),jd=le(uf,e=>e.inspector),u3=le(jd,e=>e.css),c3=le(jd,e=>e.datasource),Yx=le(uf,e=>e.templates||{data:[]}),l3=le(Yx,e=>e.data||[]),f3=e=>le(Vx,o=>o.find(r=>r.id===e)),d3=e=>le(jd,o=>o[e]),p3=le(uf,e=>e.datasources.theme),h3=le(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,o,r)=>[e.state,o.state,r.state].every(a=>["loaded","error"].includes(a)));var I_=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e))(I_||{}),D_=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(D_||{}),Kx=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Kx||{});const Xx={metadata:{v:"1.0",datasources:[],styles:[]},components:{ROOT:{parent:"",type:{resolvedName:"Container"},isCanvas:!0,props:{className:"bg-white h-full w-full px-6",classNames:[],events:[],airyMode:!1},displayName:"App",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}};var Sf,v3=new Uint8Array(16);function Zx(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(v3)}const g3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Fd(e){return typeof e=="string"&&g3.test(e)}var Lr=[];for(var Hb=0;Hb<256;++Hb)Lr.push((Hb+256).toString(16).substr(1));function Wd(e){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Lr[e[o+0]]+Lr[e[o+1]]+Lr[e[o+2]]+Lr[e[o+3]]+"-"+Lr[e[o+4]]+Lr[e[o+5]]+"-"+Lr[e[o+6]]+Lr[e[o+7]]+"-"+Lr[e[o+8]]+Lr[e[o+9]]+"-"+Lr[e[o+10]]+Lr[e[o+11]]+Lr[e[o+12]]+Lr[e[o+13]]+Lr[e[o+14]]+Lr[e[o+15]]).toLowerCase();if(!Fd(r))throw TypeError("Stringified UUID is invalid");return r}var eE,qb,Gb=0,Vb=0;function m3(e,o,r){var a=o&&r||0,i=o||new Array(16);e=e||{};var u=e.node||eE,l=e.clockseq!==void 0?e.clockseq:qb;if(u==null||l==null){var f=e.random||(e.rng||Zx)();u==null&&(u=eE=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),l==null&&(l=qb=(f[6]<<8|f[7])&16383)}var p=e.msecs!==void 0?e.msecs:Date.now(),h=e.nsecs!==void 0?e.nsecs:Vb+1,m=p-Gb+(h-Vb)/1e4;if(m<0&&e.clockseq===void 0&&(l=l+1&16383),(m<0||p>Gb)&&e.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gb=p,Vb=h,qb=l,p+=122192928e5;var b=((p&268435455)*1e4+h)%4294967296;i[a++]=b>>>24&255,i[a++]=b>>>16&255,i[a++]=b>>>8&255,i[a++]=b&255;var S=p/4294967296*1e4&268435455;i[a++]=S>>>8&255,i[a++]=S&255,i[a++]=S>>>24&15|16,i[a++]=S>>>16&255,i[a++]=l>>>8|128,i[a++]=l&255;for(var x=0;x<6;++x)i[a+x]=u[x];return o||Wd(i)}function Jx(e){if(!Fd(e))throw TypeError("Invalid UUID");var o,r=new Uint8Array(16);return r[0]=(o=parseInt(e.slice(0,8),16))>>>24,r[1]=o>>>16&255,r[2]=o>>>8&255,r[3]=o&255,r[4]=(o=parseInt(e.slice(9,13),16))>>>8,r[5]=o&255,r[6]=(o=parseInt(e.slice(14,18),16))>>>8,r[7]=o&255,r[8]=(o=parseInt(e.slice(19,23),16))>>>8,r[9]=o&255,r[10]=(o=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=o/4294967296&255,r[12]=o>>>24&255,r[13]=o>>>16&255,r[14]=o>>>8&255,r[15]=o&255,r}function y3(e){e=unescape(encodeURIComponent(e));for(var o=[],r=0;r<e.length;++r)o.push(e.charCodeAt(r));return o}var b3="6ba7b810-9dad-11d1-80b4-00c04fd430c8",_3="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qx(e,o,r){function a(i,u,l,f){if(typeof i=="string"&&(i=y3(i)),typeof u=="string"&&(u=Jx(u)),u.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var p=new Uint8Array(16+i.length);if(p.set(u),p.set(i,u.length),p=r(p),p[6]=p[6]&15|o,p[8]=p[8]&63|128,l){f=f||0;for(var h=0;h<16;++h)l[f+h]=p[h];return l}return Wd(p)}try{a.name=e}catch{}return a.DNS=b3,a.URL=_3,a}function w3(e){if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=new Uint8Array(o.length);for(var r=0;r<o.length;++r)e[r]=o.charCodeAt(r)}return S3(E3(T3(e),e.length*8))}function S3(e){for(var o=[],r=e.length*32,a="0123456789abcdef",i=0;i<r;i+=8){var u=e[i>>5]>>>i%32&255,l=parseInt(a.charAt(u>>>4&15)+a.charAt(u&15),16);o.push(l)}return o}function eC(e){return(e+64>>>9<<4)+14+1}function E3(e,o){e[o>>5]|=128<<o%32,e[eC(o)-1]=o;for(var r=1732584193,a=-271733879,i=-1732584194,u=271733878,l=0;l<e.length;l+=16){var f=r,p=a,h=i,m=u;r=qr(r,a,i,u,e[l],7,-680876936),u=qr(u,r,a,i,e[l+1],12,-389564586),i=qr(i,u,r,a,e[l+2],17,606105819),a=qr(a,i,u,r,e[l+3],22,-1044525330),r=qr(r,a,i,u,e[l+4],7,-176418897),u=qr(u,r,a,i,e[l+5],12,1200080426),i=qr(i,u,r,a,e[l+6],17,-1473231341),a=qr(a,i,u,r,e[l+7],22,-45705983),r=qr(r,a,i,u,e[l+8],7,1770035416),u=qr(u,r,a,i,e[l+9],12,-1958414417),i=qr(i,u,r,a,e[l+10],17,-42063),a=qr(a,i,u,r,e[l+11],22,-1990404162),r=qr(r,a,i,u,e[l+12],7,1804603682),u=qr(u,r,a,i,e[l+13],12,-40341101),i=qr(i,u,r,a,e[l+14],17,-1502002290),a=qr(a,i,u,r,e[l+15],22,1236535329),r=Gr(r,a,i,u,e[l+1],5,-165796510),u=Gr(u,r,a,i,e[l+6],9,-1069501632),i=Gr(i,u,r,a,e[l+11],14,643717713),a=Gr(a,i,u,r,e[l],20,-373897302),r=Gr(r,a,i,u,e[l+5],5,-701558691),u=Gr(u,r,a,i,e[l+10],9,38016083),i=Gr(i,u,r,a,e[l+15],14,-660478335),a=Gr(a,i,u,r,e[l+4],20,-405537848),r=Gr(r,a,i,u,e[l+9],5,568446438),u=Gr(u,r,a,i,e[l+14],9,-1019803690),i=Gr(i,u,r,a,e[l+3],14,-187363961),a=Gr(a,i,u,r,e[l+8],20,1163531501),r=Gr(r,a,i,u,e[l+13],5,-1444681467),u=Gr(u,r,a,i,e[l+2],9,-51403784),i=Gr(i,u,r,a,e[l+7],14,1735328473),a=Gr(a,i,u,r,e[l+12],20,-1926607734),r=Vr(r,a,i,u,e[l+5],4,-378558),u=Vr(u,r,a,i,e[l+8],11,-2022574463),i=Vr(i,u,r,a,e[l+11],16,1839030562),a=Vr(a,i,u,r,e[l+14],23,-35309556),r=Vr(r,a,i,u,e[l+1],4,-1530992060),u=Vr(u,r,a,i,e[l+4],11,1272893353),i=Vr(i,u,r,a,e[l+7],16,-155497632),a=Vr(a,i,u,r,e[l+10],23,-1094730640),r=Vr(r,a,i,u,e[l+13],4,681279174),u=Vr(u,r,a,i,e[l],11,-358537222),i=Vr(i,u,r,a,e[l+3],16,-722521979),a=Vr(a,i,u,r,e[l+6],23,76029189),r=Vr(r,a,i,u,e[l+9],4,-640364487),u=Vr(u,r,a,i,e[l+12],11,-421815835),i=Vr(i,u,r,a,e[l+15],16,530742520),a=Vr(a,i,u,r,e[l+2],23,-995338651),r=Yr(r,a,i,u,e[l],6,-198630844),u=Yr(u,r,a,i,e[l+7],10,1126891415),i=Yr(i,u,r,a,e[l+14],15,-1416354905),a=Yr(a,i,u,r,e[l+5],21,-57434055),r=Yr(r,a,i,u,e[l+12],6,1700485571),u=Yr(u,r,a,i,e[l+3],10,-1894986606),i=Yr(i,u,r,a,e[l+10],15,-1051523),a=Yr(a,i,u,r,e[l+1],21,-2054922799),r=Yr(r,a,i,u,e[l+8],6,1873313359),u=Yr(u,r,a,i,e[l+15],10,-30611744),i=Yr(i,u,r,a,e[l+6],15,-1560198380),a=Yr(a,i,u,r,e[l+13],21,1309151649),r=Yr(r,a,i,u,e[l+4],6,-145523070),u=Yr(u,r,a,i,e[l+11],10,-1120210379),i=Yr(i,u,r,a,e[l+2],15,718787259),a=Yr(a,i,u,r,e[l+9],21,-343485551),r=Ya(r,f),a=Ya(a,p),i=Ya(i,h),u=Ya(u,m)}return[r,a,i,u]}function T3(e){if(e.length===0)return[];for(var o=e.length*8,r=new Uint32Array(eC(o)),a=0;a<o;a+=8)r[a>>5]|=(e[a/8]&255)<<a%32;return r}function Ya(e,o){var r=(e&65535)+(o&65535),a=(e>>16)+(o>>16)+(r>>16);return a<<16|r&65535}function x3(e,o){return e<<o|e>>>32-o}function Bd(e,o,r,a,i,u){return Ya(x3(Ya(Ya(o,e),Ya(a,u)),i),r)}function qr(e,o,r,a,i,u,l){return Bd(o&r|~o&a,e,o,i,u,l)}function Gr(e,o,r,a,i,u,l){return Bd(o&a|r&~a,e,o,i,u,l)}function Vr(e,o,r,a,i,u,l){return Bd(o^r^a,e,o,i,u,l)}function Yr(e,o,r,a,i,u,l){return Bd(r^(o|~a),e,o,i,u,l)}var C3=Qx("v3",48,w3);const O3=C3;function R3(e,o,r){e=e||{};var a=e.random||(e.rng||Zx)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,o){r=r||0;for(var i=0;i<16;++i)o[r+i]=a[i];return o}return Wd(a)}function A3(e,o,r,a){switch(e){case 0:return o&r^~o&a;case 1:return o^r^a;case 2:return o&r^o&a^r&a;case 3:return o^r^a}}function Yb(e,o){return e<<o|e>>>32-o}function P3(e){var o=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var a=unescape(encodeURIComponent(e));e=[];for(var i=0;i<a.length;++i)e.push(a.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var u=e.length/4+2,l=Math.ceil(u/16),f=new Array(l),p=0;p<l;++p){for(var h=new Uint32Array(16),m=0;m<16;++m)h[m]=e[p*64+m*4]<<24|e[p*64+m*4+1]<<16|e[p*64+m*4+2]<<8|e[p*64+m*4+3];f[p]=h}f[l-1][14]=(e.length-1)*8/Math.pow(2,32),f[l-1][14]=Math.floor(f[l-1][14]),f[l-1][15]=(e.length-1)*8&4294967295;for(var b=0;b<l;++b){for(var S=new Uint32Array(80),x=0;x<16;++x)S[x]=f[b][x];for(var R=16;R<80;++R)S[R]=Yb(S[R-3]^S[R-8]^S[R-14]^S[R-16],1);for(var C=r[0],N=r[1],k=r[2],W=r[3],I=r[4],$=0;$<80;++$){var O=Math.floor($/20),Y=Yb(C,5)+A3(O,N,k,W)+I+o[O]+S[$]>>>0;I=W,W=k,k=Yb(N,30)>>>0,N=C,C=Y}r[0]=r[0]+C>>>0,r[1]=r[1]+N>>>0,r[2]=r[2]+k>>>0,r[3]=r[3]+W>>>0,r[4]=r[4]+I>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var I3=Qx("v5",80,P3);const D3=I3,M3="00000000-0000-0000-0000-000000000000";function N3(e){if(!Fd(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const $3=Object.freeze(Object.defineProperty({__proto__:null,NIL:M3,parse:Jx,stringify:Wd,v1:m3,v3:O3,v4:R3,v5:D3,validate:Fd,version:N3},Symbol.toStringTag,{value:"Module"})),k3=ER($3);function M_(e,o){if(!e||!o||!e.length||!o.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=o}M_.prototype.convert=function(e){var o,r,a,i={},u=this.srcAlphabet.length,l=this.dstAlphabet.length,f=e.length,p=typeof e=="string"?"":[];if(!this.isValid(e))throw new Error('Number "'+e+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return e;for(o=0;o<f;o++)i[o]=this.srcAlphabet.indexOf(e[o]);do{for(r=0,a=0,o=0;o<f;o++)r=r*u+i[o],r>=l?(i[a++]=parseInt(r/l,10),r=r%l):a>0&&(i[a++]=0);f=a,p=this.dstAlphabet.slice(r,r+1).concat(p)}while(a!==0);return p};M_.prototype.isValid=function(e){for(var o=0;o<e.length;++o)if(this.srcAlphabet.indexOf(e[o])===-1)return!1;return!0};var L3=M_,j3=L3;function cf(e,o){var r=new j3(e,o);return function(a){return r.convert(a)}}cf.BIN="01";cf.OCT="01234567";cf.DEC="0123456789";cf.HEX="0123456789abcdef";var F3=cf;const{v4:Kb}=k3,Ef=F3,Xb="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",W3="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",B3={consistentLength:!0};let Zb;const tE=(e,o,r)=>{const a=o(e.toLowerCase().replace(/-/g,""));return!r||!r.consistentLength?a:a.padStart(r.shortIdLength,r.paddingChar)},U3=(e,o)=>{const a=o(e).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[a[1],a[2],a[3],a[4],a[5]].join("-")},z3=e=>Math.ceil(Math.log(2**128)/Math.log(e));var ud=(()=>{const e=(o,r)=>{const a=o||Xb,i={...B3,...r};if([...new Set(Array.from(a))].length!==a.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const u=z3(a.length),l={shortIdLength:u,consistentLength:i.consistentLength,paddingChar:a[0]},f=Ef(Ef.HEX,a),p=Ef(a,Ef.HEX),h=()=>tE(Kb(),f,l),m={new:h,generate:h,uuid:Kb,fromUUID:b=>tE(b,f,l),toUUID:b=>U3(b,p),alphabet:a,maxLength:u};return Object.freeze(m),m};return e.constants={flickrBase58:Xb,cookieBase90:W3},e.uuid=Kb,e.generate=()=>(Zb||(Zb=e(Xb).generate),Zb()),e})(),vt=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(vt||{});const H3=[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE,vt.METHOD],cd="guest",N_=[{key:"read",label:"Read",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE,vt.METHOD]},{key:"execute",label:"Execute",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.METHOD]},{key:"promote",label:"Promote",canApplyTo:[vt.METHOD]}];function zn(e,...o){return Array.from(new Set([...e,...o]))}function tC(e){const o={},r=new Map;e.forEach(p=>{const h=p.id||ud.generate();o[h]={...p,id:h,parents:[],includes:zn(p.includes||[]),resources:[]},r.set(p.privilege,h)}),Object.entries(o).forEach(([p,h])=>{const m=h.includes.map(b=>{const S=r.get(b);return S?(o[S].parents=zn(o[S].parents,S),S):""}).filter(Boolean);o[p]={...h,includes:m}});const a=rC(o),i=new Set;function u(p){i.add(p.id),p.includes=p.includes.filter(h=>!i.has(h))}if(a.forEach(u),a.forEach(p=>p.parents=[]),a.forEach(p=>{p.includes.forEach(h=>o[h].parents.push(p.id))}),Object.values(o).find(({privilege:p})=>p===cd))return o;const f=ud.generate();return{[f]:{id:f,privilege:cd,includes:[],parents:[],resources:[]},...o}}function rC(e){return Object.values(e).sort((o,r)=>o.parents.length-r.parents.length)}function Ud(e,o){const r=o[e];let a=[];return r&&r.parents.forEach(i=>{a=zn(a,...Ud(i,o),i)}),a}function ld(e,o){const r=o[e];let a=[];return r&&r.includes.forEach(i=>{a=zn(a,...ld(i,o),i)}),a}function q3(e,o){const r=o[e];if(!r)return[];const a=[e,...Ud(e,o),...r.includes];return Object.keys(o).filter(i=>!a.includes(i))}function G3(e,o){return o[e]?Object.keys(o).reduce((a,i)=>i===e?a:{...a,[i]:{...o[i],parents:o[i].parents.filter(u=>u!==e),includes:o[i].includes.filter(u=>u!==e)}},{}):o}function V3(e,o,r){const a=r[e],i=r[o];return!a||!i?r:{...r,[e]:{...r[e],includes:zn(a.includes,o)},[o]:{...r[o],parents:zn(i.parents,e)}}}function Y3(e,o,r){const a=r[e],i=r[o];return!a||!i?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(u=>u!==o)},[o]:{...r[o],parents:r[o].parents.filter(u=>u!==e)}}}function nC(e,o){PT(e),Object.entries(o).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=ud.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...o}}function K3(e,o,r,a,i){let u=nC(e,i);const l=Object.entries(u).find(([,f])=>f.privilege===e);return l?(u=sC(l[1].id,o,r,a,u),u):i}function X3(e,o,r){if(!e)throw new Error("Please enter a name");if(!r[o])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:a,id:i}])=>{if(e.toLowerCase()===a.toLowerCase()&&o!==i)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[o]:{...r[o],privilege:e}}}function Z3(e,o){return e.map(r=>Ua(r,o))}function Ua(e,o){return o[e]?o[e]:null}function oC({applyTo:e,type:o,...r}){return Object.entries(r).reduce((a,[i,u])=>{const l=Ft.find(N_,["key",i]);return!l||!l.canApplyTo.includes(o)||(typeof u=="string"?u.split(","):u).forEach(p=>{a[p]=zn(a[p]||[],i)}),a},{})}const j1=(e,o=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${o?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${o?"through the model (DataStore, Dataclasses, Entity selections, Entities) have the execute permission":"on this Dataclass, Entity selection class, Entity class have the execute permission"}`:`All ${o?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function $_(e){return{permissions:N_.filter(({canApplyTo:o})=>o.includes(e.type)).map(({key:o,label:r})=>{const a={name:o,from:[]};switch(e.type){case vt.DATASTORE:return{...a,info:j1(r,!0)};case vt.DATACLASS:return{...a,info:j1(r)};default:return a}}),resource:e.applyTo,type:e.type}}function aC(e,o){const r=iC(o),a={};return e.filter(({type:i})=>H3.includes(i)).forEach(i=>{const u=oC(i);Object.entries(u).forEach(([l,f])=>{var m;const p=(m=r[l])==null?void 0:m.id;if(!p)return;a[p]=a[p]||{...o[p]};let h=Ft.find(a[p].resources,{resource:i.applyTo,type:i.type});h||(h=$_(i),a[p].resources.push(h)),h.permissions=h.permissions.map(b=>({...b,checked:b.checked||f.includes(b.name)}))})}),{...o,...a}}function iC(e){return Object.values(e).reduce((o,r)=>({...o,[r.privilege]:r}),{})}function zd(e){var r;const o=tC(e.privileges||[]);return{privileges:aC(((r=e.permissions)==null?void 0:r.allowed)||[],o),roles:(e.roles||[]).map(({id:a=ud.generate(),role:i,privileges:u=[]})=>({id:a,role:i,privileges:zn(u).map(l=>{var f;return(f=Object.values(o).find(({privilege:p})=>p===l))==null?void 0:f.id}).filter(Boolean)})).reduce((a,i)=>({...a,[i.id]:{...i}}),{})}}function k_(e){const o=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),r=[...o,...o.map(a=>Ud(a,e.privileges).reverse())].flat().filter((a,i,u)=>u.indexOf(a)===i).map(a=>e.privileges[a]);return{permissions:{allowed:Object.values(e.privileges).reduce((a,i)=>(i.resources.forEach(({permissions:u,resource:l,type:f})=>{let p=Ft.find(a,{applyTo:l,type:f});p||(p={applyTo:l,type:f},a.push(p)),u.forEach(({name:h,checked:m})=>{m&&p&&(p[h]=p[h]||[],p[h].push(i.privilege))})}),a),[])},privileges:r.filter(({privilege:a})=>a!==cd).map(({id:a,includes:i,privilege:u})=>({id:a,privilege:u,includes:i.map(l=>e.privileges[l].privilege)})),roles:Object.values(e.roles).map(a=>({...a,privileges:a.privileges.map(i=>{var u;return(u=e.privileges[i])==null?void 0:u.privilege}).filter(Boolean)}))}}function J3(e,o){const r=o[e],a={children:[],links:[],parents:[],selected:e};if(!r)return a;function i(f,p,h=[]){const m=f.reduce((b,S)=>[...b,...o[S][p]],[]);return m.length===0?h:(h.push(m),i(m,p,h))}function u(f){const p=[],h=[];for(let m=f.length-1;m>=0;m-=1){const b=f[m].filter(S=>p.includes(S)?!1:(p.push(S),!0));b.length>0&&h.unshift(zn(b))}return h}function l(f,p){const h=[];return f.reduce((m,b)=>(b.forEach(S=>{o[S][p==="parents"?"includes":"parents"].forEach(R=>{h.includes(R)&&m.push(p==="parents"?{source:S,target:R}:{source:R,target:S})}),h.push(S)}),m),[])}return a.children=i([e],"includes"),a.children=u(a.children),a.parents=i([e],"parents"),a.parents=u(a.parents),a.links=[...l([[e],...a.parents],"parents"),...l([[e],...a.children],"includes")],a}function Q3(e,o,r){const a=Ua(e,r);if(!a||Ft.find(a.resources,{resource:o.applyTo,type:o.type}))return r;const i={...a,resources:[...a.resources,$_(o)]};return{...r,[e]:i}}function ej(e,o,r){const a=Ua(e,r);if(!a)return r;const i={...a,resources:a.resources.filter(({resource:u,type:l})=>u!==o.applyTo||l!==o.type)};return{...r,[e]:i}}function tj(e,o){const r=Ua(e,o);if(!r)return o;const a={...r,resources:r.resources.filter(i=>i.permissions.some(u=>u.from.length)).map(i=>({...i,permissions:i.permissions.map(u=>({...u,checked:!1}))}))};return{...o,[e]:a}}function sC(e,o,r,a,i){const u=Ua(e,i);if(!u)return i;const f=Ft.find(u.resources,{type:r,resource:o})?{...u,resources:u.resources.map(p=>p.type===r&&p.resource===o?{...p,permissions:p.permissions.map(h=>h.name===a?{...h,checked:!h.checked,from:[]}:h)}:p)}:{...u,resources:[...u.resources,{type:r,resource:o,permissions:N_.filter(p=>p.canApplyTo.includes(r)).map(p=>({from:[],name:p.key,checked:p.key===a,info:j1(p.key,r===vt.DATASTORE)}))}]};return{...i,[e]:f}}function rj(e,o,r,a){const i=Ua(e,a);if(!i)return a;const l=Ft.find(i.resources,{type:o.type,resource:o.resource})?{...i,resources:i.resources.map(f=>f.type===o.type&&f.resource===o.resource?{...f,permissions:o.permissions.map(p=>p.name===r.name?{...p,checked:!p.checked,from:[]}:p)}:f)}:{...i,resources:[...i.resources,{...o,permissions:o.permissions.map(f=>({...f,checked:r.name===f.name,from:[]}))}]};return{...a,[e]:l}}function nj(e,o){var p;const r=uC(e,o)||[],a=((p=Ua(e,o))==null?void 0:p.resources)||[],l=([...r,...a].filter(({type:h})=>h===vt.METHOD)||[]).map(({resource:h})=>h);return Object.entries(o).reduce((h,[m,{resources:b}])=>(b.filter(({resource:S,type:x})=>x===vt.METHOD&&l.includes(S)).forEach(({permissions:S,resource:x})=>{var C;((C=S.find(({name:N})=>N==="promote"))==null?void 0:C.checked)&&(h[x]=zn(h[x]||[],m))}),h),{})}function uC(e,o){var l;const r=Ua(e,o);if(!r)return[];const a=(l=Object.values(o).find(f=>f.privilege===cd))==null?void 0:l.id;return(a&&a!==e?zn(ld(e,o),a):ld(e,o)).reduce((f,p)=>(o[p].resources.forEach(m=>{if(m.permissions.filter(({checked:x})=>x).length===0)return;const S=Ft.find(f,{type:m.type,resource:m.resource});if(!S){f.push({...m,permissions:m.permissions.map(x=>({...x,from:x.checked?[p]:[],checked:!1}))});return}S.permissions=S.permissions.map((x,R)=>{let{from:C=[]}=x;return m.permissions[R].checked&&!C.includes(p)&&(C=[...C,p]),{...x,from:C,checked:x.checked}})}),f),Ft.clone(r.resources.map(f=>({...f,permissions:f.permissions.map(({checked:p,...h})=>({...h,checked:!!p}))}))))}const oj=e=>e.reduce((o,r)=>({...o,[r.id]:{...r}}),{}),aj=(e,o)=>o[e]?Object.values(o).reduce((r,a)=>e===a.id||a.role===""?r:{...r,[a.id]:a},{}):o,ij=(e,o,r)=>r[e]?Object.values(r).reduce((a,i)=>e===i.id?{...a,[i.id]:{...i,name:o}}:{...a,[i.id]:i},{}):r,sj=(e,o)=>{const r={id:e,role:"",privileges:[]};return{...o,[r.id]:r}},uj=(e,o)=>{if(PT(e.role),Object.values(o).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(o).reduce((a,i)=>e.id===i.id?{...a,[e.id]:e}:{...a,[i.id]:i},{})},cj={list:[]},rE=(e,o)=>e.list.filter(r=>r.id!==o),cC=Hn({name:"modals",initialState:cj,reducers:{createModal:(e,o)=>{e.list.push(o.payload)},editModal:(e,o)=>{const{id:r,...a}=o.payload,i=e.list.find(g2(r));i&&Object.assign(i,{...a})},removeModal:(e,o)=>{const r=o.payload;e.list=rE(e,r)},closeModal:(e,o)=>{const{id:r,reason:a}=o.payload;if(a){const i=e.list.find(u=>u.id===r);i&&(i.closeReason=a,i.isOpen=!1)}else e.list=rE(e,r)}}}),{createModal:lC,removeModal:fC,closeModal:lj,editModal:fj}=cC.actions;var dC={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},nE=ze.createContext&&ze.createContext(dC),Za=globalThis&&globalThis.__assign||function(){return Za=Object.assign||function(e){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},Za.apply(this,arguments)},dj=globalThis&&globalThis.__rest||function(e,o){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)o.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};function pC(e){return e&&e.map(function(o,r){return ze.createElement(o.tag,Za({key:r},o.attr),pC(o.child))})}function Hd(e){return function(o){return ze.createElement(pj,Za({attr:Za({},e.attr)},o),pC(e.child))}}function pj(e){var o=function(r){var a=e.attr,i=e.size,u=e.title,l=dj(e,["attr","size","title"]),f=i||r.size||"1em",p;return r.className&&(p=r.className),e.className&&(p=(p?p+" ":"")+e.className),ze.createElement("svg",Za({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,l,{className:p,style:Za(Za({color:e.color||r.color},r.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&ze.createElement("title",null,u),e.children)};return nE!==void 0?ze.createElement(nE.Consumer,null,function(r){return o(r)}):o(dC)}function hj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function vj(e){return Hd({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"}}]})(e)}function gj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z"}},{tag:"path",attr:{d:"M11 7h2v7h-2zm0 8h2v2h-2z"}}]})(e)}function mj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"}}]})(e)}const yj={FaSave:hj,AiFillWarning:mj,BiErrorCircle:gj,BsFillInfoCircleFill:vj};var Un=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(Un||{}),za=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(za||{}),L_=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(L_||{});const _o=xe("modals/open",async(e,{dispatch:o})=>{const{type:r=Un.ALERT}=e,a=J1();switch(o(lC({id:a,type:r,isOpen:!0,...e})),r){case Un.CONFIRM:return new Promise(i=>{const u=Os.subscribe(()=>{var p;const{modals:l}=Os.getState(),f=l.list.find(h=>h.id===a);if(f&&!f.isOpen){const h=f.closeReason===L_.CONFIRMED,m=Ft.entries((p=f.views)==null?void 0:p.toggles).reduce((b,S)=>({...b,[S[0]]:S[1].value}),{});o(fC(a)),u(),i({confirmed:h,options:m})}})});default:return{}}}),hC=()=>I2({name:Wr}),vC="Roles & Privileges",fd=xe("roles/fetchRoles",async(e,{dispatch:o,rejectWithValue:r})=>{var u;let a;try{a=await hC()}catch(l){if(!Array.isArray((u=l==null?void 0:l.data)==null?void 0:u.__ERROR))return r("Error while loading the roles");a={name:Wr,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const i={name:vC,type:ie.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:Wr,flags:{},content:{}};return o(bn(i)),{...a,content:zd(a.content)}}),gC=xe("roles/fetchRolesChanges",async(e,{getState:o})=>{const{tabs:r}=o().root;if(r.find(i=>i.path===Wr)){const{date:i}=o().roles;if(i&&await j_(i))return{old:!0}}return{}}),j_=async e=>{if(!e)return!1;try{const o=await hC();if(o.date){const r=new Date(e),a=new Date(o.date);if(r>a)return!0}}catch(o){if(!Array.isArray(o==null?void 0:o.data.__ERROR))throw o}return!1},F1=xe("roles/saveRoles",async(e,{getState:o,rejectWithValue:r,dispatch:a})=>{try{const{flags:i,date:u}=o().roles;if(i.old||await j_(u)){const{confirmed:p}=await a(_o({title:vC,message:"New content has been found on the server. Are you sure you want to continue?",type:Un.CONFIRM,icon:"FaSave"})).unwrap();if(!p)return r({old:!0})}return await Ad({name:Wr,content:k_(e)})}catch{return r("Error while loading the roles")}}),bj=Xs().roles,{roles:_j={},privileges:wj={},flags:Sj={touched:!1},date:Ej,selectedTab:Tj="roles"}=bj||{},xj={flags:Sj,roles:_j,privileges:wj,date:Ej,selectedTab:Tj},mC=Hn({name:"roles",initialState:xj,reducers:{updatePrivileges:(e,o)=>{e.privileges=o.payload,e.flags.touched=!0},updateRoles:(e,o)=>{e.roles=o.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,o)=>{e.roles=o.payload.roles,e.privileges=o.payload.privileges},toggleTab:(e,o)=>{e.selectedTab=o.payload},setRolesContent(e,o){const{content:r,date:a}=o.payload,i=zd(r);return{...e,...i,date:a}}},extraReducers(e){e.addCase(fd.fulfilled,(o,r)=>{const{content:a,date:i}=r.payload;o={...o,...a,date:i}}).addCase(fd.rejected,o=>({...o,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(F1.fulfilled,(o,r)=>({...o,flags:{...o.flags,touched:!1,old:!1},date:r.payload.date})).addCase(F1.rejected,(o,r)=>QT.isString(r.payload)?o:{...o,flags:{...o.flags,...r.payload}}).addCase(gC.fulfilled,(o,r)=>({...o,flags:{...o.flags,...r.payload}})).addCase(zs.fulfilled,(o,r)=>{!r.payload||r.payload.path!==Wr||(o.flags.touched=!1,o.flags.old=!1)}).addCase(q_.fulfilled,(o,r)=>{r.meta.arg!==Wr||!r.payload||(o.flags.touched=!1,o.flags.old=!1)})}}),{updatePrivileges:yC,updateRoles:bC,setRolesContent:F_,toggleTab:Cj,updateRolesAndPrivileges:W_}=mC.actions,Oj=mC.reducer,ti="qodlyApp.json",B_=xe("settings/fetch",async()=>await ei({verb:Xt.GET_INFO,path:ti,content:!0,as:"json"})),_C=xe("settings/app",x2),Rj=GT(),oE={session:{"studio.tips":!0,"studio.notifications":!0,"webforms.tooltip.behavior":D_.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral"},server:{projectOpened:!1,remoteDebuggerMode:m_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},Aj={...oE,session:{...oE.session,...Rj},welcometour:{}},wC=Hn({name:"settings",initialState:Aj,reducers:{setSetting(e,o){const{path:r,settingsKey:a,value:i}=o.payload;e[r][a]=i},setSettings(e,o){const{path:r,value:a}=o.payload;e[r]={...e[r],...a}},setSettingsAsText(e,o){const{path:r,settings:a}=o.payload;e[r]=a}},extraReducers(e){e.addCase(B_.fulfilled,(o,r)=>{o.project={...o.project,...r.payload.content}}),e.addCase(_C.fulfilled,(o,r)=>{o.server=r.payload,o.server.qodly&&(o.project["webforms.display-mode"]="airy")})}}),{setSetting:SC,setSettings:qd,setSettingsAsText:Pj}=wC.actions,Ij=wC.reducer,W1=e=>{const o=["folder","file"];return e.sort((r,a)=>r.type===a.type?r.name.localeCompare(a.name):o.indexOf(r.type)-o.indexOf(a.type))},st=(e,o)=>e.reduce((r,a)=>a.path===o.path&&a.type===o.type?[...r,o]:a.children?[...r,{...a,children:W1(st(a.children,o))}]:[...r,a],[]),Er=(e,o)=>e.reduce((r,a)=>r||(a.path===o?a:a.children?Er(a.children,o):null),null),Dj=[{name:jt.WEBFORMS,type:ie.FOLDER,children:[],path:jt.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:jt.METHODS,type:ie.FOLDER,children:[],path:jt.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:jt.CLASSES,type:ie.FOLDER,children:[],path:jt.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:jt.SHARED,type:ie.FOLDER,children:[],path:jt.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:ie.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:ie.FILE,ext:"json",path:"roles",error:null,flags:{},config:{editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},isRoot:!0},{name:"Model",type:ie.MODEL,ext:"4DModel",path:"model",error:null,flags:{},config:{editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]}},{name:"Settings",type:ie.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],EC=Hn({name:"explorer",initialState:Dj,reducers:{toggleExpandFolder:(e,o)=>(e=st(e,{...o.payload,flags:{...o.payload.flags,expanded:!o.payload.flags.expanded}}),e),expandFolder:(e,o)=>(e=st(e,{...o.payload,flags:{...o.payload.flags,expanded:!0}}),e),openAddFileInput:(e,o)=>st(e,{...o.payload,flags:{...o.payload.flags,adding:!0}}),addNewFile:(e,o)=>{const{parent:r,child:a}=o.payload;return st(e,{...r,children:[a,...r.children||[]]})},removeFile:(e,o)=>{const{parent:r,child:a}=o.payload;return st(e,{...r,children:r.children.filter(i=>i.path!==a.path)})},refreshFile:(e,o)=>{const{parent:r,child:a}=o.payload,i=(r.children||[]).filter(u=>u.path!==a.path&&!a.error);return st(e,{...r,children:[a,...i]})},setFolderChildren:(e,o)=>{const r=Er(e,o.payload.parentPath);return r?st(e,{...r,children:o.payload.children}):e}},extraReducers:e=>{e.addCase(Us.pending,(o,r)=>{const{file:a,newname:i}=r.meta.arg,u=Er(o,a.path);if(!u)return o;const l=a.path.split("/");l.pop();const f=`${l.join("/")}/${a.name}.${a.ext}`,p=`${l.join("/")}/${i}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":Va.next({action:Ma.WILL_RENAME,payload:{oldPath:f,newPath:p}});break}return st(o,{...u,flags:{...u.flags,loading:!0}})}),e.addCase(Us.fulfilled,(o,r)=>{const{meta:{arg:{file:a}},payload:i}=r,u=Er(o,a.path);if(!u)return o;switch(i.old.ext){case"4dm":case"4qs":Va.next({action:Ma.DID_RENAME,payload:{oldPath:i.old.path,newPath:i.new.path}});break}return st(o,{...u,flags:{...u.flags,loading:!1}})}),e.addCase(Us.rejected,(o,r)=>{const{file:a}=r.meta.arg,i=Er(o,a.path);return i?st(o,{...i,flags:{...i.flags,loading:!1}}):o}),e.addCase(Ro.pending,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,flags:{...i.flags,loading:!0}}):o}),e.addCase(Ro.fulfilled,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,children:W1(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!0},error:null}):o}),e.addCase(Ro.rejected,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!0}}):o}),e.addCase(kl.pending,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,flags:{...i.flags,loading:!0}}):o}),e.addCase(kl.fulfilled,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,children:W1(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!1},error:null}):o}),e.addCase(kl.rejected,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!1}}):o}),e.addCase($f.pending,(o,r)=>{const{fileName:a,parentNode:i,path:u,type:l}=r.meta.arg;return st(o,{...i,children:[{name:a,path:`${u}/${a}`,type:l,error:null,flags:{loading:!0},config:{}},...i.children]})}),e.addCase($f.fulfilled,(o,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg,l=ks(u),{editor:f,supportedEditors:p}=mo(`${a}${l?`.${l.toLowerCase()}`:""}`);return st(o,{name:i,path:`${a}/${i}`,type:u,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:p}})}),e.addCase($f.rejected,(o,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg;return st(o,{name:i,path:`${a}/${i}`,type:u,error:{message:r.payload},flags:{loading:!1},config:{}})}),e.addCase(kf.pending,(o,r)=>{const{node:a,parentNode:i}=r.meta.arg;return st(o,{...i,children:[{name:`${a.name}_copy`,path:`${a.path}/${a.name}_copy`,type:a.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...i.children]})}),e.addCase(kf.fulfilled,(o,r)=>{const{node:a}=r.payload,{node:{path:i,ext:u}}=r.meta.arg,{editor:l,supportedEditors:f}=mo(`${i}${u?`.${u.toLowerCase()}`:""}`);return st(o,{name:`${a.name}`,path:`${i}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:l,supportedEditors:f}})}),e.addCase(kf.rejected,(o,r)=>{const a=r.payload,{node:i}=r.meta.arg;return st(o,{name:`${i.name}_copy`,path:`${i.path}/${i.name}_copy`,type:i.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(jl.pending,(o,r)=>{}),e.addCase(jl.fulfilled,(o,r)=>{var b;const{draggedNode:a,newLocation:i}=r.meta.arg,u=Cx(a.path),l=Er(o,u),f=Er(o,i.path),p=(b=l==null?void 0:l.children)==null?void 0:b.filter(S=>S.path!==a.path),h=i.path.split("/").length,m=a.path.split("/").length;return h>=m?(o=st(o,{...l,children:p}),o=st(o,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}})):(o=st(o,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}}),o=st(o,{...l,children:p})),o}),e.addCase(jl.rejected,(o,r)=>{Oo.next({message:"Error moving file",kind:"danger"})}),e.addCase(Bs.pending,(o,r)=>{var C;const{fileName:a,parentNode:i,path:u,type:l,qodly:f}=r.meta.arg,p=ks(l,f),h=`${u}/${a}${p?`.${p.toLowerCase()}`:""}`,{editor:m,supportedEditors:b}=mo(h);switch(l){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.WILL_CREATE,payload:{filePath:h}});break}const S=(C=i.children)==null?void 0:C.filter(N=>N.path!==`${u}/${a}`),x=[{name:a,path:`${u}/${a}`,type:ie.FILE,error:null,flags:{loading:!0},config:{editor:m,supportedEditors:b},ext:p,date:new Date().toISOString()},...S],R=st(o,{...i,children:x});return QT.merge(o,R)}),e.addCase(Bs.fulfilled,(o,r)=>{const{fileName:a,path:i,type:u,qodly:l}=r.meta.arg,f=ks(u,l),p=`${i}/${a}${f?`.${f.toLowerCase()}`:""}`,{editor:h,supportedEditors:m}=mo(p),b=st(o,{name:a,path:`${i}/${a}`,type:ie.FILE,error:null,flags:{},config:{editor:h,supportedEditors:m},ext:f,date:new Date().toISOString()});switch(u){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.DID_CREATE,payload:{filePath:p}});break}return o=b,o}),e.addCase(Bs.rejected,(o,r)=>{const{fileName:a,path:i,type:u}=r.meta.arg,l=ks(u),{editor:f,supportedEditors:p}=mo(`${i}${l?`.${l.toLowerCase()}`:""}`);return o=st(o,{name:a,path:`${i}/${a}`,type:ie.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:p},ext:l,date:new Date().toISOString()}),o}),e.addMatcher(RE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!0}})),o}),e.addMatcher(PE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!1}})),o}),e.addMatcher(AE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!1}})),Oo.next({message:"Failed to open file, try again",kind:"danger"}),o})}}),{toggleExpandFolder:Mj,expandFolder:Nj,openAddFileInput:$j,addNewFile:TC,refreshFile:kj,removeFile:B1,setFolderChildren:Lj}=EC.actions;function xC(e){switch(e){case ie.WEBFORMS:return Xx;case ie.METHODS:return`//%attributes = {}
|
|
225
|
-
`;default:return""}}function CC(e,o,r){switch(o){case ie.MOBILEFORM:return`${e}.MForm`;case ie.WEBFORM:return`${e}.WebForm`;case ie.METHOD:case ie.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}function jj(e){switch(e){case jt.WEBFORMS:return ie.WEBFORMS;case jt.METHODS:return ie.METHODS;case jt.CLASSES:return ie.CLASSES;case"Mobile":return ie.MOBILE;default:return e}}function OC(e){switch(e){case ie.WEBFORMS:return ie.WEBFORM;case ie.CLASSES:return ie.CLASS;case ie.METHODS:return ie.METHOD;case ie.FOLDER:return ie.FOLDER;case ie.MOBILE:return ie.MOBILEFORM;default:return e}}const Fj=xe("files/tryEditMethod",async({method:e},{dispatch:o})=>{const r=e.filePath.split("/"),[a]=r[1].split("."),{editor:i}=mo(e.filePath);return await o(
|
|
224
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function $1(e,o){if(e){var r=e.indexOf(o);0<=r&&e.splice(r,1)}}var Ld=function(){function e(o){this.initialTeardown=o,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var o,r,a,i,u;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var f=N1(l),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){o={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(o)throw o.error}}else l.remove(this);var m=this.initialTeardown;if(ka(m))try{m()}catch(C){u=C instanceof Ub?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var S=N1(b),x=S.next();!x.done;x=S.next()){var R=x.value;try{KS(R)}catch(C){u=u??[],C instanceof Ub?u=sd(sd([],id(u)),id(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{x&&!x.done&&(i=S.return)&&i.call(S)}finally{if(a)throw a.error}}}if(u)throw new Ub(u)}},e.prototype.add=function(o){var r;if(o&&o!==this)if(this.closed)KS(o);else{if(o instanceof e){if(o.closed||o._hasParent(this))return;o._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(o)}},e.prototype._hasParent=function(o){var r=this._parentage;return r===o||Array.isArray(r)&&r.includes(o)},e.prototype._addParent=function(o){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(o),r):r?[r,o]:o},e.prototype._removeParent=function(o){var r=this._parentage;r===o?this._parentage=null:Array.isArray(r)&&$1(r,o)},e.prototype.remove=function(o){var r=this._finalizers;r&&$1(r,o),o instanceof e&&o._removeParent(this)},e.EMPTY=function(){var o=new e;return o.closed=!0,o}(),e}(),Ax=Ld.EMPTY;function Px(e){return e instanceof Ld||e&&"closed"in e&&ka(e.remove)&&ka(e.add)&&ka(e.unsubscribe)}function KS(e){ka(e)?e():e.unsubscribe()}var Ix={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},k1={setTimeout:function(e,o){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var i=k1.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,sd([e,o],id(r))):setTimeout.apply(void 0,sd([e,o],id(r)))},clearTimeout:function(e){var o=k1.delegate;return((o==null?void 0:o.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Gk(e){k1.setTimeout(function(){throw e})}function XS(){}function Nf(e){e()}var Dx=function(e){kd(o,e);function o(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,Px(r)&&r.add(a)):a.destination=Xk,a}return o.create=function(r,a,i){return new L1(r,a,i)},o.prototype.next=function(r){this.isStopped||this._next(r)},o.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},o.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},o.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},o.prototype._next=function(r){this.destination.next(r)},o.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},o.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},o}(Ld),Vk=Function.prototype.bind;function zb(e,o){return Vk.call(e,o)}var Yk=function(){function e(o){this.partialObserver=o}return e.prototype.next=function(o){var r=this.partialObserver;if(r.next)try{r.next(o)}catch(a){wf(a)}},e.prototype.error=function(o){var r=this.partialObserver;if(r.error)try{r.error(o)}catch(a){wf(a)}else wf(o)},e.prototype.complete=function(){var o=this.partialObserver;if(o.complete)try{o.complete()}catch(r){wf(r)}},e}(),L1=function(e){kd(o,e);function o(r,a,i){var u=e.call(this)||this,l;if(ka(r)||!r)l={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&Ix.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},l={next:r.next&&zb(r.next,f),error:r.error&&zb(r.error,f),complete:r.complete&&zb(r.complete,f)}):l=r}return u.destination=new Yk(l),u}return o}(Dx);function wf(e){Gk(e)}function Kk(e){throw e}var Xk={closed:!0,next:XS,error:Kk,complete:XS},Zk=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Jk(e){return e}function Qk(e){return e.length===0?Jk:e.length===1?e[0]:function(r){return e.reduce(function(a,i){return i(a)},r)}}var ZS=function(){function e(o){o&&(this._subscribe=o)}return e.prototype.lift=function(o){var r=new e;return r.source=this,r.operator=o,r},e.prototype.subscribe=function(o,r,a){var i=this,u=t3(o)?o:new L1(o,r,a);return Nf(function(){var l=i,f=l.operator,p=l.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(o){try{return this._subscribe(o)}catch(r){o.error(r)}},e.prototype.forEach=function(o,r){var a=this;return r=JS(r),new r(function(i,u){var l=new L1({next:function(f){try{o(f)}catch(p){u(p),l.unsubscribe()}},error:u,complete:i});a.subscribe(l)})},e.prototype._subscribe=function(o){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(o)},e.prototype[Zk]=function(){return this},e.prototype.pipe=function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return Qk(o)(this)},e.prototype.toPromise=function(o){var r=this;return o=JS(o),new o(function(a,i){var u;r.subscribe(function(l){return u=l},function(l){return i(l)},function(){return a(u)})})},e.create=function(o){return new e(o)},e}();function JS(e){var o;return(o=e??Ix.Promise)!==null&&o!==void 0?o:Promise}function e3(e){return e&&ka(e.next)&&ka(e.error)&&ka(e.complete)}function t3(e){return e&&e instanceof Dx||e3(e)&&Px(e)}var r3=Rx(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Mx=function(e){kd(o,e);function o(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return o.prototype.lift=function(r){var a=new QS(this,this);return a.operator=r,a},o.prototype._throwIfClosed=function(){if(this.closed)throw new r3},o.prototype.next=function(r){var a=this;Nf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var l=N1(a.currentObservers),f=l.next();!f.done;f=l.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=l.return)&&u.call(l)}finally{if(i)throw i.error}}}})},o.prototype.error=function(r){var a=this;Nf(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=r;for(var i=a.observers;i.length;)i.shift().error(r)}})},o.prototype.complete=function(){var r=this;Nf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},o.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(o.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),o.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},o.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},o.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,l=i.isStopped,f=i.observers;return u||l?Ax:(this.currentObservers=null,f.push(r),new Ld(function(){a.currentObservers=null,$1(f,r)}))},o.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,l=a.isStopped;i?r.error(u):l&&r.complete()},o.prototype.asObservable=function(){var r=new ZS;return r.source=this,r},o.create=function(r,a){return new QS(r,a)},o}(ZS),QS=function(e){kd(o,e);function o(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return o.prototype.next=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.next)===null||i===void 0||i.call(a,r)},o.prototype.error=function(r){var a,i;(i=(a=this.destination)===null||a===void 0?void 0:a.error)===null||i===void 0||i.call(a,r)},o.prototype.complete=function(){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||a===void 0||a.call(r)},o.prototype._subscribe=function(r){var a,i;return(i=(a=this.source)===null||a===void 0?void 0:a.subscribe(r))!==null&&i!==void 0?i:Ax},o}(Mx);const Nx=new Mx,n3=()=>fx(),Io=Tk,R_=le(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),o3=le(R_,e=>e?e.dataClasses:[]),a3=le(R_,e=>e?e.methods:[]),$x=e=>le(o=>o,o=>{switch(o.catalog.state){case"loaded":const r=e?o.catalog.model.dataClasses[e]:o.catalog.model;return(r==null?void 0:r.methods)||[];default:return[]}}),i3=e=>Io($x(e),ux),s3=(e,o)=>le($x(e),r=>r.find(a=>`${a.applyTo}.${a.name}`===o)),u3=(e,o,r)=>Io(s3(e,`${r}.${o}`),ux),kx=le(e=>e,e=>e),c3=e=>le(Ba,o=>{var i;const r=o.tabs.find(({path:u})=>u===e),a=r==null?void 0:r.content.components;return!r||!a?[]:(i=Object.keys(a))==null?void 0:i.map(u=>({id:u,...a[u]}))}),Lx=e=>le(Ba,o=>{var a,i;const r=o.tabs.find(({path:u})=>u===e);return((i=(a=r==null?void 0:r.content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]}),l3=(e,o,r)=>le(kx,a=>{var i,u;if(o){const l=a.sharedDatasources.sources[o];return l?l.find(f=>f.id===e):void 0}else{const l=a.root.tabs.find(p=>p.path===r);return l?(u=(i=l.content.metadata)==null?void 0:i.datasources)==null?void 0:u.find(p=>p.id===e):void 0}}),jx=le(e=>e,e=>e.sharedDatasources.sources),f3=(e,o,r,a)=>le(Lx(e),jx,(i,u)=>{const l=Ft.flatten(Ft.values(u)),f=[...o!=="private"?i:[],...o!=="shared"?l:[]];return r?f.filter(p=>(!a||a.every(({id:h,namespace:m=""})=>p.id!==h||(p.namespace||"")!==m))&&(r.includes(p.type)||p.dataType&&(r.includes(p.dataType)||r.includes("objectFromArray")&&p.dataType==="object"&&p.from))):f}),d3=le(e=>e.debugger,e=>e.meta),Rs=le(e=>e.debugger,e=>e.list),_n=le(e=>e.debugger,e=>e.sessions),p3=le(_n,e=>e.length),Cs=(e,o,r,a)=>e.find(i=>i.filePath===o&&i.methodName===r&&(!a||i.className===a)),lr=(e,o)=>e.find(r=>r.threadId===o),Fx=(e,o)=>e.find(r=>r.tabPath===o),h3=(e,o)=>le(Rs,r=>{var a;return((a=Cs(r,e,o))==null?void 0:a.breakpoints.saved.locations)||[]}),v3=(e,o)=>le(Rs,r=>{var a;return((a=Cs(r,e,o))==null?void 0:a.breakpoints.draft.locations)||[]}),g3=e=>le(Rs,o=>o.filter(r=>r.filePath===e).reduce((r,a)=>[...r,...a.breakpoints.saved.locations.map(i=>({...i,line:i.line+(a.breakpoints.saved.offset||0)}))],[]).sort((r,a)=>r.line-a.line)),m3=e=>le(Rs,o=>o.filter(r=>r.filePath===e).reduce((r,a)=>[...r,...a.breakpoints.draft.locations.map(i=>({...i,line:i.line+(a.breakpoints.draft.offset||0)}))],[]).sort((r,a)=>r.line-a.line)),y3=e=>le(_n,o=>{const r=lr(o,e);return r!=null&&r.stopped?r.highlightedLines:null}),b3=e=>le(_n,o=>{const r=lr(o,e);return r!=null&&r.stopped?r.activeLine:null}),_3=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.expressions)||[]}),w3=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.stopped)||!1}),S3=(e,o)=>le(Rs,r=>{var a;return(a=Cs(r,e,o))==null?void 0:a.source}),E3=e=>le(_n,o=>{var r;return((r=Fx(o,e))==null?void 0:r.threadId)||-1}),T3=e=>le(_n,o=>{var r,a;return(a=(r=lr(o,e))==null?void 0:r.currentStackFrame)==null?void 0:a.source}),x3=e=>le(_n,o=>{var r;return(r=lr(o,e))==null?void 0:r.currentStackFrame}),C3=le(_n,e=>e.map(({channelId:o,threadId:r})=>({id:o,threadId:r}))),O3=e=>le(_n,o=>{var r;return((r=lr(o,e))==null?void 0:r.stackFrames)||[]}),R3=e=>le(_n,o=>{var r,a;return((a=(r=lr(o,e))==null?void 0:r.variables)==null?void 0:a.callchain)||[]}),A3=e=>le(_n,o=>{var r,a;return((a=(r=lr(o,e))==null?void 0:r.variables)==null?void 0:a.expressions)||[]}),P3=(e,o="saved")=>le(Rs,r=>{const a=r.find(i=>i.filePath===e);return(a==null?void 0:a.breakpoints[o].offset)||0}),I3=(e,o,r,a)=>le(_n,i=>{var h;const u=((h=lr(i,e))==null?void 0:h.exceptions)||[],l=o===ie.CLASS,f=l&&a?`${a}.${r}`:r;return(f?u.filter(m=>m.location===f):u).map(m=>({...m,locationLine:l?m.locationLine:m.locationLine+1}))}),Ba=le(e=>e.root,e=>e),ru=le(Ba,e=>e.tabs),D3=le(Ba,e=>e.activeTab),M3=le(Ba,e=>e.recent.filter(({type:o})=>o!==ie.DEBUGGER)),N3=le(Ba,({tabs:e,activeTab:o})=>e.find(({path:r})=>r===o)),$3=le(Ba,({tabs:e})=>e.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null)),k3=le(ru,e=>e.filter(({type:o,flags:r})=>o===ie.WEBFORM&&r.enabled===!1).map(({path:o})=>o)),L3=le(ru,e=>e.length>0),sf=e=>le(Ba,o=>o.tabs.find(({path:r})=>r===e)),Wx=(e,o="")=>le(sf(e),r=>!r||!r.content||typeof r.content=="string"?r==null?void 0:r.content:Ft.get(r.content,o)),j3=e=>le(sf(e),o=>o==null?void 0:o.extra),F3=(e,o=r=>r)=>le(Wx(e,"components"),r=>o(r||{})),A_=le(ru,e=>e.filter(o=>o.flags.touched)),W3=le(A_,e=>e.length),B3=le(_n,e=>e.map(({threadId:o,currentStackFrame:{source:r},tabPath:a})=>({name:ex(o,r),path:a,type:ie.DEBUGGER,content:r==null?void 0:r.content,flags:{},extra:{source:r}}))),U3=le(e=>e,e=>e.explorer||[]),Bx=le(e=>e,e=>e.explorer.find(o=>o.path===jt.WEBFORMS)),Ux=le(e=>e,e=>e.explorer.find(o=>o.path===jt.METHODS)),zx=le(e=>e,e=>e.explorer.find(o=>o.path===jt.CLASSES)),z3=le(Ux,e=>(e==null?void 0:e.children)||[]),H3=le(Bx,e=>(e==null?void 0:e.children)||[]),q3=le(zx,e=>(e==null?void 0:e.children)||[]),G3=le(e=>e.modals,e=>e.list),V3=le(e=>e.roles,({roles:e})=>e),Y3=le(e=>e.roles,({privileges:e})=>e),K3=le(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:o})=>o==="guest")),X3=le(e=>e.roles,({flags:e})=>e),Z3=le(e=>e.roles,({selectedTab:e})=>e),J3=le(e=>e.roles,({date:e})=>e),Hx=le(e=>e.settings,e=>e.session),Q3=le(e=>e.settings,e=>e.project),eL=le(e=>e.settings,e=>e),P_=le(e=>e.settings,e=>e.server),tL=le(P_,e=>e.remoteDebuggerMode),rL=le(P_,e=>e.qodly),nL=le(Hx,e=>e["monaco.zoom"]),qx=["rounded-full","rounded-lg","border-gray-400","border-2","bg-red-500","bg-blue-500","bg-indigo-500","bg-transparent","bg-primary-dark","bg-green-500","bg-yellow-400","text-gray-500","text-4xl","text-white","px-4","py-2","primary","info","secondary","success","warning","danger","w-10","w-20","w-40","w-60","w-80","mb-2","mb-3","shadow","shadow-lg","shadow-xl","shadow-2xl"],Gx=qx.map(e=>({id:J1(),content:"",name:e,parentId:null,scope:xs.THEME})),I_=e=>le(sf(e),o=>{var r,a;return((a=(r=o==null?void 0:o.content)==null?void 0:r.metadata)==null?void 0:a.styles)||[]}),oL=(e,o)=>le(I_(e),r=>o.map(a=>{switch(!0){case a===xs.LOCAL:return r.map(i=>({...i,scope:xs.LOCAL}));case a===xs.THEME:return Gx;default:return[]}}).flat()),aL=e=>le(I_(e),o=>[...o.map(r=>({...r,scope:xs.LOCAL})),...Gx]),iL=le(e=>e,e=>{var o;return[...(((o=e.sharedCSS)==null?void 0:o.styles)||[]).map(r=>({...r,scope:xs.SHARED}))]}),sL=e=>le(sf(e),o=>o==null?void 0:o.flags),uf=le(e=>e.webforms,e=>e),Vx=le(uf,e=>(e==null?void 0:e.components)||[]),jd=le(uf,e=>e.inspector),uL=le(jd,e=>e.css),cL=le(jd,e=>e.datasource),Yx=le(uf,e=>e.templates||{data:[]}),lL=le(Yx,e=>e.data||[]),fL=e=>le(Vx,o=>o.find(r=>r.id===e)),dL=e=>le(jd,o=>o[e]),pL=le(uf,e=>e.datasources.theme),hL=le(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,o,r)=>[e.state,o.state,r.state].every(a=>["loaded","error"].includes(a)));var D_=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e))(D_||{}),M_=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(M_||{}),Kx=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Kx||{});const Xx={metadata:{v:"1.0",datasources:[],styles:[]},components:{ROOT:{parent:"",type:{resolvedName:"Container"},isCanvas:!0,props:{className:"bg-white h-full w-full px-6",classNames:[],events:[],airyMode:!1},displayName:"App",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}};var Sf,vL=new Uint8Array(16);function Zx(){if(!Sf&&(Sf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Sf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Sf(vL)}const gL=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Fd(e){return typeof e=="string"&&gL.test(e)}var Lr=[];for(var Hb=0;Hb<256;++Hb)Lr.push((Hb+256).toString(16).substr(1));function Wd(e){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Lr[e[o+0]]+Lr[e[o+1]]+Lr[e[o+2]]+Lr[e[o+3]]+"-"+Lr[e[o+4]]+Lr[e[o+5]]+"-"+Lr[e[o+6]]+Lr[e[o+7]]+"-"+Lr[e[o+8]]+Lr[e[o+9]]+"-"+Lr[e[o+10]]+Lr[e[o+11]]+Lr[e[o+12]]+Lr[e[o+13]]+Lr[e[o+14]]+Lr[e[o+15]]).toLowerCase();if(!Fd(r))throw TypeError("Stringified UUID is invalid");return r}var eE,qb,Gb=0,Vb=0;function mL(e,o,r){var a=o&&r||0,i=o||new Array(16);e=e||{};var u=e.node||eE,l=e.clockseq!==void 0?e.clockseq:qb;if(u==null||l==null){var f=e.random||(e.rng||Zx)();u==null&&(u=eE=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),l==null&&(l=qb=(f[6]<<8|f[7])&16383)}var p=e.msecs!==void 0?e.msecs:Date.now(),h=e.nsecs!==void 0?e.nsecs:Vb+1,m=p-Gb+(h-Vb)/1e4;if(m<0&&e.clockseq===void 0&&(l=l+1&16383),(m<0||p>Gb)&&e.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Gb=p,Vb=h,qb=l,p+=122192928e5;var b=((p&268435455)*1e4+h)%4294967296;i[a++]=b>>>24&255,i[a++]=b>>>16&255,i[a++]=b>>>8&255,i[a++]=b&255;var S=p/4294967296*1e4&268435455;i[a++]=S>>>8&255,i[a++]=S&255,i[a++]=S>>>24&15|16,i[a++]=S>>>16&255,i[a++]=l>>>8|128,i[a++]=l&255;for(var x=0;x<6;++x)i[a+x]=u[x];return o||Wd(i)}function Jx(e){if(!Fd(e))throw TypeError("Invalid UUID");var o,r=new Uint8Array(16);return r[0]=(o=parseInt(e.slice(0,8),16))>>>24,r[1]=o>>>16&255,r[2]=o>>>8&255,r[3]=o&255,r[4]=(o=parseInt(e.slice(9,13),16))>>>8,r[5]=o&255,r[6]=(o=parseInt(e.slice(14,18),16))>>>8,r[7]=o&255,r[8]=(o=parseInt(e.slice(19,23),16))>>>8,r[9]=o&255,r[10]=(o=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=o/4294967296&255,r[12]=o>>>24&255,r[13]=o>>>16&255,r[14]=o>>>8&255,r[15]=o&255,r}function yL(e){e=unescape(encodeURIComponent(e));for(var o=[],r=0;r<e.length;++r)o.push(e.charCodeAt(r));return o}var bL="6ba7b810-9dad-11d1-80b4-00c04fd430c8",_L="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qx(e,o,r){function a(i,u,l,f){if(typeof i=="string"&&(i=yL(i)),typeof u=="string"&&(u=Jx(u)),u.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var p=new Uint8Array(16+i.length);if(p.set(u),p.set(i,u.length),p=r(p),p[6]=p[6]&15|o,p[8]=p[8]&63|128,l){f=f||0;for(var h=0;h<16;++h)l[f+h]=p[h];return l}return Wd(p)}try{a.name=e}catch{}return a.DNS=bL,a.URL=_L,a}function wL(e){if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=new Uint8Array(o.length);for(var r=0;r<o.length;++r)e[r]=o.charCodeAt(r)}return SL(EL(TL(e),e.length*8))}function SL(e){for(var o=[],r=e.length*32,a="0123456789abcdef",i=0;i<r;i+=8){var u=e[i>>5]>>>i%32&255,l=parseInt(a.charAt(u>>>4&15)+a.charAt(u&15),16);o.push(l)}return o}function eC(e){return(e+64>>>9<<4)+14+1}function EL(e,o){e[o>>5]|=128<<o%32,e[eC(o)-1]=o;for(var r=1732584193,a=-271733879,i=-1732584194,u=271733878,l=0;l<e.length;l+=16){var f=r,p=a,h=i,m=u;r=qr(r,a,i,u,e[l],7,-680876936),u=qr(u,r,a,i,e[l+1],12,-389564586),i=qr(i,u,r,a,e[l+2],17,606105819),a=qr(a,i,u,r,e[l+3],22,-1044525330),r=qr(r,a,i,u,e[l+4],7,-176418897),u=qr(u,r,a,i,e[l+5],12,1200080426),i=qr(i,u,r,a,e[l+6],17,-1473231341),a=qr(a,i,u,r,e[l+7],22,-45705983),r=qr(r,a,i,u,e[l+8],7,1770035416),u=qr(u,r,a,i,e[l+9],12,-1958414417),i=qr(i,u,r,a,e[l+10],17,-42063),a=qr(a,i,u,r,e[l+11],22,-1990404162),r=qr(r,a,i,u,e[l+12],7,1804603682),u=qr(u,r,a,i,e[l+13],12,-40341101),i=qr(i,u,r,a,e[l+14],17,-1502002290),a=qr(a,i,u,r,e[l+15],22,1236535329),r=Gr(r,a,i,u,e[l+1],5,-165796510),u=Gr(u,r,a,i,e[l+6],9,-1069501632),i=Gr(i,u,r,a,e[l+11],14,643717713),a=Gr(a,i,u,r,e[l],20,-373897302),r=Gr(r,a,i,u,e[l+5],5,-701558691),u=Gr(u,r,a,i,e[l+10],9,38016083),i=Gr(i,u,r,a,e[l+15],14,-660478335),a=Gr(a,i,u,r,e[l+4],20,-405537848),r=Gr(r,a,i,u,e[l+9],5,568446438),u=Gr(u,r,a,i,e[l+14],9,-1019803690),i=Gr(i,u,r,a,e[l+3],14,-187363961),a=Gr(a,i,u,r,e[l+8],20,1163531501),r=Gr(r,a,i,u,e[l+13],5,-1444681467),u=Gr(u,r,a,i,e[l+2],9,-51403784),i=Gr(i,u,r,a,e[l+7],14,1735328473),a=Gr(a,i,u,r,e[l+12],20,-1926607734),r=Vr(r,a,i,u,e[l+5],4,-378558),u=Vr(u,r,a,i,e[l+8],11,-2022574463),i=Vr(i,u,r,a,e[l+11],16,1839030562),a=Vr(a,i,u,r,e[l+14],23,-35309556),r=Vr(r,a,i,u,e[l+1],4,-1530992060),u=Vr(u,r,a,i,e[l+4],11,1272893353),i=Vr(i,u,r,a,e[l+7],16,-155497632),a=Vr(a,i,u,r,e[l+10],23,-1094730640),r=Vr(r,a,i,u,e[l+13],4,681279174),u=Vr(u,r,a,i,e[l],11,-358537222),i=Vr(i,u,r,a,e[l+3],16,-722521979),a=Vr(a,i,u,r,e[l+6],23,76029189),r=Vr(r,a,i,u,e[l+9],4,-640364487),u=Vr(u,r,a,i,e[l+12],11,-421815835),i=Vr(i,u,r,a,e[l+15],16,530742520),a=Vr(a,i,u,r,e[l+2],23,-995338651),r=Yr(r,a,i,u,e[l],6,-198630844),u=Yr(u,r,a,i,e[l+7],10,1126891415),i=Yr(i,u,r,a,e[l+14],15,-1416354905),a=Yr(a,i,u,r,e[l+5],21,-57434055),r=Yr(r,a,i,u,e[l+12],6,1700485571),u=Yr(u,r,a,i,e[l+3],10,-1894986606),i=Yr(i,u,r,a,e[l+10],15,-1051523),a=Yr(a,i,u,r,e[l+1],21,-2054922799),r=Yr(r,a,i,u,e[l+8],6,1873313359),u=Yr(u,r,a,i,e[l+15],10,-30611744),i=Yr(i,u,r,a,e[l+6],15,-1560198380),a=Yr(a,i,u,r,e[l+13],21,1309151649),r=Yr(r,a,i,u,e[l+4],6,-145523070),u=Yr(u,r,a,i,e[l+11],10,-1120210379),i=Yr(i,u,r,a,e[l+2],15,718787259),a=Yr(a,i,u,r,e[l+9],21,-343485551),r=Ya(r,f),a=Ya(a,p),i=Ya(i,h),u=Ya(u,m)}return[r,a,i,u]}function TL(e){if(e.length===0)return[];for(var o=e.length*8,r=new Uint32Array(eC(o)),a=0;a<o;a+=8)r[a>>5]|=(e[a/8]&255)<<a%32;return r}function Ya(e,o){var r=(e&65535)+(o&65535),a=(e>>16)+(o>>16)+(r>>16);return a<<16|r&65535}function xL(e,o){return e<<o|e>>>32-o}function Bd(e,o,r,a,i,u){return Ya(xL(Ya(Ya(o,e),Ya(a,u)),i),r)}function qr(e,o,r,a,i,u,l){return Bd(o&r|~o&a,e,o,i,u,l)}function Gr(e,o,r,a,i,u,l){return Bd(o&a|r&~a,e,o,i,u,l)}function Vr(e,o,r,a,i,u,l){return Bd(o^r^a,e,o,i,u,l)}function Yr(e,o,r,a,i,u,l){return Bd(r^(o|~a),e,o,i,u,l)}var CL=Qx("v3",48,wL);const OL=CL;function RL(e,o,r){e=e||{};var a=e.random||(e.rng||Zx)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,o){r=r||0;for(var i=0;i<16;++i)o[r+i]=a[i];return o}return Wd(a)}function AL(e,o,r,a){switch(e){case 0:return o&r^~o&a;case 1:return o^r^a;case 2:return o&r^o&a^r&a;case 3:return o^r^a}}function Yb(e,o){return e<<o|e>>>32-o}function PL(e){var o=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var a=unescape(encodeURIComponent(e));e=[];for(var i=0;i<a.length;++i)e.push(a.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var u=e.length/4+2,l=Math.ceil(u/16),f=new Array(l),p=0;p<l;++p){for(var h=new Uint32Array(16),m=0;m<16;++m)h[m]=e[p*64+m*4]<<24|e[p*64+m*4+1]<<16|e[p*64+m*4+2]<<8|e[p*64+m*4+3];f[p]=h}f[l-1][14]=(e.length-1)*8/Math.pow(2,32),f[l-1][14]=Math.floor(f[l-1][14]),f[l-1][15]=(e.length-1)*8&4294967295;for(var b=0;b<l;++b){for(var S=new Uint32Array(80),x=0;x<16;++x)S[x]=f[b][x];for(var R=16;R<80;++R)S[R]=Yb(S[R-3]^S[R-8]^S[R-14]^S[R-16],1);for(var C=r[0],N=r[1],k=r[2],W=r[3],I=r[4],$=0;$<80;++$){var O=Math.floor($/20),Y=Yb(C,5)+AL(O,N,k,W)+I+o[O]+S[$]>>>0;I=W,W=k,k=Yb(N,30)>>>0,N=C,C=Y}r[0]=r[0]+C>>>0,r[1]=r[1]+N>>>0,r[2]=r[2]+k>>>0,r[3]=r[3]+W>>>0,r[4]=r[4]+I>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var IL=Qx("v5",80,PL);const DL=IL,ML="00000000-0000-0000-0000-000000000000";function NL(e){if(!Fd(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const $L=Object.freeze(Object.defineProperty({__proto__:null,NIL:ML,parse:Jx,stringify:Wd,v1:mL,v3:OL,v4:RL,v5:DL,validate:Fd,version:NL},Symbol.toStringTag,{value:"Module"})),kL=ER($L);function N_(e,o){if(!e||!o||!e.length||!o.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=o}N_.prototype.convert=function(e){var o,r,a,i={},u=this.srcAlphabet.length,l=this.dstAlphabet.length,f=e.length,p=typeof e=="string"?"":[];if(!this.isValid(e))throw new Error('Number "'+e+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return e;for(o=0;o<f;o++)i[o]=this.srcAlphabet.indexOf(e[o]);do{for(r=0,a=0,o=0;o<f;o++)r=r*u+i[o],r>=l?(i[a++]=parseInt(r/l,10),r=r%l):a>0&&(i[a++]=0);f=a,p=this.dstAlphabet.slice(r,r+1).concat(p)}while(a!==0);return p};N_.prototype.isValid=function(e){for(var o=0;o<e.length;++o)if(this.srcAlphabet.indexOf(e[o])===-1)return!1;return!0};var LL=N_,jL=LL;function cf(e,o){var r=new jL(e,o);return function(a){return r.convert(a)}}cf.BIN="01";cf.OCT="01234567";cf.DEC="0123456789";cf.HEX="0123456789abcdef";var FL=cf;const{v4:Kb}=kL,Ef=FL,Xb="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",WL="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",BL={consistentLength:!0};let Zb;const tE=(e,o,r)=>{const a=o(e.toLowerCase().replace(/-/g,""));return!r||!r.consistentLength?a:a.padStart(r.shortIdLength,r.paddingChar)},UL=(e,o)=>{const a=o(e).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[a[1],a[2],a[3],a[4],a[5]].join("-")},zL=e=>Math.ceil(Math.log(2**128)/Math.log(e));var ud=(()=>{const e=(o,r)=>{const a=o||Xb,i={...BL,...r};if([...new Set(Array.from(a))].length!==a.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const u=zL(a.length),l={shortIdLength:u,consistentLength:i.consistentLength,paddingChar:a[0]},f=Ef(Ef.HEX,a),p=Ef(a,Ef.HEX),h=()=>tE(Kb(),f,l),m={new:h,generate:h,uuid:Kb,fromUUID:b=>tE(b,f,l),toUUID:b=>UL(b,p),alphabet:a,maxLength:u};return Object.freeze(m),m};return e.constants={flickrBase58:Xb,cookieBase90:WL},e.uuid=Kb,e.generate=()=>(Zb||(Zb=e(Xb).generate),Zb()),e})(),vt=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(vt||{});const HL=[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE,vt.METHOD],cd="guest",$_=[{key:"read",label:"Read",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.ATTRIBUTE,vt.METHOD]},{key:"execute",label:"Execute",canApplyTo:[vt.DATASTORE,vt.DATACLASS,vt.METHOD]},{key:"promote",label:"Promote",canApplyTo:[vt.METHOD]}];function zn(e,...o){return Array.from(new Set([...e,...o]))}function tC(e){const o={},r=new Map;e.forEach(p=>{const h=p.id||ud.generate();o[h]={...p,id:h,parents:[],includes:zn(p.includes||[]),resources:[]},r.set(p.privilege,h)}),Object.entries(o).forEach(([p,h])=>{const m=h.includes.map(b=>{const S=r.get(b);return S?(o[S].parents=zn(o[S].parents,S),S):""}).filter(Boolean);o[p]={...h,includes:m}});const a=rC(o),i=new Set;function u(p){i.add(p.id),p.includes=p.includes.filter(h=>!i.has(h))}if(a.forEach(u),a.forEach(p=>p.parents=[]),a.forEach(p=>{p.includes.forEach(h=>o[h].parents.push(p.id))}),Object.values(o).find(({privilege:p})=>p===cd))return o;const f=ud.generate();return{[f]:{id:f,privilege:cd,includes:[],parents:[],resources:[]},...o}}function rC(e){return Object.values(e).sort((o,r)=>o.parents.length-r.parents.length)}function Ud(e,o){const r=o[e];let a=[];return r&&r.parents.forEach(i=>{a=zn(a,...Ud(i,o),i)}),a}function ld(e,o){const r=o[e];let a=[];return r&&r.includes.forEach(i=>{a=zn(a,...ld(i,o),i)}),a}function qL(e,o){const r=o[e];if(!r)return[];const a=[e,...Ud(e,o),...r.includes];return Object.keys(o).filter(i=>!a.includes(i))}function GL(e,o){return o[e]?Object.keys(o).reduce((a,i)=>i===e?a:{...a,[i]:{...o[i],parents:o[i].parents.filter(u=>u!==e),includes:o[i].includes.filter(u=>u!==e)}},{}):o}function VL(e,o,r){const a=r[e],i=r[o];return!a||!i?r:{...r,[e]:{...r[e],includes:zn(a.includes,o)},[o]:{...r[o],parents:zn(i.parents,e)}}}function YL(e,o,r){const a=r[e],i=r[o];return!a||!i?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(u=>u!==o)},[o]:{...r[o],parents:r[o].parents.filter(u=>u!==e)}}}function nC(e,o){PT(e),Object.entries(o).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=ud.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...o}}function KL(e,o,r,a,i){let u=nC(e,i);const l=Object.entries(u).find(([,f])=>f.privilege===e);return l?(u=sC(l[1].id,o,r,a,u),u):i}function XL(e,o,r){if(!e)throw new Error("Please enter a name");if(!r[o])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:a,id:i}])=>{if(e.toLowerCase()===a.toLowerCase()&&o!==i)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[o]:{...r[o],privilege:e}}}function ZL(e,o){return e.map(r=>Ua(r,o))}function Ua(e,o){return o[e]?o[e]:null}function oC({applyTo:e,type:o,...r}){return Object.entries(r).reduce((a,[i,u])=>{const l=Ft.find($_,["key",i]);return!l||!l.canApplyTo.includes(o)||(typeof u=="string"?u.split(","):u).forEach(p=>{a[p]=zn(a[p]||[],i)}),a},{})}const j1=(e,o=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${o?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${o?"through the model (DataStore, Dataclasses, Entity selections, Entities) have the execute permission":"on this Dataclass, Entity selection class, Entity class have the execute permission"}`:`All ${o?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function k_(e){return{permissions:$_.filter(({canApplyTo:o})=>o.includes(e.type)).map(({key:o,label:r})=>{const a={name:o,from:[]};switch(e.type){case vt.DATASTORE:return{...a,info:j1(r,!0)};case vt.DATACLASS:return{...a,info:j1(r)};default:return a}}),resource:e.applyTo,type:e.type}}function aC(e,o){const r=iC(o),a={};return e.filter(({type:i})=>HL.includes(i)).forEach(i=>{const u=oC(i);Object.entries(u).forEach(([l,f])=>{var m;const p=(m=r[l])==null?void 0:m.id;if(!p)return;a[p]=a[p]||{...o[p]};let h=Ft.find(a[p].resources,{resource:i.applyTo,type:i.type});h||(h=k_(i),a[p].resources.push(h)),h.permissions=h.permissions.map(b=>({...b,checked:b.checked||f.includes(b.name)}))})}),{...o,...a}}function iC(e){return Object.values(e).reduce((o,r)=>({...o,[r.privilege]:r}),{})}function zd(e){var r;const o=tC(e.privileges||[]);return{privileges:aC(((r=e.permissions)==null?void 0:r.allowed)||[],o),roles:(e.roles||[]).map(({id:a=ud.generate(),role:i,privileges:u=[]})=>({id:a,role:i,privileges:zn(u).map(l=>{var f;return(f=Object.values(o).find(({privilege:p})=>p===l))==null?void 0:f.id}).filter(Boolean)})).reduce((a,i)=>({...a,[i.id]:{...i}}),{})}}function L_(e){const o=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),r=[...o,...o.map(a=>Ud(a,e.privileges).reverse())].flat().filter((a,i,u)=>u.indexOf(a)===i).map(a=>e.privileges[a]);return{permissions:{allowed:Object.values(e.privileges).reduce((a,i)=>(i.resources.forEach(({permissions:u,resource:l,type:f})=>{let p=Ft.find(a,{applyTo:l,type:f});p||(p={applyTo:l,type:f},a.push(p)),u.forEach(({name:h,checked:m})=>{m&&p&&(p[h]=p[h]||[],p[h].push(i.privilege))})}),a),[])},privileges:r.filter(({privilege:a})=>a!==cd).map(({id:a,includes:i,privilege:u})=>({id:a,privilege:u,includes:i.map(l=>e.privileges[l].privilege)})),roles:Object.values(e.roles).map(a=>({...a,privileges:a.privileges.map(i=>{var u;return(u=e.privileges[i])==null?void 0:u.privilege}).filter(Boolean)}))}}function JL(e,o){const r=o[e],a={children:[],links:[],parents:[],selected:e};if(!r)return a;function i(f,p,h=[]){const m=f.reduce((b,S)=>[...b,...o[S][p]],[]);return m.length===0?h:(h.push(m),i(m,p,h))}function u(f){const p=[],h=[];for(let m=f.length-1;m>=0;m-=1){const b=f[m].filter(S=>p.includes(S)?!1:(p.push(S),!0));b.length>0&&h.unshift(zn(b))}return h}function l(f,p){const h=[];return f.reduce((m,b)=>(b.forEach(S=>{o[S][p==="parents"?"includes":"parents"].forEach(R=>{h.includes(R)&&m.push(p==="parents"?{source:S,target:R}:{source:R,target:S})}),h.push(S)}),m),[])}return a.children=i([e],"includes"),a.children=u(a.children),a.parents=i([e],"parents"),a.parents=u(a.parents),a.links=[...l([[e],...a.parents],"parents"),...l([[e],...a.children],"includes")],a}function QL(e,o,r){const a=Ua(e,r);if(!a||Ft.find(a.resources,{resource:o.applyTo,type:o.type}))return r;const i={...a,resources:[...a.resources,k_(o)]};return{...r,[e]:i}}function ej(e,o,r){const a=Ua(e,r);if(!a)return r;const i={...a,resources:a.resources.filter(({resource:u,type:l})=>u!==o.applyTo||l!==o.type)};return{...r,[e]:i}}function tj(e,o){const r=Ua(e,o);if(!r)return o;const a={...r,resources:r.resources.filter(i=>i.permissions.some(u=>u.from.length)).map(i=>({...i,permissions:i.permissions.map(u=>({...u,checked:!1}))}))};return{...o,[e]:a}}function sC(e,o,r,a,i){const u=Ua(e,i);if(!u)return i;const f=Ft.find(u.resources,{type:r,resource:o})?{...u,resources:u.resources.map(p=>p.type===r&&p.resource===o?{...p,permissions:p.permissions.map(h=>h.name===a?{...h,checked:!h.checked,from:[]}:h)}:p)}:{...u,resources:[...u.resources,{type:r,resource:o,permissions:$_.filter(p=>p.canApplyTo.includes(r)).map(p=>({from:[],name:p.key,checked:p.key===a,info:j1(p.key,r===vt.DATASTORE)}))}]};return{...i,[e]:f}}function rj(e,o,r,a){const i=Ua(e,a);if(!i)return a;const l=Ft.find(i.resources,{type:o.type,resource:o.resource})?{...i,resources:i.resources.map(f=>f.type===o.type&&f.resource===o.resource?{...f,permissions:o.permissions.map(p=>p.name===r.name?{...p,checked:!p.checked,from:[]}:p)}:f)}:{...i,resources:[...i.resources,{...o,permissions:o.permissions.map(f=>({...f,checked:r.name===f.name,from:[]}))}]};return{...a,[e]:l}}function nj(e,o){var p;const r=uC(e,o)||[],a=((p=Ua(e,o))==null?void 0:p.resources)||[],l=([...r,...a].filter(({type:h})=>h===vt.METHOD)||[]).map(({resource:h})=>h);return Object.entries(o).reduce((h,[m,{resources:b}])=>(b.filter(({resource:S,type:x})=>x===vt.METHOD&&l.includes(S)).forEach(({permissions:S,resource:x})=>{var C;((C=S.find(({name:N})=>N==="promote"))==null?void 0:C.checked)&&(h[x]=zn(h[x]||[],m))}),h),{})}function uC(e,o){var l;const r=Ua(e,o);if(!r)return[];const a=(l=Object.values(o).find(f=>f.privilege===cd))==null?void 0:l.id;return(a&&a!==e?zn(ld(e,o),a):ld(e,o)).reduce((f,p)=>(o[p].resources.forEach(m=>{if(m.permissions.filter(({checked:x})=>x).length===0)return;const S=Ft.find(f,{type:m.type,resource:m.resource});if(!S){f.push({...m,permissions:m.permissions.map(x=>({...x,from:x.checked?[p]:[],checked:!1}))});return}S.permissions=S.permissions.map((x,R)=>{let{from:C=[]}=x;return m.permissions[R].checked&&!C.includes(p)&&(C=[...C,p]),{...x,from:C,checked:x.checked}})}),f),Ft.clone(r.resources.map(f=>({...f,permissions:f.permissions.map(({checked:p,...h})=>({...h,checked:!!p}))}))))}const oj=e=>e.reduce((o,r)=>({...o,[r.id]:{...r}}),{}),aj=(e,o)=>o[e]?Object.values(o).reduce((r,a)=>e===a.id||a.role===""?r:{...r,[a.id]:a},{}):o,ij=(e,o,r)=>r[e]?Object.values(r).reduce((a,i)=>e===i.id?{...a,[i.id]:{...i,name:o}}:{...a,[i.id]:i},{}):r,sj=(e,o)=>{const r={id:e,role:"",privileges:[]};return{...o,[r.id]:r}},uj=(e,o)=>{if(PT(e.role),Object.values(o).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(o).reduce((a,i)=>e.id===i.id?{...a,[e.id]:e}:{...a,[i.id]:i},{})},cj={list:[]},rE=(e,o)=>e.list.filter(r=>r.id!==o),cC=Hn({name:"modals",initialState:cj,reducers:{createModal:(e,o)=>{e.list.push(o.payload)},editModal:(e,o)=>{const{id:r,...a}=o.payload,i=e.list.find(g2(r));i&&Object.assign(i,{...a})},removeModal:(e,o)=>{const r=o.payload;e.list=rE(e,r)},closeModal:(e,o)=>{const{id:r,reason:a}=o.payload;if(a){const i=e.list.find(u=>u.id===r);i&&(i.closeReason=a,i.isOpen=!1)}else e.list=rE(e,r)}}}),{createModal:lC,removeModal:fC,closeModal:lj,editModal:fj}=cC.actions;var dC={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},nE=ze.createContext&&ze.createContext(dC),Za=globalThis&&globalThis.__assign||function(){return Za=Object.assign||function(e){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},Za.apply(this,arguments)},dj=globalThis&&globalThis.__rest||function(e,o){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)o.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};function pC(e){return e&&e.map(function(o,r){return ze.createElement(o.tag,Za({key:r},o.attr),pC(o.child))})}function Hd(e){return function(o){return ze.createElement(pj,Za({attr:Za({},e.attr)},o),pC(e.child))}}function pj(e){var o=function(r){var a=e.attr,i=e.size,u=e.title,l=dj(e,["attr","size","title"]),f=i||r.size||"1em",p;return r.className&&(p=r.className),e.className&&(p=(p?p+" ":"")+e.className),ze.createElement("svg",Za({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,l,{className:p,style:Za(Za({color:e.color||r.color},r.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&ze.createElement("title",null,u),e.children)};return nE!==void 0?ze.createElement(nE.Consumer,null,function(r){return o(r)}):o(dC)}function hj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function vj(e){return Hd({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"}}]})(e)}function gj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.953 2C6.465 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.493 2 11.953 2zM12 20c-4.411 0-8-3.589-8-8s3.567-8 7.953-8C16.391 4 20 7.589 20 12s-3.589 8-8 8z"}},{tag:"path",attr:{d:"M11 7h2v7h-2zm0 8h2v2h-2z"}}]})(e)}function mj(e){return Hd({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 0 1 0-96 48.01 48.01 0 0 1 0 96z"}}]})(e)}const yj={FaSave:hj,AiFillWarning:mj,BiErrorCircle:gj,BsFillInfoCircleFill:vj};var Un=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(Un||{}),za=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(za||{}),j_=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(j_||{});const _o=xe("modals/open",async(e,{dispatch:o})=>{const{type:r=Un.ALERT}=e,a=J1();switch(o(lC({id:a,type:r,isOpen:!0,...e})),r){case Un.CONFIRM:return new Promise(i=>{const u=Os.subscribe(()=>{var p;const{modals:l}=Os.getState(),f=l.list.find(h=>h.id===a);if(f&&!f.isOpen){const h=f.closeReason===j_.CONFIRMED,m=Ft.entries((p=f.views)==null?void 0:p.toggles).reduce((b,S)=>({...b,[S[0]]:S[1].value}),{});o(fC(a)),u(),i({confirmed:h,options:m})}})});default:return{}}}),hC=()=>I2({name:Wr}),vC="Roles & Privileges",fd=xe("roles/fetchRoles",async(e,{dispatch:o,rejectWithValue:r})=>{var u;let a;try{a=await hC()}catch(l){if(!Array.isArray((u=l==null?void 0:l.data)==null?void 0:u.__ERROR))return r("Error while loading the roles");a={name:Wr,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const i={name:vC,type:ie.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:Wr,flags:{},content:{}};return o(bn(i)),{...a,content:zd(a.content)}}),gC=xe("roles/fetchRolesChanges",async(e,{getState:o})=>{const{tabs:r}=o().root;if(r.find(i=>i.path===Wr)){const{date:i}=o().roles;if(i&&await F_(i))return{old:!0}}return{}}),F_=async e=>{if(!e)return!1;try{const o=await hC();if(o.date){const r=new Date(e),a=new Date(o.date);if(r>a)return!0}}catch(o){if(!Array.isArray(o==null?void 0:o.data.__ERROR))throw o}return!1},F1=xe("roles/saveRoles",async(e,{getState:o,rejectWithValue:r,dispatch:a})=>{try{const{flags:i,date:u}=o().roles;if(i.old||await F_(u)){const{confirmed:p}=await a(_o({title:vC,message:"New content has been found on the server. Are you sure you want to continue?",type:Un.CONFIRM,icon:"FaSave"})).unwrap();if(!p)return r({old:!0})}return await Ad({name:Wr,content:L_(e)})}catch{return r("Error while loading the roles")}}),bj=Xs().roles,{roles:_j={},privileges:wj={},flags:Sj={touched:!1},date:Ej,selectedTab:Tj="roles"}=bj||{},xj={flags:Sj,roles:_j,privileges:wj,date:Ej,selectedTab:Tj},mC=Hn({name:"roles",initialState:xj,reducers:{updatePrivileges:(e,o)=>{e.privileges=o.payload,e.flags.touched=!0},updateRoles:(e,o)=>{e.roles=o.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,o)=>{e.roles=o.payload.roles,e.privileges=o.payload.privileges},toggleTab:(e,o)=>{e.selectedTab=o.payload},setRolesContent(e,o){const{content:r,date:a}=o.payload,i=zd(r);return{...e,...i,date:a}}},extraReducers(e){e.addCase(fd.fulfilled,(o,r)=>{const{content:a,date:i}=r.payload;o={...o,...a,date:i}}).addCase(fd.rejected,o=>({...o,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(F1.fulfilled,(o,r)=>({...o,flags:{...o.flags,touched:!1,old:!1},date:r.payload.date})).addCase(F1.rejected,(o,r)=>QT.isString(r.payload)?o:{...o,flags:{...o.flags,...r.payload}}).addCase(gC.fulfilled,(o,r)=>({...o,flags:{...o.flags,...r.payload}})).addCase(zs.fulfilled,(o,r)=>{!r.payload||r.payload.path!==Wr||(o.flags.touched=!1,o.flags.old=!1)}).addCase(G_.fulfilled,(o,r)=>{r.meta.arg!==Wr||!r.payload||(o.flags.touched=!1,o.flags.old=!1)})}}),{updatePrivileges:yC,updateRoles:bC,setRolesContent:W_,toggleTab:Cj,updateRolesAndPrivileges:B_}=mC.actions,Oj=mC.reducer,ti="qodlyApp.json",U_=xe("settings/fetch",async()=>await ei({verb:Xt.GET_INFO,path:ti,content:!0,as:"json"})),_C=xe("settings/app",x2),Rj=GT(),oE={session:{"studio.tips":!0,"studio.notifications":!0,"webforms.tooltip.behavior":M_.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral"},server:{projectOpened:!1,remoteDebuggerMode:m_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},Aj={...oE,session:{...oE.session,...Rj},welcometour:{}},wC=Hn({name:"settings",initialState:Aj,reducers:{setSetting(e,o){const{path:r,settingsKey:a,value:i}=o.payload;e[r][a]=i},setSettings(e,o){const{path:r,value:a}=o.payload;e[r]={...e[r],...a}},setSettingsAsText(e,o){const{path:r,settings:a}=o.payload;e[r]=a}},extraReducers(e){e.addCase(U_.fulfilled,(o,r)=>{o.project={...o.project,...r.payload.content}}),e.addCase(_C.fulfilled,(o,r)=>{o.server=r.payload,o.server.qodly&&(o.project["webforms.display-mode"]="airy")})}}),{setSetting:SC,setSettings:qd,setSettingsAsText:Pj}=wC.actions,Ij=wC.reducer,W1=e=>{const o=["folder","file"];return e.sort((r,a)=>r.type===a.type?r.name.localeCompare(a.name):o.indexOf(r.type)-o.indexOf(a.type))},st=(e,o)=>e.reduce((r,a)=>a.path===o.path&&a.type===o.type?[...r,o]:a.children?[...r,{...a,children:W1(st(a.children,o))}]:[...r,a],[]),Er=(e,o)=>e.reduce((r,a)=>r||(a.path===o?a:a.children?Er(a.children,o):null),null),Dj=[{name:jt.WEBFORMS,type:ie.FOLDER,children:[],path:jt.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:jt.METHODS,type:ie.FOLDER,children:[],path:jt.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:jt.CLASSES,type:ie.FOLDER,children:[],path:jt.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:jt.SHARED,type:ie.FOLDER,children:[],path:jt.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:ie.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:ie.FILE,ext:"json",path:"roles",error:null,flags:{},config:{editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},isRoot:!0},{name:"Model",type:ie.MODEL,ext:"4DModel",path:"model",error:null,flags:{},config:{editor:{key:"editors:model"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]}},{name:"Settings",type:ie.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],EC=Hn({name:"explorer",initialState:Dj,reducers:{toggleExpandFolder:(e,o)=>(e=st(e,{...o.payload,flags:{...o.payload.flags,expanded:!o.payload.flags.expanded}}),e),expandFolder:(e,o)=>(e=st(e,{...o.payload,flags:{...o.payload.flags,expanded:!0}}),e),openAddFileInput:(e,o)=>st(e,{...o.payload,flags:{...o.payload.flags,adding:!0}}),addNewFile:(e,o)=>{const{parent:r,child:a}=o.payload;return st(e,{...r,children:[a,...r.children||[]]})},removeFile:(e,o)=>{const{parent:r,child:a}=o.payload;return st(e,{...r,children:r.children.filter(i=>i.path!==a.path)})},refreshFile:(e,o)=>{const{parent:r,child:a}=o.payload,i=(r.children||[]).filter(u=>u.path!==a.path&&!a.error);return st(e,{...r,children:[a,...i]})},setFolderChildren:(e,o)=>{const r=Er(e,o.payload.parentPath);return r?st(e,{...r,children:o.payload.children}):e}},extraReducers:e=>{e.addCase(Us.pending,(o,r)=>{const{file:a,newname:i}=r.meta.arg,u=Er(o,a.path);if(!u)return o;const l=a.path.split("/");l.pop();const f=`${l.join("/")}/${a.name}.${a.ext}`,p=`${l.join("/")}/${i}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":Va.next({action:Ma.WILL_RENAME,payload:{oldPath:f,newPath:p}});break}return st(o,{...u,flags:{...u.flags,loading:!0}})}),e.addCase(Us.fulfilled,(o,r)=>{const{meta:{arg:{file:a}},payload:i}=r,u=Er(o,a.path);if(!u)return o;switch(i.old.ext){case"4dm":case"4qs":Va.next({action:Ma.DID_RENAME,payload:{oldPath:i.old.path,newPath:i.new.path}});break}return st(o,{...u,flags:{...u.flags,loading:!1}})}),e.addCase(Us.rejected,(o,r)=>{const{file:a}=r.meta.arg,i=Er(o,a.path);return i?st(o,{...i,flags:{...i.flags,loading:!1}}):o}),e.addCase(Ro.pending,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,flags:{...i.flags,loading:!0}}):o}),e.addCase(Ro.fulfilled,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,children:W1(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!0},error:null}):o}),e.addCase(Ro.rejected,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!0}}):o}),e.addCase(kl.pending,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,flags:{...i.flags,loading:!0}}):o}),e.addCase(kl.fulfilled,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,children:W1(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!1},error:null}):o}),e.addCase(kl.rejected,(o,r)=>{const a=r.meta.arg,i=Er(o,a);return i?st(o,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!1}}):o}),e.addCase($f.pending,(o,r)=>{const{fileName:a,parentNode:i,path:u,type:l}=r.meta.arg;return st(o,{...i,children:[{name:a,path:`${u}/${a}`,type:l,error:null,flags:{loading:!0},config:{}},...i.children]})}),e.addCase($f.fulfilled,(o,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg,l=ks(u),{editor:f,supportedEditors:p}=mo(`${a}${l?`.${l.toLowerCase()}`:""}`);return st(o,{name:i,path:`${a}/${i}`,type:u,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:p}})}),e.addCase($f.rejected,(o,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg;return st(o,{name:i,path:`${a}/${i}`,type:u,error:{message:r.payload},flags:{loading:!1},config:{}})}),e.addCase(kf.pending,(o,r)=>{const{node:a,parentNode:i}=r.meta.arg;return st(o,{...i,children:[{name:`${a.name}_copy`,path:`${a.path}/${a.name}_copy`,type:a.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...i.children]})}),e.addCase(kf.fulfilled,(o,r)=>{const{node:a}=r.payload,{node:{path:i,ext:u}}=r.meta.arg,{editor:l,supportedEditors:f}=mo(`${i}${u?`.${u.toLowerCase()}`:""}`);return st(o,{name:`${a.name}`,path:`${i}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:l,supportedEditors:f}})}),e.addCase(kf.rejected,(o,r)=>{const a=r.payload,{node:i}=r.meta.arg;return st(o,{name:`${i.name}_copy`,path:`${i.path}/${i.name}_copy`,type:i.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(jl.pending,(o,r)=>{}),e.addCase(jl.fulfilled,(o,r)=>{var b;const{draggedNode:a,newLocation:i}=r.meta.arg,u=Cx(a.path),l=Er(o,u),f=Er(o,i.path),p=(b=l==null?void 0:l.children)==null?void 0:b.filter(S=>S.path!==a.path),h=i.path.split("/").length,m=a.path.split("/").length;return h>=m?(o=st(o,{...l,children:p}),o=st(o,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}})):(o=st(o,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}}),o=st(o,{...l,children:p})),o}),e.addCase(jl.rejected,(o,r)=>{Oo.next({message:"Error moving file",kind:"danger"})}),e.addCase(Bs.pending,(o,r)=>{var C;const{fileName:a,parentNode:i,path:u,type:l,qodly:f}=r.meta.arg,p=ks(l,f),h=`${u}/${a}${p?`.${p.toLowerCase()}`:""}`,{editor:m,supportedEditors:b}=mo(h);switch(l){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.WILL_CREATE,payload:{filePath:h}});break}const S=(C=i.children)==null?void 0:C.filter(N=>N.path!==`${u}/${a}`),x=[{name:a,path:`${u}/${a}`,type:ie.FILE,error:null,flags:{loading:!0},config:{editor:m,supportedEditors:b},ext:p,date:new Date().toISOString()},...S],R=st(o,{...i,children:x});return QT.merge(o,R)}),e.addCase(Bs.fulfilled,(o,r)=>{const{fileName:a,path:i,type:u,qodly:l}=r.meta.arg,f=ks(u,l),p=`${i}/${a}${f?`.${f.toLowerCase()}`:""}`,{editor:h,supportedEditors:m}=mo(p),b=st(o,{name:a,path:`${i}/${a}`,type:ie.FILE,error:null,flags:{},config:{editor:h,supportedEditors:m},ext:f,date:new Date().toISOString()});switch(u){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.DID_CREATE,payload:{filePath:p}});break}return o=b,o}),e.addCase(Bs.rejected,(o,r)=>{const{fileName:a,path:i,type:u}=r.meta.arg,l=ks(u),{editor:f,supportedEditors:p}=mo(`${i}${l?`.${l.toLowerCase()}`:""}`);return o=st(o,{name:a,path:`${i}/${a}`,type:ie.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:p},ext:l,date:new Date().toISOString()}),o}),e.addMatcher(RE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!0}})),o}),e.addMatcher(PE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!1}})),o}),e.addMatcher(AE(Ll),(o,r)=>{const a=Er(o,r.meta.arg.file.path.split(".")[0]);return a&&(o=st(o,{...a,flags:{...a.flags,loading:!1}})),Oo.next({message:"Failed to open file, try again",kind:"danger"}),o})}}),{toggleExpandFolder:Mj,expandFolder:Nj,openAddFileInput:$j,addNewFile:TC,refreshFile:kj,removeFile:B1,setFolderChildren:Lj}=EC.actions;function xC(e){switch(e){case ie.WEBFORMS:return Xx;case ie.METHODS:return`//%attributes = {}
|
|
225
|
+
`;default:return""}}function CC(e,o,r){switch(o){case ie.MOBILEFORM:return`${e}.MForm`;case ie.WEBFORM:return`${e}.WebForm`;case ie.METHOD:case ie.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}function jj(e){switch(e){case jt.WEBFORMS:return ie.WEBFORMS;case jt.METHODS:return ie.METHODS;case jt.CLASSES:return ie.CLASSES;case"Mobile":return ie.MOBILE;default:return e}}function OC(e){switch(e){case ie.WEBFORMS:return ie.WEBFORM;case ie.CLASSES:return ie.CLASS;case ie.METHODS:return ie.METHOD;case ie.FOLDER:return ie.FOLDER;case ie.MOBILE:return ie.MOBILEFORM;default:return e}}const Fj=xe("files/tryEditMethod",async({method:e},{dispatch:o})=>{const r=e.filePath.split("/"),[a]=r[1].split("."),{editor:i}=mo(e.filePath);return await o(z_({file:{name:a,path:e.filePath,date:new Date().toISOString(),type:ie.CLASS,editor:i},line:e.startingLine+1})).unwrap()}),U1=xe("explorer/createModelFiles",async(e,{dispatch:o,getState:r})=>{var b;const a=r(),i=jt.CLASSES,u=a.settings.server.qodly,l=Er(a.explorer,i);if(!l)return;await o(Ro(i));const p=((b=r().explorer.find(S=>S.name===i))==null?void 0:b.children)||[];let h=[{content:"",name:""}];const m=S=>{switch(S){case"dataclass":return{name:e.type==="dataclass"?e.className:"DataStore",content:u?`extends DataClass
|
|
226
226
|
`:`Class extends DataClass
|
|
227
227
|
`};case"collection":return{name:e.type==="dataclass"?e.collectionName:"DataStore",content:u?`extends EntitySelection
|
|
228
228
|
`:`Class extends EntitySelection
|
|
@@ -230,27 +230,27 @@ globstar while`,o,b,r,S,x),this.matchOne(o.slice(b),r.slice(S),a))return this.de
|
|
|
230
230
|
`:`Class extends Entity
|
|
231
231
|
`};case"model":return{name:"DataStore",content:u?`extends DataStoreImplementation
|
|
232
232
|
`:`Class extends DataStoreImplementation
|
|
233
|
-
`}}};e.type==="dataclass"&&!e.toCreate?h=[{...m("dataclass")},{...m("collection")},{...m("entity")}]:e.type==="dataclass"&&e.toCreate?h=[{...m(e.toCreate)}]:h=[{...m("model")}],h=h.filter(S=>!p.find(({name:x,ext:R})=>x===S.name&&R===(u?"4qs":"4dm"))),await Promise.all(h.map(async({name:S,content:x})=>{await o(Bs({type:ie.CLASS,path:i,fileName:S,parentNode:l,content:x,qodly:a.settings.server.qodly}))})),await o(Ro(i))}),Ro=xe("explorer/fetchFolderContent",async(e,{rejectWithValue:o})=>{try{return(await ei({verb:Xt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:l}=mo(`${i}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:i,ext:a.ext,config:a.type==="folder"?{}:{editor:u,supportedEditors:l}}})}catch{return o("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),kl=xe("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:o})=>{try{return(await ei({verb:Xt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:l}=mo(`${i}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:i,ext:a.ext,config:a.type==="folder"?{}:{editor:u,supportedEditors:l}}})}catch{return o("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function Wj(e){const o=e.split(".");return o.pop(),{name:o.join("."),ext:e.split(".")[e.split(".").length-1]}}const Bj=xe("explorer/uploadFile",async e=>{const o=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const r=await fetch(`/rest/$upload?${o}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:r.status,data:await r.json()}}catch{return{status:500,data:null}}}),Uj=xe("explorer/uploadFile",async({file:e,path:o,parentNode:r},{dispatch:a})=>{const{editor:i,supportedEditors:u}=mo(o),{name:l,ext:f}=Wj(e.name);a(TC({parent:r,child:{name:l,path:`${o}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:i,supportedEditors:u},ext:f}}));try{const p=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${o}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return p.status>=300?(a(B1({parent:r,child:{name:l,path:`${o}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),p.status!==413&&Oo.next({message:"error uploading file",kind:"danger"})):await a(Ro(r.path)),{status:p.status,fileName:e.name}}catch{return a(B1({parent:r,child:{name:l,path:`${o}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),Oo.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),Bs=xe("explorer/createNewFile",async({fileName:e,type:o,path:r,parentNode:a,content:i},{dispatch:u,rejectWithValue:l,getState:f})=>{const{qodly:p}=f().settings.server;try{const h=await Ad({name:CC(e,o,p),content:i||xC(o),path:r,asText:[ie.CLASS,ie.METHOD].includes(o)});return a.error&&(a.flags.expanded?await u(Ro(a.path)):await u(kl(a.path))),{qodly:p,file:h,parentNode:a}}catch{return l("failed to create folder")}});function RC(e,o){const{qodly:r=!0,withExtension:a=!0}=o||{},i=ks(e.type,r);let u="";switch(e.type){case ie.WEBFORM:u=`${jt.WEBFORMS}/${e.name}`;break;case ie.METHOD:u=`${jt.METHODS}/${e.name}`;break;case ie.CLASS:u=`${jt.CLASSES}/${e.name}`;break;default:return""}return`${u}${a?`.${i}`:""}`}const zj=xe("explorer/createNewFileAndOpen",async(e,{dispatch:o,getState:r})=>{const a=await o(Bs(e)).unwrap(),{qodly:i}=r().settings.server;if(a){const{file:u}=a,l=RC(u,{withExtension:!1,qodly:i}),{editor:f}=mo(l);await o(Ll({file:{name:e.fileName,type:u.type,path:l,editor:f,date:new Date().toISOString()}}))}}),$f=xe("explorer/createNewNode",async({fileName:e,path:o,parentNode:r},{rejectWithValue:a})=>{try{return{file:await $2({verb:Xt.CREATE_FOLDER,path:`${o}/${e}`,recursive:!0}),parentNode:r}}catch{return Oo.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),Gd=async e=>{try{const o=e.path.split(".").at(-1),r=await ei({verb:Xt.GET_INFO,path:e.path,content:!0,as:YT(o)?"json":"text"}),a={editor:e.editor},i=DT(e.path);i===ie.METHOD&&(a.attributes=b_(r.content),r.content=kT(r.content,{}));const{content:u,date:l,ext:f}=r;return{date:l,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(f)},extra:a,name:e.name,path:e.path,type:i,initialContent:u,content:u}}catch(o){const{data:r}=o;if(r.__ERROR.find(a=>a.errCode===I_.FILE_NOT_FOUND))switch(e.path){case Wr:{const a={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:ie.ROLES,initialContent:a,content:a}}case ti:{const a={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:ie.SETTINGS,initialContent:a,content:a}}}throw o}},Ll=xe("explorer/openFile",async({file:e,inactive:o},{getState:r,dispatch:a})=>{const{root:{tabs:i},roles:u}=r(),l=i.find(({path:h})=>e.path===h);if(l){const h={...l,extra:{...l==null?void 0:l.extra,editor:e.editor}};return a(bn(h)),h}if(e.path.startsWith("Debugger")){const h=r().debugger.sessions.find(m=>`Debugger/${m.threadId}`===e.path);if(h){const{source:{content:m},source:b}=h.currentStackFrame,S={name:e.name,type:ie.DEBUGGER,date:new Date().toISOString(),path:e.path,content:m,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:m,flags:{},extra:{source:b,editor:e.editor}};return a(bn(S)),S}}const f=await Gd(e);return e.path===Wr&&!u.flags.touched?a(F_({content:f.content,date:f.date})):e.path===ti&&a(qd({path:"project",value:f.content})),a((o?cO:bn)(f)),f}),U_=xe("explorer/openFileAtLine",async({file:e},{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.find(({path:l})=>e.path===l);if(i){const l={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(bn(l)),l}const u=await Gd(e);return r(bn(u)),u}),AC=xe("explorer/injectContentAtLine",async(e,{getState:o,dispatch:r,rejectWithValue:a})=>{const i=o();e.path.split("/").pop();const l=Er(i.explorer,e.path);if(!l)return a(`Error while trying to inject content in file ${e.path}`);const f=await Gd({name:l.name,date:l.date||new Date().toISOString(),path:`${l.path}.${l.ext}`,type:ie.CLASS,editor:l.config.editor});return await r(bn(f)),{...e,path:`${l.path}.${l.ext}`}}),PC=xe("explorer/openFileAtSelection",async({file:e},{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.find(({path:l})=>e.path===l);if(i){const l={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(bn(l)),l}const u=await Gd(e);return r(bn(u)),u}),z1=xe("explorer/deleteFile",async e=>{const{name:o,type:r,path:a,flags:i}=e;if(i.error)return{deleted:!0,node:e};const u=a.split("/");return u.pop(),{deleted:await A2({root:Fs.ROOT,type:OC(r),verb:Xt.DROP,name:o,path:u.join("/")}),node:e}}),Hj=xe("explorer/deleteFolder",async e=>{const{path:o,flags:r}=e;if(r.error)return{deleted:!0,node:e};const{deleted:a}=await FT({force:!0,path:o,verb:Xt.REMOVE_ITEM});return{deleted:a,node:e}}),qj=xe("explorer/removeFileNode",async e=>{const{ext:o,path:r}=e;return await FT({verb:Xt.REMOVE_ITEM,path:`${r}.${o}`,force:!0}),r==="Classes/DataStore"&&af(),{deleted:!0,node:e}}),Us=xe("explorer/renameFile",async({file:e,newname:o})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const i=`${a.join("/")}/${e.name}.${e.ext}`,u=`${a.join("/")}/${o}.${e.ext}`;return await w1({verb:Xt.MOVE_ITEM,path:i,newpath:u}),{old:{...e,path:i},new:{...e,name:o,path:u}}}const r=e.path.split("/");return r.pop(),await w1({verb:Xt.MOVE_ITEM,path:`${r.join("/")}/${e.name}`,newpath:`${r.join("/")}/${o}`}),{old:e,new:{...e,name:o,path:`${r.join("/")}/${o}`}}}),jl=xe("explorer/relocateNode",async({draggedNode:e,newLocation:o},{rejectWithValue:r})=>{try{await w1({verb:Xt.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${o.path}/${e.name}.${e.ext}`})}catch{return r("can't move item")}}),kf=xe("explorer/duplicateNode",async({node:e,duplicateName:o},{rejectWithValue:r,fulfillWithValue:a,getState:i})=>{const u=e.path.split("/");u.pop();try{const{tabs:l}=i().root,f=l.find(({path:b})=>b===`${e.path}${e.ext?`.${e.ext}`:""}`),p=["4dm","4qm","4qs"].includes(e.ext),{content:h}=f||await ei({verb:Xt.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:p?"text":"json"}),m=await Ad({name:`${o}.${e.ext}`,content:h,path:u.join("/"),asText:p});return a({node:{...m,path:u.join("/")}})}catch{return r("failed to duplicate file")}}),Gj=xe("explorer/executeMethod",async({methodName:e,params:o=[],resultingDataSource:r={},namespace:a=""},{rejectWithValue:i})=>{var u,l;try{const p=await window.Method4D.buildMethod({methodName:e,parameters:o,resultingDataSource:r},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return p!=null&&p.__NOTIFICATION?Oo.next({message:`${((u=p.__NOTIFICATION)==null?void 0:u.message)||""}`,kind:`${((l=p.__NOTIFICATION)==null?void 0:l.type)||"info"}`}):Oo.next({message:"Method executed Successfully",kind:"message"}),p}catch(f){return Oo.next({message:f.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),i("can't execute method")}}),Vj=xe("files/fetchFiles",async()=>O2(Fs.WEBFORMS,Fs.METHODS,Fs.CLASSES)),z_=xe("tabs/renameDatasource",async(e,{dispatch:o,getState:r})=>{var x,R;const a=!!e.datasourceNamespace,{confirmed:i}=await o(_o({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:Un.CONFIRM,color:za.WARNING,views:{toggles:{},tips:a?[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated on opened web forms only"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]:[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]}})).unwrap();if(!i)return null;const{autoUpdateReferences:u,datasourceId:l,datasourceNamespace:f,value:p,path:h}=e,m=r();let b=[];if(a){const C=m.sharedDatasources.sources[f]||[];b.push(...C)}else if(h){const C=m.root.tabs.find(mn("path",h));if(b=(R=(x=C==null?void 0:C.content)==null?void 0:x.metadata)==null?void 0:R.datasources,!b)return null}const S=new RegExp(`^${l}\\b`,"");if(b=b.map(C=>{const N=(y_(C)||!NT(C))&&C.from&&S.test(C.from),k=C.events?C.events.map(W=>{var I,$,O,Y;switch(W==null?void 0:W.type){case"method":{const U=W;return U.params?{...U,params:U.params.map(G=>{var Se;return{...G,datasource:(Se=G.datasource)==null?void 0:Se.replace(new RegExp(`^${l}`,""),p)}}),returns:(I=U.returns)!=null&&I.datasource?{...U.returns,datasource:($=U.returns.datasource)==null?void 0:$.replace(new RegExp(`^${l}`,""),p)}:U.returns}:U}case"simple-action":{const U=W;return U.datasource?{...U,datasource:{...U.datasource,name:(O=U.datasource.name)==null?void 0:O.replace(new RegExp(`^${l}`,""),p),from:(Y=U.datasource.from)==null?void 0:Y.replace(new RegExp(`^${l}`,""),p)}}:U}default:return W}}):C.events;return C.id===l?{...C,id:p,events:k}:N&&C.from?{...C,from:C.from.replace(new RegExp(`^${l}`,""),p),events:k}:{...C,events:k}}),u){const C=a?`${f}:${l}`:`${l}`,N=a?`${f}:${p}`:`${p}`;AT.next({path:h??"",action:g_.RENAME,old_reference:C,new_reference:N,is_shared:a})}return{path:h,namespace:f,datasources:b}}),H_=xe("tabs/edit-datasource",(e,{getState:o})=>{var u,l;const r=o();let a=[];if(e.namespace)a=r.sharedDatasources.sources[e.namespace];else{const f=r.root.tabs.find(mn("path",e.path));f&&(a=((l=(u=f.content)==null?void 0:u.metadata)==null?void 0:l.datasources)||[])}return a.map(f=>f.id===e.datasourceId?Object.assign({},f,{[e.propertyKey]:e.value}):f)}),IC=xe("tabs/fetchChanges",async(e,{getState:o})=>{const a=ru(o()).filter(i=>[ie.METHOD,ie.CLASS].includes(i.type));return jT(...a.map(i=>{const[u]=i.path.split("/").filter(Boolean);return{name:i.name,type:i.type,root:u,path:"."}}))}),Yj=xe("files/saveAll",async(e,{getState:o,dispatch:r})=>{const a=R_(o());for(const i of a)r(zs({tab:i}))}),q_=xe("files/tryCloseTab",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.findIndex(l=>l.path===e);if(i===-1)return!1;const u=a[i];if(u!=null&&u.flags.touched){const{confirmed:l}=await r(_o({title:Pd(u),message:"Your unsaved changes will be lost. Proceed anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!l)return!1}return r(rO(i)),u.path===Wr&&u.flags.touched&&(async()=>{const f=await ei({verb:Xt.GET_INFO,path:Wr,content:!0,as:"json"});r(F_({content:f.content,date:f.date}))})(),!0}),Kj=xe("files/tryCloseOtherTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;if(a.some(u=>u.path!==e&&u.flags.touched===!0)){const{confirmed:u}=await r(_o({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(iO(e))}),Xj=xe("files/tryCloseAllTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;if(a.some(u=>u.flags.touched===!0)){const{confirmed:u}=await r(_o({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(oO())}),Zj=xe("files/tryCloseRightTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;let i=!1;for(let u=a.length-1;u>e;u-=1)if(a[u].flags.touched){i=!0;break}if(i){const{confirmed:u}=await r(_o({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(aO(e))}),Jj=xe("files/tryCloseLeftTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;let i=!1;for(let u=0;u<e;u+=1)if(a[u].flags.touched){i=!0;break}if(i){const{confirmed:u}=await r(_o({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(sO(e))}),H1=xe("files/reloadTab",async(e,{dispatch:o})=>{if(e.flags.touched){const{confirmed:i}=await o(_o({title:Pd(e),message:"Changes made to the file will be lost. Continue?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!i)return}const r=Ox(e.path),a=await ei({verb:Xt.GET_INFO,path:e.path,content:!0,as:r});if(e.path===Wr){const{roles:i,privileges:u}=zd(a.content);o(W_({roles:i,privileges:u})),o(Q_({path:e.path,flags:{old:!1}}))}else if(e.path===ti){const{content:i}=a;o(qd({path:"project",value:i}))}else{const{content:i}=a;return e.type===ie.WEBFORM?d2.next({path:e.path,action:RT.RELOAD,payload:i.components}):e.type===ie.MODEL&&Nx.next({action:"reload",payload:i}),a}}),zs=xe("files/saveTab",async({tab:e},{dispatch:o,getState:r})=>{const{path:a,content:i}=e;if(e.type===ie.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const l=await jT({path:a});if(l.files[0]){const m=new Date(e.date),b=new Date(l.files[0].date);if(m.getTime()<b.getTime()){const{confirmed:S}=await o(_o({title:Pd(e),message:"New content has been found on the server. Are you sure you want to continue?",type:Un.CONFIRM,icon:"FaSave"})).unwrap();if(!S)return o(Q_({path:a,flags:{old:!0}})),null}}const f=await k2({verb:Xt.SAVE_CONTENT,content:Qj(e,r()),path:a});(e.type===ie.CLASS||e.type===ie.MODEL)&&af();const p=(f.modelErrors||[]).map(m=>m.message),h=(f.permissionsErrors||[]).map(m=>m.message);return{...e,content:i,date:f.date,initialContent:i,errors:p.length>0||h.length>0?[{title:"Model errors",messages:p},{title:"Permissions errors",messages:h}]:[]}}),Qj=(e,o)=>{switch(!0){case e.path==="settings.json":case e.path===ti:return o.settings.project;case e.type===ie.ROLES:return k_(o.roles);case e.type===ie.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},aE=async e=>{if(e.type===ie.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const o=e.path.split("/").filter(Boolean)[0],r=await R2({root:o,type:e.type,verb:Xt.GET,name:e.name}),a={};r.type===ie.METHOD&&(a.attributes=b_(r.content));const{date:i,name:u,type:l,content:f}=r;return{date:i,flags:{enabled:e.type===ie.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:u,path:e.path,type:l,initialContent:f,content:l===ie.MODEL?VT(f):f}},DC=xe("files/tryInjectMethod",async({type:e,dataclass:o},{getState:r,dispatch:a})=>{const{root:{tabs:i},settings:{server:{qodly:u}}}=r(),l=ks("class",u);let f="",p="",h=null;if(!o)f="DataStore",p=`Classes/DataStore.${l}`;else switch(e){case"dataclass":f=o,p=`Classes/${o}.${l}`;break;case"collection":f=`${o}Selection`,p=`Classes/${o}Selection.${l}`;break;case"entity":f=`${o}Entity`,p=`Classes/${o}Entity.${l}`;break;default:return h}const m=i.find(mn("path",p));if(m)return a(bn(m)),m;try{h=await aE({name:f,date:new Date().toISOString(),path:`class/${f}.${l}`,type:ie.CLASS})}catch{o?await a(U1({type:"dataclass",className:o,collectionName:`${o}Selection`,toCreate:e})):await a(U1({type:"model"}))}return h=await aE({name:f,date:new Date().toISOString(),path:`class/${f}.${l}`,type:ie.CLASS}),h.path=p,a(bn(h)),h}),e4=xe("roles/open",async(e,{dispatch:o,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path===Wr);if(i)return o(bn(i)),i;o(fd())}),{debugger:Ns={meta:{state:$a.DETACHED},list:[],sessions:[],expressions:[]}}=Xs();var dE,pE;const t4={meta:{...Ns.meta,state:((dE=Ns.meta)==null?void 0:dE.state)===$a.ATTACHED?(pE=Ns.meta)==null?void 0:pE.state:$a.DETACHED},list:Ns.list||[],sessions:Ns.sessions||[],expressions:Ns.expressions||[]};function iE(e,o){const{line:r,offset:a,type:i="saved"}=o;e.breakpoints[i].locations.push({line:r}),Ft.isNumber(a)&&(e.breakpoints[i].offset=a)}function sE(e,o,r,a){e.breakpoints[r].locations=o,Ft.isNumber(a)&&(e.breakpoints[r].offset=a)}function uE({filePath:e,fileType:o,methodName:r,className:a,ext:i,source:u}){return{filePath:e,fileType:o,methodName:r,className:a,ext:i,source:u,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function cE(e,o,r){let a=!1;const i=e.map(u=>u[r]!==o[r]?u:(a=!0,{...u,...o}));return a?i:[...i,o]}function Tf(e){return e.map(({label:o})=>({label:o}))}const MC=Hn({name:"debugger",initialState:t4,reducers:{addBreakpointDecoration(e,o){const{filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f,breakpoint:p}=o.payload,h=Cs(e.list,r,i,u);if(h)iE(h,p);else{if(a===ie.CLASS&&p.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${u} class.`);const m=uE({filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f});iE(m,p),e.list.push(m)}},removeBreakpointDecoration(e,o){const{filePath:r,methodName:a,line:i,offset:u=0,type:l="saved"}=o.payload;if(r.startsWith("Classes/")){const f=e.list.filter(p=>p.filePath===r);if(f.length>0){const p=i+u;f.forEach(h=>{const m=h.breakpoints[l].offset||0;h.breakpoints[l].locations=h.breakpoints[l].locations.filter(b=>b.line+m!==p),l==="saved"&&(h.breakpoints.draft.locations=h.breakpoints.draft.locations.filter(b=>b.line+m!==p))})}}else{const f=Cs(e.list,r,a);f&&(f.breakpoints[l].locations=f.breakpoints[l].locations.filter(p=>p.line!==i),l==="saved"&&(f.breakpoints.draft.locations=f.breakpoints.draft.locations.filter(p=>p.line!==i)))}},setBreakpointsDecoration(e,o){const{filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f,breakpoints:p,offset:h,type:m="saved",clearDraft:b}=o.payload,S=Cs(e.list,r,i);if(S)sE(S,p,m,h),b&&m!=="draft"&&(S.breakpoints.draft.locations=[]);else{const x=uE({filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f});sE(x,p,m,h),e.list.push(x)}},clearBreakpoints(e,o){const{filePath:r,type:a="saved"}=o.payload;e.list=e.list.map(i=>({...i,breakpoints:i.filePath===r?{draft:!a||a==="draft"?{locations:[],offset:0}:i.breakpoints.draft,saved:!a||a==="saved"?{locations:[],offset:0}:i.breakpoints.saved}:i.breakpoints}))},setActiveLine(e,o){const{threadId:r,line:a,highlight:i}=o.payload,u=lr(e.sessions,r);u&&(u.activeLine=a,i&&(u.highlightedLines={start:a,end:a}))},addExpression(e,o){const{threadId:r,label:a,save:i}=o.payload,u=lr(e.sessions,r);u&&u.stopped&&(u.expressions=[...u.expressions||[],{label:a}],i&&(e.expressions=Tf(u.expressions)))},removeExpression(e,o){const{threadId:r,index:a,save:i}=o.payload,u=lr(e.sessions,r);u&&(u.expressions=u.expressions.filter((l,f)=>f!==a),i&&(e.expressions=Tf(u.expressions)))},removeAllExpressions(e,o){const{threadId:r,save:a}=o.payload,i=lr(e.sessions,r);i&&(i.expressions=[],a&&(e.expressions=[]))},renameExpression(e,o){const{threadId:r,index:a,replacement:i,save:u}=o.payload,l=lr(e.sessions,r);l&&l.expressions[a]&&(l.expressions[a].label=i,u&&(e.expressions=Tf(l.expressions)))},setExpression(e,o){const{threadId:r,expression:a}=o.payload,i=lr(e.sessions,r);if(i){const u=a.index>=0?a.index:i.expressions.length>0?i.expressions.length-1:0,l=i.expressions[u];l?(l.result=a.result,l.nakedResult=a.nakedResult,l.variablesReference=a.variablesReference||0,l.presentationHint=a.presentationHint):i.expressions.push(a)}},updateExpressionAt(e,o){const{threadId:r,index:a,value:i}=o.payload,u=lr(e.sessions,r);if(u){const l=u.expressions[a];l&&(l.result=`"${i}"`,l.nakedResult=i)}},saveExpressions(e,o){const{expressions:r}=o.payload;e.expressions=Tf(r)},addSession(e,o){const{threadId:r,channelId:a,stackFrames:i,exceptions:u=[]}=o.payload,l=lr(e.sessions,r),f=i[0],{expressions:p=[]}=e;if(l)l.expressions=p;else{const h=E_(r);e.sessions.push({tabPath:h,threadId:r,channelId:a,stackFrames:i,currentStackFrame:f,exceptions:u,expressions:p,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,o){const{threadId:r,changes:a}=o.payload;e.sessions=e.sessions.map(i=>i.threadId===r?{...i,...a}:i)},removeSession(e,o){const{threadId:r}=o.payload;e.sessions=e.sessions.filter(a=>a.threadId!==r)},removeSessionByIndex(e,o){const r=o.payload;e.sessions.splice(r,1)},setSessions(e,o){const r=o.payload;e.sessions=r},setCallChainVariables(e,o){const{threadId:r,frameId:a,variables:i}=o.payload;e.sessions=e.sessions.map(u=>{var l;return u.threadId===r?{...u,variables:{...u.variables,callchain:cE((l=u.variables)==null?void 0:l.callchain,{frameId:a,items:i},"frameId")}}:u})},setExpressionVariables(e,o){const{threadId:r,variablesReference:a,variables:i}=o.payload;e.sessions=e.sessions.map(u=>{var l;return u.threadId===r?{...u,variables:{...u.variables,expressions:cE((l=u.variables)==null?void 0:l.expressions,{variablesReference:a,items:i},"variablesReference")}}:u})},setSourceContent(e,o){const{threadId:r,content:a}=o.payload,i=lr(e.sessions,r);i&&(i.currentStackFrame.source={...i.currentStackFrame.source,content:a})},setDebuggerMeta(e,o){if(o.payload.state===$a.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:r,error:a={code:null,reason:"",type:td.SOCKET_ERROR}}=o.payload;if((r||e.meta.state!==$a.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===td.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===$a.DETACHED)return}e.meta.state=o.payload.state}},extraReducers:e=>{e.addCase($C.fulfilled,o=>{o.sessions=[]})}}),{addBreakpointDecoration:r4,removeBreakpointDecoration:n4,setBreakpointsDecoration:o4,clearBreakpoints:a4,setActiveLine:i4,addExpression:s4,renameExpression:u4,removeExpression:c4,removeAllExpressions:l4,setExpression:f4,updateExpressionAt:d4,saveExpressions:p4,addSession:h4,updateSession:v4,removeSession:g4,removeSessionByIndex:m4,setSessions:NC,setCallChainVariables:y4,setExpressionVariables:b4,setSourceContent:_4,setDebuggerMeta:w4}=MC.actions,$C=xe("files/wipeDebuggerSessions",async(e,{getState:o,dispatch:r})=>{const{sessions:a}=o().debugger;for(const{threadId:i}of a){const u=E_(i);r(q_(u))}}),kC=xe("files/removeDebuggerSessionsNotIn",async(e,{getState:o,dispatch:r})=>{const{threadIds:a}=e,{sessions:i}=o().debugger,u=[],l=i.filter(f=>{const p=a.includes(f.threadId);return p||u.push(f.threadId),p});return r(NC(l)),{staleThreadIds:u}}),G_="model.4DModel";var V_=(e=>(e.UUID="uuid",e.STRING="string",e.TEXT="text",e.DATE="date",e.TIME="duration",e.BOOLEAN="bool",e.BYTE="byte",e.INTEGER="word",e.LONG="long",e.LONG64="long64",e.FLOAT="number",e.BLOB="blob",e.IMAGE="image",e.OBJECT="object",e))(V_||{}),Ia=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Ia||{});const S4=e=>["string","uuid","number","long"].includes(e.type),E4=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],T4=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],x4=[{title:"String",kind:"storage",value:"string",calculatedType:"string",calculatedKind:"storage"},{title:"Text",kind:"storage",value:"text",calculatedType:"text",calculatedKind:"storage"},{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Date",kind:"storage",value:"date",calculatedType:"date",calculatedKind:"storage"},{title:"Duration",kind:"storage",value:"duration",calculatedType:"duration",calculatedKind:"storage"},{title:"Bool",kind:"storage",value:"bool",calculatedType:"bool",calculatedKind:"storage"},{title:"Byte",kind:"storage",value:"byte",calculatedType:"byte",calculatedKind:"storage"},{title:"Word",kind:"storage",value:"word",calculatedType:"word",calculatedKind:"storage"},{title:"Number",kind:"storage",value:"number",calculatedType:"number",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"},{title:"Object",kind:"storage",value:"object",calculatedType:"object",calculatedKind:"storage"},{title:"Image",kind:"storage",value:"image",calculatedType:"image",calculatedKind:"storage"},{title:"Blob",kind:"storage",value:"blob",calculatedType:"blob",calculatedKind:"storage"}],C4=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],O4=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],R4=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],LC=yn("model/add-dataclass"),jC=yn("model/rename-dataclass"),FC=yn("model/remove-dataclass"),WC=yn("model/add-attribute"),A4=yn("model/edit-attribute-property"),BC=yn("model/remove-attribute"),UC=yn("model/rename-attribute"),zC=yn("model/edit-primary-key"),P4=yn("model/edit-dataclass-property"),HC=yn("model/rename-collection"),I4=(e,o)=>({toJSON:!0,extraProperties:o,dataClasses:e.map(r=>{var a;return{...r.data,extraProperties:{position:{x:r.position.x,y:r.position.y},panelColor:(a=r.data.extraProperties)==null?void 0:a.panelColor}}})});function Lf(e,o,r){const a=e;let i=0;for(;r[`${a}${i||""}`];)i++;return`${a}${i||""}`}const Fl=e=>e.kind===Ia.RELATEDENTITY,dd=e=>e.kind===Ia.RELATEDENTITIES,D4=e=>dd(e)||Fl(e),Y_=xe("models/fetch",async()=>{try{return(await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_INFO,path:G_,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),pd=xe("models/save",async(e,{getState:o,rejectWithValue:r})=>{const{tabs:a}=o().root,i=a.find(u=>u.path===G_);if(!i)return r("Error while saving the model");try{const u=await dr(Jr,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return af(),{...u,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return r("Error while saving the model")}}),M4=xe("models/open",async(e,{dispatch:o,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path==="models/main");if(i)return o(bn(i)),i;o(Y_())}),N4=xe("model/rename-dataclass",async(e,{getState:o,dispatch:r})=>{var b,S;const{dataclassId:a,selectionId:i,name:u}=e;let l=o();const f=l.explorer.find(x=>x.path===jt.CLASSES);if(!f)throw new Error("Classes folder was not found!");await r(Ro(f.path)),l=o();const p={class:{found:!1,newNameTaken:!1,file:null,filename_update:u},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${u}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${u}Selection`}};(S=(b=l.explorer.find(x=>x.path===jt.CLASSES))==null?void 0:b.children)==null||S.forEach(x=>{x.name===p.class.filename_update&&(p.class.newNameTaken=!0),x.name===p.entity.filename_update&&(p.entity.newNameTaken=!0),x.name===p.selection.filename_update&&(p.selection.newNameTaken=!0),x.name===a?(p.class.found=!0,p.class.file=x):x.name===`${a}Entity`?(p.entity.found=!0,p.entity.file=x):x.name===i&&(p.selection.found=!0,p.selection.file=x)});const h=Object.entries(p).reduce((x,R)=>{const[C,N]=R;return N.found?N.newNameTaken?[...x,{type:"error",message:`Cannot rename ${C} file to ${N.filename_update} because it already exists. The existing file will be used instead!`}]:x:[...x,{type:"warning",message:`${a} ${C} file was not found`}]},[]);h.length>0&&r(_o({message:"The following errors were encountered during dataclass rename:",views:{tips:h}}));const m=Object.values(p).filter(x=>x.found&&x.file&&!x.newNameTaken);await Promise.all(m.map(async x=>await r(Us({file:x.file,newname:x.filename_update})))),m.length>0&&r(Ro("Classes"))}),Xl={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},$4={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Xl.DATACLASS_DELETE]:!0,[Xl.DATACLASS_DRAGGABLE]:!0}},qC=Hn({name:"Models",initialState:$4,reducers:{setModelFlag(e,o){e.flags={...e.flags,...o.payload}}},extraReducers(e){e.addCase(LC,({draft:{dataClasses:o}},r)=>{var l,f;const{dataclassID:a}=r.payload,i=Lf(a||"DataClass","className",o),u={className:i,collectionName:`${i}Selection`,attributes:[{name:"ID",kind:Ia.STORAGE,type:V_.LONG,scope:"public",indexKind:"auto",unique:!0,primKey:!0,autosequence:!0}],name:i,scope:"public",extraProperties:{position:{x:((l=r.payload.position)==null?void 0:l.x)||0,y:((f=r.payload.position)==null?void 0:f.y)||0}}};o[u.name]=u}).addCase(FC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a}=r.payload;o[a]&&(delete o[a],Object.values(o).forEach(u=>{u.attributes=u.attributes.filter(l=>l.type!==a&&l.type!==u.collectionName)}))}).addCase(jC,({draft:{dataClasses:o,collections:r}},a)=>{const{dataclassID:i,newName:u}=a.payload;if(!o[i]||o[u])return;const l=o[i].collectionName,f=Lf(`${u}Selection`,"collectionName",r);Object.values(o).forEach(p=>{p.className===i&&(p.className=u,p.name=u,p.collectionName=f),p.attributes.forEach(h=>{h.type===i?(h.type=u,h.path=u):h.type===l&&(h.type=f)})})}).addCase(WC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeName:i,attributeType:u,attributeKind:l,target:f}=r.payload;if(!o[a]||m2("name",i,o[a].attributes))return;const h={name:i,kind:l,type:u,exposed:!0,scope:"public"};if(l===Ia.RELATEDENTITY){if(!o[u])return;h.path=u;const b={name:Lf(o[u].collectionName,"name",o[u].attributes),type:o[a].collectionName,kind:Ia.RELATEDENTITIES,reversePath:!0,path:i,scope:"public",exposed:!0};o[u].attributes.push(b)}else if(l===Ia.RELATEDENTITIES){const m=o[u];if(!m)return;const b=m.attributes.find(mn("name",f));if(b){if(!Fl(b)||b.type!==o[a].className)return}else{h.path=f,h.reversePath=!0,h.type=u;const S={name:f,kind:Ia.RELATEDENTITY,scope:"public",path:m.className,type:m.className,exposed:!0};m.attributes.push(S)}}o[a].attributes.push(h)}).addCase(UC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeID:i,newName:u}=r.payload,l=o[a].attributes.find(mn("name",i)),f=o[a].attributes.find(mn("name",u));!l||f||Object.values(o).forEach(({collectionName:p,attributes:h,className:m})=>{h.forEach(b=>{Fl(l)&&dd(b)&&b.type===p&&b.path===i&&(b.path=u),m===a&&b.name===i&&(b.name=u)})})}).addCase(BC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeID:i}=r.payload;if(!o[a])return;const u=o[a].attributes.find(mn("name",i));u&&(Fl(u)&&Object.values(o).forEach(l=>{l.attributes=l.attributes.filter(f=>!(dd(f)&&f.type===l.collectionName&&f.path===u.name))}),o[a].attributes=o[a].attributes.filter(h2("name",i)))}).addCase(HC,({draft:{dataClasses:o,collections:r}},a)=>{const{dataclassID:i,collectionName:u}=a.payload;if(!o[i])return;const l=o[i].collectionName;r[u]||(o[i].collectionName=u,r[u]=o[i],delete r[l],Object.values(o).forEach(f=>f.attributes.forEach(p=>{p.type===l&&(p.type=u)})))}).addCase(zC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,newPrimKey:i}=r.payload;o[a]&&o[a].attributes.forEach(u=>{u.name===i?u.primKey=!0:u.primKey=!1})}),e.addCase(Y_.fulfilled,(o,r)=>{var l;const a={},i={},u=r.payload.extraProperties||{};(l=r.payload.dataClasses)==null||l.forEach(f=>{a[f.name]=f,i[f.collectionName]=f}),o.draft.dataClasses=a,o.draft.collections=i,o.draft.extraProperties=u,o.model.dataClasses=a,o.model.collections=i,o.model.extraProperties=u}),e.addCase(pd.pending,()=>{}).addCase(pd.fulfilled,(o,r)=>{const a={},i={},u=r.payload.content.extraProperties||{};r.payload.content.dataClasses.forEach(l=>{a[l.name]=l,i[l.collectionName]=l}),o.draft.dataClasses=a,o.draft.collections=i,o.draft.extraProperties=u,o.model.dataClasses=a,o.model.collections=i,o.model.extraProperties=u})}}),{setModelFlag:k4}=qC.actions,L4=()=>Io(e=>e.model.draft.dataClasses),j4=()=>Io(e=>e.model.draft.collections),F4=e=>Io(o=>o.model.draft.dataClasses[e]),W4=(e,o)=>Io(r=>r.model.draft.dataClasses[e].attributes.find(mn("name",o))),B4=()=>Io(e=>e.model.draft.extraProperties),U4=()=>{const e=Io(i=>i.model.flags),o=i=>i in e?e[i]:void 0,r=o(Xl.DATACLASS_DELETE),a=o(Xl.DATACLASS_DRAGGABLE);return{deleteDataclass:r,draggableDataclass:a,flags:e}},z4=qC.reducer;function Jb(e,o){const r=e.tabs.find(({path:a})=>a===ti);r&&(r.flags.touched=o)}const GC={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},{webforms:xf}=Xs(),VC={[GC.SIDEBAR_SECTION_RESIZABLE]:!0},YC={...xf,templates:{data:[],selectedGroup:""},datasources:{...w_.webforms.datasources,...xf==null?void 0:xf.datasources},flags:VC},KC=Hn({name:"webforms",initialState:YC,reducers:{toggleInspector:(e,o)=>{const{type:r}=o.payload;e.inspector[r].active=!e.inspector[r].active,e.inspector[r].active||(e.inspector[r].data=void 0)},inspect:(e,o)=>{const{type:r,data:a}=o.payload;e.inspector[r].active&&(e.inspector[r].data=a)},addComponent:(e,o)=>{e.components.push(o.payload)},editComponent:(e,o)=>{const{id:r,changes:a}=o.payload;e.components=e.components.map(i=>i.id===r?{...i,...a}:i)},removeComponent:(e,o)=>{const{payload:r}=o,a=e.components.findIndex(i=>i.id===r);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,o)=>{e.templates.selectedGroup=o.payload.selectedGroup},setTemplatesData:(e,o)=>{e.templates.data=o.payload},setTemplateData:(e,o)=>{const{group:r,components:a}=o.payload,i=e.templates.data.find(u=>u.group===r);i&&(i.components=a)},setDatasourcesTheme:(e,o)=>{e.datasources.theme=o.payload},setWebformsFlag(e,o){e.flags={...e.flags,...o.payload}}},extraReducers(e){e.addCase(tO.fulfilled,(o,r)=>{o.components=r.payload})}}),{toggleInspector:H4,inspect:q4,addComponent:XC,editComponent:ZC,removeComponent:JC,setSelectedGroup:G4,setTemplatesData:QC,setTemplateData:eO,setDatasourcesTheme:V4,setWebformsFlag:Y4}=KC.actions,K4=()=>{const e=Io(a=>a.webforms.flags);return{resizeSidebarSection:(a=>a in e?e[a]:void 0)(GC.SIDEBAR_SECTION_RESIZABLE),flags:e}},X4=KC.reducer,K_=Ft.curry((e,o)=>{var i,u;const r={...o.sharedDatasources.sources},a=(u=((i=o.root.tabs.find(mn("path",e)))==null?void 0:i.content).metadata)==null?void 0:u.datasources;return a&&(r[e]=a),Ft.cloneDeep(r)}),Z4=xe("webforms/fetchTemplates",async(e,{dispatch:o,getState:r})=>{const{data:a}=r().webforms.templates;if(!Ft.isEmpty(a))return a;try{const u=await(await fetch(`https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build/build/index.json?t=${Date.now()}`)).json();return o(QC(u)),u}catch{return[]}}),J4=xe("webforms/fetchTemplate",async({name:e},{dispatch:o,getState:r})=>{const{data:a}=r().webforms.templates,i=a.find(u=>u.group===e);if(i&&!Ft.isEmpty(i.components))return i.components;try{const l=await(await fetch(`${i==null?void 0:i.link}?t=${Date.now()}`)).json();return o(eO({group:e,components:l})),l}catch{return[]}}),tO=xe("webforms/fetchCraftedComponents",async(e,{rejectWithValue:o})=>{try{return(await ei({path:"WebForms/crafted_components.json",verb:Xt.GET_INFO,content:!0,as:"json"})).content}catch{return o("Error while loading the crafted components")}}),Q4=xe("webforms/addCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(XC(e));const{webforms:{components:i}}=a();__(i)}catch{return r("Error while adding the crafted component")}}),e6=xe("webforms/editCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(ZC(e));const{webforms:{components:i}}=a();__(i)}catch{return r("Error while editing the crafted component")}}),t6=xe("webforms/removeCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(JC(e));const{webforms:{components:i}}=a();__(i)}catch{return r("Error while removing the crafted component")}}),X_=xe("datasources/add-datasource",async(e,{getState:o,rejectWithValue:r})=>{var a,i;try{const u=o(),l=e.datasource,f=!!l.namespace,p=[];if(f){const h={...u.sharedDatasources.sources,[l.namespace]:[...u.sharedDatasources.sources[l.namespace],l]};p.push(...h[l.namespace]),await Qa(h)}else(((i=(a=u.root.tabs.find(mn("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]).push(l);return{list:p,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),r("Error while adding the datasource")}}),Z_=xe("datasources/edit-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const{namespace:a,path:i}=e,u=o(),l=!!e.namespace,f=K_(i,u);let p=Ft.defaultTo(f[a||i],[]);return p=p.map(h=>h.id===e.id?{...h,[e.property]:e.value}:h),l&&await Qa({...u.sharedDatasources.sources,[e.namespace]:p}),{list:p,path:e.path,namespace:e.namespace}}catch{r(`Error while editing datasource ${e.id}`)}}),r6=e=>e.type===Hs.fulfilled.type,Hs=xe("datasources/rename-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const a=o(),i=!!e.namespace,u=e.namespace||e.path,l=K_(e.path,a),f=Ft.defaultTo(l[u],[]),p=new RegExp(`^${e.id}\\b`,"");if(f.forEach(h=>{var b;const m=(y_(h)||!NT(h))&&h.from&&p.test(h.from);e.updateRefs&&((b=h.events)==null||b.forEach(S=>{var x,R,C,N,k;switch(S.type){case"method":{const W=S;W.params.forEach(I=>{I.datasource&&Object.assign(I,{datasource:I.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),W.returns&&Object.assign(W.returns,{datasource:(R=(x=W.returns)==null?void 0:x.datasource)==null?void 0:R.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const W=S;W.datasource&&Object.assign(W.datasource,{name:(C=W.datasource.name)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(N=W.datasource.from)==null?void 0:N.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(k=W.datasource.target)==null?void 0:k.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),h.id===e.id?h.id=e.new_name:m&&h.from&&(h.from=h.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const h=Qf({id:e.id,namespace:e.namespace}),m=Qf({id:e.new_name,namespace:e.namespace});AT.next({path:e.path??"",action:g_.RENAME,old_reference:h,new_reference:m,is_shared:i})}return i&&await Qa({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),Wl=xe("datasources/delete-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const a=o(),i=!!e.namespace,u=e.namespace||e.path,f=K_(e.path,a)[u].filter(v2(e.id));return i&&await Qa({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while removing datasource ${e.id}`)}}),Qb=Xs(),n6={filesLoading:!1,tabs:Qb.tabs||[],activeTab:Qb.activeTab,recent:Qb.recent||[]},J_=Hn({name:"root",initialState:n6,reducers:{setPanelState(e,o){const{path:r,...a}=o.payload;e.tabs.forEach(i=>{i.path===r&&(i.view||(i.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(i.view.panel,a))})},addDataSource(e,o){var u;const{payload:{path:r,datasourceDef:a}}=o,i=e.tabs.find(l=>l.path===r);i&&(i.content.metadata.datasources=i.content.metadata.datasources||[],(u=i.content.metadata.datasources)!=null&&u.find(f=>f.id===a.id)||(i.content.metadata.datasources=[...i.content.metadata.datasources,{...a,events:[]}],i.flags={...i.flags,touched:!0}))},openSettingsTab(e){const o={date:new Date().toISOString(),flags:{},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:ti,type:ie.SETTINGS,initialContent:{},content:{}};let r=e.tabs.find(a=>a.path===o.path);if(r||(e.tabs.push(o),r=e.tabs[e.tabs.length-1]),e.activeTab!==o.path){const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);e.activeTab=o.path,r.weight=((a==null?void 0:a.weight)||0)+1}},removeDataSource(e,o){const{path:r,datasourceID:a}=o.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,touched:!0},content:{...i.content,metadata:{...i.content.metadata,datasources:i.content.metadata.datasources.filter(u=>u.id!==a)}}}:i)},setDataSources(e,o){const{payload:{path:r,datasourceArr:a}}=o;e.tabs=e.tabs.map(i=>{var u;return i.path===r?{...i,flags:{...i.flags,touched:!0},content:{...i.content,metadata:{...(u=i.content)==null?void 0:u.metadata,datasources:a}}}:i})},setTabs(e,o){e.tabs=o.payload},closeTab(e,o){const r=o.payload;e.tabs.splice(r,1);const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);e.activeTab=(a==null?void 0:a.path)||""},closeOthers(e,o){e.tabs=e.tabs.filter(r=>r.path===o.payload),e.activeTab=o.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,o){e.tabs.splice(o.payload+1),e.activeTab=e.tabs[o.payload].path},closeLeftTabs(e,o){e.tabs.splice(0,o.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:r}})=>r);const o=e.tabs.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null);e.activeTab=(o==null?void 0:o.path)||""},selectTab(e,o){const r=e.tabs.find(({path:i})=>i===o.payload);if(!r||e.activeTab===o.payload)return;const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);r.weight=a?(a.weight||0)+1:1,e.activeTab=o.payload},openTabUnselected(e,o){const r=o.payload;let a=e.tabs.find(({path:u})=>r.path===u);a||(e.tabs.push(r),a=e.tabs[e.tabs.length-1]);const i=e.tabs.reduce((u,l)=>(l==null?void 0:l.weight)>((u==null?void 0:u.weight)||0)?l:u,null);a.weight=i?(i.weight||0)+1:1,a.extra={...a.extra,...r.extra}},selectTabByReference(e,o){const r=o.payload;let a=e.tabs.find(({path:i})=>r.path===i);if(a||(e.tabs.push(r),a=e.tabs[e.tabs.length-1]),e.activeTab!==r.path){const i=e.tabs.reduce((u,l)=>(l==null?void 0:l.weight)>((u==null?void 0:u.weight)||0)?l:u,null);e.activeTab=r.path,a.weight=((i==null?void 0:i.weight)||0)+1}a.extra={...a.extra,...r.extra}},setContent(e,o){const{path:r,content:a,contentPath:i}=o.payload;e.tabs=e.tabs.map(u=>{if(u.path!==r)return u;let l=!1;if(typeof a=="string")l=u.initialContent!==a;else{const f=JSON.stringify(Ft.get(u.initialContent,i||"",u.initialContent)),p=JSON.stringify(Ft.get(a,i||"",a));l=f!==p}return a&&typeof a=="object"&&(i?Ft.set(u.content,i,a):u.content=a),typeof a=="string"&&(u.content=a),{...u,flags:{...u.flags,touched:l}}})},setTabFlags(e,o){const{path:r,flags:a}=o.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,...a}}:i)},setTabsFlags(e,o){const{tabs:r,flags:a}=o.payload;e.tabs=e.tabs.map(i=>r.includes(i.path)?{...i,flags:{...i.flags,...a}}:i)},setTabExtra(e,o){const{path:r,extra:a,flags:i}=o.payload;e.tabs=e.tabs.map(u=>u.path===r?{...u,extra:{...u.extra,...a},flags:i?{...u.flags,...i}:u.flags}:u)},addWebFormStyles(e,o){const{path:r,styles:a=[]}=o.payload,i=e.tabs.find(u=>u.path===r);if(i){const u=i.content.metadata.styles.map(({name:f})=>f),l=a.filter(({name:f})=>!u.includes(f));i.content.metadata.styles=[...i.content.metadata.styles,...l].map(({scope:f,...p})=>({...p}))}},changeTabEditor(e,o){return e.tabs=e.tabs.map(r=>r.path===o.payload.path?o.payload:r),e}},extraReducers:e=>{e.addCase(AC.fulfilled,(o,r)=>{if(!r.payload)return;const{content:a,line:i,path:u}=r.payload,l=o.tabs.find(f=>f.path===u);if(l&&typeof l.content=="string"){const f=l.content.trim().split(`
|
|
233
|
+
`}}};e.type==="dataclass"&&!e.toCreate?h=[{...m("dataclass")},{...m("collection")},{...m("entity")}]:e.type==="dataclass"&&e.toCreate?h=[{...m(e.toCreate)}]:h=[{...m("model")}],h=h.filter(S=>!p.find(({name:x,ext:R})=>x===S.name&&R===(u?"4qs":"4dm"))),await Promise.all(h.map(async({name:S,content:x})=>{await o(Bs({type:ie.CLASS,path:i,fileName:S,parentNode:l,content:x,qodly:a.settings.server.qodly}))})),await o(Ro(i))}),Ro=xe("explorer/fetchFolderContent",async(e,{rejectWithValue:o})=>{try{return(await ei({verb:Xt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:l}=mo(`${i}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:i,ext:a.ext,config:a.type==="folder"?{}:{editor:u,supportedEditors:l}}})}catch{return o("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),kl=xe("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:o})=>{try{return(await ei({verb:Xt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:l}=mo(`${i}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:i,ext:a.ext,config:a.type==="folder"?{}:{editor:u,supportedEditors:l}}})}catch{return o("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function Wj(e){const o=e.split(".");return o.pop(),{name:o.join("."),ext:e.split(".")[e.split(".").length-1]}}const Bj=xe("explorer/uploadFile",async e=>{const o=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const r=await fetch(`/rest/$upload?${o}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:r.status,data:await r.json()}}catch{return{status:500,data:null}}}),Uj=xe("explorer/uploadFile",async({file:e,path:o,parentNode:r},{dispatch:a})=>{const{editor:i,supportedEditors:u}=mo(o),{name:l,ext:f}=Wj(e.name);a(TC({parent:r,child:{name:l,path:`${o}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:i,supportedEditors:u},ext:f}}));try{const p=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${o}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return p.status>=300?(a(B1({parent:r,child:{name:l,path:`${o}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),p.status!==413&&Oo.next({message:"error uploading file",kind:"danger"})):await a(Ro(r.path)),{status:p.status,fileName:e.name}}catch{return a(B1({parent:r,child:{name:l,path:`${o}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),Oo.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),Bs=xe("explorer/createNewFile",async({fileName:e,type:o,path:r,parentNode:a,content:i},{dispatch:u,rejectWithValue:l,getState:f})=>{const{qodly:p}=f().settings.server;try{const h=await Ad({name:CC(e,o,p),content:i||xC(o),path:r,asText:[ie.CLASS,ie.METHOD].includes(o)});return a.error&&(a.flags.expanded?await u(Ro(a.path)):await u(kl(a.path))),{qodly:p,file:h,parentNode:a}}catch{return l("failed to create folder")}});function RC(e,o){const{qodly:r=!0,withExtension:a=!0}=o||{},i=ks(e.type,r);let u="";switch(e.type){case ie.WEBFORM:u=`${jt.WEBFORMS}/${e.name}`;break;case ie.METHOD:u=`${jt.METHODS}/${e.name}`;break;case ie.CLASS:u=`${jt.CLASSES}/${e.name}`;break;default:return""}return`${u}${a?`.${i}`:""}`}const zj=xe("explorer/createNewFileAndOpen",async(e,{dispatch:o,getState:r})=>{const a=await o(Bs(e)).unwrap(),{qodly:i}=r().settings.server;if(a){const{file:u}=a,l=RC(u,{withExtension:!1,qodly:i}),{editor:f}=mo(l);await o(Ll({file:{name:e.fileName,type:u.type,path:l,editor:f,date:new Date().toISOString()}}))}}),$f=xe("explorer/createNewNode",async({fileName:e,path:o,parentNode:r},{rejectWithValue:a})=>{try{return{file:await $2({verb:Xt.CREATE_FOLDER,path:`${o}/${e}`,recursive:!0}),parentNode:r}}catch{return Oo.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),Gd=async e=>{try{const o=e.path.split(".").at(-1),r=await ei({verb:Xt.GET_INFO,path:e.path,content:!0,as:YT(o)?"json":"text"}),a={editor:e.editor},i=DT(e.path);i===ie.METHOD&&(a.attributes=__(r.content),r.content=kT(r.content,{}));const{content:u,date:l,ext:f}=r;return{date:l,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(f)},extra:a,name:e.name,path:e.path,type:i,initialContent:u,content:u}}catch(o){const{data:r}=o;if(r.__ERROR.find(a=>a.errCode===D_.FILE_NOT_FOUND))switch(e.path){case Wr:{const a={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:ie.ROLES,initialContent:a,content:a}}case ti:{const a={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:ie.SETTINGS,initialContent:a,content:a}}}throw o}},Ll=xe("explorer/openFile",async({file:e,inactive:o},{getState:r,dispatch:a})=>{const{root:{tabs:i},roles:u}=r(),l=i.find(({path:h})=>e.path===h);if(l){const h={...l,extra:{...l==null?void 0:l.extra,editor:e.editor}};return a(bn(h)),h}if(e.path.startsWith("Debugger")){const h=r().debugger.sessions.find(m=>`Debugger/${m.threadId}`===e.path);if(h){const{source:{content:m},source:b}=h.currentStackFrame,S={name:e.name,type:ie.DEBUGGER,date:new Date().toISOString(),path:e.path,content:m,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:m,flags:{},extra:{source:b,editor:e.editor}};return a(bn(S)),S}}const f=await Gd(e);return e.path===Wr&&!u.flags.touched?a(W_({content:f.content,date:f.date})):e.path===ti&&a(qd({path:"project",value:f.content})),a((o?cO:bn)(f)),f}),z_=xe("explorer/openFileAtLine",async({file:e},{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.find(({path:l})=>e.path===l);if(i){const l={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(bn(l)),l}const u=await Gd(e);return r(bn(u)),u}),AC=xe("explorer/injectContentAtLine",async(e,{getState:o,dispatch:r,rejectWithValue:a})=>{const i=o();e.path.split("/").pop();const l=Er(i.explorer,e.path);if(!l)return a(`Error while trying to inject content in file ${e.path}`);const f=await Gd({name:l.name,date:l.date||new Date().toISOString(),path:`${l.path}.${l.ext}`,type:ie.CLASS,editor:l.config.editor});return await r(bn(f)),{...e,path:`${l.path}.${l.ext}`}}),PC=xe("explorer/openFileAtSelection",async({file:e},{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.find(({path:l})=>e.path===l);if(i){const l={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(bn(l)),l}const u=await Gd(e);return r(bn(u)),u}),z1=xe("explorer/deleteFile",async e=>{const{name:o,type:r,path:a,flags:i}=e;if(i.error)return{deleted:!0,node:e};const u=a.split("/");return u.pop(),{deleted:await A2({root:Fs.ROOT,type:OC(r),verb:Xt.DROP,name:o,path:u.join("/")}),node:e}}),Hj=xe("explorer/deleteFolder",async e=>{const{path:o,flags:r}=e;if(r.error)return{deleted:!0,node:e};const{deleted:a}=await FT({force:!0,path:o,verb:Xt.REMOVE_ITEM});return{deleted:a,node:e}}),qj=xe("explorer/removeFileNode",async e=>{const{ext:o,path:r}=e;return await FT({verb:Xt.REMOVE_ITEM,path:`${r}.${o}`,force:!0}),r==="Classes/DataStore"&&af(),{deleted:!0,node:e}}),Us=xe("explorer/renameFile",async({file:e,newname:o})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const i=`${a.join("/")}/${e.name}.${e.ext}`,u=`${a.join("/")}/${o}.${e.ext}`;return await w1({verb:Xt.MOVE_ITEM,path:i,newpath:u}),{old:{...e,path:i},new:{...e,name:o,path:u}}}const r=e.path.split("/");return r.pop(),await w1({verb:Xt.MOVE_ITEM,path:`${r.join("/")}/${e.name}`,newpath:`${r.join("/")}/${o}`}),{old:e,new:{...e,name:o,path:`${r.join("/")}/${o}`}}}),jl=xe("explorer/relocateNode",async({draggedNode:e,newLocation:o},{rejectWithValue:r})=>{try{await w1({verb:Xt.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${o.path}/${e.name}.${e.ext}`})}catch{return r("can't move item")}}),kf=xe("explorer/duplicateNode",async({node:e,duplicateName:o},{rejectWithValue:r,fulfillWithValue:a,getState:i})=>{const u=e.path.split("/");u.pop();try{const{tabs:l}=i().root,f=l.find(({path:b})=>b===`${e.path}${e.ext?`.${e.ext}`:""}`),p=["4dm","4qm","4qs"].includes(e.ext),{content:h}=f||await ei({verb:Xt.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:p?"text":"json"}),m=await Ad({name:`${o}.${e.ext}`,content:h,path:u.join("/"),asText:p});return a({node:{...m,path:u.join("/")}})}catch{return r("failed to duplicate file")}}),Gj=xe("explorer/executeMethod",async({methodName:e,params:o=[],resultingDataSource:r={},namespace:a=""},{rejectWithValue:i})=>{var u,l;try{const p=await window.Method4D.buildMethod({methodName:e,parameters:o,resultingDataSource:r},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return p!=null&&p.__NOTIFICATION?Oo.next({message:`${((u=p.__NOTIFICATION)==null?void 0:u.message)||""}`,kind:`${((l=p.__NOTIFICATION)==null?void 0:l.type)||"info"}`}):Oo.next({message:"Method executed Successfully",kind:"message"}),p}catch(f){return Oo.next({message:f.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),i("can't execute method")}}),Vj=xe("files/fetchFiles",async()=>O2(Fs.WEBFORMS,Fs.METHODS,Fs.CLASSES)),H_=xe("tabs/renameDatasource",async(e,{dispatch:o,getState:r})=>{var x,R;const a=!!e.datasourceNamespace,{confirmed:i}=await o(_o({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:Un.CONFIRM,color:za.WARNING,views:{toggles:{},tips:a?[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated on opened web forms only"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]:[{type:"warning",message:"The datasource property of components bound with this datasource will also be updated"},{type:"warning",message:"The origin of some other datasources might be also renamed (if this datasource is the origin of other datasources)"}]}})).unwrap();if(!i)return null;const{autoUpdateReferences:u,datasourceId:l,datasourceNamespace:f,value:p,path:h}=e,m=r();let b=[];if(a){const C=m.sharedDatasources.sources[f]||[];b.push(...C)}else if(h){const C=m.root.tabs.find(mn("path",h));if(b=(R=(x=C==null?void 0:C.content)==null?void 0:x.metadata)==null?void 0:R.datasources,!b)return null}const S=new RegExp(`^${l}\\b`,"");if(b=b.map(C=>{const N=(b_(C)||!NT(C))&&C.from&&S.test(C.from),k=C.events?C.events.map(W=>{var I,$,O,Y;switch(W==null?void 0:W.type){case"method":{const U=W;return U.params?{...U,params:U.params.map(G=>{var Se;return{...G,datasource:(Se=G.datasource)==null?void 0:Se.replace(new RegExp(`^${l}`,""),p)}}),returns:(I=U.returns)!=null&&I.datasource?{...U.returns,datasource:($=U.returns.datasource)==null?void 0:$.replace(new RegExp(`^${l}`,""),p)}:U.returns}:U}case"simple-action":{const U=W;return U.datasource?{...U,datasource:{...U.datasource,name:(O=U.datasource.name)==null?void 0:O.replace(new RegExp(`^${l}`,""),p),from:(Y=U.datasource.from)==null?void 0:Y.replace(new RegExp(`^${l}`,""),p)}}:U}default:return W}}):C.events;return C.id===l?{...C,id:p,events:k}:N&&C.from?{...C,from:C.from.replace(new RegExp(`^${l}`,""),p),events:k}:{...C,events:k}}),u){const C=a?`${f}:${l}`:`${l}`,N=a?`${f}:${p}`:`${p}`;AT.next({path:h??"",action:g_.RENAME,old_reference:C,new_reference:N,is_shared:a})}return{path:h,namespace:f,datasources:b}}),q_=xe("tabs/edit-datasource",(e,{getState:o})=>{var u,l;const r=o();let a=[];if(e.namespace)a=r.sharedDatasources.sources[e.namespace];else{const f=r.root.tabs.find(mn("path",e.path));f&&(a=((l=(u=f.content)==null?void 0:u.metadata)==null?void 0:l.datasources)||[])}return a.map(f=>f.id===e.datasourceId?Object.assign({},f,{[e.propertyKey]:e.value}):f)}),IC=xe("tabs/fetchChanges",async(e,{getState:o})=>{const a=ru(o()).filter(i=>[ie.METHOD,ie.CLASS].includes(i.type));return jT(...a.map(i=>{const[u]=i.path.split("/").filter(Boolean);return{name:i.name,type:i.type,root:u,path:"."}}))}),Yj=xe("files/saveAll",async(e,{getState:o,dispatch:r})=>{const a=A_(o());for(const i of a)r(zs({tab:i}))}),G_=xe("files/tryCloseTab",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root,i=a.findIndex(l=>l.path===e);if(i===-1)return!1;const u=a[i];if(u!=null&&u.flags.touched){const{confirmed:l}=await r(_o({title:Pd(u),message:"Your unsaved changes will be lost. Proceed anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!l)return!1}return r(rO(i)),u.path===Wr&&u.flags.touched&&(async()=>{const f=await ei({verb:Xt.GET_INFO,path:Wr,content:!0,as:"json"});r(W_({content:f.content,date:f.date}))})(),!0}),Kj=xe("files/tryCloseOtherTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;if(a.some(u=>u.path!==e&&u.flags.touched===!0)){const{confirmed:u}=await r(_o({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(iO(e))}),Xj=xe("files/tryCloseAllTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;if(a.some(u=>u.flags.touched===!0)){const{confirmed:u}=await r(_o({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(oO())}),Zj=xe("files/tryCloseRightTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;let i=!1;for(let u=a.length-1;u>e;u-=1)if(a[u].flags.touched){i=!0;break}if(i){const{confirmed:u}=await r(_o({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(aO(e))}),Jj=xe("files/tryCloseLeftTabs",async(e,{getState:o,dispatch:r})=>{const{tabs:a}=o().root;let i=!1;for(let u=0;u<e;u+=1)if(a[u].flags.touched){i=!0;break}if(i){const{confirmed:u}=await r(_o({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(sO(e))}),H1=xe("files/reloadTab",async(e,{dispatch:o})=>{if(e.flags.touched){const{confirmed:i}=await o(_o({title:Pd(e),message:"Changes made to the file will be lost. Continue?",type:Un.CONFIRM,color:za.WARNING,icon:"AiFillWarning"})).unwrap();if(!i)return}const r=Ox(e.path),a=await ei({verb:Xt.GET_INFO,path:e.path,content:!0,as:r});if(e.path===Wr){const{roles:i,privileges:u}=zd(a.content);o(B_({roles:i,privileges:u})),o(Q_({path:e.path,flags:{old:!1}}))}else if(e.path===ti){const{content:i}=a;o(qd({path:"project",value:i}))}else{const{content:i}=a;return e.type===ie.WEBFORM?d2.next({path:e.path,action:RT.RELOAD,payload:i.components}):e.type===ie.MODEL&&Nx.next({action:"reload",payload:i}),a}}),zs=xe("files/saveTab",async({tab:e},{dispatch:o,getState:r})=>{const{path:a,content:i}=e;if(e.type===ie.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const l=await jT({path:a});if(l.files[0]){const m=new Date(e.date),b=new Date(l.files[0].date);if(m.getTime()<b.getTime()){const{confirmed:S}=await o(_o({title:Pd(e),message:"New content has been found on the server. Are you sure you want to continue?",type:Un.CONFIRM,icon:"FaSave"})).unwrap();if(!S)return o(Q_({path:a,flags:{old:!0}})),null}}const f=await k2({verb:Xt.SAVE_CONTENT,content:Qj(e,r()),path:a});(e.type===ie.CLASS||e.type===ie.MODEL)&&af();const p=(f.modelErrors||[]).map(m=>m.message),h=(f.permissionsErrors||[]).map(m=>m.message);return{...e,content:i,date:f.date,initialContent:i,errors:p.length>0||h.length>0?[{title:"Model errors",messages:p},{title:"Permissions errors",messages:h}]:[]}}),Qj=(e,o)=>{switch(!0){case e.path==="settings.json":case e.path===ti:return o.settings.project;case e.type===ie.ROLES:return L_(o.roles);case e.type===ie.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},aE=async e=>{if(e.type===ie.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const o=e.path.split("/").filter(Boolean)[0],r=await R2({root:o,type:e.type,verb:Xt.GET,name:e.name}),a={};r.type===ie.METHOD&&(a.attributes=__(r.content));const{date:i,name:u,type:l,content:f}=r;return{date:i,flags:{enabled:e.type===ie.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:u,path:e.path,type:l,initialContent:f,content:l===ie.MODEL?VT(f):f}},DC=xe("files/tryInjectMethod",async({type:e,dataclass:o},{getState:r,dispatch:a})=>{const{root:{tabs:i},settings:{server:{qodly:u}}}=r(),l=ks("class",u);let f="",p="",h=null;if(!o)f="DataStore",p=`Classes/DataStore.${l}`;else switch(e){case"dataclass":f=o,p=`Classes/${o}.${l}`;break;case"collection":f=`${o}Selection`,p=`Classes/${o}Selection.${l}`;break;case"entity":f=`${o}Entity`,p=`Classes/${o}Entity.${l}`;break;default:return h}const m=i.find(mn("path",p));if(m)return a(bn(m)),m;try{h=await aE({name:f,date:new Date().toISOString(),path:`class/${f}.${l}`,type:ie.CLASS})}catch{o?await a(U1({type:"dataclass",className:o,collectionName:`${o}Selection`,toCreate:e})):await a(U1({type:"model"}))}return h=await aE({name:f,date:new Date().toISOString(),path:`class/${f}.${l}`,type:ie.CLASS}),h.path=p,a(bn(h)),h}),e4=xe("roles/open",async(e,{dispatch:o,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path===Wr);if(i)return o(bn(i)),i;o(fd())}),{debugger:Ns={meta:{state:$a.DETACHED},list:[],sessions:[],expressions:[]}}=Xs();var dE,pE;const t4={meta:{...Ns.meta,state:((dE=Ns.meta)==null?void 0:dE.state)===$a.ATTACHED?(pE=Ns.meta)==null?void 0:pE.state:$a.DETACHED},list:Ns.list||[],sessions:Ns.sessions||[],expressions:Ns.expressions||[]};function iE(e,o){const{line:r,offset:a,type:i="saved"}=o;e.breakpoints[i].locations.push({line:r}),Ft.isNumber(a)&&(e.breakpoints[i].offset=a)}function sE(e,o,r,a){e.breakpoints[r].locations=o,Ft.isNumber(a)&&(e.breakpoints[r].offset=a)}function uE({filePath:e,fileType:o,methodName:r,className:a,ext:i,source:u}){return{filePath:e,fileType:o,methodName:r,className:a,ext:i,source:u,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function cE(e,o,r){let a=!1;const i=e.map(u=>u[r]!==o[r]?u:(a=!0,{...u,...o}));return a?i:[...i,o]}function Tf(e){return e.map(({label:o})=>({label:o}))}const MC=Hn({name:"debugger",initialState:t4,reducers:{addBreakpointDecoration(e,o){const{filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f,breakpoint:p}=o.payload,h=Cs(e.list,r,i,u);if(h)iE(h,p);else{if(a===ie.CLASS&&p.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${u} class.`);const m=uE({filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f});iE(m,p),e.list.push(m)}},removeBreakpointDecoration(e,o){const{filePath:r,methodName:a,line:i,offset:u=0,type:l="saved"}=o.payload;if(r.startsWith("Classes/")){const f=e.list.filter(p=>p.filePath===r);if(f.length>0){const p=i+u;f.forEach(h=>{const m=h.breakpoints[l].offset||0;h.breakpoints[l].locations=h.breakpoints[l].locations.filter(b=>b.line+m!==p),l==="saved"&&(h.breakpoints.draft.locations=h.breakpoints.draft.locations.filter(b=>b.line+m!==p))})}}else{const f=Cs(e.list,r,a);f&&(f.breakpoints[l].locations=f.breakpoints[l].locations.filter(p=>p.line!==i),l==="saved"&&(f.breakpoints.draft.locations=f.breakpoints.draft.locations.filter(p=>p.line!==i)))}},setBreakpointsDecoration(e,o){const{filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f,breakpoints:p,offset:h,type:m="saved",clearDraft:b}=o.payload,S=Cs(e.list,r,i);if(S)sE(S,p,m,h),b&&m!=="draft"&&(S.breakpoints.draft.locations=[]);else{const x=uE({filePath:r,fileType:a,methodName:i,className:u,ext:l,source:f});sE(x,p,m,h),e.list.push(x)}},clearBreakpoints(e,o){const{filePath:r,type:a="saved"}=o.payload;e.list=e.list.map(i=>({...i,breakpoints:i.filePath===r?{draft:!a||a==="draft"?{locations:[],offset:0}:i.breakpoints.draft,saved:!a||a==="saved"?{locations:[],offset:0}:i.breakpoints.saved}:i.breakpoints}))},setActiveLine(e,o){const{threadId:r,line:a,highlight:i}=o.payload,u=lr(e.sessions,r);u&&(u.activeLine=a,i&&(u.highlightedLines={start:a,end:a}))},addExpression(e,o){const{threadId:r,label:a,save:i}=o.payload,u=lr(e.sessions,r);u&&u.stopped&&(u.expressions=[...u.expressions||[],{label:a}],i&&(e.expressions=Tf(u.expressions)))},removeExpression(e,o){const{threadId:r,index:a,save:i}=o.payload,u=lr(e.sessions,r);u&&(u.expressions=u.expressions.filter((l,f)=>f!==a),i&&(e.expressions=Tf(u.expressions)))},removeAllExpressions(e,o){const{threadId:r,save:a}=o.payload,i=lr(e.sessions,r);i&&(i.expressions=[],a&&(e.expressions=[]))},renameExpression(e,o){const{threadId:r,index:a,replacement:i,save:u}=o.payload,l=lr(e.sessions,r);l&&l.expressions[a]&&(l.expressions[a].label=i,u&&(e.expressions=Tf(l.expressions)))},setExpression(e,o){const{threadId:r,expression:a}=o.payload,i=lr(e.sessions,r);if(i){const u=a.index>=0?a.index:i.expressions.length>0?i.expressions.length-1:0,l=i.expressions[u];l?(l.result=a.result,l.nakedResult=a.nakedResult,l.variablesReference=a.variablesReference||0,l.presentationHint=a.presentationHint):i.expressions.push(a)}},updateExpressionAt(e,o){const{threadId:r,index:a,value:i}=o.payload,u=lr(e.sessions,r);if(u){const l=u.expressions[a];l&&(l.result=`"${i}"`,l.nakedResult=i)}},saveExpressions(e,o){const{expressions:r}=o.payload;e.expressions=Tf(r)},addSession(e,o){const{threadId:r,channelId:a,stackFrames:i,exceptions:u=[]}=o.payload,l=lr(e.sessions,r),f=i[0],{expressions:p=[]}=e;if(l)l.expressions=p;else{const h=T_(r);e.sessions.push({tabPath:h,threadId:r,channelId:a,stackFrames:i,currentStackFrame:f,exceptions:u,expressions:p,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,o){const{threadId:r,changes:a}=o.payload;e.sessions=e.sessions.map(i=>i.threadId===r?{...i,...a}:i)},removeSession(e,o){const{threadId:r}=o.payload;e.sessions=e.sessions.filter(a=>a.threadId!==r)},removeSessionByIndex(e,o){const r=o.payload;e.sessions.splice(r,1)},setSessions(e,o){const r=o.payload;e.sessions=r},setCallChainVariables(e,o){const{threadId:r,frameId:a,variables:i}=o.payload;e.sessions=e.sessions.map(u=>{var l;return u.threadId===r?{...u,variables:{...u.variables,callchain:cE((l=u.variables)==null?void 0:l.callchain,{frameId:a,items:i},"frameId")}}:u})},setExpressionVariables(e,o){const{threadId:r,variablesReference:a,variables:i}=o.payload;e.sessions=e.sessions.map(u=>{var l;return u.threadId===r?{...u,variables:{...u.variables,expressions:cE((l=u.variables)==null?void 0:l.expressions,{variablesReference:a,items:i},"variablesReference")}}:u})},setSourceContent(e,o){const{threadId:r,content:a}=o.payload,i=lr(e.sessions,r);i&&(i.currentStackFrame.source={...i.currentStackFrame.source,content:a})},setDebuggerMeta(e,o){if(o.payload.state===$a.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:r,error:a={code:null,reason:"",type:td.SOCKET_ERROR}}=o.payload;if((r||e.meta.state!==$a.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===td.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===$a.DETACHED)return}e.meta.state=o.payload.state}},extraReducers:e=>{e.addCase($C.fulfilled,o=>{o.sessions=[]})}}),{addBreakpointDecoration:r4,removeBreakpointDecoration:n4,setBreakpointsDecoration:o4,clearBreakpoints:a4,setActiveLine:i4,addExpression:s4,renameExpression:u4,removeExpression:c4,removeAllExpressions:l4,setExpression:f4,updateExpressionAt:d4,saveExpressions:p4,addSession:h4,updateSession:v4,removeSession:g4,removeSessionByIndex:m4,setSessions:NC,setCallChainVariables:y4,setExpressionVariables:b4,setSourceContent:_4,setDebuggerMeta:w4}=MC.actions,$C=xe("files/wipeDebuggerSessions",async(e,{getState:o,dispatch:r})=>{const{sessions:a}=o().debugger;for(const{threadId:i}of a){const u=T_(i);r(G_(u))}}),kC=xe("files/removeDebuggerSessionsNotIn",async(e,{getState:o,dispatch:r})=>{const{threadIds:a}=e,{sessions:i}=o().debugger,u=[],l=i.filter(f=>{const p=a.includes(f.threadId);return p||u.push(f.threadId),p});return r(NC(l)),{staleThreadIds:u}});var V_=(e=>(e.UUID="uuid",e.STRING="string",e.TEXT="text",e.DATE="date",e.TIME="duration",e.BOOLEAN="bool",e.BYTE="byte",e.INTEGER="word",e.LONG="long",e.LONG64="long64",e.FLOAT="number",e.BLOB="blob",e.IMAGE="image",e.OBJECT="object",e))(V_||{}),Ia=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Ia||{});const S4=e=>["string","uuid","number","long"].includes(e.type),E4=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],T4=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],x4=[{title:"String",kind:"storage",value:"string",calculatedType:"string",calculatedKind:"storage"},{title:"Text",kind:"storage",value:"text",calculatedType:"text",calculatedKind:"storage"},{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Date",kind:"storage",value:"date",calculatedType:"date",calculatedKind:"storage"},{title:"Duration",kind:"storage",value:"duration",calculatedType:"duration",calculatedKind:"storage"},{title:"Bool",kind:"storage",value:"bool",calculatedType:"bool",calculatedKind:"storage"},{title:"Byte",kind:"storage",value:"byte",calculatedType:"byte",calculatedKind:"storage"},{title:"Word",kind:"storage",value:"word",calculatedType:"word",calculatedKind:"storage"},{title:"Number",kind:"storage",value:"number",calculatedType:"number",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"},{title:"Object",kind:"storage",value:"object",calculatedType:"object",calculatedKind:"storage"},{title:"Image",kind:"storage",value:"image",calculatedType:"image",calculatedKind:"storage"},{title:"Blob",kind:"storage",value:"blob",calculatedType:"blob",calculatedKind:"storage"}],C4=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],O4=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],R4=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],LC=yn("model/add-dataclass"),jC=yn("model/rename-dataclass"),FC=yn("model/remove-dataclass"),WC=yn("model/add-attribute"),A4=yn("model/edit-attribute-property"),BC=yn("model/remove-attribute"),UC=yn("model/rename-attribute"),zC=yn("model/edit-primary-key"),P4=yn("model/edit-dataclass-property"),HC=yn("model/rename-collection"),I4=(e,o)=>({toJSON:!0,extraProperties:o,dataClasses:e.map(r=>{var a;return{...r.data,extraProperties:{position:{x:r.position.x,y:r.position.y},panelColor:(a=r.data.extraProperties)==null?void 0:a.panelColor}}})});function Lf(e,o,r){const a=e;let i=0;for(;r[`${a}${i||""}`];)i++;return`${a}${i||""}`}const Fl=e=>e.kind===Ia.RELATEDENTITY,dd=e=>e.kind===Ia.RELATEDENTITIES,D4=e=>dd(e)||Fl(e),Y_=xe("models/fetch",async()=>{try{return(await dr(Jr,{method:"POST",body:JSON.stringify({verb:Xt.GET_INFO,path:y_,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),pd=xe("models/save",async(e,{getState:o,rejectWithValue:r})=>{const{tabs:a}=o().root,i=a.find(u=>u.path===y_);if(!i)return r("Error while saving the model");try{const u=await dr(Jr,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return af(),{...u,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return r("Error while saving the model")}}),M4=xe("models/open",async(e,{dispatch:o,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path==="models/main");if(i)return o(bn(i)),i;o(Y_())}),N4=xe("model/rename-dataclass",async(e,{getState:o,dispatch:r})=>{var b,S;const{dataclassId:a,selectionId:i,name:u}=e;let l=o();const f=l.explorer.find(x=>x.path===jt.CLASSES);if(!f)throw new Error("Classes folder was not found!");await r(Ro(f.path)),l=o();const p={class:{found:!1,newNameTaken:!1,file:null,filename_update:u},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${u}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${u}Selection`}};(S=(b=l.explorer.find(x=>x.path===jt.CLASSES))==null?void 0:b.children)==null||S.forEach(x=>{x.name===p.class.filename_update&&(p.class.newNameTaken=!0),x.name===p.entity.filename_update&&(p.entity.newNameTaken=!0),x.name===p.selection.filename_update&&(p.selection.newNameTaken=!0),x.name===a?(p.class.found=!0,p.class.file=x):x.name===`${a}Entity`?(p.entity.found=!0,p.entity.file=x):x.name===i&&(p.selection.found=!0,p.selection.file=x)});const h=Object.entries(p).reduce((x,R)=>{const[C,N]=R;return N.found?N.newNameTaken?[...x,{type:"error",message:`Cannot rename ${C} file to ${N.filename_update} because it already exists. The existing file will be used instead!`}]:x:[...x,{type:"warning",message:`${a} ${C} file was not found`}]},[]);h.length>0&&r(_o({message:"The following errors were encountered during dataclass rename:",views:{tips:h}}));const m=Object.values(p).filter(x=>x.found&&x.file&&!x.newNameTaken);await Promise.all(m.map(async x=>await r(Us({file:x.file,newname:x.filename_update})))),m.length>0&&r(Ro("Classes"))}),Xl={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},$4={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Xl.DATACLASS_DELETE]:!0,[Xl.DATACLASS_DRAGGABLE]:!0}},qC=Hn({name:"Models",initialState:$4,reducers:{setModelFlag(e,o){e.flags={...e.flags,...o.payload}}},extraReducers(e){e.addCase(LC,({draft:{dataClasses:o}},r)=>{var l,f;const{dataclassID:a}=r.payload,i=Lf(a||"DataClass","className",o),u={className:i,collectionName:`${i}Selection`,attributes:[{name:"ID",kind:Ia.STORAGE,type:V_.LONG,scope:"public",indexKind:"auto",unique:!0,primKey:!0,autosequence:!0}],name:i,scope:"public",extraProperties:{position:{x:((l=r.payload.position)==null?void 0:l.x)||0,y:((f=r.payload.position)==null?void 0:f.y)||0}}};o[u.name]=u}).addCase(FC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a}=r.payload;o[a]&&(delete o[a],Object.values(o).forEach(u=>{u.attributes=u.attributes.filter(l=>l.type!==a&&l.type!==u.collectionName)}))}).addCase(jC,({draft:{dataClasses:o,collections:r}},a)=>{const{dataclassID:i,newName:u}=a.payload;if(!o[i]||o[u])return;const l=o[i].collectionName,f=Lf(`${u}Selection`,"collectionName",r);Object.values(o).forEach(p=>{p.className===i&&(p.className=u,p.name=u,p.collectionName=f),p.attributes.forEach(h=>{h.type===i?(h.type=u,h.path=u):h.type===l&&(h.type=f)})})}).addCase(WC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeName:i,attributeType:u,attributeKind:l,target:f}=r.payload;if(!o[a]||m2("name",i,o[a].attributes))return;const h={name:i,kind:l,type:u,exposed:!0,scope:"public"};if(l===Ia.RELATEDENTITY){if(!o[u])return;h.path=u;const b={name:Lf(o[u].collectionName,"name",o[u].attributes),type:o[a].collectionName,kind:Ia.RELATEDENTITIES,reversePath:!0,path:i,scope:"public",exposed:!0};o[u].attributes.push(b)}else if(l===Ia.RELATEDENTITIES){const m=o[u];if(!m)return;const b=m.attributes.find(mn("name",f));if(b){if(!Fl(b)||b.type!==o[a].className)return}else{h.path=f,h.reversePath=!0,h.type=u;const S={name:f,kind:Ia.RELATEDENTITY,scope:"public",path:m.className,type:m.className,exposed:!0};m.attributes.push(S)}}o[a].attributes.push(h)}).addCase(UC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeID:i,newName:u}=r.payload,l=o[a].attributes.find(mn("name",i)),f=o[a].attributes.find(mn("name",u));!l||f||Object.values(o).forEach(({collectionName:p,attributes:h,className:m})=>{h.forEach(b=>{Fl(l)&&dd(b)&&b.type===p&&b.path===i&&(b.path=u),m===a&&b.name===i&&(b.name=u)})})}).addCase(BC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,attributeID:i}=r.payload;if(!o[a])return;const u=o[a].attributes.find(mn("name",i));u&&(Fl(u)&&Object.values(o).forEach(l=>{l.attributes=l.attributes.filter(f=>!(dd(f)&&f.type===l.collectionName&&f.path===u.name))}),o[a].attributes=o[a].attributes.filter(h2("name",i)))}).addCase(HC,({draft:{dataClasses:o,collections:r}},a)=>{const{dataclassID:i,collectionName:u}=a.payload;if(!o[i])return;const l=o[i].collectionName;r[u]||(o[i].collectionName=u,r[u]=o[i],delete r[l],Object.values(o).forEach(f=>f.attributes.forEach(p=>{p.type===l&&(p.type=u)})))}).addCase(zC,({draft:{dataClasses:o}},r)=>{const{dataclassID:a,newPrimKey:i}=r.payload;o[a]&&o[a].attributes.forEach(u=>{u.name===i?u.primKey=!0:u.primKey=!1})}),e.addCase(Y_.fulfilled,(o,r)=>{var l;const a={},i={},u=r.payload.extraProperties||{};(l=r.payload.dataClasses)==null||l.forEach(f=>{a[f.name]=f,i[f.collectionName]=f}),o.draft.dataClasses=a,o.draft.collections=i,o.draft.extraProperties=u,o.model.dataClasses=a,o.model.collections=i,o.model.extraProperties=u}),e.addCase(pd.pending,()=>{}).addCase(pd.fulfilled,(o,r)=>{const a={},i={},u=r.payload.content.extraProperties||{};r.payload.content.dataClasses.forEach(l=>{a[l.name]=l,i[l.collectionName]=l}),o.draft.dataClasses=a,o.draft.collections=i,o.draft.extraProperties=u,o.model.dataClasses=a,o.model.collections=i,o.model.extraProperties=u})}}),{setModelFlag:k4}=qC.actions,L4=()=>Io(e=>e.model.draft.dataClasses),j4=()=>Io(e=>e.model.draft.collections),F4=e=>Io(o=>o.model.draft.dataClasses[e]),W4=(e,o)=>Io(r=>r.model.draft.dataClasses[e].attributes.find(mn("name",o))),B4=()=>Io(e=>e.model.draft.extraProperties),U4=()=>{const e=Io(i=>i.model.flags),o=i=>i in e?e[i]:void 0,r=o(Xl.DATACLASS_DELETE),a=o(Xl.DATACLASS_DRAGGABLE);return{deleteDataclass:r,draggableDataclass:a,flags:e}},z4=qC.reducer;function Jb(e,o){const r=e.tabs.find(({path:a})=>a===ti);r&&(r.flags.touched=o)}const GC={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},{webforms:xf}=Xs(),VC={[GC.SIDEBAR_SECTION_RESIZABLE]:!0},YC={...xf,templates:{data:[],selectedGroup:""},datasources:{...S_.webforms.datasources,...xf==null?void 0:xf.datasources},flags:VC},KC=Hn({name:"webforms",initialState:YC,reducers:{toggleInspector:(e,o)=>{const{type:r}=o.payload;e.inspector[r].active=!e.inspector[r].active,e.inspector[r].active||(e.inspector[r].data=void 0)},inspect:(e,o)=>{const{type:r,data:a}=o.payload;e.inspector[r].active&&(e.inspector[r].data=a)},addComponent:(e,o)=>{e.components.push(o.payload)},editComponent:(e,o)=>{const{id:r,changes:a}=o.payload;e.components=e.components.map(i=>i.id===r?{...i,...a}:i)},removeComponent:(e,o)=>{const{payload:r}=o,a=e.components.findIndex(i=>i.id===r);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,o)=>{e.templates.selectedGroup=o.payload.selectedGroup},setTemplatesData:(e,o)=>{e.templates.data=o.payload},setTemplateData:(e,o)=>{const{group:r,components:a}=o.payload,i=e.templates.data.find(u=>u.group===r);i&&(i.components=a)},setDatasourcesTheme:(e,o)=>{e.datasources.theme=o.payload},setWebformsFlag(e,o){e.flags={...e.flags,...o.payload}}},extraReducers(e){e.addCase(tO.fulfilled,(o,r)=>{o.components=r.payload})}}),{toggleInspector:H4,inspect:q4,addComponent:XC,editComponent:ZC,removeComponent:JC,setSelectedGroup:G4,setTemplatesData:QC,setTemplateData:eO,setDatasourcesTheme:V4,setWebformsFlag:Y4}=KC.actions,K4=()=>{const e=Io(a=>a.webforms.flags);return{resizeSidebarSection:(a=>a in e?e[a]:void 0)(GC.SIDEBAR_SECTION_RESIZABLE),flags:e}},X4=KC.reducer,K_=Ft.curry((e,o)=>{var i,u;const r={...o.sharedDatasources.sources},a=(u=((i=o.root.tabs.find(mn("path",e)))==null?void 0:i.content).metadata)==null?void 0:u.datasources;return a&&(r[e]=a),Ft.cloneDeep(r)}),Z4=xe("webforms/fetchTemplates",async(e,{dispatch:o,getState:r})=>{const{data:a}=r().webforms.templates;if(!Ft.isEmpty(a))return a;try{const u=await(await fetch(`https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build/build/index.json?t=${Date.now()}`)).json();return o(QC(u)),u}catch{return[]}}),J4=xe("webforms/fetchTemplate",async({name:e},{dispatch:o,getState:r})=>{const{data:a}=r().webforms.templates,i=a.find(u=>u.group===e);if(i&&!Ft.isEmpty(i.components))return i.components;try{const l=await(await fetch(`${i==null?void 0:i.link}?t=${Date.now()}`)).json();return o(eO({group:e,components:l})),l}catch{return[]}}),tO=xe("webforms/fetchCraftedComponents",async(e,{rejectWithValue:o})=>{try{return(await ei({path:"WebForms/crafted_components.json",verb:Xt.GET_INFO,content:!0,as:"json"})).content}catch{return o("Error while loading the crafted components")}}),Q4=xe("webforms/addCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(XC(e));const{webforms:{components:i}}=a();w_(i)}catch{return r("Error while adding the crafted component")}}),e6=xe("webforms/editCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(ZC(e));const{webforms:{components:i}}=a();w_(i)}catch{return r("Error while editing the crafted component")}}),t6=xe("webforms/removeCraftedComponent",async(e,{dispatch:o,rejectWithValue:r,getState:a})=>{try{o(JC(e));const{webforms:{components:i}}=a();w_(i)}catch{return r("Error while removing the crafted component")}}),X_=xe("datasources/add-datasource",async(e,{getState:o,rejectWithValue:r})=>{var a,i;try{const u=o(),l=e.datasource,f=!!l.namespace,p=[];if(f){const h={...u.sharedDatasources.sources,[l.namespace]:[...u.sharedDatasources.sources[l.namespace],l]};p.push(...h[l.namespace]),await Qa(h)}else(((i=(a=u.root.tabs.find(mn("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]).push(l);return{list:p,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),r("Error while adding the datasource")}}),Z_=xe("datasources/edit-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const{namespace:a,path:i}=e,u=o(),l=!!e.namespace,f=K_(i,u);let p=Ft.defaultTo(f[a||i],[]);return p=p.map(h=>h.id===e.id?{...h,[e.property]:e.value}:h),l&&await Qa({...u.sharedDatasources.sources,[e.namespace]:p}),{list:p,path:e.path,namespace:e.namespace}}catch{r(`Error while editing datasource ${e.id}`)}}),r6=e=>e.type===Hs.fulfilled.type,Hs=xe("datasources/rename-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const a=o(),i=!!e.namespace,u=e.namespace||e.path,l=K_(e.path,a),f=Ft.defaultTo(l[u],[]),p=new RegExp(`^${e.id}\\b`,"");if(f.forEach(h=>{var b;const m=(b_(h)||!NT(h))&&h.from&&p.test(h.from);e.updateRefs&&((b=h.events)==null||b.forEach(S=>{var x,R,C,N,k;switch(S.type){case"method":{const W=S;W.params.forEach(I=>{I.datasource&&Object.assign(I,{datasource:I.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),W.returns&&Object.assign(W.returns,{datasource:(R=(x=W.returns)==null?void 0:x.datasource)==null?void 0:R.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const W=S;W.datasource&&Object.assign(W.datasource,{name:(C=W.datasource.name)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(N=W.datasource.from)==null?void 0:N.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(k=W.datasource.target)==null?void 0:k.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),h.id===e.id?h.id=e.new_name:m&&h.from&&(h.from=h.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const h=Qf({id:e.id,namespace:e.namespace}),m=Qf({id:e.new_name,namespace:e.namespace});AT.next({path:e.path??"",action:g_.RENAME,old_reference:h,new_reference:m,is_shared:i})}return i&&await Qa({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),Wl=xe("datasources/delete-datasource",async(e,{getState:o,rejectWithValue:r})=>{try{const a=o(),i=!!e.namespace,u=e.namespace||e.path,f=K_(e.path,a)[u].filter(v2(e.id));return i&&await Qa({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while removing datasource ${e.id}`)}}),Qb=Xs(),n6={filesLoading:!1,tabs:Qb.tabs||[],activeTab:Qb.activeTab,recent:Qb.recent||[]},J_=Hn({name:"root",initialState:n6,reducers:{setPanelState(e,o){const{path:r,...a}=o.payload;e.tabs.forEach(i=>{i.path===r&&(i.view||(i.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(i.view.panel,a))})},addDataSource(e,o){var u;const{payload:{path:r,datasourceDef:a}}=o,i=e.tabs.find(l=>l.path===r);i&&(i.content.metadata.datasources=i.content.metadata.datasources||[],(u=i.content.metadata.datasources)!=null&&u.find(f=>f.id===a.id)||(i.content.metadata.datasources=[...i.content.metadata.datasources,{...a,events:[]}],i.flags={...i.flags,touched:!0}))},openSettingsTab(e){const o={date:new Date().toISOString(),flags:{},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:ti,type:ie.SETTINGS,initialContent:{},content:{}};let r=e.tabs.find(a=>a.path===o.path);if(r||(e.tabs.push(o),r=e.tabs[e.tabs.length-1]),e.activeTab!==o.path){const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);e.activeTab=o.path,r.weight=((a==null?void 0:a.weight)||0)+1}},removeDataSource(e,o){const{path:r,datasourceID:a}=o.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,touched:!0},content:{...i.content,metadata:{...i.content.metadata,datasources:i.content.metadata.datasources.filter(u=>u.id!==a)}}}:i)},setDataSources(e,o){const{payload:{path:r,datasourceArr:a}}=o;e.tabs=e.tabs.map(i=>{var u;return i.path===r?{...i,flags:{...i.flags,touched:!0},content:{...i.content,metadata:{...(u=i.content)==null?void 0:u.metadata,datasources:a}}}:i})},setTabs(e,o){e.tabs=o.payload},closeTab(e,o){const r=o.payload;e.tabs.splice(r,1);const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);e.activeTab=(a==null?void 0:a.path)||""},closeOthers(e,o){e.tabs=e.tabs.filter(r=>r.path===o.payload),e.activeTab=o.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,o){e.tabs.splice(o.payload+1),e.activeTab=e.tabs[o.payload].path},closeLeftTabs(e,o){e.tabs.splice(0,o.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:r}})=>r);const o=e.tabs.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null);e.activeTab=(o==null?void 0:o.path)||""},selectTab(e,o){const r=e.tabs.find(({path:i})=>i===o.payload);if(!r||e.activeTab===o.payload)return;const a=e.tabs.reduce((i,u)=>(u==null?void 0:u.weight)>((i==null?void 0:i.weight)||0)?u:i,null);r.weight=a?(a.weight||0)+1:1,e.activeTab=o.payload},openTabUnselected(e,o){const r=o.payload;let a=e.tabs.find(({path:u})=>r.path===u);a||(e.tabs.push(r),a=e.tabs[e.tabs.length-1]);const i=e.tabs.reduce((u,l)=>(l==null?void 0:l.weight)>((u==null?void 0:u.weight)||0)?l:u,null);a.weight=i?(i.weight||0)+1:1,a.extra={...a.extra,...r.extra}},selectTabByReference(e,o){const r=o.payload;let a=e.tabs.find(({path:i})=>r.path===i);if(a||(e.tabs.push(r),a=e.tabs[e.tabs.length-1]),e.activeTab!==r.path){const i=e.tabs.reduce((u,l)=>(l==null?void 0:l.weight)>((u==null?void 0:u.weight)||0)?l:u,null);e.activeTab=r.path,a.weight=((i==null?void 0:i.weight)||0)+1}a.extra={...a.extra,...r.extra}},setContent(e,o){const{path:r,content:a,contentPath:i}=o.payload;e.tabs=e.tabs.map(u=>{if(u.path!==r)return u;let l=!1;if(typeof a=="string")l=u.initialContent!==a;else{const f=JSON.stringify(Ft.get(u.initialContent,i||"",u.initialContent)),p=JSON.stringify(Ft.get(a,i||"",a));l=f!==p}return a&&typeof a=="object"&&(i?Ft.set(u.content,i,a):u.content=a),typeof a=="string"&&(u.content=a),{...u,flags:{...u.flags,touched:l}}})},setTabFlags(e,o){const{path:r,flags:a}=o.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,...a}}:i)},setTabsFlags(e,o){const{tabs:r,flags:a}=o.payload;e.tabs=e.tabs.map(i=>r.includes(i.path)?{...i,flags:{...i.flags,...a}}:i)},setTabExtra(e,o){const{path:r,extra:a,flags:i}=o.payload;e.tabs=e.tabs.map(u=>u.path===r?{...u,extra:{...u.extra,...a},flags:i?{...u.flags,...i}:u.flags}:u)},addWebFormStyles(e,o){const{path:r,styles:a=[]}=o.payload,i=e.tabs.find(u=>u.path===r);if(i){const u=i.content.metadata.styles.map(({name:f})=>f),l=a.filter(({name:f})=>!u.includes(f));i.content.metadata.styles=[...i.content.metadata.styles,...l].map(({scope:f,...p})=>({...p}))}},changeTabEditor(e,o){return e.tabs=e.tabs.map(r=>r.path===o.payload.path?o.payload:r),e}},extraReducers:e=>{e.addCase(AC.fulfilled,(o,r)=>{if(!r.payload)return;const{content:a,line:i,path:u}=r.payload,l=o.tabs.find(f=>f.path===u);if(l&&typeof l.content=="string"){const f=l.content.trim().split(`
|
|
234
234
|
`);f.splice(i,0,a),l.content=f.join(`
|
|
235
|
-
`)}}),e.addCase(zs.pending,(o,r)=>{const{tab:a}=r.meta.arg;switch(a.type){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(zs.fulfilled,(o,r)=>{if(!r.payload)return;const a=o.tabs.find(({path:i})=>{var u;return i===((u=r.payload)==null?void 0:u.path)});if(a){switch(a.content=r.payload.content,a.date=r.payload.date,a.initialContent=r.payload.initialContent,a.flags.touched=!1,a.flags.old=!1,a.type){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}r.payload.errors.length>0&&Oo.next({kind:"error",message:r.payload.errors})}}),e.addCase(zs.rejected,(o,r)=>{Oo.next({kind:"danger",message:"Cannot save file"})}),e.addCase(IC.fulfilled,(o,r)=>{const a=[...r.payload.files];o.tabs=o.tabs.map(i=>{if([ie.CLASS,ie.METHOD].includes(i.type)){const u=a.find(l=>l.name===i.name&&l.type===i.type);if(u){const l=new Date(i.date),f=new Date(u.date);if(l.getTime()!==f.getTime())return{...i,flags:{...i.flags,old:!0}}}}return i})}),e.addCase(H1.pending,(o,r)=>{o.tabs=o.tabs.map(a=>a.path===r.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(H1.fulfilled,(o,r)=>{const a=r.payload;if(a){const i=r.meta.arg;o.tabs=o.tabs.map(u=>{if(u.name===i.name&&u.type===i.type){const l=u.extra||{};return i.type===ie.METHOD&&(l.attributes=
|
|
235
|
+
`)}}),e.addCase(zs.pending,(o,r)=>{const{tab:a}=r.meta.arg;switch(a.type){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(zs.fulfilled,(o,r)=>{if(!r.payload)return;const a=o.tabs.find(({path:i})=>{var u;return i===((u=r.payload)==null?void 0:u.path)});if(a){switch(a.content=r.payload.content,a.date=r.payload.date,a.initialContent=r.payload.initialContent,a.flags.touched=!1,a.flags.old=!1,a.type){case ie.CLASS:case ie.METHOD:Va.next({action:Ma.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}r.payload.errors.length>0&&Oo.next({kind:"error",message:r.payload.errors})}}),e.addCase(zs.rejected,(o,r)=>{Oo.next({kind:"danger",message:"Cannot save file"})}),e.addCase(IC.fulfilled,(o,r)=>{const a=[...r.payload.files];o.tabs=o.tabs.map(i=>{if([ie.CLASS,ie.METHOD].includes(i.type)){const u=a.find(l=>l.name===i.name&&l.type===i.type);if(u){const l=new Date(i.date),f=new Date(u.date);if(l.getTime()!==f.getTime())return{...i,flags:{...i.flags,old:!0}}}}return i})}),e.addCase(H1.pending,(o,r)=>{o.tabs=o.tabs.map(a=>a.path===r.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(H1.fulfilled,(o,r)=>{const a=r.payload;if(a){const i=r.meta.arg;o.tabs=o.tabs.map(u=>{if(u.name===i.name&&u.type===i.type){const l=u.extra||{};return i.type===ie.METHOD&&(l.attributes=__(a.content),a.content=kT(a.content,{})),{...u,initialContent:a.content,content:a.content,date:a.date,flags:{},extra:l}}return u})}}),e.addCase(z_.fulfilled,(o,r)=>{if(!r.payload)return;const{line:a,offset:i}=r.meta.arg,u=o.tabs.find(({path:l})=>{var f;return l===((f=r.payload)==null?void 0:f.path)});u&&(u.extra={...u.extra,initialLineInfo:{line:a,offset:i,lastModification:Date.now()}})}),e.addCase(PC.fulfilled,(o,r)=>{if(!r.payload)return;const{selection:a}=r.meta.arg,i=o.tabs.find(({path:u})=>{var l;return u===((l=r.payload)==null?void 0:l.path)});i&&(i.extra={...i.extra,initialSelectionInfo:{selection:a,lastModification:Date.now()}})}),e.addCase(Us.fulfilled,(o,r)=>{r.payload.new!==r.payload.old&&(o.tabs=[...o.tabs].map(a=>a.path===r.payload.old.path?{...a,path:r.payload.new.path,name:r.payload.new.name}:a),o.activeTab===r.payload.old.path&&(o.activeTab=r.payload.new.path))}),e.addCase(z1.pending,(o,r)=>{const a=r.meta.arg,i=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":Va.next({action:Ma.WILL_DELETE,payload:{filePath:i}});break}}),e.addCase(z1.fulfilled,(o,r)=>{const{deleted:a,node:i}=r.payload;if(!a)return;const u=`${i.path}${i.ext?`.${i.ext}`:""}`;switch(i.ext){case"4dm":case"4qs":Va.next({action:Ma.DID_DELETE,payload:{filePath:u}});break}if(o.tabs=o.tabs.filter(l=>l.path!==u),o.recent=o.recent.filter(({path:l})=>u!==l),o.tabs.length){o.activeTab=o.tabs[o.tabs.length-1].path;return}o.activeTab=""}),e.addCase(jl.fulfilled,(o,r)=>{const{draggedNode:a,newLocation:i}=r.meta.arg;if(o.tabs.find(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`))return o.tabs=o.tabs.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),o.recent=o.recent.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),o.activeTab=`${i.path}/${a.name}.${a.ext}`,o}),e.addCase(pd.fulfilled,(o,r)=>{const a=o.tabs.find(i=>i.path===r.payload.path);a&&(a.flags.touched=!1,a.date=r.payload.date,a.content=r.payload.content,a.initialContent=r.payload.content)}),e.addCase(DC.fulfilled,(o,r)=>{var u;if(!((u=r.payload)!=null&&u.path))return;const a=o.tabs.find(mn("path",r.payload.path));if(!a)return;a.content=a.content+`
|
|
236
236
|
|
|
237
237
|
exposed Function ${r.meta.arg.name}()
|
|
238
238
|
`,a.flags={...a.flags,touched:!0};const i=a.content.split(`
|
|
239
|
-
`);a.extra={...a.extra,editor:L2.Code,initialLineInfo:{line:i.length-2,lastModification:Date.now()}}}),e.addCase(
|
|
239
|
+
`);a.extra={...a.extra,editor:L2.Code,initialLineInfo:{line:i.length-2,lastModification:Date.now()}}}),e.addCase(H_.fulfilled,(o,r)=>{var u,l;if(!((u=r.payload)!=null&&u.path)||(l=r.payload)!=null&&l.namespace)return;const a=r.payload.path,i=o.tabs.find(mn("path",a));!i||!i.content||!i.content.metadata||(Object.assign(i.content.metadata,{datasources:r.payload.datasources}),i.flags.touched=!0)}),e.addCase(q_.fulfilled,(o,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace||o.tabs.forEach(u=>{u.path===i.path&&Object.assign(u.content,{metadata:{...u.content.metadata,datasources:a}})})}),e.addCase(kC.fulfilled,(o,r)=>{const{staleThreadIds:a}=r.payload;if(a.length===0)return;const i=a.map(u=>`Debugger/${u}`);if(o.tabs=o.tabs.filter(u=>!i.includes(u.path)),o.recent=o.recent.filter(({path:u})=>!i.includes(u)),o.tabs.length){o.activeTab=o.tabs[o.tabs.length-1].path;return}o.activeTab=""}),e.addCase(U_.pending,o=>Jb(o,!1)),e.addMatcher(vo(SC),(o,r)=>{["project"].includes(r.payload.path)&&Jb(o,!0)}),e.addMatcher(vo(qd),(o,r)=>{Jb(o,!1)}),e.addMatcher(vo(uO,bn),(o,r)=>{const{payload:a}=r;let i;typeof a=="string"?i=o.tabs.find(({path:u})=>a===u):i=a,i&&(o.recent=[i,...o.recent.filter(({path:u})=>![i.path,"settings"].includes(u))])}),e.addMatcher(vo(bC,yC),(o,r)=>{o.tabs=o.tabs.map(a=>a.path===Wr?{...a,flags:{...a.flags,touched:!0}}:a)}),e.addMatcher(vo(B_),(o,r)=>{o.tabs=o.tabs.map(a=>a.path===Wr?{...a,flags:{...a.flags,touched:!1}}:a)}),e.addMatcher(vo(X_.fulfilled,Z_.fulfilled,Wl.fulfilled,Hs.fulfilled),(o,r)=>{var i,u,l;const a=o.tabs.find(mn("path",((i=r.payload)==null?void 0:i.path)||r.meta.arg.path));!a||(u=r.payload)!=null&&u.namespace||(a.flags.touched=!0,Object.assign(a.content,{metadata:{...a.content.metadata,datasources:(l=r.payload)==null?void 0:l.list}}))}),e.addMatcher(vo(Wl.fulfilled,Hs.fulfilled),(o,r)=>{var f;const a=o.tabs.find(mn("path",((f=r.payload)==null?void 0:f.path)||r.meta.arg.path));if(!a)return;const{panel:i}=a.view,u=Qf({id:r.meta.arg.id,namespace:r.meta.arg.namespace});if(i.type==="datasource"&&i.current===u)switch(r.type){case Wl.fulfilled.type:Object.assign(a.view.panel,{type:"component",id:Q$});break;case Hs.fulfilled.type:const p=Qf({id:r.meta.arg.new_name,namespace:r.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",id:p});break}})}}),{setTabs:o6,closeTab:rO,setContent:nO,setTabFlags:Q_,setTabsFlags:a6,setTabExtra:i6,closeAllTabs:oO,addDataSource:s6,closeRightTabs:aO,closeOthers:iO,closeLeftTabs:sO,closeSavedTabs:u6,setDataSources:c6,removeDataSource:l6,selectTab:uO,selectTabByReference:bn,openTabUnselected:cO,addWebFormStyles:f6,changeTabEditor:d6,openSettingsTab:p6,setPanelState:h6}=J_.actions,lO=J_.reducer,v6=MC.reducer,g6=Hn({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(Ws.pending,o=>({state:"loading"})).addCase(Ws.fulfilled,(o,{payload:r})=>({state:"loaded",model:r})).addCase(Ws.rejected,(o,r)=>({state:"error",error:r.payload||"Error while loading the catalog"}))}}),m6=g6.reducer,y6=cC.reducer,jf=xe("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:o})=>{try{return await D2()}catch{return o("Error while loading the shared datasources")}}),fO=xe("shared_datasources/addSharedSource",async(e,{rejectWithValue:o,getState:r})=>{try{const a=JSON.parse(JSON.stringify(r().sharedDatasources));if(e.namespace)a.sources[e.namespace]?a.sources[e.namespace].push(e):a.sources[e.namespace]=[e];else return o("Namespace is required");return await Qa(a.sources),a.sources}catch{return o("Error while saving the shared datasources")}}),dO=xe("shared_datasources/editSharedSource",async(e,{rejectWithValue:o,getState:r})=>{try{const a=r().sharedDatasources;if(!e.namespace)return o("Namespace is required");if(a.sources[e.namespace])a.sources[e.namespace]=a.sources[e.namespace].map(i=>i.id===e.id?{...e,id:i.id}:i);else return o("Namespace not found");return await Qa(a.sources),a.sources}catch{return o("Error while saving the shared datasources")}}),pO=xe("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:o,getState:r})=>{try{const a={...r().sharedDatasources};if(a.sources[e.namespace]){const i=a.sources[e.namespace].filter(u=>u.id!==e.id);if(i.length===0){const{[e.namespace]:u,...l}=a.sources;a.sources=l}else a.sources={...a.sources,[e.namespace]:i}}return await Qa(a.sources),a.sources}catch{return o("Error while saving the shared datasources")}}),ew=xe("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:o,getState:r})=>{try{const a={...r().sharedDatasources};for(const i of e){if(!i.namespace)return o("Namespace is required");if(a.sources[i.namespace])a.sources[i.namespace]=a.sources[i.namespace].map(u=>u.id===i.id?i:u);else return o("Namespace not found")}return await Qa(a.sources),a.sources}catch{return o("Error while saving the shared datasources")}}),b6=xe("shared_datasources/setDatasourceEvents",async({tabPath:e,name:o,namespace:r,events:a},{getState:i,dispatch:u})=>{var x,R,C;const{root:{tabs:l},sharedDatasources:f}=i(),p=((C=(R=(x=l.find(({path:N})=>N===e))==null?void 0:x.content)==null?void 0:R.metadata)==null?void 0:C.datasources)||[],h={local:!1,shared:!1},m=(N,k)=>N.id===o&&(!r&&!N.namespace||N.namespace===r)?(k==null||k(),{...N,events:a}):N,b=p.map(N=>m(N,()=>{h.local=!0})),S=Ft.flatten(Ft.values(f.sources)).map(N=>m(N,()=>{h.shared=!0}));h.local&&u(nO({path:e,content:b,contentPath:"metadata.datasources"})),h.shared&&u(ew(S))}),hO=Hn({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,o){e.sources[o.payload.name]=[]}},extraReducers(e){e.addCase(jf.pending,o=>({state:"loading",sources:{}})).addCase(jf.fulfilled,(o,r)=>({state:"loaded",sources:r.payload})).addCase(jf.rejected,(o,r)=>({state:"error",sources:{},error:r.payload||"Error while loading the shared datasources"})).addCase(ew.fulfilled,(o,r)=>({state:"loaded",sources:r.payload})).addCase(q_.fulfilled,(o,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace&&Object.assign(o.sources,{[i.namespace]:a})}).addCase(fO.fulfilled,(o,r)=>({...o,sources:r.payload})).addCase(pO.fulfilled,(o,r)=>({...o,sources:r.payload})).addCase(dO.fulfilled,(o,r)=>({...o,sources:r.payload})).addCase(H_.fulfilled,(o,r)=>{if(!r.payload)return o;const{datasources:a,namespace:i}=r.payload;i&&o.sources[i]&&Object.assign(o.sources[i],{[i]:a})}).addMatcher(vo(X_.fulfilled,Wl.fulfilled,Z_.fulfilled,Hs.fulfilled),(o,r)=>{if(!r.payload)return;const{namespace:a,list:i}=r.payload;a&&Object.assign(o.sources,{[a]:i})})}}),{addEmptyNamespace:_6}=hO.actions,w6=hO.reducer,S6=EC.reducer,Ff=xe("shared_css/fetchSharedCSS",async(e,{rejectWithValue:o})=>{try{const{classes:r}=await M2();return r}catch{return o("Error while loading the shared CSS")}}),E6=Xs().sharedCSS||{state:"loading",styles:[]},T6=MT();async function x6(e){const o={verb:Xt.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:r,...a})=>({...a}))}};await T6(()=>dr(Jr,{method:"POST",body:JSON.stringify(o),headers:new Headers({"Content-Type":"application/json"})}))}const vO=Hn({name:"shared-css",initialState:E6,reducers:{updateSharedCss:(e,o)=>(e.styles=o.payload.classes,x6(o.payload.classes),e),initSharedCss:(e,o)=>(e.styles=o.payload.classes,e)},extraReducers(e){e.addCase(Ff.pending,o=>({...o,state:"loading"})).addCase(Ff.fulfilled,(o,{payload:r})=>({state:"loaded",styles:r})).addCase(Ff.rejected,(o,r)=>({...o,state:"error",error:r.payload||"Error while loading the shared css"}))}}),{updateSharedCss:C6,initSharedCss:O6}=vO.actions,R6=vO.reducer,A6={},P6=Hn({name:"tabs",initialState:A6,reducers:{}}),I6=e=>le(ru,o=>{var r,a;return(a=(r=o.find(i=>i.path===e))==null?void 0:r.view)==null?void 0:a.panel});P6.reducer;const gO=bE({root:lO,explorer:S6,debugger:v6,settings:Ij,catalog:m6,roles:Oj,sharedDatasources:w6,webforms:X4,modals:y6,sharedCSS:R6,model:z4}),Os=dR({reducer:gO});Os.subscribe(xA(()=>{const{root:{activeTab:e,tabs:o,recent:r},roles:a,debugger:i,webforms:u,sharedCSS:l,settings:{session:f}}=Os.getState();qT({...f}),HT({tabs:o,activeTab:e,recent:r,roles:a,debugger:i,webforms:u,sharedCSS:l})},1e3));var q1={exports:{}},$s={};/** @license React v17.0.2
|
|
240
240
|
* react-jsx-runtime.production.min.js
|
|
241
241
|
*
|
|
242
242
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the MIT license found in the
|
|
245
245
|
* LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/var lE;function D6(){if(lE)return $s;lE=1,
|
|
246
|
+
*/var lE;function D6(){if(lE)return $s;lE=1,x_();var e=ze,o=60103;if($s.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;o=r("react.element"),$s.Fragment=r("react.fragment")}var a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(f,p,h){var m,b={},S=null,x=null;h!==void 0&&(S=""+h),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(x=p.ref);for(m in p)i.call(p,m)&&!u.hasOwnProperty(m)&&(b[m]=p[m]);if(f&&f.defaultProps)for(m in p=f.defaultProps,p)b[m]===void 0&&(b[m]=p[m]);return{$$typeof:o,type:f,key:S,ref:x,props:b,_owner:a.current}}return $s.jsx=l,$s.jsxs=l,$s}var e1={};/** @license React v17.0.2
|
|
247
247
|
* react-jsx-runtime.development.js
|
|
248
248
|
*
|
|
249
249
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
250
250
|
*
|
|
251
251
|
* This source code is licensed under the MIT license found in the
|
|
252
252
|
* LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/var fE;function M6(){return fE||(fE=1,function(e){process.env.NODE_ENV!=="production"&&function(){var o=ze,r=
|
|
253
|
+
*/var fE;function M6(){return fE||(fE=1,function(e){process.env.NODE_ENV!=="production"&&function(){var o=ze,r=x_(),a=60103,i=60106;e.Fragment=60107;var u=60108,l=60114,f=60109,p=60110,h=60112,m=60113,b=60120,S=60115,x=60116,R=60121,C=60122,N=60117,k=60129,W=60131;if(typeof Symbol=="function"&&Symbol.for){var I=Symbol.for;a=I("react.element"),i=I("react.portal"),e.Fragment=I("react.fragment"),u=I("react.strict_mode"),l=I("react.profiler"),f=I("react.provider"),p=I("react.context"),h=I("react.forward_ref"),m=I("react.suspense"),b=I("react.suspense_list"),S=I("react.memo"),x=I("react.lazy"),R=I("react.block"),C=I("react.server.block"),N=I("react.fundamental"),I("react.scope"),I("react.opaque.id"),k=I("react.debug_trace_mode"),I("react.offscreen"),W=I("react.legacy_hidden")}var $=typeof Symbol=="function"&&Symbol.iterator,O="@@iterator";function Y(_){if(_===null||typeof _!="object")return null;var B=$&&_[$]||_[O];return typeof B=="function"?B:null}var U=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function G(_){{for(var B=arguments.length,q=new Array(B>1?B-1:0),te=1;te<B;te++)q[te-1]=arguments[te];Se("error",_,q)}}function Se(_,B,q){{var te=U.ReactDebugCurrentFrame,Re=te.getStackAddendum();Re!==""&&(B+="%s",q=q.concat([Re]));var Ae=q.map(function(Te){return""+Te});Ae.unshift("Warning: "+B),Function.prototype.apply.call(console[_],console,Ae)}}var Ge=!1;function Ue(_){return!!(typeof _=="string"||typeof _=="function"||_===e.Fragment||_===l||_===k||_===u||_===m||_===b||_===W||Ge||typeof _=="object"&&_!==null&&(_.$$typeof===x||_.$$typeof===S||_.$$typeof===f||_.$$typeof===p||_.$$typeof===h||_.$$typeof===N||_.$$typeof===R||_[0]===C))}function Pt(_,B,q){var te=B.displayName||B.name||"";return _.displayName||(te!==""?q+"("+te+")":q)}function me(_){return _.displayName||"Context"}function Me(_){if(_==null)return null;if(typeof _.tag=="number"&&G("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case e.Fragment:return"Fragment";case i:return"Portal";case l:return"Profiler";case u:return"StrictMode";case m:return"Suspense";case b:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case p:var B=_;return me(B)+".Consumer";case f:var q=_;return me(q._context)+".Provider";case h:return Pt(_,_.render,"ForwardRef");case S:return Me(_.type);case R:return Me(_._render);case x:{var te=_,Re=te._payload,Ae=te._init;try{return Me(Ae(Re))}catch{return null}}}return null}var ut=0,Je,je,Qe,ar,F,z,fe;function se(){}se.__reactDisabledLog=!0;function re(){{if(ut===0){Je=console.log,je=console.info,Qe=console.warn,ar=console.error,F=console.group,z=console.groupCollapsed,fe=console.groupEnd;var _={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}ut++}}function ue(){{if(ut--,ut===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:r({},_,{value:Je}),info:r({},_,{value:je}),warn:r({},_,{value:Qe}),error:r({},_,{value:ar}),group:r({},_,{value:F}),groupCollapsed:r({},_,{value:z}),groupEnd:r({},_,{value:fe})})}ut<0&&G("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ee=U.ReactCurrentDispatcher,oe;function ne(_,B,q){{if(oe===void 0)try{throw Error()}catch(Re){var te=Re.stack.trim().match(/\n( *(at )?)/);oe=te&&te[1]||""}return`
|
|
254
254
|
`+oe+_}}var de=!1,pe;{var Q=typeof WeakMap=="function"?WeakMap:Map;pe=new Q}function L(_,B){if(!_||de)return"";{var q=pe.get(_);if(q!==void 0)return q}var te;de=!0;var Re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ae;Ae=ee.current,ee.current=null,re();try{if(B){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(Qt){te=Qt}Reflect.construct(_,[],Te)}else{try{Te.call()}catch(Qt){te=Qt}_.call(Te.prototype)}}else{try{throw Error()}catch(Qt){te=Qt}_()}}catch(Qt){if(Qt&&te&&typeof Qt.stack=="string"){for(var be=Qt.stack.split(`
|
|
255
255
|
`),rt=te.stack.split(`
|
|
256
256
|
`),ke=be.length-1,We=rt.length-1;ke>=1&&We>=0&&be[ke]!==rt[We];)We--;for(;ke>=1&&We>=0;ke--,We--)if(be[ke]!==rt[We]){if(ke!==1||We!==1)do if(ke--,We--,We<0||be[ke]!==rt[We]){var Bt=`
|
|
@@ -260,5 +260,5 @@ Check the render method of \``+_+"`."}return""}}function oi(_){{if(_!==void 0){v
|
|
|
260
260
|
|
|
261
261
|
Check your code at `+B+":"+q+"."}return""}}var $o={};function ko(_){{var B=No();if(!B){var q=typeof _=="string"?_:_.displayName||_.name;q&&(B=`
|
|
262
262
|
|
|
263
|
-
Check the top-level render call using <`+q+">.")}return B}}function Kn(_,B){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var q=ko(B);if($o[q])return;$o[q]=!0;var te="";_&&_._owner&&_._owner!==nn.current&&(te=" It was passed a child from "+Me(_._owner.type)+"."),ir(_),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,te),ir(null)}}function Lo(_,B){{if(typeof _!="object")return;if(Array.isArray(_))for(var q=0;q<_.length;q++){var te=_[q];an(te)&&Kn(te,B)}else if(an(_))_._store&&(_._store.validated=!0);else if(_){var Re=Y(_);if(typeof Re=="function"&&Re!==_.entries)for(var Ae=Re.call(_),Te;!(Te=Ae.next()).done;)an(Te.value)&&Kn(Te.value,B)}}}function ai(_){{var B=_.type;if(B==null||typeof B=="string")return;var q;if(typeof B=="function")q=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===h||B.$$typeof===S))q=B.propTypes;else return;if(q){var te=Me(B);ri(q,_.props,"prop",te,_)}else if(B.PropTypes!==void 0&&!on){on=!0;var Re=Me(B);G("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Re||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&G("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ii(_){{for(var B=Object.keys(_.props),q=0;q<B.length;q++){var te=B[q];if(te!=="children"&&te!=="key"){ir(_),G("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),ir(null);break}}_.ref!==null&&(ir(_),G("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function jo(_,B,q,te,Re,Ae){{var Te=Ue(_);if(!Te){var be="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=oi(Re);rt?be+=rt:be+=No();var ke;_===null?ke="null":Array.isArray(_)?ke="array":_!==void 0&&_.$$typeof===a?(ke="<"+(Me(_.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof _,G("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,be)}var We=Yn(_,B,q,Re,Ae);if(We==null)return We;if(Te){var Bt=B.children;if(Bt!==void 0)if(te)if(Array.isArray(Bt)){for(var Cr=0;Cr<Bt.length;Cr++)Lo(Bt[Cr],_);Object.freeze&&Object.freeze(Bt)}else G("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Lo(Bt,_)}return _===e.Fragment?ii(We):ai(We),We}}function Fo(_,B,q){return jo(_,B,q,!0)}function si(_,B,q){return jo(_,B,q,!1)}var ui=si,ci=Fo;e.jsx=ui,e.jsxs=ci}()}(e1)),e1}process.env.NODE_ENV==="production"?q1.exports=D6():q1.exports=M6();var N6=q1.exports;const $6=({children:e,store:o})=>N6.jsx(ax,{store:o,children:e});exports.DEFAULT_CACHE=w_;exports.EAttributeKind=Ia;exports.EAttributeTypes=V_;exports.EDebuggerErrorReason=BT;exports.EDebuggerErrorType=td;exports.EDebuggerState=$a;exports.EDisplayMode=Kx;exports.EPermissionType=vt;exports.ERROR_CODES=I_;exports.ETooltipBehavior=D_;exports.ExpressionIndex=WT;exports.FLAGS_INIT_STATE=VC;exports.FLAGS_KEYS=Xl;exports.MODEL_TAB_PATH=G_;exports.ModalCloseReason=L_;exports.ModalColor=za;exports.ModalIcons=yj;exports.ModalType=Un;exports.ReduxProvider=$6;exports.SETTINGS_TAB_PATH=ti;exports.THEME_CLASSES=qx;exports.WEBFORMS_INITIAL_STATE=YC;exports.actionsToPrivs=oC;exports.addAttribute=WC;exports.addBreakpointDecoration=r4;exports.addComponent=XC;exports.addCraftedComponent=Q4;exports.addDataSource=s6;exports.addDataclass=LC;exports.addDatasource=X_;exports.addEmptyNamespace=_6;exports.addExpression=s4;exports.addIn=V3;exports.addNewFile=TC;exports.addPermission=Q3;exports.addSession=h4;exports.addSharedSource=fO;exports.addWebFormStyles=f6;exports.allowed=q3;exports.attributeKinds=E4;exports.attributeScopes=O4;exports.attributeTypes=x4;exports.castToFileFolder=jj;exports.changeTabEditor=d6;exports.children=ld;exports.clearBreakpoints=a4;exports.closeAllTabs=oO;exports.closeLeftTabs=sO;exports.closeModal=lj;exports.closeOthers=iO;exports.closeRightTabs=aO;exports.closeSavedTabs=u6;exports.closeTab=rO;exports.create=nC;exports.createModal=lC;exports.createModelFiles=U1;exports.createNewFile=Bs;exports.createNewFileAndOpen=zj;exports.createNewNode=$f;exports.createRole=sj;exports.createWithResource=K3;exports.dataclassScopes=C4;exports.defaultWebformContent=Xx;exports.deleteDatasource=Wl;exports.deleteFile=z1;exports.deleteFolder=Hj;exports.deleteSharedSource=pO;exports.deserializeModel=VT;exports.duplicateNode=kf;exports.editAttributeProperty=A4;exports.editComponent=ZC;exports.editCraftedComponent=e6;exports.editDataSource=H_;exports.editDataclassPrimaryKey=zC;exports.editDataclassProperty=P4;exports.editDatasource=Z_;exports.editModal=fj;exports.editRole=ij;exports.editSharedSource=dO;exports.editors=Tx;exports.executeMethod=Gj;exports.expandFolder=Nj;exports.extensions=xx;exports.fetchAppSettings=_C;exports.fetchCatalog=Ws;exports.fetchChanges=IC;exports.fetchCraftedComponents=tO;exports.fetchFiles=Vj;exports.fetchFolderContent=Ro;exports.fetchFolderContentWithoutExpanding=kl;exports.fetchModel=Y_;exports.fetchRoles=fd;exports.fetchRolesChanges=gC;exports.fetchSettings=B_;exports.fetchSharedCss=Ff;exports.fetchSharedDatasources=jf;exports.fetchTemplate=J4;exports.fetchTemplates=Z4;exports.findNodeByPath=Er;exports.findOne=Cs;exports.findSession=lr;exports.findSessionByPath=Fx;exports.getCachedState=Xs;exports.getCashedPrefrences=GT;exports.getDebuggerTabName=ex;exports.getDebuggerTabPath=E_;exports.getDefaultContent=xC;exports.getDefaultName=Lf;exports.getDictByName=iC;exports.getEditors=mo;exports.getExtension=Ox;exports.getFilePath=RC;exports.getFileType=OC;exports.getFilenameFromType=CC;exports.getGraphData=J3;exports.getInheritedResources=uC;exports.getModalTitle=Pd;exports.getNodeRelativePath=Cx;exports.getPrivilegeById=Ua;exports.getPromotions=nj;exports.getResourceFromType=$_;exports.indexTypes=R4;exports.initSharedCss=O6;exports.injectContentAtLine=AC;exports.inspect=q4;exports.isJSON=YT;exports.isRelatedAttr=D4;exports.isRelatedEntitiesAttr=dd;exports.isRelatedEntityAttr=Fl;exports.isRenameDatasource=r6;exports.isRolesOutdated=j_;exports.isValidPrimaryKey=S4;exports.modelSubject=Nx;exports.openAddFileInput=$j;exports.openFile=Ll;exports.openFileAtLine=U_;exports.openFileAtSelection=PC;exports.openModal=_o;exports.openModel=M4;exports.openRoles=e4;exports.openSettingsTab=p6;exports.openTabUnselected=cO;exports.parents=Ud;exports.populateShallow=Z3;exports.primaryKeyAttributes=T4;exports.refreshCatalog=af;exports.refreshFile=kj;exports.reloadTab=H1;exports.relocateNode=jl;exports.remove=G3;exports.removeAllExpressions=l4;exports.removeAttribute=BC;exports.removeBreakpointDecoration=n4;exports.removeComponent=JC;exports.removeCraftedComponent=t6;exports.removeDataSource=l6;exports.removeDataclass=FC;exports.removeDebuggerSessionsNotIn=kC;exports.removeExpression=c4;exports.removeFile=B1;exports.removeFileNode=qj;exports.removeFrom=Y3;exports.removeModal=fC;exports.removePermission=ej;exports.removeRole=aj;exports.removeSession=g4;exports.removeSessionByIndex=m4;exports.rename=X3;exports.renameAttribute=UC;exports.renameCollection=HC;exports.renameDataSource=z_;exports.renameDataclass=jC;exports.renameDatasource=Hs;exports.renameExpression=u4;exports.renameFile=Us;exports.resetResources=tj;exports.rootReducer=lO;exports.sanitize=zd;exports.sanitizePermissions=aC;exports.sanitizePrivileges=tC;exports.saveAll=Yj;exports.saveExpressions=p4;exports.saveModel=pd;exports.savePrefrences=qT;exports.saveRole=uj;exports.saveRoles=F1;exports.saveState=HT;exports.saveTab=zs;exports.selectActiveLine=bL;exports.selectActiveTab=DL;exports.selectAllDatasourcesByPath=fL;exports.selectAppState=kx;exports.selectBreakpoints=hL;exports.selectCSSClassesByPath=a3;exports.selectCallChainVariables=RL;exports.selectCatalog=O_;exports.selectCatalogMethods=aL;exports.selectClassBreakpoints=gL;exports.selectClassOffset=PL;exports.selectClasses=qL;exports.selectClassesFolder=zx;exports.selectComponents=Vx;exports.selectComponentsByPath=cL;exports.selectContentByPath=Wx;exports.selectCraftedComponent=f3;exports.selectCurrentFrameByThreadId=xL;exports.selectCurrentTab=NL;exports.selectDataclasses=oL;exports.selectDatasource=lL;exports.selectDatasourcesByPath=Lx;exports.selectDatasourcesTheme=p3;exports.selectDebuggerChannels=CL;exports.selectDebuggerData=Rs;exports.selectDebuggerMeta=dL;exports.selectDebuggerSessions=_n;exports.selectDebuggerSessionsCount=pL;exports.selectDebuggers=BL;exports.selectDraftBreakpoints=vL;exports.selectDraftClassBreakpoints=mL;exports.selectExceptions=IL;exports.selectExplorer=UL;exports.selectExpressions=_L;exports.selectExpressionsVariables=AL;exports.selectFlagsByPath=s3;exports.selectGuestPrivilege=KL;exports.selectHasTabs=LL;exports.selectHighlightedLines=yL;exports.selectInspectedCSSClass=u3;exports.selectInspectedDatasource=c3;exports.selectInspector=jd;exports.selectInspectorStateByType=d3;exports.selectIsLoaded=h3;exports.selectMethods=zL;exports.selectMethodsFolder=Ux;exports.selectModals=GL;exports.selectMonacoZoom=n3;exports.selectPanelByPath=I6;exports.selectPreferences=e3;exports.selectPreviewedWebformsPaths=kL;exports.selectPrivileges=YL;exports.selectProjectSettings=QL;exports.selectQodly=r3;exports.selectRecentFiles=ML;exports.selectRemoteDebuggerMode=t3;exports.selectRoles=VL;exports.selectRolesDate=JL;exports.selectRolesFlags=XL;exports.selectRoot=Ba;exports.selectSelectedTab=ZL;exports.selectServerSettings=A_;exports.selectSessionSettings=Hx;exports.selectSharedCSS=i3;exports.selectSharedDatasources=jx;exports.selectSourceByPath=SL;exports.selectSourceByThreadId=TL;exports.selectStackFrames=OL;exports.selectStoppedFromDebugSession=wL;exports.selectStylesByPath=o3;exports.selectTab=uO;exports.selectTabByPath=sf;exports.selectTabByReference=bn;exports.selectTabExtraByPath=jL;exports.selectTabMaxWeight=$L;exports.selectTabs=ru;exports.selectTemplates=Yx;exports.selectTemplatesData=l3;exports.selectThreadIdByPath=EL;exports.selectTouchedTabs=R_;exports.selectTouchedTabsLength=WL;exports.selectWebForms=HL;exports.selectWebFormsFolder=Bx;exports.selectWebformNodes=FL;exports.selectWebformStylesByPath=P_;exports.selectWebforms=uf;exports.serializeModel=I4;exports.setActiveLine=i4;exports.setBreakpointsDecoration=o4;exports.setCallChainVariables=y4;exports.setContent=nO;exports.setDataSources=c6;exports.setDatasourceEvents=b6;exports.setDatasourcesTheme=V4;exports.setDebuggerMeta=w4;exports.setExpression=f4;exports.setExpressionVariables=b4;exports.setFolderChildren=Lj;exports.setModelFlag=k4;exports.setPanelState=h6;exports.setRolesContent=F_;exports.setSelectedGroup=G4;exports.setSessions=NC;exports.setSetting=SC;exports.setSettings=qd;exports.setSettingsAsText=Pj;exports.setSourceContent=_4;exports.setTabExtra=i6;exports.setTabFlags=Q_;exports.setTabs=o6;exports.setTabsFlags=a6;exports.setTemplateData=eO;exports.setTemplatesData=QC;exports.setWebformsFlag=Y4;exports.sort=rC;exports.stateReducer=gO;exports.stateSlice=J_;exports.store=Os;exports.toAPI=k_;exports.toState=oj;exports.toggleExpandFolder=Mj;exports.toggleInspector=H4;exports.togglePermission=rj;exports.togglePrivilegePermission=sC;exports.toggleTab=Cj;exports.tryCloseAllTabs=Xj;exports.tryCloseLeftTabs=Jj;exports.tryCloseOtherTabs=Kj;exports.tryCloseRightTabs=Zj;exports.tryCloseTab=q_;exports.tryEditMethod=Fj;exports.tryInjectMethod=DC;exports.tryRenameDataclass=N4;exports.uniquePush=zn;exports.updateExpressionAt=d4;exports.updatePrivileges=yC;exports.updateRoles=bC;exports.updateRolesAndPrivileges=W_;exports.updateSession=v4;exports.updateSharedCss=C6;exports.updateSharedDatasources=ew;exports.uploadFile=Uj;exports.uploadFileAndGetResponse=Bj;exports.useAppDispatch=nL;exports.useAppSelector=Io;exports.useAttribute=W4;exports.useCatalog=xk;exports.useCollections=j4;exports.useDataclass=F4;exports.useDataclasses=L4;exports.useMethod=uL;exports.useMethods=iL;exports.useModelFlags=U4;exports.useModelProperties=B4;exports.useWebformsFlags=K4;exports.wipeDebuggerSessions=$C;
|
|
263
|
+
Check the top-level render call using <`+q+">.")}return B}}function Kn(_,B){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var q=ko(B);if($o[q])return;$o[q]=!0;var te="";_&&_._owner&&_._owner!==nn.current&&(te=" It was passed a child from "+Me(_._owner.type)+"."),ir(_),G('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,te),ir(null)}}function Lo(_,B){{if(typeof _!="object")return;if(Array.isArray(_))for(var q=0;q<_.length;q++){var te=_[q];an(te)&&Kn(te,B)}else if(an(_))_._store&&(_._store.validated=!0);else if(_){var Re=Y(_);if(typeof Re=="function"&&Re!==_.entries)for(var Ae=Re.call(_),Te;!(Te=Ae.next()).done;)an(Te.value)&&Kn(Te.value,B)}}}function ai(_){{var B=_.type;if(B==null||typeof B=="string")return;var q;if(typeof B=="function")q=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===h||B.$$typeof===S))q=B.propTypes;else return;if(q){var te=Me(B);ri(q,_.props,"prop",te,_)}else if(B.PropTypes!==void 0&&!on){on=!0;var Re=Me(B);G("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Re||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&G("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ii(_){{for(var B=Object.keys(_.props),q=0;q<B.length;q++){var te=B[q];if(te!=="children"&&te!=="key"){ir(_),G("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),ir(null);break}}_.ref!==null&&(ir(_),G("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function jo(_,B,q,te,Re,Ae){{var Te=Ue(_);if(!Te){var be="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=oi(Re);rt?be+=rt:be+=No();var ke;_===null?ke="null":Array.isArray(_)?ke="array":_!==void 0&&_.$$typeof===a?(ke="<"+(Me(_.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):ke=typeof _,G("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ke,be)}var We=Yn(_,B,q,Re,Ae);if(We==null)return We;if(Te){var Bt=B.children;if(Bt!==void 0)if(te)if(Array.isArray(Bt)){for(var Cr=0;Cr<Bt.length;Cr++)Lo(Bt[Cr],_);Object.freeze&&Object.freeze(Bt)}else G("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Lo(Bt,_)}return _===e.Fragment?ii(We):ai(We),We}}function Fo(_,B,q){return jo(_,B,q,!0)}function si(_,B,q){return jo(_,B,q,!1)}var ui=si,ci=Fo;e.jsx=ui,e.jsxs=ci}()}(e1)),e1}process.env.NODE_ENV==="production"?q1.exports=D6():q1.exports=M6();var N6=q1.exports;const $6=({children:e,store:o})=>N6.jsx(ax,{store:o,children:e});exports.DEFAULT_CACHE=S_;exports.EAttributeKind=Ia;exports.EAttributeTypes=V_;exports.EDebuggerErrorReason=BT;exports.EDebuggerErrorType=td;exports.EDebuggerState=$a;exports.EDisplayMode=Kx;exports.EPermissionType=vt;exports.ERROR_CODES=D_;exports.ETooltipBehavior=M_;exports.ExpressionIndex=WT;exports.FLAGS_INIT_STATE=VC;exports.FLAGS_KEYS=Xl;exports.ModalCloseReason=j_;exports.ModalColor=za;exports.ModalIcons=yj;exports.ModalType=Un;exports.ReduxProvider=$6;exports.SETTINGS_TAB_PATH=ti;exports.THEME_CLASSES=qx;exports.WEBFORMS_INITIAL_STATE=YC;exports.actionsToPrivs=oC;exports.addAttribute=WC;exports.addBreakpointDecoration=r4;exports.addComponent=XC;exports.addCraftedComponent=Q4;exports.addDataSource=s6;exports.addDataclass=LC;exports.addDatasource=X_;exports.addEmptyNamespace=_6;exports.addExpression=s4;exports.addIn=VL;exports.addNewFile=TC;exports.addPermission=QL;exports.addSession=h4;exports.addSharedSource=fO;exports.addWebFormStyles=f6;exports.allowed=qL;exports.attributeKinds=E4;exports.attributeScopes=O4;exports.attributeTypes=x4;exports.castToFileFolder=jj;exports.changeTabEditor=d6;exports.children=ld;exports.clearBreakpoints=a4;exports.closeAllTabs=oO;exports.closeLeftTabs=sO;exports.closeModal=lj;exports.closeOthers=iO;exports.closeRightTabs=aO;exports.closeSavedTabs=u6;exports.closeTab=rO;exports.create=nC;exports.createModal=lC;exports.createModelFiles=U1;exports.createNewFile=Bs;exports.createNewFileAndOpen=zj;exports.createNewNode=$f;exports.createRole=sj;exports.createWithResource=KL;exports.dataclassScopes=C4;exports.defaultWebformContent=Xx;exports.deleteDatasource=Wl;exports.deleteFile=z1;exports.deleteFolder=Hj;exports.deleteSharedSource=pO;exports.deserializeModel=VT;exports.duplicateNode=kf;exports.editAttributeProperty=A4;exports.editComponent=ZC;exports.editCraftedComponent=e6;exports.editDataSource=q_;exports.editDataclassPrimaryKey=zC;exports.editDataclassProperty=P4;exports.editDatasource=Z_;exports.editModal=fj;exports.editRole=ij;exports.editSharedSource=dO;exports.editors=Tx;exports.executeMethod=Gj;exports.expandFolder=Nj;exports.extensions=xx;exports.fetchAppSettings=_C;exports.fetchCatalog=Ws;exports.fetchChanges=IC;exports.fetchCraftedComponents=tO;exports.fetchFiles=Vj;exports.fetchFolderContent=Ro;exports.fetchFolderContentWithoutExpanding=kl;exports.fetchModel=Y_;exports.fetchRoles=fd;exports.fetchRolesChanges=gC;exports.fetchSettings=U_;exports.fetchSharedCss=Ff;exports.fetchSharedDatasources=jf;exports.fetchTemplate=J4;exports.fetchTemplates=Z4;exports.findNodeByPath=Er;exports.findOne=Cs;exports.findSession=lr;exports.findSessionByPath=Fx;exports.getCachedState=Xs;exports.getCashedPrefrences=GT;exports.getDebuggerTabName=ex;exports.getDebuggerTabPath=T_;exports.getDefaultContent=xC;exports.getDefaultName=Lf;exports.getDictByName=iC;exports.getEditors=mo;exports.getExtension=Ox;exports.getFilePath=RC;exports.getFileType=OC;exports.getFilenameFromType=CC;exports.getGraphData=JL;exports.getInheritedResources=uC;exports.getModalTitle=Pd;exports.getNodeRelativePath=Cx;exports.getPrivilegeById=Ua;exports.getPromotions=nj;exports.getResourceFromType=k_;exports.indexTypes=R4;exports.initSharedCss=O6;exports.injectContentAtLine=AC;exports.inspect=q4;exports.isJSON=YT;exports.isRelatedAttr=D4;exports.isRelatedEntitiesAttr=dd;exports.isRelatedEntityAttr=Fl;exports.isRenameDatasource=r6;exports.isRolesOutdated=F_;exports.isValidPrimaryKey=S4;exports.modelSubject=Nx;exports.openAddFileInput=$j;exports.openFile=Ll;exports.openFileAtLine=z_;exports.openFileAtSelection=PC;exports.openModal=_o;exports.openModel=M4;exports.openRoles=e4;exports.openSettingsTab=p6;exports.openTabUnselected=cO;exports.parents=Ud;exports.populateShallow=ZL;exports.primaryKeyAttributes=T4;exports.refreshCatalog=af;exports.refreshFile=kj;exports.reloadTab=H1;exports.relocateNode=jl;exports.remove=GL;exports.removeAllExpressions=l4;exports.removeAttribute=BC;exports.removeBreakpointDecoration=n4;exports.removeComponent=JC;exports.removeCraftedComponent=t6;exports.removeDataSource=l6;exports.removeDataclass=FC;exports.removeDebuggerSessionsNotIn=kC;exports.removeExpression=c4;exports.removeFile=B1;exports.removeFileNode=qj;exports.removeFrom=YL;exports.removeModal=fC;exports.removePermission=ej;exports.removeRole=aj;exports.removeSession=g4;exports.removeSessionByIndex=m4;exports.rename=XL;exports.renameAttribute=UC;exports.renameCollection=HC;exports.renameDataSource=H_;exports.renameDataclass=jC;exports.renameDatasource=Hs;exports.renameExpression=u4;exports.renameFile=Us;exports.resetResources=tj;exports.rootReducer=lO;exports.sanitize=zd;exports.sanitizePermissions=aC;exports.sanitizePrivileges=tC;exports.saveAll=Yj;exports.saveExpressions=p4;exports.saveModel=pd;exports.savePrefrences=qT;exports.saveRole=uj;exports.saveRoles=F1;exports.saveState=HT;exports.saveTab=zs;exports.selectActiveLine=b3;exports.selectActiveTab=D3;exports.selectAllDatasourcesByPath=f3;exports.selectAppState=kx;exports.selectBreakpoints=h3;exports.selectCSSClassesByPath=aL;exports.selectCallChainVariables=R3;exports.selectCatalog=R_;exports.selectCatalogMethods=a3;exports.selectClassBreakpoints=g3;exports.selectClassOffset=P3;exports.selectClasses=q3;exports.selectClassesFolder=zx;exports.selectComponents=Vx;exports.selectComponentsByPath=c3;exports.selectContentByPath=Wx;exports.selectCraftedComponent=fL;exports.selectCurrentFrameByThreadId=x3;exports.selectCurrentTab=N3;exports.selectDataclasses=o3;exports.selectDatasource=l3;exports.selectDatasourcesByPath=Lx;exports.selectDatasourcesTheme=pL;exports.selectDebuggerChannels=C3;exports.selectDebuggerData=Rs;exports.selectDebuggerMeta=d3;exports.selectDebuggerSessions=_n;exports.selectDebuggerSessionsCount=p3;exports.selectDebuggers=B3;exports.selectDraftBreakpoints=v3;exports.selectDraftClassBreakpoints=m3;exports.selectExceptions=I3;exports.selectExplorer=U3;exports.selectExpressions=_3;exports.selectExpressionsVariables=A3;exports.selectFlagsByPath=sL;exports.selectGuestPrivilege=K3;exports.selectHasTabs=L3;exports.selectHighlightedLines=y3;exports.selectInspectedCSSClass=uL;exports.selectInspectedDatasource=cL;exports.selectInspector=jd;exports.selectInspectorStateByType=dL;exports.selectIsLoaded=hL;exports.selectMethods=z3;exports.selectMethodsFolder=Ux;exports.selectModals=G3;exports.selectMonacoZoom=nL;exports.selectPanelByPath=I6;exports.selectPreferences=eL;exports.selectPreviewedWebformsPaths=k3;exports.selectPrivileges=Y3;exports.selectProjectSettings=Q3;exports.selectQodly=rL;exports.selectRecentFiles=M3;exports.selectRemoteDebuggerMode=tL;exports.selectRoles=V3;exports.selectRolesDate=J3;exports.selectRolesFlags=X3;exports.selectRoot=Ba;exports.selectSelectedTab=Z3;exports.selectServerSettings=P_;exports.selectSessionSettings=Hx;exports.selectSharedCSS=iL;exports.selectSharedDatasources=jx;exports.selectSourceByPath=S3;exports.selectSourceByThreadId=T3;exports.selectStackFrames=O3;exports.selectStoppedFromDebugSession=w3;exports.selectStylesByPath=oL;exports.selectTab=uO;exports.selectTabByPath=sf;exports.selectTabByReference=bn;exports.selectTabExtraByPath=j3;exports.selectTabMaxWeight=$3;exports.selectTabs=ru;exports.selectTemplates=Yx;exports.selectTemplatesData=lL;exports.selectThreadIdByPath=E3;exports.selectTouchedTabs=A_;exports.selectTouchedTabsLength=W3;exports.selectWebForms=H3;exports.selectWebFormsFolder=Bx;exports.selectWebformNodes=F3;exports.selectWebformStylesByPath=I_;exports.selectWebforms=uf;exports.serializeModel=I4;exports.setActiveLine=i4;exports.setBreakpointsDecoration=o4;exports.setCallChainVariables=y4;exports.setContent=nO;exports.setDataSources=c6;exports.setDatasourceEvents=b6;exports.setDatasourcesTheme=V4;exports.setDebuggerMeta=w4;exports.setExpression=f4;exports.setExpressionVariables=b4;exports.setFolderChildren=Lj;exports.setModelFlag=k4;exports.setPanelState=h6;exports.setRolesContent=W_;exports.setSelectedGroup=G4;exports.setSessions=NC;exports.setSetting=SC;exports.setSettings=qd;exports.setSettingsAsText=Pj;exports.setSourceContent=_4;exports.setTabExtra=i6;exports.setTabFlags=Q_;exports.setTabs=o6;exports.setTabsFlags=a6;exports.setTemplateData=eO;exports.setTemplatesData=QC;exports.setWebformsFlag=Y4;exports.sort=rC;exports.stateReducer=gO;exports.stateSlice=J_;exports.store=Os;exports.toAPI=L_;exports.toState=oj;exports.toggleExpandFolder=Mj;exports.toggleInspector=H4;exports.togglePermission=rj;exports.togglePrivilegePermission=sC;exports.toggleTab=Cj;exports.tryCloseAllTabs=Xj;exports.tryCloseLeftTabs=Jj;exports.tryCloseOtherTabs=Kj;exports.tryCloseRightTabs=Zj;exports.tryCloseTab=G_;exports.tryEditMethod=Fj;exports.tryInjectMethod=DC;exports.tryRenameDataclass=N4;exports.uniquePush=zn;exports.updateExpressionAt=d4;exports.updatePrivileges=yC;exports.updateRoles=bC;exports.updateRolesAndPrivileges=B_;exports.updateSession=v4;exports.updateSharedCss=C6;exports.updateSharedDatasources=ew;exports.uploadFile=Uj;exports.uploadFileAndGetResponse=Bj;exports.useAppDispatch=n3;exports.useAppSelector=Io;exports.useAttribute=W4;exports.useCatalog=xk;exports.useCollections=j4;exports.useDataclass=F4;exports.useDataclasses=L4;exports.useMethod=u3;exports.useMethods=i3;exports.useModelFlags=U4;exports.useModelProperties=B4;exports.useWebformsFlags=K4;exports.wipeDebuggerSessions=$C;
|
|
264
264
|
//# sourceMappingURL=index.cjs.js.map
|