@ws-ui/store 0.0.6 → 0.0.8

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 CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("react"),nR=require("react-dom");function oR(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const oe=oR(ie);function Qt(e){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];if(process.env.NODE_ENV!=="production"){var i=pR[e],u=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+u)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function La(e){return!!e&&!!e[Ke]}function _o(e){var n;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===hR}(e)||Array.isArray(e)||!!e[Wl]||!!(!((n=e.constructor)===null||n===void 0)&&n[Wl])||xd(e)||Cd(e))}function Fa(e,n,r){r===void 0&&(r=!1),ti(e)===0?(r?Object.keys:Bs)(e).forEach(function(a){r&&typeof a=="symbol"||n(a,e[a],e)}):e.forEach(function(a,i){return n(i,a,e)})}function ti(e){var n=e[Ke];return n?n.i>3?n.i-4:n.i:Array.isArray(e)?1:xd(e)?2:Cd(e)?3:0}function Za(e,n){return ti(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Nf(e,n){return ti(e)===2?e.get(n):e[n]}function qS(e,n,r){var a=ti(e);a===2?e.set(n,r):a===3?e.add(r):e[n]=r}function VS(e,n){return e===n?e!==0||1/e==1/n:e!=e&&n!=n}function xd(e){return fR&&e instanceof Map}function Cd(e){return dR&&e instanceof Set}function xr(e){return e.o||e.t}function d_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var n=YS(e);delete n[Ke];for(var r=Bs(n),a=0;a<r.length;a++){var i=r[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),n)}function p_(e,n){return n===void 0&&(n=!1),h_(e)||La(e)||!_o(e)||(ti(e)>1&&(e.set=e.add=e.clear=e.delete=aR),Object.freeze(e),n&&Fa(e,function(r,a){return p_(a,!0)},!0)),e}function aR(){Qt(2)}function h_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Co(e){var n=w1[e];return n||Qt(18,e),n}function v_(e,n){w1[e]||(w1[e]=n)}function Yl(){return process.env.NODE_ENV==="production"||Xs||Qt(0),Xs}function _b(e,n){n&&(Co("Patches"),e.u=[],e.s=[],e.v=n)}function Jf(e){_1(e),e.p.forEach(iR),e.p=null}function _1(e){e===Xs&&(Xs=e.l)}function Sw(e){return Xs={p:[],l:Xs,h:e,m:!0,_:0}}function iR(e){var n=e[Ke];n.i===0||n.i===1?n.j():n.g=!0}function wb(e,n){n._=n.p.length;var r=n.p[0],a=e!==void 0&&e!==r;return n.h.O||Co("ES5").S(n,e,a),a?(r[Ke].P&&(Jf(n),Qt(4)),_o(e)&&(e=Zf(n,e),n.l||Qf(n,e)),n.u&&Co("Patches").M(r[Ke].t,e,n.u,n.s)):e=Zf(n,r,[]),Jf(n),n.u&&n.v(n.u,n.s),e!==m_?e:void 0}function Zf(e,n,r){if(h_(n))return n;var a=n[Ke];if(!a)return Fa(n,function(f,p){return Ow(e,a,n,f,p,r)},!0),n;if(a.A!==e)return n;if(!a.P)return Qf(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var i=a.i===4||a.i===5?a.o=d_(a.k):a.o,u=i,c=!1;a.i===3&&(u=new Set(i),i.clear(),c=!0),Fa(u,function(f,p){return Ow(e,a,i,f,p,r,c)}),Qf(e,i,!1),r&&e.u&&Co("Patches").N(a,r,e.u,e.s)}return a.o}function Ow(e,n,r,a,i,u,c){if(process.env.NODE_ENV!=="production"&&i===r&&Qt(5),La(i)){var f=Zf(e,i,u&&n&&n.i!==3&&!Za(n.R,a)?u.concat(a):void 0);if(qS(r,a,f),!La(f))return;e.m=!1}else c&&r.add(i);if(_o(i)&&!h_(i)){if(!e.h.D&&e._<1)return;Zf(e,i),n&&n.A.l||Qf(e,i)}}function Qf(e,n,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&p_(n,r)}function Eb(e,n){var r=e[Ke];return(r?xr(r):e)[n]}function Tw(e,n){if(n in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,n);if(a)return a;r=Object.getPrototypeOf(r)}}function Sn(e){e.P||(e.P=!0,e.l&&Sn(e.l))}function Sb(e){e.o||(e.o=d_(e.t))}function Kl(e,n,r){var a=xd(n)?Co("MapSet").F(n,r):Cd(n)?Co("MapSet").T(n,r):e.O?function(i,u){var c=Array.isArray(i),f={i:c?1:0,A:u?u.A:Yl(),P:!1,I:!1,R:{},l:u,t:i,k:null,o:null,j:null,C:!1},p=f,h=Xl;c&&(p=[f],h=jl);var m=Proxy.revocable(p,h),b=m.revoke,E=m.proxy;return f.k=E,f.j=b,E}(n,r):Co("ES5").J(n,r);return(r?r.A:Yl()).p.push(a),a}function sR(e){return La(e)||Qt(22,e),function n(r){if(!_o(r))return r;var a,i=r[Ke],u=ti(r);if(i){if(!i.P&&(i.i<4||!Co("ES5").K(i)))return i.t;i.I=!0,a=xw(r,u),i.I=!1}else a=xw(r,u);return Fa(a,function(c,f){i&&Nf(i.t,c)===f||qS(a,c,n(f))}),u===3?new Set(a):a}(e)}function xw(e,n){switch(n){case 2:return new Map(e);case 3:return Array.from(e)}return d_(e)}function uR(){function e(c,f){var p=u[c];return p?p.enumerable=f:u[c]=p={configurable:!0,enumerable:f,get:function(){var h=this[Ke];return process.env.NODE_ENV!=="production"&&i(h),Xl.get(h,c)},set:function(h){var m=this[Ke];process.env.NODE_ENV!=="production"&&i(m),Xl.set(m,c,h)}},p}function n(c){for(var f=c.length-1;f>=0;f--){var p=c[f][Ke];if(!p.P)switch(p.i){case 5:a(p)&&Sn(p);break;case 4:r(p)&&Sn(p)}}}function r(c){for(var f=c.t,p=c.k,h=Bs(p),m=h.length-1;m>=0;m--){var b=h[m];if(b!==Ke){var E=f[b];if(E===void 0&&!Za(f,b))return!0;var O=p[b],R=O&&O[Ke];if(R?R.t!==E:!VS(O,E))return!0}}var C=!!f[Ke];return h.length!==Bs(f).length+(C?0:1)}function a(c){var f=c.k;if(f.length!==c.t.length)return!0;var p=Object.getOwnPropertyDescriptor(f,f.length-1);if(p&&!p.get)return!0;for(var h=0;h<f.length;h++)if(!f.hasOwnProperty(h))return!0;return!1}function i(c){c.g&&Qt(3,JSON.stringify(xr(c)))}var u={};v_("ES5",{J:function(c,f){var p=Array.isArray(c),h=function(b,E){if(b){for(var O=Array(E.length),R=0;R<E.length;R++)Object.defineProperty(O,""+R,e(R,!0));return O}var C=YS(E);delete C[Ke];for(var k=Bs(C),j=0;j<k.length;j++){var F=k[j];C[F]=e(F,b||!!C[F].enumerable)}return Object.create(Object.getPrototypeOf(E),C)}(p,c),m={i:p?5:4,A:f?f.A:Yl(),P:!1,I:!1,R:{},l:f,t:c,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,Ke,{value:m,writable:!0}),h},S:function(c,f,p){p?La(f)&&f[Ke].A===c&&n(c.p):(c.u&&function h(m){if(m&&typeof m=="object"){var b=m[Ke];if(b){var E=b.t,O=b.k,R=b.R,C=b.i;if(C===4)Fa(O,function(M){M!==Ke&&(E[M]!==void 0||Za(E,M)?R[M]||h(O[M]):(R[M]=!0,Sn(b)))}),Fa(E,function(M){O[M]!==void 0||Za(O,M)||(R[M]=!1,Sn(b))});else if(C===5){if(a(b)&&(Sn(b),R.length=!0),O.length<E.length)for(var k=O.length;k<E.length;k++)R[k]=!1;else for(var j=E.length;j<O.length;j++)R[j]=!0;for(var F=Math.min(O.length,E.length),D=0;D<F;D++)O.hasOwnProperty(D)||(R[D]=!0),R[D]===void 0&&h(O[D])}}}}(c.p[0]),n(c.p))},K:function(c){return c.i===4?r(c):a(c)}})}function cR(){function e(a){if(!_o(a))return a;if(Array.isArray(a))return a.map(e);if(xd(a))return new Map(Array.from(a.entries()).map(function(c){return[c[0],e(c[1])]}));if(Cd(a))return new Set(Array.from(a).map(e));var i=Object.create(Object.getPrototypeOf(a));for(var u in a)i[u]=e(a[u]);return Za(a,Wl)&&(i[Wl]=a[Wl]),i}function n(a){return La(a)?e(a):a}var r="add";v_("Patches",{$:function(a,i){return i.forEach(function(u){for(var c=u.path,f=u.op,p=a,h=0;h<c.length-1;h++){var m=ti(p),b=c[h];typeof b!="string"&&typeof b!="number"&&(b=""+b),m!==0&&m!==1||b!=="__proto__"&&b!=="constructor"||Qt(24),typeof p=="function"&&b==="prototype"&&Qt(24),typeof(p=Nf(p,b))!="object"&&Qt(15,c.join("/"))}var E=ti(p),O=e(u.value),R=c[c.length-1];switch(f){case"replace":switch(E){case 2:return p.set(R,O);case 3:Qt(16);default:return p[R]=O}case r:switch(E){case 1:return R==="-"?p.push(O):p.splice(R,0,O);case 2:return p.set(R,O);case 3:return p.add(O);default:return p[R]=O}case"remove":switch(E){case 1:return p.splice(R,1);case 2:return p.delete(R);case 3:return p.delete(u.value);default:return delete p[R]}default:Qt(17,f)}}),a},N:function(a,i,u,c){switch(a.i){case 0:case 4:case 2:return function(f,p,h,m){var b=f.t,E=f.o;Fa(f.R,function(O,R){var C=Nf(b,O),k=Nf(E,O),j=R?Za(b,O)?"replace":r:"remove";if(C!==k||j!=="replace"){var F=p.concat(O);h.push(j==="remove"?{op:j,path:F}:{op:j,path:F,value:k}),m.push(j===r?{op:"remove",path:F}:j==="remove"?{op:r,path:F,value:n(C)}:{op:"replace",path:F,value:n(C)})}})}(a,i,u,c);case 5:case 1:return function(f,p,h,m){var b=f.t,E=f.R,O=f.o;if(O.length<b.length){var R=[O,b];b=R[0],O=R[1];var C=[m,h];h=C[0],m=C[1]}for(var k=0;k<b.length;k++)if(E[k]&&O[k]!==b[k]){var j=p.concat([k]);h.push({op:"replace",path:j,value:n(O[k])}),m.push({op:"replace",path:j,value:n(b[k])})}for(var F=b.length;F<O.length;F++){var D=p.concat([F]);h.push({op:r,path:D,value:n(O[F])})}b.length<O.length&&m.push({op:"replace",path:p.concat(["length"]),value:b.length})}(a,i,u,c);case 3:return function(f,p,h,m){var b=f.t,E=f.o,O=0;b.forEach(function(R){if(!E.has(R)){var C=p.concat([O]);h.push({op:"remove",path:C,value:R}),m.unshift({op:r,path:C,value:R})}O++}),O=0,E.forEach(function(R){if(!b.has(R)){var C=p.concat([O]);h.push({op:r,path:C,value:R}),m.unshift({op:"remove",path:C,value:R})}O++})}(a,i,u,c)}},M:function(a,i,u,c){u.push({op:"replace",path:[],value:i===m_?void 0:i}),c.push({op:"replace",path:[],value:a})}})}function lR(){function e(f,p){function h(){this.constructor=f}i(f,p),f.prototype=(h.prototype=p.prototype,new h)}function n(f){f.o||(f.R=new Map,f.o=new Map(f.t))}function r(f){f.o||(f.o=new Set,f.t.forEach(function(p){if(_o(p)){var h=Kl(f.A.h,p,f);f.p.set(p,h),f.o.add(h)}else f.o.add(p)}))}function a(f){f.g&&Qt(3,JSON.stringify(xr(f)))}var i=function(f,p){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var b in m)m.hasOwnProperty(b)&&(h[b]=m[b])})(f,p)},u=function(){function f(h,m){return this[Ke]={i:2,l:m,A:m?m.A:Yl(),P:!1,I:!1,o:void 0,R:void 0,t:h,k:this,C:!1,g:!1},this}e(f,Map);var p=f.prototype;return Object.defineProperty(p,"size",{get:function(){return xr(this[Ke]).size}}),p.has=function(h){return xr(this[Ke]).has(h)},p.set=function(h,m){var b=this[Ke];return a(b),xr(b).has(h)&&xr(b).get(h)===m||(n(b),Sn(b),b.R.set(h,!0),b.o.set(h,m),b.R.set(h,!0)),this},p.delete=function(h){if(!this.has(h))return!1;var m=this[Ke];return a(m),n(m),Sn(m),m.t.has(h)?m.R.set(h,!1):m.R.delete(h),m.o.delete(h),!0},p.clear=function(){var h=this[Ke];a(h),xr(h).size&&(n(h),Sn(h),h.R=new Map,Fa(h.t,function(m){h.R.set(m,!1)}),h.o.clear())},p.forEach=function(h,m){var b=this;xr(this[Ke]).forEach(function(E,O){h.call(m,b.get(O),O,b)})},p.get=function(h){var m=this[Ke];a(m);var b=xr(m).get(h);if(m.I||!_o(b)||b!==m.t.get(h))return b;var E=Kl(m.A.h,b,m);return n(m),m.o.set(h,E),E},p.keys=function(){return xr(this[Ke]).keys()},p.values=function(){var h,m=this,b=this.keys();return(h={})[bf]=function(){return m.values()},h.next=function(){var E=b.next();return E.done?E:{done:!1,value:m.get(E.value)}},h},p.entries=function(){var h,m=this,b=this.keys();return(h={})[bf]=function(){return m.entries()},h.next=function(){var E=b.next();if(E.done)return E;var O=m.get(E.value);return{done:!1,value:[E.value,O]}},h},p[bf]=function(){return this.entries()},f}(),c=function(){function f(h,m){return this[Ke]={i:3,l:m,A:m?m.A:Yl(),P:!1,I:!1,o:void 0,t:h,k:this,p:new Map,g:!1,C:!1},this}e(f,Set);var p=f.prototype;return Object.defineProperty(p,"size",{get:function(){return xr(this[Ke]).size}}),p.has=function(h){var m=this[Ke];return a(m),m.o?!!m.o.has(h)||!(!m.p.has(h)||!m.o.has(m.p.get(h))):m.t.has(h)},p.add=function(h){var m=this[Ke];return a(m),this.has(h)||(r(m),Sn(m),m.o.add(h)),this},p.delete=function(h){if(!this.has(h))return!1;var m=this[Ke];return a(m),r(m),Sn(m),m.o.delete(h)||!!m.p.has(h)&&m.o.delete(m.p.get(h))},p.clear=function(){var h=this[Ke];a(h),xr(h).size&&(r(h),Sn(h),h.o.clear())},p.values=function(){var h=this[Ke];return a(h),r(h),h.o.values()},p.entries=function(){var h=this[Ke];return a(h),r(h),h.o.entries()},p.keys=function(){return this.values()},p[bf]=function(){return this.values()},p.forEach=function(h,m){for(var b=this.values(),E=b.next();!E.done;)h.call(m,E.value,E.value,this),E=b.next()},f}();v_("MapSet",{F:function(f,p){return new u(f,p)},T:function(f,p){return new c(f,p)}})}var Cw,Xs,g_=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fR=typeof Map<"u",dR=typeof Set<"u",Rw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",m_=g_?Symbol.for("immer-nothing"):((Cw={})["immer-nothing"]=!0,Cw),Wl=g_?Symbol.for("immer-draftable"):"__$immer_draftable",Ke=g_?Symbol.for("immer-state"):"__$immer_state",bf=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",pR={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},hR=""+Object.prototype.constructor,Bs=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,YS=Object.getOwnPropertyDescriptors||function(e){var n={};return Bs(e).forEach(function(r){n[r]=Object.getOwnPropertyDescriptor(e,r)}),n},w1={},Xl={get:function(e,n){if(n===Ke)return e;var r=xr(e);if(!Za(r,n))return function(i,u,c){var f,p=Tw(u,c);return p?"value"in p?p.value:(f=p.get)===null||f===void 0?void 0:f.call(i.k):void 0}(e,r,n);var a=r[n];return e.I||!_o(a)?a:a===Eb(e.t,n)?(Sb(e),e.o[n]=Kl(e.A.h,a,e)):a},has:function(e,n){return n in xr(e)},ownKeys:function(e){return Reflect.ownKeys(xr(e))},set:function(e,n,r){var a=Tw(xr(e),n);if(a!=null&&a.set)return a.set.call(e.k,r),!0;if(!e.P){var i=Eb(xr(e),n),u=i==null?void 0:i[Ke];if(u&&u.t===r)return e.o[n]=r,e.R[n]=!1,!0;if(VS(r,i)&&(r!==void 0||Za(e.t,n)))return!0;Sb(e),Sn(e)}return e.o[n]===r&&(r!==void 0||n in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[n])||(e.o[n]=r,e.R[n]=!0),!0},deleteProperty:function(e,n){return Eb(e.t,n)!==void 0||n in e.t?(e.R[n]=!1,Sb(e),Sn(e)):delete e.R[n],e.o&&delete e.o[n],!0},getOwnPropertyDescriptor:function(e,n){var r=xr(e),a=Reflect.getOwnPropertyDescriptor(r,n);return a&&{writable:!0,configurable:e.i!==1||n!=="length",enumerable:a.enumerable,value:r[n]}},defineProperty:function(){Qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qt(12)}},jl={};Fa(Xl,function(e,n){jl[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}}),jl.deleteProperty=function(e,n){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(n))&&Qt(13),jl.set.call(this,e,n,void 0)},jl.set=function(e,n,r){return process.env.NODE_ENV!=="production"&&n!=="length"&&isNaN(parseInt(n))&&Qt(14),Xl.set.call(this,e[0],n,r,e[0])};var vR=function(){function e(r){var a=this;this.O=Rw,this.D=!0,this.produce=function(i,u,c){if(typeof i=="function"&&typeof u!="function"){var f=u;u=i;var p=a;return function(C){var k=this;C===void 0&&(C=f);for(var j=arguments.length,F=Array(j>1?j-1:0),D=1;D<j;D++)F[D-1]=arguments[D];return p.produce(C,function(M){var S;return(S=u).call.apply(S,[k,M].concat(F))})}}var h;if(typeof u!="function"&&Qt(6),c!==void 0&&typeof c!="function"&&Qt(7),_o(i)){var m=Sw(a),b=Kl(a,i,void 0),E=!0;try{h=u(b),E=!1}finally{E?Jf(m):_1(m)}return typeof Promise<"u"&&h instanceof Promise?h.then(function(C){return _b(m,c),wb(C,m)},function(C){throw Jf(m),C}):(_b(m,c),wb(h,m))}if(!i||typeof i!="object"){if((h=u(i))===void 0&&(h=i),h===m_&&(h=void 0),a.D&&p_(h,!0),c){var O=[],R=[];Co("Patches").M(i,h,O,R),c(O,R)}return h}Qt(21,i)},this.produceWithPatches=function(i,u){if(typeof i=="function")return function(h){for(var m=arguments.length,b=Array(m>1?m-1:0),E=1;E<m;E++)b[E-1]=arguments[E];return a.produceWithPatches(h,function(O){return i.apply(void 0,[O].concat(b))})};var c,f,p=a.produce(i,u,function(h,m){c=h,f=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(h){return[h,c,f]}):[p,c,f]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var n=e.prototype;return n.createDraft=function(r){_o(r)||Qt(8),La(r)&&(r=sR(r));var a=Sw(this),i=Kl(this,r,void 0);return i[Ke].C=!0,_1(a),i},n.finishDraft=function(r,a){var i=r&&r[Ke];process.env.NODE_ENV!=="production"&&(i&&i.C||Qt(9),i.I&&Qt(10));var u=i.A;return _b(u,a),wb(void 0,u)},n.setAutoFreeze=function(r){this.D=r},n.setUseProxies=function(r){r&&!Rw&&Qt(20),this.O=r},n.applyPatches=function(r,a){var i;for(i=a.length-1;i>=0;i--){var u=a[i];if(u.path.length===0&&u.op==="replace"){r=u.value;break}}i>-1&&(a=a.slice(i+1));var c=Co("Patches").$;return La(r)?c(r,a):this.produce(r,function(f){return c(f,a)})},e}(),zn=new vR,jf=zn.produce;zn.produceWithPatches.bind(zn);zn.setAutoFreeze.bind(zn);zn.setUseProxies.bind(zn);zn.applyPatches.bind(zn);zn.createDraft.bind(zn);zn.finishDraft.bind(zn);function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Jl(e)}function gR(e,n){if(Jl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n||"default");if(Jl(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function mR(e){var n=gR(e,"string");return Jl(n)==="symbol"?n:String(n)}function yR(e,n,r){return n=mR(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Aw(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,a)}return r}function Pw(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Aw(Object(r),!0).forEach(function(a){yR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aw(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Qr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Dw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ob=function(){return Math.random().toString(36).substring(7).split("").join(".")},Rs={INIT:"@@redux/INIT"+Ob(),REPLACE:"@@redux/REPLACE"+Ob(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ob()}};function KS(e){if(typeof e!="object"||e===null)return!1;for(var n=e;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function bR(e){if(e===void 0)return"undefined";if(e===null)return"null";var n=typeof e;switch(n){case"boolean":case"string":case"number":case"symbol":case"function":return n}if(Array.isArray(e))return"array";if(ER(e))return"date";if(wR(e))return"error";var r=_R(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")}function _R(e){return typeof e.constructor=="function"?e.constructor.name:null}function wR(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ER(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ts(e){var n=typeof e;return process.env.NODE_ENV!=="production"&&(n=bR(e)),n}function XS(e,n,r){var a;if(typeof n=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Qr(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof n=="function"&&typeof r>"u"&&(r=n,n=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(1):"Expected the enhancer to be a function. Instead, received: '"+Ts(r)+"'");return r(XS)(e,n)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(2):"Expected the root reducer to be a function. Instead, received: '"+Ts(e)+"'");var i=e,u=n,c=[],f=c,p=!1;function h(){f===c&&(f=c.slice())}function m(){if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function b(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(4):"Expected the listener to be a function. Instead, received: '"+Ts(C)+"'");if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var k=!0;return h(),f.push(C),function(){if(k){if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");k=!1,h();var F=f.indexOf(C);f.splice(F,1),c=null}}}function E(C){if(!KS(C))throw new Error(process.env.NODE_ENV==="production"?Qr(7):"Actions must be plain objects. Instead, the actual type was: '"+Ts(C)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof C.type>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(9):"Reducers may not dispatch actions.");try{p=!0,u=i(u,C)}finally{p=!1}for(var k=c=f,j=0;j<k.length;j++){var F=k[j];F()}return C}function O(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(10):"Expected the nextReducer to be a function. Instead, received: '"+Ts(C));i=C,E({type:Rs.REPLACE})}function R(){var C,k=b;return C={subscribe:function(F){if(typeof F!="object"||F===null)throw new Error(process.env.NODE_ENV==="production"?Qr(11):"Expected the observer to be an object. Instead, received: '"+Ts(F)+"'");function D(){F.next&&F.next(m())}D();var M=k(D);return{unsubscribe:M}}},C[Dw]=function(){return this},C}return E({type:Rs.INIT}),a={dispatch:E,subscribe:b,getState:m,replaceReducer:O},a[Dw]=R,a}function Iw(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function SR(e,n,r,a){var i=Object.keys(n),u=r&&r.type===Rs.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!KS(e))return"The "+u+' has unexpected type of "'+Ts(e)+'". Expected argument to be an object with the following '+('keys: "'+i.join('", "')+'"');var c=Object.keys(e).filter(function(f){return!n.hasOwnProperty(f)&&!a[f]});if(c.forEach(function(f){a[f]=!0}),!(r&&r.type===Rs.REPLACE)&&c.length>0)return"Unexpected "+(c.length>1?"keys":"key")+" "+('"'+c.join('", "')+'" found in '+u+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.')}function OR(e){Object.keys(e).forEach(function(n){var r=e[n],a=r(void 0,{type:Rs.INIT});if(typeof a>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(12):'The slice reducer for key "'+n+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Rs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(13):'The slice reducer for key "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle '"+Rs.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function JS(e){for(var n=Object.keys(e),r={},a=0;a<n.length;a++){var i=n[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Iw('No reducer provided for key "'+i+'"'),typeof e[i]=="function"&&(r[i]=e[i])}var u=Object.keys(r),c;process.env.NODE_ENV!=="production"&&(c={});var f;try{OR(r)}catch(p){f=p}return function(h,m){if(h===void 0&&(h={}),f)throw f;if(process.env.NODE_ENV!=="production"){var b=SR(h,r,m,c);b&&Iw(b)}for(var E=!1,O={},R=0;R<u.length;R++){var C=u[R],k=r[C],j=h[C],F=k(j,m);if(typeof F>"u"){var D=m&&m.type;throw new Error(process.env.NODE_ENV==="production"?Qr(14):"When called with an action of type "+(D?'"'+String(D)+'"':"(unknown type)")+', the slice reducer for key "'+C+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}O[C]=F,E=E||F!==j}return E=E||u.length!==Object.keys(h).length,E?O:h}}function ed(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.length===0?function(a){return a}:n.length===1?n[0]:n.reduce(function(a,i){return function(){return a(i.apply(void 0,arguments))}})}function TR(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(a){return function(){var i=a.apply(void 0,arguments),u=function(){throw new Error(process.env.NODE_ENV==="production"?Qr(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:i.getState,dispatch:function(){return u.apply(void 0,arguments)}},f=n.map(function(p){return p(c)});return u=ed.apply(void 0,f)(i.dispatch),Pw(Pw({},i),{},{dispatch:u})}}}var td="NOT_FOUND";function xR(e){var n;return{get:function(a){return n&&e(n.key,a)?n.value:td},put:function(a,i){n={key:a,value:i}},getEntries:function(){return n?[n]:[]},clear:function(){n=void 0}}}function CR(e,n){var r=[];function a(f){var p=r.findIndex(function(m){return n(f,m.key)});if(p>-1){var h=r[p];return p>0&&(r.splice(p,1),r.unshift(h)),h.value}return td}function i(f,p){a(f)===td&&(r.unshift({key:f,value:p}),r.length>e&&r.pop())}function u(){return r}function c(){r=[]}return{get:a,put:i,getEntries:u,clear:c}}var RR=function(n,r){return n===r};function AR(e){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;for(var i=r.length,u=0;u<i;u++)if(!e(r[u],a[u]))return!1;return!0}}function PR(e,n){var r=typeof n=="object"?n:{equalityCheck:n},a=r.equalityCheck,i=a===void 0?RR:a,u=r.maxSize,c=u===void 0?1:u,f=r.resultEqualityCheck,p=AR(i),h=c===1?xR(p):CR(c,p);function m(){var b=h.get(arguments);if(b===td){if(b=e.apply(null,arguments),f){var E=h.getEntries(),O=E.find(function(R){return f(R.value,b)});O&&(b=O.value)}h.put(arguments,b)}return b}return m.clearCache=function(){return h.clear()},m}function DR(e){var n=Array.isArray(e[0])?e[0]:e;if(!n.every(function(a){return typeof a=="function"})){var r=n.map(function(a){return typeof a=="function"?"function "+(a.name||"unnamed")+"()":typeof a}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return n}function IR(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var i=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var h=0,m,b={memoizeOptions:void 0},E=f.pop();if(typeof E=="object"&&(b=E,E=f.pop()),typeof E!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof E+"]");var O=b,R=O.memoizeOptions,C=R===void 0?r:R,k=Array.isArray(C)?C:[C],j=DR(f),F=e.apply(void 0,[function(){return h++,E.apply(null,arguments)}].concat(k)),D=e(function(){for(var S=[],q=j.length,U=0;U<q;U++)S.push(j[U].apply(null,arguments));return m=F.apply(null,S),m});return Object.assign(D,{resultFunc:E,memoizedResultFunc:F,dependencies:j,lastResult:function(){return m},recomputations:function(){return h},resetRecomputations:function(){return h=0}}),D};return i}var pe=IR(PR);function ZS(e){var n=function(a){var i=a.dispatch,u=a.getState;return function(c){return function(f){return typeof f=="function"?f(i,u,e):c(f)}}};return n}var QS=ZS();QS.withExtraArgument=ZS;const Mw=QS;var MR=globalThis&&globalThis.__extends||function(){var e=function(n,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(a[u]=i[u])},e(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),kR=globalThis&&globalThis.__generator||function(e,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,i,u,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(h){return function(m){return p([h,m])}}function p(h){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,i&&(u=h[0]&2?i.return:h[0]?i.throw||((u=i.return)&&u.call(i),0):i.next)&&!(u=u.call(i,h[1])).done)return u;switch(i=0,u&&(h=[h[0]&2,u.value]),h[0]){case 0:case 1:u=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,i=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(u=r.trys,!(u=u.length>0&&u[u.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!u||h[1]>u[0]&&h[1]<u[3])){r.label=h[1];break}if(h[0]===6&&r.label<u[1]){r.label=u[1],u=h;break}if(u&&r.label<u[2]){r.label=u[2],r.ops.push(h);break}u[2]&&r.ops.pop(),r.trys.pop();continue}h=n.call(e,r)}catch(m){h=[6,m],i=0}finally{a=u=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},rd=globalThis&&globalThis.__spreadArray||function(e,n){for(var r=0,a=n.length,i=e.length;r<a;r++,i++)e[i]=n[r];return e},$R=Object.defineProperty,NR=Object.defineProperties,jR=Object.getOwnPropertyDescriptors,kw=Object.getOwnPropertySymbols,LR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,$w=function(e,n,r){return n in e?$R(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},Qa=function(e,n){for(var r in n||(n={}))LR.call(n,r)&&$w(e,r,n[r]);if(kw)for(var a=0,i=kw(n);a<i.length;a++){var r=i[a];FR.call(n,r)&&$w(e,r,n[r])}return e},Tb=function(e,n){return NR(e,jR(n))},WR=function(e,n,r){return new Promise(function(a,i){var u=function(p){try{f(r.next(p))}catch(h){i(h)}},c=function(p){try{f(r.throw(p))}catch(h){i(h)}},f=function(p){return p.done?a(p.value):Promise.resolve(p.value).then(u,c)};f((r=r.apply(e,n)).next())})},BR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ed:ed.apply(null,arguments)};function eO(e){if(typeof e!="object"||e===null)return!1;var n=Object.getPrototypeOf(e);if(n===null)return!0;for(var r=n;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return n===r}function tO(e,n){var r=0;return{measureTime:function(a){var i=Date.now();try{return a()}finally{var u=Date.now();r+=u-i}},warnIfExceeded:function(){r>e&&console.warn(n+" took "+r+"ms, which is more than the warning threshold of "+e+`ms.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ie=require("react"),nR=require("react-dom");function oR(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const oe=oR(ie);function Qt(e){for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];if(process.env.NODE_ENV!=="production"){var i=pR[e],u=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+u)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function La(e){return!!e&&!!e[Ke]}function _o(e){var n;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===hR}(e)||Array.isArray(e)||!!e[Wl]||!!(!((n=e.constructor)===null||n===void 0)&&n[Wl])||xd(e)||Cd(e))}function Fa(e,n,r){r===void 0&&(r=!1),ti(e)===0?(r?Object.keys:Ws)(e).forEach(function(a){r&&typeof a=="symbol"||n(a,e[a],e)}):e.forEach(function(a,i){return n(i,a,e)})}function ti(e){var n=e[Ke];return n?n.i>3?n.i-4:n.i:Array.isArray(e)?1:xd(e)?2:Cd(e)?3:0}function Za(e,n){return ti(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Nf(e,n){return ti(e)===2?e.get(n):e[n]}function qS(e,n,r){var a=ti(e);a===2?e.set(n,r):a===3?e.add(r):e[n]=r}function VS(e,n){return e===n?e!==0||1/e==1/n:e!=e&&n!=n}function xd(e){return fR&&e instanceof Map}function Cd(e){return dR&&e instanceof Set}function xr(e){return e.o||e.t}function d_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var n=YS(e);delete n[Ke];for(var r=Ws(n),a=0;a<r.length;a++){var i=r[a],u=n[i];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),n)}function p_(e,n){return n===void 0&&(n=!1),h_(e)||La(e)||!_o(e)||(ti(e)>1&&(e.set=e.add=e.clear=e.delete=aR),Object.freeze(e),n&&Fa(e,function(r,a){return p_(a,!0)},!0)),e}function aR(){Qt(2)}function h_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Co(e){var n=w1[e];return n||Qt(18,e),n}function v_(e,n){w1[e]||(w1[e]=n)}function Yl(){return process.env.NODE_ENV==="production"||Ks||Qt(0),Ks}function _b(e,n){n&&(Co("Patches"),e.u=[],e.s=[],e.v=n)}function Jf(e){_1(e),e.p.forEach(iR),e.p=null}function _1(e){e===Ks&&(Ks=e.l)}function Sw(e){return Ks={p:[],l:Ks,h:e,m:!0,_:0}}function iR(e){var n=e[Ke];n.i===0||n.i===1?n.j():n.g=!0}function wb(e,n){n._=n.p.length;var r=n.p[0],a=e!==void 0&&e!==r;return n.h.O||Co("ES5").S(n,e,a),a?(r[Ke].P&&(Jf(n),Qt(4)),_o(e)&&(e=Zf(n,e),n.l||Qf(n,e)),n.u&&Co("Patches").M(r[Ke].t,e,n.u,n.s)):e=Zf(n,r,[]),Jf(n),n.u&&n.v(n.u,n.s),e!==m_?e:void 0}function Zf(e,n,r){if(h_(n))return n;var a=n[Ke];if(!a)return Fa(n,function(f,p){return Ow(e,a,n,f,p,r)},!0),n;if(a.A!==e)return n;if(!a.P)return Qf(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var i=a.i===4||a.i===5?a.o=d_(a.k):a.o,u=i,c=!1;a.i===3&&(u=new Set(i),i.clear(),c=!0),Fa(u,function(f,p){return Ow(e,a,i,f,p,r,c)}),Qf(e,i,!1),r&&e.u&&Co("Patches").N(a,r,e.u,e.s)}return a.o}function Ow(e,n,r,a,i,u,c){if(process.env.NODE_ENV!=="production"&&i===r&&Qt(5),La(i)){var f=Zf(e,i,u&&n&&n.i!==3&&!Za(n.R,a)?u.concat(a):void 0);if(qS(r,a,f),!La(f))return;e.m=!1}else c&&r.add(i);if(_o(i)&&!h_(i)){if(!e.h.D&&e._<1)return;Zf(e,i),n&&n.A.l||Qf(e,i)}}function Qf(e,n,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&p_(n,r)}function Eb(e,n){var r=e[Ke];return(r?xr(r):e)[n]}function Tw(e,n){if(n in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,n);if(a)return a;r=Object.getPrototypeOf(r)}}function Sn(e){e.P||(e.P=!0,e.l&&Sn(e.l))}function Sb(e){e.o||(e.o=d_(e.t))}function Kl(e,n,r){var a=xd(n)?Co("MapSet").F(n,r):Cd(n)?Co("MapSet").T(n,r):e.O?function(i,u){var c=Array.isArray(i),f={i:c?1:0,A:u?u.A:Yl(),P:!1,I:!1,R:{},l:u,t:i,k:null,o:null,j:null,C:!1},p=f,h=Xl;c&&(p=[f],h=jl);var m=Proxy.revocable(p,h),b=m.revoke,E=m.proxy;return f.k=E,f.j=b,E}(n,r):Co("ES5").J(n,r);return(r?r.A:Yl()).p.push(a),a}function sR(e){return La(e)||Qt(22,e),function n(r){if(!_o(r))return r;var a,i=r[Ke],u=ti(r);if(i){if(!i.P&&(i.i<4||!Co("ES5").K(i)))return i.t;i.I=!0,a=xw(r,u),i.I=!1}else a=xw(r,u);return Fa(a,function(c,f){i&&Nf(i.t,c)===f||qS(a,c,n(f))}),u===3?new Set(a):a}(e)}function xw(e,n){switch(n){case 2:return new Map(e);case 3:return Array.from(e)}return d_(e)}function uR(){function e(c,f){var p=u[c];return p?p.enumerable=f:u[c]=p={configurable:!0,enumerable:f,get:function(){var h=this[Ke];return process.env.NODE_ENV!=="production"&&i(h),Xl.get(h,c)},set:function(h){var m=this[Ke];process.env.NODE_ENV!=="production"&&i(m),Xl.set(m,c,h)}},p}function n(c){for(var f=c.length-1;f>=0;f--){var p=c[f][Ke];if(!p.P)switch(p.i){case 5:a(p)&&Sn(p);break;case 4:r(p)&&Sn(p)}}}function r(c){for(var f=c.t,p=c.k,h=Ws(p),m=h.length-1;m>=0;m--){var b=h[m];if(b!==Ke){var E=f[b];if(E===void 0&&!Za(f,b))return!0;var O=p[b],R=O&&O[Ke];if(R?R.t!==E:!VS(O,E))return!0}}var C=!!f[Ke];return h.length!==Ws(f).length+(C?0:1)}function a(c){var f=c.k;if(f.length!==c.t.length)return!0;var p=Object.getOwnPropertyDescriptor(f,f.length-1);if(p&&!p.get)return!0;for(var h=0;h<f.length;h++)if(!f.hasOwnProperty(h))return!0;return!1}function i(c){c.g&&Qt(3,JSON.stringify(xr(c)))}var u={};v_("ES5",{J:function(c,f){var p=Array.isArray(c),h=function(b,E){if(b){for(var O=Array(E.length),R=0;R<E.length;R++)Object.defineProperty(O,""+R,e(R,!0));return O}var C=YS(E);delete C[Ke];for(var k=Ws(C),j=0;j<k.length;j++){var F=k[j];C[F]=e(F,b||!!C[F].enumerable)}return Object.create(Object.getPrototypeOf(E),C)}(p,c),m={i:p?5:4,A:f?f.A:Yl(),P:!1,I:!1,R:{},l:f,t:c,k:h,o:null,g:!1,C:!1};return Object.defineProperty(h,Ke,{value:m,writable:!0}),h},S:function(c,f,p){p?La(f)&&f[Ke].A===c&&n(c.p):(c.u&&function h(m){if(m&&typeof m=="object"){var b=m[Ke];if(b){var E=b.t,O=b.k,R=b.R,C=b.i;if(C===4)Fa(O,function(M){M!==Ke&&(E[M]!==void 0||Za(E,M)?R[M]||h(O[M]):(R[M]=!0,Sn(b)))}),Fa(E,function(M){O[M]!==void 0||Za(O,M)||(R[M]=!1,Sn(b))});else if(C===5){if(a(b)&&(Sn(b),R.length=!0),O.length<E.length)for(var k=O.length;k<E.length;k++)R[k]=!1;else for(var j=E.length;j<O.length;j++)R[j]=!0;for(var F=Math.min(O.length,E.length),D=0;D<F;D++)O.hasOwnProperty(D)||(R[D]=!0),R[D]===void 0&&h(O[D])}}}}(c.p[0]),n(c.p))},K:function(c){return c.i===4?r(c):a(c)}})}function cR(){function e(a){if(!_o(a))return a;if(Array.isArray(a))return a.map(e);if(xd(a))return new Map(Array.from(a.entries()).map(function(c){return[c[0],e(c[1])]}));if(Cd(a))return new Set(Array.from(a).map(e));var i=Object.create(Object.getPrototypeOf(a));for(var u in a)i[u]=e(a[u]);return Za(a,Wl)&&(i[Wl]=a[Wl]),i}function n(a){return La(a)?e(a):a}var r="add";v_("Patches",{$:function(a,i){return i.forEach(function(u){for(var c=u.path,f=u.op,p=a,h=0;h<c.length-1;h++){var m=ti(p),b=c[h];typeof b!="string"&&typeof b!="number"&&(b=""+b),m!==0&&m!==1||b!=="__proto__"&&b!=="constructor"||Qt(24),typeof p=="function"&&b==="prototype"&&Qt(24),typeof(p=Nf(p,b))!="object"&&Qt(15,c.join("/"))}var E=ti(p),O=e(u.value),R=c[c.length-1];switch(f){case"replace":switch(E){case 2:return p.set(R,O);case 3:Qt(16);default:return p[R]=O}case r:switch(E){case 1:return R==="-"?p.push(O):p.splice(R,0,O);case 2:return p.set(R,O);case 3:return p.add(O);default:return p[R]=O}case"remove":switch(E){case 1:return p.splice(R,1);case 2:return p.delete(R);case 3:return p.delete(u.value);default:return delete p[R]}default:Qt(17,f)}}),a},N:function(a,i,u,c){switch(a.i){case 0:case 4:case 2:return function(f,p,h,m){var b=f.t,E=f.o;Fa(f.R,function(O,R){var C=Nf(b,O),k=Nf(E,O),j=R?Za(b,O)?"replace":r:"remove";if(C!==k||j!=="replace"){var F=p.concat(O);h.push(j==="remove"?{op:j,path:F}:{op:j,path:F,value:k}),m.push(j===r?{op:"remove",path:F}:j==="remove"?{op:r,path:F,value:n(C)}:{op:"replace",path:F,value:n(C)})}})}(a,i,u,c);case 5:case 1:return function(f,p,h,m){var b=f.t,E=f.R,O=f.o;if(O.length<b.length){var R=[O,b];b=R[0],O=R[1];var C=[m,h];h=C[0],m=C[1]}for(var k=0;k<b.length;k++)if(E[k]&&O[k]!==b[k]){var j=p.concat([k]);h.push({op:"replace",path:j,value:n(O[k])}),m.push({op:"replace",path:j,value:n(b[k])})}for(var F=b.length;F<O.length;F++){var D=p.concat([F]);h.push({op:r,path:D,value:n(O[F])})}b.length<O.length&&m.push({op:"replace",path:p.concat(["length"]),value:b.length})}(a,i,u,c);case 3:return function(f,p,h,m){var b=f.t,E=f.o,O=0;b.forEach(function(R){if(!E.has(R)){var C=p.concat([O]);h.push({op:"remove",path:C,value:R}),m.unshift({op:r,path:C,value:R})}O++}),O=0,E.forEach(function(R){if(!b.has(R)){var C=p.concat([O]);h.push({op:r,path:C,value:R}),m.unshift({op:"remove",path:C,value:R})}O++})}(a,i,u,c)}},M:function(a,i,u,c){u.push({op:"replace",path:[],value:i===m_?void 0:i}),c.push({op:"replace",path:[],value:a})}})}function lR(){function e(f,p){function h(){this.constructor=f}i(f,p),f.prototype=(h.prototype=p.prototype,new h)}function n(f){f.o||(f.R=new Map,f.o=new Map(f.t))}function r(f){f.o||(f.o=new Set,f.t.forEach(function(p){if(_o(p)){var h=Kl(f.A.h,p,f);f.p.set(p,h),f.o.add(h)}else f.o.add(p)}))}function a(f){f.g&&Qt(3,JSON.stringify(xr(f)))}var i=function(f,p){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,m){h.__proto__=m}||function(h,m){for(var b in m)m.hasOwnProperty(b)&&(h[b]=m[b])})(f,p)},u=function(){function f(h,m){return this[Ke]={i:2,l:m,A:m?m.A:Yl(),P:!1,I:!1,o:void 0,R:void 0,t:h,k:this,C:!1,g:!1},this}e(f,Map);var p=f.prototype;return Object.defineProperty(p,"size",{get:function(){return xr(this[Ke]).size}}),p.has=function(h){return xr(this[Ke]).has(h)},p.set=function(h,m){var b=this[Ke];return a(b),xr(b).has(h)&&xr(b).get(h)===m||(n(b),Sn(b),b.R.set(h,!0),b.o.set(h,m),b.R.set(h,!0)),this},p.delete=function(h){if(!this.has(h))return!1;var m=this[Ke];return a(m),n(m),Sn(m),m.t.has(h)?m.R.set(h,!1):m.R.delete(h),m.o.delete(h),!0},p.clear=function(){var h=this[Ke];a(h),xr(h).size&&(n(h),Sn(h),h.R=new Map,Fa(h.t,function(m){h.R.set(m,!1)}),h.o.clear())},p.forEach=function(h,m){var b=this;xr(this[Ke]).forEach(function(E,O){h.call(m,b.get(O),O,b)})},p.get=function(h){var m=this[Ke];a(m);var b=xr(m).get(h);if(m.I||!_o(b)||b!==m.t.get(h))return b;var E=Kl(m.A.h,b,m);return n(m),m.o.set(h,E),E},p.keys=function(){return xr(this[Ke]).keys()},p.values=function(){var h,m=this,b=this.keys();return(h={})[bf]=function(){return m.values()},h.next=function(){var E=b.next();return E.done?E:{done:!1,value:m.get(E.value)}},h},p.entries=function(){var h,m=this,b=this.keys();return(h={})[bf]=function(){return m.entries()},h.next=function(){var E=b.next();if(E.done)return E;var O=m.get(E.value);return{done:!1,value:[E.value,O]}},h},p[bf]=function(){return this.entries()},f}(),c=function(){function f(h,m){return this[Ke]={i:3,l:m,A:m?m.A:Yl(),P:!1,I:!1,o:void 0,t:h,k:this,p:new Map,g:!1,C:!1},this}e(f,Set);var p=f.prototype;return Object.defineProperty(p,"size",{get:function(){return xr(this[Ke]).size}}),p.has=function(h){var m=this[Ke];return a(m),m.o?!!m.o.has(h)||!(!m.p.has(h)||!m.o.has(m.p.get(h))):m.t.has(h)},p.add=function(h){var m=this[Ke];return a(m),this.has(h)||(r(m),Sn(m),m.o.add(h)),this},p.delete=function(h){if(!this.has(h))return!1;var m=this[Ke];return a(m),r(m),Sn(m),m.o.delete(h)||!!m.p.has(h)&&m.o.delete(m.p.get(h))},p.clear=function(){var h=this[Ke];a(h),xr(h).size&&(r(h),Sn(h),h.o.clear())},p.values=function(){var h=this[Ke];return a(h),r(h),h.o.values()},p.entries=function(){var h=this[Ke];return a(h),r(h),h.o.entries()},p.keys=function(){return this.values()},p[bf]=function(){return this.values()},p.forEach=function(h,m){for(var b=this.values(),E=b.next();!E.done;)h.call(m,E.value,E.value,this),E=b.next()},f}();v_("MapSet",{F:function(f,p){return new u(f,p)},T:function(f,p){return new c(f,p)}})}var Cw,Ks,g_=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fR=typeof Map<"u",dR=typeof Set<"u",Rw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",m_=g_?Symbol.for("immer-nothing"):((Cw={})["immer-nothing"]=!0,Cw),Wl=g_?Symbol.for("immer-draftable"):"__$immer_draftable",Ke=g_?Symbol.for("immer-state"):"__$immer_state",bf=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",pR={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},hR=""+Object.prototype.constructor,Ws=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,YS=Object.getOwnPropertyDescriptors||function(e){var n={};return Ws(e).forEach(function(r){n[r]=Object.getOwnPropertyDescriptor(e,r)}),n},w1={},Xl={get:function(e,n){if(n===Ke)return e;var r=xr(e);if(!Za(r,n))return function(i,u,c){var f,p=Tw(u,c);return p?"value"in p?p.value:(f=p.get)===null||f===void 0?void 0:f.call(i.k):void 0}(e,r,n);var a=r[n];return e.I||!_o(a)?a:a===Eb(e.t,n)?(Sb(e),e.o[n]=Kl(e.A.h,a,e)):a},has:function(e,n){return n in xr(e)},ownKeys:function(e){return Reflect.ownKeys(xr(e))},set:function(e,n,r){var a=Tw(xr(e),n);if(a!=null&&a.set)return a.set.call(e.k,r),!0;if(!e.P){var i=Eb(xr(e),n),u=i==null?void 0:i[Ke];if(u&&u.t===r)return e.o[n]=r,e.R[n]=!1,!0;if(VS(r,i)&&(r!==void 0||Za(e.t,n)))return!0;Sb(e),Sn(e)}return e.o[n]===r&&(r!==void 0||n in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[n])||(e.o[n]=r,e.R[n]=!0),!0},deleteProperty:function(e,n){return Eb(e.t,n)!==void 0||n in e.t?(e.R[n]=!1,Sb(e),Sn(e)):delete e.R[n],e.o&&delete e.o[n],!0},getOwnPropertyDescriptor:function(e,n){var r=xr(e),a=Reflect.getOwnPropertyDescriptor(r,n);return a&&{writable:!0,configurable:e.i!==1||n!=="length",enumerable:a.enumerable,value:r[n]}},defineProperty:function(){Qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Qt(12)}},jl={};Fa(Xl,function(e,n){jl[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}}),jl.deleteProperty=function(e,n){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(n))&&Qt(13),jl.set.call(this,e,n,void 0)},jl.set=function(e,n,r){return process.env.NODE_ENV!=="production"&&n!=="length"&&isNaN(parseInt(n))&&Qt(14),Xl.set.call(this,e[0],n,r,e[0])};var vR=function(){function e(r){var a=this;this.O=Rw,this.D=!0,this.produce=function(i,u,c){if(typeof i=="function"&&typeof u!="function"){var f=u;u=i;var p=a;return function(C){var k=this;C===void 0&&(C=f);for(var j=arguments.length,F=Array(j>1?j-1:0),D=1;D<j;D++)F[D-1]=arguments[D];return p.produce(C,function(M){var S;return(S=u).call.apply(S,[k,M].concat(F))})}}var h;if(typeof u!="function"&&Qt(6),c!==void 0&&typeof c!="function"&&Qt(7),_o(i)){var m=Sw(a),b=Kl(a,i,void 0),E=!0;try{h=u(b),E=!1}finally{E?Jf(m):_1(m)}return typeof Promise<"u"&&h instanceof Promise?h.then(function(C){return _b(m,c),wb(C,m)},function(C){throw Jf(m),C}):(_b(m,c),wb(h,m))}if(!i||typeof i!="object"){if((h=u(i))===void 0&&(h=i),h===m_&&(h=void 0),a.D&&p_(h,!0),c){var O=[],R=[];Co("Patches").M(i,h,O,R),c(O,R)}return h}Qt(21,i)},this.produceWithPatches=function(i,u){if(typeof i=="function")return function(h){for(var m=arguments.length,b=Array(m>1?m-1:0),E=1;E<m;E++)b[E-1]=arguments[E];return a.produceWithPatches(h,function(O){return i.apply(void 0,[O].concat(b))})};var c,f,p=a.produce(i,u,function(h,m){c=h,f=m});return typeof Promise<"u"&&p instanceof Promise?p.then(function(h){return[h,c,f]}):[p,c,f]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var n=e.prototype;return n.createDraft=function(r){_o(r)||Qt(8),La(r)&&(r=sR(r));var a=Sw(this),i=Kl(this,r,void 0);return i[Ke].C=!0,_1(a),i},n.finishDraft=function(r,a){var i=r&&r[Ke];process.env.NODE_ENV!=="production"&&(i&&i.C||Qt(9),i.I&&Qt(10));var u=i.A;return _b(u,a),wb(void 0,u)},n.setAutoFreeze=function(r){this.D=r},n.setUseProxies=function(r){r&&!Rw&&Qt(20),this.O=r},n.applyPatches=function(r,a){var i;for(i=a.length-1;i>=0;i--){var u=a[i];if(u.path.length===0&&u.op==="replace"){r=u.value;break}}i>-1&&(a=a.slice(i+1));var c=Co("Patches").$;return La(r)?c(r,a):this.produce(r,function(f){return c(f,a)})},e}(),zn=new vR,jf=zn.produce;zn.produceWithPatches.bind(zn);zn.setAutoFreeze.bind(zn);zn.setUseProxies.bind(zn);zn.applyPatches.bind(zn);zn.createDraft.bind(zn);zn.finishDraft.bind(zn);function Jl(e){"@babel/helpers - typeof";return Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Jl(e)}function gR(e,n){if(Jl(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,n||"default");if(Jl(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function mR(e){var n=gR(e,"string");return Jl(n)==="symbol"?n:String(n)}function yR(e,n,r){return n=mR(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Aw(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,a)}return r}function Pw(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Aw(Object(r),!0).forEach(function(a){yR(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Aw(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function Qr(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Dw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ob=function(){return Math.random().toString(36).substring(7).split("").join(".")},Rs={INIT:"@@redux/INIT"+Ob(),REPLACE:"@@redux/REPLACE"+Ob(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ob()}};function KS(e){if(typeof e!="object"||e===null)return!1;for(var n=e;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}function bR(e){if(e===void 0)return"undefined";if(e===null)return"null";var n=typeof e;switch(n){case"boolean":case"string":case"number":case"symbol":case"function":return n}if(Array.isArray(e))return"array";if(ER(e))return"date";if(wR(e))return"error";var r=_R(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")}function _R(e){return typeof e.constructor=="function"?e.constructor.name:null}function wR(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ER(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ts(e){var n=typeof e;return process.env.NODE_ENV!=="production"&&(n=bR(e)),n}function XS(e,n,r){var a;if(typeof n=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Qr(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof n=="function"&&typeof r>"u"&&(r=n,n=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(1):"Expected the enhancer to be a function. Instead, received: '"+Ts(r)+"'");return r(XS)(e,n)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(2):"Expected the root reducer to be a function. Instead, received: '"+Ts(e)+"'");var i=e,u=n,c=[],f=c,p=!1;function h(){f===c&&(f=c.slice())}function m(){if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function b(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(4):"Expected the listener to be a function. Instead, received: '"+Ts(C)+"'");if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var k=!0;return h(),f.push(C),function(){if(k){if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");k=!1,h();var F=f.indexOf(C);f.splice(F,1),c=null}}}function E(C){if(!KS(C))throw new Error(process.env.NODE_ENV==="production"?Qr(7):"Actions must be plain objects. Instead, the actual type was: '"+Ts(C)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof C.type>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(p)throw new Error(process.env.NODE_ENV==="production"?Qr(9):"Reducers may not dispatch actions.");try{p=!0,u=i(u,C)}finally{p=!1}for(var k=c=f,j=0;j<k.length;j++){var F=k[j];F()}return C}function O(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Qr(10):"Expected the nextReducer to be a function. Instead, received: '"+Ts(C));i=C,E({type:Rs.REPLACE})}function R(){var C,k=b;return C={subscribe:function(F){if(typeof F!="object"||F===null)throw new Error(process.env.NODE_ENV==="production"?Qr(11):"Expected the observer to be an object. Instead, received: '"+Ts(F)+"'");function D(){F.next&&F.next(m())}D();var M=k(D);return{unsubscribe:M}}},C[Dw]=function(){return this},C}return E({type:Rs.INIT}),a={dispatch:E,subscribe:b,getState:m,replaceReducer:O},a[Dw]=R,a}function Iw(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function SR(e,n,r,a){var i=Object.keys(n),u=r&&r.type===Rs.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!KS(e))return"The "+u+' has unexpected type of "'+Ts(e)+'". Expected argument to be an object with the following '+('keys: "'+i.join('", "')+'"');var c=Object.keys(e).filter(function(f){return!n.hasOwnProperty(f)&&!a[f]});if(c.forEach(function(f){a[f]=!0}),!(r&&r.type===Rs.REPLACE)&&c.length>0)return"Unexpected "+(c.length>1?"keys":"key")+" "+('"'+c.join('", "')+'" found in '+u+". ")+"Expected to find one of the known reducer keys instead: "+('"'+i.join('", "')+'". Unexpected keys will be ignored.')}function OR(e){Object.keys(e).forEach(function(n){var r=e[n],a=r(void 0,{type:Rs.INIT});if(typeof a>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(12):'The slice reducer for key "'+n+`" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:Rs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Qr(13):'The slice reducer for key "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle '"+Rs.INIT+`' or other actions in "redux/*" `)+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function JS(e){for(var n=Object.keys(e),r={},a=0;a<n.length;a++){var i=n[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Iw('No reducer provided for key "'+i+'"'),typeof e[i]=="function"&&(r[i]=e[i])}var u=Object.keys(r),c;process.env.NODE_ENV!=="production"&&(c={});var f;try{OR(r)}catch(p){f=p}return function(h,m){if(h===void 0&&(h={}),f)throw f;if(process.env.NODE_ENV!=="production"){var b=SR(h,r,m,c);b&&Iw(b)}for(var E=!1,O={},R=0;R<u.length;R++){var C=u[R],k=r[C],j=h[C],F=k(j,m);if(typeof F>"u"){var D=m&&m.type;throw new Error(process.env.NODE_ENV==="production"?Qr(14):"When called with an action of type "+(D?'"'+String(D)+'"':"(unknown type)")+', the slice reducer for key "'+C+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}O[C]=F,E=E||F!==j}return E=E||u.length!==Object.keys(h).length,E?O:h}}function ed(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.length===0?function(a){return a}:n.length===1?n[0]:n.reduce(function(a,i){return function(){return a(i.apply(void 0,arguments))}})}function TR(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(a){return function(){var i=a.apply(void 0,arguments),u=function(){throw new Error(process.env.NODE_ENV==="production"?Qr(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:i.getState,dispatch:function(){return u.apply(void 0,arguments)}},f=n.map(function(p){return p(c)});return u=ed.apply(void 0,f)(i.dispatch),Pw(Pw({},i),{},{dispatch:u})}}}var td="NOT_FOUND";function xR(e){var n;return{get:function(a){return n&&e(n.key,a)?n.value:td},put:function(a,i){n={key:a,value:i}},getEntries:function(){return n?[n]:[]},clear:function(){n=void 0}}}function CR(e,n){var r=[];function a(f){var p=r.findIndex(function(m){return n(f,m.key)});if(p>-1){var h=r[p];return p>0&&(r.splice(p,1),r.unshift(h)),h.value}return td}function i(f,p){a(f)===td&&(r.unshift({key:f,value:p}),r.length>e&&r.pop())}function u(){return r}function c(){r=[]}return{get:a,put:i,getEntries:u,clear:c}}var RR=function(n,r){return n===r};function AR(e){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;for(var i=r.length,u=0;u<i;u++)if(!e(r[u],a[u]))return!1;return!0}}function PR(e,n){var r=typeof n=="object"?n:{equalityCheck:n},a=r.equalityCheck,i=a===void 0?RR:a,u=r.maxSize,c=u===void 0?1:u,f=r.resultEqualityCheck,p=AR(i),h=c===1?xR(p):CR(c,p);function m(){var b=h.get(arguments);if(b===td){if(b=e.apply(null,arguments),f){var E=h.getEntries(),O=E.find(function(R){return f(R.value,b)});O&&(b=O.value)}h.put(arguments,b)}return b}return m.clearCache=function(){return h.clear()},m}function DR(e){var n=Array.isArray(e[0])?e[0]:e;if(!n.every(function(a){return typeof a=="function"})){var r=n.map(function(a){return typeof a=="function"?"function "+(a.name||"unnamed")+"()":typeof a}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return n}function IR(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var i=function(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var h=0,m,b={memoizeOptions:void 0},E=f.pop();if(typeof E=="object"&&(b=E,E=f.pop()),typeof E!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof E+"]");var O=b,R=O.memoizeOptions,C=R===void 0?r:R,k=Array.isArray(C)?C:[C],j=DR(f),F=e.apply(void 0,[function(){return h++,E.apply(null,arguments)}].concat(k)),D=e(function(){for(var S=[],q=j.length,U=0;U<q;U++)S.push(j[U].apply(null,arguments));return m=F.apply(null,S),m});return Object.assign(D,{resultFunc:E,memoizedResultFunc:F,dependencies:j,lastResult:function(){return m},recomputations:function(){return h},resetRecomputations:function(){return h=0}}),D};return i}var pe=IR(PR);function ZS(e){var n=function(a){var i=a.dispatch,u=a.getState;return function(c){return function(f){return typeof f=="function"?f(i,u,e):c(f)}}};return n}var QS=ZS();QS.withExtraArgument=ZS;const Mw=QS;var MR=globalThis&&globalThis.__extends||function(){var e=function(n,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,i){a.__proto__=i}||function(a,i){for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(a[u]=i[u])},e(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}(),kR=globalThis&&globalThis.__generator||function(e,n){var r={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},a,i,u,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(h){return function(m){return p([h,m])}}function p(h){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,i&&(u=h[0]&2?i.return:h[0]?i.throw||((u=i.return)&&u.call(i),0):i.next)&&!(u=u.call(i,h[1])).done)return u;switch(i=0,u&&(h=[h[0]&2,u.value]),h[0]){case 0:case 1:u=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,i=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(u=r.trys,!(u=u.length>0&&u[u.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!u||h[1]>u[0]&&h[1]<u[3])){r.label=h[1];break}if(h[0]===6&&r.label<u[1]){r.label=u[1],u=h;break}if(u&&r.label<u[2]){r.label=u[2],r.ops.push(h);break}u[2]&&r.ops.pop(),r.trys.pop();continue}h=n.call(e,r)}catch(m){h=[6,m],i=0}finally{a=u=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},rd=globalThis&&globalThis.__spreadArray||function(e,n){for(var r=0,a=n.length,i=e.length;r<a;r++,i++)e[i]=n[r];return e},$R=Object.defineProperty,NR=Object.defineProperties,jR=Object.getOwnPropertyDescriptors,kw=Object.getOwnPropertySymbols,LR=Object.prototype.hasOwnProperty,FR=Object.prototype.propertyIsEnumerable,$w=function(e,n,r){return n in e?$R(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},Qa=function(e,n){for(var r in n||(n={}))LR.call(n,r)&&$w(e,r,n[r]);if(kw)for(var a=0,i=kw(n);a<i.length;a++){var r=i[a];FR.call(n,r)&&$w(e,r,n[r])}return e},Tb=function(e,n){return NR(e,jR(n))},WR=function(e,n,r){return new Promise(function(a,i){var u=function(p){try{f(r.next(p))}catch(h){i(h)}},c=function(p){try{f(r.throw(p))}catch(h){i(h)}},f=function(p){return p.done?a(p.value):Promise.resolve(p.value).then(u,c)};f((r=r.apply(e,n)).next())})},BR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ed:ed.apply(null,arguments)};function eO(e){if(typeof e!="object"||e===null)return!1;var n=Object.getPrototypeOf(e);if(n===null)return!0;for(var r=n;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return n===r}function tO(e,n){var r=0;return{measureTime:function(a){var i=Date.now();try{return a()}finally{var u=Date.now();r+=u-i}},warnIfExceeded:function(){r>e&&console.warn(n+" took "+r+"ms, which is more than the warning threshold of "+e+`ms.
2
2
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
3
3
  It is disabled in production builds, so you don't need to worry about that.`)}}}var UR=function(e){MR(n,e);function n(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var i=e.apply(this,r)||this;return Object.setPrototypeOf(i,n.prototype),i}return Object.defineProperty(n,Symbol.species,{get:function(){return n},enumerable:!1,configurable:!0}),n.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},n.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(n.bind.apply(n,rd([void 0],r[0].concat(this)))):new(n.bind.apply(n,rd([void 0],r.concat(this))))},n}(Array),zR=process.env.NODE_ENV==="production",Nw="Invariant failed";function jw(e,n){if(!e)throw zR?new Error(Nw):new Error(Nw+": "+(n||""))}function HR(e,n,r,a){return JSON.stringify(e,GR(n,a),r)}function GR(e,n){var r=[],a=[];return n||(n=function(i,u){return r[0]===u?"[Circular ~]":"[Circular ~."+a.slice(0,r.indexOf(u)).join(".")+"]"}),function(i,u){if(r.length>0){var c=r.indexOf(this);~c?r.splice(c+1):r.push(this),~c?a.splice(c,1/0,i):a.push(i),~r.indexOf(u)&&(u=n.call(this,i,u))}else r.push(u);return e==null?u:e.call(this,i,u)}}function qR(e){return typeof e!="object"||e===null||typeof e>"u"||Object.isFrozen(e)}function VR(e,n,r){var a=rO(e,n,r);return{detectMutations:function(){return nO(e,n,a,r)}}}function rO(e,n,r,a){n===void 0&&(n=[]),a===void 0&&(a="");var i={value:r};if(!e(r)){i.children={};for(var u in r){var c=a?a+"."+u:u;n.length&&n.indexOf(c)!==-1||(i.children[u]=rO(e,n,r[u],c))}}return i}function nO(e,n,r,a,i,u){n===void 0&&(n=[]),i===void 0&&(i=!1),u===void 0&&(u="");var c=r?r.value:void 0,f=c===a;if(i&&!f&&!Number.isNaN(a))return{wasMutated:!0,path:u};if(e(c)||e(a))return{wasMutated:!1};var p={};for(var h in r.children)p[h]=!0;for(var h in a)p[h]=!0;for(var h in p){var m=u?u+"."+h:h;if(!(n.length&&n.indexOf(m)!==-1)){var b=nO(e,n,r.children[h],a[h],f,m);if(b.wasMutated)return b}}return{wasMutated:!1}}function YR(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(p){return function(h){return p(h)}}};var n=e.isImmutable,r=n===void 0?qR:n,a=e.ignoredPaths,i=e.warnAfter,u=i===void 0?32:i,c=e.ignore;a=a||c;var f=VR.bind(null,r,a);return function(p){var h=p.getState,m=h(),b=f(m),E;return function(O){return function(R){var C=tO(u,"ImmutableStateInvariantMiddleware");C.measureTime(function(){m=h(),E=b.detectMutations(),b=f(m),jw(!E.wasMutated,"A state mutation was detected between dispatches, in the path '"+(E.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var k=O(R);return C.measureTime(function(){m=h(),E=b.detectMutations(),b=f(m),E.wasMutated&&jw(!E.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(E.path||"")+". Take a look at the reducer(s) handling the action "+HR(R)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),C.warnIfExceeded(),k}}}}function oO(e){var n=typeof e;return n==="undefined"||e===null||n==="string"||n==="boolean"||n==="number"||Array.isArray(e)||eO(e)}function E1(e,n,r,a,i){n===void 0&&(n=""),r===void 0&&(r=oO),i===void 0&&(i=[]);var u;if(!r(e))return{keyPath:n||"<root>",value:e};if(typeof e!="object"||e===null)return!1;for(var c=a!=null?a(e):Object.entries(e),f=i.length>0,p=0,h=c;p<h.length;p++){var m=h[p],b=m[0],E=m[1],O=n?n+"."+b:b;if(!(f&&i.indexOf(O)>=0)){if(!r(E))return{keyPath:O,value:E};if(typeof E=="object"&&(u=E1(E,O,r,a,i),u))return u}}return!1}function KR(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(R){return function(C){return R(C)}}};var n=e.isSerializable,r=n===void 0?oO:n,a=e.getEntries,i=e.ignoredActions,u=i===void 0?[]:i,c=e.ignoredActionPaths,f=c===void 0?["meta.arg","meta.baseQueryMeta"]:c,p=e.ignoredPaths,h=p===void 0?[]:p,m=e.warnAfter,b=m===void 0?32:m,E=e.ignoreState,O=E===void 0?!1:E;return function(R){return function(C){return function(k){if(u.length&&u.indexOf(k.type)!==-1)return C(k);var j=tO(b,"SerializableStateInvariantMiddleware");j.measureTime(function(){var D=E1(k,"",r,a,f);if(D){var M=D.keyPath,S=D.value;console.error("A non-serializable value was detected in an action, in the path: `"+M+"`. Value:",S,`
4
4
  Take a look at the logic that dispatched this action: `,k,`
5
5
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
6
6
  (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}});var F=C(k);return O||(j.measureTime(function(){var D=R.getState(),M=E1(D,"",r,a,h);if(M){var S=M.keyPath,q=M.value;console.error("A non-serializable value was detected in the state, in the path: `"+S+"`. Value:",q,`
7
7
  Take a look at the reducer(s) handling this action type: `+k.type+`.
8
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),j.warnIfExceeded()),F}}}}function xb(e){return typeof e=="boolean"}function XR(){return function(n){return JR(n)}}function JR(e){e===void 0&&(e={});var n=e.thunk,r=n===void 0?!0:n,a=e.immutableCheck,i=a===void 0?!0:a,u=e.serializableCheck,c=u===void 0?!0:u,f=new UR;if(r&&(xb(r)?f.push(Mw):f.push(Mw.withExtraArgument(r.extraArgument))),process.env.NODE_ENV!=="production"){if(i){var p={};xb(i)||(p=i),f.unshift(YR(p))}if(c){var h={};xb(c)||(h=c),f.push(KR(h))}}return f}var Cb=process.env.NODE_ENV==="production";function ZR(e){var n=XR(),r=e||{},a=r.reducer,i=a===void 0?void 0:a,u=r.middleware,c=u===void 0?n():u,f=r.devTools,p=f===void 0?!0:f,h=r.preloadedState,m=h===void 0?void 0:h,b=r.enhancers,E=b===void 0?void 0:b,O;if(typeof i=="function")O=i;else if(eO(i))O=JS(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var R=c;if(typeof R=="function"&&(R=R(n),!Cb&&!Array.isArray(R)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cb&&R.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=TR.apply(void 0,R),k=ed;p&&(k=BR(Qa({trace:!Cb},typeof p=="object"&&p)));var j=[C];Array.isArray(E)?j=rd([C],E):typeof E=="function"&&(j=E(j));var F=k.apply(void 0,j);return XS(O,m,F)}function _n(e,n){function r(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];if(n){var u=n.apply(void 0,a);if(!u)throw new Error("prepareAction did not return an object");return Qa(Qa({type:e,payload:u.payload},"meta"in u&&{meta:u.meta}),"error"in u&&{error:u.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}function aO(e){var n={},r=[],a,i={addCase:function(u,c){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(a)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var f=typeof u=="string"?u:u.type;if(f in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[f]=c,i},addMatcher:function(u,c){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:u,reducer:c}),i},addDefaultCase:function(u){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addDefaultCase` can only be called once");return a=u,i}};return e(i),[n,r,a]}function QR(e){return typeof e=="function"}function eA(e,n,r,a){r===void 0&&(r=[]);var i=typeof n=="function"?aO(n):[n,r,a],u=i[0],c=i[1],f=i[2],p;if(QR(e))p=function(){return jf(e(),function(){})};else{var h=jf(e,function(){});p=function(){return h}}function m(b,E){b===void 0&&(b=p());var O=rd([u[E.type]],c.filter(function(R){var C=R.matcher;return C(E)}).map(function(R){var C=R.reducer;return C}));return O.filter(function(R){return!!R}).length===0&&(O=[f]),O.reduce(function(R,C){if(C)if(La(R)){var k=R,j=C(k,E);return typeof j>"u"?R:j}else{if(_o(R))return jf(R,function(F){return C(F,E)});var j=C(R,E);if(typeof j>"u"){if(R===null)return R;throw Error("A case reducer on a non-draftable value must not return undefined")}return j}return R},b)}return m.getInitialState=p,m}function tA(e,n){return e+"/"+n}function qn(e){var n=e.name;if(!n)throw new Error("`name` is a required option for createSlice");var r=typeof e.initialState=="function"?e.initialState:jf(e.initialState,function(){}),a=e.reducers||{},i=Object.keys(a),u={},c={},f={};i.forEach(function(m){var b=a[m],E=tA(n,m),O,R;"reducer"in b?(O=b.reducer,R=b.prepare):O=b,u[m]=O,c[E]=O,f[m]=R?_n(E,R):_n(E)});function p(){var m=typeof e.extraReducers=="function"?aO(e.extraReducers):[e.extraReducers],b=m[0],E=b===void 0?{}:b,O=m[1],R=O===void 0?[]:O,C=m[2],k=C===void 0?void 0:C,j=Qa(Qa({},E),c);return eA(r,j,R,k)}var h;return{name:n,reducer:function(m,b){return h||(h=p()),h(m,b)},actions:f,caseReducers:u,getInitialState:function(){return h||(h=p()),h.getInitialState()}}}var rA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",y_=function(e){e===void 0&&(e=21);for(var n="",r=e;r--;)n+=rA[Math.random()*64|0];return n},nA=["name","message","stack","code"],Rb=function(){function e(n,r){this.payload=n,this.meta=r}return e}(),Lw=function(){function e(n,r){this.payload=n,this.meta=r}return e}(),oA=function(e){if(typeof e=="object"&&e!==null){for(var n={},r=0,a=nA;r<a.length;r++){var i=a[r];typeof e[i]=="string"&&(n[i]=e[i])}return n}return{message:String(e)}};function xe(e,n,r){var a=_n(e+"/fulfilled",function(h,m,b,E){return{payload:h,meta:Tb(Qa({},E||{}),{arg:b,requestId:m,requestStatus:"fulfilled"})}}),i=_n(e+"/pending",function(h,m,b){return{payload:void 0,meta:Tb(Qa({},b||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),u=_n(e+"/rejected",function(h,m,b,E,O){return{payload:E,error:(r&&r.serializeError||oA)(h||"Rejected"),meta:Tb(Qa({},O||{}),{arg:b,requestId:m,rejectedWithValue:!!E,requestStatus:"rejected",aborted:(h==null?void 0:h.name)==="AbortError",condition:(h==null?void 0:h.name)==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return h.prototype.abort=function(){process.env.NODE_ENV!=="production"&&(c||(c=!0,console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.")))},h}();function p(h){return function(m,b,E){var O=r!=null&&r.idGenerator?r.idGenerator(h):y_(),R=new f,C,k=new Promise(function(M,S){return R.signal.addEventListener("abort",function(){return S({name:"AbortError",message:C||"Aborted"})})}),j=!1;function F(M){j&&(C=M,R.abort())}var D=function(){return WR(this,null,function(){var M,S,q,U,V,Ee;return kR(this,function(He){switch(He.label){case 0:return He.trys.push([0,4,,5]),U=(M=r==null?void 0:r.condition)==null?void 0:M.call(r,h,{getState:b,extra:E}),iA(U)?[4,U]:[3,2];case 1:U=He.sent(),He.label=2;case 2:if(U===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return j=!0,m(i(O,h,(S=r==null?void 0:r.getPendingMeta)==null?void 0:S.call(r,{requestId:O,arg:h},{getState:b,extra:E}))),[4,Promise.race([k,Promise.resolve(n(h,{dispatch:m,getState:b,extra:E,requestId:O,signal:R.signal,rejectWithValue:function(Be,St){return new Rb(Be,St)},fulfillWithValue:function(Be,St){return new Lw(Be,St)}})).then(function(Be){if(Be instanceof Rb)throw Be;return Be instanceof Lw?a(Be.payload,O,h,Be.meta):a(Be,O,h)})])];case 3:return q=He.sent(),[3,5];case 4:return V=He.sent(),q=V instanceof Rb?u(null,O,h,V.payload,V.meta):u(V,O,h),[3,5];case 5:return Ee=r&&!r.dispatchConditionRejection&&u.match(q)&&q.meta.condition,Ee||m(q),[2,q]}})})}();return Object.assign(D,{abort:F,requestId:O,arg:h,unwrap:function(){return D.then(aA)}})}}return Object.assign(p,{pending:i,rejected:u,fulfilled:a,typePrefix:e})}function aA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sA=function(e){return e&&typeof e.match=="function"},uA=function(e,n){return sA(e)?e.match(n):e(n)};function mo(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(r){return e.some(function(a){return uA(a,r)})}}function b_(e,n){if(!e||!e.meta)return!1;var r=typeof e.meta.requestId=="string",a=n.indexOf(e.meta.requestStatus)>-1;return r&&a}function __(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function iO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["pending"])}:__(e)?function(r){var a=e.map(function(u){return u.pending}),i=mo.apply(void 0,a);return i(r)}:iO()(e[0])}function sO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["rejected"])}:__(e)?function(r){var a=e.map(function(u){return u.rejected}),i=mo.apply(void 0,a);return i(r)}:sO()(e[0])}function uO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["fulfilled"])}:__(e)?function(r){var a=e.map(function(u){return u.fulfilled}),i=mo.apply(void 0,a);return i(r)}:uO()(e[0])}uR();var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cA(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var r=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}),r}function lA(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var of=lA,fA=typeof Da=="object"&&Da&&Da.Object===Object&&Da,cO=fA,dA=cO,pA=typeof self=="object"&&self&&self.Object===Object&&self,hA=dA||pA||Function("return this")(),Io=hA,vA=Io,gA=function(){return vA.Date.now()},mA=gA,yA=/\s/;function bA(e){for(var n=e.length;n--&&yA.test(e.charAt(n)););return n}var _A=bA,wA=_A,EA=/^\s+/;function SA(e){return e&&e.slice(0,wA(e)+1).replace(EA,"")}var OA=SA,TA=Io,xA=TA.Symbol,w_=xA,Fw=w_,lO=Object.prototype,CA=lO.hasOwnProperty,RA=lO.toString,$l=Fw?Fw.toStringTag:void 0;function AA(e){var n=CA.call(e,$l),r=e[$l];try{e[$l]=void 0;var a=!0}catch{}var i=RA.call(e);return a&&(n?e[$l]=r:delete e[$l]),i}var PA=AA,DA=Object.prototype,IA=DA.toString;function MA(e){return IA.call(e)}var kA=MA,Ww=w_,$A=PA,NA=kA,jA="[object Null]",LA="[object Undefined]",Bw=Ww?Ww.toStringTag:void 0;function FA(e){return e==null?e===void 0?LA:jA:Bw&&Bw in Object(e)?$A(e):NA(e)}var Ad=FA;function WA(e){return e!=null&&typeof e=="object"}var E_=WA,BA=Ad,UA=E_,zA="[object Symbol]";function HA(e){return typeof e=="symbol"||UA(e)&&BA(e)==zA}var GA=HA,qA=OA,Uw=of,VA=GA,zw=0/0,YA=/^[-+]0x[0-9a-f]+$/i,KA=/^0b[01]+$/i,XA=/^0o[0-7]+$/i,JA=parseInt;function ZA(e){if(typeof e=="number")return e;if(VA(e))return zw;if(Uw(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Uw(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=qA(e);var r=KA.test(e);return r||XA.test(e)?JA(e.slice(2),r?2:8):YA.test(e)?zw:+e}var QA=ZA,eP=of,Ab=mA,Hw=QA,tP="Expected a function",rP=Math.max,nP=Math.min;function oP(e,n,r){var a,i,u,c,f,p,h=0,m=!1,b=!1,E=!0;if(typeof e!="function")throw new TypeError(tP);n=Hw(n)||0,eP(r)&&(m=!!r.leading,b="maxWait"in r,u=b?rP(Hw(r.maxWait)||0,n):u,E="trailing"in r?!!r.trailing:E);function O(q){var U=a,V=i;return a=i=void 0,h=q,c=e.apply(V,U),c}function R(q){return h=q,f=setTimeout(j,n),m?O(q):c}function C(q){var U=q-p,V=q-h,Ee=n-U;return b?nP(Ee,u-V):Ee}function k(q){var U=q-p,V=q-h;return p===void 0||U>=n||U<0||b&&V>=u}function j(){var q=Ab();if(k(q))return F(q);f=setTimeout(j,C(q))}function F(q){return f=void 0,E&&a?O(q):(a=i=void 0,c)}function D(){f!==void 0&&clearTimeout(f),h=0,a=p=i=f=void 0}function M(){return f===void 0?c:F(Ab())}function S(){var q=Ab(),U=k(q);if(a=arguments,i=this,p=q,U){if(f===void 0)return R(p);if(b)return clearTimeout(f),f=setTimeout(j,n),O(p)}return f===void 0&&(f=setTimeout(j,n)),c}return S.cancel=D,S.flush=M,S}var aP=oP,iP=aP,sP=of,uP="Expected a function";function cP(e,n,r){var a=!0,i=!0;if(typeof e!="function")throw new TypeError(uP);return sP(r)&&(a="leading"in r?!!r.leading:a,i="trailing"in r?!!r.trailing:i),iP(e,n,{leading:a,maxWait:n,trailing:i})}var lP=cP;const fP=Rd(lP);var dP=Object.defineProperty,pP=(e,n,r)=>n in e?dP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,hP=(e,n,r)=>(pP(e,typeof n!="symbol"?n+"":n,r),r),xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S1={exports:{}},Ms={};/*
8
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),j.warnIfExceeded()),F}}}}function xb(e){return typeof e=="boolean"}function XR(){return function(n){return JR(n)}}function JR(e){e===void 0&&(e={});var n=e.thunk,r=n===void 0?!0:n,a=e.immutableCheck,i=a===void 0?!0:a,u=e.serializableCheck,c=u===void 0?!0:u,f=new UR;if(r&&(xb(r)?f.push(Mw):f.push(Mw.withExtraArgument(r.extraArgument))),process.env.NODE_ENV!=="production"){if(i){var p={};xb(i)||(p=i),f.unshift(YR(p))}if(c){var h={};xb(c)||(h=c),f.push(KR(h))}}return f}var Cb=process.env.NODE_ENV==="production";function ZR(e){var n=XR(),r=e||{},a=r.reducer,i=a===void 0?void 0:a,u=r.middleware,c=u===void 0?n():u,f=r.devTools,p=f===void 0?!0:f,h=r.preloadedState,m=h===void 0?void 0:h,b=r.enhancers,E=b===void 0?void 0:b,O;if(typeof i=="function")O=i;else if(eO(i))O=JS(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var R=c;if(typeof R=="function"&&(R=R(n),!Cb&&!Array.isArray(R)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Cb&&R.some(function(D){return typeof D!="function"}))throw new Error("each middleware provided to configureStore must be a function");var C=TR.apply(void 0,R),k=ed;p&&(k=BR(Qa({trace:!Cb},typeof p=="object"&&p)));var j=[C];Array.isArray(E)?j=rd([C],E):typeof E=="function"&&(j=E(j));var F=k.apply(void 0,j);return XS(O,m,F)}function _n(e,n){function r(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];if(n){var u=n.apply(void 0,a);if(!u)throw new Error("prepareAction did not return an object");return Qa(Qa({type:e,payload:u.payload},"meta"in u&&{meta:u.meta}),"error"in u&&{error:u.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}function aO(e){var n={},r=[],a,i={addCase:function(u,c){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");if(a)throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`")}var f=typeof u=="string"?u:u.type;if(f in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[f]=c,i},addMatcher:function(u,c){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:u,reducer:c}),i},addDefaultCase:function(u){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addDefaultCase` can only be called once");return a=u,i}};return e(i),[n,r,a]}function QR(e){return typeof e=="function"}function eA(e,n,r,a){r===void 0&&(r=[]);var i=typeof n=="function"?aO(n):[n,r,a],u=i[0],c=i[1],f=i[2],p;if(QR(e))p=function(){return jf(e(),function(){})};else{var h=jf(e,function(){});p=function(){return h}}function m(b,E){b===void 0&&(b=p());var O=rd([u[E.type]],c.filter(function(R){var C=R.matcher;return C(E)}).map(function(R){var C=R.reducer;return C}));return O.filter(function(R){return!!R}).length===0&&(O=[f]),O.reduce(function(R,C){if(C)if(La(R)){var k=R,j=C(k,E);return typeof j>"u"?R:j}else{if(_o(R))return jf(R,function(F){return C(F,E)});var j=C(R,E);if(typeof j>"u"){if(R===null)return R;throw Error("A case reducer on a non-draftable value must not return undefined")}return j}return R},b)}return m.getInitialState=p,m}function tA(e,n){return e+"/"+n}function qn(e){var n=e.name;if(!n)throw new Error("`name` is a required option for createSlice");var r=typeof e.initialState=="function"?e.initialState:jf(e.initialState,function(){}),a=e.reducers||{},i=Object.keys(a),u={},c={},f={};i.forEach(function(m){var b=a[m],E=tA(n,m),O,R;"reducer"in b?(O=b.reducer,R=b.prepare):O=b,u[m]=O,c[E]=O,f[m]=R?_n(E,R):_n(E)});function p(){var m=typeof e.extraReducers=="function"?aO(e.extraReducers):[e.extraReducers],b=m[0],E=b===void 0?{}:b,O=m[1],R=O===void 0?[]:O,C=m[2],k=C===void 0?void 0:C,j=Qa(Qa({},E),c);return eA(r,j,R,k)}var h;return{name:n,reducer:function(m,b){return h||(h=p()),h(m,b)},actions:f,caseReducers:u,getInitialState:function(){return h||(h=p()),h.getInitialState()}}}var rA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",y_=function(e){e===void 0&&(e=21);for(var n="",r=e;r--;)n+=rA[Math.random()*64|0];return n},nA=["name","message","stack","code"],Rb=function(){function e(n,r){this.payload=n,this.meta=r}return e}(),Lw=function(){function e(n,r){this.payload=n,this.meta=r}return e}(),oA=function(e){if(typeof e=="object"&&e!==null){for(var n={},r=0,a=nA;r<a.length;r++){var i=a[r];typeof e[i]=="string"&&(n[i]=e[i])}return n}return{message:String(e)}};function xe(e,n,r){var a=_n(e+"/fulfilled",function(h,m,b,E){return{payload:h,meta:Tb(Qa({},E||{}),{arg:b,requestId:m,requestStatus:"fulfilled"})}}),i=_n(e+"/pending",function(h,m,b){return{payload:void 0,meta:Tb(Qa({},b||{}),{arg:m,requestId:h,requestStatus:"pending"})}}),u=_n(e+"/rejected",function(h,m,b,E,O){return{payload:E,error:(r&&r.serializeError||oA)(h||"Rejected"),meta:Tb(Qa({},O||{}),{arg:b,requestId:m,rejectedWithValue:!!E,requestStatus:"rejected",aborted:(h==null?void 0:h.name)==="AbortError",condition:(h==null?void 0:h.name)==="ConditionError"})}}),c=!1,f=typeof AbortController<"u"?AbortController:function(){function h(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return h.prototype.abort=function(){process.env.NODE_ENV!=="production"&&(c||(c=!0,console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.")))},h}();function p(h){return function(m,b,E){var O=r!=null&&r.idGenerator?r.idGenerator(h):y_(),R=new f,C,k=new Promise(function(M,S){return R.signal.addEventListener("abort",function(){return S({name:"AbortError",message:C||"Aborted"})})}),j=!1;function F(M){j&&(C=M,R.abort())}var D=function(){return WR(this,null,function(){var M,S,q,U,V,Ee;return kR(this,function(He){switch(He.label){case 0:return He.trys.push([0,4,,5]),U=(M=r==null?void 0:r.condition)==null?void 0:M.call(r,h,{getState:b,extra:E}),iA(U)?[4,U]:[3,2];case 1:U=He.sent(),He.label=2;case 2:if(U===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return j=!0,m(i(O,h,(S=r==null?void 0:r.getPendingMeta)==null?void 0:S.call(r,{requestId:O,arg:h},{getState:b,extra:E}))),[4,Promise.race([k,Promise.resolve(n(h,{dispatch:m,getState:b,extra:E,requestId:O,signal:R.signal,rejectWithValue:function(Be,St){return new Rb(Be,St)},fulfillWithValue:function(Be,St){return new Lw(Be,St)}})).then(function(Be){if(Be instanceof Rb)throw Be;return Be instanceof Lw?a(Be.payload,O,h,Be.meta):a(Be,O,h)})])];case 3:return q=He.sent(),[3,5];case 4:return V=He.sent(),q=V instanceof Rb?u(null,O,h,V.payload,V.meta):u(V,O,h),[3,5];case 5:return Ee=r&&!r.dispatchConditionRejection&&u.match(q)&&q.meta.condition,Ee||m(q),[2,q]}})})}();return Object.assign(D,{abort:F,requestId:O,arg:h,unwrap:function(){return D.then(aA)}})}}return Object.assign(p,{pending:i,rejected:u,fulfilled:a,typePrefix:e})}function aA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function iA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sA=function(e){return e&&typeof e.match=="function"},uA=function(e,n){return sA(e)?e.match(n):e(n)};function mo(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(r){return e.some(function(a){return uA(a,r)})}}function b_(e,n){if(!e||!e.meta)return!1;var r=typeof e.meta.requestId=="string",a=n.indexOf(e.meta.requestStatus)>-1;return r&&a}function __(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function iO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["pending"])}:__(e)?function(r){var a=e.map(function(u){return u.pending}),i=mo.apply(void 0,a);return i(r)}:iO()(e[0])}function sO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["rejected"])}:__(e)?function(r){var a=e.map(function(u){return u.rejected}),i=mo.apply(void 0,a);return i(r)}:sO()(e[0])}function uO(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(r){return b_(r,["fulfilled"])}:__(e)?function(r){var a=e.map(function(u){return u.fulfilled}),i=mo.apply(void 0,a);return i(r)}:uO()(e[0])}uR();var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cA(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var r=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}),r}function lA(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var of=lA,fA=typeof Da=="object"&&Da&&Da.Object===Object&&Da,cO=fA,dA=cO,pA=typeof self=="object"&&self&&self.Object===Object&&self,hA=dA||pA||Function("return this")(),Io=hA,vA=Io,gA=function(){return vA.Date.now()},mA=gA,yA=/\s/;function bA(e){for(var n=e.length;n--&&yA.test(e.charAt(n)););return n}var _A=bA,wA=_A,EA=/^\s+/;function SA(e){return e&&e.slice(0,wA(e)+1).replace(EA,"")}var OA=SA,TA=Io,xA=TA.Symbol,w_=xA,Fw=w_,lO=Object.prototype,CA=lO.hasOwnProperty,RA=lO.toString,$l=Fw?Fw.toStringTag:void 0;function AA(e){var n=CA.call(e,$l),r=e[$l];try{e[$l]=void 0;var a=!0}catch{}var i=RA.call(e);return a&&(n?e[$l]=r:delete e[$l]),i}var PA=AA,DA=Object.prototype,IA=DA.toString;function MA(e){return IA.call(e)}var kA=MA,Ww=w_,$A=PA,NA=kA,jA="[object Null]",LA="[object Undefined]",Bw=Ww?Ww.toStringTag:void 0;function FA(e){return e==null?e===void 0?LA:jA:Bw&&Bw in Object(e)?$A(e):NA(e)}var Ad=FA;function WA(e){return e!=null&&typeof e=="object"}var E_=WA,BA=Ad,UA=E_,zA="[object Symbol]";function HA(e){return typeof e=="symbol"||UA(e)&&BA(e)==zA}var GA=HA,qA=OA,Uw=of,VA=GA,zw=0/0,YA=/^[-+]0x[0-9a-f]+$/i,KA=/^0b[01]+$/i,XA=/^0o[0-7]+$/i,JA=parseInt;function ZA(e){if(typeof e=="number")return e;if(VA(e))return zw;if(Uw(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Uw(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=qA(e);var r=KA.test(e);return r||XA.test(e)?JA(e.slice(2),r?2:8):YA.test(e)?zw:+e}var QA=ZA,eP=of,Ab=mA,Hw=QA,tP="Expected a function",rP=Math.max,nP=Math.min;function oP(e,n,r){var a,i,u,c,f,p,h=0,m=!1,b=!1,E=!0;if(typeof e!="function")throw new TypeError(tP);n=Hw(n)||0,eP(r)&&(m=!!r.leading,b="maxWait"in r,u=b?rP(Hw(r.maxWait)||0,n):u,E="trailing"in r?!!r.trailing:E);function O(q){var U=a,V=i;return a=i=void 0,h=q,c=e.apply(V,U),c}function R(q){return h=q,f=setTimeout(j,n),m?O(q):c}function C(q){var U=q-p,V=q-h,Ee=n-U;return b?nP(Ee,u-V):Ee}function k(q){var U=q-p,V=q-h;return p===void 0||U>=n||U<0||b&&V>=u}function j(){var q=Ab();if(k(q))return F(q);f=setTimeout(j,C(q))}function F(q){return f=void 0,E&&a?O(q):(a=i=void 0,c)}function D(){f!==void 0&&clearTimeout(f),h=0,a=p=i=f=void 0}function M(){return f===void 0?c:F(Ab())}function S(){var q=Ab(),U=k(q);if(a=arguments,i=this,p=q,U){if(f===void 0)return R(p);if(b)return clearTimeout(f),f=setTimeout(j,n),O(p)}return f===void 0&&(f=setTimeout(j,n)),c}return S.cancel=D,S.flush=M,S}var aP=oP,iP=aP,sP=of,uP="Expected a function";function cP(e,n,r){var a=!0,i=!0;if(typeof e!="function")throw new TypeError(uP);return sP(r)&&(a="leading"in r?!!r.leading:a,i="trailing"in r?!!r.trailing:i),iP(e,n,{leading:a,maxWait:n,trailing:i})}var lP=cP;const fP=Rd(lP);var dP=Object.defineProperty,pP=(e,n,r)=>n in e?dP(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,hP=(e,n,r)=>(pP(e,typeof n!="symbol"?n+"":n,r),r),xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S1={exports:{}},Is={};/*
9
9
  object-assign
10
10
  (c) Sindre Sorhus
11
11
  @license MIT
@@ -16,7 +16,7 @@ object-assign
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var qw;function gP(){if(qw)return Ms;qw=1,S_();var e=ie,n=60103;if(Ms.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;n=r("react.element"),Ms.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 c(f,p,h){var m,b={},E=null,O=null;h!==void 0&&(E=""+h),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(O=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:n,type:f,key:E,ref:O,props:b,_owner:a.current}}return Ms.jsx=c,Ms.jsxs=c,Ms}var Vw={};/** @license React v17.0.2
19
+ */var qw;function gP(){if(qw)return Is;qw=1,S_();var e=ie,n=60103;if(Is.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;n=r("react.element"),Is.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 c(f,p,h){var m,b={},E=null,O=null;h!==void 0&&(E=""+h),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(O=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:n,type:f,key:E,ref:O,props:b,_owner:a.current}}return Is.jsx=c,Is.jsxs=c,Is}var Vw={};/** @license React v17.0.2
20
20
  * react-jsx-runtime.development.js
21
21
  *
22
22
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -38,8 +38,8 @@ Check the top-level render call using <`+G+">.")}return B}}function Jn(_,B){{if(
38
38
  Licensed under the MIT License (MIT), see
39
39
  http://jedwatson.github.io/classnames
40
40
  */(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var a=[],i=0;i<arguments.length;i++){var u=arguments[i];if(u){var c=typeof u;if(c==="string"||c==="number")a.push(u);else if(Array.isArray(u)){if(u.length){var f=r.apply(null,u);f&&a.push(f)}}else if(c==="object"){if(u.toString!==Object.prototype.toString&&!u.toString.toString().includes("[native code]")){a.push(u.toString());continue}for(var p in u)n.call(u,p)&&u[p]&&a.push(p)}}}return a.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(fO);var dO=fO.exports;const yP=vP(dO);["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,n)=>(e[n.toLowerCase()]=n,e),{for:"htmlFor"});var Kw;(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(Kw||(Kw={}));var bP={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0};ie.createContext&&ie.createContext(bP);const _P=/^(?:[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 pO(e){return typeof e=="string"&&_P.test(e)}var Lr=[];for(var Db=0;Db<256;++Db)Lr.push((Db+256).toString(16).substr(1));function wP(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Lr[e[n+0]]+Lr[e[n+1]]+Lr[e[n+2]]+Lr[e[n+3]]+"-"+Lr[e[n+4]]+Lr[e[n+5]]+"-"+Lr[e[n+6]]+Lr[e[n+7]]+"-"+Lr[e[n+8]]+Lr[e[n+9]]+"-"+Lr[e[n+10]]+Lr[e[n+11]]+Lr[e[n+12]]+Lr[e[n+13]]+Lr[e[n+14]]+Lr[e[n+15]]).toLowerCase();if(!pO(r))throw TypeError("Stringified UUID is invalid");return r}function EP(e){if(!pO(e))throw TypeError("Invalid UUID");var n,r=new Uint8Array(16);return r[0]=(n=parseInt(e.slice(0,8),16))>>>24,r[1]=n>>>16&255,r[2]=n>>>8&255,r[3]=n&255,r[4]=(n=parseInt(e.slice(9,13),16))>>>8,r[5]=n&255,r[6]=(n=parseInt(e.slice(14,18),16))>>>8,r[7]=n&255,r[8]=(n=parseInt(e.slice(19,23),16))>>>8,r[9]=n&255,r[10]=(n=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=n/4294967296&255,r[12]=n>>>24&255,r[13]=n>>>16&255,r[14]=n>>>8&255,r[15]=n&255,r}function SP(e){e=unescape(encodeURIComponent(e));for(var n=[],r=0;r<e.length;++r)n.push(e.charCodeAt(r));return n}var OP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",TP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function hO(e,n,r){function a(i,u,c,f){if(typeof i=="string"&&(i=SP(i)),typeof u=="string"&&(u=EP(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|n,p[8]=p[8]&63|128,c){f=f||0;for(var h=0;h<16;++h)c[f+h]=p[h];return c}return wP(p)}try{a.name=e}catch{}return a.DNS=OP,a.URL=TP,a}function xP(e){if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=new Uint8Array(n.length);for(var r=0;r<n.length;++r)e[r]=n.charCodeAt(r)}return CP(RP(AP(e),e.length*8))}function CP(e){for(var n=[],r=e.length*32,a="0123456789abcdef",i=0;i<r;i+=8){var u=e[i>>5]>>>i%32&255,c=parseInt(a.charAt(u>>>4&15)+a.charAt(u&15),16);n.push(c)}return n}function vO(e){return(e+64>>>9<<4)+14+1}function RP(e,n){e[n>>5]|=128<<n%32,e[vO(n)-1]=n;for(var r=1732584193,a=-271733879,i=-1732584194,u=271733878,c=0;c<e.length;c+=16){var f=r,p=a,h=i,m=u;r=zr(r,a,i,u,e[c],7,-680876936),u=zr(u,r,a,i,e[c+1],12,-389564586),i=zr(i,u,r,a,e[c+2],17,606105819),a=zr(a,i,u,r,e[c+3],22,-1044525330),r=zr(r,a,i,u,e[c+4],7,-176418897),u=zr(u,r,a,i,e[c+5],12,1200080426),i=zr(i,u,r,a,e[c+6],17,-1473231341),a=zr(a,i,u,r,e[c+7],22,-45705983),r=zr(r,a,i,u,e[c+8],7,1770035416),u=zr(u,r,a,i,e[c+9],12,-1958414417),i=zr(i,u,r,a,e[c+10],17,-42063),a=zr(a,i,u,r,e[c+11],22,-1990404162),r=zr(r,a,i,u,e[c+12],7,1804603682),u=zr(u,r,a,i,e[c+13],12,-40341101),i=zr(i,u,r,a,e[c+14],17,-1502002290),a=zr(a,i,u,r,e[c+15],22,1236535329),r=Hr(r,a,i,u,e[c+1],5,-165796510),u=Hr(u,r,a,i,e[c+6],9,-1069501632),i=Hr(i,u,r,a,e[c+11],14,643717713),a=Hr(a,i,u,r,e[c],20,-373897302),r=Hr(r,a,i,u,e[c+5],5,-701558691),u=Hr(u,r,a,i,e[c+10],9,38016083),i=Hr(i,u,r,a,e[c+15],14,-660478335),a=Hr(a,i,u,r,e[c+4],20,-405537848),r=Hr(r,a,i,u,e[c+9],5,568446438),u=Hr(u,r,a,i,e[c+14],9,-1019803690),i=Hr(i,u,r,a,e[c+3],14,-187363961),a=Hr(a,i,u,r,e[c+8],20,1163531501),r=Hr(r,a,i,u,e[c+13],5,-1444681467),u=Hr(u,r,a,i,e[c+2],9,-51403784),i=Hr(i,u,r,a,e[c+7],14,1735328473),a=Hr(a,i,u,r,e[c+12],20,-1926607734),r=Gr(r,a,i,u,e[c+5],4,-378558),u=Gr(u,r,a,i,e[c+8],11,-2022574463),i=Gr(i,u,r,a,e[c+11],16,1839030562),a=Gr(a,i,u,r,e[c+14],23,-35309556),r=Gr(r,a,i,u,e[c+1],4,-1530992060),u=Gr(u,r,a,i,e[c+4],11,1272893353),i=Gr(i,u,r,a,e[c+7],16,-155497632),a=Gr(a,i,u,r,e[c+10],23,-1094730640),r=Gr(r,a,i,u,e[c+13],4,681279174),u=Gr(u,r,a,i,e[c],11,-358537222),i=Gr(i,u,r,a,e[c+3],16,-722521979),a=Gr(a,i,u,r,e[c+6],23,76029189),r=Gr(r,a,i,u,e[c+9],4,-640364487),u=Gr(u,r,a,i,e[c+12],11,-421815835),i=Gr(i,u,r,a,e[c+15],16,530742520),a=Gr(a,i,u,r,e[c+2],23,-995338651),r=qr(r,a,i,u,e[c],6,-198630844),u=qr(u,r,a,i,e[c+7],10,1126891415),i=qr(i,u,r,a,e[c+14],15,-1416354905),a=qr(a,i,u,r,e[c+5],21,-57434055),r=qr(r,a,i,u,e[c+12],6,1700485571),u=qr(u,r,a,i,e[c+3],10,-1894986606),i=qr(i,u,r,a,e[c+10],15,-1051523),a=qr(a,i,u,r,e[c+1],21,-2054922799),r=qr(r,a,i,u,e[c+8],6,1873313359),u=qr(u,r,a,i,e[c+15],10,-30611744),i=qr(i,u,r,a,e[c+6],15,-1560198380),a=qr(a,i,u,r,e[c+13],21,1309151649),r=qr(r,a,i,u,e[c+4],6,-145523070),u=qr(u,r,a,i,e[c+11],10,-1120210379),i=qr(i,u,r,a,e[c+2],15,718787259),a=qr(a,i,u,r,e[c+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 AP(e){if(e.length===0)return[];for(var n=e.length*8,r=new Uint32Array(vO(n)),a=0;a<n;a+=8)r[a>>5]|=(e[a/8]&255)<<a%32;return r}function Ya(e,n){var r=(e&65535)+(n&65535),a=(e>>16)+(n>>16)+(r>>16);return a<<16|r&65535}function PP(e,n){return e<<n|e>>>32-n}function Pd(e,n,r,a,i,u){return Ya(PP(Ya(Ya(n,e),Ya(a,u)),i),r)}function zr(e,n,r,a,i,u,c){return Pd(n&r|~n&a,e,n,i,u,c)}function Hr(e,n,r,a,i,u,c){return Pd(n&a|r&~a,e,n,i,u,c)}function Gr(e,n,r,a,i,u,c){return Pd(n^r^a,e,n,i,u,c)}function qr(e,n,r,a,i,u,c){return Pd(r^(n|~a),e,n,i,u,c)}hO("v3",48,xP);function DP(e,n,r,a){switch(e){case 0:return n&r^~n&a;case 1:return n^r^a;case 2:return n&r^n&a^r&a;case 3:return n^r^a}}function Ib(e,n){return e<<n|e>>>32-n}function IP(e){var n=[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,c=Math.ceil(u/16),f=new Array(c),p=0;p<c;++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[c-1][14]=(e.length-1)*8/Math.pow(2,32),f[c-1][14]=Math.floor(f[c-1][14]),f[c-1][15]=(e.length-1)*8&4294967295;for(var b=0;b<c;++b){for(var E=new Uint32Array(80),O=0;O<16;++O)E[O]=f[b][O];for(var R=16;R<80;++R)E[R]=Ib(E[R-3]^E[R-8]^E[R-14]^E[R-16],1);for(var C=r[0],k=r[1],j=r[2],F=r[3],D=r[4],M=0;M<80;++M){var S=Math.floor(M/20),q=Ib(C,5)+DP(S,k,j,F)+D+n[S]+E[M]>>>0;D=F,F=j,j=Ib(k,30)>>>0,k=C,C=q}r[0]=r[0]+C>>>0,r[1]=r[1]+k>>>0,r[2]=r[2]+j>>>0,r[3]=r[3]+F>>>0,r[4]=r[4]+D>>>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]}hO("v5",80,IP);function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Wa.apply(this,arguments)}function gO(e){var n=Object.create(null);return function(r){return n[r]===void 0&&(n[r]=e(r)),n[r]}}var MP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,kP=gO(function(e){return MP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function $P(e){if(e.sheet)return e.sheet;for(var n=0;n<document.styleSheets.length;n++)if(document.styleSheets[n].ownerNode===e)return document.styleSheets[n]}function NP(e){var n=document.createElement("style");return n.setAttribute("data-emotion",e.key),e.nonce!==void 0&&n.setAttribute("nonce",e.nonce),n.appendChild(document.createTextNode("")),n.setAttribute("data-s",""),n}var jP=function(){function e(r){var a=this;this._insertTag=function(i){var u;a.tags.length===0?a.insertionPoint?u=a.insertionPoint.nextSibling:a.prepend?u=a.container.firstChild:u=a.before:u=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(i,u),a.tags.push(i)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(r){r.forEach(this._insertTag)},n.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(NP(this));var a=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var i=r.charCodeAt(0)===64&&r.charCodeAt(1)===105;i&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
41
- `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!i}if(this.isSpeedy){var u=$P(a);try{u.insertRule(r,u.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else a.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),Jr="-ms-",nd="-moz-",ht="-webkit-",O_="comm",T_="rule",x_="decl",LP="@import",mO="@keyframes",FP="@layer",WP=Math.abs,Dd=String.fromCharCode,BP=Object.assign;function UP(e,n){return Br(e,0)^45?(((n<<2^Br(e,0))<<2^Br(e,1))<<2^Br(e,2))<<2^Br(e,3):0}function yO(e){return e.trim()}function zP(e,n){return(e=n.exec(e))?e[0]:e}function vt(e,n,r){return e.replace(n,r)}function O1(e,n){return e.indexOf(n)}function Br(e,n){return e.charCodeAt(n)|0}function Zl(e,n,r){return e.slice(n,r)}function So(e){return e.length}function C_(e){return e.length}function _f(e,n){return n.push(e),e}function HP(e,n){return e.map(n).join("")}var Id=1,Js=1,bO=0,On=0,pr=0,eu="";function Md(e,n,r,a,i,u,c){return{value:e,root:n,parent:r,type:a,props:i,children:u,line:Id,column:Js,length:c,return:""}}function Nl(e,n){return BP(Md("",null,null,"",null,null,0),e,{length:-e.length},n)}function GP(){return pr}function qP(){return pr=On>0?Br(eu,--On):0,Js--,pr===10&&(Js=1,Id--),pr}function Bn(){return pr=On<bO?Br(eu,On++):0,Js++,pr===10&&(Js=1,Id++),pr}function Ro(){return Br(eu,On)}function Ff(){return On}function af(e,n){return Zl(eu,e,n)}function Ql(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _O(e){return Id=Js=1,bO=So(eu=e),On=0,[]}function wO(e){return eu="",e}function Wf(e){return yO(af(On-1,T1(e===91?e+2:e===40?e+1:e)))}function VP(e){for(;(pr=Ro())&&pr<33;)Bn();return Ql(e)>2||Ql(pr)>3?"":" "}function YP(e,n){for(;--n&&Bn()&&!(pr<48||pr>102||pr>57&&pr<65||pr>70&&pr<97););return af(e,Ff()+(n<6&&Ro()==32&&Bn()==32))}function T1(e){for(;Bn();)switch(pr){case e:return On;case 34:case 39:e!==34&&e!==39&&T1(pr);break;case 40:e===41&&T1(e);break;case 92:Bn();break}return On}function KP(e,n){for(;Bn()&&e+pr!==47+10&&!(e+pr===42+42&&Ro()===47););return"/*"+af(n,On-1)+"*"+Dd(e===47?e:Bn())}function XP(e){for(;!Ql(Ro());)Bn();return af(e,On)}function JP(e){return wO(Bf("",null,null,null,[""],e=_O(e),0,[0],e))}function Bf(e,n,r,a,i,u,c,f,p){for(var h=0,m=0,b=c,E=0,O=0,R=0,C=1,k=1,j=1,F=0,D="",M=i,S=u,q=a,U=D;k;)switch(R=F,F=Bn()){case 40:if(R!=108&&Br(U,b-1)==58){O1(U+=vt(Wf(F),"&","&\f"),"&\f")!=-1&&(j=-1);break}case 34:case 39:case 91:U+=Wf(F);break;case 9:case 10:case 13:case 32:U+=VP(R);break;case 92:U+=YP(Ff()-1,7);continue;case 47:switch(Ro()){case 42:case 47:_f(ZP(KP(Bn(),Ff()),n,r),p);break;default:U+="/"}break;case 123*C:f[h++]=So(U)*j;case 125*C:case 59:case 0:switch(F){case 0:case 125:k=0;case 59+m:j==-1&&(U=vt(U,/\f/g,"")),O>0&&So(U)-b&&_f(O>32?Jw(U+";",a,r,b-1):Jw(vt(U," ","")+";",a,r,b-2),p);break;case 59:U+=";";default:if(_f(q=Xw(U,n,r,h,m,i,f,D,M=[],S=[],b),u),F===123)if(m===0)Bf(U,n,q,q,M,u,b,f,S);else switch(E===99&&Br(U,3)===110?100:E){case 100:case 108:case 109:case 115:Bf(e,q,q,a&&_f(Xw(e,q,q,0,0,i,f,D,i,M=[],b),S),i,S,b,f,a?M:S);break;default:Bf(U,q,q,q,[""],S,0,f,S)}}h=m=O=0,C=j=1,D=U="",b=c;break;case 58:b=1+So(U),O=R;default:if(C<1){if(F==123)--C;else if(F==125&&C++==0&&qP()==125)continue}switch(U+=Dd(F),F*C){case 38:j=m>0?1:(U+="\f",-1);break;case 44:f[h++]=(So(U)-1)*j,j=1;break;case 64:Ro()===45&&(U+=Wf(Bn())),E=Ro(),m=b=So(D=U+=XP(Ff())),F++;break;case 45:R===45&&So(U)==2&&(C=0)}}return u}function Xw(e,n,r,a,i,u,c,f,p,h,m){for(var b=i-1,E=i===0?u:[""],O=C_(E),R=0,C=0,k=0;R<a;++R)for(var j=0,F=Zl(e,b+1,b=WP(C=c[R])),D=e;j<O;++j)(D=yO(C>0?E[j]+" "+F:vt(F,/&\f/g,E[j])))&&(p[k++]=D);return Md(e,n,r,i===0?T_:f,p,h,m)}function ZP(e,n,r){return Md(e,n,r,O_,Dd(GP()),Zl(e,2,-2),0)}function Jw(e,n,r,a){return Md(e,n,r,x_,Zl(e,0,a),Zl(e,a+1,-1),a)}function Us(e,n){for(var r="",a=C_(e),i=0;i<a;i++)r+=n(e[i],i,e,n)||"";return r}function QP(e,n,r,a){switch(e.type){case FP:if(e.children.length)break;case LP:case x_:return e.return=e.return||e.value;case O_:return"";case mO:return e.return=e.value+"{"+Us(e.children,a)+"}";case T_:e.value=e.props.join(",")}return So(r=Us(e.children,a))?e.return=e.value+"{"+r+"}":""}function eD(e){var n=C_(e);return function(r,a,i,u){for(var c="",f=0;f<n;f++)c+=e[f](r,a,i,u)||"";return c}}function tD(e){return function(n){n.root||(n=n.return)&&e(n)}}var rD=function(e,n,r){for(var a=0,i=0;a=i,i=Ro(),a===38&&i===12&&(n[r]=1),!Ql(i);)Bn();return af(e,On)},nD=function(e,n){var r=-1,a=44;do switch(Ql(a)){case 0:a===38&&Ro()===12&&(n[r]=1),e[r]+=rD(On-1,n,r);break;case 2:e[r]+=Wf(a);break;case 4:if(a===44){e[++r]=Ro()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Dd(a)}while(a=Bn());return e},oD=function(e,n){return wO(nD(_O(e),n))},Zw=new WeakMap,aD=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,a=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Zw.get(r))&&!a){Zw.set(e,!0);for(var i=[],u=oD(n,i),c=r.props,f=0,p=0;f<u.length;f++)for(var h=0;h<c.length;h++,p++)e.props[p]=i[f]?u[f].replace(/&\f/g,c[h]):c[h]+" "+u[f]}}},iD=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}},sD="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",uD=function(e){return e.type==="comm"&&e.children.indexOf(sD)>-1},cD=function(e){return function(n,r,a){if(!(n.type!=="rule"||e.compat)){var i=n.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var u=!!n.parent,c=u?n.parent.children:a,f=c.length-1;f>=0;f--){var p=c[f];if(p.line<n.line)break;if(p.column<n.column){if(uD(p))return;break}}i.forEach(function(h){console.error('The pseudo class "'+h+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+h.split("-child")[0]+'-of-type".')})}}}},EO=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},lD=function(e,n){for(var r=e-1;r>=0;r--)if(!EO(n[r]))return!0;return!1},Qw=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},fD=function(e,n,r){EO(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Qw(e)):lD(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Qw(e)))};function SO(e,n){switch(UP(e,n)){case 5103:return ht+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ht+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ht+e+nd+e+Jr+e+e;case 6828:case 4268:return ht+e+Jr+e+e;case 6165:return ht+e+Jr+"flex-"+e+e;case 5187:return ht+e+vt(e,/(\w+).+(:[^]+)/,ht+"box-$1$2"+Jr+"flex-$1$2")+e;case 5443:return ht+e+Jr+"flex-item-"+vt(e,/flex-|-self/,"")+e;case 4675:return ht+e+Jr+"flex-line-pack"+vt(e,/align-content|flex-|-self/,"")+e;case 5548:return ht+e+Jr+vt(e,"shrink","negative")+e;case 5292:return ht+e+Jr+vt(e,"basis","preferred-size")+e;case 6060:return ht+"box-"+vt(e,"-grow","")+ht+e+Jr+vt(e,"grow","positive")+e;case 4554:return ht+vt(e,/([^-])(transform)/g,"$1"+ht+"$2")+e;case 6187:return vt(vt(vt(e,/(zoom-|grab)/,ht+"$1"),/(image-set)/,ht+"$1"),e,"")+e;case 5495:case 3959:return vt(e,/(image-set\([^]*)/,ht+"$1$`$1");case 4968:return vt(vt(e,/(.+:)(flex-)?(.*)/,ht+"box-pack:$3"+Jr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ht+e+e;case 4095:case 3583:case 4068:case 2532:return vt(e,/(.+)-inline(.+)/,ht+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(So(e)-1-n>6)switch(Br(e,n+1)){case 109:if(Br(e,n+4)!==45)break;case 102:return vt(e,/(.+:)(.+)-([^]+)/,"$1"+ht+"$2-$3$1"+nd+(Br(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~O1(e,"stretch")?SO(vt(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Br(e,n+1)!==115)break;case 6444:switch(Br(e,So(e)-3-(~O1(e,"!important")&&10))){case 107:return vt(e,":",":"+ht)+e;case 101:return vt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ht+(Br(e,14)===45?"inline-":"")+"box$3$1"+ht+"$2$3$1"+Jr+"$2box$3")+e}break;case 5936:switch(Br(e,n+11)){case 114:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ht+e+Jr+e+e}return e}var dD=function(e,n,r,a){if(e.length>-1&&!e.return)switch(e.type){case x_:e.return=SO(e.value,e.length);break;case mO:return Us([Nl(e,{value:vt(e.value,"@","@"+ht)})],a);case T_:if(e.length)return HP(e.props,function(i){switch(zP(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Us([Nl(e,{props:[vt(i,/:(read-\w+)/,":"+nd+"$1")]})],a);case"::placeholder":return Us([Nl(e,{props:[vt(i,/:(plac\w+)/,":"+ht+"input-$1")]}),Nl(e,{props:[vt(i,/:(plac\w+)/,":"+nd+"$1")]}),Nl(e,{props:[vt(i,/:(plac\w+)/,Jr+"input-$1")]})],a)}return""})}},pD=[dD],hD=function(e){var n=e.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
42
- If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(R){var C=R.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(R),R.setAttribute("data-s",""))})}var a=e.stylisPlugins||pD;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var i={},u,c=[];u=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(R){for(var C=R.getAttribute("data-emotion").split(" "),k=1;k<C.length;k++)i[C[k]]=!0;c.push(R)});var f,p=[aD,iD];process.env.NODE_ENV!=="production"&&p.push(cD({get compat(){return O.compat}}),fD);{var h,m=[QP,process.env.NODE_ENV!=="production"?function(R){R.root||(R.return?h.insert(R.return):R.value&&R.type!==O_&&h.insert(R.value+"{}"))}:tD(function(R){h.insert(R)})],b=eD(p.concat(a,m)),E=function(R){return Us(JP(R),b)};f=function(R,C,k,j){h=k,process.env.NODE_ENV!=="production"&&C.map!==void 0&&(h={insert:function(F){k.insert(F+C.map)}}),E(R?R+"{"+C.styles+"}":C.styles),j&&(O.inserted[C.name]=!0)}}var O={key:n,sheet:new jP({key:n,container:u,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:f};return O.sheet.hydrate(c),O},x1={exports:{}},mt={};/** @license React v16.13.1
41
+ `+r+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!i}if(this.isSpeedy){var u=$P(a);try{u.insertRule(r,u.cssRules.length)}catch(c){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(r)&&console.error('There was a problem inserting the following rule: "'+r+'"',c)}}else a.appendChild(document.createTextNode(r));this.ctr++},n.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),Jr="-ms-",nd="-moz-",ht="-webkit-",O_="comm",T_="rule",x_="decl",LP="@import",mO="@keyframes",FP="@layer",WP=Math.abs,Dd=String.fromCharCode,BP=Object.assign;function UP(e,n){return Br(e,0)^45?(((n<<2^Br(e,0))<<2^Br(e,1))<<2^Br(e,2))<<2^Br(e,3):0}function yO(e){return e.trim()}function zP(e,n){return(e=n.exec(e))?e[0]:e}function vt(e,n,r){return e.replace(n,r)}function O1(e,n){return e.indexOf(n)}function Br(e,n){return e.charCodeAt(n)|0}function Zl(e,n,r){return e.slice(n,r)}function So(e){return e.length}function C_(e){return e.length}function _f(e,n){return n.push(e),e}function HP(e,n){return e.map(n).join("")}var Id=1,Xs=1,bO=0,On=0,pr=0,eu="";function Md(e,n,r,a,i,u,c){return{value:e,root:n,parent:r,type:a,props:i,children:u,line:Id,column:Xs,length:c,return:""}}function Nl(e,n){return BP(Md("",null,null,"",null,null,0),e,{length:-e.length},n)}function GP(){return pr}function qP(){return pr=On>0?Br(eu,--On):0,Xs--,pr===10&&(Xs=1,Id--),pr}function Bn(){return pr=On<bO?Br(eu,On++):0,Xs++,pr===10&&(Xs=1,Id++),pr}function Ro(){return Br(eu,On)}function Ff(){return On}function af(e,n){return Zl(eu,e,n)}function Ql(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _O(e){return Id=Xs=1,bO=So(eu=e),On=0,[]}function wO(e){return eu="",e}function Wf(e){return yO(af(On-1,T1(e===91?e+2:e===40?e+1:e)))}function VP(e){for(;(pr=Ro())&&pr<33;)Bn();return Ql(e)>2||Ql(pr)>3?"":" "}function YP(e,n){for(;--n&&Bn()&&!(pr<48||pr>102||pr>57&&pr<65||pr>70&&pr<97););return af(e,Ff()+(n<6&&Ro()==32&&Bn()==32))}function T1(e){for(;Bn();)switch(pr){case e:return On;case 34:case 39:e!==34&&e!==39&&T1(pr);break;case 40:e===41&&T1(e);break;case 92:Bn();break}return On}function KP(e,n){for(;Bn()&&e+pr!==47+10&&!(e+pr===42+42&&Ro()===47););return"/*"+af(n,On-1)+"*"+Dd(e===47?e:Bn())}function XP(e){for(;!Ql(Ro());)Bn();return af(e,On)}function JP(e){return wO(Bf("",null,null,null,[""],e=_O(e),0,[0],e))}function Bf(e,n,r,a,i,u,c,f,p){for(var h=0,m=0,b=c,E=0,O=0,R=0,C=1,k=1,j=1,F=0,D="",M=i,S=u,q=a,U=D;k;)switch(R=F,F=Bn()){case 40:if(R!=108&&Br(U,b-1)==58){O1(U+=vt(Wf(F),"&","&\f"),"&\f")!=-1&&(j=-1);break}case 34:case 39:case 91:U+=Wf(F);break;case 9:case 10:case 13:case 32:U+=VP(R);break;case 92:U+=YP(Ff()-1,7);continue;case 47:switch(Ro()){case 42:case 47:_f(ZP(KP(Bn(),Ff()),n,r),p);break;default:U+="/"}break;case 123*C:f[h++]=So(U)*j;case 125*C:case 59:case 0:switch(F){case 0:case 125:k=0;case 59+m:j==-1&&(U=vt(U,/\f/g,"")),O>0&&So(U)-b&&_f(O>32?Jw(U+";",a,r,b-1):Jw(vt(U," ","")+";",a,r,b-2),p);break;case 59:U+=";";default:if(_f(q=Xw(U,n,r,h,m,i,f,D,M=[],S=[],b),u),F===123)if(m===0)Bf(U,n,q,q,M,u,b,f,S);else switch(E===99&&Br(U,3)===110?100:E){case 100:case 108:case 109:case 115:Bf(e,q,q,a&&_f(Xw(e,q,q,0,0,i,f,D,i,M=[],b),S),i,S,b,f,a?M:S);break;default:Bf(U,q,q,q,[""],S,0,f,S)}}h=m=O=0,C=j=1,D=U="",b=c;break;case 58:b=1+So(U),O=R;default:if(C<1){if(F==123)--C;else if(F==125&&C++==0&&qP()==125)continue}switch(U+=Dd(F),F*C){case 38:j=m>0?1:(U+="\f",-1);break;case 44:f[h++]=(So(U)-1)*j,j=1;break;case 64:Ro()===45&&(U+=Wf(Bn())),E=Ro(),m=b=So(D=U+=XP(Ff())),F++;break;case 45:R===45&&So(U)==2&&(C=0)}}return u}function Xw(e,n,r,a,i,u,c,f,p,h,m){for(var b=i-1,E=i===0?u:[""],O=C_(E),R=0,C=0,k=0;R<a;++R)for(var j=0,F=Zl(e,b+1,b=WP(C=c[R])),D=e;j<O;++j)(D=yO(C>0?E[j]+" "+F:vt(F,/&\f/g,E[j])))&&(p[k++]=D);return Md(e,n,r,i===0?T_:f,p,h,m)}function ZP(e,n,r){return Md(e,n,r,O_,Dd(GP()),Zl(e,2,-2),0)}function Jw(e,n,r,a){return Md(e,n,r,x_,Zl(e,0,a),Zl(e,a+1,-1),a)}function Bs(e,n){for(var r="",a=C_(e),i=0;i<a;i++)r+=n(e[i],i,e,n)||"";return r}function QP(e,n,r,a){switch(e.type){case FP:if(e.children.length)break;case LP:case x_:return e.return=e.return||e.value;case O_:return"";case mO:return e.return=e.value+"{"+Bs(e.children,a)+"}";case T_:e.value=e.props.join(",")}return So(r=Bs(e.children,a))?e.return=e.value+"{"+r+"}":""}function eD(e){var n=C_(e);return function(r,a,i,u){for(var c="",f=0;f<n;f++)c+=e[f](r,a,i,u)||"";return c}}function tD(e){return function(n){n.root||(n=n.return)&&e(n)}}var rD=function(e,n,r){for(var a=0,i=0;a=i,i=Ro(),a===38&&i===12&&(n[r]=1),!Ql(i);)Bn();return af(e,On)},nD=function(e,n){var r=-1,a=44;do switch(Ql(a)){case 0:a===38&&Ro()===12&&(n[r]=1),e[r]+=rD(On-1,n,r);break;case 2:e[r]+=Wf(a);break;case 4:if(a===44){e[++r]=Ro()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Dd(a)}while(a=Bn());return e},oD=function(e,n){return wO(nD(_O(e),n))},Zw=new WeakMap,aD=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,a=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Zw.get(r))&&!a){Zw.set(e,!0);for(var i=[],u=oD(n,i),c=r.props,f=0,p=0;f<u.length;f++)for(var h=0;h<c.length;h++,p++)e.props[p]=i[f]?u[f].replace(/&\f/g,c[h]):c[h]+" "+u[f]}}},iD=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}},sD="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",uD=function(e){return e.type==="comm"&&e.children.indexOf(sD)>-1},cD=function(e){return function(n,r,a){if(!(n.type!=="rule"||e.compat)){var i=n.value.match(/(:first|:nth|:nth-last)-child/g);if(i){for(var u=!!n.parent,c=u?n.parent.children:a,f=c.length-1;f>=0;f--){var p=c[f];if(p.line<n.line)break;if(p.column<n.column){if(uD(p))return;break}}i.forEach(function(h){console.error('The pseudo class "'+h+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+h.split("-child")[0]+'-of-type".')})}}}},EO=function(e){return e.type.charCodeAt(1)===105&&e.type.charCodeAt(0)===64},lD=function(e,n){for(var r=e-1;r>=0;r--)if(!EO(n[r]))return!0;return!1},Qw=function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},fD=function(e,n,r){EO(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Qw(e)):lD(n,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Qw(e)))};function SO(e,n){switch(UP(e,n)){case 5103:return ht+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ht+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ht+e+nd+e+Jr+e+e;case 6828:case 4268:return ht+e+Jr+e+e;case 6165:return ht+e+Jr+"flex-"+e+e;case 5187:return ht+e+vt(e,/(\w+).+(:[^]+)/,ht+"box-$1$2"+Jr+"flex-$1$2")+e;case 5443:return ht+e+Jr+"flex-item-"+vt(e,/flex-|-self/,"")+e;case 4675:return ht+e+Jr+"flex-line-pack"+vt(e,/align-content|flex-|-self/,"")+e;case 5548:return ht+e+Jr+vt(e,"shrink","negative")+e;case 5292:return ht+e+Jr+vt(e,"basis","preferred-size")+e;case 6060:return ht+"box-"+vt(e,"-grow","")+ht+e+Jr+vt(e,"grow","positive")+e;case 4554:return ht+vt(e,/([^-])(transform)/g,"$1"+ht+"$2")+e;case 6187:return vt(vt(vt(e,/(zoom-|grab)/,ht+"$1"),/(image-set)/,ht+"$1"),e,"")+e;case 5495:case 3959:return vt(e,/(image-set\([^]*)/,ht+"$1$`$1");case 4968:return vt(vt(e,/(.+:)(flex-)?(.*)/,ht+"box-pack:$3"+Jr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ht+e+e;case 4095:case 3583:case 4068:case 2532:return vt(e,/(.+)-inline(.+)/,ht+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(So(e)-1-n>6)switch(Br(e,n+1)){case 109:if(Br(e,n+4)!==45)break;case 102:return vt(e,/(.+:)(.+)-([^]+)/,"$1"+ht+"$2-$3$1"+nd+(Br(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~O1(e,"stretch")?SO(vt(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Br(e,n+1)!==115)break;case 6444:switch(Br(e,So(e)-3-(~O1(e,"!important")&&10))){case 107:return vt(e,":",":"+ht)+e;case 101:return vt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ht+(Br(e,14)===45?"inline-":"")+"box$3$1"+ht+"$2$3$1"+Jr+"$2box$3")+e}break;case 5936:switch(Br(e,n+11)){case 114:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ht+e+Jr+vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ht+e+Jr+e+e}return e}var dD=function(e,n,r,a){if(e.length>-1&&!e.return)switch(e.type){case x_:e.return=SO(e.value,e.length);break;case mO:return Bs([Nl(e,{value:vt(e.value,"@","@"+ht)})],a);case T_:if(e.length)return HP(e.props,function(i){switch(zP(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Bs([Nl(e,{props:[vt(i,/:(read-\w+)/,":"+nd+"$1")]})],a);case"::placeholder":return Bs([Nl(e,{props:[vt(i,/:(plac\w+)/,":"+ht+"input-$1")]}),Nl(e,{props:[vt(i,/:(plac\w+)/,":"+nd+"$1")]}),Nl(e,{props:[vt(i,/:(plac\w+)/,Jr+"input-$1")]})],a)}return""})}},pD=[dD],hD=function(e){var n=e.key;if(process.env.NODE_ENV!=="production"&&!n)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
42
+ If multiple caches share the same key they might "fight" for each other's style elements.`);if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(R){var C=R.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(R),R.setAttribute("data-s",""))})}var a=e.stylisPlugins||pD;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(n))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+n+'" was passed');var i={},u,c=[];u=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(R){for(var C=R.getAttribute("data-emotion").split(" "),k=1;k<C.length;k++)i[C[k]]=!0;c.push(R)});var f,p=[aD,iD];process.env.NODE_ENV!=="production"&&p.push(cD({get compat(){return O.compat}}),fD);{var h,m=[QP,process.env.NODE_ENV!=="production"?function(R){R.root||(R.return?h.insert(R.return):R.value&&R.type!==O_&&h.insert(R.value+"{}"))}:tD(function(R){h.insert(R)})],b=eD(p.concat(a,m)),E=function(R){return Bs(JP(R),b)};f=function(R,C,k,j){h=k,process.env.NODE_ENV!=="production"&&C.map!==void 0&&(h={insert:function(F){k.insert(F+C.map)}}),E(R?R+"{"+C.styles+"}":C.styles),j&&(O.inserted[C.name]=!0)}}var O={key:n,sheet:new jP({key:n,container:u,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:f};return O.sheet.hydrate(c),O},x1={exports:{}},mt={};/** @license React v16.13.1
43
43
  * react-is.production.min.js
44
44
  *
45
45
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -61,11 +61,11 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
61
61
 
62
62
  You should wrap it with \`css\` like this:
63
63
 
64
- `+("css`"+p+"`"))}break}if(n==null)return r;var h=n[r];return h!==void 0?h:r}function PD(e,n,r){var a="";if(Array.isArray(r))for(var i=0;i<r.length;i++)a+=ef(e,n,r[i])+";";else for(var u in r){var c=r[u];if(typeof c!="object")n!=null&&n[c]!==void 0?a+=u+"{"+n[c]+"}":nE(c)&&(a+=Mb(u)+":"+od(u,c)+";");else{if(u==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(CO);if(Array.isArray(c)&&typeof c[0]=="string"&&(n==null||n[c[0]]===void 0))for(var f=0;f<c.length;f++)nE(c[f])&&(a+=Mb(u)+":"+od(u,c[f])+";");else{var p=ef(e,n,c);switch(u){case"animation":case"animationName":{a+=Mb(u)+":"+p+";";break}default:process.env.NODE_ENV!=="production"&&u==="undefined"&&console.error(SD),a+=u+"{"+p+"}"}}}}return a}var aE=/label:\s*([^\s;\n{]+)\s*(;|$)/g,RO;process.env.NODE_ENV!=="production"&&(RO=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var yo,Zs=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var a=!0,i="";yo=void 0;var u=e[0];u==null||u.raw===void 0?(a=!1,i+=ef(r,n,u)):(process.env.NODE_ENV!=="production"&&u[0]===void 0&&console.error(rE),i+=u[0]);for(var c=1;c<e.length;c++)i+=ef(r,n,e[c]),a&&(process.env.NODE_ENV!=="production"&&u[c]===void 0&&console.error(rE),i+=u[c]);var f;process.env.NODE_ENV!=="production"&&(i=i.replace(RO,function(b){return f=b,""})),aE.lastIndex=0;for(var p="",h;(h=aE.exec(i))!==null;)p+="-"+h[1];var m=wD(i)+p;return process.env.NODE_ENV!=="production"?{name:m,styles:i,map:f,next:yo,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:m,styles:i,next:yo}},DD=function(e){return e()},AO=oe.useInsertionEffect?oe.useInsertionEffect:!1,P_=AO||DD,iE=AO||oe.useLayoutEffect,ID={}.hasOwnProperty,D_=oe.createContext(typeof HTMLElement<"u"?hD({key:"css"}):null);process.env.NODE_ENV!=="production"&&(D_.displayName="EmotionCacheContext");D_.Provider;var Nd=function(e){return ie.forwardRef(function(n,r){var a=ie.useContext(D_);return e(n,a,r)})},sf=oe.createContext({});process.env.NODE_ENV!=="production"&&(sf.displayName="EmotionThemeContext");var sE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uE="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",MD=function(e){var n=e.cache,r=e.serialized,a=e.isStringTag;return kd(n,r,a),P_(function(){return $d(n,r,a)}),null},kD=Nd(function(e,n,r){var a=e.css;typeof a=="string"&&n.registered[a]!==void 0&&(a=n.registered[a]);var i=e[sE],u=[a],c="";typeof e.className=="string"?c=R_(n.registered,u,e.className):e.className!=null&&(c=e.className+" ");var f=Zs(u,void 0,oe.useContext(sf));if(process.env.NODE_ENV!=="production"&&f.name.indexOf("-")===-1){var p=e[uE];p&&(f=Zs([f,"label:"+p+";"]))}c+=n.key+"-"+f.name;var h={};for(var m in e)ID.call(e,m)&&m!=="css"&&m!==sE&&(process.env.NODE_ENV==="production"||m!==uE)&&(h[m]=e[m]);return h.ref=r,h.className=c,oe.createElement(oe.Fragment,null,oe.createElement(MD,{cache:n,serialized:f,isStringTag:typeof i=="string"}),oe.createElement(i,h))});process.env.NODE_ENV!=="production"&&(kD.displayName="EmotionCssPropInternal");var $D={name:"@emotion/react",version:"11.11.1",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",browser:{"./dist/emotion-react.esm.js":"./dist/emotion-react.browser.esm.js"},exports:{".":{module:{worker:"./dist/emotion-react.worker.esm.js",browser:"./dist/emotion-react.browser.esm.js",default:"./dist/emotion-react.esm.js"},import:"./dist/emotion-react.cjs.mjs",default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{module:{worker:"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",browser:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"},import:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{module:{worker:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",browser:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"},import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{module:{worker:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",browser:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"},import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}},types:"types/index.d.ts",files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/*.d.ts","macro.*"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.11.0","@emotion/cache":"^11.11.0","@emotion/serialize":"^1.1.2","@emotion/use-insertion-effect-with-fallbacks":"^1.0.1","@emotion/utils":"^1.2.1","@emotion/weak-memoize":"^0.3.1","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.11.0","@emotion/css-prettifier":"1.1.3","@emotion/server":"11.11.0","@emotion/styled":"11.11.0","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^4.5.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.js","./jsx-runtime.js","./jsx-dev-runtime.js","./_isolated-hnrs.js"],umdName:"emotionReact",exports:{envConditions:["browser","worker"],extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}}}}},cE=!1,ND=Nd(function(e,n){process.env.NODE_ENV!=="production"&&!cE&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),cE=!0);var r=e.styles,a=Zs([r],void 0,oe.useContext(sf)),i=oe.useRef();return iE(function(){var u=n.key+"-global",c=new n.sheet.constructor({key:u,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),f=!1,p=document.querySelector('style[data-emotion="'+u+" "+a.name+'"]');return n.sheet.tags.length&&(c.before=n.sheet.tags[0]),p!==null&&(f=!0,p.setAttribute("data-emotion",u),c.hydrate([p])),i.current=[c,f],function(){c.flush()}},[n]),iE(function(){var u=i.current,c=u[0],f=u[1];if(f){u[1]=!1;return}if(a.next!==void 0&&$d(n,a.next,!0),c.tags.length){var p=c.tags[c.tags.length-1].nextElementSibling;c.before=p,c.flush()}n.insert("",a,c,!1)},[n,a.name]),null});process.env.NODE_ENV!=="production"&&(ND.displayName="EmotionGlobal");function jD(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Zs(n)}var LD=function(){var e=jD.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},FD=function e(n){for(var r=n.length,a=0,i="";a<r;a++){var u=n[a];if(u!=null){var c=void 0;switch(typeof u){case"boolean":break;case"object":{if(Array.isArray(u))c=e(u);else{process.env.NODE_ENV!=="production"&&u.styles!==void 0&&u.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),c="";for(var f in u)u[f]&&f&&(c&&(c+=" "),c+=f)}break}default:c=u}c&&(i&&(i+=" "),i+=c)}}return i};function WD(e,n,r){var a=[],i=R_(e,a,r);return a.length<2?r:i+n(a)}var BD=function(e){var n=e.cache,r=e.serializedArr;return P_(function(){for(var a=0;a<r.length;a++)$d(n,r[a],!1)}),null},UD=Nd(function(e,n){var r=!1,a=[],i=function(){if(r&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];var b=Zs(h,n.registered);return a.push(b),kd(n,b,!1),n.key+"-"+b.name},u=function(){if(r&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return WD(n.registered,i,FD(h))},c={css:i,cx:u,theme:oe.useContext(sf)},f=e.children(c);return r=!0,oe.createElement(oe.Fragment,null,oe.createElement(BD,{cache:n,serializedArr:a}),f)});process.env.NODE_ENV!=="production"&&(UD.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var lE=!0,zD=typeof jest<"u"||typeof vi<"u";if(lE&&!zD){var fE=typeof globalThis<"u"?globalThis:lE?window:global,dE="__EMOTION_REACT_"+$D.version.split(".")[0]+"__";fE[dE]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),fE[dE]=!0}}var HD=kP,GD=function(e){return e!=="theme"},pE=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?HD:GD},hE=function(e,n,r){var a;if(n){var i=n.shouldForwardProp;a=e.__emotion_forwardProp&&i?function(u){return e.__emotion_forwardProp(u)&&i(u)}:i}return typeof a!="function"&&r&&(a=e.__emotion_forwardProp),a},vE=`You have illegal escape sequence in your template literal, most likely inside content's property value.
64
+ `+("css`"+p+"`"))}break}if(n==null)return r;var h=n[r];return h!==void 0?h:r}function PD(e,n,r){var a="";if(Array.isArray(r))for(var i=0;i<r.length;i++)a+=ef(e,n,r[i])+";";else for(var u in r){var c=r[u];if(typeof c!="object")n!=null&&n[c]!==void 0?a+=u+"{"+n[c]+"}":nE(c)&&(a+=Mb(u)+":"+od(u,c)+";");else{if(u==="NO_COMPONENT_SELECTOR"&&process.env.NODE_ENV!=="production")throw new Error(CO);if(Array.isArray(c)&&typeof c[0]=="string"&&(n==null||n[c[0]]===void 0))for(var f=0;f<c.length;f++)nE(c[f])&&(a+=Mb(u)+":"+od(u,c[f])+";");else{var p=ef(e,n,c);switch(u){case"animation":case"animationName":{a+=Mb(u)+":"+p+";";break}default:process.env.NODE_ENV!=="production"&&u==="undefined"&&console.error(SD),a+=u+"{"+p+"}"}}}}return a}var aE=/label:\s*([^\s;\n{]+)\s*(;|$)/g,RO;process.env.NODE_ENV!=="production"&&(RO=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g);var yo,Js=function(e,n,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var a=!0,i="";yo=void 0;var u=e[0];u==null||u.raw===void 0?(a=!1,i+=ef(r,n,u)):(process.env.NODE_ENV!=="production"&&u[0]===void 0&&console.error(rE),i+=u[0]);for(var c=1;c<e.length;c++)i+=ef(r,n,e[c]),a&&(process.env.NODE_ENV!=="production"&&u[c]===void 0&&console.error(rE),i+=u[c]);var f;process.env.NODE_ENV!=="production"&&(i=i.replace(RO,function(b){return f=b,""})),aE.lastIndex=0;for(var p="",h;(h=aE.exec(i))!==null;)p+="-"+h[1];var m=wD(i)+p;return process.env.NODE_ENV!=="production"?{name:m,styles:i,map:f,next:yo,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}:{name:m,styles:i,next:yo}},DD=function(e){return e()},AO=oe.useInsertionEffect?oe.useInsertionEffect:!1,P_=AO||DD,iE=AO||oe.useLayoutEffect,ID={}.hasOwnProperty,D_=oe.createContext(typeof HTMLElement<"u"?hD({key:"css"}):null);process.env.NODE_ENV!=="production"&&(D_.displayName="EmotionCacheContext");D_.Provider;var Nd=function(e){return ie.forwardRef(function(n,r){var a=ie.useContext(D_);return e(n,a,r)})},sf=oe.createContext({});process.env.NODE_ENV!=="production"&&(sf.displayName="EmotionThemeContext");var sE="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uE="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",MD=function(e){var n=e.cache,r=e.serialized,a=e.isStringTag;return kd(n,r,a),P_(function(){return $d(n,r,a)}),null},kD=Nd(function(e,n,r){var a=e.css;typeof a=="string"&&n.registered[a]!==void 0&&(a=n.registered[a]);var i=e[sE],u=[a],c="";typeof e.className=="string"?c=R_(n.registered,u,e.className):e.className!=null&&(c=e.className+" ");var f=Js(u,void 0,oe.useContext(sf));if(process.env.NODE_ENV!=="production"&&f.name.indexOf("-")===-1){var p=e[uE];p&&(f=Js([f,"label:"+p+";"]))}c+=n.key+"-"+f.name;var h={};for(var m in e)ID.call(e,m)&&m!=="css"&&m!==sE&&(process.env.NODE_ENV==="production"||m!==uE)&&(h[m]=e[m]);return h.ref=r,h.className=c,oe.createElement(oe.Fragment,null,oe.createElement(MD,{cache:n,serialized:f,isStringTag:typeof i=="string"}),oe.createElement(i,h))});process.env.NODE_ENV!=="production"&&(kD.displayName="EmotionCssPropInternal");var $D={name:"@emotion/react",version:"11.11.1",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",browser:{"./dist/emotion-react.esm.js":"./dist/emotion-react.browser.esm.js"},exports:{".":{module:{worker:"./dist/emotion-react.worker.esm.js",browser:"./dist/emotion-react.browser.esm.js",default:"./dist/emotion-react.esm.js"},import:"./dist/emotion-react.cjs.mjs",default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{module:{worker:"./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",browser:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"},import:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{module:{worker:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",browser:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"},import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{module:{worker:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",browser:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"},import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}},types:"types/index.d.ts",files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/*.d.ts","macro.*"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.11.0","@emotion/cache":"^11.11.0","@emotion/serialize":"^1.1.2","@emotion/use-insertion-effect-with-fallbacks":"^1.0.1","@emotion/utils":"^1.2.1","@emotion/weak-memoize":"^0.3.1","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.11.0","@emotion/css-prettifier":"1.1.3","@emotion/server":"11.11.0","@emotion/styled":"11.11.0","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^4.5.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.js","./jsx-runtime.js","./jsx-dev-runtime.js","./_isolated-hnrs.js"],umdName:"emotionReact",exports:{envConditions:["browser","worker"],extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}}}}},cE=!1,ND=Nd(function(e,n){process.env.NODE_ENV!=="production"&&!cE&&(e.className||e.css)&&(console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),cE=!0);var r=e.styles,a=Js([r],void 0,oe.useContext(sf)),i=oe.useRef();return iE(function(){var u=n.key+"-global",c=new n.sheet.constructor({key:u,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy}),f=!1,p=document.querySelector('style[data-emotion="'+u+" "+a.name+'"]');return n.sheet.tags.length&&(c.before=n.sheet.tags[0]),p!==null&&(f=!0,p.setAttribute("data-emotion",u),c.hydrate([p])),i.current=[c,f],function(){c.flush()}},[n]),iE(function(){var u=i.current,c=u[0],f=u[1];if(f){u[1]=!1;return}if(a.next!==void 0&&$d(n,a.next,!0),c.tags.length){var p=c.tags[c.tags.length-1].nextElementSibling;c.before=p,c.flush()}n.insert("",a,c,!1)},[n,a.name]),null});process.env.NODE_ENV!=="production"&&(ND.displayName="EmotionGlobal");function jD(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Js(n)}var LD=function(){var e=jD.apply(void 0,arguments),n="animation-"+e.name;return{name:n,styles:"@keyframes "+n+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},FD=function e(n){for(var r=n.length,a=0,i="";a<r;a++){var u=n[a];if(u!=null){var c=void 0;switch(typeof u){case"boolean":break;case"object":{if(Array.isArray(u))c=e(u);else{process.env.NODE_ENV!=="production"&&u.styles!==void 0&&u.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),c="";for(var f in u)u[f]&&f&&(c&&(c+=" "),c+=f)}break}default:c=u}c&&(i&&(i+=" "),i+=c)}}return i};function WD(e,n,r){var a=[],i=R_(e,a,r);return a.length<2?r:i+n(a)}var BD=function(e){var n=e.cache,r=e.serializedArr;return P_(function(){for(var a=0;a<r.length;a++)$d(n,r[a],!1)}),null},UD=Nd(function(e,n){var r=!1,a=[],i=function(){if(r&&process.env.NODE_ENV!=="production")throw new Error("css can only be used during render");for(var p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];var b=Js(h,n.registered);return a.push(b),kd(n,b,!1),n.key+"-"+b.name},u=function(){if(r&&process.env.NODE_ENV!=="production")throw new Error("cx can only be used during render");for(var p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return WD(n.registered,i,FD(h))},c={css:i,cx:u,theme:oe.useContext(sf)},f=e.children(c);return r=!0,oe.createElement(oe.Fragment,null,oe.createElement(BD,{cache:n,serializedArr:a}),f)});process.env.NODE_ENV!=="production"&&(UD.displayName="EmotionClassNames");if(process.env.NODE_ENV!=="production"){var lE=!0,zD=typeof jest<"u"||typeof vi<"u";if(lE&&!zD){var fE=typeof globalThis<"u"?globalThis:lE?window:global,dE="__EMOTION_REACT_"+$D.version.split(".")[0]+"__";fE[dE]&&console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used."),fE[dE]=!0}}var HD=kP,GD=function(e){return e!=="theme"},pE=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?HD:GD},hE=function(e,n,r){var a;if(n){var i=n.shouldForwardProp;a=e.__emotion_forwardProp&&i?function(u){return e.__emotion_forwardProp(u)&&i(u)}:i}return typeof a!="function"&&r&&(a=e.__emotion_forwardProp),a},vE=`You have illegal escape sequence in your template literal, most likely inside content's property value.
65
65
  Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
66
66
  You can read more about this here:
67
67
  https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,qD=function(e){var n=e.cache,r=e.serialized,a=e.isStringTag;return kd(n,r,a),P_(function(){return $d(n,r,a)}),null},VD=function e(n,r){if(process.env.NODE_ENV!=="production"&&n===void 0)throw new Error(`You are trying to create a styled element with an undefined component.
68
- You may have forgotten to import it.`);var a=n.__emotion_real===n,i=a&&n.__emotion_base||n,u,c;r!==void 0&&(u=r.label,c=r.target);var f=hE(n,r,a),p=f||pE(i),h=!p("as");return function(){var m=arguments,b=a&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(u!==void 0&&b.push("label:"+u+";"),m[0]==null||m[0].raw===void 0)b.push.apply(b,m);else{process.env.NODE_ENV!=="production"&&m[0][0]===void 0&&console.error(vE),b.push(m[0][0]);for(var E=m.length,O=1;O<E;O++)process.env.NODE_ENV!=="production"&&m[0][O]===void 0&&console.error(vE),b.push(m[O],m[0][O])}var R=Nd(function(C,k,j){var F=h&&C.as||i,D="",M=[],S=C;if(C.theme==null){S={};for(var q in C)S[q]=C[q];S.theme=oe.useContext(sf)}typeof C.className=="string"?D=R_(k.registered,M,C.className):C.className!=null&&(D=C.className+" ");var U=Zs(b.concat(M),k.registered,S);D+=k.key+"-"+U.name,c!==void 0&&(D+=" "+c);var V=h&&f===void 0?pE(F):p,Ee={};for(var He in C)h&&He==="as"||V(He)&&(Ee[He]=C[He]);return Ee.className=D,Ee.ref=j,oe.createElement(oe.Fragment,null,oe.createElement(qD,{cache:k,serialized:U,isStringTag:typeof F=="string"}),oe.createElement(F,Ee))});return R.displayName=u!==void 0?u:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",R.defaultProps=n.defaultProps,R.__emotion_real=R,R.__emotion_base=i,R.__emotion_styles=b,R.__emotion_forwardProp=f,Object.defineProperty(R,"toString",{value:function(){return c===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+c}}),R.withComponent=function(C,k){return e(C,Wa({},r,k,{shouldForwardProp:hE(R,k,!0)})).apply(void 0,b)},R}},YD=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ad=VD.bind();YD.forEach(function(e){ad[e]=ad(e)});var C1=function(e,n){return C1=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])},C1(e,n)};function jd(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");C1(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var Oo=function(){return Oo=Object.assign||function(e){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Oo.apply(this,arguments)};function PO(e,n){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.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++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r}function R1(e){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&e[n],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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function A1(e,n){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,u=[],c;try{for(;(n===void 0||n-- >0)&&!(i=a.next()).done;)u.push(i.value)}catch(f){c={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(c)throw c.error}}return u}function id(e,n,r){if(r||arguments.length===2)for(var a=0,i=n.length,u;a<i;a++)(u||!(a in n))&&(u||(u=Array.prototype.slice.call(n,0,a)),u[a]=n[a]);return e.concat(u||Array.prototype.slice.call(n))}var Uf="right-scroll-bar-position",zf="width-before-scroll-bar",KD="with-scroll-bars-hidden",XD="--removed-body-scroll-bar-size";function JD(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function ZD(e,n){var r=ie.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(a){var i=r.value;i!==a&&(r.value=a,r.callback(a,i))}}}})[0];return r.callback=n,r.facade}function QD(e,n){return ZD(n||null,function(r){return e.forEach(function(a){return JD(a,r)})})}function eI(e){return e}function tI(e,n){n===void 0&&(n=eI);var r=[],a=!1,i={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(u){var c=n(u,a);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(u){for(a=!0;r.length;){var c=r;r=[],c.forEach(u)}r={push:function(f){return u(f)},filter:function(){return r}}},assignMedium:function(u){a=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(u),c=r}var p=function(){var m=c;c=[],m.forEach(u)},h=function(){return Promise.resolve().then(p)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return i}function rI(e){e===void 0&&(e={});var n=tI(null);return n.options=Oo({async:!0,ssr:!1},e),n}var DO=function(e){var n=e.sideCar,r=PO(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=n.read();if(!a)throw new Error("Sidecar medium not found");return oe.createElement(a,Oo({},r))};DO.isSideCarExport=!0;function nI(e,n){return e.useMedium(n),DO}var IO=rI(),kb=function(){},Ld=oe.forwardRef(function(e,n){var r=oe.useRef(null),a=oe.useState({onScrollCapture:kb,onWheelCapture:kb,onTouchMoveCapture:kb}),i=a[0],u=a[1],c=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,b=e.shards,E=e.sideCar,O=e.noIsolation,R=e.inert,C=e.allowPinchZoom,k=e.as,j=k===void 0?"div":k,F=e.gapMode,D=PO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=E,S=QD([r,n]),q=Oo(Oo({},D),i);return oe.createElement(oe.Fragment,null,m&&oe.createElement(M,{sideCar:IO,removeScrollBar:h,shards:b,noIsolation:O,inert:R,setCallbacks:u,allowPinchZoom:!!C,lockRef:r,gapMode:F}),c?oe.cloneElement(oe.Children.only(f),Oo(Oo({},q),{ref:S})):oe.createElement(j,Oo({},q,{className:p,ref:S}),f))});Ld.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ld.classNames={fullWidth:zf,zeroRight:Uf};var oI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=oI();return n&&e.setAttribute("nonce",n),e}function iI(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sI(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var uI=function(){var e=0,n=null;return{add:function(r){e==0&&(n=aI())&&(iI(n,r),sI(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},cI=function(){var e=uI();return function(n,r){oe.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},MO=function(){var e=cI(),n=function(r){var a=r.styles,i=r.dynamic;return e(a,i),null};return n},lI={left:0,top:0,right:0,gap:0},$b=function(e){return parseInt(e||"",10)||0},fI=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[$b(r),$b(a),$b(i)]},dI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lI;var n=fI(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-r+n[2]-n[0])}},pI=MO(),hI=function(e,n,r,a){var i=e.left,u=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
68
+ You may have forgotten to import it.`);var a=n.__emotion_real===n,i=a&&n.__emotion_base||n,u,c;r!==void 0&&(u=r.label,c=r.target);var f=hE(n,r,a),p=f||pE(i),h=!p("as");return function(){var m=arguments,b=a&&n.__emotion_styles!==void 0?n.__emotion_styles.slice(0):[];if(u!==void 0&&b.push("label:"+u+";"),m[0]==null||m[0].raw===void 0)b.push.apply(b,m);else{process.env.NODE_ENV!=="production"&&m[0][0]===void 0&&console.error(vE),b.push(m[0][0]);for(var E=m.length,O=1;O<E;O++)process.env.NODE_ENV!=="production"&&m[0][O]===void 0&&console.error(vE),b.push(m[O],m[0][O])}var R=Nd(function(C,k,j){var F=h&&C.as||i,D="",M=[],S=C;if(C.theme==null){S={};for(var q in C)S[q]=C[q];S.theme=oe.useContext(sf)}typeof C.className=="string"?D=R_(k.registered,M,C.className):C.className!=null&&(D=C.className+" ");var U=Js(b.concat(M),k.registered,S);D+=k.key+"-"+U.name,c!==void 0&&(D+=" "+c);var V=h&&f===void 0?pE(F):p,Ee={};for(var He in C)h&&He==="as"||V(He)&&(Ee[He]=C[He]);return Ee.className=D,Ee.ref=j,oe.createElement(oe.Fragment,null,oe.createElement(qD,{cache:k,serialized:U,isStringTag:typeof F=="string"}),oe.createElement(F,Ee))});return R.displayName=u!==void 0?u:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",R.defaultProps=n.defaultProps,R.__emotion_real=R,R.__emotion_base=i,R.__emotion_styles=b,R.__emotion_forwardProp=f,Object.defineProperty(R,"toString",{value:function(){return c===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+c}}),R.withComponent=function(C,k){return e(C,Wa({},r,k,{shouldForwardProp:hE(R,k,!0)})).apply(void 0,b)},R}},YD=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ad=VD.bind();YD.forEach(function(e){ad[e]=ad(e)});var C1=function(e,n){return C1=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])},C1(e,n)};function jd(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");C1(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var Oo=function(){return Oo=Object.assign||function(e){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Oo.apply(this,arguments)};function PO(e,n){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.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++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r}function R1(e){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&e[n],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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function A1(e,n){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,u=[],c;try{for(;(n===void 0||n-- >0)&&!(i=a.next()).done;)u.push(i.value)}catch(f){c={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(c)throw c.error}}return u}function id(e,n,r){if(r||arguments.length===2)for(var a=0,i=n.length,u;a<i;a++)(u||!(a in n))&&(u||(u=Array.prototype.slice.call(n,0,a)),u[a]=n[a]);return e.concat(u||Array.prototype.slice.call(n))}var Uf="right-scroll-bar-position",zf="width-before-scroll-bar",KD="with-scroll-bars-hidden",XD="--removed-body-scroll-bar-size";function JD(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function ZD(e,n){var r=ie.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(a){var i=r.value;i!==a&&(r.value=a,r.callback(a,i))}}}})[0];return r.callback=n,r.facade}function QD(e,n){return ZD(n||null,function(r){return e.forEach(function(a){return JD(a,r)})})}function eI(e){return e}function tI(e,n){n===void 0&&(n=eI);var r=[],a=!1,i={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(u){var c=n(u,a);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(u){for(a=!0;r.length;){var c=r;r=[],c.forEach(u)}r={push:function(f){return u(f)},filter:function(){return r}}},assignMedium:function(u){a=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(u),c=r}var p=function(){var m=c;c=[],m.forEach(u)},h=function(){return Promise.resolve().then(p)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return i}function rI(e){e===void 0&&(e={});var n=tI(null);return n.options=Oo({async:!0,ssr:!1},e),n}var DO=function(e){var n=e.sideCar,r=PO(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=n.read();if(!a)throw new Error("Sidecar medium not found");return oe.createElement(a,Oo({},r))};DO.isSideCarExport=!0;function nI(e,n){return e.useMedium(n),DO}var IO=rI(),kb=function(){},Ld=oe.forwardRef(function(e,n){var r=oe.useRef(null),a=oe.useState({onScrollCapture:kb,onWheelCapture:kb,onTouchMoveCapture:kb}),i=a[0],u=a[1],c=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,m=e.enabled,b=e.shards,E=e.sideCar,O=e.noIsolation,R=e.inert,C=e.allowPinchZoom,k=e.as,j=k===void 0?"div":k,F=e.gapMode,D=PO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=E,S=QD([r,n]),q=Oo(Oo({},D),i);return oe.createElement(oe.Fragment,null,m&&oe.createElement(M,{sideCar:IO,removeScrollBar:h,shards:b,noIsolation:O,inert:R,setCallbacks:u,allowPinchZoom:!!C,lockRef:r,gapMode:F}),c?oe.cloneElement(oe.Children.only(f),Oo(Oo({},q),{ref:S})):oe.createElement(j,Oo({},q,{className:p,ref:S}),f))});Ld.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ld.classNames={fullWidth:zf,zeroRight:Uf};var oI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=oI();return n&&e.setAttribute("nonce",n),e}function iI(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function sI(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var uI=function(){var e=0,n=null;return{add:function(r){e==0&&(n=aI())&&(iI(n,r),sI(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},cI=function(){var e=uI();return function(n,r){oe.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},MO=function(){var e=cI(),n=function(r){var a=r.styles,i=r.dynamic;return e(a,i),null};return n},lI={left:0,top:0,right:0,gap:0},$b=function(e){return parseInt(e||"",10)||0},fI=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],a=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[$b(r),$b(a),$b(i)]},dI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lI;var n=fI(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,a-r+n[2]-n[0])}},pI=MO(),hI=function(e,n,r,a){var i=e.left,u=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
69
69
  .`.concat(KD,` {
70
70
  overflow: hidden `).concat(a,`;
71
71
  padding-right: `).concat(f,"px ").concat(a,`;
@@ -102,10 +102,10 @@ You may have forgotten to import it.`);var a=n.__emotion_real===n,i=a&&n.__emoti
102
102
  body {
103
103
  `).concat(XD,": ").concat(f,`px;
104
104
  }
105
- `)},vI=function(e){var n=e.noRelative,r=e.noImportant,a=e.gapMode,i=a===void 0?"margin":a,u=oe.useMemo(function(){return dI(i)},[i]);return oe.createElement(pI,{styles:hI(u,!n,i,r?"":"!important")})},P1=!1;if(typeof window<"u")try{var wf=Object.defineProperty({},"passive",{get:function(){return P1=!0,!0}});window.addEventListener("test",wf,wf),window.removeEventListener("test",wf,wf)}catch{P1=!1}var ks=P1?{passive:!1}:!1,gI=function(e){return e.tagName==="TEXTAREA"},kO=function(e,n){var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!gI(e)&&r[n]==="visible")},mI=function(e){return kO(e,"overflowY")},yI=function(e){return kO(e,"overflowX")},gE=function(e,n){var r=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=$O(e,a);if(i){var u=NO(e,a),c=u[1],f=u[2];if(c>f)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},bI=function(e){var n=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[n,r,a]},_I=function(e){var n=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[n,r,a]},$O=function(e,n){return e==="v"?mI(n):yI(n)},NO=function(e,n){return e==="v"?bI(n):_I(n)},wI=function(e,n){return e==="h"&&n==="rtl"?-1:1},EI=function(e,n,r,a,i){var u=wI(e,window.getComputedStyle(n).direction),c=u*a,f=r.target,p=n.contains(f),h=!1,m=c>0,b=0,E=0;do{var O=NO(e,f),R=O[0],C=O[1],k=O[2],j=C-k-u*R;(R||j)&&$O(e,f)&&(b+=j,E+=R),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(m&&(i&&Math.abs(b)<1||!i&&c>b)||!m&&(i&&Math.abs(E)<1||!i&&-c>E))&&(h=!0),h},Ef=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mE=function(e){return[e.deltaX,e.deltaY]},yE=function(e){return e&&"current"in e?e.current:e},SI=function(e,n){return e[0]===n[0]&&e[1]===n[1]},OI=function(e){return`
105
+ `)},vI=function(e){var n=e.noRelative,r=e.noImportant,a=e.gapMode,i=a===void 0?"margin":a,u=oe.useMemo(function(){return dI(i)},[i]);return oe.createElement(pI,{styles:hI(u,!n,i,r?"":"!important")})},P1=!1;if(typeof window<"u")try{var wf=Object.defineProperty({},"passive",{get:function(){return P1=!0,!0}});window.addEventListener("test",wf,wf),window.removeEventListener("test",wf,wf)}catch{P1=!1}var Ms=P1?{passive:!1}:!1,gI=function(e){return e.tagName==="TEXTAREA"},kO=function(e,n){var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!gI(e)&&r[n]==="visible")},mI=function(e){return kO(e,"overflowY")},yI=function(e){return kO(e,"overflowX")},gE=function(e,n){var r=n.ownerDocument,a=n;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=$O(e,a);if(i){var u=NO(e,a),c=u[1],f=u[2];if(c>f)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},bI=function(e){var n=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[n,r,a]},_I=function(e){var n=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[n,r,a]},$O=function(e,n){return e==="v"?mI(n):yI(n)},NO=function(e,n){return e==="v"?bI(n):_I(n)},wI=function(e,n){return e==="h"&&n==="rtl"?-1:1},EI=function(e,n,r,a,i){var u=wI(e,window.getComputedStyle(n).direction),c=u*a,f=r.target,p=n.contains(f),h=!1,m=c>0,b=0,E=0;do{var O=NO(e,f),R=O[0],C=O[1],k=O[2],j=C-k-u*R;(R||j)&&$O(e,f)&&(b+=j,E+=R),f instanceof ShadowRoot?f=f.host:f=f.parentNode}while(!p&&f!==document.body||p&&(n.contains(f)||n===f));return(m&&(i&&Math.abs(b)<1||!i&&c>b)||!m&&(i&&Math.abs(E)<1||!i&&-c>E))&&(h=!0),h},Ef=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mE=function(e){return[e.deltaX,e.deltaY]},yE=function(e){return e&&"current"in e?e.current:e},SI=function(e,n){return e[0]===n[0]&&e[1]===n[1]},OI=function(e){return`
106
106
  .block-interactivity-`.concat(e,` {pointer-events: none;}
107
107
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
108
- `)},TI=0,$s=[];function xI(e){var n=oe.useRef([]),r=oe.useRef([0,0]),a=oe.useRef(),i=oe.useState(TI++)[0],u=oe.useState(MO)[0],c=oe.useRef(e);oe.useEffect(function(){c.current=e},[e]),oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var C=id([e.lockRef.current],(e.shards||[]).map(yE),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=oe.useCallback(function(C,k){if("touches"in C&&C.touches.length===2)return!c.current.allowPinchZoom;var j=Ef(C),F=r.current,D="deltaX"in C?C.deltaX:F[0]-j[0],M="deltaY"in C?C.deltaY:F[1]-j[1],S,q=C.target,U=Math.abs(D)>Math.abs(M)?"h":"v";if("touches"in C&&U==="h"&&q.type==="range")return!1;var V=gE(U,q);if(!V)return!0;if(V?S=U:(S=U==="v"?"h":"v",V=gE(U,q)),!V)return!1;if(!a.current&&"changedTouches"in C&&(D||M)&&(a.current=S),!S)return!0;var Ee=a.current||S;return EI(Ee,k,C,Ee==="h"?D:M,!0)},[]),p=oe.useCallback(function(C){var k=C;if(!(!$s.length||$s[$s.length-1]!==u)){var j="deltaY"in k?mE(k):Ef(k),F=n.current.filter(function(S){return S.name===k.type&&(S.target===k.target||k.target===S.shadowParent)&&SI(S.delta,j)})[0];if(F&&F.should){k.cancelable&&k.preventDefault();return}if(!F){var D=(c.current.shards||[]).map(yE).filter(Boolean).filter(function(S){return S.contains(k.target)}),M=D.length>0?f(k,D[0]):!c.current.noIsolation;M&&k.cancelable&&k.preventDefault()}}},[]),h=oe.useCallback(function(C,k,j,F){var D={name:C,delta:k,target:j,should:F,shadowParent:CI(j)};n.current.push(D),setTimeout(function(){n.current=n.current.filter(function(M){return M!==D})},1)},[]),m=oe.useCallback(function(C){r.current=Ef(C),a.current=void 0},[]),b=oe.useCallback(function(C){h(C.type,mE(C),C.target,f(C,e.lockRef.current))},[]),E=oe.useCallback(function(C){h(C.type,Ef(C),C.target,f(C,e.lockRef.current))},[]);oe.useEffect(function(){return $s.push(u),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:E}),document.addEventListener("wheel",p,ks),document.addEventListener("touchmove",p,ks),document.addEventListener("touchstart",m,ks),function(){$s=$s.filter(function(C){return C!==u}),document.removeEventListener("wheel",p,ks),document.removeEventListener("touchmove",p,ks),document.removeEventListener("touchstart",m,ks)}},[]);var O=e.removeScrollBar,R=e.inert;return oe.createElement(oe.Fragment,null,R?oe.createElement(u,{styles:OI(i)}):null,O?oe.createElement(vI,{gapMode:e.gapMode}):null)}function CI(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const RI=nI(IO,xI);var AI=oe.forwardRef(function(e,n){return oe.createElement(Ld,Oo({},e,{ref:n,sideCar:RI}))});AI.classNames=Ld.classNames;function jO(...e){return n=>e.forEach(r=>function(a,i){typeof a=="function"?a(i):a!=null&&(a.current=i)}(r,n))}function LO(...e){return oe.useCallback(jO(...e),e)}const FO=oe.forwardRef((e,n)=>{const{children:r,...a}=e;return oe.Children.toArray(r).some(bE)?oe.createElement(oe.Fragment,null,oe.Children.map(r,i=>bE(i)?oe.createElement(D1,Wa({},a,{ref:n}),i.props.children):i)):oe.createElement(D1,Wa({},a,{ref:n}),r)});FO.displayName="Slot";const D1=oe.forwardRef((e,n)=>{const{children:r,...a}=e;return oe.isValidElement(r)?oe.cloneElement(r,{...DI(a,r.props),ref:jO(n,r.ref)}):oe.Children.count(r)>1?oe.Children.only(null):null});D1.displayName="SlotClone";const PI=({children:e})=>oe.createElement(oe.Fragment,null,e);function bE(e){return oe.isValidElement(e)&&e.type===PI}function DI(e,n){const r={...n};for(const a in n){const i=e[a],u=n[a];/^on[A-Z]/.test(a)?r[a]=(...c)=>{u==null||u(...c),i==null||i(...c)}:a==="style"?r[a]={...i,...u}:a==="className"&&(r[a]=[i,u].filter(Boolean).join(" "))}return{...e,...r}}const WO=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>({...e,[n]:oe.forwardRef((r,a)=>{const{asChild:i,...u}=r,c=i?FO:n;return oe.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),oe.createElement(c,Wa({},u,{ref:a}))})}),{});function II(e,n,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function BO(e,n=[]){let r=[];const a=()=>{const i=r.map(u=>oe.createContext(u));return function(u){const c=(u==null?void 0:u[e])||i;return oe.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return a.scopeName=e,[function(i,u){const c=oe.createContext(u),f=r.length;function p(h){const{scope:m,children:b,...E}=h,O=(m==null?void 0:m[e][f])||c,R=oe.useMemo(()=>E,Object.values(E));return oe.createElement(O.Provider,{value:R},b)}return r=[...r,u],p.displayName=i+"Provider",[p,function(h,m){const b=(m==null?void 0:m[e][f])||c,E=oe.useContext(b);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${h}\` must be used within \`${i}\``)}]},MI(a,...n)]}function MI(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(i){const u=a.reduce((c,{useScope:f,scopeName:p})=>({...c,...f(i)[`__scope${p}`]}),{});return oe.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return r.scopeName=n.scopeName,r}const[UO,zO]=BO("Popper"),[y5,kI]=UO("Popper"),$I=oe.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...i}=e,u=kI("PopperAnchor",r),c=oe.useRef(null),f=LO(n,c);return oe.useEffect(()=>{u.onAnchorChange((a==null?void 0:a.current)||c.current)}),a?null:oe.createElement(WO.div,Wa({},i,{ref:f}))});UO("PopperContent");const NI=$I,[jI,b5]=BO("Popover",[zO]),LI=zO(),[_5,FI]=jI("Popover"),WI=oe.forwardRef((e,n)=>{const{__scopePopover:r,...a}=e,i=FI("PopoverTrigger",r),u=LI(r),c=LO(n,i.triggerRef),f=oe.createElement(WO.button,Wa({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":BI(i.open)},a,{ref:c,onClick:II(e.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?f:oe.createElement(NI,Wa({asChild:!0},u),f)});function BI(e){return e?"open":"closed"}const UI=WI;var zI={},Fd={},I_={},_E={},Sf={exports:{}},Nb={exports:{}},yt={};/** @license React v16.13.1
108
+ `)},TI=0,ks=[];function xI(e){var n=oe.useRef([]),r=oe.useRef([0,0]),a=oe.useRef(),i=oe.useState(TI++)[0],u=oe.useState(MO)[0],c=oe.useRef(e);oe.useEffect(function(){c.current=e},[e]),oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var C=id([e.lockRef.current],(e.shards||[]).map(yE),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=oe.useCallback(function(C,k){if("touches"in C&&C.touches.length===2)return!c.current.allowPinchZoom;var j=Ef(C),F=r.current,D="deltaX"in C?C.deltaX:F[0]-j[0],M="deltaY"in C?C.deltaY:F[1]-j[1],S,q=C.target,U=Math.abs(D)>Math.abs(M)?"h":"v";if("touches"in C&&U==="h"&&q.type==="range")return!1;var V=gE(U,q);if(!V)return!0;if(V?S=U:(S=U==="v"?"h":"v",V=gE(U,q)),!V)return!1;if(!a.current&&"changedTouches"in C&&(D||M)&&(a.current=S),!S)return!0;var Ee=a.current||S;return EI(Ee,k,C,Ee==="h"?D:M,!0)},[]),p=oe.useCallback(function(C){var k=C;if(!(!ks.length||ks[ks.length-1]!==u)){var j="deltaY"in k?mE(k):Ef(k),F=n.current.filter(function(S){return S.name===k.type&&(S.target===k.target||k.target===S.shadowParent)&&SI(S.delta,j)})[0];if(F&&F.should){k.cancelable&&k.preventDefault();return}if(!F){var D=(c.current.shards||[]).map(yE).filter(Boolean).filter(function(S){return S.contains(k.target)}),M=D.length>0?f(k,D[0]):!c.current.noIsolation;M&&k.cancelable&&k.preventDefault()}}},[]),h=oe.useCallback(function(C,k,j,F){var D={name:C,delta:k,target:j,should:F,shadowParent:CI(j)};n.current.push(D),setTimeout(function(){n.current=n.current.filter(function(M){return M!==D})},1)},[]),m=oe.useCallback(function(C){r.current=Ef(C),a.current=void 0},[]),b=oe.useCallback(function(C){h(C.type,mE(C),C.target,f(C,e.lockRef.current))},[]),E=oe.useCallback(function(C){h(C.type,Ef(C),C.target,f(C,e.lockRef.current))},[]);oe.useEffect(function(){return ks.push(u),e.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:E}),document.addEventListener("wheel",p,Ms),document.addEventListener("touchmove",p,Ms),document.addEventListener("touchstart",m,Ms),function(){ks=ks.filter(function(C){return C!==u}),document.removeEventListener("wheel",p,Ms),document.removeEventListener("touchmove",p,Ms),document.removeEventListener("touchstart",m,Ms)}},[]);var O=e.removeScrollBar,R=e.inert;return oe.createElement(oe.Fragment,null,R?oe.createElement(u,{styles:OI(i)}):null,O?oe.createElement(vI,{gapMode:e.gapMode}):null)}function CI(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const RI=nI(IO,xI);var AI=oe.forwardRef(function(e,n){return oe.createElement(Ld,Oo({},e,{ref:n,sideCar:RI}))});AI.classNames=Ld.classNames;function jO(...e){return n=>e.forEach(r=>function(a,i){typeof a=="function"?a(i):a!=null&&(a.current=i)}(r,n))}function LO(...e){return oe.useCallback(jO(...e),e)}const FO=oe.forwardRef((e,n)=>{const{children:r,...a}=e;return oe.Children.toArray(r).some(bE)?oe.createElement(oe.Fragment,null,oe.Children.map(r,i=>bE(i)?oe.createElement(D1,Wa({},a,{ref:n}),i.props.children):i)):oe.createElement(D1,Wa({},a,{ref:n}),r)});FO.displayName="Slot";const D1=oe.forwardRef((e,n)=>{const{children:r,...a}=e;return oe.isValidElement(r)?oe.cloneElement(r,{...DI(a,r.props),ref:jO(n,r.ref)}):oe.Children.count(r)>1?oe.Children.only(null):null});D1.displayName="SlotClone";const PI=({children:e})=>oe.createElement(oe.Fragment,null,e);function bE(e){return oe.isValidElement(e)&&e.type===PI}function DI(e,n){const r={...n};for(const a in n){const i=e[a],u=n[a];/^on[A-Z]/.test(a)?r[a]=(...c)=>{u==null||u(...c),i==null||i(...c)}:a==="style"?r[a]={...i,...u}:a==="className"&&(r[a]=[i,u].filter(Boolean).join(" "))}return{...e,...r}}const WO=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,n)=>({...e,[n]:oe.forwardRef((r,a)=>{const{asChild:i,...u}=r,c=i?FO:n;return oe.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),oe.createElement(c,Wa({},u,{ref:a}))})}),{});function II(e,n,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function BO(e,n=[]){let r=[];const a=()=>{const i=r.map(u=>oe.createContext(u));return function(u){const c=(u==null?void 0:u[e])||i;return oe.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return a.scopeName=e,[function(i,u){const c=oe.createContext(u),f=r.length;function p(h){const{scope:m,children:b,...E}=h,O=(m==null?void 0:m[e][f])||c,R=oe.useMemo(()=>E,Object.values(E));return oe.createElement(O.Provider,{value:R},b)}return r=[...r,u],p.displayName=i+"Provider",[p,function(h,m){const b=(m==null?void 0:m[e][f])||c,E=oe.useContext(b);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${h}\` must be used within \`${i}\``)}]},MI(a,...n)]}function MI(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(i){const u=a.reduce((c,{useScope:f,scopeName:p})=>({...c,...f(i)[`__scope${p}`]}),{});return oe.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return r.scopeName=n.scopeName,r}const[UO,zO]=BO("Popper"),[y5,kI]=UO("Popper"),$I=oe.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:a,...i}=e,u=kI("PopperAnchor",r),c=oe.useRef(null),f=LO(n,c);return oe.useEffect(()=>{u.onAnchorChange((a==null?void 0:a.current)||c.current)}),a?null:oe.createElement(WO.div,Wa({},i,{ref:f}))});UO("PopperContent");const NI=$I,[jI,b5]=BO("Popover",[zO]),LI=zO(),[_5,FI]=jI("Popover"),WI=oe.forwardRef((e,n)=>{const{__scopePopover:r,...a}=e,i=FI("PopoverTrigger",r),u=LI(r),c=LO(n,i.triggerRef),f=oe.createElement(WO.button,Wa({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":BI(i.open)},a,{ref:c,onClick:II(e.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?f:oe.createElement(NI,Wa({asChild:!0},u),f)});function BI(e){return e?"open":"closed"}const UI=WI;var zI={},Fd={},I_={},_E={},Sf={exports:{}},Nb={exports:{}},yt={};/** @license React v16.13.1
109
109
  * react-is.production.min.js
110
110
  *
111
111
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -124,10 +124,10 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var P=J(ae,ve,re,ue,ee+"
124
124
  &[data-state='open'] > * {
125
125
  display: block !important;
126
126
  }
127
- `;var F2=Object.defineProperty,W2=(e,n,r)=>n in e?F2(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Bb=(e,n,r)=>(W2(e,typeof n!="symbol"?n+"":n,r),r);let B2=class{constructor(){Bb(this,"current",this.detect()),Bb(this,"handoffState","pending"),Bb(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},zs=new B2,Qs=(e,n)=>{zs.isServer?ie.useEffect(e,n):ie.useLayoutEffect(e,n)};function U2(e){let n=ie.useRef(e);return Qs(()=>{n.current=e},[e]),n}function z2(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function KO(){let e=[],n={addEventListener(r,a,i,u){return r.addEventListener(a,i,u),n.add(()=>r.removeEventListener(a,i,u))},requestAnimationFrame(...r){let a=requestAnimationFrame(...r);return n.add(()=>cancelAnimationFrame(a))},nextFrame(...r){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...r))},setTimeout(...r){let a=setTimeout(...r);return n.add(()=>clearTimeout(a))},microTask(...r){let a={current:!0};return z2(()=>{a.current&&r[0]()}),n.add(()=>{a.current=!1})},style(r,a,i){let u=r.style.getPropertyValue(a);return Object.assign(r.style,{[a]:i}),this.add(()=>{Object.assign(r.style,{[a]:u})})},group(r){let a=KO();return r(a),this.add(()=>a.dispose())},add(r){return e.push(r),()=>{let a=e.indexOf(r);if(a>=0)for(let i of e.splice(a,1))i()}},dispose(){for(let r of e.splice(0))r()}};return n}function H2(){let[e]=ie.useState(KO);return ie.useEffect(()=>()=>e.dispose(),[e]),e}let Ka=function(e){let n=U2(e);return ie.useCallback((...r)=>n.current(...r),[n])};function G2(){let e=typeof document>"u";return"useSyncExternalStore"in oe?(n=>n.useSyncExternalStore)(oe)(()=>()=>{},()=>!1,()=>!e):!1}function q2(){let e=G2(),[n,r]=oe.useState(zs.isHandoffComplete);return n&&zs.isHandoffComplete===!1&&r(!1),oe.useEffect(()=>{n!==!0&&r(!0)},[n]),oe.useEffect(()=>zs.handoff(),[]),e?!1:n}var jE;let N_=(jE=ie.useId)!=null?jE:function(){let e=q2(),[n,r]=ie.useState(e?()=>zs.nextId():null);return Qs(()=>{n===null&&r(zs.nextId())},[n]),n!=null?""+n:void 0};function XO(e,n,...r){if(e in n){let i=n[e];return typeof i=="function"?i(...r):i}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,XO),a}function LE(e){var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function V2(e,n){let[r,a]=ie.useState(()=>LE(e));return Qs(()=>{a(LE(e))},[e.type,e.as]),Qs(()=>{r||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&a("button")},[r,n]),r}let Y2=Symbol();function j_(...e){let n=ie.useRef(e);ie.useEffect(()=>{n.current=e},[e]);let r=Ka(a=>{for(let i of n.current)i!=null&&(typeof i=="function"?i(a):i.current=a)});return e.every(a=>a==null||(a==null?void 0:a[Y2]))?void 0:r}function FE(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var K2=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(K2||{}),X2=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(X2||{});function df({ourProps:e,theirProps:n,slot:r,defaultTag:a,features:i,visible:u=!0,name:c}){let f=JO(n,e);if(u)return Cf(f,r,a,c);let p=i??0;if(p&2){let{static:h=!1,...m}=f;if(h)return Cf(m,r,a,c)}if(p&1){let{unmount:h=!0,...m}=f;return XO(h?0:1,{0(){return null},1(){return Cf({...m,hidden:!0,style:{display:"none"}},r,a,c)}})}return Cf(f,r,a,c)}function Cf(e,n={},r,a){let{as:i=r,children:u,refName:c="ref",...f}=Ub(e,["unmount","static"]),p=e.ref!==void 0?{[c]:e.ref}:{},h=typeof u=="function"?u(n):u;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(n));let m={};if(n){let b=!1,E=[];for(let[O,R]of Object.entries(n))typeof R=="boolean"&&(b=!0),R===!0&&E.push(O);b&&(m["data-headlessui-state"]=E.join(" "))}if(i===ie.Fragment&&Object.keys(N1(f)).length>0){if(!ie.isValidElement(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(R=>` - ${R}`).join(`
127
+ `;var F2=Object.defineProperty,W2=(e,n,r)=>n in e?F2(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Bb=(e,n,r)=>(W2(e,typeof n!="symbol"?n+"":n,r),r);let B2=class{constructor(){Bb(this,"current",this.detect()),Bb(this,"handoffState","pending"),Bb(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Us=new B2,Zs=(e,n)=>{Us.isServer?ie.useEffect(e,n):ie.useLayoutEffect(e,n)};function U2(e){let n=ie.useRef(e);return Zs(()=>{n.current=e},[e]),n}function z2(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(n=>setTimeout(()=>{throw n}))}function KO(){let e=[],n={addEventListener(r,a,i,u){return r.addEventListener(a,i,u),n.add(()=>r.removeEventListener(a,i,u))},requestAnimationFrame(...r){let a=requestAnimationFrame(...r);return n.add(()=>cancelAnimationFrame(a))},nextFrame(...r){return n.requestAnimationFrame(()=>n.requestAnimationFrame(...r))},setTimeout(...r){let a=setTimeout(...r);return n.add(()=>clearTimeout(a))},microTask(...r){let a={current:!0};return z2(()=>{a.current&&r[0]()}),n.add(()=>{a.current=!1})},style(r,a,i){let u=r.style.getPropertyValue(a);return Object.assign(r.style,{[a]:i}),this.add(()=>{Object.assign(r.style,{[a]:u})})},group(r){let a=KO();return r(a),this.add(()=>a.dispose())},add(r){return e.push(r),()=>{let a=e.indexOf(r);if(a>=0)for(let i of e.splice(a,1))i()}},dispose(){for(let r of e.splice(0))r()}};return n}function H2(){let[e]=ie.useState(KO);return ie.useEffect(()=>()=>e.dispose(),[e]),e}let Ka=function(e){let n=U2(e);return ie.useCallback((...r)=>n.current(...r),[n])};function G2(){let e=typeof document>"u";return"useSyncExternalStore"in oe?(n=>n.useSyncExternalStore)(oe)(()=>()=>{},()=>!1,()=>!e):!1}function q2(){let e=G2(),[n,r]=oe.useState(Us.isHandoffComplete);return n&&Us.isHandoffComplete===!1&&r(!1),oe.useEffect(()=>{n!==!0&&r(!0)},[n]),oe.useEffect(()=>Us.handoff(),[]),e?!1:n}var jE;let N_=(jE=ie.useId)!=null?jE:function(){let e=q2(),[n,r]=ie.useState(e?()=>Us.nextId():null);return Zs(()=>{n===null&&r(Us.nextId())},[n]),n!=null?""+n:void 0};function XO(e,n,...r){if(e in n){let i=n[e];return typeof i=="function"?i(...r):i}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,XO),a}function LE(e){var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function V2(e,n){let[r,a]=ie.useState(()=>LE(e));return Zs(()=>{a(LE(e))},[e.type,e.as]),Zs(()=>{r||n.current&&n.current instanceof HTMLButtonElement&&!n.current.hasAttribute("type")&&a("button")},[r,n]),r}let Y2=Symbol();function j_(...e){let n=ie.useRef(e);ie.useEffect(()=>{n.current=e},[e]);let r=Ka(a=>{for(let i of n.current)i!=null&&(typeof i=="function"?i(a):i.current=a)});return e.every(a=>a==null||(a==null?void 0:a[Y2]))?void 0:r}function FE(...e){return Array.from(new Set(e.flatMap(n=>typeof n=="string"?n.split(" "):[]))).filter(Boolean).join(" ")}var K2=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(K2||{}),X2=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(X2||{});function df({ourProps:e,theirProps:n,slot:r,defaultTag:a,features:i,visible:u=!0,name:c}){let f=JO(n,e);if(u)return Cf(f,r,a,c);let p=i??0;if(p&2){let{static:h=!1,...m}=f;if(h)return Cf(m,r,a,c)}if(p&1){let{unmount:h=!0,...m}=f;return XO(h?0:1,{0(){return null},1(){return Cf({...m,hidden:!0,style:{display:"none"}},r,a,c)}})}return Cf(f,r,a,c)}function Cf(e,n={},r,a){let{as:i=r,children:u,refName:c="ref",...f}=Ub(e,["unmount","static"]),p=e.ref!==void 0?{[c]:e.ref}:{},h=typeof u=="function"?u(n):u;"className"in f&&f.className&&typeof f.className=="function"&&(f.className=f.className(n));let m={};if(n){let b=!1,E=[];for(let[O,R]of Object.entries(n))typeof R=="boolean"&&(b=!0),R===!0&&E.push(O);b&&(m["data-headlessui-state"]=E.join(" "))}if(i===ie.Fragment&&Object.keys(N1(f)).length>0){if(!ie.isValidElement(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(f).map(R=>` - ${R}`).join(`
128
128
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(R=>` - ${R}`).join(`
129
129
  `)].join(`
130
- `));let b=h.props,E=typeof(b==null?void 0:b.className)=="function"?(...R)=>FE(b==null?void 0:b.className(...R),f.className):FE(b==null?void 0:b.className,f.className),O=E?{className:E}:{};return ie.cloneElement(h,Object.assign({},JO(h.props,N1(Ub(f,["ref"]))),m,p,J2(h.ref,p.ref),O))}return ie.createElement(i,Object.assign({},Ub(f,["ref"]),i!==ie.Fragment&&p,i!==ie.Fragment&&m),h)}function J2(...e){return{ref:e.every(n=>n==null)?void 0:n=>{for(let r of e)r!=null&&(typeof r=="function"?r(n):r.current=n)}}}function JO(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},r={};for(let a of e)for(let i in a)i.startsWith("on")&&typeof a[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(a[i])):n[i]=a[i];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(r).map(a=>[a,void 0])));for(let a in r)Object.assign(n,{[a](i,...u){let c=r[a];for(let f of c){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;f(i,...u)}}});return n}function zd(e){var n;return Object.assign(ie.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function N1(e){let n=Object.assign({},e);for(let r in n)n[r]===void 0&&delete n[r];return n}function Ub(e,n=[]){let r=Object.assign({},e);for(let a of n)a in r&&delete r[a];return r}function Z2(e){let n=e.parentElement,r=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(r=n),n=n.parentElement;let a=(n==null?void 0:n.getAttribute("disabled"))==="";return a&&Q2(r)?!1:a}function Q2(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function eM(e){var n,r;let a=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(a){for(let i of a.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(r=a.requestSubmit)==null||r.call(a)}}let tM="div";var ZO=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ZO||{});function rM(e,n){let{features:r=1,...a}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return df({ourProps:i,theirProps:a,slot:{},defaultTag:tM,name:"Hidden"})}let nM=zd(rM);var j1=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(j1||{});function oM(e,n,r){let[a,i]=ie.useState(r),u=e!==void 0,c=ie.useRef(u),f=ie.useRef(!1),p=ie.useRef(!1);return u&&!c.current&&!f.current?(f.current=!0,c.current=u,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!u&&c.current&&!p.current&&(p.current=!0,c.current=u,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[u?e:a,Ka(h=>(u||i(h),n==null?void 0:n(h)))]}let QO=ie.createContext(null);function eT(){let e=ie.useContext(QO);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,eT),n}return e}function aM(){let[e,n]=ie.useState([]);return[e.length>0?e.join(" "):void 0,ie.useMemo(()=>function(r){let a=Ka(u=>(n(c=>[...c,u]),()=>n(c=>{let f=c.slice(),p=f.indexOf(u);return p!==-1&&f.splice(p,1),f}))),i=ie.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return ie.createElement(QO.Provider,{value:i},r.children)},[n])]}let iM="p";function sM(e,n){let r=N_(),{id:a=`headlessui-description-${r}`,...i}=e,u=eT(),c=j_(n);Qs(()=>u.register(a),[a,u.register]);let f={ref:c,...u.props,id:a};return df({ourProps:f,theirProps:i,slot:u.slot||{},defaultTag:iM,name:u.name||"Description"})}let uM=zd(sM),cM=Object.assign(uM,{}),tT=ie.createContext(null);function rT(){let e=ie.useContext(tT);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,rT),n}return e}function lM(){let[e,n]=ie.useState([]);return[e.length>0?e.join(" "):void 0,ie.useMemo(()=>function(r){let a=Ka(u=>(n(c=>[...c,u]),()=>n(c=>{let f=c.slice(),p=f.indexOf(u);return p!==-1&&f.splice(p,1),f}))),i=ie.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return ie.createElement(tT.Provider,{value:i},r.children)},[n])]}let fM="label";function dM(e,n){let r=N_(),{id:a=`headlessui-label-${r}`,passive:i=!1,...u}=e,c=rT(),f=j_(n);Qs(()=>c.register(a),[a,c.register]);let p={ref:f,...c.props,id:a};return i&&("onClick"in p&&(delete p.htmlFor,delete p.onClick),"onClick"in u&&delete u.onClick),df({ourProps:p,theirProps:u,slot:c.slot||{},defaultTag:fM,name:c.name||"Label"})}let pM=zd(dM),hM=Object.assign(pM,{}),L_=ie.createContext(null);L_.displayName="GroupContext";let vM=ie.Fragment;function gM(e){var n;let[r,a]=ie.useState(null),[i,u]=lM(),[c,f]=aM(),p=ie.useMemo(()=>({switch:r,setSwitch:a,labelledby:i,describedby:c}),[r,a,i,c]),h={},m=e;return ie.createElement(f,{name:"Switch.Description"},ie.createElement(u,{name:"Switch.Label",props:{htmlFor:(n=p.switch)==null?void 0:n.id,onClick(b){r&&(b.currentTarget.tagName==="LABEL"&&b.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},ie.createElement(L_.Provider,{value:p},df({ourProps:h,theirProps:m,defaultTag:vM,name:"Switch.Group"}))))}let mM="button";function yM(e,n){let r=N_(),{id:a=`headlessui-switch-${r}`,checked:i,defaultChecked:u=!1,onChange:c,name:f,value:p,form:h,...m}=e,b=ie.useContext(L_),E=ie.useRef(null),O=j_(E,n,b===null?null:b.setSwitch),[R,C]=oM(i,c,u),k=Ka(()=>C==null?void 0:C(!R)),j=Ka(U=>{if(Z2(U.currentTarget))return U.preventDefault();U.preventDefault(),k()}),F=Ka(U=>{U.key===j1.Space?(U.preventDefault(),k()):U.key===j1.Enter&&eM(U.currentTarget)}),D=Ka(U=>U.preventDefault()),M=ie.useMemo(()=>({checked:R}),[R]),S={id:a,ref:O,role:"switch",type:V2(e,E),tabIndex:0,"aria-checked":R,"aria-labelledby":b==null?void 0:b.labelledby,"aria-describedby":b==null?void 0:b.describedby,onClick:j,onKeyUp:F,onKeyPress:D},q=H2();return ie.useEffect(()=>{var U;let V=(U=E.current)==null?void 0:U.closest("form");V&&u!==void 0&&q.addEventListener(V,"reset",()=>{C(u)})},[E,C]),ie.createElement(ie.Fragment,null,f!=null&&R&&ie.createElement(nM,{features:ZO.Hidden,...N1({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:h,checked:R,name:f,value:p})}),df({ourProps:S,theirProps:m,slot:M,defaultTag:mM,name:"Switch"}))}let bM=zd(yM),_M=gM,wM=Object.assign(bM,{Group:_M,Label:hM,Description:cM});const zb={xs:{switch:"h-2.5 w-2.5",translate:"translate-x-2.5",container:"w-6 h-3.5"},sm:{switch:"h-3.5 w-3.5",translate:"translate-x-[0.85rem]",container:"h-4.5 w-8"},md:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"},lg:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"}};ie.forwardRef(({onChange:e,value:n,size:r="md",className:a="ml-auto"},i)=>{const u=c=>{e(c)};return Lf.jsx("div",{className:yP("flex items-center",a),children:Lf.jsx(wM,{ref:i,checked:n,onChange:u,onKeyDown:c=>{c.key==="Enter"&&u(!n)},className:`${n?"bg-primary-dark":"bg-grey-200"}
130
+ `));let b=h.props,E=typeof(b==null?void 0:b.className)=="function"?(...R)=>FE(b==null?void 0:b.className(...R),f.className):FE(b==null?void 0:b.className,f.className),O=E?{className:E}:{};return ie.cloneElement(h,Object.assign({},JO(h.props,N1(Ub(f,["ref"]))),m,p,J2(h.ref,p.ref),O))}return ie.createElement(i,Object.assign({},Ub(f,["ref"]),i!==ie.Fragment&&p,i!==ie.Fragment&&m),h)}function J2(...e){return{ref:e.every(n=>n==null)?void 0:n=>{for(let r of e)r!=null&&(typeof r=="function"?r(n):r.current=n)}}}function JO(...e){if(e.length===0)return{};if(e.length===1)return e[0];let n={},r={};for(let a of e)for(let i in a)i.startsWith("on")&&typeof a[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(a[i])):n[i]=a[i];if(n.disabled||n["aria-disabled"])return Object.assign(n,Object.fromEntries(Object.keys(r).map(a=>[a,void 0])));for(let a in r)Object.assign(n,{[a](i,...u){let c=r[a];for(let f of c){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;f(i,...u)}}});return n}function zd(e){var n;return Object.assign(ie.forwardRef(e),{displayName:(n=e.displayName)!=null?n:e.name})}function N1(e){let n=Object.assign({},e);for(let r in n)n[r]===void 0&&delete n[r];return n}function Ub(e,n=[]){let r=Object.assign({},e);for(let a of n)a in r&&delete r[a];return r}function Z2(e){let n=e.parentElement,r=null;for(;n&&!(n instanceof HTMLFieldSetElement);)n instanceof HTMLLegendElement&&(r=n),n=n.parentElement;let a=(n==null?void 0:n.getAttribute("disabled"))==="";return a&&Q2(r)?!1:a}function Q2(e){if(!e)return!1;let n=e.previousElementSibling;for(;n!==null;){if(n instanceof HTMLLegendElement)return!1;n=n.previousElementSibling}return!0}function eM(e){var n,r;let a=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(a){for(let i of a.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(r=a.requestSubmit)==null||r.call(a)}}let tM="div";var ZO=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ZO||{});function rM(e,n){let{features:r=1,...a}=e,i={ref:n,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return df({ourProps:i,theirProps:a,slot:{},defaultTag:tM,name:"Hidden"})}let nM=zd(rM);var j1=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(j1||{});function oM(e,n,r){let[a,i]=ie.useState(r),u=e!==void 0,c=ie.useRef(u),f=ie.useRef(!1),p=ie.useRef(!1);return u&&!c.current&&!f.current?(f.current=!0,c.current=u,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!u&&c.current&&!p.current&&(p.current=!0,c.current=u,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[u?e:a,Ka(h=>(u||i(h),n==null?void 0:n(h)))]}let QO=ie.createContext(null);function eT(){let e=ie.useContext(QO);if(e===null){let n=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,eT),n}return e}function aM(){let[e,n]=ie.useState([]);return[e.length>0?e.join(" "):void 0,ie.useMemo(()=>function(r){let a=Ka(u=>(n(c=>[...c,u]),()=>n(c=>{let f=c.slice(),p=f.indexOf(u);return p!==-1&&f.splice(p,1),f}))),i=ie.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return ie.createElement(QO.Provider,{value:i},r.children)},[n])]}let iM="p";function sM(e,n){let r=N_(),{id:a=`headlessui-description-${r}`,...i}=e,u=eT(),c=j_(n);Zs(()=>u.register(a),[a,u.register]);let f={ref:c,...u.props,id:a};return df({ourProps:f,theirProps:i,slot:u.slot||{},defaultTag:iM,name:u.name||"Description"})}let uM=zd(sM),cM=Object.assign(uM,{}),tT=ie.createContext(null);function rT(){let e=ie.useContext(tT);if(e===null){let n=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,rT),n}return e}function lM(){let[e,n]=ie.useState([]);return[e.length>0?e.join(" "):void 0,ie.useMemo(()=>function(r){let a=Ka(u=>(n(c=>[...c,u]),()=>n(c=>{let f=c.slice(),p=f.indexOf(u);return p!==-1&&f.splice(p,1),f}))),i=ie.useMemo(()=>({register:a,slot:r.slot,name:r.name,props:r.props}),[a,r.slot,r.name,r.props]);return ie.createElement(tT.Provider,{value:i},r.children)},[n])]}let fM="label";function dM(e,n){let r=N_(),{id:a=`headlessui-label-${r}`,passive:i=!1,...u}=e,c=rT(),f=j_(n);Zs(()=>c.register(a),[a,c.register]);let p={ref:f,...c.props,id:a};return i&&("onClick"in p&&(delete p.htmlFor,delete p.onClick),"onClick"in u&&delete u.onClick),df({ourProps:p,theirProps:u,slot:c.slot||{},defaultTag:fM,name:c.name||"Label"})}let pM=zd(dM),hM=Object.assign(pM,{}),L_=ie.createContext(null);L_.displayName="GroupContext";let vM=ie.Fragment;function gM(e){var n;let[r,a]=ie.useState(null),[i,u]=lM(),[c,f]=aM(),p=ie.useMemo(()=>({switch:r,setSwitch:a,labelledby:i,describedby:c}),[r,a,i,c]),h={},m=e;return ie.createElement(f,{name:"Switch.Description"},ie.createElement(u,{name:"Switch.Label",props:{htmlFor:(n=p.switch)==null?void 0:n.id,onClick(b){r&&(b.currentTarget.tagName==="LABEL"&&b.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},ie.createElement(L_.Provider,{value:p},df({ourProps:h,theirProps:m,defaultTag:vM,name:"Switch.Group"}))))}let mM="button";function yM(e,n){let r=N_(),{id:a=`headlessui-switch-${r}`,checked:i,defaultChecked:u=!1,onChange:c,name:f,value:p,form:h,...m}=e,b=ie.useContext(L_),E=ie.useRef(null),O=j_(E,n,b===null?null:b.setSwitch),[R,C]=oM(i,c,u),k=Ka(()=>C==null?void 0:C(!R)),j=Ka(U=>{if(Z2(U.currentTarget))return U.preventDefault();U.preventDefault(),k()}),F=Ka(U=>{U.key===j1.Space?(U.preventDefault(),k()):U.key===j1.Enter&&eM(U.currentTarget)}),D=Ka(U=>U.preventDefault()),M=ie.useMemo(()=>({checked:R}),[R]),S={id:a,ref:O,role:"switch",type:V2(e,E),tabIndex:0,"aria-checked":R,"aria-labelledby":b==null?void 0:b.labelledby,"aria-describedby":b==null?void 0:b.describedby,onClick:j,onKeyUp:F,onKeyPress:D},q=H2();return ie.useEffect(()=>{var U;let V=(U=E.current)==null?void 0:U.closest("form");V&&u!==void 0&&q.addEventListener(V,"reset",()=>{C(u)})},[E,C]),ie.createElement(ie.Fragment,null,f!=null&&R&&ie.createElement(nM,{features:ZO.Hidden,...N1({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:h,checked:R,name:f,value:p})}),df({ourProps:S,theirProps:m,slot:M,defaultTag:mM,name:"Switch"}))}let bM=zd(yM),_M=gM,wM=Object.assign(bM,{Group:_M,Label:hM,Description:cM});const zb={xs:{switch:"h-2.5 w-2.5",translate:"translate-x-2.5",container:"w-6 h-3.5"},sm:{switch:"h-3.5 w-3.5",translate:"translate-x-[0.85rem]",container:"h-4.5 w-8"},md:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"},lg:{switch:"h-4 w-4",translate:"translate-x-3",container:"h-5 w-8"}};ie.forwardRef(({onChange:e,value:n,size:r="md",className:a="ml-auto"},i)=>{const u=c=>{e(c)};return Lf.jsx("div",{className:yP("flex items-center",a),children:Lf.jsx(wM,{ref:i,checked:n,onChange:u,onKeyDown:c=>{c.key==="Enter"&&u(!n)},className:`${n?"bg-primary-dark":"bg-grey-200"}
131
131
  relative inline-flex shrink-0 ${zb[r].container} cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:Lf.jsx("span",{"aria-hidden":"true",className:`${n?zb[r].translate:"translate-x-0"}
132
132
  pointer-events-none inline-block ${zb[r].switch} transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})})})});const EM=LD`
133
133
  to {
@@ -183,8 +183,8 @@ function print() { __p += __j.call(arguments, '') }
183
183
  `)+L+`return __p
184
184
  }`;var ye=Il(function(){return Ce(g,K+"return "+L).apply(r,y)});if(ye.source=L,ps(ye))throw ye;return ye}function C0(t){return Re(t).toLowerCase()}function R0(t){return Re(t).toUpperCase()}function A0(t,o,s){if(t=Re(t),t&&(s||o===r))return Bu(t);if(!t||!(o=$t(o)))return t;var l=nr(t),d=nr(o),g=Uu(l,d),y=zu(l,d)+1;return Nr(l,g,y).join("")}function P0(t,o,s){if(t=Re(t),t&&(s||o===r))return t.slice(0,Gu(t)+1);if(!t||!(o=$t(o)))return t;var l=nr(t),d=zu(l,nr(o))+1;return Nr(l,0,d).join("")}function D0(t,o,s){if(t=Re(t),t&&(s||o===r))return t.replace(G,"");if(!t||!(o=$t(o)))return t;var l=nr(t),d=Uu(l,nr(o));return Nr(l,d).join("")}function I0(t,o){var s=He,l=Be;if(We(o)){var d="separator"in o?o.separator:d;s="length"in o?ge(o.length):s,l="omission"in o?$t(o.omission):l}t=Re(t);var g=t.length;if(Rn(t)){var y=nr(t);g=y.length}if(s>=g)return t;var w=s-An(l);if(w<1)return l;var x=y?Nr(y,0,w).join(""):t.slice(0,w);if(d===r)return x+l;if(y&&(w+=x.length-w),hs(d)){if(t.slice(w).search(d)){var $,N=x;for(d.global||(d=Pi(d.source,Re(zt.exec(d))+"g")),d.lastIndex=0;$=d.exec(N);)var L=$.index;x=x.slice(0,L===r?w:L)}}else if(t.indexOf($t(d),w)!=w){var H=x.lastIndexOf(d);H>-1&&(x=x.slice(0,H))}return x+l}function M0(t){return t=Re(t),t&&Lo.test(t)?t.replace(jo,uh):t}var k0=Nn(function(t,o,s){return t+(s?" ":"")+o.toUpperCase()}),ms=Mc("toUpperCase");function Dl(t,o,s){return t=Re(t),o=s?r:o,o===r?nh(t)?fh(t):Yp(t):t.match(o)||[]}var Il=be(function(t,o){try{return Mt(t,r,o)}catch(s){return ps(s)?s:new ce(s)}}),$0=_r(function(t,o){return Gt(o,function(s){s=fr(s),yr(t,s,fs(t[s],t))}),t});function N0(t){var o=t==null?0:t.length,s=X();return t=o?je(t,function(l){if(typeof l[1]!="function")throw new qt(c);return[s(l[0]),l[1]]}):[],be(function(l){for(var d=-1;++d<o;){var g=t[d];if(Mt(g[0],this,l))return Mt(g[1],this,l)}})}function j0(t){return uv(Yt(t,b))}function ys(t){return function(){return t}}function L0(t,o){return t==null||t!==t?o:t}var F0=$c(),W0=$c(!0);function Ct(t){return t}function bs(t){return fc(typeof t=="function"?t:Yt(t,b))}function B0(t){return pc(Yt(t,b))}function U0(t,o){return hc(t,Yt(o,b))}var z0=be(function(t,o){return function(s){return io(s,t,o)}}),H0=be(function(t,o){return function(s){return io(t,s,o)}});function _s(t,o,s){var l=tt(o),d=la(o,l);s==null&&!(We(o)&&(d.length||!l.length))&&(s=o,o=t,t=this,d=la(o,tt(o)));var g=!(We(s)&&"chain"in s)||!!s.chain,y=Er(t);return Gt(d,function(w){var x=o[w];t[w]=x,y&&(t.prototype[w]=function(){var $=this.__chain__;if(g||$){var N=t(this.__wrapped__),L=N.__actions__=Ot(this.__actions__);return L.push({func:x,args:arguments,thisArg:t}),N.__chain__=$,N}return x.apply(t,Pr([this.value()],arguments))})}),t}function G0(){return nt._===this&&(nt._=mh),this}function ws(){}function q0(t){return t=ge(t),be(function(o){return vc(o,t)})}var V0=Zi(je),Y0=Zi(Nu),K0=Zi(Si);function Ml(t){return as(t)?Oi(fr(t)):Tv(t)}function X0(t){return function(o){return t==null?r:hn(t,o)}}var J0=jc(),Z0=jc(!0);function Es(){return[]}function Ss(){return!1}function Q0(){return{}}function eb(){return""}function tb(){return!0}function rb(t,o){if(t=ge(t),t<1||t>Ye)return[];var s=z,l=st(t,z);o=X(o),t-=z;for(var d=Ci(l,o);++s<t;)o(s);return d}function nb(t){return de(t)?je(t,fr):Nt(t)?[t]:Ot(Qc(Re(t)))}function ob(t){var o=++vh;return Re(t)+o}var ab=ga(function(t,o){return t+o},0),ib=Qi("ceil"),sb=ga(function(t,o){return t/o},1),ub=Qi("floor");function cb(t){return t&&t.length?ca(t,Ct,Li):r}function lb(t,o){return t&&t.length?ca(t,X(o,2),Li):r}function fb(t){return Fu(t,Ct)}function db(t,o){return Fu(t,X(o,2))}function pb(t){return t&&t.length?ca(t,Ct,Ui):r}function hb(t,o){return t&&t.length?ca(t,X(o,2),Ui):r}var vb=ga(function(t,o){return t*o},1),gb=Qi("round"),mb=ga(function(t,o){return t-o},0);function yb(t){return t&&t.length?xi(t,Ct):0}function bb(t,o){return t&&t.length?xi(t,X(o,2)):0}return v.after=Bm,v.ary=ll,v.assign=Ry,v.assignIn=Ol,v.assignInWith=Aa,v.assignWith=Ay,v.at=Py,v.before=fl,v.bind=fs,v.bindAll=$0,v.bindKey=dl,v.castArray=Qm,v.chain=sl,v.chunk=ug,v.compact=cg,v.concat=lg,v.cond=N0,v.conforms=j0,v.constant=ys,v.countBy=ym,v.create=Dy,v.curry=pl,v.curryRight=hl,v.debounce=vl,v.defaults=Iy,v.defaultsDeep=My,v.defer=Um,v.delay=zm,v.difference=fg,v.differenceBy=dg,v.differenceWith=pg,v.drop=hg,v.dropRight=vg,v.dropRightWhile=gg,v.dropWhile=mg,v.fill=yg,v.filter=_m,v.flatMap=Sm,v.flatMapDeep=Om,v.flatMapDepth=Tm,v.flatten=nl,v.flattenDeep=bg,v.flattenDepth=_g,v.flip=Hm,v.flow=F0,v.flowRight=W0,v.fromPairs=wg,v.functions=Wy,v.functionsIn=By,v.groupBy=xm,v.initial=Sg,v.intersection=Og,v.intersectionBy=Tg,v.intersectionWith=xg,v.invert=zy,v.invertBy=Hy,v.invokeMap=Rm,v.iteratee=bs,v.keyBy=Am,v.keys=tt,v.keysIn=xt,v.map=Sa,v.mapKeys=qy,v.mapValues=Vy,v.matches=B0,v.matchesProperty=U0,v.memoize=Ta,v.merge=Yy,v.mergeWith=Tl,v.method=z0,v.methodOf=H0,v.mixin=_s,v.negate=xa,v.nthArg=q0,v.omit=Ky,v.omitBy=Xy,v.once=Gm,v.orderBy=Pm,v.over=V0,v.overArgs=qm,v.overEvery=Y0,v.overSome=K0,v.partial=ds,v.partialRight=gl,v.partition=Dm,v.pick=Jy,v.pickBy=xl,v.property=Ml,v.propertyOf=X0,v.pull=Pg,v.pullAll=al,v.pullAllBy=Dg,v.pullAllWith=Ig,v.pullAt=Mg,v.range=J0,v.rangeRight=Z0,v.rearg=Vm,v.reject=km,v.remove=kg,v.rest=Ym,v.reverse=cs,v.sampleSize=Nm,v.set=Qy,v.setWith=e0,v.shuffle=jm,v.slice=$g,v.sortBy=Wm,v.sortedUniq=Ug,v.sortedUniqBy=zg,v.split=S0,v.spread=Km,v.tail=Hg,v.take=Gg,v.takeRight=qg,v.takeRightWhile=Vg,v.takeWhile=Yg,v.tap=cm,v.throttle=Xm,v.thru=Ea,v.toArray=wl,v.toPairs=Cl,v.toPairsIn=Rl,v.toPath=nb,v.toPlainObject=Sl,v.transform=t0,v.unary=Jm,v.union=Kg,v.unionBy=Xg,v.unionWith=Jg,v.uniq=Zg,v.uniqBy=Qg,v.uniqWith=em,v.unset=r0,v.unzip=ls,v.unzipWith=il,v.update=n0,v.updateWith=o0,v.values=Fn,v.valuesIn=a0,v.without=tm,v.words=Dl,v.wrap=Zm,v.xor=rm,v.xorBy=nm,v.xorWith=om,v.zip=am,v.zipObject=im,v.zipObjectDeep=sm,v.zipWith=um,v.entries=Cl,v.entriesIn=Rl,v.extend=Ol,v.extendWith=Aa,_s(v,v),v.add=ab,v.attempt=Il,v.camelCase=c0,v.capitalize=Al,v.ceil=ib,v.clamp=i0,v.clone=ey,v.cloneDeep=ry,v.cloneDeepWith=ny,v.cloneWith=ty,v.conformsTo=oy,v.deburr=Pl,v.defaultTo=L0,v.divide=sb,v.endsWith=l0,v.eq=ar,v.escape=f0,v.escapeRegExp=d0,v.every=bm,v.find=wm,v.findIndex=tl,v.findKey=ky,v.findLast=Em,v.findLastIndex=rl,v.findLastKey=$y,v.floor=ub,v.forEach=ul,v.forEachRight=cl,v.forIn=Ny,v.forInRight=jy,v.forOwn=Ly,v.forOwnRight=Fy,v.get=vs,v.gt=ay,v.gte=iy,v.has=Uy,v.hasIn=gs,v.head=ol,v.identity=Ct,v.includes=Cm,v.indexOf=Eg,v.inRange=s0,v.invoke=Gy,v.isArguments=mn,v.isArray=de,v.isArrayBuffer=sy,v.isArrayLike=Tt,v.isArrayLikeObject=qe,v.isBoolean=uy,v.isBuffer=jr,v.isDate=cy,v.isElement=ly,v.isEmpty=fy,v.isEqual=dy,v.isEqualWith=py,v.isError=ps,v.isFinite=hy,v.isFunction=Er,v.isInteger=ml,v.isLength=Ca,v.isMap=yl,v.isMatch=vy,v.isMatchWith=gy,v.isNaN=my,v.isNative=yy,v.isNil=_y,v.isNull=by,v.isNumber=bl,v.isObject=We,v.isObjectLike=ze,v.isPlainObject=po,v.isRegExp=hs,v.isSafeInteger=wy,v.isSet=_l,v.isString=Ra,v.isSymbol=Nt,v.isTypedArray=Ln,v.isUndefined=Ey,v.isWeakMap=Sy,v.isWeakSet=Oy,v.join=Cg,v.kebabCase=p0,v.last=Xt,v.lastIndexOf=Rg,v.lowerCase=h0,v.lowerFirst=v0,v.lt=Ty,v.lte=xy,v.max=cb,v.maxBy=lb,v.mean=fb,v.meanBy=db,v.min=pb,v.minBy=hb,v.stubArray=Es,v.stubFalse=Ss,v.stubObject=Q0,v.stubString=eb,v.stubTrue=tb,v.multiply=vb,v.nth=Ag,v.noConflict=G0,v.noop=ws,v.now=Oa,v.pad=g0,v.padEnd=m0,v.padStart=y0,v.parseInt=b0,v.random=u0,v.reduce=Im,v.reduceRight=Mm,v.repeat=_0,v.replace=w0,v.result=Zy,v.round=gb,v.runInContext=T,v.sample=$m,v.size=Lm,v.snakeCase=E0,v.some=Fm,v.sortedIndex=Ng,v.sortedIndexBy=jg,v.sortedIndexOf=Lg,v.sortedLastIndex=Fg,v.sortedLastIndexBy=Wg,v.sortedLastIndexOf=Bg,v.startCase=O0,v.startsWith=T0,v.subtract=mb,v.sum=yb,v.sumBy=bb,v.template=x0,v.times=rb,v.toFinite=Sr,v.toInteger=ge,v.toLength=El,v.toLower=C0,v.toNumber=Jt,v.toSafeInteger=Cy,v.toString=Re,v.toUpper=R0,v.trim=A0,v.trimEnd=P0,v.trimStart=D0,v.truncate=I0,v.unescape=M0,v.uniqueId=ob,v.upperCase=k0,v.upperFirst=ms,v.each=ul,v.eachRight=cl,v.first=ol,_s(v,function(){var t={};return cr(v,function(o,s){De.call(v.prototype,s)||(t[s]=o)}),t}(),{chain:!1}),v.VERSION=a,Gt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){v[t].placeholder=v}),Gt(["drop","take"],function(t,o){Se.prototype[t]=function(s){s=s===r?1:Ze(ge(s),0);var l=this.__filtered__&&!o?new Se(this):this.clone();return l.__filtered__?l.__takeCount__=st(s,l.__takeCount__):l.__views__.push({size:st(s,z),type:t+(l.__dir__<0?"Right":"")}),l},Se.prototype[t+"Right"]=function(s){return this.reverse()[t](s).reverse()}}),Gt(["filter","map","takeWhile"],function(t,o){var s=o+1,l=s==Me||s==Xe;Se.prototype[t]=function(d){var g=this.clone();return g.__iteratees__.push({iteratee:X(d,3),type:s}),g.__filtered__=g.__filtered__||l,g}}),Gt(["head","last"],function(t,o){var s="take"+(o?"Right":"");Se.prototype[t]=function(){return this[s](1).value()[0]}}),Gt(["initial","tail"],function(t,o){var s="drop"+(o?"":"Right");Se.prototype[t]=function(){return this.__filtered__?new Se(this):this[s](1)}}),Se.prototype.compact=function(){return this.filter(Ct)},Se.prototype.find=function(t){return this.filter(t).head()},Se.prototype.findLast=function(t){return this.reverse().find(t)},Se.prototype.invokeMap=be(function(t,o){return typeof t=="function"?new Se(this):this.map(function(s){return io(s,t,o)})}),Se.prototype.reject=function(t){return this.filter(xa(X(t)))},Se.prototype.slice=function(t,o){t=ge(t);var s=this;return s.__filtered__&&(t>0||o<0)?new Se(s):(t<0?s=s.takeRight(-t):t&&(s=s.drop(t)),o!==r&&(o=ge(o),s=o<0?s.dropRight(-o):s.take(o-t)),s)},Se.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Se.prototype.toArray=function(){return this.take(z)},cr(Se.prototype,function(t,o){var s=/^(?:filter|find|map|reject)|While$/.test(o),l=/^(?:head|last)$/.test(o),d=v[l?"take"+(o=="last"?"Right":""):o],g=l||/^find/.test(o);d&&(v.prototype[o]=function(){var y=this.__wrapped__,w=l?[1]:arguments,x=y instanceof Se,$=w[0],N=x||de(y),L=function(we){var Oe=d.apply(v,Pr([we],w));return l&&H?Oe[0]:Oe};N&&s&&typeof $=="function"&&$.length!=1&&(x=N=!1);var H=this.__chain__,K=!!this.__actions__.length,Z=g&&!H,ye=x&&!K;if(!g&&N){y=ye?y:new Se(this);var Q=t.apply(y,w);return Q.__actions__.push({func:Ea,args:[L],thisArg:r}),new Vt(Q,H)}return Z&&ye?t.apply(this,w):(Q=this.thru(L),Z?l?Q.value()[0]:Q.value():Q)})}),Gt(["pop","push","shift","sort","splice","unshift"],function(t){var o=Yo[t],s=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",l=/^(?:pop|shift)$/.test(t);v.prototype[t]=function(){var d=arguments;if(l&&!this.__chain__){var g=this.value();return o.apply(de(g)?g:[],d)}return this[s](function(y){return o.apply(de(y)?y:[],d)})}}),cr(Se.prototype,function(t,o){var s=v[o];if(s){var l=s.name+"";De.call(Mn,l)||(Mn[l]=[]),Mn[l].push({name:o,func:s})}}),Mn[va(r,j).name]=[{name:"wrapper",func:r}],Se.prototype.clone=Mh,Se.prototype.reverse=kh,Se.prototype.value=$h,v.prototype.at=lm,v.prototype.chain=fm,v.prototype.commit=dm,v.prototype.next=pm,v.prototype.plant=vm,v.prototype.reverse=gm,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=mm,v.prototype.first=v.prototype.head,Qn&&(v.prototype[Qn]=hm),v},Pn=dh();cn?((cn.exports=Pn)._=Pn,bi._=Pn):nt._=Pn}).call(xs)})(ld,ld.exports);var wo=ld.exports;function $a(e){return typeof e=="function"}function uT(e){var n=function(a){Error.call(a),a.stack=new Error().stack},r=e(n);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Kb=uT(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
185
185
  `+n.map(function(r,a){return a+1+") "+r.toString()}).join(`
186
- `):"",this.name="UnsubscriptionError",this.errors=n}});function F1(e,n){if(e){var r=e.indexOf(n);0<=r&&e.splice(r,1)}}var Hd=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,r,a,i,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=R1(c),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}else c.remove(this);var m=this.initialTeardown;if($a(m))try{m()}catch(C){u=C instanceof Kb?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var E=R1(b),O=E.next();!O.done;O=E.next()){var R=O.value;try{zE(R)}catch(C){u=u??[],C instanceof Kb?u=id(id([],A1(u)),A1(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{O&&!O.done&&(i=E.return)&&i.call(E)}finally{if(a)throw a.error}}}if(u)throw new Kb(u)}},e.prototype.add=function(n){var r;if(n&&n!==this)if(this.closed)zE(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(n)}},e.prototype._hasParent=function(n){var r=this._parentage;return r===n||Array.isArray(r)&&r.includes(n)},e.prototype._addParent=function(n){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(n),r):r?[r,n]:n},e.prototype._removeParent=function(n){var r=this._parentage;r===n?this._parentage=null:Array.isArray(r)&&F1(r,n)},e.prototype.remove=function(n){var r=this._finalizers;r&&F1(r,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),cT=Hd.EMPTY;function lT(e){return e instanceof Hd||e&&"closed"in e&&$a(e.remove)&&$a(e.add)&&$a(e.unsubscribe)}function zE(e){$a(e)?e():e.unsubscribe()}var fT={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},jM={setTimeout:function(e,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return setTimeout.apply(void 0,id([e,n],A1(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function LM(e){jM.setTimeout(function(){throw e})}function HE(){}function Hf(e){e()}var dT=function(e){jd(n,e);function n(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,lT(r)&&r.add(a)):a.destination=UM,a}return n.create=function(r,a,i){return new W1(r,a,i)},n.prototype.next=function(r){this.isStopped||this._next(r)},n.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(r){this.destination.next(r)},n.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Hd),FM=Function.prototype.bind;function Xb(e,n){return FM.call(e,n)}var WM=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var r=this.partialObserver;if(r.next)try{r.next(n)}catch(a){Af(a)}},e.prototype.error=function(n){var r=this.partialObserver;if(r.error)try{r.error(n)}catch(a){Af(a)}else Af(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(r){Af(r)}},e}(),W1=function(e){jd(n,e);function n(r,a,i){var u=e.call(this)||this,c;if($a(r)||!r)c={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&fT.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},c={next:r.next&&Xb(r.next,f),error:r.error&&Xb(r.error,f),complete:r.complete&&Xb(r.complete,f)}):c=r}return u.destination=new WM(c),u}return n}(dT);function Af(e){LM(e)}function BM(e){throw e}var UM={closed:!0,next:HE,error:BM,complete:HE},zM=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function HM(e){return e}function GM(e){return e.length===0?HM:e.length===1?e[0]:function(n){return e.reduce(function(r,a){return a(r)},n)}}var GE=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var r=new e;return r.source=this,r.operator=n,r},e.prototype.subscribe=function(n,r,a){var i=this,u=VM(n)?n:new W1(n,r,a);return Hf(function(){var c=i,f=c.operator,p=c.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(r){n.error(r)}},e.prototype.forEach=function(n,r){var a=this;return r=qE(r),new r(function(i,u){var c=new W1({next:function(f){try{n(f)}catch(p){u(p),c.unsubscribe()}},error:u,complete:i});a.subscribe(c)})},e.prototype._subscribe=function(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)},e.prototype[zM]=function(){return this},e.prototype.pipe=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return GM(n)(this)},e.prototype.toPromise=function(n){var r=this;return n=qE(n),new n(function(a,i){var u;r.subscribe(function(c){return u=c},function(c){return i(c)},function(){return a(u)})})},e.create=function(n){return new e(n)},e}();function qE(e){var n;return(n=e??fT.Promise)!==null&&n!==void 0?n:Promise}function qM(e){return e&&$a(e.next)&&$a(e.error)&&$a(e.complete)}function VM(e){return e&&e instanceof dT||qM(e)&&lT(e)}var YM=uT(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ru=function(e){jd(n,e);function n(){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 n.prototype.lift=function(r){var a=new VE(this,this);return a.operator=r,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new YM},n.prototype.next=function(r){var a=this;Hf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=R1(a.currentObservers),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(i)throw i.error}}}})},n.prototype.error=function(r){var a=this;Hf(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)}})},n.prototype.complete=function(){var r=this;Hf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},n.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},n.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,c=i.isStopped,f=i.observers;return u||c?cT:(this.currentObservers=null,f.push(r),new Hd(function(){a.currentObservers=null,F1(f,r)}))},n.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,c=a.isStopped;i?r.error(u):c&&r.complete()},n.prototype.asObservable=function(){var r=new GE;return r.source=this,r},n.create=function(r,a){return new VE(r,a)},n}(GE),VE=function(e){jd(n,e);function n(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return n.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)},n.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)},n.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)},n.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:cT},n}(ru),pT=(e=>(e.RELOAD="reload",e))(pT||{}),F_=(e=>(e.RENAME="rename",e))(F_||{});const hT=new ru,KM=new ru,Ao=new ru;new ru;var ka=(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))(ka||{});const Xa=new ru;function vT(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 gT(e){const n=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(n,"")}var Hs=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(Hs||{});const Wt={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var le=(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))(le||{}),Zt=(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))(Zt||{}),W_=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(W_||{});const Ur="roles.json",B_="model.4DModel";function mT(e){const n=e.split("."),r=n.pop(),a=n.join(".").split("/")[0];switch(!0){case r==="4DModel":return le.MODEL;case r==="WebForm":return le.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&a===Wt.METHODS):return le.METHOD;case(["4dm","4qs","4qm"].includes(r)&&a===Wt.CLASSES):return le.CLASS;case e===Ur:return le.ROLES;default:return le.WEBFORM}}function Ws(e,n=!1){switch(e){case Wt.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case Wt.CLASSES:case Wt.METHODS:return n?"4qs":"4dm";default:return""}}class XM{constructor(){hP(this,"current",Promise.resolve())}lock(){let n;const r=new Promise(i=>{n=i}),a=this.current.then(()=>n);return this.current=r,a}}function yT(){const e=new XM;return async n=>{const r=await e.lock(),a=await n();return r(),a}}const bn=wo.curry((e,n,r)=>e&&wo.get(r,e)===n),JM=wo.curry((e,n,r)=>wo.get(r,e)!==n),ZM=wo.curry((e,n)=>wo.get(n,"id")!==e),QM=wo.curry((e,n)=>wo.get(n,"id")===e);wo.curry((e,n)=>wo.get(n,"path")===e);function ek(e="id",n,r){return r.findIndex(bn(e,n))!==-1}function fd(e){if(!e)return"";const{id:n,namespace:r}=e;return r?`${r}:${n}`:n}function tk(e){return e.dataType==="array"}function U_(e){return e.dataType==="object"}function rk(e){return e.type==="scalar"}function bT(e){return tk(e)||U_(e)||rk(e)}var dd=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(dd||{}),_T=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(_T||{});function z_(e){var n;let r={};try{const u=((n=e.match(/\/\/%attributes = (.*)/))==null?void 0:n[1])||"";r=JSON.parse(u)}catch{}const{published4DMobile:a,...i}=r;return{invisible:!1,shared:!1,executedOnServer:!1,preemptive:dd.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!a,publishedRestOptions:a||{table:"",scope:_T.table},...i}}function nk(e){const n={};return e.invisible&&(n.invisible=!0),e.shared&&(n.shared=!0),e.executedOnServer&&(n.executedOnServer=!0),e.preemptive&&[dd.capable,dd.incapable].includes(e.preemptive)&&(n.preemptive=e.preemptive),e.publishedSoap&&(n.publishedSoap=!0,e.publishedWsdl&&(n.publishedWsdl=!0)),e.publishedWeb&&(n.publishedWeb=!0),e.publishedSql&&(n.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(n.published4DMobile=e.publishedRestOptions),JSON.stringify(n).replace(/"(true|false)"/g,"$1")}function wT(e,n,r=!1){const a=wo.isString(n)?n:nk(n);if(!r&&ok(e))return e;const i=ak(e);return`//%attributes = ${a}\r
187
- ${i}`}function ok(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function ak(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const en="/rest/$designer",ik="/rest/$designer-ext",ET="/$shared";class YE extends Error{constructor(n,r,a){super(),this.url=n,this.response=r,this.data=a}log(){console.error("Error while sending the request",this)}}async function hr(e,n){const r=await window.fetch(e,n);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 YE(e,r,i)}catch{a=new YE(e,r)}throw a.log(),a}return await r.json()}const sk=()=>{const{host:e,protocol:n}=window.location,r=n==="https:";return{projectOpened:!1,remoteDebuggerMode:W_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function uk(){const{hostname:e,host:n,protocol:r}=window.location,a=r==="https:";try{const i=await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(i.rendererPath)return i.rendererPath;const c=`http://${e}:${i.webServerHTTPPort}`,f=`https://${e}:${i.webServerHTTPSPort}`;return i.webServerHTTPPort&&i.webServerHTTPSPort?a?f:c:i.webServerHTTPPort?c: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":""}://${n}/remoteDebugger`,lsp:`ws${a?"s":""}://${n}/LSP`},isRestActive:i.isRESTActive}}catch(i){return console.error(i),sk()}}async function ck(e){return await hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function lk(...e){return(await Promise.all(e.map(n=>ck({root:n,verb:Zt.GET_FOLDER})))).map(({children:n})=>n.map(({name:r,date:a,type:i})=>({name:r,type:i,date:a,path:`${i}/${r}`}))).flat()}function fk(e){return hr(en,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(n=>({...n,content:[le.METHOD,le.CLASS].includes(n.type)?gT(n.content):n.content}))}async function dk(e){return e.type==="folder"?(await hr(ik,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function ST(...e){return await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function pk(){return await hr("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function hk({name:e,path:n="",root:r="root",asText:a=!1}){return hr(en,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:n,name:e,asText:a}),headers:new Headers({"Content-Type":"application/json"})})}async function vk(){try{const e=await hr(`${ET}/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 gk(){try{const e=await hr(`${ET}/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 mk=yT(),ri=async e=>{const n={verb:Zt.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return mk(async()=>(await hr(en,{method:"POST",body:JSON.stringify(n),headers:new Headers({"Content-Type":"application/json"})}),e))},Gd=async e=>{const n=await hr(en,{method:"POST",body:JSON.stringify({...e,verb:Zt.SET_FILE_CONTENT,root:Hs.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=mT(`${e.path||"Sources"}/${e.name}`);return{...n,type:r,size:0}},H_=async e=>await Gd({name:"crafted_components.json",path:Wt.WEBFORMS,content:e});function yk(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function OT(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function B1(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ni(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(n=>Array.isArray(n)?n:{...n,content:["4dm","4qm","4qs"].includes(n.ext)?gT(n.content):n.content})}function bk(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}var As=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(As||{}),TT=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e))(TT||{});const _k={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};var xT=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(xT||{}),Na=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Na||{}),pd=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(pd||{}),CT=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(CT||{});const G_={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles"},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Na.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},RT="4DWS_PREFS",AT=e=>`APP_STATE_${e}`;function PT(e){var n,r;try{const a=((r=(n=window==null?void 0:window.$$datastores)==null?void 0:n.ds)==null?void 0:r.getBaseID())||"",i=JSON.stringify(e);localStorage.setItem(AT(a),i)}catch(a){console.error(a)}}function DT(e){try{const n=JSON.stringify(e);localStorage.setItem(RT,n)}catch(n){console.error(n)}}function IT(){try{const e=localStorage.getItem(RT);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function nu(){var r,a;const e=((a=(r=window==null?void 0:window.$$datastores)==null?void 0:r.ds)==null?void 0:a.getBaseID())||"",n=localStorage.getItem(AT(e));if(n){const i=JSON.parse(n);return i.tabs=i.tabs.map(u=>({...u,flags:{...u.flags,enabled:!0}})),i}return G_}function qd(e){const{name:n,type:r,path:a}=e,i=a.split(".").at(-1);switch(r){case le.WEBFORM:return`${n}.WebForm`;case le.METHOD:case le.CLASS:return i?`${n}.${i}`:n;case le.ROLES:return n;default:return`${n}.${r}`}}const MT=e=>{if(!e)return[];const n=new Map;return e.dataClasses.forEach(r=>{var u,c;const a=r.extraProperties||{},i={id:r.className,type:"table",position:{x:((u=a.position)==null?void 0:u.x)||0,y:((c=a.position)==null?void 0:c.y)||0},dragHandle:".custom-drag-handle",data:r};n.set(r.name,i)}),Array.from(n.values())};function kT(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function wk(){this.__data__=[],this.size=0}var Ek=wk;function Sk(e,n){return e===n||e!==e&&n!==n}var Ok=Sk,Tk=Ok;function xk(e,n){for(var r=e.length;r--;)if(Tk(e[r][0],n))return r;return-1}var Vd=xk,Ck=Vd,Rk=Array.prototype,Ak=Rk.splice;function Pk(e){var n=this.__data__,r=Ck(n,e);if(r<0)return!1;var a=n.length-1;return r==a?n.pop():Ak.call(n,r,1),--this.size,!0}var Dk=Pk,Ik=Vd;function Mk(e){var n=this.__data__,r=Ik(n,e);return r<0?void 0:n[r][1]}var kk=Mk,$k=Vd;function Nk(e){return $k(this.__data__,e)>-1}var jk=Nk,Lk=Vd;function Fk(e,n){var r=this.__data__,a=Lk(r,e);return a<0?(++this.size,r.push([e,n])):r[a][1]=n,this}var Wk=Fk,Bk=Ek,Uk=Dk,zk=kk,Hk=jk,Gk=Wk;function ou(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}ou.prototype.clear=Bk;ou.prototype.delete=Uk;ou.prototype.get=zk;ou.prototype.has=Hk;ou.prototype.set=Gk;var Yd=ou,qk=Yd;function Vk(){this.__data__=new qk,this.size=0}var Yk=Vk;function Kk(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}var Xk=Kk;function Jk(e){return this.__data__.get(e)}var Zk=Jk;function Qk(e){return this.__data__.has(e)}var e$=Qk,t$=Ad,r$=of,n$="[object AsyncFunction]",o$="[object Function]",a$="[object GeneratorFunction]",i$="[object Proxy]";function s$(e){if(!r$(e))return!1;var n=t$(e);return n==o$||n==a$||n==n$||n==i$}var u$=s$,c$=Io,l$=c$["__core-js_shared__"],f$=l$,Jb=f$,KE=function(){var e=/[^.]+$/.exec(Jb&&Jb.keys&&Jb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function d$(e){return!!KE&&KE in e}var p$=d$,h$=Function.prototype,v$=h$.toString;function g$(e){if(e!=null){try{return v$.call(e)}catch{}try{return e+""}catch{}}return""}var $T=g$,m$=u$,y$=p$,b$=of,_$=$T,w$=/[\\^$.*+?()[\]{}|]/g,E$=/^\[object .+?Constructor\]$/,S$=Function.prototype,O$=Object.prototype,T$=S$.toString,x$=O$.hasOwnProperty,C$=RegExp("^"+T$.call(x$).replace(w$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function R$(e){if(!b$(e)||y$(e))return!1;var n=m$(e)?C$:E$;return n.test(_$(e))}var A$=R$;function P$(e,n){return e==null?void 0:e[n]}var D$=P$,I$=A$,M$=D$;function k$(e,n){var r=M$(e,n);return I$(r)?r:void 0}var au=k$,$$=au,N$=Io,j$=$$(N$,"Map"),q_=j$,L$=au,F$=L$(Object,"create"),Kd=F$,XE=Kd;function W$(){this.__data__=XE?XE(null):{},this.size=0}var B$=W$;function U$(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var z$=U$,H$=Kd,G$="__lodash_hash_undefined__",q$=Object.prototype,V$=q$.hasOwnProperty;function Y$(e){var n=this.__data__;if(H$){var r=n[e];return r===G$?void 0:r}return V$.call(n,e)?n[e]:void 0}var K$=Y$,X$=Kd,J$=Object.prototype,Z$=J$.hasOwnProperty;function Q$(e){var n=this.__data__;return X$?n[e]!==void 0:Z$.call(n,e)}var eN=Q$,tN=Kd,rN="__lodash_hash_undefined__";function nN(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tN&&n===void 0?rN:n,this}var oN=nN,aN=B$,iN=z$,sN=K$,uN=eN,cN=oN;function iu(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}iu.prototype.clear=aN;iu.prototype.delete=iN;iu.prototype.get=sN;iu.prototype.has=uN;iu.prototype.set=cN;var lN=iu,JE=lN,fN=Yd,dN=q_;function pN(){this.size=0,this.__data__={hash:new JE,map:new(dN||fN),string:new JE}}var hN=pN;function vN(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var gN=vN,mN=gN;function yN(e,n){var r=e.__data__;return mN(n)?r[typeof n=="string"?"string":"hash"]:r.map}var Xd=yN,bN=Xd;function _N(e){var n=bN(this,e).delete(e);return this.size-=n?1:0,n}var wN=_N,EN=Xd;function SN(e){return EN(this,e).get(e)}var ON=SN,TN=Xd;function xN(e){return TN(this,e).has(e)}var CN=xN,RN=Xd;function AN(e,n){var r=RN(this,e),a=r.size;return r.set(e,n),this.size+=r.size==a?0:1,this}var PN=AN,DN=hN,IN=wN,MN=ON,kN=CN,$N=PN;function su(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}su.prototype.clear=DN;su.prototype.delete=IN;su.prototype.get=MN;su.prototype.has=kN;su.prototype.set=$N;var NT=su,NN=Yd,jN=q_,LN=NT,FN=200;function WN(e,n){var r=this.__data__;if(r instanceof NN){var a=r.__data__;if(!jN||a.length<FN-1)return a.push([e,n]),this.size=++r.size,this;r=this.__data__=new LN(a)}return r.set(e,n),this.size=r.size,this}var BN=WN,UN=Yd,zN=Yk,HN=Xk,GN=Zk,qN=e$,VN=BN;function hf(e){var n=this.__data__=new UN(e);this.size=n.size}hf.prototype.clear=zN;hf.prototype.delete=HN;hf.prototype.get=GN;hf.prototype.has=qN;hf.prototype.set=VN;var YN="__lodash_hash_undefined__";function KN(e){return this.__data__.set(e,YN),this}var XN=KN;function JN(e){return this.__data__.has(e)}var ZN=JN,QN=NT,ej=XN,tj=ZN;function U1(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new QN;++n<r;)this.add(e[n])}U1.prototype.add=U1.prototype.push=ej;U1.prototype.has=tj;var rj=Io;rj.Uint8Array;var ZE=w_,QE=ZE?ZE.prototype:void 0;QE&&QE.valueOf;var nj=Ad,oj=E_,aj="[object Arguments]";function ij(e){return oj(e)&&nj(e)==aj}var sj=ij,eS=sj,uj=E_,jT=Object.prototype,cj=jT.hasOwnProperty,lj=jT.propertyIsEnumerable;eS(function(){return arguments}());var hd={exports:{}};function fj(){return!1}var dj=fj;hd.exports;(function(e,n){var r=Io,a=dj,i=n&&!n.nodeType&&n,u=i&&!0&&e&&!e.nodeType&&e,c=u&&u.exports===i,f=c?r.Buffer:void 0,p=f?f.isBuffer:void 0,h=p||a;e.exports=h})(hd,hd.exports);hd.exports;var vd={exports:{}};vd.exports;(function(e,n){var r=cO,a=n&&!n.nodeType&&n,i=a&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===a,c=u&&r.process,f=function(){try{var p=i&&i.require&&i.require("util").types;return p||c&&c.binding&&c.binding("util")}catch{}}();e.exports=f})(vd,vd.exports);var pj=vd.exports,tS=pj;tS&&tS.isTypedArray;var hj=au,vj=Io,gj=hj(vj,"DataView"),mj=gj,yj=au,bj=Io,_j=yj(bj,"Promise"),wj=_j,Ej=au,Sj=Io,Oj=Ej(Sj,"Set"),Tj=Oj,xj=au,Cj=Io,Rj=xj(Cj,"WeakMap"),Aj=Rj,z1=mj,H1=q_,G1=wj,q1=Tj,V1=Aj,LT=Ad,uu=$T,rS="[object Map]",Pj="[object Object]",nS="[object Promise]",oS="[object Set]",aS="[object WeakMap]",iS="[object DataView]",Dj=uu(z1),Ij=uu(H1),Mj=uu(G1),kj=uu(q1),$j=uu(V1),Ns=LT;(z1&&Ns(new z1(new ArrayBuffer(1)))!=iS||H1&&Ns(new H1)!=rS||G1&&Ns(G1.resolve())!=nS||q1&&Ns(new q1)!=oS||V1&&Ns(new V1)!=aS)&&(Ns=function(e){var n=LT(e),r=n==Pj?e.constructor:void 0,a=r?uu(r):"";if(a)switch(a){case Dj:return iS;case Ij:return rS;case Mj:return nS;case kj:return oS;case $j:return aS}return n});const Nj="ROOT";lR(),cR();var sS;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(sS||(sS={}));var gd={exports:{}};/**
186
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function F1(e,n){if(e){var r=e.indexOf(n);0<=r&&e.splice(r,1)}}var Hd=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,r,a,i,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=R1(c),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}else c.remove(this);var m=this.initialTeardown;if($a(m))try{m()}catch(C){u=C instanceof Kb?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var E=R1(b),O=E.next();!O.done;O=E.next()){var R=O.value;try{zE(R)}catch(C){u=u??[],C instanceof Kb?u=id(id([],A1(u)),A1(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{O&&!O.done&&(i=E.return)&&i.call(E)}finally{if(a)throw a.error}}}if(u)throw new Kb(u)}},e.prototype.add=function(n){var r;if(n&&n!==this)if(this.closed)zE(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(n)}},e.prototype._hasParent=function(n){var r=this._parentage;return r===n||Array.isArray(r)&&r.includes(n)},e.prototype._addParent=function(n){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(n),r):r?[r,n]:n},e.prototype._removeParent=function(n){var r=this._parentage;r===n?this._parentage=null:Array.isArray(r)&&F1(r,n)},e.prototype.remove=function(n){var r=this._finalizers;r&&F1(r,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),cT=Hd.EMPTY;function lT(e){return e instanceof Hd||e&&"closed"in e&&$a(e.remove)&&$a(e.add)&&$a(e.unsubscribe)}function zE(e){$a(e)?e():e.unsubscribe()}var fT={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},jM={setTimeout:function(e,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return setTimeout.apply(void 0,id([e,n],A1(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function LM(e){jM.setTimeout(function(){throw e})}function HE(){}function Hf(e){e()}var dT=function(e){jd(n,e);function n(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,lT(r)&&r.add(a)):a.destination=UM,a}return n.create=function(r,a,i){return new W1(r,a,i)},n.prototype.next=function(r){this.isStopped||this._next(r)},n.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(r){this.destination.next(r)},n.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Hd),FM=Function.prototype.bind;function Xb(e,n){return FM.call(e,n)}var WM=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var r=this.partialObserver;if(r.next)try{r.next(n)}catch(a){Af(a)}},e.prototype.error=function(n){var r=this.partialObserver;if(r.error)try{r.error(n)}catch(a){Af(a)}else Af(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(r){Af(r)}},e}(),W1=function(e){jd(n,e);function n(r,a,i){var u=e.call(this)||this,c;if($a(r)||!r)c={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&fT.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},c={next:r.next&&Xb(r.next,f),error:r.error&&Xb(r.error,f),complete:r.complete&&Xb(r.complete,f)}):c=r}return u.destination=new WM(c),u}return n}(dT);function Af(e){LM(e)}function BM(e){throw e}var UM={closed:!0,next:HE,error:BM,complete:HE},zM=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function HM(e){return e}function GM(e){return e.length===0?HM:e.length===1?e[0]:function(n){return e.reduce(function(r,a){return a(r)},n)}}var GE=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var r=new e;return r.source=this,r.operator=n,r},e.prototype.subscribe=function(n,r,a){var i=this,u=VM(n)?n:new W1(n,r,a);return Hf(function(){var c=i,f=c.operator,p=c.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(r){n.error(r)}},e.prototype.forEach=function(n,r){var a=this;return r=qE(r),new r(function(i,u){var c=new W1({next:function(f){try{n(f)}catch(p){u(p),c.unsubscribe()}},error:u,complete:i});a.subscribe(c)})},e.prototype._subscribe=function(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)},e.prototype[zM]=function(){return this},e.prototype.pipe=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return GM(n)(this)},e.prototype.toPromise=function(n){var r=this;return n=qE(n),new n(function(a,i){var u;r.subscribe(function(c){return u=c},function(c){return i(c)},function(){return a(u)})})},e.create=function(n){return new e(n)},e}();function qE(e){var n;return(n=e??fT.Promise)!==null&&n!==void 0?n:Promise}function qM(e){return e&&$a(e.next)&&$a(e.error)&&$a(e.complete)}function VM(e){return e&&e instanceof dT||qM(e)&&lT(e)}var YM=uT(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ru=function(e){jd(n,e);function n(){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 n.prototype.lift=function(r){var a=new VE(this,this);return a.operator=r,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new YM},n.prototype.next=function(r){var a=this;Hf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=R1(a.currentObservers),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(i)throw i.error}}}})},n.prototype.error=function(r){var a=this;Hf(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)}})},n.prototype.complete=function(){var r=this;Hf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},n.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},n.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,c=i.isStopped,f=i.observers;return u||c?cT:(this.currentObservers=null,f.push(r),new Hd(function(){a.currentObservers=null,F1(f,r)}))},n.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,c=a.isStopped;i?r.error(u):c&&r.complete()},n.prototype.asObservable=function(){var r=new GE;return r.source=this,r},n.create=function(r,a){return new VE(r,a)},n}(GE),VE=function(e){jd(n,e);function n(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return n.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)},n.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)},n.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)},n.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:cT},n}(ru),pT=(e=>(e.RELOAD="reload",e))(pT||{}),F_=(e=>(e.RENAME="rename",e))(F_||{});const hT=new ru,KM=new ru,Ao=new ru;new ru;var ka=(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))(ka||{});const Xa=new ru;function vT(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 gT(e){const n=new RegExp(':(?!4D\\.\\w+)[CPK]?\\d+(?=(?:[^"\\\\]*(?:\\\\.|"(?:[^"\\\\]*\\\\.)*[^"\\\\]*"))*[^"]*$)',"gm");return e.replace(n,"")}var zs=(e=>(e.METHODS="method",e.WEBFORMS="webform",e.CLASSES="class",e.WELCOME="welcome",e.SETTINGS="settings",e.ROOT="root",e))(zs||{});const Wt={CLASSES:"Classes",METHODS:"Methods",SHARED:"Shared",WEBFORMS:"WebForms"};var le=(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))(le||{}),Zt=(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))(Zt||{}),W_=(e=>(e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e))(W_||{});const Ur="roles.json",B_="model.4DModel";function mT(e){const n=e.split("."),r=n.pop(),a=n.join(".").split("/")[0];switch(!0){case r==="4DModel":return le.MODEL;case r==="WebForm":return le.WEBFORM;case(["4dm","4qs","4qm"].includes(r)&&a===Wt.METHODS):return le.METHOD;case(["4dm","4qs","4qm"].includes(r)&&a===Wt.CLASSES):return le.CLASS;case e===Ur:return le.ROLES;default:return le.WEBFORM}}function Fs(e,n=!1){switch(e){case Wt.WEBFORMS:case"webform":return"WebForm";case"Mobile":case"mform":return"MForm";case"class":case"method":case Wt.CLASSES:case Wt.METHODS:return n?"4qs":"4dm";default:return""}}class XM{constructor(){hP(this,"current",Promise.resolve())}lock(){let n;const r=new Promise(i=>{n=i}),a=this.current.then(()=>n);return this.current=r,a}}function yT(){const e=new XM;return async n=>{const r=await e.lock(),a=await n();return r(),a}}const bn=wo.curry((e,n,r)=>e&&wo.get(r,e)===n),JM=wo.curry((e,n,r)=>wo.get(r,e)!==n),ZM=wo.curry((e,n)=>wo.get(n,"id")!==e),QM=wo.curry((e,n)=>wo.get(n,"id")===e);wo.curry((e,n)=>wo.get(n,"path")===e);function ek(e="id",n,r){return r.findIndex(bn(e,n))!==-1}function fd(e){if(!e)return"";const{id:n,namespace:r}=e;return r?`${r}:${n}`:n}function tk(e){return e.dataType==="array"}function U_(e){return e.dataType==="object"}function rk(e){return e.type==="scalar"}function bT(e){return tk(e)||U_(e)||rk(e)}var dd=(e=>(e.capable="capable",e.incapable="incapable",e.indifferent="indifferent",e))(dd||{}),_T=(e=>(e.table="table",e.catalog="catalog",e.currentRecord="currentRecord",e.currentSelection="currentSelection",e))(_T||{});function z_(e){var n;let r={};try{const u=((n=e.match(/\/\/%attributes = (.*)/))==null?void 0:n[1])||"";r=JSON.parse(u)}catch{}const{published4DMobile:a,...i}=r;return{invisible:!1,shared:!1,executedOnServer:!1,preemptive:dd.indifferent,publishedSoap:!1,publishedWsdl:!1,publishedWeb:!1,publishedSql:!1,publishedRest:!!a,publishedRestOptions:a||{table:"",scope:_T.table},...i}}function nk(e){const n={};return e.invisible&&(n.invisible=!0),e.shared&&(n.shared=!0),e.executedOnServer&&(n.executedOnServer=!0),e.preemptive&&[dd.capable,dd.incapable].includes(e.preemptive)&&(n.preemptive=e.preemptive),e.publishedSoap&&(n.publishedSoap=!0,e.publishedWsdl&&(n.publishedWsdl=!0)),e.publishedWeb&&(n.publishedWeb=!0),e.publishedSql&&(n.publishedSql=!0),e.publishedRest&&e.publishedRestOptions&&(n.published4DMobile=e.publishedRestOptions),JSON.stringify(n).replace(/"(true|false)"/g,"$1")}function wT(e,n,r=!1){const a=wo.isString(n)?n:nk(n);if(!r&&ok(e))return e;const i=ak(e);return`//%attributes = ${a}\r
187
+ ${i}`}function ok(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function ak(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const en="/rest/$designer",ik="/rest/$designer-ext",ET="/$shared";class YE extends Error{constructor(n,r,a){super(),this.url=n,this.response=r,this.data=a}log(){console.error("Error while sending the request",this)}}async function hr(e,n){const r=await window.fetch(e,n);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 YE(e,r,i)}catch{a=new YE(e,r)}throw a.log(),a}return await r.json()}const sk=()=>{const{host:e,protocol:n}=window.location,r=n==="https:";return{projectOpened:!1,remoteDebuggerMode:W_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${r?"s":""}://${e}/remoteDebugger`,lsp:`ws${r?"s":""}://${e}/LSP`},isRestActive:!0}};async function uk(){const{hostname:e,host:n,protocol:r}=window.location,a=r==="https:";try{const i=await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(i.rendererPath)return i.rendererPath;const c=`http://${e}:${i.webServerHTTPPort}`,f=`https://${e}:${i.webServerHTTPSPort}`;return i.webServerHTTPPort&&i.webServerHTTPSPort?a?f:c:i.webServerHTTPPort?c: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":""}://${n}/remoteDebugger`,lsp:`ws${a?"s":""}://${n}/LSP`},isRestActive:i.isRESTActive}}catch(i){return console.error(i),sk()}}async function ck(e){return await hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function lk(...e){return(await Promise.all(e.map(n=>ck({root:n,verb:Zt.GET_FOLDER})))).map(({children:n})=>n.map(({name:r,date:a,type:i})=>({name:r,type:i,date:a,path:`${i}/${r}`}))).flat()}function fk(e){return hr(en,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(n=>({...n,content:[le.METHOD,le.CLASS].includes(n.type)?gT(n.content):n.content}))}async function dk(e){return e.type==="folder"?(await hr(ik,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function ST(...e){return await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function pk(){return await hr("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function hk({name:e,path:n="",root:r="root",asText:a=!1}){return hr(en,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:r,path:n,name:e,asText:a}),headers:new Headers({"Content-Type":"application/json"})})}async function vk(){try{const e=await hr(`${ET}/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 gk(){try{const e=await hr(`${ET}/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 mk=yT(),ri=async e=>{const n={verb:Zt.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return mk(async()=>(await hr(en,{method:"POST",body:JSON.stringify(n),headers:new Headers({"Content-Type":"application/json"})}),e))},Gd=async e=>{const n=await hr(en,{method:"POST",body:JSON.stringify({...e,verb:Zt.SET_FILE_CONTENT,root:zs.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),r=mT(`${e.path||"Sources"}/${e.name}`);return{...n,type:r,size:0}},H_=async e=>await Gd({name:"crafted_components.json",path:Wt.WEBFORMS,content:e});function yk(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function OT(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function B1(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ni(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(n=>Array.isArray(n)?n:{...n,content:["4dm","4qm","4qs"].includes(n.ext)?gT(n.content):n.content})}function bk(e){return hr(en,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}var As=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(As||{}),TT=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e))(TT||{});const _k={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};var xT=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(xT||{}),Na=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Na||{}),pd=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(pd||{}),CT=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(CT||{});const G_={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles"},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Na.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},RT="4DWS_PREFS",AT=e=>`APP_STATE_${e}`;function PT(e){var n,r;try{const a=((r=(n=window==null?void 0:window.$$datastores)==null?void 0:n.ds)==null?void 0:r.getBaseID())||"",i=JSON.stringify(e);localStorage.setItem(AT(a),i)}catch(a){console.error(a)}}function DT(e){try{const n=JSON.stringify(e);localStorage.setItem(RT,n)}catch(n){console.error(n)}}function IT(){try{const e=localStorage.getItem(RT);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function nu(){var r,a;const e=((a=(r=window==null?void 0:window.$$datastores)==null?void 0:r.ds)==null?void 0:a.getBaseID())||"",n=localStorage.getItem(AT(e));if(n){const i=JSON.parse(n);return i.tabs=i.tabs.map(u=>({...u,flags:{...u.flags,enabled:!0}})),i}return G_}function qd(e){const{name:n,type:r,path:a}=e,i=a.split(".").at(-1);switch(r){case le.WEBFORM:return`${n}.WebForm`;case le.METHOD:case le.CLASS:return i?`${n}.${i}`:n;case le.ROLES:return n;default:return`${n}.${r}`}}const MT=e=>{if(!e)return[];const n=new Map;return e.dataClasses.forEach(r=>{var u,c;const a=r.extraProperties||{},i={id:r.className,type:"table",position:{x:((u=a.position)==null?void 0:u.x)||0,y:((c=a.position)==null?void 0:c.y)||0},dragHandle:".custom-drag-handle",data:r};n.set(r.name,i)}),Array.from(n.values())};function kT(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function wk(){this.__data__=[],this.size=0}var Ek=wk;function Sk(e,n){return e===n||e!==e&&n!==n}var Ok=Sk,Tk=Ok;function xk(e,n){for(var r=e.length;r--;)if(Tk(e[r][0],n))return r;return-1}var Vd=xk,Ck=Vd,Rk=Array.prototype,Ak=Rk.splice;function Pk(e){var n=this.__data__,r=Ck(n,e);if(r<0)return!1;var a=n.length-1;return r==a?n.pop():Ak.call(n,r,1),--this.size,!0}var Dk=Pk,Ik=Vd;function Mk(e){var n=this.__data__,r=Ik(n,e);return r<0?void 0:n[r][1]}var kk=Mk,$k=Vd;function Nk(e){return $k(this.__data__,e)>-1}var jk=Nk,Lk=Vd;function Fk(e,n){var r=this.__data__,a=Lk(r,e);return a<0?(++this.size,r.push([e,n])):r[a][1]=n,this}var Wk=Fk,Bk=Ek,Uk=Dk,zk=kk,Hk=jk,Gk=Wk;function ou(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}ou.prototype.clear=Bk;ou.prototype.delete=Uk;ou.prototype.get=zk;ou.prototype.has=Hk;ou.prototype.set=Gk;var Yd=ou,qk=Yd;function Vk(){this.__data__=new qk,this.size=0}var Yk=Vk;function Kk(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}var Xk=Kk;function Jk(e){return this.__data__.get(e)}var Zk=Jk;function Qk(e){return this.__data__.has(e)}var e$=Qk,t$=Ad,r$=of,n$="[object AsyncFunction]",o$="[object Function]",a$="[object GeneratorFunction]",i$="[object Proxy]";function s$(e){if(!r$(e))return!1;var n=t$(e);return n==o$||n==a$||n==n$||n==i$}var u$=s$,c$=Io,l$=c$["__core-js_shared__"],f$=l$,Jb=f$,KE=function(){var e=/[^.]+$/.exec(Jb&&Jb.keys&&Jb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function d$(e){return!!KE&&KE in e}var p$=d$,h$=Function.prototype,v$=h$.toString;function g$(e){if(e!=null){try{return v$.call(e)}catch{}try{return e+""}catch{}}return""}var $T=g$,m$=u$,y$=p$,b$=of,_$=$T,w$=/[\\^$.*+?()[\]{}|]/g,E$=/^\[object .+?Constructor\]$/,S$=Function.prototype,O$=Object.prototype,T$=S$.toString,x$=O$.hasOwnProperty,C$=RegExp("^"+T$.call(x$).replace(w$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function R$(e){if(!b$(e)||y$(e))return!1;var n=m$(e)?C$:E$;return n.test(_$(e))}var A$=R$;function P$(e,n){return e==null?void 0:e[n]}var D$=P$,I$=A$,M$=D$;function k$(e,n){var r=M$(e,n);return I$(r)?r:void 0}var au=k$,$$=au,N$=Io,j$=$$(N$,"Map"),q_=j$,L$=au,F$=L$(Object,"create"),Kd=F$,XE=Kd;function W$(){this.__data__=XE?XE(null):{},this.size=0}var B$=W$;function U$(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var z$=U$,H$=Kd,G$="__lodash_hash_undefined__",q$=Object.prototype,V$=q$.hasOwnProperty;function Y$(e){var n=this.__data__;if(H$){var r=n[e];return r===G$?void 0:r}return V$.call(n,e)?n[e]:void 0}var K$=Y$,X$=Kd,J$=Object.prototype,Z$=J$.hasOwnProperty;function Q$(e){var n=this.__data__;return X$?n[e]!==void 0:Z$.call(n,e)}var eN=Q$,tN=Kd,rN="__lodash_hash_undefined__";function nN(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tN&&n===void 0?rN:n,this}var oN=nN,aN=B$,iN=z$,sN=K$,uN=eN,cN=oN;function iu(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}iu.prototype.clear=aN;iu.prototype.delete=iN;iu.prototype.get=sN;iu.prototype.has=uN;iu.prototype.set=cN;var lN=iu,JE=lN,fN=Yd,dN=q_;function pN(){this.size=0,this.__data__={hash:new JE,map:new(dN||fN),string:new JE}}var hN=pN;function vN(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var gN=vN,mN=gN;function yN(e,n){var r=e.__data__;return mN(n)?r[typeof n=="string"?"string":"hash"]:r.map}var Xd=yN,bN=Xd;function _N(e){var n=bN(this,e).delete(e);return this.size-=n?1:0,n}var wN=_N,EN=Xd;function SN(e){return EN(this,e).get(e)}var ON=SN,TN=Xd;function xN(e){return TN(this,e).has(e)}var CN=xN,RN=Xd;function AN(e,n){var r=RN(this,e),a=r.size;return r.set(e,n),this.size+=r.size==a?0:1,this}var PN=AN,DN=hN,IN=wN,MN=ON,kN=CN,$N=PN;function su(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}su.prototype.clear=DN;su.prototype.delete=IN;su.prototype.get=MN;su.prototype.has=kN;su.prototype.set=$N;var NT=su,NN=Yd,jN=q_,LN=NT,FN=200;function WN(e,n){var r=this.__data__;if(r instanceof NN){var a=r.__data__;if(!jN||a.length<FN-1)return a.push([e,n]),this.size=++r.size,this;r=this.__data__=new LN(a)}return r.set(e,n),this.size=r.size,this}var BN=WN,UN=Yd,zN=Yk,HN=Xk,GN=Zk,qN=e$,VN=BN;function hf(e){var n=this.__data__=new UN(e);this.size=n.size}hf.prototype.clear=zN;hf.prototype.delete=HN;hf.prototype.get=GN;hf.prototype.has=qN;hf.prototype.set=VN;var YN="__lodash_hash_undefined__";function KN(e){return this.__data__.set(e,YN),this}var XN=KN;function JN(e){return this.__data__.has(e)}var ZN=JN,QN=NT,ej=XN,tj=ZN;function U1(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new QN;++n<r;)this.add(e[n])}U1.prototype.add=U1.prototype.push=ej;U1.prototype.has=tj;var rj=Io;rj.Uint8Array;var ZE=w_,QE=ZE?ZE.prototype:void 0;QE&&QE.valueOf;var nj=Ad,oj=E_,aj="[object Arguments]";function ij(e){return oj(e)&&nj(e)==aj}var sj=ij,eS=sj,uj=E_,jT=Object.prototype,cj=jT.hasOwnProperty,lj=jT.propertyIsEnumerable;eS(function(){return arguments}());var hd={exports:{}};function fj(){return!1}var dj=fj;hd.exports;(function(e,n){var r=Io,a=dj,i=n&&!n.nodeType&&n,u=i&&!0&&e&&!e.nodeType&&e,c=u&&u.exports===i,f=c?r.Buffer:void 0,p=f?f.isBuffer:void 0,h=p||a;e.exports=h})(hd,hd.exports);hd.exports;var vd={exports:{}};vd.exports;(function(e,n){var r=cO,a=n&&!n.nodeType&&n,i=a&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===a,c=u&&r.process,f=function(){try{var p=i&&i.require&&i.require("util").types;return p||c&&c.binding&&c.binding("util")}catch{}}();e.exports=f})(vd,vd.exports);var pj=vd.exports,tS=pj;tS&&tS.isTypedArray;var hj=au,vj=Io,gj=hj(vj,"DataView"),mj=gj,yj=au,bj=Io,_j=yj(bj,"Promise"),wj=_j,Ej=au,Sj=Io,Oj=Ej(Sj,"Set"),Tj=Oj,xj=au,Cj=Io,Rj=xj(Cj,"WeakMap"),Aj=Rj,z1=mj,H1=q_,G1=wj,q1=Tj,V1=Aj,LT=Ad,uu=$T,rS="[object Map]",Pj="[object Object]",nS="[object Promise]",oS="[object Set]",aS="[object WeakMap]",iS="[object DataView]",Dj=uu(z1),Ij=uu(H1),Mj=uu(G1),kj=uu(q1),$j=uu(V1),$s=LT;(z1&&$s(new z1(new ArrayBuffer(1)))!=iS||H1&&$s(new H1)!=rS||G1&&$s(G1.resolve())!=nS||q1&&$s(new q1)!=oS||V1&&$s(new V1)!=aS)&&($s=function(e){var n=LT(e),r=n==Pj?e.constructor:void 0,a=r?uu(r):"";if(a)switch(a){case Dj:return iS;case Ij:return rS;case Mj:return nS;case kj:return oS;case $j:return aS}return n});const Nj="ROOT";lR(),cR();var sS;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(sS||(sS={}));var gd={exports:{}};/**
188
188
  * @license
189
189
  * Lodash <https://lodash.com/>
190
190
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -229,7 +229,7 @@ object-assign
229
229
  (c) Sindre Sorhus
230
230
  @license MIT
231
231
  */var Zb,fS;function Y_(){if(fS)return Zb;fS=1;var e=Object.getOwnPropertySymbols,n=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 c={},f=0;f<10;f++)c["_"+String.fromCharCode(f)]=f;var p=Object.getOwnPropertyNames(c).map(function(m){return c[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 Zb=i()?Object.assign:function(u,c){for(var f,p=a(u),h,m=1;m<arguments.length;m++){f=Object(arguments[m]);for(var b in f)n.call(f,b)&&(p[b]=f[b]);if(e){h=e(f);for(var E=0;E<h.length;E++)r.call(f,h[E])&&(p[h[E]]=f[h[E]])}}return p},Zb}var Qb,dS;function K_(){if(dS)return Qb;dS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qb=e,Qb}var e1,pS;function UT(){return pS||(pS=1,e1=Function.call.bind(Object.prototype.hasOwnProperty)),e1}var t1,hS;function Fj(){if(hS)return t1;hS=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=K_(),r={},a=UT();e=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function i(u,c,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 E=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 E.name="Invariant Violation",E}b=u[m](c,m,p,f,null,n)}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 O=h?h():"";e("Failed "+f+" type: "+b.message+(O??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},t1=i,t1}var r1,vS;function Wj(){if(vS)return r1;vS=1;var e=BT(),n=Y_(),r=K_(),a=UT(),i=Fj(),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 c(){return null}return r1=function(f,p){var h=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function b(W){var z=W&&(h&&W[h]||W[m]);if(typeof z=="function")return z}var E="<<anonymous>>",O={array:j("array"),bigint:j("bigint"),bool:j("boolean"),func:j("function"),number:j("number"),object:j("object"),string:j("string"),symbol:j("symbol"),any:F(),arrayOf:D,element:M(),elementType:S(),instanceOf:q,node:He(),objectOf:V,oneOf:U,oneOfType:Ee,shape:St,exact:me};function R(W,z){return W===z?W!==0||1/W===1/z:W!==W&&z!==z}function C(W,z){this.message=W,this.data=z&&typeof z=="object"?z:{},this.stack=""}C.prototype=Error.prototype;function k(W){if(process.env.NODE_ENV!=="production")var z={},fe=0;function se(ue,ee,ae,ne,he,ve,J){if(ne=ne||E,ve=ve||ae,J!==r){if(p){var P=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 P.name="Invariant Violation",P}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ge=ne+":"+ae;!z[Ge]&&fe<3&&(u("You are manually calling a React.PropTypes validation function for the `"+ve+"` 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[Ge]=!0,fe++)}}return ee[ae]==null?ue?ee[ae]===null?new C("The "+he+" `"+ve+"` is marked as required "+("in `"+ne+"`, but its value is `null`.")):new C("The "+he+" `"+ve+"` is marked as required in "+("`"+ne+"`, but its value is `undefined`.")):null:W(ee,ae,ne,he,ve)}var re=se.bind(null,!1);return re.isRequired=se.bind(null,!0),re}function j(W){function z(fe,se,re,ue,ee,ae){var ne=fe[se],he=Xe(ne);if(he!==W){var ve=Le(ne);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ve+"` supplied to `"+re+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return k(z)}function F(){return k(c)}function D(W){function z(fe,se,re,ue,ee){if(typeof W!="function")return new C("Property `"+ee+"` of component `"+re+"` has invalid PropType notation inside arrayOf.");var ae=fe[se];if(!Array.isArray(ae)){var ne=Xe(ae);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected an array."))}for(var he=0;he<ae.length;he++){var ve=W(ae,he,re,ue,ee+"["+he+"]",r);if(ve instanceof Error)return ve}return null}return k(z)}function M(){function W(z,fe,se,re,ue){var ee=z[fe];if(!f(ee)){var ae=Xe(ee);return new C("Invalid "+re+" `"+ue+"` of type "+("`"+ae+"` supplied to `"+se+"`, expected a single ReactElement."))}return null}return k(W)}function S(){function W(z,fe,se,re,ue){var ee=z[fe];if(!e.isValidElementType(ee)){var ae=Xe(ee);return new C("Invalid "+re+" `"+ue+"` of type "+("`"+ae+"` supplied to `"+se+"`, expected a single ReactElement type."))}return null}return k(W)}function q(W){function z(fe,se,re,ue,ee){if(!(fe[se]instanceof W)){var ae=W.name||E,ne=er(fe[se]);return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected ")+("instance of `"+ae+"`."))}return null}return k(z)}function U(W){if(!Array.isArray(W))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.")),c;function z(fe,se,re,ue,ee){for(var ae=fe[se],ne=0;ne<W.length;ne++)if(R(ae,W[ne]))return null;var he=JSON.stringify(W,function(J,P){var Ge=Le(P);return Ge==="symbol"?String(P):P});return new C("Invalid "+ue+" `"+ee+"` of value `"+String(ae)+"` "+("supplied to `"+re+"`, expected one of "+he+"."))}return k(z)}function V(W){function z(fe,se,re,ue,ee){if(typeof W!="function")return new C("Property `"+ee+"` of component `"+re+"` has invalid PropType notation inside objectOf.");var ae=fe[se],ne=Xe(ae);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type "+("`"+ne+"` supplied to `"+re+"`, expected an object."));for(var he in ae)if(a(ae,he)){var ve=W(ae,he,re,ue,ee+"."+he,r);if(ve instanceof Error)return ve}return null}return k(z)}function Ee(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&u("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var z=0;z<W.length;z++){var fe=W[z];if(typeof fe!="function")return u("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ye(fe)+" at index "+z+"."),c}function se(re,ue,ee,ae,ne){for(var he=[],ve=0;ve<W.length;ve++){var J=W[ve],P=J(re,ue,ee,ae,ne,r);if(P==null)return null;P.data&&a(P.data,"expectedType")&&he.push(P.data.expectedType)}var Ge=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new C("Invalid "+ae+" `"+ne+"` supplied to "+("`"+ee+"`"+Ge+"."))}return k(se)}function He(){function W(z,fe,se,re,ue){return Me(z[fe])?null:new C("Invalid "+re+" `"+ue+"` supplied to "+("`"+se+"`, expected a ReactNode."))}return k(W)}function Be(W,z,fe,se,re){return new C((W||"React class")+": "+z+" type `"+fe+"."+se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function St(W){function z(fe,se,re,ue,ee){var ae=fe[se],ne=Xe(ae);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));for(var he in W){var ve=W[he];if(typeof ve!="function")return Be(re,ue,ee,he,Le(ve));var J=ve(ae,he,re,ue,ee+"."+he,r);if(J)return J}return null}return k(z)}function me(W){function z(fe,se,re,ue,ee){var ae=fe[se],ne=Xe(ae);if(ne!=="object")return new C("Invalid "+ue+" `"+ee+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));var he=n({},fe[se],W);for(var ve in he){var J=W[ve];if(a(W,ve)&&typeof J!="function")return Be(re,ue,ee,ve,Le(J));if(!J)return new C("Invalid "+ue+" `"+ee+"` key `"+ve+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify(fe[se],null," ")+`
232
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var P=J(ae,ve,re,ue,ee+"."+ve,r);if(P)return P}return null}return k(z)}function Me(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(Me);if(W===null||f(W))return!0;var z=b(W);if(z){var fe=z.call(W),se;if(z!==W.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 at(W,z){return W==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function Xe(W){var z=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":at(z,W)?"symbol":z}function Le(W){if(typeof W>"u"||W===null)return""+W;var z=Xe(W);if(z==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return z}function Ye(W){var z=Le(W);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function er(W){return!W.constructor||!W.constructor.name?E:W.constructor.name}return O.checkPropTypes=i,O.resetWarningCache=i.resetWarningCache,O.PropTypes=O,O},r1}var n1,gS;function Bj(){if(gS)return n1;gS=1;var e=K_();function n(){}function r(){}return r.resetWarningCache=n,n1=function(){function a(c,f,p,h,m,b){if(b!==e){var E=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 E.name="Invariant Violation",E}}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:n};return u.PropTypes=u,u},n1}if(process.env.NODE_ENV!=="production"){var Uj=BT(),zj=!0;Y1.exports=Wj()(Uj.isElement,zj)}else Y1.exports=Bj()();var Hj=Y1.exports;const js=Rd(Hj);var Ba=ie.createContext(null);process.env.NODE_ENV!=="production"&&(Ba.displayName="ReactRedux");function Gj(e){e()}var zT=Gj,qj=function(n){return zT=n},Vj=function(){return zT};function Yj(){var e=Vj(),n=null,r=null;return{clear:function(){n=null,r=null},notify:function(){e(function(){for(var i=n;i;)i.callback(),i=i.next})},get:function(){for(var i=[],u=n;u;)i.push(u),u=u.next;return i},subscribe:function(i){var u=!0,c=r={callback:i,next:null,prev:r};return c.prev?c.prev.next=c:n=c,function(){!u||n===null||(u=!1,c.next?c.next.prev=c.prev:r=c.prev,c.prev?c.prev.next=c.next:n=c.next)}}}}var mS={notify:function(){},get:function(){return[]}};function HT(e,n){var r,a=mS;function i(b){return p(),a.subscribe(b)}function u(){a.notify()}function c(){m.onStateChange&&m.onStateChange()}function f(){return!!r}function p(){r||(r=n?n.addNestedSub(c):e.subscribe(c),a=Yj())}function h(){r&&(r(),r=void 0,a.clear(),a=mS)}var m={addNestedSub:i,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:f,trySubscribe:p,tryUnsubscribe:h,getListeners:function(){return a}};return m}var K1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ie.useLayoutEffect:ie.useEffect;function GT(e){var n=e.store,r=e.context,a=e.children,i=ie.useMemo(function(){var f=HT(n);return{store:n,subscription:f}},[n]),u=ie.useMemo(function(){return n.getState()},[n]);K1(function(){var f=i.subscription;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==n.getState()&&f.notifyNestedSubs(),function(){f.tryUnsubscribe(),f.onStateChange=null}},[i,u]);var c=r||Ba;return ie.createElement(c.Provider,{value:i},a)}process.env.NODE_ENV!=="production"&&(GT.propTypes={store:js.shape({subscribe:js.func.isRequired,dispatch:js.func.isRequired,getState:js.func.isRequired}),context:js.object,children:js.any});var X1={exports:{}},wt={};/** @license React v16.13.1
232
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var P=J(ae,ve,re,ue,ee+"."+ve,r);if(P)return P}return null}return k(z)}function Me(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(Me);if(W===null||f(W))return!0;var z=b(W);if(z){var fe=z.call(W),se;if(z!==W.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 at(W,z){return W==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function Xe(W){var z=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":at(z,W)?"symbol":z}function Le(W){if(typeof W>"u"||W===null)return""+W;var z=Xe(W);if(z==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return z}function Ye(W){var z=Le(W);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function er(W){return!W.constructor||!W.constructor.name?E:W.constructor.name}return O.checkPropTypes=i,O.resetWarningCache=i.resetWarningCache,O.PropTypes=O,O},r1}var n1,gS;function Bj(){if(gS)return n1;gS=1;var e=K_();function n(){}function r(){}return r.resetWarningCache=n,n1=function(){function a(c,f,p,h,m,b){if(b!==e){var E=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 E.name="Invariant Violation",E}}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:n};return u.PropTypes=u,u},n1}if(process.env.NODE_ENV!=="production"){var Uj=BT(),zj=!0;Y1.exports=Wj()(Uj.isElement,zj)}else Y1.exports=Bj()();var Hj=Y1.exports;const Ns=Rd(Hj);var Ba=ie.createContext(null);process.env.NODE_ENV!=="production"&&(Ba.displayName="ReactRedux");function Gj(e){e()}var zT=Gj,qj=function(n){return zT=n},Vj=function(){return zT};function Yj(){var e=Vj(),n=null,r=null;return{clear:function(){n=null,r=null},notify:function(){e(function(){for(var i=n;i;)i.callback(),i=i.next})},get:function(){for(var i=[],u=n;u;)i.push(u),u=u.next;return i},subscribe:function(i){var u=!0,c=r={callback:i,next:null,prev:r};return c.prev?c.prev.next=c:n=c,function(){!u||n===null||(u=!1,c.next?c.next.prev=c.prev:r=c.prev,c.prev?c.prev.next=c.next:n=c.next)}}}}var mS={notify:function(){},get:function(){return[]}};function HT(e,n){var r,a=mS;function i(b){return p(),a.subscribe(b)}function u(){a.notify()}function c(){m.onStateChange&&m.onStateChange()}function f(){return!!r}function p(){r||(r=n?n.addNestedSub(c):e.subscribe(c),a=Yj())}function h(){r&&(r(),r=void 0,a.clear(),a=mS)}var m={addNestedSub:i,notifyNestedSubs:u,handleChangeWrapper:c,isSubscribed:f,trySubscribe:p,tryUnsubscribe:h,getListeners:function(){return a}};return m}var K1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ie.useLayoutEffect:ie.useEffect;function GT(e){var n=e.store,r=e.context,a=e.children,i=ie.useMemo(function(){var f=HT(n);return{store:n,subscription:f}},[n]),u=ie.useMemo(function(){return n.getState()},[n]);K1(function(){var f=i.subscription;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),u!==n.getState()&&f.notifyNestedSubs(),function(){f.tryUnsubscribe(),f.onStateChange=null}},[i,u]);var c=r||Ba;return ie.createElement(c.Provider,{value:i},a)}process.env.NODE_ENV!=="production"&&(GT.propTypes={store:Ns.shape({subscribe:Ns.func.isRequired,dispatch:Ns.func.isRequired,getState:Ns.func.isRequired}),context:Ns.object,children:Ns.any});var X1={exports:{}},wt={};/** @license React v16.13.1
233
233
  * react-is.production.min.js
234
234
  *
235
235
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -261,12 +261,12 @@ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var P=J(ae,ve,re,ue,ee+"
261
261
  The error may be correlated with this previous error:
262
262
  `+f.current.stack+`
263
263
 
264
- `),R}return K1(function(){p.current=e,h.current=b,m.current=E,f.current=void 0}),K1(function(){function R(){try{var C=r.getState();if(C===h.current)return;var k=p.current(C);if(n(k,m.current))return;m.current=k,h.current=C}catch(j){f.current=j}u()}return c.onStateChange=R,c.trySubscribe(),R(),function(){return c.tryUnsubscribe()}},[r,c]),E}function iL(e){e===void 0&&(e=Ba);var n=e===Ba?KT:function(){return ie.useContext(e)};return function(a,i){if(i===void 0&&(i=oL),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=n(),c=u.store,f=u.subscription,p=aL(a,i,c,f);return ie.useDebugValue(p),p}}var sL=iL();qj(nR.unstable_batchedUpdates);const Gs=xe("catalog/fetchCatalog",async(e,{rejectWithValue:n})=>{var r;try{const a=await pk(),i=new Map,u=new Map;return(r=a==null?void 0:a.dataClasses)==null||r.forEach(({methods:c=[],...f})=>{const p={...f,methods:c};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 n("Error while loading the catalog")}});function uL(){const e=JT();return{get:()=>Ds.getState().catalog,fetch:()=>e(Gs()),refresh:()=>vf()}}function vf(e=2e3){return setTimeout(()=>{Ds.dispatch(Gs())},e)}const cL=typeof process=="object"&&process&&process.platform==="win32";var lL=cL?{sep:"\\"}:{sep:"/"},fL=ZT;function ZT(e,n,r){e instanceof RegExp&&(e=SS(e,r)),n instanceof RegExp&&(n=SS(n,r));var a=QT(e,n,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]+n.length)}}function SS(e,n){var r=n.match(e);return r?r[0]:null}ZT.range=QT;function QT(e,n,r){var a,i,u,c,f,p=r.indexOf(e),h=r.indexOf(n,p+1),m=p;if(p>=0&&h>0){if(e===n)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,c=h),h=r.indexOf(n,m+1)),m=p<h&&p>=0?p:h;a.length&&(f=[u,c])}return f}var ex=fL,dL=vL,tx="\0SLASH"+Math.random()+"\0",rx="\0OPEN"+Math.random()+"\0",X_="\0CLOSE"+Math.random()+"\0",nx="\0COMMA"+Math.random()+"\0",ox="\0PERIOD"+Math.random()+"\0";function o1(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function pL(e){return e.split("\\\\").join(tx).split("\\{").join(rx).split("\\}").join(X_).split("\\,").join(nx).split("\\.").join(ox)}function hL(e){return e.split(tx).join("\\").split(rx).join("{").split(X_).join("}").split(nx).join(",").split(ox).join(".")}function ax(e){if(!e)return[""];var n=[],r=ex("{","}",e);if(!r)return e.split(",");var a=r.pre,i=r.body,u=r.post,c=a.split(",");c[c.length-1]+="{"+i+"}";var f=ax(u);return u.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),n.push.apply(n,c),n}function vL(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Fl(pL(e),!0).map(hL)):[]}function gL(e){return"{"+e+"}"}function mL(e){return/^-?0\d/.test(e)}function yL(e,n){return e<=n}function bL(e,n){return e>=n}function Fl(e,n){var r=[],a=ex("{","}",e);if(!a)return[e];var i=a.pre,u=a.post.length?Fl(a.post,!1):[""];if(/\$$/.test(a.pre))for(var c=0;c<u.length;c++){var f=i+"{"+a.body+"}"+u[c];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+X_+a.post,Fl(e)):[e];var E;if(m)E=a.body.split(/\.\./);else if(E=ax(a.body),E.length===1&&(E=Fl(E[0],!1).map(gL),E.length===1))return u.map(function(He){return a.pre+E[0]+He});var O;if(m){var R=o1(E[0]),C=o1(E[1]),k=Math.max(E[0].length,E[1].length),j=E.length==3?Math.abs(o1(E[2])):1,F=yL,D=C<R;D&&(j*=-1,F=bL);var M=E.some(mL);O=[];for(var S=R;F(S,C);S+=j){var q;if(h)q=String.fromCharCode(S),q==="\\"&&(q="");else if(q=String(S),M){var U=k-q.length;if(U>0){var V=new Array(U+1).join("0");S<0?q="-"+V+q.slice(1):q=V+q}}O.push(q)}}else{O=[];for(var Ee=0;Ee<E.length;Ee++)O.push.apply(O,Fl(E[Ee],!1))}for(var Ee=0;Ee<O.length;Ee++)for(var c=0;c<u.length;c++){var f=i+O[Ee]+u[c];(!n||m||f)&&r.push(f)}}return r}const Un=ix=(e,n,r={})=>(md(n),!r.nocomment&&n.charAt(0)==="#"?!1:new Jd(n,r).match(e));var ix=Un;const J1=lL;Un.sep=J1.sep;const go=Symbol("globstar **");Un.GLOBSTAR=go;const _L=dL,OS={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Z1="[^/]",a1=Z1+"*?",wL="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",EL="(?:(?!(?:\\/|^)\\.).)*?",sx=e=>e.split("").reduce((n,r)=>(n[r]=!0,n),{}),TS=sx("().*{}+?[]^$\\!"),SL=sx("[.("),xS=/\/+/;Un.filter=(e,n={})=>(r,a,i)=>Un(r,e,n);const Va=(e,n={})=>{const r={};return Object.keys(e).forEach(a=>r[a]=e[a]),Object.keys(n).forEach(a=>r[a]=n[a]),r};Un.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Un;const n=Un,r=(a,i,u)=>n(a,i,Va(e,u));return r.Minimatch=class extends n.Minimatch{constructor(i,u){super(i,Va(e,u))}},r.Minimatch.defaults=a=>n.defaults(Va(e,a)).Minimatch,r.filter=(a,i)=>n.filter(a,Va(e,i)),r.defaults=a=>n.defaults(Va(e,a)),r.makeRe=(a,i)=>n.makeRe(a,Va(e,i)),r.braceExpand=(a,i)=>n.braceExpand(a,Va(e,i)),r.match=(a,i,u)=>n.match(a,i,Va(e,u)),r};Un.braceExpand=(e,n)=>ux(e,n);const ux=(e,n={})=>(md(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_L(e)),OL=1024*64,md=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>OL)throw new TypeError("pattern is too long")},i1=Symbol("subparse");Un.makeRe=(e,n)=>new Jd(e,n||{}).makeRe();Un.match=(e,n,r={})=>{const a=new Jd(n,r);return e=e.filter(i=>a.match(i)),a.options.nonull&&!e.length&&e.push(n),e};const TL=e=>e.replace(/\\(.)/g,"$1"),xL=e=>e.replace(/\\([^-\]])/g,"$1"),CL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),RL=e=>e.replace(/[[\]\\]/g,"\\$&");class Jd{constructor(n,r){md(n),r||(r={}),this.options=r,this.set=[],this.pattern=n,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 n=this.pattern,r=this.options;if(!r.nocomment&&n.charAt(0)==="#"){this.comment=!0;return}if(!n){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(xS)),this.debug(this.pattern,a),a=a.map((i,u,c)=>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 n=this.pattern;let r=!1,a=0;for(let i=0;i<n.length&&n.charAt(i)==="!";i++)r=!r,a++;a&&(this.pattern=n.slice(a)),this.negate=r}matchOne(n,r,a){var i=this.options;this.debug("matchOne",{this:this,file:n,pattern:r}),this.debug("matchOne",n.length,r.length);for(var u=0,c=0,f=n.length,p=r.length;u<f&&c<p;u++,c++){this.debug("matchOne loop");var h=r[c],m=n[u];if(this.debug(r,h,m),h===!1)return!1;if(h===go){this.debug("GLOBSTAR",[r,h,m]);var b=u,E=c+1;if(E===p){for(this.debug("** at the end");u<f;u++)if(n[u]==="."||n[u]===".."||!i.dot&&n[u].charAt(0)===".")return!1;return!0}for(;b<f;){var O=n[b];if(this.debug(`
264
+ `),R}return K1(function(){p.current=e,h.current=b,m.current=E,f.current=void 0}),K1(function(){function R(){try{var C=r.getState();if(C===h.current)return;var k=p.current(C);if(n(k,m.current))return;m.current=k,h.current=C}catch(j){f.current=j}u()}return c.onStateChange=R,c.trySubscribe(),R(),function(){return c.tryUnsubscribe()}},[r,c]),E}function iL(e){e===void 0&&(e=Ba);var n=e===Ba?KT:function(){return ie.useContext(e)};return function(a,i){if(i===void 0&&(i=oL),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=n(),c=u.store,f=u.subscription,p=aL(a,i,c,f);return ie.useDebugValue(p),p}}var sL=iL();qj(nR.unstable_batchedUpdates);const Hs=xe("catalog/fetchCatalog",async(e,{rejectWithValue:n})=>{var r;try{const a=await pk(),i=new Map,u=new Map;return(r=a==null?void 0:a.dataClasses)==null||r.forEach(({methods:c=[],...f})=>{const p={...f,methods:c};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 n("Error while loading the catalog")}});function uL(){const e=JT();return{get:()=>Qs.getState().catalog,fetch:()=>e(Hs()),refresh:()=>vf()}}function vf(e=2e3){return setTimeout(()=>{Qs.dispatch(Hs())},e)}const cL=typeof process=="object"&&process&&process.platform==="win32";var lL=cL?{sep:"\\"}:{sep:"/"},fL=ZT;function ZT(e,n,r){e instanceof RegExp&&(e=SS(e,r)),n instanceof RegExp&&(n=SS(n,r));var a=QT(e,n,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]+n.length)}}function SS(e,n){var r=n.match(e);return r?r[0]:null}ZT.range=QT;function QT(e,n,r){var a,i,u,c,f,p=r.indexOf(e),h=r.indexOf(n,p+1),m=p;if(p>=0&&h>0){if(e===n)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,c=h),h=r.indexOf(n,m+1)),m=p<h&&p>=0?p:h;a.length&&(f=[u,c])}return f}var ex=fL,dL=vL,tx="\0SLASH"+Math.random()+"\0",rx="\0OPEN"+Math.random()+"\0",X_="\0CLOSE"+Math.random()+"\0",nx="\0COMMA"+Math.random()+"\0",ox="\0PERIOD"+Math.random()+"\0";function o1(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function pL(e){return e.split("\\\\").join(tx).split("\\{").join(rx).split("\\}").join(X_).split("\\,").join(nx).split("\\.").join(ox)}function hL(e){return e.split(tx).join("\\").split(rx).join("{").split(X_).join("}").split(nx).join(",").split(ox).join(".")}function ax(e){if(!e)return[""];var n=[],r=ex("{","}",e);if(!r)return e.split(",");var a=r.pre,i=r.body,u=r.post,c=a.split(",");c[c.length-1]+="{"+i+"}";var f=ax(u);return u.length&&(c[c.length-1]+=f.shift(),c.push.apply(c,f)),n.push.apply(n,c),n}function vL(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),Fl(pL(e),!0).map(hL)):[]}function gL(e){return"{"+e+"}"}function mL(e){return/^-?0\d/.test(e)}function yL(e,n){return e<=n}function bL(e,n){return e>=n}function Fl(e,n){var r=[],a=ex("{","}",e);if(!a)return[e];var i=a.pre,u=a.post.length?Fl(a.post,!1):[""];if(/\$$/.test(a.pre))for(var c=0;c<u.length;c++){var f=i+"{"+a.body+"}"+u[c];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+X_+a.post,Fl(e)):[e];var E;if(m)E=a.body.split(/\.\./);else if(E=ax(a.body),E.length===1&&(E=Fl(E[0],!1).map(gL),E.length===1))return u.map(function(He){return a.pre+E[0]+He});var O;if(m){var R=o1(E[0]),C=o1(E[1]),k=Math.max(E[0].length,E[1].length),j=E.length==3?Math.abs(o1(E[2])):1,F=yL,D=C<R;D&&(j*=-1,F=bL);var M=E.some(mL);O=[];for(var S=R;F(S,C);S+=j){var q;if(h)q=String.fromCharCode(S),q==="\\"&&(q="");else if(q=String(S),M){var U=k-q.length;if(U>0){var V=new Array(U+1).join("0");S<0?q="-"+V+q.slice(1):q=V+q}}O.push(q)}}else{O=[];for(var Ee=0;Ee<E.length;Ee++)O.push.apply(O,Fl(E[Ee],!1))}for(var Ee=0;Ee<O.length;Ee++)for(var c=0;c<u.length;c++){var f=i+O[Ee]+u[c];(!n||m||f)&&r.push(f)}}return r}const Un=ix=(e,n,r={})=>(md(n),!r.nocomment&&n.charAt(0)==="#"?!1:new Jd(n,r).match(e));var ix=Un;const J1=lL;Un.sep=J1.sep;const go=Symbol("globstar **");Un.GLOBSTAR=go;const _L=dL,OS={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Z1="[^/]",a1=Z1+"*?",wL="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",EL="(?:(?!(?:\\/|^)\\.).)*?",sx=e=>e.split("").reduce((n,r)=>(n[r]=!0,n),{}),TS=sx("().*{}+?[]^$\\!"),SL=sx("[.("),xS=/\/+/;Un.filter=(e,n={})=>(r,a,i)=>Un(r,e,n);const Va=(e,n={})=>{const r={};return Object.keys(e).forEach(a=>r[a]=e[a]),Object.keys(n).forEach(a=>r[a]=n[a]),r};Un.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Un;const n=Un,r=(a,i,u)=>n(a,i,Va(e,u));return r.Minimatch=class extends n.Minimatch{constructor(i,u){super(i,Va(e,u))}},r.Minimatch.defaults=a=>n.defaults(Va(e,a)).Minimatch,r.filter=(a,i)=>n.filter(a,Va(e,i)),r.defaults=a=>n.defaults(Va(e,a)),r.makeRe=(a,i)=>n.makeRe(a,Va(e,i)),r.braceExpand=(a,i)=>n.braceExpand(a,Va(e,i)),r.match=(a,i,u)=>n.match(a,i,Va(e,u)),r};Un.braceExpand=(e,n)=>ux(e,n);const ux=(e,n={})=>(md(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_L(e)),OL=1024*64,md=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>OL)throw new TypeError("pattern is too long")},i1=Symbol("subparse");Un.makeRe=(e,n)=>new Jd(e,n||{}).makeRe();Un.match=(e,n,r={})=>{const a=new Jd(n,r);return e=e.filter(i=>a.match(i)),a.options.nonull&&!e.length&&e.push(n),e};const TL=e=>e.replace(/\\(.)/g,"$1"),xL=e=>e.replace(/\\([^-\]])/g,"$1"),CL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),RL=e=>e.replace(/[[\]\\]/g,"\\$&");class Jd{constructor(n,r){md(n),r||(r={}),this.options=r,this.set=[],this.pattern=n,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 n=this.pattern,r=this.options;if(!r.nocomment&&n.charAt(0)==="#"){this.comment=!0;return}if(!n){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(xS)),this.debug(this.pattern,a),a=a.map((i,u,c)=>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 n=this.pattern;let r=!1,a=0;for(let i=0;i<n.length&&n.charAt(i)==="!";i++)r=!r,a++;a&&(this.pattern=n.slice(a)),this.negate=r}matchOne(n,r,a){var i=this.options;this.debug("matchOne",{this:this,file:n,pattern:r}),this.debug("matchOne",n.length,r.length);for(var u=0,c=0,f=n.length,p=r.length;u<f&&c<p;u++,c++){this.debug("matchOne loop");var h=r[c],m=n[u];if(this.debug(r,h,m),h===!1)return!1;if(h===go){this.debug("GLOBSTAR",[r,h,m]);var b=u,E=c+1;if(E===p){for(this.debug("** at the end");u<f;u++)if(n[u]==="."||n[u]===".."||!i.dot&&n[u].charAt(0)===".")return!1;return!0}for(;b<f;){var O=n[b];if(this.debug(`
265
265
  globstar while`,n,b,r,E,O),this.matchOne(n.slice(b),r.slice(E),a))return this.debug("globstar found match!",b,f,O),!0;if(O==="."||O===".."||!i.dot&&O.charAt(0)==="."){this.debug("dot detected!",n,b,r,E);break}this.debug("globstar swallow a segment, and continue"),b++}return!!(a&&(this.debug(`
266
266
  >>> no match, partial?`,n,b,r,E),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&&c===p)return!0;if(u===f)return a;if(c===p)return u===f-1&&n[u]==="";throw new Error("wtf?")}braceExpand(){return ux(this.pattern,this.options)}parse(n,r){md(n);const a=this.options;if(n==="**")if(a.noglobstar)n="*";else return go;if(n==="")return"";let i="",u=!1,c=!1;const f=[],p=[];let h,m=!1,b=-1,E=-1,O,R,C,k=n.charAt(0)===".",j=a.dot||k;const F=()=>k?"":j?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",D=U=>U.charAt(0)==="."?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=()=>{if(h){switch(h){case"*":i+=a1,u=!0;break;case"?":i+=Z1,u=!0;break;default:i+="\\"+h;break}this.debug("clearStateChar %j %j",h,i),h=!1}};for(let U=0,V;U<n.length&&(V=n.charAt(U));U++){if(this.debug("%s %s %s %j",n,U,i,V),c){if(V==="/")return!1;TS[V]&&(i+="\\"),i+=V,c=!1;continue}switch(V){case"/":return!1;case"\\":if(m&&n.charAt(U+1)==="-"){i+=V;continue}M(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",n,U,i,V),m){this.debug(" in class"),V==="!"&&U===E+1&&(V="^"),i+=V;continue}this.debug("call clearStateChar %j",h),M(),h=V,a.noext&&M();continue;case"(":{if(m){i+="(";continue}if(!h){i+="\\(";continue}const Ee={type:h,start:U-1,reStart:i.length,open:OS[h].open,close:OS[h].close};this.debug(this.pattern," ",Ee),f.push(Ee),i+=Ee.open,Ee.start===0&&Ee.type!=="!"&&(k=!0,i+=D(n.slice(U+1))),this.debug("plType %j %j",h,i),h=!1;continue}case")":{const Ee=f[f.length-1];if(m||!Ee){i+="\\)";continue}f.pop(),M(),u=!0,R=Ee,i+=R.close,R.type==="!"&&p.push(Object.assign(R,{reEnd:i.length}));continue}case"|":{const Ee=f[f.length-1];if(m||!Ee){i+="\\|";continue}M(),i+="|",Ee.start===0&&Ee.type!=="!"&&(k=!0,i+=D(n.slice(U+1)));continue}case"[":if(M(),m){i+="\\"+V;continue}m=!0,E=U,b=i.length,i+=V;continue;case"]":if(U===E+1||!m){i+="\\"+V;continue}O=n.substring(E+1,U);try{RegExp("["+RL(xL(O))+"]"),i+=V}catch{i=i.substring(0,b)+"(?:$.)"}u=!0,m=!1;continue;default:M(),TS[V]&&!(V==="^"&&m)&&(i+="\\"),i+=V;break}}for(m&&(O=n.slice(E+1),C=this.parse(O,i1),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,(Ee,He,Be)=>(Be||(Be="\\"),He+He+Be+"|")),this.debug(`tail=%j
267
267
  %s`,U,U,R,i);const V=R.type==="*"?a1:R.type==="?"?Z1:"\\"+R.type;u=!0,i=i.slice(0,R.reStart)+V+"\\("+U}M(),c&&(i+="\\\\");const S=SL[i.charAt(0)];for(let U=p.length-1;U>-1;U--){const V=p[U],Ee=i.slice(0,V.reStart),He=i.slice(V.reStart,V.reEnd-8);let Be=i.slice(V.reEnd);const St=i.slice(V.reEnd-8,V.reEnd)+Be,me=Ee.split(")").length,Me=Ee.split("(").length-me;let at=Be;for(let Le=0;Le<Me;Le++)at=at.replace(/\)[+*?]?/,"");Be=at;const Xe=Be===""&&r!==i1?"(?:$|\\/)":"";i=Ee+He+Be+Xe+St}if(i!==""&&u&&(i="(?=.)"+i),S&&(i=F()+i),r===i1)return[i,u];if(a.nocase&&!u&&(u=n.toUpperCase()!==n.toLowerCase()),!u)return TL(n);const q=a.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",q),{_glob:n,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const n=this.set;if(!n.length)return this.regexp=!1,this.regexp;const r=this.options,a=r.noglobstar?a1:r.dot?wL:EL,i=r.nocase?"i":"";let u=n.map(c=>(c=c.map(f=>typeof f=="string"?CL(f):f===go?go:f._src).reduce((f,p)=>(f[f.length-1]===go&&p===go||f.push(p),f),[]),c.forEach((f,p)=>{f!==go||c[p-1]===go||(p===0?c.length>1?c[p+1]="(?:\\/|"+a+"\\/)?"+c[p+1]:c[p]=a:p===c.length-1?c[p-1]+="(?:\\/|"+a+")?":(c[p-1]+="(?:\\/|\\/"+a+"\\/)"+c[p+1],c[p+1]=go))}),c.filter(f=>f!==go).join("/"))).join("|");u="^(?:"+u+")$",this.negate&&(u="^(?!"+u+").*$");try{this.regexp=new RegExp(u,i)}catch{this.regexp=!1}return this.regexp}match(n,r=this.partial){if(this.debug("match",n,this.pattern),this.comment)return!1;if(this.empty)return n==="";if(n==="/"&&r)return!0;const a=this.options;J1.sep!=="/"&&(n=n.split(J1.sep).join("/")),n=n.split(xS),this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let u;for(let c=n.length-1;c>=0&&(u=n[c],!u);c--);for(let c=0;c<i.length;c++){const f=i[c];let p=n;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(n){return Un.defaults(n).Minimatch}}Un.Minimatch=Jd;const cx=Rd(ix),lx=[{pattern:Ur,editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:B_,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"}}],fx=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function dx(e){const n=e.split("/");return n.pop(),n.join("/")}function bo(e){const n=lx.find(({pattern:r})=>cx(e,r,{nocase:!0}));return n||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function px(e){const n=fx.find(({pattern:r})=>cx(e,r,{nocase:!0}));return n?n.type:"text"}var Q1=function(e,n){return Q1=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])},Q1(e,n)};function Zd(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Q1(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}function e_(e){var n=typeof Symbol=="function"&&Symbol.iterator,r=n&&e[n],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(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function yd(e,n){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var a=r.call(e),i,u=[],c;try{for(;(n===void 0||n-- >0)&&!(i=a.next()).done;)u.push(i.value)}catch(f){c={error:f}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(c)throw c.error}}return u}function bd(e,n,r){if(r||arguments.length===2)for(var a=0,i=n.length,u;a<i;a++)(u||!(a in n))&&(u||(u=Array.prototype.slice.call(n,0,a)),u[a]=n[a]);return e.concat(u||Array.prototype.slice.call(n))}function ja(e){return typeof e=="function"}function hx(e){var n=function(a){Error.call(a),a.stack=new Error().stack},r=e(n);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var s1=hx(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
268
268
  `+r.map(function(a,i){return i+1+") "+a.toString()}).join(`
269
- `):"",this.name="UnsubscriptionError",this.errors=r}});function t_(e,n){if(e){var r=e.indexOf(n);0<=r&&e.splice(r,1)}}var Qd=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,r,a,i,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=e_(c),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}else c.remove(this);var m=this.initialTeardown;if(ja(m))try{m()}catch(C){u=C instanceof s1?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var E=e_(b),O=E.next();!O.done;O=E.next()){var R=O.value;try{CS(R)}catch(C){u=u??[],C instanceof s1?u=bd(bd([],yd(u)),yd(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{O&&!O.done&&(i=E.return)&&i.call(E)}finally{if(a)throw a.error}}}if(u)throw new s1(u)}},e.prototype.add=function(n){var r;if(n&&n!==this)if(this.closed)CS(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(n)}},e.prototype._hasParent=function(n){var r=this._parentage;return r===n||Array.isArray(r)&&r.includes(n)},e.prototype._addParent=function(n){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(n),r):r?[r,n]:n},e.prototype._removeParent=function(n){var r=this._parentage;r===n?this._parentage=null:Array.isArray(r)&&t_(r,n)},e.prototype.remove=function(n){var r=this._finalizers;r&&t_(r,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),vx=Qd.EMPTY;function gx(e){return e instanceof Qd||e&&"closed"in e&&ja(e.remove)&&ja(e.add)&&ja(e.unsubscribe)}function CS(e){ja(e)?e():e.unsubscribe()}var mx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},r_={setTimeout:function(e,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var i=r_.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,bd([e,n],yd(r))):setTimeout.apply(void 0,bd([e,n],yd(r)))},clearTimeout:function(e){var n=r_.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(e)},delegate:void 0};function AL(e){r_.setTimeout(function(){throw e})}function RS(){}function Gf(e){e()}var yx=function(e){Zd(n,e);function n(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,gx(r)&&r.add(a)):a.destination=ML,a}return n.create=function(r,a,i){return new n_(r,a,i)},n.prototype.next=function(r){this.isStopped||this._next(r)},n.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(r){this.destination.next(r)},n.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Qd),PL=Function.prototype.bind;function u1(e,n){return PL.call(e,n)}var DL=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var r=this.partialObserver;if(r.next)try{r.next(n)}catch(a){Df(a)}},e.prototype.error=function(n){var r=this.partialObserver;if(r.error)try{r.error(n)}catch(a){Df(a)}else Df(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(r){Df(r)}},e}(),n_=function(e){Zd(n,e);function n(r,a,i){var u=e.call(this)||this,c;if(ja(r)||!r)c={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&mx.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},c={next:r.next&&u1(r.next,f),error:r.error&&u1(r.error,f),complete:r.complete&&u1(r.complete,f)}):c=r}return u.destination=new DL(c),u}return n}(yx);function Df(e){AL(e)}function IL(e){throw e}var ML={closed:!0,next:RS,error:IL,complete:RS},kL=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $L(e){return e}function NL(e){return e.length===0?$L:e.length===1?e[0]:function(r){return e.reduce(function(a,i){return i(a)},r)}}var AS=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var r=new e;return r.source=this,r.operator=n,r},e.prototype.subscribe=function(n,r,a){var i=this,u=LL(n)?n:new n_(n,r,a);return Gf(function(){var c=i,f=c.operator,p=c.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(r){n.error(r)}},e.prototype.forEach=function(n,r){var a=this;return r=PS(r),new r(function(i,u){var c=new n_({next:function(f){try{n(f)}catch(p){u(p),c.unsubscribe()}},error:u,complete:i});a.subscribe(c)})},e.prototype._subscribe=function(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)},e.prototype[kL]=function(){return this},e.prototype.pipe=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return NL(n)(this)},e.prototype.toPromise=function(n){var r=this;return n=PS(n),new n(function(a,i){var u;r.subscribe(function(c){return u=c},function(c){return i(c)},function(){return a(u)})})},e.create=function(n){return new e(n)},e}();function PS(e){var n;return(n=e??mx.Promise)!==null&&n!==void 0?n:Promise}function jL(e){return e&&ja(e.next)&&ja(e.error)&&ja(e.complete)}function LL(e){return e&&e instanceof yx||jL(e)&&gx(e)}var FL=hx(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bx=function(e){Zd(n,e);function n(){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 n.prototype.lift=function(r){var a=new DS(this,this);return a.operator=r,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new FL},n.prototype.next=function(r){var a=this;Gf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=e_(a.currentObservers),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(i)throw i.error}}}})},n.prototype.error=function(r){var a=this;Gf(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)}})},n.prototype.complete=function(){var r=this;Gf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},n.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},n.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,c=i.isStopped,f=i.observers;return u||c?vx:(this.currentObservers=null,f.push(r),new Qd(function(){a.currentObservers=null,t_(f,r)}))},n.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,c=a.isStopped;i?r.error(u):c&&r.complete()},n.prototype.asObservable=function(){var r=new AS;return r.source=this,r},n.create=function(r,a){return new DS(r,a)},n}(AS),DS=function(e){Zd(n,e);function n(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return n.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)},n.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)},n.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)},n.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:vx},n}(bx);const _x=new bx,WL=()=>JT(),Ua=sL,J_=pe(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),BL=pe(J_,e=>e?e.dataClasses:[]),UL=pe(J_,e=>e?e.methods:[]),wx=e=>pe(n=>n,n=>{switch(n.catalog.state){case"loaded":const r=e?n.catalog.model.dataClasses[e]:n.catalog.model;return(r==null?void 0:r.methods)||[];default:return[]}}),zL=e=>Ua(wx(e),YT),HL=(e,n)=>pe(wx(e),r=>r.find(a=>`${a.applyTo}.${a.name}`===n)),GL=(e,n,r)=>Ua(HL(e,`${r}.${n}`),YT),Ex=pe(e=>e,e=>e),qL=e=>pe(za,n=>{var i;const r=n.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]}))}),Sx=e=>pe(za,n=>{var a,i;const r=n.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)||[]}),VL=(e,n,r)=>pe(Ex,a=>{var i,u;if(n){const c=a.sharedDatasources.sources[n];return c?c.find(f=>f.id===e):void 0}else{const c=a.root.tabs.find(p=>p.path===r);return c?(u=(i=c.content.metadata)==null?void 0:i.datasources)==null?void 0:u.find(p=>p.id===e):void 0}}),Ox=pe(e=>e,e=>{var n;return((n=e.sharedDatasources)==null?void 0:n.sources)||[]}),YL=(e,n,r,a)=>pe(Sx(e),Ox,(i,u)=>{const c=Bt.flatten(Bt.values(u)),f=[...n!=="private"?i:[],...n!=="shared"?c:[]];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}),KL=pe(e=>e.debugger,e=>e.meta),Is=pe(e=>e.debugger,e=>e.list),En=pe(e=>e.debugger,e=>e.sessions),XL=pe(En,e=>e.length),Ps=(e,n,r,a)=>e.find(i=>i.filePath===n&&i.methodName===r&&(!a||i.className===a)),dr=(e,n)=>e.find(r=>r.threadId===n),Tx=(e,n)=>e.find(r=>r.tabPath===n),JL=(e,n)=>pe(Is,r=>{var a;return((a=Ps(r,e,n))==null?void 0:a.breakpoints.saved.locations)||[]}),ZL=(e,n)=>pe(Is,r=>{var a;return((a=Ps(r,e,n))==null?void 0:a.breakpoints.draft.locations)||[]}),QL=e=>pe(Is,n=>n.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)),e3=e=>pe(Is,n=>n.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)),t3=e=>pe(En,n=>{const r=dr(n,e);return r!=null&&r.stopped?r.highlightedLines:null}),r3=e=>pe(En,n=>{const r=dr(n,e);return r!=null&&r.stopped?r.activeLine:null}),n3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.expressions)||[]}),o3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.stopped)||!1}),a3=(e,n)=>pe(Is,r=>{var a;return(a=Ps(r,e,n))==null?void 0:a.source}),i3=e=>pe(En,n=>{var r;return((r=Tx(n,e))==null?void 0:r.threadId)||-1}),s3=e=>pe(En,n=>{var r,a;return(a=(r=dr(n,e))==null?void 0:r.currentStackFrame)==null?void 0:a.source}),u3=e=>pe(En,n=>{var r;return(r=dr(n,e))==null?void 0:r.currentStackFrame}),c3=pe(En,e=>e.map(({channelId:n,threadId:r})=>({id:n,threadId:r}))),l3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.stackFrames)||[]}),f3=e=>pe(En,n=>{var r,a;return((a=(r=dr(n,e))==null?void 0:r.variables)==null?void 0:a.callchain)||[]}),d3=e=>pe(En,n=>{var r,a;return((a=(r=dr(n,e))==null?void 0:r.variables)==null?void 0:a.expressions)||[]}),p3=(e,n="saved")=>pe(Is,r=>{const a=r.find(i=>i.filePath===e);return(a==null?void 0:a.breakpoints[n].offset)||0}),h3=(e,n,r,a)=>pe(En,i=>{var h;const u=((h=dr(i,e))==null?void 0:h.exceptions)||[],c=n===le.CLASS,f=c&&a?`${a}.${r}`:r;return(f?u.filter(m=>m.location===f):u).map(m=>({...m,locationLine:c?m.locationLine:m.locationLine+1}))}),za=pe(e=>e.root,e=>e),cu=pe(za,e=>e.tabs),v3=pe(za,e=>e.activeTab),g3=pe(za,e=>e.recent.filter(({type:n})=>n!==le.DEBUGGER)),m3=pe(za,({tabs:e,activeTab:n})=>e.find(({path:r})=>r===n)),y3=pe(za,({tabs:e})=>e.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null)),b3=pe(cu,e=>e.filter(({type:n,flags:r})=>n===le.WEBFORM&&r.enabled===!1).map(({path:n})=>n)),_3=pe(cu,e=>e.length>0),gf=e=>pe(za,n=>n.tabs.find(({path:r})=>r===e)),xx=(e,n="")=>pe(gf(e),r=>!r||!r.content||typeof r.content=="string"?r==null?void 0:r.content:Bt.get(r.content,n)),w3=e=>pe(gf(e),n=>n==null?void 0:n.extra),E3=(e,n=r=>r)=>pe(xx(e,"components"),r=>n(r||{})),Z_=pe(cu,e=>e.filter(n=>n.flags.touched)),S3=pe(Z_,e=>e.length),O3=pe(En,e=>e.map(({threadId:n,currentStackFrame:{source:r},tabPath:a})=>({name:WT(n,r),path:a,type:le.DEBUGGER,content:r==null?void 0:r.content,flags:{},extra:{source:r}}))),T3=pe(e=>e,e=>e.explorer||[]),Cx=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.WEBFORMS)),Rx=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.METHODS)),Ax=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.CLASSES)),x3=pe(Rx,e=>(e==null?void 0:e.children)||[]),C3=pe(Cx,e=>(e==null?void 0:e.children)||[]),R3=pe(Ax,e=>(e==null?void 0:e.children)||[]),A3=pe(e=>e.modals,e=>e.list),P3=pe(e=>e.roles,({roles:e})=>e),D3=pe(e=>e.roles,({privileges:e})=>e),I3=pe(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:n})=>n==="guest")),M3=pe(e=>e.roles,({flags:e})=>e),k3=pe(e=>e.roles,({selectedTab:e})=>e),$3=pe(e=>e.roles,({date:e})=>e),Px=pe(e=>e.settings,e=>e.session),N3=pe(e=>e.settings,e=>e.project),j3=pe(e=>e.settings,e=>e),Q_=pe(e=>e.settings,e=>e.server),L3=pe(Q_,e=>e.remoteDebuggerMode),F3=pe(Q_,e=>e.qodly),W3=pe(Px,e=>e["monaco.zoom"]),Dx=["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"],Ix=Dx.map(e=>({id:y_(),content:"",name:e,parentId:null,scope:As.THEME})),ew=e=>pe(gf(e),n=>{var r,a;return((a=(r=n==null?void 0:n.content)==null?void 0:r.metadata)==null?void 0:a.styles)||[]}),B3=(e,n)=>pe(ew(e),r=>n.map(a=>{switch(!0){case a===As.LOCAL:return r.map(i=>({...i,scope:As.LOCAL}));case a===As.THEME:return Ix;default:return[]}}).flat()),U3=e=>pe(ew(e),n=>[...n.map(r=>({...r,scope:As.LOCAL})),...Ix]),z3=pe(e=>e,e=>{var n;return[...(((n=e.sharedCSS)==null?void 0:n.styles)||[]).map(r=>({...r,scope:As.SHARED}))]}),H3=e=>pe(gf(e),n=>n==null?void 0:n.flags),mf=pe(e=>e.webforms,e=>e),Mx=pe(mf,e=>(e==null?void 0:e.components)||[]),ep=pe(mf,e=>e.inspector),G3=pe(ep,e=>e.css),q3=pe(ep,e=>e.datasource),kx=pe(mf,e=>e.templates||{data:[]}),V3=pe(kx,e=>e.data||[]),Y3=e=>pe(Mx,n=>n.find(r=>r.id===e)),K3=e=>pe(ep,n=>n[e]),X3=pe(mf,e=>e.datasources.theme),J3=pe(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,n,r)=>[e.state,n.state,r.state].every(a=>["loaded","error"].includes(a)));var tw=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(tw||{}),$x=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))($x||{});const Nx={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 If,Z3=new Uint8Array(16);function jx(){if(!If&&(If=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!If))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return If(Z3)}const Q3=/^(?:[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 tp(e){return typeof e=="string"&&Q3.test(e)}var Fr=[];for(var c1=0;c1<256;++c1)Fr.push((c1+256).toString(16).substr(1));function rp(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Fr[e[n+0]]+Fr[e[n+1]]+Fr[e[n+2]]+Fr[e[n+3]]+"-"+Fr[e[n+4]]+Fr[e[n+5]]+"-"+Fr[e[n+6]]+Fr[e[n+7]]+"-"+Fr[e[n+8]]+Fr[e[n+9]]+"-"+Fr[e[n+10]]+Fr[e[n+11]]+Fr[e[n+12]]+Fr[e[n+13]]+Fr[e[n+14]]+Fr[e[n+15]]).toLowerCase();if(!tp(r))throw TypeError("Stringified UUID is invalid");return r}var IS,l1,f1=0,d1=0;function e4(e,n,r){var a=n&&r||0,i=n||new Array(16);e=e||{};var u=e.node||IS,c=e.clockseq!==void 0?e.clockseq:l1;if(u==null||c==null){var f=e.random||(e.rng||jx)();u==null&&(u=IS=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),c==null&&(c=l1=(f[6]<<8|f[7])&16383)}var p=e.msecs!==void 0?e.msecs:Date.now(),h=e.nsecs!==void 0?e.nsecs:d1+1,m=p-f1+(h-d1)/1e4;if(m<0&&e.clockseq===void 0&&(c=c+1&16383),(m<0||p>f1)&&e.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f1=p,d1=h,l1=c,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 E=p/4294967296*1e4&268435455;i[a++]=E>>>8&255,i[a++]=E&255,i[a++]=E>>>24&15|16,i[a++]=E>>>16&255,i[a++]=c>>>8|128,i[a++]=c&255;for(var O=0;O<6;++O)i[a+O]=u[O];return n||rp(i)}function Lx(e){if(!tp(e))throw TypeError("Invalid UUID");var n,r=new Uint8Array(16);return r[0]=(n=parseInt(e.slice(0,8),16))>>>24,r[1]=n>>>16&255,r[2]=n>>>8&255,r[3]=n&255,r[4]=(n=parseInt(e.slice(9,13),16))>>>8,r[5]=n&255,r[6]=(n=parseInt(e.slice(14,18),16))>>>8,r[7]=n&255,r[8]=(n=parseInt(e.slice(19,23),16))>>>8,r[9]=n&255,r[10]=(n=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=n/4294967296&255,r[12]=n>>>24&255,r[13]=n>>>16&255,r[14]=n>>>8&255,r[15]=n&255,r}function t4(e){e=unescape(encodeURIComponent(e));for(var n=[],r=0;r<e.length;++r)n.push(e.charCodeAt(r));return n}var r4="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n4="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Fx(e,n,r){function a(i,u,c,f){if(typeof i=="string"&&(i=t4(i)),typeof u=="string"&&(u=Lx(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|n,p[8]=p[8]&63|128,c){f=f||0;for(var h=0;h<16;++h)c[f+h]=p[h];return c}return rp(p)}try{a.name=e}catch{}return a.DNS=r4,a.URL=n4,a}function o4(e){if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=new Uint8Array(n.length);for(var r=0;r<n.length;++r)e[r]=n.charCodeAt(r)}return a4(i4(s4(e),e.length*8))}function a4(e){for(var n=[],r=e.length*32,a="0123456789abcdef",i=0;i<r;i+=8){var u=e[i>>5]>>>i%32&255,c=parseInt(a.charAt(u>>>4&15)+a.charAt(u&15),16);n.push(c)}return n}function Wx(e){return(e+64>>>9<<4)+14+1}function i4(e,n){e[n>>5]|=128<<n%32,e[Wx(n)-1]=n;for(var r=1732584193,a=-271733879,i=-1732584194,u=271733878,c=0;c<e.length;c+=16){var f=r,p=a,h=i,m=u;r=Vr(r,a,i,u,e[c],7,-680876936),u=Vr(u,r,a,i,e[c+1],12,-389564586),i=Vr(i,u,r,a,e[c+2],17,606105819),a=Vr(a,i,u,r,e[c+3],22,-1044525330),r=Vr(r,a,i,u,e[c+4],7,-176418897),u=Vr(u,r,a,i,e[c+5],12,1200080426),i=Vr(i,u,r,a,e[c+6],17,-1473231341),a=Vr(a,i,u,r,e[c+7],22,-45705983),r=Vr(r,a,i,u,e[c+8],7,1770035416),u=Vr(u,r,a,i,e[c+9],12,-1958414417),i=Vr(i,u,r,a,e[c+10],17,-42063),a=Vr(a,i,u,r,e[c+11],22,-1990404162),r=Vr(r,a,i,u,e[c+12],7,1804603682),u=Vr(u,r,a,i,e[c+13],12,-40341101),i=Vr(i,u,r,a,e[c+14],17,-1502002290),a=Vr(a,i,u,r,e[c+15],22,1236535329),r=Yr(r,a,i,u,e[c+1],5,-165796510),u=Yr(u,r,a,i,e[c+6],9,-1069501632),i=Yr(i,u,r,a,e[c+11],14,643717713),a=Yr(a,i,u,r,e[c],20,-373897302),r=Yr(r,a,i,u,e[c+5],5,-701558691),u=Yr(u,r,a,i,e[c+10],9,38016083),i=Yr(i,u,r,a,e[c+15],14,-660478335),a=Yr(a,i,u,r,e[c+4],20,-405537848),r=Yr(r,a,i,u,e[c+9],5,568446438),u=Yr(u,r,a,i,e[c+14],9,-1019803690),i=Yr(i,u,r,a,e[c+3],14,-187363961),a=Yr(a,i,u,r,e[c+8],20,1163531501),r=Yr(r,a,i,u,e[c+13],5,-1444681467),u=Yr(u,r,a,i,e[c+2],9,-51403784),i=Yr(i,u,r,a,e[c+7],14,1735328473),a=Yr(a,i,u,r,e[c+12],20,-1926607734),r=Kr(r,a,i,u,e[c+5],4,-378558),u=Kr(u,r,a,i,e[c+8],11,-2022574463),i=Kr(i,u,r,a,e[c+11],16,1839030562),a=Kr(a,i,u,r,e[c+14],23,-35309556),r=Kr(r,a,i,u,e[c+1],4,-1530992060),u=Kr(u,r,a,i,e[c+4],11,1272893353),i=Kr(i,u,r,a,e[c+7],16,-155497632),a=Kr(a,i,u,r,e[c+10],23,-1094730640),r=Kr(r,a,i,u,e[c+13],4,681279174),u=Kr(u,r,a,i,e[c],11,-358537222),i=Kr(i,u,r,a,e[c+3],16,-722521979),a=Kr(a,i,u,r,e[c+6],23,76029189),r=Kr(r,a,i,u,e[c+9],4,-640364487),u=Kr(u,r,a,i,e[c+12],11,-421815835),i=Kr(i,u,r,a,e[c+15],16,530742520),a=Kr(a,i,u,r,e[c+2],23,-995338651),r=Xr(r,a,i,u,e[c],6,-198630844),u=Xr(u,r,a,i,e[c+7],10,1126891415),i=Xr(i,u,r,a,e[c+14],15,-1416354905),a=Xr(a,i,u,r,e[c+5],21,-57434055),r=Xr(r,a,i,u,e[c+12],6,1700485571),u=Xr(u,r,a,i,e[c+3],10,-1894986606),i=Xr(i,u,r,a,e[c+10],15,-1051523),a=Xr(a,i,u,r,e[c+1],21,-2054922799),r=Xr(r,a,i,u,e[c+8],6,1873313359),u=Xr(u,r,a,i,e[c+15],10,-30611744),i=Xr(i,u,r,a,e[c+6],15,-1560198380),a=Xr(a,i,u,r,e[c+13],21,1309151649),r=Xr(r,a,i,u,e[c+4],6,-145523070),u=Xr(u,r,a,i,e[c+11],10,-1120210379),i=Xr(i,u,r,a,e[c+2],15,718787259),a=Xr(a,i,u,r,e[c+9],21,-343485551),r=Ja(r,f),a=Ja(a,p),i=Ja(i,h),u=Ja(u,m)}return[r,a,i,u]}function s4(e){if(e.length===0)return[];for(var n=e.length*8,r=new Uint32Array(Wx(n)),a=0;a<n;a+=8)r[a>>5]|=(e[a/8]&255)<<a%32;return r}function Ja(e,n){var r=(e&65535)+(n&65535),a=(e>>16)+(n>>16)+(r>>16);return a<<16|r&65535}function u4(e,n){return e<<n|e>>>32-n}function np(e,n,r,a,i,u){return Ja(u4(Ja(Ja(n,e),Ja(a,u)),i),r)}function Vr(e,n,r,a,i,u,c){return np(n&r|~n&a,e,n,i,u,c)}function Yr(e,n,r,a,i,u,c){return np(n&a|r&~a,e,n,i,u,c)}function Kr(e,n,r,a,i,u,c){return np(n^r^a,e,n,i,u,c)}function Xr(e,n,r,a,i,u,c){return np(r^(n|~a),e,n,i,u,c)}var c4=Fx("v3",48,o4);const l4=c4;function f4(e,n,r){e=e||{};var a=e.random||(e.rng||jx)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){r=r||0;for(var i=0;i<16;++i)n[r+i]=a[i];return n}return rp(a)}function d4(e,n,r,a){switch(e){case 0:return n&r^~n&a;case 1:return n^r^a;case 2:return n&r^n&a^r&a;case 3:return n^r^a}}function p1(e,n){return e<<n|e>>>32-n}function p4(e){var n=[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,c=Math.ceil(u/16),f=new Array(c),p=0;p<c;++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[c-1][14]=(e.length-1)*8/Math.pow(2,32),f[c-1][14]=Math.floor(f[c-1][14]),f[c-1][15]=(e.length-1)*8&4294967295;for(var b=0;b<c;++b){for(var E=new Uint32Array(80),O=0;O<16;++O)E[O]=f[b][O];for(var R=16;R<80;++R)E[R]=p1(E[R-3]^E[R-8]^E[R-14]^E[R-16],1);for(var C=r[0],k=r[1],j=r[2],F=r[3],D=r[4],M=0;M<80;++M){var S=Math.floor(M/20),q=p1(C,5)+d4(S,k,j,F)+D+n[S]+E[M]>>>0;D=F,F=j,j=p1(k,30)>>>0,k=C,C=q}r[0]=r[0]+C>>>0,r[1]=r[1]+k>>>0,r[2]=r[2]+j>>>0,r[3]=r[3]+F>>>0,r[4]=r[4]+D>>>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 h4=Fx("v5",80,p4);const v4=h4,g4="00000000-0000-0000-0000-000000000000";function m4(e){if(!tp(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const y4=Object.freeze(Object.defineProperty({__proto__:null,NIL:g4,parse:Lx,stringify:rp,v1:e4,v3:l4,v4:f4,v5:v4,validate:tp,version:m4},Symbol.toStringTag,{value:"Module"})),b4=cA(y4);function rw(e,n){if(!e||!n||!e.length||!n.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=n}rw.prototype.convert=function(e){var n,r,a,i={},u=this.srcAlphabet.length,c=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(n=0;n<f;n++)i[n]=this.srcAlphabet.indexOf(e[n]);do{for(r=0,a=0,n=0;n<f;n++)r=r*u+i[n],r>=c?(i[a++]=parseInt(r/c,10),r=r%c):a>0&&(i[a++]=0);f=a,p=this.dstAlphabet.slice(r,r+1).concat(p)}while(a!==0);return p};rw.prototype.isValid=function(e){for(var n=0;n<e.length;++n)if(this.srcAlphabet.indexOf(e[n])===-1)return!1;return!0};var _4=rw,w4=_4;function yf(e,n){var r=new w4(e,n);return function(a){return r.convert(a)}}yf.BIN="01";yf.OCT="01234567";yf.DEC="0123456789";yf.HEX="0123456789abcdef";var E4=yf;const{v4:h1}=b4,Mf=E4,v1="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",S4="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",O4={consistentLength:!0};let g1;const MS=(e,n,r)=>{const a=n(e.toLowerCase().replace(/-/g,""));return!r||!r.consistentLength?a:a.padStart(r.shortIdLength,r.paddingChar)},T4=(e,n)=>{const a=n(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("-")},x4=e=>Math.ceil(Math.log(2**128)/Math.log(e));var _d=(()=>{const e=(n,r)=>{const a=n||v1,i={...O4,...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=x4(a.length),c={shortIdLength:u,consistentLength:i.consistentLength,paddingChar:a[0]},f=Mf(Mf.HEX,a),p=Mf(a,Mf.HEX),h=()=>MS(h1(),f,c),m={new:h,generate:h,uuid:h1,fromUUID:b=>MS(b,f,c),toUUID:b=>T4(b,p),alphabet:a,maxLength:u};return Object.freeze(m),m};return e.constants={flickrBase58:v1,cookieBase90:S4},e.uuid=h1,e.generate=()=>(g1||(g1=e(v1).generate),g1()),e})(),gt=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(gt||{});const C4=[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE,gt.METHOD],wd="guest",nw=[{key:"read",label:"Read",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE,gt.METHOD]},{key:"execute",label:"Execute",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.METHOD]},{key:"promote",label:"Promote",canApplyTo:[gt.METHOD]}];function Gn(e,...n){return Array.from(new Set([...e,...n]))}function Bx(e){const n={},r=new Map;e.forEach(p=>{const h=p.id||_d.generate();n[h]={...p,id:h,parents:[],includes:Gn(p.includes||[]),resources:[]},r.set(p.privilege,h)}),Object.entries(n).forEach(([p,h])=>{const m=h.includes.map(b=>{const E=r.get(b);return E?(n[E].parents=Gn(n[E].parents,E),E):""}).filter(Boolean);n[p]={...h,includes:m}});const a=Ux(n),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=>n[h].parents.push(p.id))}),Object.values(n).find(({privilege:p})=>p===wd))return n;const f=_d.generate();return{[f]:{id:f,privilege:wd,includes:[],parents:[],resources:[]},...n}}function Ux(e){return Object.values(e).sort((n,r)=>n.parents.length-r.parents.length)}function op(e,n){const r=n[e];let a=[];return r&&r.parents.forEach(i=>{a=Gn(a,...op(i,n),i)}),a}function Ed(e,n){const r=n[e];let a=[];return r&&r.includes.forEach(i=>{a=Gn(a,...Ed(i,n),i)}),a}function R4(e,n){const r=n[e];if(!r)return[];const a=[e,...op(e,n),...r.includes];return Object.keys(n).filter(i=>!a.includes(i))}function A4(e,n){return n[e]?Object.keys(n).reduce((a,i)=>i===e?a:{...a,[i]:{...n[i],parents:n[i].parents.filter(u=>u!==e),includes:n[i].includes.filter(u=>u!==e)}},{}):n}function P4(e,n,r){const a=r[e],i=r[n];return!a||!i?r:{...r,[e]:{...r[e],includes:Gn(a.includes,n)},[n]:{...r[n],parents:Gn(i.parents,e)}}}function D4(e,n,r){const a=r[e],i=r[n];return!a||!i?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(u=>u!==n)},[n]:{...r[n],parents:r[n].parents.filter(u=>u!==e)}}}function zx(e,n){vT(e),Object.entries(n).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=_d.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...n}}function I4(e,n,r,a,i){let u=zx(e,i);const c=Object.entries(u).find(([,f])=>f.privilege===e);return c?(u=Vx(c[1].id,n,r,a,u),u):i}function M4(e,n,r){if(!e)throw new Error("Please enter a name");if(!r[n])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:a,id:i}])=>{if(e.toLowerCase()===a.toLowerCase()&&n!==i)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[n]:{...r[n],privilege:e}}}function k4(e,n){return e.map(r=>Ha(r,n))}function Ha(e,n){return n[e]?n[e]:null}function Hx({applyTo:e,type:n,...r}){return Object.entries(r).reduce((a,[i,u])=>{const c=Bt.find(nw,["key",i]);return!c||!c.canApplyTo.includes(n)||(typeof u=="string"?u.split(","):u).forEach(p=>{a[p]=Gn(a[p]||[],i)}),a},{})}const o_=(e,n=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${n?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${n?"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 ${n?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function ow(e){return{permissions:nw.filter(({canApplyTo:n})=>n.includes(e.type)).map(({key:n,label:r})=>{const a={name:n,from:[]};switch(e.type){case gt.DATASTORE:return{...a,info:o_(r,!0)};case gt.DATACLASS:return{...a,info:o_(r)};default:return a}}),resource:e.applyTo,type:e.type}}function Gx(e,n){const r=qx(n),a={};return e.filter(({type:i})=>C4.includes(i)).forEach(i=>{const u=Hx(i);Object.entries(u).forEach(([c,f])=>{var m;const p=(m=r[c])==null?void 0:m.id;if(!p)return;a[p]=a[p]||{...n[p]};let h=Bt.find(a[p].resources,{resource:i.applyTo,type:i.type});h||(h=ow(i),a[p].resources.push(h)),h.permissions=h.permissions.map(b=>({...b,checked:b.checked||f.includes(b.name)}))})}),{...n,...a}}function qx(e){return Object.values(e).reduce((n,r)=>({...n,[r.privilege]:r}),{})}function ap(e){var r;const n=Bx(e.privileges||[]);return{privileges:Gx(((r=e.permissions)==null?void 0:r.allowed)||[],n),roles:(e.roles||[]).map(({id:a=_d.generate(),role:i,privileges:u=[]})=>({id:a,role:i,privileges:Gn(u).map(c=>{var f;return(f=Object.values(n).find(({privilege:p})=>p===c))==null?void 0:f.id}).filter(Boolean)})).reduce((a,i)=>({...a,[i.id]:{...i}}),{})}}function aw(e){const n=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),r=[...n,...n.map(a=>op(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:c,type:f})=>{let p=Bt.find(a,{applyTo:c,type:f});p||(p={applyTo:c,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!==wd).map(({id:a,includes:i,privilege:u})=>({id:a,privilege:u,includes:i.map(c=>e.privileges[c].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 $4(e,n){const r=n[e],a={children:[],links:[],parents:[],selected:e};if(!r)return a;function i(f,p,h=[]){const m=f.reduce((b,E)=>[...b,...n[E][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(E=>p.includes(E)?!1:(p.push(E),!0));b.length>0&&h.unshift(Gn(b))}return h}function c(f,p){const h=[];return f.reduce((m,b)=>(b.forEach(E=>{n[E][p==="parents"?"includes":"parents"].forEach(R=>{h.includes(R)&&m.push(p==="parents"?{source:E,target:R}:{source:R,target:E})}),h.push(E)}),m),[])}return a.children=i([e],"includes"),a.children=u(a.children),a.parents=i([e],"parents"),a.parents=u(a.parents),a.links=[...c([[e],...a.parents],"parents"),...c([[e],...a.children],"includes")],a}function N4(e,n,r){const a=Ha(e,r);if(!a||Bt.find(a.resources,{resource:n.applyTo,type:n.type}))return r;const i={...a,resources:[...a.resources,ow(n)]};return{...r,[e]:i}}function j4(e,n,r){const a=Ha(e,r);if(!a)return r;const i={...a,resources:a.resources.filter(({resource:u,type:c})=>u!==n.applyTo||c!==n.type)};return{...r,[e]:i}}function L4(e,n){const r=Ha(e,n);if(!r)return n;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{...n,[e]:a}}function Vx(e,n,r,a,i){const u=Ha(e,i);if(!u)return i;const f=Bt.find(u.resources,{type:r,resource:n})?{...u,resources:u.resources.map(p=>p.type===r&&p.resource===n?{...p,permissions:p.permissions.map(h=>h.name===a?{...h,checked:!h.checked,from:[]}:h)}:p)}:{...u,resources:[...u.resources,{type:r,resource:n,permissions:nw.filter(p=>p.canApplyTo.includes(r)).map(p=>({from:[],name:p.key,checked:p.key===a,info:o_(p.key,r===gt.DATASTORE)}))}]};return{...i,[e]:f}}function F4(e,n,r,a){const i=Ha(e,a);if(!i)return a;const c=Bt.find(i.resources,{type:n.type,resource:n.resource})?{...i,resources:i.resources.map(f=>f.type===n.type&&f.resource===n.resource?{...f,permissions:n.permissions.map(p=>p.name===r.name?{...p,checked:!p.checked,from:[]}:p)}:f)}:{...i,resources:[...i.resources,{...n,permissions:n.permissions.map(f=>({...f,checked:r.name===f.name,from:[]}))}]};return{...a,[e]:c}}function W4(e,n){var p;const r=Yx(e,n)||[],a=((p=Ha(e,n))==null?void 0:p.resources)||[],c=([...r,...a].filter(({type:h})=>h===gt.METHOD)||[]).map(({resource:h})=>h);return Object.entries(n).reduce((h,[m,{resources:b}])=>(b.filter(({resource:E,type:O})=>O===gt.METHOD&&c.includes(E)).forEach(({permissions:E,resource:O})=>{var C;((C=E.find(({name:k})=>k==="promote"))==null?void 0:C.checked)&&(h[O]=Gn(h[O]||[],m))}),h),{})}function Yx(e,n){var c;const r=Ha(e,n);if(!r)return[];const a=(c=Object.values(n).find(f=>f.privilege===wd))==null?void 0:c.id;return(a&&a!==e?Gn(Ed(e,n),a):Ed(e,n)).reduce((f,p)=>(n[p].resources.forEach(m=>{if(m.permissions.filter(({checked:O})=>O).length===0)return;const E=Bt.find(f,{type:m.type,resource:m.resource});if(!E){f.push({...m,permissions:m.permissions.map(O=>({...O,from:O.checked?[p]:[],checked:!1}))});return}E.permissions=E.permissions.map((O,R)=>{let{from:C=[]}=O;return m.permissions[R].checked&&!C.includes(p)&&(C=[...C,p]),{...O,from:C,checked:O.checked}})}),f),Bt.clone(r.resources.map(f=>({...f,permissions:f.permissions.map(({checked:p,...h})=>({...h,checked:!!p}))}))))}const B4=e=>e.reduce((n,r)=>({...n,[r.id]:{...r}}),{}),U4=(e,n)=>n[e]?Object.values(n).reduce((r,a)=>e===a.id||a.role===""?r:{...r,[a.id]:a},{}):n,z4=(e,n,r)=>r[e]?Object.values(r).reduce((a,i)=>e===i.id?{...a,[i.id]:{...i,name:n}}:{...a,[i.id]:i},{}):r,H4=(e,n)=>{const r={id:e,role:"",privileges:[]};return{...n,[r.id]:r}},G4=(e,n)=>{if(vT(e.role),Object.values(n).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(n).reduce((a,i)=>e.id===i.id?{...a,[e.id]:e}:{...a,[i.id]:i},{})},q4={list:[]},kS=(e,n)=>e.list.filter(r=>r.id!==n),Kx=qn({name:"modals",initialState:q4,reducers:{createModal:(e,n)=>{e.list.push(n.payload)},editModal:(e,n)=>{const{id:r,...a}=n.payload,i=e.list.find(QM(r));i&&Object.assign(i,{...a})},removeModal:(e,n)=>{const r=n.payload;e.list=kS(e,r)},closeModal:(e,n)=>{const{id:r,reason:a}=n.payload;if(a){const i=e.list.find(u=>u.id===r);i&&(i.closeReason=a,i.isOpen=!1)}else e.list=kS(e,r)}}}),{createModal:Xx,removeModal:Jx,closeModal:V4,editModal:Y4}=Kx.actions;var Zx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$S=ie.createContext&&ie.createContext(Zx),ei=globalThis&&globalThis.__assign||function(){return ei=Object.assign||function(e){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ei.apply(this,arguments)},K4=globalThis&&globalThis.__rest||function(e,n){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.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++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};function Qx(e){return e&&e.map(function(n,r){return ie.createElement(n.tag,ei({key:r},n.attr),Qx(n.child))})}function ip(e){return function(n){return ie.createElement(X4,ei({attr:ei({},e.attr)},n),Qx(e.child))}}function X4(e){var n=function(r){var a=e.attr,i=e.size,u=e.title,c=K4(e,["attr","size","title"]),f=i||r.size||"1em",p;return r.className&&(p=r.className),e.className&&(p=(p?p+" ":"")+e.className),ie.createElement("svg",ei({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:p,style:ei(ei({color:e.color||r.color},r.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&ie.createElement("title",null,u),e.children)};return $S!==void 0?ie.createElement($S.Consumer,null,function(r){return n(r)}):n(Zx)}function J4(e){return ip({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 Z4(e){return ip({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 Q4(e){return ip({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 e6(e){return ip({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 t6={FaSave:J4,AiFillWarning:e6,BiErrorCircle:Q4,BsFillInfoCircleFill:Z4};var Hn=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(Hn||{}),Ga=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(Ga||{}),iw=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(iw||{});const Eo=xe("modals/open",async(e,{dispatch:n})=>{const{type:r=Hn.ALERT}=e,a=y_();switch(n(Xx({id:a,type:r,isOpen:!0,...e})),r){case Hn.CONFIRM:return new Promise(i=>{const u=Ds.subscribe(()=>{var p;const{modals:c}=Ds.getState(),f=c.list.find(h=>h.id===a);if(f&&!f.isOpen){const h=f.closeReason===iw.CONFIRMED,m=Bt.entries((p=f.views)==null?void 0:p.toggles).reduce((b,E)=>({...b,[E[0]]:E[1].value}),{});n(Jx(a)),u(),i({confirmed:h,options:m})}})});default:return{}}}),eC=()=>hk({name:Ur}),tC="Roles & Privileges",Sd=xe("roles/fetchRoles",async(e,{dispatch:n,rejectWithValue:r})=>{var u;let a;try{a=await eC()}catch(c){if(!Array.isArray((u=c==null?void 0:c.data)==null?void 0:u.__ERROR))return r("Error while loading the roles");a={name:Ur,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const i={name:tC,type:le.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:Ur,flags:{},content:{}};return n(wn(i)),{...a,content:ap(a.content)}}),rC=xe("roles/fetchRolesChanges",async(e,{getState:n})=>{const{tabs:r}=n().root;if(r.find(i=>i.path===Ur)){const{date:i}=n().roles;if(i&&await sw(i))return{old:!0}}return{}}),sw=async e=>{if(!e)return!1;try{const n=await eC();if(n.date){const r=new Date(e),a=new Date(n.date);if(r>a)return!0}}catch(n){if(!Array.isArray(n==null?void 0:n.data.__ERROR))throw n}return!1},a_=xe("roles/saveRoles",async(e,{getState:n,rejectWithValue:r,dispatch:a})=>{try{const{flags:i,date:u}=n().roles;if(i.old||await sw(u)){const{confirmed:p}=await a(Eo({title:tC,message:"New content has been found on the server. Are you sure you want to continue?",type:Hn.CONFIRM,icon:"FaSave"})).unwrap();if(!p)return r({old:!0})}return await Gd({name:Ur,content:aw(e)})}catch{return r("Error while loading the roles")}}),r6=nu().roles,{roles:n6={},privileges:o6={},flags:a6={touched:!1},date:i6,selectedTab:s6="roles"}=r6||{},u6={flags:a6,roles:n6,privileges:o6,date:i6,selectedTab:s6},nC=qn({name:"roles",initialState:u6,reducers:{updatePrivileges:(e,n)=>{e.privileges=n.payload,e.flags.touched=!0},updateRoles:(e,n)=>{e.roles=n.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,n)=>{e.roles=n.payload.roles,e.privileges=n.payload.privileges},toggleTab:(e,n)=>{e.selectedTab=n.payload},setRolesContent(e,n){const{content:r,date:a}=n.payload,i=ap(r);return{...e,...i,date:a}}},extraReducers(e){e.addCase(Sd.fulfilled,(n,r)=>{const{content:a,date:i}=r.payload;n={...n,...a,date:i}}).addCase(Sd.rejected,n=>({...n,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(a_.fulfilled,(n,r)=>({...n,flags:{...n.flags,touched:!1,old:!1},date:r.payload.date})).addCase(a_.rejected,(n,r)=>FT.isString(r.payload)?n:{...n,flags:{...n.flags,...r.payload}}).addCase(rC.fulfilled,(n,r)=>({...n,flags:{...n.flags,...r.payload}})).addCase(Ys.fulfilled,(n,r)=>{!r.payload||r.payload.path!==Ur||(n.flags.touched=!1,n.flags.old=!1)}).addCase(hw.fulfilled,(n,r)=>{r.meta.arg!==Ur||!r.payload||(n.flags.touched=!1,n.flags.old=!1)})}}),{updatePrivileges:oC,updateRoles:aC,setRolesContent:uw,toggleTab:c6,updateRolesAndPrivileges:cw}=nC.actions,l6=nC.reducer,oi="qodlyApp.json",lw=xe("settings/fetch",async()=>await ni({verb:Zt.GET_INFO,path:oi,content:!0,as:"json"})),iC=xe("settings/app",uk),f6=IT(),NS={session:{"studio.tips":!0,"studio.notifications":!0,"webforms.tooltip.behavior":tw.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:W_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},d6={...NS,session:{...NS.session,...f6},welcometour:{}},sC=qn({name:"settings",initialState:d6,reducers:{setSetting(e,n){const{path:r,settingsKey:a,value:i}=n.payload;e[r][a]=i},setSettings(e,n){const{path:r,value:a}=n.payload;e[r]={...e[r],...a}},setSettingsAsText(e,n){const{path:r,settings:a}=n.payload;e[r]=a}},extraReducers(e){e.addCase(lw.fulfilled,(n,r)=>{n.project={...n.project,...r.payload.content}}),e.addCase(iC.fulfilled,(n,r)=>{n.server=r.payload,n.server.qodly&&(n.project["webforms.display-mode"]="airy")})}}),{setSetting:uC,setSettings:sp,setSettingsAsText:p6}=sC.actions,h6=sC.reducer,i_=e=>{const n=["folder","file"];return e.sort((r,a)=>r.type===a.type?r.name.localeCompare(a.name):n.indexOf(r.type)-n.indexOf(a.type))},ct=(e,n)=>e.reduce((r,a)=>a.path===n.path&&a.type===n.type?[...r,n]:a.children?[...r,{...a,children:i_(ct(a.children,n))}]:[...r,a],[]),Tr=(e,n)=>e.reduce((r,a)=>r||(a.path===n?a:a.children?Tr(a.children,n):null),null),v6=[{name:Wt.WEBFORMS,type:le.FOLDER,children:[],path:Wt.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:Wt.METHODS,type:le.FOLDER,children:[],path:Wt.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:Wt.CLASSES,type:le.FOLDER,children:[],path:Wt.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:Wt.SHARED,type:le.FOLDER,children:[],path:Wt.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:le.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:le.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:le.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:le.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],cC=qn({name:"explorer",initialState:v6,reducers:{toggleExpandFolder:(e,n)=>(e=ct(e,{...n.payload,flags:{...n.payload.flags,expanded:!n.payload.flags.expanded}}),e),expandFolder:(e,n)=>(e=ct(e,{...n.payload,flags:{...n.payload.flags,expanded:!0}}),e),openAddFileInput:(e,n)=>ct(e,{...n.payload,flags:{...n.payload.flags,adding:!0}}),addNewFile:(e,n)=>{const{parent:r,child:a}=n.payload;return ct(e,{...r,children:[a,...r.children||[]]})},removeFile:(e,n)=>{const{parent:r,child:a}=n.payload;return ct(e,{...r,children:r.children.filter(i=>i.path!==a.path)})},refreshFile:(e,n)=>{const{parent:r,child:a}=n.payload,i=(r.children||[]).filter(u=>u.path!==a.path&&!a.error);return ct(e,{...r,children:[a,...i]})},setFolderChildren:(e,n)=>{const r=Tr(e,n.payload.parentPath);return r?ct(e,{...r,children:n.payload.children}):e}},extraReducers:e=>{e.addCase(Vs.pending,(n,r)=>{const{file:a,newname:i}=r.meta.arg,u=Tr(n,a.path);if(!u)return n;const c=a.path.split("/");c.pop();const f=`${c.join("/")}/${a.name}.${a.ext}`,p=`${c.join("/")}/${i}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":Xa.next({action:ka.WILL_RENAME,payload:{oldPath:f,newPath:p}});break}return ct(n,{...u,flags:{...u.flags,loading:!0}})}),e.addCase(Vs.fulfilled,(n,r)=>{const{meta:{arg:{file:a}},payload:i}=r,u=Tr(n,a.path);if(!u)return n;switch(i.old.ext){case"4dm":case"4qs":Xa.next({action:ka.DID_RENAME,payload:{oldPath:i.old.path,newPath:i.new.path}});break}return ct(n,{...u,flags:{...u.flags,loading:!1}})}),e.addCase(Vs.rejected,(n,r)=>{const{file:a}=r.meta.arg,i=Tr(n,a.path);return i?ct(n,{...i,flags:{...i.flags,loading:!1}}):n}),e.addCase(Po.pending,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,flags:{...i.flags,loading:!0}}):n}),e.addCase(Po.fulfilled,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,children:i_(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!0},error:null}):n}),e.addCase(Po.rejected,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!0}}):n}),e.addCase(zl.pending,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,flags:{...i.flags,loading:!0}}):n}),e.addCase(zl.fulfilled,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,children:i_(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!1},error:null}):n}),e.addCase(zl.rejected,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!1}}):n}),e.addCase(qf.pending,(n,r)=>{const{fileName:a,parentNode:i,path:u,type:c}=r.meta.arg;return ct(n,{...i,children:[{name:a,path:`${u}/${a}`,type:c,error:null,flags:{loading:!0},config:{}},...i.children]})}),e.addCase(qf.fulfilled,(n,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg,c=Ws(u),{editor:f,supportedEditors:p}=bo(`${a}${c?`.${c.toLowerCase()}`:""}`);return ct(n,{name:i,path:`${a}/${i}`,type:u,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:p}})}),e.addCase(qf.rejected,(n,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg;return ct(n,{name:i,path:`${a}/${i}`,type:u,error:{message:r.payload},flags:{loading:!1},config:{}})}),e.addCase(Vf.pending,(n,r)=>{const{node:a,parentNode:i}=r.meta.arg;return ct(n,{...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(Vf.fulfilled,(n,r)=>{const{node:a}=r.payload,{node:{path:i,ext:u}}=r.meta.arg,{editor:c,supportedEditors:f}=bo(`${i}${u?`.${u.toLowerCase()}`:""}`);return ct(n,{name:`${a.name}`,path:`${i}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:c,supportedEditors:f}})}),e.addCase(Vf.rejected,(n,r)=>{const a=r.payload,{node:i}=r.meta.arg;return ct(n,{name:`${i.name}_copy`,path:`${i.path}/${i.name}_copy`,type:i.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(Gl.pending,(n,r)=>{}),e.addCase(Gl.fulfilled,(n,r)=>{var b;const{draggedNode:a,newLocation:i}=r.meta.arg,u=dx(a.path),c=Tr(n,u),f=Tr(n,i.path),p=(b=c==null?void 0:c.children)==null?void 0:b.filter(E=>E.path!==a.path),h=i.path.split("/").length,m=a.path.split("/").length;return h>=m?(n=ct(n,{...c,children:p}),n=ct(n,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}})):(n=ct(n,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}}),n=ct(n,{...c,children:p})),n}),e.addCase(Gl.rejected,(n,r)=>{Ao.next({message:"Error moving file",kind:"danger"})}),e.addCase(qs.pending,(n,r)=>{var C;const{fileName:a,parentNode:i,path:u,type:c,qodly:f}=r.meta.arg,p=Ws(c,f),h=`${u}/${a}${p?`.${p.toLowerCase()}`:""}`,{editor:m,supportedEditors:b}=bo(h);switch(c){case le.CLASS:case le.METHOD:Xa.next({action:ka.WILL_CREATE,payload:{filePath:h}});break}const E=(C=i.children)==null?void 0:C.filter(k=>k.path!==`${u}/${a}`),O=[{name:a,path:`${u}/${a}`,type:le.FILE,error:null,flags:{loading:!0},config:{editor:m,supportedEditors:b},ext:p,date:new Date().toISOString()},...E],R=ct(n,{...i,children:O});return FT.merge(n,R)}),e.addCase(qs.fulfilled,(n,r)=>{const{fileName:a,path:i,type:u,qodly:c}=r.meta.arg,f=Ws(u,c),p=`${i}/${a}${f?`.${f.toLowerCase()}`:""}`,{editor:h,supportedEditors:m}=bo(p),b=ct(n,{name:a,path:`${i}/${a}`,type:le.FILE,error:null,flags:{},config:{editor:h,supportedEditors:m},ext:f,date:new Date().toISOString()});switch(u){case le.CLASS:case le.METHOD:Xa.next({action:ka.DID_CREATE,payload:{filePath:p}});break}return n=b,n}),e.addCase(qs.rejected,(n,r)=>{const{fileName:a,path:i,type:u}=r.meta.arg,c=Ws(u),{editor:f,supportedEditors:p}=bo(`${i}${c?`.${c.toLowerCase()}`:""}`);return n=ct(n,{name:a,path:`${i}/${a}`,type:le.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:p},ext:c,date:new Date().toISOString()}),n}),e.addMatcher(iO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!0}})),n}),e.addMatcher(uO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!1}})),n}),e.addMatcher(sO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!1}})),Ao.next({message:"Failed to open file, try again",kind:"danger"}),n})}}),{toggleExpandFolder:g6,expandFolder:m6,openAddFileInput:y6,addNewFile:lC,refreshFile:b6,removeFile:s_,setFolderChildren:_6}=cC.actions;function fC(e){switch(e){case le.WEBFORMS:return Nx;case le.METHODS:return`//%attributes = {}
269
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function t_(e,n){if(e){var r=e.indexOf(n);0<=r&&e.splice(r,1)}}var Qd=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,r,a,i,u;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=e_(c),p=f.next();!p.done;p=f.next()){var h=p.value;h.remove(this)}}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}else c.remove(this);var m=this.initialTeardown;if(ja(m))try{m()}catch(C){u=C instanceof s1?C.errors:[C]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var E=e_(b),O=E.next();!O.done;O=E.next()){var R=O.value;try{CS(R)}catch(C){u=u??[],C instanceof s1?u=bd(bd([],yd(u)),yd(C.errors)):u.push(C)}}}catch(C){a={error:C}}finally{try{O&&!O.done&&(i=E.return)&&i.call(E)}finally{if(a)throw a.error}}}if(u)throw new s1(u)}},e.prototype.add=function(n){var r;if(n&&n!==this)if(this.closed)CS(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(n)}},e.prototype._hasParent=function(n){var r=this._parentage;return r===n||Array.isArray(r)&&r.includes(n)},e.prototype._addParent=function(n){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(n),r):r?[r,n]:n},e.prototype._removeParent=function(n){var r=this._parentage;r===n?this._parentage=null:Array.isArray(r)&&t_(r,n)},e.prototype.remove=function(n){var r=this._finalizers;r&&t_(r,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),vx=Qd.EMPTY;function gx(e){return e instanceof Qd||e&&"closed"in e&&ja(e.remove)&&ja(e.add)&&ja(e.unsubscribe)}function CS(e){ja(e)?e():e.unsubscribe()}var mx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},r_={setTimeout:function(e,n){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];var i=r_.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,bd([e,n],yd(r))):setTimeout.apply(void 0,bd([e,n],yd(r)))},clearTimeout:function(e){var n=r_.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(e)},delegate:void 0};function AL(e){r_.setTimeout(function(){throw e})}function RS(){}function Gf(e){e()}var yx=function(e){Zd(n,e);function n(r){var a=e.call(this)||this;return a.isStopped=!1,r?(a.destination=r,gx(r)&&r.add(a)):a.destination=ML,a}return n.create=function(r,a,i){return new n_(r,a,i)},n.prototype.next=function(r){this.isStopped||this._next(r)},n.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(r){this.destination.next(r)},n.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Qd),PL=Function.prototype.bind;function u1(e,n){return PL.call(e,n)}var DL=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var r=this.partialObserver;if(r.next)try{r.next(n)}catch(a){Df(a)}},e.prototype.error=function(n){var r=this.partialObserver;if(r.error)try{r.error(n)}catch(a){Df(a)}else Df(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(r){Df(r)}},e}(),n_=function(e){Zd(n,e);function n(r,a,i){var u=e.call(this)||this,c;if(ja(r)||!r)c={next:r??void 0,error:a??void 0,complete:i??void 0};else{var f;u&&mx.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return u.unsubscribe()},c={next:r.next&&u1(r.next,f),error:r.error&&u1(r.error,f),complete:r.complete&&u1(r.complete,f)}):c=r}return u.destination=new DL(c),u}return n}(yx);function Df(e){AL(e)}function IL(e){throw e}var ML={closed:!0,next:RS,error:IL,complete:RS},kL=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function $L(e){return e}function NL(e){return e.length===0?$L:e.length===1?e[0]:function(r){return e.reduce(function(a,i){return i(a)},r)}}var AS=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var r=new e;return r.source=this,r.operator=n,r},e.prototype.subscribe=function(n,r,a){var i=this,u=LL(n)?n:new n_(n,r,a);return Gf(function(){var c=i,f=c.operator,p=c.source;u.add(f?f.call(u,p):p?i._subscribe(u):i._trySubscribe(u))}),u},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(r){n.error(r)}},e.prototype.forEach=function(n,r){var a=this;return r=PS(r),new r(function(i,u){var c=new n_({next:function(f){try{n(f)}catch(p){u(p),c.unsubscribe()}},error:u,complete:i});a.subscribe(c)})},e.prototype._subscribe=function(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)},e.prototype[kL]=function(){return this},e.prototype.pipe=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return NL(n)(this)},e.prototype.toPromise=function(n){var r=this;return n=PS(n),new n(function(a,i){var u;r.subscribe(function(c){return u=c},function(c){return i(c)},function(){return a(u)})})},e.create=function(n){return new e(n)},e}();function PS(e){var n;return(n=e??mx.Promise)!==null&&n!==void 0?n:Promise}function jL(e){return e&&ja(e.next)&&ja(e.error)&&ja(e.complete)}function LL(e){return e&&e instanceof yx||jL(e)&&gx(e)}var FL=hx(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),bx=function(e){Zd(n,e);function n(){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 n.prototype.lift=function(r){var a=new DS(this,this);return a.operator=r,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new FL},n.prototype.next=function(r){var a=this;Gf(function(){var i,u;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=e_(a.currentObservers),f=c.next();!f.done;f=c.next()){var p=f.value;p.next(r)}}catch(h){i={error:h}}finally{try{f&&!f.done&&(u=c.return)&&u.call(c)}finally{if(i)throw i.error}}}})},n.prototype.error=function(r){var a=this;Gf(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)}})},n.prototype.complete=function(){var r=this;Gf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},n.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},n.prototype._innerSubscribe=function(r){var a=this,i=this,u=i.hasError,c=i.isStopped,f=i.observers;return u||c?vx:(this.currentObservers=null,f.push(r),new Qd(function(){a.currentObservers=null,t_(f,r)}))},n.prototype._checkFinalizedStatuses=function(r){var a=this,i=a.hasError,u=a.thrownError,c=a.isStopped;i?r.error(u):c&&r.complete()},n.prototype.asObservable=function(){var r=new AS;return r.source=this,r},n.create=function(r,a){return new DS(r,a)},n}(AS),DS=function(e){Zd(n,e);function n(r,a){var i=e.call(this)||this;return i.destination=r,i.source=a,i}return n.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)},n.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)},n.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)},n.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:vx},n}(bx);const _x=new bx,WL=()=>JT(),Ua=sL,J_=pe(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),BL=pe(J_,e=>e?e.dataClasses:[]),UL=pe(J_,e=>e?e.methods:[]),wx=e=>pe(n=>n,n=>{switch(n.catalog.state){case"loaded":const r=e?n.catalog.model.dataClasses[e]:n.catalog.model;return(r==null?void 0:r.methods)||[];default:return[]}}),zL=e=>Ua(wx(e),YT),HL=(e,n)=>pe(wx(e),r=>r.find(a=>`${a.applyTo}.${a.name}`===n)),GL=(e,n,r)=>Ua(HL(e,`${r}.${n}`),YT),Ex=pe(e=>e,e=>e),qL=e=>pe(za,n=>{var i;const r=n.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]}))}),Sx=e=>pe(za,n=>{var a,i;const r=n.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)||[]}),VL=(e,n,r)=>pe(Ex,a=>{var i,u;if(n){const c=a.sharedDatasources.sources[n];return c?c.find(f=>f.id===e):void 0}else{const c=a.root.tabs.find(p=>p.path===r);return c?(u=(i=c.content.metadata)==null?void 0:i.datasources)==null?void 0:u.find(p=>p.id===e):void 0}}),Ox=pe(e=>e,e=>{var n;return((n=e.sharedDatasources)==null?void 0:n.sources)||[]}),YL=(e,n,r,a)=>pe(Sx(e),Ox,(i,u)=>{const c=Bt.flatten(Bt.values(u)),f=[...n!=="private"?i:[],...n!=="shared"?c:[]];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}),KL=pe(e=>e.debugger,e=>e.meta),Ds=pe(e=>e.debugger,e=>e.list),En=pe(e=>e.debugger,e=>e.sessions),XL=pe(En,e=>e.length),Ps=(e,n,r,a)=>e.find(i=>i.filePath===n&&i.methodName===r&&(!a||i.className===a)),dr=(e,n)=>e.find(r=>r.threadId===n),Tx=(e,n)=>e.find(r=>r.tabPath===n),JL=(e,n)=>pe(Ds,r=>{var a;return((a=Ps(r,e,n))==null?void 0:a.breakpoints.saved.locations)||[]}),ZL=(e,n)=>pe(Ds,r=>{var a;return((a=Ps(r,e,n))==null?void 0:a.breakpoints.draft.locations)||[]}),QL=e=>pe(Ds,n=>n.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)),e3=e=>pe(Ds,n=>n.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)),t3=e=>pe(En,n=>{const r=dr(n,e);return r!=null&&r.stopped?r.highlightedLines:null}),r3=e=>pe(En,n=>{const r=dr(n,e);return r!=null&&r.stopped?r.activeLine:null}),n3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.expressions)||[]}),o3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.stopped)||!1}),a3=(e,n)=>pe(Ds,r=>{var a;return(a=Ps(r,e,n))==null?void 0:a.source}),i3=e=>pe(En,n=>{var r;return((r=Tx(n,e))==null?void 0:r.threadId)||-1}),s3=e=>pe(En,n=>{var r,a;return(a=(r=dr(n,e))==null?void 0:r.currentStackFrame)==null?void 0:a.source}),u3=e=>pe(En,n=>{var r;return(r=dr(n,e))==null?void 0:r.currentStackFrame}),c3=pe(En,e=>e.map(({channelId:n,threadId:r})=>({id:n,threadId:r}))),l3=e=>pe(En,n=>{var r;return((r=dr(n,e))==null?void 0:r.stackFrames)||[]}),f3=e=>pe(En,n=>{var r,a;return((a=(r=dr(n,e))==null?void 0:r.variables)==null?void 0:a.callchain)||[]}),d3=e=>pe(En,n=>{var r,a;return((a=(r=dr(n,e))==null?void 0:r.variables)==null?void 0:a.expressions)||[]}),p3=(e,n="saved")=>pe(Ds,r=>{const a=r.find(i=>i.filePath===e);return(a==null?void 0:a.breakpoints[n].offset)||0}),h3=(e,n,r,a)=>pe(En,i=>{var h;const u=((h=dr(i,e))==null?void 0:h.exceptions)||[],c=n===le.CLASS,f=c&&a?`${a}.${r}`:r;return(f?u.filter(m=>m.location===f):u).map(m=>({...m,locationLine:c?m.locationLine:m.locationLine+1}))}),za=pe(e=>e.root,e=>e),cu=pe(za,e=>e.tabs),v3=pe(za,e=>e.activeTab),g3=pe(za,e=>e.recent.filter(({type:n})=>n!==le.DEBUGGER)),m3=pe(za,({tabs:e,activeTab:n})=>e.find(({path:r})=>r===n)),y3=pe(za,({tabs:e})=>e.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null)),b3=pe(cu,e=>e.filter(({type:n,flags:r})=>n===le.WEBFORM&&r.enabled===!1).map(({path:n})=>n)),_3=pe(cu,e=>e.length>0),gf=e=>pe(za,n=>n.tabs.find(({path:r})=>r===e)),xx=(e,n="")=>pe(gf(e),r=>!r||!r.content||typeof r.content=="string"?r==null?void 0:r.content:Bt.get(r.content,n)),w3=e=>pe(gf(e),n=>n==null?void 0:n.extra),E3=(e,n=r=>r)=>pe(xx(e,"components"),r=>n(r||{})),Z_=pe(cu,e=>e.filter(n=>n.flags.touched)),S3=pe(Z_,e=>e.length),O3=pe(En,e=>e.map(({threadId:n,currentStackFrame:{source:r},tabPath:a})=>({name:WT(n,r),path:a,type:le.DEBUGGER,content:r==null?void 0:r.content,flags:{},extra:{source:r}}))),T3=pe(e=>e,e=>e.explorer||[]),Cx=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.WEBFORMS)),Rx=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.METHODS)),Ax=pe(e=>e,e=>e.explorer.find(n=>n.path===Wt.CLASSES)),x3=pe(Rx,e=>(e==null?void 0:e.children)||[]),C3=pe(Cx,e=>(e==null?void 0:e.children)||[]),R3=pe(Ax,e=>(e==null?void 0:e.children)||[]),A3=pe(e=>e.modals,e=>e.list),P3=pe(e=>e.roles,({roles:e})=>e),D3=pe(e=>e.roles,({privileges:e})=>e),I3=pe(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:n})=>n==="guest")),M3=pe(e=>e.roles,({flags:e})=>e),k3=pe(e=>e.roles,({selectedTab:e})=>e),$3=pe(e=>e.roles,({date:e})=>e),Px=pe(e=>e.settings,e=>e.session),N3=pe(e=>e.settings,e=>e.project),j3=pe(e=>e.settings,e=>e),Q_=pe(e=>e.settings,e=>e.server),L3=pe(Q_,e=>e.remoteDebuggerMode),F3=pe(Q_,e=>e.qodly),W3=pe(Px,e=>e["monaco.zoom"]),Dx=["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"],Ix=Dx.map(e=>({id:y_(),content:"",name:e,parentId:null,scope:As.THEME})),ew=e=>pe(gf(e),n=>{var r,a;return((a=(r=n==null?void 0:n.content)==null?void 0:r.metadata)==null?void 0:a.styles)||[]}),B3=(e,n)=>pe(ew(e),r=>n.map(a=>{switch(!0){case a===As.LOCAL:return r.map(i=>({...i,scope:As.LOCAL}));case a===As.THEME:return Ix;default:return[]}}).flat()),U3=e=>pe(ew(e),n=>[...n.map(r=>({...r,scope:As.LOCAL})),...Ix]),z3=pe(e=>e,e=>{var n;return[...(((n=e.sharedCSS)==null?void 0:n.styles)||[]).map(r=>({...r,scope:As.SHARED}))]}),H3=e=>pe(gf(e),n=>n==null?void 0:n.flags),mf=pe(e=>e.webforms,e=>e),Mx=pe(mf,e=>(e==null?void 0:e.components)||[]),ep=pe(mf,e=>e.inspector),G3=pe(ep,e=>e.css),q3=pe(ep,e=>e.datasource),kx=pe(mf,e=>e.templates||{data:[]}),V3=pe(kx,e=>e.data||[]),Y3=e=>pe(Mx,n=>n.find(r=>r.id===e)),K3=e=>pe(ep,n=>n[e]),X3=pe(mf,e=>e.datasources.theme),J3=pe(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,n,r)=>[e.state,n.state,r.state].every(a=>["loaded","error"].includes(a)));var tw=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(tw||{}),$x=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))($x||{});const Nx={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 If,Z3=new Uint8Array(16);function jx(){if(!If&&(If=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!If))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return If(Z3)}const Q3=/^(?:[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 tp(e){return typeof e=="string"&&Q3.test(e)}var Fr=[];for(var c1=0;c1<256;++c1)Fr.push((c1+256).toString(16).substr(1));function rp(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Fr[e[n+0]]+Fr[e[n+1]]+Fr[e[n+2]]+Fr[e[n+3]]+"-"+Fr[e[n+4]]+Fr[e[n+5]]+"-"+Fr[e[n+6]]+Fr[e[n+7]]+"-"+Fr[e[n+8]]+Fr[e[n+9]]+"-"+Fr[e[n+10]]+Fr[e[n+11]]+Fr[e[n+12]]+Fr[e[n+13]]+Fr[e[n+14]]+Fr[e[n+15]]).toLowerCase();if(!tp(r))throw TypeError("Stringified UUID is invalid");return r}var IS,l1,f1=0,d1=0;function e4(e,n,r){var a=n&&r||0,i=n||new Array(16);e=e||{};var u=e.node||IS,c=e.clockseq!==void 0?e.clockseq:l1;if(u==null||c==null){var f=e.random||(e.rng||jx)();u==null&&(u=IS=[f[0]|1,f[1],f[2],f[3],f[4],f[5]]),c==null&&(c=l1=(f[6]<<8|f[7])&16383)}var p=e.msecs!==void 0?e.msecs:Date.now(),h=e.nsecs!==void 0?e.nsecs:d1+1,m=p-f1+(h-d1)/1e4;if(m<0&&e.clockseq===void 0&&(c=c+1&16383),(m<0||p>f1)&&e.nsecs===void 0&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f1=p,d1=h,l1=c,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 E=p/4294967296*1e4&268435455;i[a++]=E>>>8&255,i[a++]=E&255,i[a++]=E>>>24&15|16,i[a++]=E>>>16&255,i[a++]=c>>>8|128,i[a++]=c&255;for(var O=0;O<6;++O)i[a+O]=u[O];return n||rp(i)}function Lx(e){if(!tp(e))throw TypeError("Invalid UUID");var n,r=new Uint8Array(16);return r[0]=(n=parseInt(e.slice(0,8),16))>>>24,r[1]=n>>>16&255,r[2]=n>>>8&255,r[3]=n&255,r[4]=(n=parseInt(e.slice(9,13),16))>>>8,r[5]=n&255,r[6]=(n=parseInt(e.slice(14,18),16))>>>8,r[7]=n&255,r[8]=(n=parseInt(e.slice(19,23),16))>>>8,r[9]=n&255,r[10]=(n=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=n/4294967296&255,r[12]=n>>>24&255,r[13]=n>>>16&255,r[14]=n>>>8&255,r[15]=n&255,r}function t4(e){e=unescape(encodeURIComponent(e));for(var n=[],r=0;r<e.length;++r)n.push(e.charCodeAt(r));return n}var r4="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n4="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Fx(e,n,r){function a(i,u,c,f){if(typeof i=="string"&&(i=t4(i)),typeof u=="string"&&(u=Lx(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|n,p[8]=p[8]&63|128,c){f=f||0;for(var h=0;h<16;++h)c[f+h]=p[h];return c}return rp(p)}try{a.name=e}catch{}return a.DNS=r4,a.URL=n4,a}function o4(e){if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=new Uint8Array(n.length);for(var r=0;r<n.length;++r)e[r]=n.charCodeAt(r)}return a4(i4(s4(e),e.length*8))}function a4(e){for(var n=[],r=e.length*32,a="0123456789abcdef",i=0;i<r;i+=8){var u=e[i>>5]>>>i%32&255,c=parseInt(a.charAt(u>>>4&15)+a.charAt(u&15),16);n.push(c)}return n}function Wx(e){return(e+64>>>9<<4)+14+1}function i4(e,n){e[n>>5]|=128<<n%32,e[Wx(n)-1]=n;for(var r=1732584193,a=-271733879,i=-1732584194,u=271733878,c=0;c<e.length;c+=16){var f=r,p=a,h=i,m=u;r=Vr(r,a,i,u,e[c],7,-680876936),u=Vr(u,r,a,i,e[c+1],12,-389564586),i=Vr(i,u,r,a,e[c+2],17,606105819),a=Vr(a,i,u,r,e[c+3],22,-1044525330),r=Vr(r,a,i,u,e[c+4],7,-176418897),u=Vr(u,r,a,i,e[c+5],12,1200080426),i=Vr(i,u,r,a,e[c+6],17,-1473231341),a=Vr(a,i,u,r,e[c+7],22,-45705983),r=Vr(r,a,i,u,e[c+8],7,1770035416),u=Vr(u,r,a,i,e[c+9],12,-1958414417),i=Vr(i,u,r,a,e[c+10],17,-42063),a=Vr(a,i,u,r,e[c+11],22,-1990404162),r=Vr(r,a,i,u,e[c+12],7,1804603682),u=Vr(u,r,a,i,e[c+13],12,-40341101),i=Vr(i,u,r,a,e[c+14],17,-1502002290),a=Vr(a,i,u,r,e[c+15],22,1236535329),r=Yr(r,a,i,u,e[c+1],5,-165796510),u=Yr(u,r,a,i,e[c+6],9,-1069501632),i=Yr(i,u,r,a,e[c+11],14,643717713),a=Yr(a,i,u,r,e[c],20,-373897302),r=Yr(r,a,i,u,e[c+5],5,-701558691),u=Yr(u,r,a,i,e[c+10],9,38016083),i=Yr(i,u,r,a,e[c+15],14,-660478335),a=Yr(a,i,u,r,e[c+4],20,-405537848),r=Yr(r,a,i,u,e[c+9],5,568446438),u=Yr(u,r,a,i,e[c+14],9,-1019803690),i=Yr(i,u,r,a,e[c+3],14,-187363961),a=Yr(a,i,u,r,e[c+8],20,1163531501),r=Yr(r,a,i,u,e[c+13],5,-1444681467),u=Yr(u,r,a,i,e[c+2],9,-51403784),i=Yr(i,u,r,a,e[c+7],14,1735328473),a=Yr(a,i,u,r,e[c+12],20,-1926607734),r=Kr(r,a,i,u,e[c+5],4,-378558),u=Kr(u,r,a,i,e[c+8],11,-2022574463),i=Kr(i,u,r,a,e[c+11],16,1839030562),a=Kr(a,i,u,r,e[c+14],23,-35309556),r=Kr(r,a,i,u,e[c+1],4,-1530992060),u=Kr(u,r,a,i,e[c+4],11,1272893353),i=Kr(i,u,r,a,e[c+7],16,-155497632),a=Kr(a,i,u,r,e[c+10],23,-1094730640),r=Kr(r,a,i,u,e[c+13],4,681279174),u=Kr(u,r,a,i,e[c],11,-358537222),i=Kr(i,u,r,a,e[c+3],16,-722521979),a=Kr(a,i,u,r,e[c+6],23,76029189),r=Kr(r,a,i,u,e[c+9],4,-640364487),u=Kr(u,r,a,i,e[c+12],11,-421815835),i=Kr(i,u,r,a,e[c+15],16,530742520),a=Kr(a,i,u,r,e[c+2],23,-995338651),r=Xr(r,a,i,u,e[c],6,-198630844),u=Xr(u,r,a,i,e[c+7],10,1126891415),i=Xr(i,u,r,a,e[c+14],15,-1416354905),a=Xr(a,i,u,r,e[c+5],21,-57434055),r=Xr(r,a,i,u,e[c+12],6,1700485571),u=Xr(u,r,a,i,e[c+3],10,-1894986606),i=Xr(i,u,r,a,e[c+10],15,-1051523),a=Xr(a,i,u,r,e[c+1],21,-2054922799),r=Xr(r,a,i,u,e[c+8],6,1873313359),u=Xr(u,r,a,i,e[c+15],10,-30611744),i=Xr(i,u,r,a,e[c+6],15,-1560198380),a=Xr(a,i,u,r,e[c+13],21,1309151649),r=Xr(r,a,i,u,e[c+4],6,-145523070),u=Xr(u,r,a,i,e[c+11],10,-1120210379),i=Xr(i,u,r,a,e[c+2],15,718787259),a=Xr(a,i,u,r,e[c+9],21,-343485551),r=Ja(r,f),a=Ja(a,p),i=Ja(i,h),u=Ja(u,m)}return[r,a,i,u]}function s4(e){if(e.length===0)return[];for(var n=e.length*8,r=new Uint32Array(Wx(n)),a=0;a<n;a+=8)r[a>>5]|=(e[a/8]&255)<<a%32;return r}function Ja(e,n){var r=(e&65535)+(n&65535),a=(e>>16)+(n>>16)+(r>>16);return a<<16|r&65535}function u4(e,n){return e<<n|e>>>32-n}function np(e,n,r,a,i,u){return Ja(u4(Ja(Ja(n,e),Ja(a,u)),i),r)}function Vr(e,n,r,a,i,u,c){return np(n&r|~n&a,e,n,i,u,c)}function Yr(e,n,r,a,i,u,c){return np(n&a|r&~a,e,n,i,u,c)}function Kr(e,n,r,a,i,u,c){return np(n^r^a,e,n,i,u,c)}function Xr(e,n,r,a,i,u,c){return np(r^(n|~a),e,n,i,u,c)}var c4=Fx("v3",48,o4);const l4=c4;function f4(e,n,r){e=e||{};var a=e.random||(e.rng||jx)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){r=r||0;for(var i=0;i<16;++i)n[r+i]=a[i];return n}return rp(a)}function d4(e,n,r,a){switch(e){case 0:return n&r^~n&a;case 1:return n^r^a;case 2:return n&r^n&a^r&a;case 3:return n^r^a}}function p1(e,n){return e<<n|e>>>32-n}function p4(e){var n=[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,c=Math.ceil(u/16),f=new Array(c),p=0;p<c;++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[c-1][14]=(e.length-1)*8/Math.pow(2,32),f[c-1][14]=Math.floor(f[c-1][14]),f[c-1][15]=(e.length-1)*8&4294967295;for(var b=0;b<c;++b){for(var E=new Uint32Array(80),O=0;O<16;++O)E[O]=f[b][O];for(var R=16;R<80;++R)E[R]=p1(E[R-3]^E[R-8]^E[R-14]^E[R-16],1);for(var C=r[0],k=r[1],j=r[2],F=r[3],D=r[4],M=0;M<80;++M){var S=Math.floor(M/20),q=p1(C,5)+d4(S,k,j,F)+D+n[S]+E[M]>>>0;D=F,F=j,j=p1(k,30)>>>0,k=C,C=q}r[0]=r[0]+C>>>0,r[1]=r[1]+k>>>0,r[2]=r[2]+j>>>0,r[3]=r[3]+F>>>0,r[4]=r[4]+D>>>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 h4=Fx("v5",80,p4);const v4=h4,g4="00000000-0000-0000-0000-000000000000";function m4(e){if(!tp(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const y4=Object.freeze(Object.defineProperty({__proto__:null,NIL:g4,parse:Lx,stringify:rp,v1:e4,v3:l4,v4:f4,v5:v4,validate:tp,version:m4},Symbol.toStringTag,{value:"Module"})),b4=cA(y4);function rw(e,n){if(!e||!n||!e.length||!n.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=n}rw.prototype.convert=function(e){var n,r,a,i={},u=this.srcAlphabet.length,c=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(n=0;n<f;n++)i[n]=this.srcAlphabet.indexOf(e[n]);do{for(r=0,a=0,n=0;n<f;n++)r=r*u+i[n],r>=c?(i[a++]=parseInt(r/c,10),r=r%c):a>0&&(i[a++]=0);f=a,p=this.dstAlphabet.slice(r,r+1).concat(p)}while(a!==0);return p};rw.prototype.isValid=function(e){for(var n=0;n<e.length;++n)if(this.srcAlphabet.indexOf(e[n])===-1)return!1;return!0};var _4=rw,w4=_4;function yf(e,n){var r=new w4(e,n);return function(a){return r.convert(a)}}yf.BIN="01";yf.OCT="01234567";yf.DEC="0123456789";yf.HEX="0123456789abcdef";var E4=yf;const{v4:h1}=b4,Mf=E4,v1="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",S4="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",O4={consistentLength:!0};let g1;const MS=(e,n,r)=>{const a=n(e.toLowerCase().replace(/-/g,""));return!r||!r.consistentLength?a:a.padStart(r.shortIdLength,r.paddingChar)},T4=(e,n)=>{const a=n(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("-")},x4=e=>Math.ceil(Math.log(2**128)/Math.log(e));var _d=(()=>{const e=(n,r)=>{const a=n||v1,i={...O4,...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=x4(a.length),c={shortIdLength:u,consistentLength:i.consistentLength,paddingChar:a[0]},f=Mf(Mf.HEX,a),p=Mf(a,Mf.HEX),h=()=>MS(h1(),f,c),m={new:h,generate:h,uuid:h1,fromUUID:b=>MS(b,f,c),toUUID:b=>T4(b,p),alphabet:a,maxLength:u};return Object.freeze(m),m};return e.constants={flickrBase58:v1,cookieBase90:S4},e.uuid=h1,e.generate=()=>(g1||(g1=e(v1).generate),g1()),e})(),gt=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(gt||{});const C4=[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE,gt.METHOD],wd="guest",nw=[{key:"read",label:"Read",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.ATTRIBUTE,gt.METHOD]},{key:"execute",label:"Execute",canApplyTo:[gt.DATASTORE,gt.DATACLASS,gt.METHOD]},{key:"promote",label:"Promote",canApplyTo:[gt.METHOD]}];function Gn(e,...n){return Array.from(new Set([...e,...n]))}function Bx(e){const n={},r=new Map;e.forEach(p=>{const h=p.id||_d.generate();n[h]={...p,id:h,parents:[],includes:Gn(p.includes||[]),resources:[]},r.set(p.privilege,h)}),Object.entries(n).forEach(([p,h])=>{const m=h.includes.map(b=>{const E=r.get(b);return E?(n[E].parents=Gn(n[E].parents,E),E):""}).filter(Boolean);n[p]={...h,includes:m}});const a=Ux(n),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=>n[h].parents.push(p.id))}),Object.values(n).find(({privilege:p})=>p===wd))return n;const f=_d.generate();return{[f]:{id:f,privilege:wd,includes:[],parents:[],resources:[]},...n}}function Ux(e){return Object.values(e).sort((n,r)=>n.parents.length-r.parents.length)}function op(e,n){const r=n[e];let a=[];return r&&r.parents.forEach(i=>{a=Gn(a,...op(i,n),i)}),a}function Ed(e,n){const r=n[e];let a=[];return r&&r.includes.forEach(i=>{a=Gn(a,...Ed(i,n),i)}),a}function R4(e,n){const r=n[e];if(!r)return[];const a=[e,...op(e,n),...r.includes];return Object.keys(n).filter(i=>!a.includes(i))}function A4(e,n){return n[e]?Object.keys(n).reduce((a,i)=>i===e?a:{...a,[i]:{...n[i],parents:n[i].parents.filter(u=>u!==e),includes:n[i].includes.filter(u=>u!==e)}},{}):n}function P4(e,n,r){const a=r[e],i=r[n];return!a||!i?r:{...r,[e]:{...r[e],includes:Gn(a.includes,n)},[n]:{...r[n],parents:Gn(i.parents,e)}}}function D4(e,n,r){const a=r[e],i=r[n];return!a||!i?r:{...r,[e]:{...r[e],includes:r[e].includes.filter(u=>u!==n)},[n]:{...r[n],parents:r[n].parents.filter(u=>u!==e)}}}function zx(e,n){vT(e),Object.entries(n).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const r=_d.generate();return{[r]:{id:r,privilege:e,includes:[],parents:[],resources:[]},...n}}function I4(e,n,r,a,i){let u=zx(e,i);const c=Object.entries(u).find(([,f])=>f.privilege===e);return c?(u=Vx(c[1].id,n,r,a,u),u):i}function M4(e,n,r){if(!e)throw new Error("Please enter a name");if(!r[n])throw new Error("Invalid privilege");return Object.entries(r).forEach(([,{privilege:a,id:i}])=>{if(e.toLowerCase()===a.toLowerCase()&&n!==i)throw new Error(`There's already a Privilege with the name ${e}`)}),{...r,[n]:{...r[n],privilege:e}}}function k4(e,n){return e.map(r=>Ha(r,n))}function Ha(e,n){return n[e]?n[e]:null}function Hx({applyTo:e,type:n,...r}){return Object.entries(r).reduce((a,[i,u])=>{const c=Bt.find(nw,["key",i]);return!c||!c.canApplyTo.includes(n)||(typeof u=="string"?u.split(","):u).forEach(p=>{a[p]=Gn(a[p]||[],i)}),a},{})}const o_=(e,n=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${n?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${n?"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 ${n?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function ow(e){return{permissions:nw.filter(({canApplyTo:n})=>n.includes(e.type)).map(({key:n,label:r})=>{const a={name:n,from:[]};switch(e.type){case gt.DATASTORE:return{...a,info:o_(r,!0)};case gt.DATACLASS:return{...a,info:o_(r)};default:return a}}),resource:e.applyTo,type:e.type}}function Gx(e,n){const r=qx(n),a={};return e.filter(({type:i})=>C4.includes(i)).forEach(i=>{const u=Hx(i);Object.entries(u).forEach(([c,f])=>{var m;const p=(m=r[c])==null?void 0:m.id;if(!p)return;a[p]=a[p]||{...n[p]};let h=Bt.find(a[p].resources,{resource:i.applyTo,type:i.type});h||(h=ow(i),a[p].resources.push(h)),h.permissions=h.permissions.map(b=>({...b,checked:b.checked||f.includes(b.name)}))})}),{...n,...a}}function qx(e){return Object.values(e).reduce((n,r)=>({...n,[r.privilege]:r}),{})}function ap(e){var r;const n=Bx(e.privileges||[]);return{privileges:Gx(((r=e.permissions)==null?void 0:r.allowed)||[],n),roles:(e.roles||[]).map(({id:a=_d.generate(),role:i,privileges:u=[]})=>({id:a,role:i,privileges:Gn(u).map(c=>{var f;return(f=Object.values(n).find(({privilege:p})=>p===c))==null?void 0:f.id}).filter(Boolean)})).reduce((a,i)=>({...a,[i.id]:{...i}}),{})}}function aw(e){const n=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),r=[...n,...n.map(a=>op(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:c,type:f})=>{let p=Bt.find(a,{applyTo:c,type:f});p||(p={applyTo:c,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!==wd).map(({id:a,includes:i,privilege:u})=>({id:a,privilege:u,includes:i.map(c=>e.privileges[c].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 $4(e,n){const r=n[e],a={children:[],links:[],parents:[],selected:e};if(!r)return a;function i(f,p,h=[]){const m=f.reduce((b,E)=>[...b,...n[E][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(E=>p.includes(E)?!1:(p.push(E),!0));b.length>0&&h.unshift(Gn(b))}return h}function c(f,p){const h=[];return f.reduce((m,b)=>(b.forEach(E=>{n[E][p==="parents"?"includes":"parents"].forEach(R=>{h.includes(R)&&m.push(p==="parents"?{source:E,target:R}:{source:R,target:E})}),h.push(E)}),m),[])}return a.children=i([e],"includes"),a.children=u(a.children),a.parents=i([e],"parents"),a.parents=u(a.parents),a.links=[...c([[e],...a.parents],"parents"),...c([[e],...a.children],"includes")],a}function N4(e,n,r){const a=Ha(e,r);if(!a||Bt.find(a.resources,{resource:n.applyTo,type:n.type}))return r;const i={...a,resources:[...a.resources,ow(n)]};return{...r,[e]:i}}function j4(e,n,r){const a=Ha(e,r);if(!a)return r;const i={...a,resources:a.resources.filter(({resource:u,type:c})=>u!==n.applyTo||c!==n.type)};return{...r,[e]:i}}function L4(e,n){const r=Ha(e,n);if(!r)return n;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{...n,[e]:a}}function Vx(e,n,r,a,i){const u=Ha(e,i);if(!u)return i;const f=Bt.find(u.resources,{type:r,resource:n})?{...u,resources:u.resources.map(p=>p.type===r&&p.resource===n?{...p,permissions:p.permissions.map(h=>h.name===a?{...h,checked:!h.checked,from:[]}:h)}:p)}:{...u,resources:[...u.resources,{type:r,resource:n,permissions:nw.filter(p=>p.canApplyTo.includes(r)).map(p=>({from:[],name:p.key,checked:p.key===a,info:o_(p.key,r===gt.DATASTORE)}))}]};return{...i,[e]:f}}function F4(e,n,r,a){const i=Ha(e,a);if(!i)return a;const c=Bt.find(i.resources,{type:n.type,resource:n.resource})?{...i,resources:i.resources.map(f=>f.type===n.type&&f.resource===n.resource?{...f,permissions:n.permissions.map(p=>p.name===r.name?{...p,checked:!p.checked,from:[]}:p)}:f)}:{...i,resources:[...i.resources,{...n,permissions:n.permissions.map(f=>({...f,checked:r.name===f.name,from:[]}))}]};return{...a,[e]:c}}function W4(e,n){var p;const r=Yx(e,n)||[],a=((p=Ha(e,n))==null?void 0:p.resources)||[],c=([...r,...a].filter(({type:h})=>h===gt.METHOD)||[]).map(({resource:h})=>h);return Object.entries(n).reduce((h,[m,{resources:b}])=>(b.filter(({resource:E,type:O})=>O===gt.METHOD&&c.includes(E)).forEach(({permissions:E,resource:O})=>{var C;((C=E.find(({name:k})=>k==="promote"))==null?void 0:C.checked)&&(h[O]=Gn(h[O]||[],m))}),h),{})}function Yx(e,n){var c;const r=Ha(e,n);if(!r)return[];const a=(c=Object.values(n).find(f=>f.privilege===wd))==null?void 0:c.id;return(a&&a!==e?Gn(Ed(e,n),a):Ed(e,n)).reduce((f,p)=>(n[p].resources.forEach(m=>{if(m.permissions.filter(({checked:O})=>O).length===0)return;const E=Bt.find(f,{type:m.type,resource:m.resource});if(!E){f.push({...m,permissions:m.permissions.map(O=>({...O,from:O.checked?[p]:[],checked:!1}))});return}E.permissions=E.permissions.map((O,R)=>{let{from:C=[]}=O;return m.permissions[R].checked&&!C.includes(p)&&(C=[...C,p]),{...O,from:C,checked:O.checked}})}),f),Bt.clone(r.resources.map(f=>({...f,permissions:f.permissions.map(({checked:p,...h})=>({...h,checked:!!p}))}))))}const B4=e=>e.reduce((n,r)=>({...n,[r.id]:{...r}}),{}),U4=(e,n)=>n[e]?Object.values(n).reduce((r,a)=>e===a.id||a.role===""?r:{...r,[a.id]:a},{}):n,z4=(e,n,r)=>r[e]?Object.values(r).reduce((a,i)=>e===i.id?{...a,[i.id]:{...i,name:n}}:{...a,[i.id]:i},{}):r,H4=(e,n)=>{const r={id:e,role:"",privileges:[]};return{...n,[r.id]:r}},G4=(e,n)=>{if(vT(e.role),Object.values(n).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(n).reduce((a,i)=>e.id===i.id?{...a,[e.id]:e}:{...a,[i.id]:i},{})},q4={list:[]},kS=(e,n)=>e.list.filter(r=>r.id!==n),Kx=qn({name:"modals",initialState:q4,reducers:{createModal:(e,n)=>{e.list.push(n.payload)},editModal:(e,n)=>{const{id:r,...a}=n.payload,i=e.list.find(QM(r));i&&Object.assign(i,{...a})},removeModal:(e,n)=>{const r=n.payload;e.list=kS(e,r)},closeModal:(e,n)=>{const{id:r,reason:a}=n.payload;if(a){const i=e.list.find(u=>u.id===r);i&&(i.closeReason=a,i.isOpen=!1)}else e.list=kS(e,r)}}}),{createModal:Xx,removeModal:Jx,closeModal:V4,editModal:Y4}=Kx.actions;var Zx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$S=ie.createContext&&ie.createContext(Zx),ei=globalThis&&globalThis.__assign||function(){return ei=Object.assign||function(e){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ei.apply(this,arguments)},K4=globalThis&&globalThis.__rest||function(e,n){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.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++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(r[a[i]]=e[a[i]]);return r};function Qx(e){return e&&e.map(function(n,r){return ie.createElement(n.tag,ei({key:r},n.attr),Qx(n.child))})}function ip(e){return function(n){return ie.createElement(X4,ei({attr:ei({},e.attr)},n),Qx(e.child))}}function X4(e){var n=function(r){var a=e.attr,i=e.size,u=e.title,c=K4(e,["attr","size","title"]),f=i||r.size||"1em",p;return r.className&&(p=r.className),e.className&&(p=(p?p+" ":"")+e.className),ie.createElement("svg",ei({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:p,style:ei(ei({color:e.color||r.color},r.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&ie.createElement("title",null,u),e.children)};return $S!==void 0?ie.createElement($S.Consumer,null,function(r){return n(r)}):n(Zx)}function J4(e){return ip({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 Z4(e){return ip({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 Q4(e){return ip({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 e6(e){return ip({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 t6={FaSave:J4,AiFillWarning:e6,BiErrorCircle:Q4,BsFillInfoCircleFill:Z4};var Hn=(e=>(e.ALERT="alert",e.CONFIRM="confirm",e))(Hn||{}),Ga=(e=>(e.PRIMARY="primary",e.WARNING="warning",e.DANGER="danger",e))(Ga||{}),iw=(e=>(e.CONFIRMED="confirmed",e.CANCELED="canceled",e))(iw||{});const Eo=xe("modals/open",async(e,{dispatch:n})=>{const{type:r=Hn.ALERT,store:a=Qs}=e,i=y_();switch(n(Xx({id:i,type:r,isOpen:!0,...e})),r){case Hn.CONFIRM:return new Promise(u=>{const c=a.subscribe(()=>{var h;const{modals:f}=a.getState(),p=f.list.find(m=>m.id===i);if(p&&!p.isOpen){const m=p.closeReason===iw.CONFIRMED,b=Bt.entries((h=p.views)==null?void 0:h.toggles).reduce((E,O)=>({...E,[O[0]]:O[1].value}),{});n(Jx(i)),c(),u({confirmed:m,options:b})}})});default:return{}}}),eC=()=>hk({name:Ur}),tC="Roles & Privileges",Sd=xe("roles/fetchRoles",async(e,{dispatch:n,rejectWithValue:r})=>{var u;let a;try{a=await eC()}catch(c){if(!Array.isArray((u=c==null?void 0:c.data)==null?void 0:u.__ERROR))return r("Error while loading the roles");a={name:Ur,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const i={name:tC,type:le.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:Ur,flags:{},content:{}};return n(wn(i)),{...a,content:ap(a.content)}}),rC=xe("roles/fetchRolesChanges",async(e,{getState:n})=>{const{tabs:r}=n().root;if(r.find(i=>i.path===Ur)){const{date:i}=n().roles;if(i&&await sw(i))return{old:!0}}return{}}),sw=async e=>{if(!e)return!1;try{const n=await eC();if(n.date){const r=new Date(e),a=new Date(n.date);if(r>a)return!0}}catch(n){if(!Array.isArray(n==null?void 0:n.data.__ERROR))throw n}return!1},a_=xe("roles/saveRoles",async(e,{getState:n,rejectWithValue:r,dispatch:a})=>{try{const{flags:i,date:u}=n().roles;if(i.old||await sw(u)){const{confirmed:p}=await a(Eo({title:tC,message:"New content has been found on the server. Are you sure you want to continue?",type:Hn.CONFIRM,icon:"FaSave"})).unwrap();if(!p)return r({old:!0})}return await Gd({name:Ur,content:aw(e)})}catch{return r("Error while loading the roles")}}),r6=nu().roles,{roles:n6={},privileges:o6={},flags:a6={touched:!1},date:i6,selectedTab:s6="roles"}=r6||{},u6={flags:a6,roles:n6,privileges:o6,date:i6,selectedTab:s6},nC=qn({name:"roles",initialState:u6,reducers:{updatePrivileges:(e,n)=>{e.privileges=n.payload,e.flags.touched=!0},updateRoles:(e,n)=>{e.roles=n.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,n)=>{e.roles=n.payload.roles,e.privileges=n.payload.privileges},toggleTab:(e,n)=>{e.selectedTab=n.payload},setRolesContent(e,n){const{content:r,date:a}=n.payload,i=ap(r);return{...e,...i,date:a}}},extraReducers(e){e.addCase(Sd.fulfilled,(n,r)=>{const{content:a,date:i}=r.payload;n={...n,...a,date:i}}).addCase(Sd.rejected,n=>({...n,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(a_.fulfilled,(n,r)=>({...n,flags:{...n.flags,touched:!1,old:!1},date:r.payload.date})).addCase(a_.rejected,(n,r)=>FT.isString(r.payload)?n:{...n,flags:{...n.flags,...r.payload}}).addCase(rC.fulfilled,(n,r)=>({...n,flags:{...n.flags,...r.payload}})).addCase(Vs.fulfilled,(n,r)=>{!r.payload||r.payload.path!==Ur||(n.flags.touched=!1,n.flags.old=!1)}).addCase(hw.fulfilled,(n,r)=>{r.meta.arg!==Ur||!r.payload||(n.flags.touched=!1,n.flags.old=!1)})}}),{updatePrivileges:oC,updateRoles:aC,setRolesContent:uw,toggleTab:c6,updateRolesAndPrivileges:cw}=nC.actions,l6=nC.reducer,oi="qodlyApp.json",lw=xe("settings/fetch",async()=>await ni({verb:Zt.GET_INFO,path:oi,content:!0,as:"json"})),iC=xe("settings/app",uk),f6=IT(),NS={session:{"studio.tips":!0,"studio.notifications":!0,"webforms.tooltip.behavior":tw.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:W_.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},d6={...NS,session:{...NS.session,...f6},welcometour:{}},sC=qn({name:"settings",initialState:d6,reducers:{setSetting(e,n){const{path:r,settingsKey:a,value:i}=n.payload;e[r][a]=i},setSettings(e,n){const{path:r,value:a}=n.payload;e[r]={...e[r],...a}},setSettingsAsText(e,n){const{path:r,settings:a}=n.payload;e[r]=a}},extraReducers(e){e.addCase(lw.fulfilled,(n,r)=>{n.project={...n.project,...r.payload.content}}),e.addCase(iC.fulfilled,(n,r)=>{n.server=r.payload,n.server.qodly&&(n.project["webforms.display-mode"]="airy")})}}),{setSetting:uC,setSettings:sp,setSettingsAsText:p6}=sC.actions,h6=sC.reducer,i_=e=>{const n=["folder","file"];return e.sort((r,a)=>r.type===a.type?r.name.localeCompare(a.name):n.indexOf(r.type)-n.indexOf(a.type))},ct=(e,n)=>e.reduce((r,a)=>a.path===n.path&&a.type===n.type?[...r,n]:a.children?[...r,{...a,children:i_(ct(a.children,n))}]:[...r,a],[]),Tr=(e,n)=>e.reduce((r,a)=>r||(a.path===n?a:a.children?Tr(a.children,n):null),null),v6=[{name:Wt.WEBFORMS,type:le.FOLDER,children:[],path:Wt.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:Wt.METHODS,type:le.FOLDER,children:[],path:Wt.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:Wt.CLASSES,type:le.FOLDER,children:[],path:Wt.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:Wt.SHARED,type:le.FOLDER,children:[],path:Wt.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:le.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:le.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:le.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:le.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],cC=qn({name:"explorer",initialState:v6,reducers:{toggleExpandFolder:(e,n)=>(e=ct(e,{...n.payload,flags:{...n.payload.flags,expanded:!n.payload.flags.expanded}}),e),expandFolder:(e,n)=>(e=ct(e,{...n.payload,flags:{...n.payload.flags,expanded:!0}}),e),openAddFileInput:(e,n)=>ct(e,{...n.payload,flags:{...n.payload.flags,adding:!0}}),addNewFile:(e,n)=>{const{parent:r,child:a}=n.payload;return ct(e,{...r,children:[a,...r.children||[]]})},removeFile:(e,n)=>{const{parent:r,child:a}=n.payload;return ct(e,{...r,children:r.children.filter(i=>i.path!==a.path)})},refreshFile:(e,n)=>{const{parent:r,child:a}=n.payload,i=(r.children||[]).filter(u=>u.path!==a.path&&!a.error);return ct(e,{...r,children:[a,...i]})},setFolderChildren:(e,n)=>{const r=Tr(e,n.payload.parentPath);return r?ct(e,{...r,children:n.payload.children}):e}},extraReducers:e=>{e.addCase(qs.pending,(n,r)=>{const{file:a,newname:i}=r.meta.arg,u=Tr(n,a.path);if(!u)return n;const c=a.path.split("/");c.pop();const f=`${c.join("/")}/${a.name}.${a.ext}`,p=`${c.join("/")}/${i}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":Xa.next({action:ka.WILL_RENAME,payload:{oldPath:f,newPath:p}});break}return ct(n,{...u,flags:{...u.flags,loading:!0}})}),e.addCase(qs.fulfilled,(n,r)=>{const{meta:{arg:{file:a}},payload:i}=r,u=Tr(n,a.path);if(!u)return n;switch(i.old.ext){case"4dm":case"4qs":Xa.next({action:ka.DID_RENAME,payload:{oldPath:i.old.path,newPath:i.new.path}});break}return ct(n,{...u,flags:{...u.flags,loading:!1}})}),e.addCase(qs.rejected,(n,r)=>{const{file:a}=r.meta.arg,i=Tr(n,a.path);return i?ct(n,{...i,flags:{...i.flags,loading:!1}}):n}),e.addCase(Po.pending,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,flags:{...i.flags,loading:!0}}):n}),e.addCase(Po.fulfilled,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,children:i_(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!0},error:null}):n}),e.addCase(Po.rejected,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!0}}):n}),e.addCase(zl.pending,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,flags:{...i.flags,loading:!0}}):n}),e.addCase(zl.fulfilled,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,children:i_(r.payload),flags:{...i.flags,loading:!1,cached:!0,expanded:!1},error:null}):n}),e.addCase(zl.rejected,(n,r)=>{const a=r.meta.arg,i=Tr(n,a);return i?ct(n,{...i,error:{message:r.payload},flags:{...i.flags,loading:!1,cached:!0,expanded:!1}}):n}),e.addCase(qf.pending,(n,r)=>{const{fileName:a,parentNode:i,path:u,type:c}=r.meta.arg;return ct(n,{...i,children:[{name:a,path:`${u}/${a}`,type:c,error:null,flags:{loading:!0},config:{}},...i.children]})}),e.addCase(qf.fulfilled,(n,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg,c=Fs(u),{editor:f,supportedEditors:p}=bo(`${a}${c?`.${c.toLowerCase()}`:""}`);return ct(n,{name:i,path:`${a}/${i}`,type:u,error:null,flags:{loading:!1},config:{editor:f,supportedEditors:p}})}),e.addCase(qf.rejected,(n,r)=>{const{path:a,fileName:i,type:u}=r.meta.arg;return ct(n,{name:i,path:`${a}/${i}`,type:u,error:{message:r.payload},flags:{loading:!1},config:{}})}),e.addCase(Vf.pending,(n,r)=>{const{node:a,parentNode:i}=r.meta.arg;return ct(n,{...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(Vf.fulfilled,(n,r)=>{const{node:a}=r.payload,{node:{path:i,ext:u}}=r.meta.arg,{editor:c,supportedEditors:f}=bo(`${i}${u?`.${u.toLowerCase()}`:""}`);return ct(n,{name:`${a.name}`,path:`${i}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:c,supportedEditors:f}})}),e.addCase(Vf.rejected,(n,r)=>{const a=r.payload,{node:i}=r.meta.arg;return ct(n,{name:`${i.name}_copy`,path:`${i.path}/${i.name}_copy`,type:i.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(Gl.pending,(n,r)=>{}),e.addCase(Gl.fulfilled,(n,r)=>{var b;const{draggedNode:a,newLocation:i}=r.meta.arg,u=dx(a.path),c=Tr(n,u),f=Tr(n,i.path),p=(b=c==null?void 0:c.children)==null?void 0:b.filter(E=>E.path!==a.path),h=i.path.split("/").length,m=a.path.split("/").length;return h>=m?(n=ct(n,{...c,children:p}),n=ct(n,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}})):(n=ct(n,{...f,children:[{...a,path:`${f.path}/${a.name}`},...f!=null&&f.children?f==null?void 0:f.children:[]],flags:{...f.flags,expanded:!0}}),n=ct(n,{...c,children:p})),n}),e.addCase(Gl.rejected,(n,r)=>{Ao.next({message:"Error moving file",kind:"danger"})}),e.addCase(Gs.pending,(n,r)=>{var C;const{fileName:a,parentNode:i,path:u,type:c,qodly:f}=r.meta.arg,p=Fs(c,f),h=`${u}/${a}${p?`.${p.toLowerCase()}`:""}`,{editor:m,supportedEditors:b}=bo(h);switch(c){case le.CLASS:case le.METHOD:Xa.next({action:ka.WILL_CREATE,payload:{filePath:h}});break}const E=(C=i.children)==null?void 0:C.filter(k=>k.path!==`${u}/${a}`),O=[{name:a,path:`${u}/${a}`,type:le.FILE,error:null,flags:{loading:!0},config:{editor:m,supportedEditors:b},ext:p,date:new Date().toISOString()},...E],R=ct(n,{...i,children:O});return FT.merge(n,R)}),e.addCase(Gs.fulfilled,(n,r)=>{const{fileName:a,path:i,type:u,qodly:c}=r.meta.arg,f=Fs(u,c),p=`${i}/${a}${f?`.${f.toLowerCase()}`:""}`,{editor:h,supportedEditors:m}=bo(p),b=ct(n,{name:a,path:`${i}/${a}`,type:le.FILE,error:null,flags:{},config:{editor:h,supportedEditors:m},ext:f,date:new Date().toISOString()});switch(u){case le.CLASS:case le.METHOD:Xa.next({action:ka.DID_CREATE,payload:{filePath:p}});break}return n=b,n}),e.addCase(Gs.rejected,(n,r)=>{const{fileName:a,path:i,type:u}=r.meta.arg,c=Fs(u),{editor:f,supportedEditors:p}=bo(`${i}${c?`.${c.toLowerCase()}`:""}`);return n=ct(n,{name:a,path:`${i}/${a}`,type:le.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:f,supportedEditors:p},ext:c,date:new Date().toISOString()}),n}),e.addMatcher(iO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!0}})),n}),e.addMatcher(uO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!1}})),n}),e.addMatcher(sO(Hl),(n,r)=>{const a=Tr(n,r.meta.arg.file.path.split(".")[0]);return a&&(n=ct(n,{...a,flags:{...a.flags,loading:!1}})),Ao.next({message:"Failed to open file, try again",kind:"danger"}),n})}}),{toggleExpandFolder:g6,expandFolder:m6,openAddFileInput:y6,addNewFile:lC,refreshFile:b6,removeFile:s_,setFolderChildren:_6}=cC.actions;function fC(e){switch(e){case le.WEBFORMS:return Nx;case le.METHODS:return`//%attributes = {}
270
270
  `;default:return""}}function dC(e,n,r){switch(n){case le.MOBILEFORM:return`${e}.MForm`;case le.WEBFORM:return`${e}.WebForm`;case le.METHOD:case le.CLASS:return`${e}.${r?"4qs":"4dm"}`;default:return e}}function w6(e){switch(e){case Wt.WEBFORMS:return le.WEBFORMS;case Wt.METHODS:return le.METHODS;case Wt.CLASSES:return le.CLASSES;case"Mobile":return le.MOBILE;default:return e}}function pC(e){switch(e){case le.WEBFORMS:return le.WEBFORM;case le.CLASSES:return le.CLASS;case le.METHODS:return le.METHOD;case le.FOLDER:return le.FOLDER;case le.MOBILE:return le.MOBILEFORM;default:return e}}const E6=xe("files/tryEditMethod",async({method:e},{dispatch:n})=>{const r=e.filePath.split("/"),[a]=r[1].split("."),{editor:i}=bo(e.filePath);return await n(fw({file:{name:a,path:e.filePath,date:new Date().toISOString(),type:le.CLASS,editor:i},line:e.startingLine+1})).unwrap()}),u_=xe("explorer/createModelFiles",async(e,{dispatch:n,getState:r})=>{var b;const a=r(),i=Wt.CLASSES,u=a.settings.server.qodly,c=Tr(a.explorer,i);if(!c)return;await n(Po(i));const p=((b=r().explorer.find(E=>E.name===i))==null?void 0:b.children)||[];let h=[{content:"",name:""}];const m=E=>{switch(E){case"dataclass":return{name:e.type==="dataclass"?e.className:"DataStore",content:u?`extends DataClass
271
271
  `:`Class extends DataClass
272
272
  `};case"collection":return{name:e.type==="dataclass"?e.collectionName:"DataStore",content:u?`extends EntitySelection
@@ -275,20 +275,20 @@ globstar while`,n,b,r,E,O),this.matchOne(n.slice(b),r.slice(E),a))return this.de
275
275
  `:`Class extends Entity
276
276
  `};case"model":return{name:"DataStore",content:u?`extends DataStoreImplementation
277
277
  `:`Class extends DataStoreImplementation
278
- `}}};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(E=>!p.find(({name:O,ext:R})=>O===E.name&&R===(u?"4qs":"4dm"))),await Promise.all(h.map(async({name:E,content:O})=>{await n(qs({type:le.CLASS,path:i,fileName:E,parentNode:c,content:O,qodly:a.settings.server.qodly}))})),await n(Po(i))}),Po=xe("explorer/fetchFolderContent",async(e,{rejectWithValue:n})=>{try{return(await ni({verb:Zt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:c}=bo(`${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:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),zl=xe("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:n})=>{try{return(await ni({verb:Zt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:c}=bo(`${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:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function S6(e){const n=e.split(".");return n.pop(),{name:n.join("."),ext:e.split(".")[e.split(".").length-1]}}const O6=xe("explorer/uploadFile",async e=>{const n=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const r=await fetch(`/rest/$upload?${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:r.status,data:await r.json()}}catch{return{status:500,data:null}}}),T6=xe("explorer/uploadFile",async({file:e,path:n,parentNode:r},{dispatch:a})=>{const{editor:i,supportedEditors:u}=bo(n),{name:c,ext:f}=S6(e.name);a(lC({parent:r,child:{name:c,path:`${n}/${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=${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return p.status>=300?(a(s_({parent:r,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),p.status!==413&&Ao.next({message:"error uploading file",kind:"danger"})):await a(Po(r.path)),{status:p.status,fileName:e.name}}catch{return a(s_({parent:r,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),Ao.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),qs=xe("explorer/createNewFile",async({fileName:e,type:n,path:r,parentNode:a,content:i},{dispatch:u,rejectWithValue:c,getState:f})=>{const{qodly:p}=f().settings.server;try{const h=await Gd({name:dC(e,n,p),content:i||fC(n),path:r,asText:[le.CLASS,le.METHOD].includes(n)});return a.error&&(a.flags.expanded?await u(Po(a.path)):await u(zl(a.path))),{qodly:p,file:h,parentNode:a}}catch{return c("failed to create folder")}});function hC(e,n){const{qodly:r=!0,withExtension:a=!0}=n||{},i=Ws(e.type,r);let u="";switch(e.type){case le.WEBFORM:u=`${Wt.WEBFORMS}/${e.name}`;break;case le.METHOD:u=`${Wt.METHODS}/${e.name}`;break;case le.CLASS:u=`${Wt.CLASSES}/${e.name}`;break;default:return""}return`${u}${a?`.${i}`:""}`}const x6=xe("explorer/createNewFileAndOpen",async(e,{dispatch:n,getState:r})=>{const a=await n(qs(e)).unwrap(),{qodly:i}=r().settings.server;if(a){const{file:u}=a,c=hC(u,{withExtension:!1,qodly:i}),{editor:f}=bo(c);await n(Hl({file:{name:e.fileName,type:u.type,path:c,editor:f,date:new Date().toISOString()}}))}}),qf=xe("explorer/createNewNode",async({fileName:e,path:n,parentNode:r},{rejectWithValue:a})=>{try{return{file:await yk({verb:Zt.CREATE_FOLDER,path:`${n}/${e}`,recursive:!0}),parentNode:r}}catch{return Ao.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),up=async e=>{try{const n=e.path.split(".").at(-1),r=await ni({verb:Zt.GET_INFO,path:e.path,content:!0,as:kT(n)?"json":"text"}),a={editor:e.editor},i=mT(e.path);i===le.METHOD&&(a.attributes=z_(r.content),r.content=wT(r.content,{}));const{content:u,date:c,ext:f}=r;return{date:c,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(n){const{data:r}=n;if(r.__ERROR.find(a=>a.errCode===TT.FILE_NOT_FOUND))switch(e.path){case Ur:{const a={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:le.ROLES,initialContent:a,content:a}}case oi:{const a={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:le.SETTINGS,initialContent:a,content:a}}}throw n}},Hl=xe("explorer/openFile",async({file:e,inactive:n},{getState:r,dispatch:a})=>{const{root:{tabs:i},roles:u}=r(),c=i.find(({path:h})=>e.path===h);if(c){const h={...c,extra:{...c==null?void 0:c.extra,editor:e.editor}};return a(wn(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,E={name:e.name,type:le.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(wn(E)),E}}const f=await up(e);return e.path===Ur&&!u.flags.touched?a(uw({content:f.content,date:f.date})):e.path===oi&&a(sp({path:"project",value:f.content})),a((n?KC:wn)(f)),f}),fw=xe("explorer/openFileAtLine",async({file:e},{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.find(({path:c})=>e.path===c);if(i){const c={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(wn(c)),c}const u=await up(e);return r(wn(u)),u}),vC=xe("explorer/injectContentAtLine",async(e,{getState:n,dispatch:r,rejectWithValue:a})=>{const i=n();e.path.split("/").pop();const c=Tr(i.explorer,e.path);if(!c)return a(`Error while trying to inject content in file ${e.path}`);const f=await up({name:c.name,date:c.date||new Date().toISOString(),path:`${c.path}.${c.ext}`,type:le.CLASS,editor:c.config.editor});return await r(wn(f)),{...e,path:`${c.path}.${c.ext}`}}),gC=xe("explorer/openFileAtSelection",async({file:e},{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.find(({path:c})=>e.path===c);if(i){const c={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(wn(c)),c}const u=await up(e);return r(wn(u)),u}),c_=xe("explorer/deleteFile",async e=>{const{name:n,type:r,path:a,flags:i}=e;if(i.error)return{deleted:!0,node:e};const u=a.split("/");return u.pop(),{deleted:await dk({root:Hs.ROOT,type:pC(r),verb:Zt.DROP,name:n,path:u.join("/")}),node:e}}),C6=xe("explorer/deleteFolder",async e=>{const{path:n,flags:r}=e;if(r.error)return{deleted:!0,node:e};const{deleted:a}=await OT({force:!0,path:n,verb:Zt.REMOVE_ITEM});return{deleted:a,node:e}}),R6=xe("explorer/removeFileNode",async e=>{const{ext:n,path:r}=e;return await OT({verb:Zt.REMOVE_ITEM,path:`${r}.${n}`,force:!0}),r==="Classes/DataStore"&&vf(),{deleted:!0,node:e}}),Vs=xe("explorer/renameFile",async({file:e,newname:n})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const i=`${a.join("/")}/${e.name}.${e.ext}`,u=`${a.join("/")}/${n}.${e.ext}`;return await B1({verb:Zt.MOVE_ITEM,path:i,newpath:u}),{old:{...e,path:i},new:{...e,name:n,path:u}}}const r=e.path.split("/");return r.pop(),await B1({verb:Zt.MOVE_ITEM,path:`${r.join("/")}/${e.name}`,newpath:`${r.join("/")}/${n}`}),{old:e,new:{...e,name:n,path:`${r.join("/")}/${n}`}}}),Gl=xe("explorer/relocateNode",async({draggedNode:e,newLocation:n},{rejectWithValue:r})=>{try{await B1({verb:Zt.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${n.path}/${e.name}.${e.ext}`})}catch{return r("can't move item")}}),Vf=xe("explorer/duplicateNode",async({node:e,duplicateName:n},{rejectWithValue:r,fulfillWithValue:a,getState:i})=>{const u=e.path.split("/");u.pop();try{const{tabs:c}=i().root,f=c.find(({path:b})=>b===`${e.path}${e.ext?`.${e.ext}`:""}`),p=["4dm","4qm","4qs"].includes(e.ext),{content:h}=f||await ni({verb:Zt.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:p?"text":"json"}),m=await Gd({name:`${n}.${e.ext}`,content:h,path:u.join("/"),asText:p});return a({node:{...m,path:u.join("/")}})}catch{return r("failed to duplicate file")}}),A6=xe("explorer/executeMethod",async({methodName:e,params:n=[],resultingDataSource:r={},namespace:a=""},{rejectWithValue:i})=>{var u,c;try{const p=await window.Method4D.buildMethod({methodName:e,parameters:n,resultingDataSource:r},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return p!=null&&p.__NOTIFICATION?Ao.next({message:`${((u=p.__NOTIFICATION)==null?void 0:u.message)||""}`,kind:`${((c=p.__NOTIFICATION)==null?void 0:c.type)||"info"}`}):Ao.next({message:"Method executed Successfully",kind:"message"}),p}catch(f){return Ao.next({message:f.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),i("can't execute method")}}),P6=xe("files/fetchFiles",async()=>lk(Hs.WEBFORMS,Hs.METHODS,Hs.CLASSES)),dw=xe("tabs/renameDatasource",async(e,{dispatch:n,getState:r})=>{var O,R;const a=!!e.datasourceNamespace,{confirmed:i}=await n(Eo({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:Hn.CONFIRM,color:Ga.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:c,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(bn("path",h));if(b=(R=(O=C==null?void 0:C.content)==null?void 0:O.metadata)==null?void 0:R.datasources,!b)return null}const E=new RegExp(`^${c}\\b`,"");if(b=b.map(C=>{const k=(U_(C)||!bT(C))&&C.from&&E.test(C.from),j=C.events?C.events.map(F=>{var D,M,S,q;switch(F==null?void 0:F.type){case"method":{const U=F;return U.params?{...U,params:U.params.map(V=>{var Ee;return{...V,datasource:(Ee=V.datasource)==null?void 0:Ee.replace(new RegExp(`^${c}`,""),p)}}),returns:(D=U.returns)!=null&&D.datasource?{...U.returns,datasource:(M=U.returns.datasource)==null?void 0:M.replace(new RegExp(`^${c}`,""),p)}:U.returns}:U}case"simple-action":{const U=F;return U.datasource?{...U,datasource:{...U.datasource,name:(S=U.datasource.name)==null?void 0:S.replace(new RegExp(`^${c}`,""),p),from:(q=U.datasource.from)==null?void 0:q.replace(new RegExp(`^${c}`,""),p)}}:U}default:return F}}):C.events;return C.id===c?{...C,id:p,events:j}:k&&C.from?{...C,from:C.from.replace(new RegExp(`^${c}`,""),p),events:j}:{...C,events:j}}),u){const C=a?`${f}:${c}`:`${c}`,k=a?`${f}:${p}`:`${p}`;hT.next({path:h??"",action:F_.RENAME,old_reference:C,new_reference:k,is_shared:a})}return{path:h,namespace:f,datasources:b}}),pw=xe("tabs/edit-datasource",(e,{getState:n})=>{var u,c;const r=n();let a=[];if(e.namespace)a=r.sharedDatasources.sources[e.namespace];else{const f=r.root.tabs.find(bn("path",e.path));f&&(a=((c=(u=f.content)==null?void 0:u.metadata)==null?void 0:c.datasources)||[])}return a.map(f=>f.id===e.datasourceId?Object.assign({},f,{[e.propertyKey]:e.value}):f)}),mC=xe("tabs/fetchChanges",async(e,{getState:n})=>{const a=cu(n()).filter(i=>[le.METHOD,le.CLASS].includes(i.type));return ST(...a.map(i=>{const[u]=i.path.split("/").filter(Boolean);return{name:i.name,type:i.type,root:u,path:"."}}))}),D6=xe("files/saveAll",async(e,{getState:n,dispatch:r})=>{const a=Z_(n());for(const i of a)r(Ys({tab:i}))}),hw=xe("files/tryCloseTab",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.findIndex(c=>c.path===e);if(i===-1)return!1;const u=a[i];if(u!=null&&u.flags.touched){const{confirmed:c}=await r(Eo({title:qd(u),message:"Your unsaved changes will be lost. Proceed anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!c)return!1}return r(UC(i)),u.path===Ur&&u.flags.touched&&(async()=>{const f=await ni({verb:Zt.GET_INFO,path:Ur,content:!0,as:"json"});r(uw({content:f.content,date:f.date}))})(),!0}),I6=xe("files/tryCloseOtherTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root;if(a.some(u=>u.path!==e&&u.flags.touched===!0)){const{confirmed:u}=await r(Eo({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(qC(e))}),M6=xe("files/tryCloseAllTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root;if(a.some(u=>u.flags.touched===!0)){const{confirmed:u}=await r(Eo({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(HC())}),k6=xe("files/tryCloseRightTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().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(Eo({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(GC(e))}),$6=xe("files/tryCloseLeftTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().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(Eo({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(VC(e))}),l_=xe("files/reloadTab",async(e,{dispatch:n})=>{if(e.flags.touched){const{confirmed:i}=await n(Eo({title:qd(e),message:"Changes made to the file will be lost. Continue?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!i)return}const r=px(e.path),a=await ni({verb:Zt.GET_INFO,path:e.path,content:!0,as:r});if(e.path===Ur){const{roles:i,privileges:u}=ap(a.content);n(cw({roles:i,privileges:u})),n(ww({path:e.path,flags:{old:!1}}))}else if(e.path===oi){const{content:i}=a;n(sp({path:"project",value:i}))}else{const{content:i}=a;return e.type===le.WEBFORM?KM.next({path:e.path,action:pT.RELOAD,payload:i.components}):e.type===le.MODEL&&_x.next({action:"reload",payload:i}),a}}),Ys=xe("files/saveTab",async({tab:e},{dispatch:n,getState:r})=>{const{path:a,content:i}=e;if(e.type===le.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const c=await ST({path:a});if(c.files[0]){const m=new Date(e.date),b=new Date(c.files[0].date);if(m.getTime()<b.getTime()){const{confirmed:E}=await n(Eo({title:qd(e),message:"New content has been found on the server. Are you sure you want to continue?",type:Hn.CONFIRM,icon:"FaSave"})).unwrap();if(!E)return n(ww({path:a,flags:{old:!0}})),null}}const f=await bk({verb:Zt.SAVE_CONTENT,content:N6(e,r()),path:a});(e.type===le.CLASS||e.type===le.MODEL)&&vf();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}]:[]}}),N6=(e,n)=>{switch(!0){case e.path==="settings.json":case e.path===oi:return n.settings.project;case e.type===le.ROLES:return aw(n.roles);case e.type===le.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},jS=async e=>{if(e.type===le.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const n=e.path.split("/").filter(Boolean)[0],r=await fk({root:n,type:e.type,verb:Zt.GET,name:e.name}),a={};r.type===le.METHOD&&(a.attributes=z_(r.content));const{date:i,name:u,type:c,content:f}=r;return{date:i,flags:{enabled:e.type===le.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:u,path:e.path,type:c,initialContent:f,content:c===le.MODEL?MT(f):f}},yC=xe("files/tryInjectMethod",async({type:e,dataclass:n},{getState:r,dispatch:a})=>{const{root:{tabs:i},settings:{server:{qodly:u}}}=r(),c=Ws("class",u);let f="",p="",h=null;if(!n)f="DataStore",p=`Classes/DataStore.${c}`;else switch(e){case"dataclass":f=n,p=`Classes/${n}.${c}`;break;case"collection":f=`${n}Selection`,p=`Classes/${n}Selection.${c}`;break;case"entity":f=`${n}Entity`,p=`Classes/${n}Entity.${c}`;break;default:return h}const m=i.find(bn("path",p));if(m)return a(wn(m)),m;try{h=await jS({name:f,date:new Date().toISOString(),path:`class/${f}.${c}`,type:le.CLASS})}catch{n?await a(u_({type:"dataclass",className:n,collectionName:`${n}Selection`,toCreate:e})):await a(u_({type:"model"}))}return h=await jS({name:f,date:new Date().toISOString(),path:`class/${f}.${c}`,type:le.CLASS}),h.path=p,a(wn(h)),h}),j6=xe("roles/open",async(e,{dispatch:n,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path===Ur);if(i)return n(wn(i)),i;n(Sd())}),{debugger:Ls={meta:{state:Na.DETACHED},list:[],sessions:[],expressions:[]}}=nu();var HS,GS;const L6={meta:{...Ls.meta,state:((HS=Ls.meta)==null?void 0:HS.state)===Na.ATTACHED?(GS=Ls.meta)==null?void 0:GS.state:Na.DETACHED},list:Ls.list||[],sessions:Ls.sessions||[],expressions:Ls.expressions||[]};function LS(e,n){const{line:r,offset:a,type:i="saved"}=n;e.breakpoints[i].locations.push({line:r}),Bt.isNumber(a)&&(e.breakpoints[i].offset=a)}function FS(e,n,r,a){e.breakpoints[r].locations=n,Bt.isNumber(a)&&(e.breakpoints[r].offset=a)}function WS({filePath:e,fileType:n,methodName:r,className:a,ext:i,source:u}){return{filePath:e,fileType:n,methodName:r,className:a,ext:i,source:u,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function BS(e,n,r){let a=!1;const i=e.map(u=>u[r]!==n[r]?u:(a=!0,{...u,...n}));return a?i:[...i,n]}function kf(e){return e.map(({label:n})=>({label:n}))}const bC=qn({name:"debugger",initialState:L6,reducers:{addBreakpointDecoration(e,n){const{filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f,breakpoint:p}=n.payload,h=Ps(e.list,r,i,u);if(h)LS(h,p);else{if(a===le.CLASS&&p.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${u} class.`);const m=WS({filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f});LS(m,p),e.list.push(m)}},removeBreakpointDecoration(e,n){const{filePath:r,methodName:a,line:i,offset:u=0,type:c="saved"}=n.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[c].offset||0;h.breakpoints[c].locations=h.breakpoints[c].locations.filter(b=>b.line+m!==p),c==="saved"&&(h.breakpoints.draft.locations=h.breakpoints.draft.locations.filter(b=>b.line+m!==p))})}}else{const f=Ps(e.list,r,a);f&&(f.breakpoints[c].locations=f.breakpoints[c].locations.filter(p=>p.line!==i),c==="saved"&&(f.breakpoints.draft.locations=f.breakpoints.draft.locations.filter(p=>p.line!==i)))}},setBreakpointsDecoration(e,n){const{filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f,breakpoints:p,offset:h,type:m="saved",clearDraft:b}=n.payload,E=Ps(e.list,r,i);if(E)FS(E,p,m,h),b&&m!=="draft"&&(E.breakpoints.draft.locations=[]);else{const O=WS({filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f});FS(O,p,m,h),e.list.push(O)}},clearBreakpoints(e,n){const{filePath:r,type:a="saved"}=n.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,n){const{threadId:r,line:a,highlight:i}=n.payload,u=dr(e.sessions,r);u&&(u.activeLine=a,i&&(u.highlightedLines={start:a,end:a}))},addExpression(e,n){const{threadId:r,label:a,save:i}=n.payload,u=dr(e.sessions,r);u&&u.stopped&&(u.expressions=[...u.expressions||[],{label:a}],i&&(e.expressions=kf(u.expressions)))},removeExpression(e,n){const{threadId:r,index:a,save:i}=n.payload,u=dr(e.sessions,r);u&&(u.expressions=u.expressions.filter((c,f)=>f!==a),i&&(e.expressions=kf(u.expressions)))},removeAllExpressions(e,n){const{threadId:r,save:a}=n.payload,i=dr(e.sessions,r);i&&(i.expressions=[],a&&(e.expressions=[]))},renameExpression(e,n){const{threadId:r,index:a,replacement:i,save:u}=n.payload,c=dr(e.sessions,r);c&&c.expressions[a]&&(c.expressions[a].label=i,u&&(e.expressions=kf(c.expressions)))},setExpression(e,n){const{threadId:r,expression:a}=n.payload,i=dr(e.sessions,r);if(i){const u=a.index>=0?a.index:i.expressions.length>0?i.expressions.length-1:0,c=i.expressions[u];c?(c.result=a.result,c.nakedResult=a.nakedResult,c.variablesReference=a.variablesReference||0,c.presentationHint=a.presentationHint):i.expressions.push(a)}},updateExpressionAt(e,n){const{threadId:r,index:a,value:i}=n.payload,u=dr(e.sessions,r);if(u){const c=u.expressions[a];c&&(c.result=`"${i}"`,c.nakedResult=i)}},saveExpressions(e,n){const{expressions:r}=n.payload;e.expressions=kf(r)},addSession(e,n){const{threadId:r,channelId:a,stackFrames:i,exceptions:u=[]}=n.payload,c=dr(e.sessions,r),f=i[0],{expressions:p=[]}=e;if(c)c.expressions=p;else{const h=V_(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,n){const{threadId:r,changes:a}=n.payload;e.sessions=e.sessions.map(i=>i.threadId===r?{...i,...a}:i)},removeSession(e,n){const{threadId:r}=n.payload;e.sessions=e.sessions.filter(a=>a.threadId!==r)},removeSessionByIndex(e,n){const r=n.payload;e.sessions.splice(r,1)},setSessions(e,n){const r=n.payload;e.sessions=r},setCallChainVariables(e,n){const{threadId:r,frameId:a,variables:i}=n.payload;e.sessions=e.sessions.map(u=>{var c;return u.threadId===r?{...u,variables:{...u.variables,callchain:BS((c=u.variables)==null?void 0:c.callchain,{frameId:a,items:i},"frameId")}}:u})},setExpressionVariables(e,n){const{threadId:r,variablesReference:a,variables:i}=n.payload;e.sessions=e.sessions.map(u=>{var c;return u.threadId===r?{...u,variables:{...u.variables,expressions:BS((c=u.variables)==null?void 0:c.expressions,{variablesReference:a,items:i},"variablesReference")}}:u})},setSourceContent(e,n){const{threadId:r,content:a}=n.payload,i=dr(e.sessions,r);i&&(i.currentStackFrame.source={...i.currentStackFrame.source,content:a})},setDebuggerMeta(e,n){if(n.payload.state===Na.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:r,error:a={code:null,reason:"",type:pd.SOCKET_ERROR}}=n.payload;if((r||e.meta.state!==Na.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===pd.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===Na.DETACHED)return}e.meta.state=n.payload.state}},extraReducers:e=>{e.addCase(wC.fulfilled,n=>{n.sessions=[]})}}),{addBreakpointDecoration:F6,removeBreakpointDecoration:W6,setBreakpointsDecoration:B6,clearBreakpoints:U6,setActiveLine:z6,addExpression:H6,renameExpression:G6,removeExpression:q6,removeAllExpressions:V6,setExpression:Y6,updateExpressionAt:K6,saveExpressions:X6,addSession:J6,updateSession:Z6,removeSession:Q6,removeSessionByIndex:eF,setSessions:_C,setCallChainVariables:tF,setExpressionVariables:rF,setSourceContent:nF,setDebuggerMeta:oF}=bC.actions,wC=xe("files/wipeDebuggerSessions",async(e,{getState:n,dispatch:r})=>{const{sessions:a}=n().debugger;for(const{threadId:i}of a){const u=V_(i);r(hw(u))}}),EC=xe("files/removeDebuggerSessionsNotIn",async(e,{getState:n,dispatch:r})=>{const{threadIds:a}=e,{sessions:i}=n().debugger,u=[],c=i.filter(f=>{const p=a.includes(f.threadId);return p||u.push(f.threadId),p});return r(_C(c)),{staleThreadIds:u}});var vw=(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))(vw||{}),Ia=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Ia||{});const aF=e=>["string","uuid","number","long"].includes(e.type),iF=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],sF=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],uF=[{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"}],cF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],lF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],fF=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],SC=_n("model/add-dataclass"),OC=_n("model/rename-dataclass"),TC=_n("model/remove-dataclass"),xC=_n("model/add-attribute"),dF=_n("model/edit-attribute-property"),CC=_n("model/remove-attribute"),RC=_n("model/rename-attribute"),AC=_n("model/edit-primary-key"),pF=_n("model/edit-dataclass-property"),PC=_n("model/rename-collection"),hF=(e,n)=>({toJSON:!0,extraProperties:n,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 Yf(e,n,r){const a=e;let i=0;for(;r[`${a}${i||""}`];)i++;return`${a}${i||""}`}const ql=e=>e.kind===Ia.RELATEDENTITY,Od=e=>e.kind===Ia.RELATEDENTITIES,vF=e=>Od(e)||ql(e),gw=xe("models/fetch",async()=>{try{return(await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_INFO,path:B_,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),Td=xe("models/save",async(e,{getState:n,rejectWithValue:r})=>{const{tabs:a}=n().root,i=a.find(u=>u.path===B_);if(!i)return r("Error while saving the model");try{const u=await hr(en,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return vf(),{...u,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return r("Error while saving the model")}}),gF=xe("models/open",async(e,{dispatch:n,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path==="models/main");if(i)return n(wn(i)),i;n(gw())}),mF=xe("model/rename-dataclass",async(e,{getState:n,dispatch:r})=>{var b,E;const{dataclassId:a,selectionId:i,name:u}=e;let c=n();const f=c.explorer.find(O=>O.path===Wt.CLASSES);if(!f)throw new Error("Classes folder was not found!");await r(Po(f.path)),c=n();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`}};(E=(b=c.explorer.find(O=>O.path===Wt.CLASSES))==null?void 0:b.children)==null||E.forEach(O=>{O.name===p.class.filename_update&&(p.class.newNameTaken=!0),O.name===p.entity.filename_update&&(p.entity.newNameTaken=!0),O.name===p.selection.filename_update&&(p.selection.newNameTaken=!0),O.name===a?(p.class.found=!0,p.class.file=O):O.name===`${a}Entity`?(p.entity.found=!0,p.entity.file=O):O.name===i&&(p.selection.found=!0,p.selection.file=O)});const h=Object.entries(p).reduce((O,R)=>{const[C,k]=R;return k.found?k.newNameTaken?[...O,{type:"error",message:`Cannot rename ${C} file to ${k.filename_update} because it already exists. The existing file will be used instead!`}]:O:[...O,{type:"warning",message:`${a} ${C} file was not found`}]},[]);h.length>0&&r(Eo({message:"The following errors were encountered during dataclass rename:",views:{tips:h}}));const m=Object.values(p).filter(O=>O.found&&O.file&&!O.newNameTaken);await Promise.all(m.map(async O=>await r(Vs({file:O.file,newname:O.filename_update})))),m.length>0&&r(Po("Classes"))}),nf={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},yF={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[nf.DATACLASS_DELETE]:!0,[nf.DATACLASS_DRAGGABLE]:!0}},DC=qn({name:"Models",initialState:yF,reducers:{setModelFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(SC,({draft:{dataClasses:n}},r)=>{var c,f;const{dataclassID:a}=r.payload,i=Yf(a||"DataClass","className",n),u={className:i,collectionName:`${i}Selection`,attributes:[{name:"ID",kind:Ia.STORAGE,type:vw.LONG,scope:"public",indexKind:"auto",unique:!0,primKey:!0,autosequence:!0}],name:i,scope:"public",extraProperties:{position:{x:((c=r.payload.position)==null?void 0:c.x)||0,y:((f=r.payload.position)==null?void 0:f.y)||0}}};n[u.name]=u}).addCase(TC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a}=r.payload;n[a]&&(delete n[a],Object.values(n).forEach(u=>{u.attributes=u.attributes.filter(c=>c.type!==a&&c.type!==u.collectionName)}))}).addCase(OC,({draft:{dataClasses:n,collections:r}},a)=>{const{dataclassID:i,newName:u}=a.payload;if(!n[i]||n[u])return;const c=n[i].collectionName,f=Yf(`${u}Selection`,"collectionName",r);Object.values(n).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===c&&(h.type=f)})})}).addCase(xC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeName:i,attributeType:u,attributeKind:c,target:f}=r.payload;if(!n[a]||ek("name",i,n[a].attributes))return;const h={name:i,kind:c,type:u,exposed:!0,scope:"public"};if(c===Ia.RELATEDENTITY){if(!n[u])return;h.path=u;const b={name:Yf(n[u].collectionName,"name",n[u].attributes),type:n[a].collectionName,kind:Ia.RELATEDENTITIES,reversePath:!0,path:i,scope:"public",exposed:!0};n[u].attributes.push(b)}else if(c===Ia.RELATEDENTITIES){const m=n[u];if(!m)return;const b=m.attributes.find(bn("name",f));if(b){if(!ql(b)||b.type!==n[a].className)return}else{h.path=f,h.reversePath=!0,h.type=u;const E={name:f,kind:Ia.RELATEDENTITY,scope:"public",path:m.className,type:m.className,exposed:!0};m.attributes.push(E)}}n[a].attributes.push(h)}).addCase(RC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeID:i,newName:u}=r.payload,c=n[a].attributes.find(bn("name",i)),f=n[a].attributes.find(bn("name",u));!c||f||Object.values(n).forEach(({collectionName:p,attributes:h,className:m})=>{h.forEach(b=>{ql(c)&&Od(b)&&b.type===p&&b.path===i&&(b.path=u),m===a&&b.name===i&&(b.name=u)})})}).addCase(CC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeID:i}=r.payload;if(!n[a])return;const u=n[a].attributes.find(bn("name",i));u&&(ql(u)&&Object.values(n).forEach(c=>{c.attributes=c.attributes.filter(f=>!(Od(f)&&f.type===c.collectionName&&f.path===u.name))}),n[a].attributes=n[a].attributes.filter(JM("name",i)))}).addCase(PC,({draft:{dataClasses:n,collections:r}},a)=>{const{dataclassID:i,collectionName:u}=a.payload;if(!n[i])return;const c=n[i].collectionName;r[u]||(n[i].collectionName=u,r[u]=n[i],delete r[c],Object.values(n).forEach(f=>f.attributes.forEach(p=>{p.type===c&&(p.type=u)})))}).addCase(AC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,newPrimKey:i}=r.payload;n[a]&&n[a].attributes.forEach(u=>{u.name===i?u.primKey=!0:u.primKey=!1})}),e.addCase(gw.fulfilled,(n,r)=>{var c;const a={},i={},u=r.payload.extraProperties||{};(c=r.payload.dataClasses)==null||c.forEach(f=>{a[f.name]=f,i[f.collectionName]=f}),n.draft.dataClasses=a,n.draft.collections=i,n.draft.extraProperties=u,n.model.dataClasses=a,n.model.collections=i,n.model.extraProperties=u}),e.addCase(Td.pending,()=>{}).addCase(Td.fulfilled,(n,r)=>{const a={},i={},u=r.payload.content.extraProperties||{};r.payload.content.dataClasses.forEach(c=>{a[c.name]=c,i[c.collectionName]=c}),n.draft.dataClasses=a,n.draft.collections=i,n.draft.extraProperties=u,n.model.dataClasses=a,n.model.collections=i,n.model.extraProperties=u})}}),{setModelFlag:bF}=DC.actions,_F=()=>Ua(e=>e.model.draft.dataClasses),wF=()=>Ua(e=>e.model.draft.collections),EF=e=>Ua(n=>n.model.draft.dataClasses[e]),SF=(e,n)=>Ua(r=>r.model.draft.dataClasses[e].attributes.find(bn("name",n))),OF=()=>Ua(e=>e.model.draft.extraProperties),TF=()=>{const e=Ua(i=>i.model.flags),n=i=>i in e?e[i]:void 0,r=n(nf.DATACLASS_DELETE),a=n(nf.DATACLASS_DRAGGABLE);return{deleteDataclass:r,draggableDataclass:a,flags:e}},xF=DC.reducer;function m1(e,n){const r=e.tabs.find(({path:a})=>a===oi);r&&(r.flags.touched=n)}const IC={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},{webforms:$f}=nu(),MC={[IC.SIDEBAR_SECTION_RESIZABLE]:!0},kC={...$f,templates:{data:[],selectedGroup:""},datasources:{...G_.webforms.datasources,...$f==null?void 0:$f.datasources},flags:MC},$C=qn({name:"webforms",initialState:kC,reducers:{toggleInspector:(e,n)=>{const{type:r}=n.payload;e.inspector[r].active=!e.inspector[r].active,e.inspector[r].active||(e.inspector[r].data=void 0)},inspect:(e,n)=>{const{type:r,data:a}=n.payload;e.inspector[r].active&&(e.inspector[r].data=a)},addComponent:(e,n)=>{e.components.push(n.payload)},editComponent:(e,n)=>{const{id:r,changes:a}=n.payload;e.components=e.components.map(i=>i.id===r?{...i,...a}:i)},removeComponent:(e,n)=>{const{payload:r}=n,a=e.components.findIndex(i=>i.id===r);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,n)=>{e.templates.selectedGroup=n.payload.selectedGroup},setTemplatesData:(e,n)=>{e.templates.data=n.payload},setTemplateData:(e,n)=>{const{group:r,components:a}=n.payload,i=e.templates.data.find(u=>u.group===r);i&&(i.components=a)},setDatasourcesTheme:(e,n)=>{e.datasources.theme=n.payload},setWebformsFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(BC.fulfilled,(n,r)=>{n.components=r.payload})}}),{toggleInspector:CF,inspect:RF,addComponent:NC,editComponent:jC,removeComponent:LC,setSelectedGroup:AF,setTemplatesData:FC,setTemplateData:WC,setDatasourcesTheme:PF,setWebformsFlag:DF}=$C.actions,IF=$C.reducer,mw=Bt.curry((e,n)=>{var i,u;const r={...n.sharedDatasources.sources},a=(u=((i=n.root.tabs.find(bn("path",e)))==null?void 0:i.content).metadata)==null?void 0:u.datasources;return a&&(r[e]=a),Bt.cloneDeep(r)}),MF=xe("webforms/fetchTemplates",async(e,{dispatch:n,getState:r})=>{const{data:a}=r().webforms.templates;if(!Bt.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 n(FC(u)),u}catch{return[]}}),kF=xe("webforms/fetchTemplate",async({name:e},{dispatch:n,getState:r})=>{const{data:a}=r().webforms.templates,i=a.find(u=>u.group===e);if(i&&!Bt.isEmpty(i.components))return i.components;try{const c=await(await fetch(`${i==null?void 0:i.link}?t=${Date.now()}`)).json();return n(WC({group:e,components:c})),c}catch{return[]}}),BC=xe("webforms/fetchCraftedComponents",async(e,{rejectWithValue:n})=>{try{return(await ni({path:"WebForms/crafted_components.json",verb:Zt.GET_INFO,content:!0,as:"json"})).content}catch{return n("Error while loading the crafted components")}}),$F=xe("webforms/addCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(NC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while adding the crafted component")}}),NF=xe("webforms/editCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(jC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while editing the crafted component")}}),jF=xe("webforms/removeCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(LC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while removing the crafted component")}}),yw=xe("datasources/add-datasource",async(e,{getState:n,rejectWithValue:r})=>{var a,i;try{const u=n(),c=e.datasource,f=!!c.namespace,p=[];if(f){const h={...u.sharedDatasources.sources,[c.namespace]:[...u.sharedDatasources.sources[c.namespace],c]};p.push(...h[c.namespace]),await ri(h)}else(((i=(a=u.root.tabs.find(bn("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]).push(c);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")}}),bw=xe("datasources/edit-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const{namespace:a,path:i}=e,u=n(),c=!!e.namespace,f=mw(i,u);let p=Bt.defaultTo(f[a||i],[]);return p=p.map(h=>h.id===e.id?{...h,[e.property]:e.value}:h),c&&await ri({...u.sharedDatasources.sources,[e.namespace]:p}),{list:p,path:e.path,namespace:e.namespace}}catch{r(`Error while editing datasource ${e.id}`)}}),LF=e=>e.type===Ks.fulfilled.type,Ks=xe("datasources/rename-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const a=n(),i=!!e.namespace,u=e.namespace||e.path,c=mw(e.path,a),f=Bt.defaultTo(c[u],[]),p=new RegExp(`^${e.id}\\b`,"");if(f.forEach(h=>{var b;const m=(U_(h)||!bT(h))&&h.from&&p.test(h.from);e.updateRefs&&((b=h.events)==null||b.forEach(E=>{var O,R,C,k,j;switch(E.type){case"method":{const F=E;F.params.forEach(D=>{D.datasource&&Object.assign(D,{datasource:D.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),F.returns&&Object.assign(F.returns,{datasource:(R=(O=F.returns)==null?void 0:O.datasource)==null?void 0:R.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const F=E;F.datasource&&Object.assign(F.datasource,{name:(C=F.datasource.name)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(k=F.datasource.from)==null?void 0:k.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(j=F.datasource.target)==null?void 0:j.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=fd({id:e.id,namespace:e.namespace}),m=fd({id:e.new_name,namespace:e.namespace});hT.next({path:e.path??"",action:F_.RENAME,old_reference:h,new_reference:m,is_shared:i})}return i&&await ri({...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}`)}}),Vl=xe("datasources/delete-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const a=n(),i=!!e.namespace,u=e.namespace||e.path,f=mw(e.path,a)[u].filter(ZM(e.id));return i&&await ri({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while removing datasource ${e.id}`)}}),y1=nu(),FF={filesLoading:!1,tabs:y1.tabs||[],activeTab:y1.activeTab,recent:y1.recent||[]},_w=qn({name:"root",initialState:FF,reducers:{setPanelState(e,n){const{path:r,...a}=n.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,n){var u;const{payload:{path:r,datasourceDef:a}}=n,i=e.tabs.find(c=>c.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 n={date:new Date().toISOString(),flags:{},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:oi,type:le.SETTINGS,initialContent:{},content:{}};let r=e.tabs.find(a=>a.path===n.path);if(r||(e.tabs.push(n),r=e.tabs[e.tabs.length-1]),e.activeTab!==n.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=n.path,r.weight=((a==null?void 0:a.weight)||0)+1}},removeDataSource(e,n){const{path:r,datasourceID:a}=n.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,n){const{payload:{path:r,datasourceArr:a}}=n;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,n){e.tabs=n.payload},closeTab(e,n){const r=n.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,n){e.tabs=e.tabs.filter(r=>r.path===n.payload),e.activeTab=n.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,n){e.tabs.splice(n.payload+1),e.activeTab=e.tabs[n.payload].path},closeLeftTabs(e,n){e.tabs.splice(0,n.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:r}})=>r);const n=e.tabs.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null);e.activeTab=(n==null?void 0:n.path)||""},selectTab(e,n){const r=e.tabs.find(({path:i})=>i===n.payload);if(!r||e.activeTab===n.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=n.payload},openTabUnselected(e,n){const r=n.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,c)=>(c==null?void 0:c.weight)>((u==null?void 0:u.weight)||0)?c:u,null);a.weight=i?(i.weight||0)+1:1,a.extra={...a.extra,...r.extra}},selectTabByReference(e,n){const r=n.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,c)=>(c==null?void 0:c.weight)>((u==null?void 0:u.weight)||0)?c:u,null);e.activeTab=r.path,a.weight=((i==null?void 0:i.weight)||0)+1}a.extra={...a.extra,...r.extra}},setContent(e,n){const{path:r,content:a,contentPath:i}=n.payload;e.tabs=e.tabs.map(u=>{if(u.path!==r)return u;let c=!1;if(typeof a=="string")c=u.initialContent!==a;else{const f=JSON.stringify(Bt.get(u.initialContent,i||"",u.initialContent)),p=JSON.stringify(Bt.get(a,i||"",a));c=f!==p}return a&&typeof a=="object"&&(i?Bt.set(u.content,i,a):u.content=a),typeof a=="string"&&(u.content=a),{...u,flags:{...u.flags,touched:c}}})},setTabFlags(e,n){const{path:r,flags:a}=n.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,...a}}:i)},setTabsFlags(e,n){const{tabs:r,flags:a}=n.payload;e.tabs=e.tabs.map(i=>r.includes(i.path)?{...i,flags:{...i.flags,...a}}:i)},setTabExtra(e,n){const{path:r,extra:a,flags:i}=n.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,n){const{path:r,styles:a=[]}=n.payload,i=e.tabs.find(u=>u.path===r);if(i){const u=i.content.metadata.styles.map(({name:f})=>f),c=a.filter(({name:f})=>!u.includes(f));i.content.metadata.styles=[...i.content.metadata.styles,...c].map(({scope:f,...p})=>({...p}))}},changeTabEditor(e,n){return e.tabs=e.tabs.map(r=>r.path===n.payload.path?n.payload:r),e}},extraReducers:e=>{e.addCase(vC.fulfilled,(n,r)=>{if(!r.payload)return;const{content:a,line:i,path:u}=r.payload,c=n.tabs.find(f=>f.path===u);if(c&&typeof c.content=="string"){const f=c.content.trim().split(`
278
+ `}}};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(E=>!p.find(({name:O,ext:R})=>O===E.name&&R===(u?"4qs":"4dm"))),await Promise.all(h.map(async({name:E,content:O})=>{await n(Gs({type:le.CLASS,path:i,fileName:E,parentNode:c,content:O,qodly:a.settings.server.qodly}))})),await n(Po(i))}),Po=xe("explorer/fetchFolderContent",async(e,{rejectWithValue:n})=>{try{return(await ni({verb:Zt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:c}=bo(`${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:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),zl=xe("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:n})=>{try{return(await ni({verb:Zt.GET_INFO,path:e})).map(a=>{const i=`${e}/${a.name}`,{editor:u,supportedEditors:c}=bo(`${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:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function S6(e){const n=e.split(".");return n.pop(),{name:n.join("."),ext:e.split(".")[e.split(".").length-1]}}const O6=xe("explorer/uploadFile",async e=>{const n=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const r=await fetch(`/rest/$upload?${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:r.status,data:await r.json()}}catch{return{status:500,data:null}}}),T6=xe("explorer/uploadFile",async({file:e,path:n,parentNode:r},{dispatch:a})=>{const{editor:i,supportedEditors:u}=bo(n),{name:c,ext:f}=S6(e.name);a(lC({parent:r,child:{name:c,path:`${n}/${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=${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return p.status>=300?(a(s_({parent:r,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),p.status!==413&&Ao.next({message:"error uploading file",kind:"danger"})):await a(Po(r.path)),{status:p.status,fileName:e.name}}catch{return a(s_({parent:r,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:i,supportedEditors:u},ext:f}})),Ao.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),Gs=xe("explorer/createNewFile",async({fileName:e,type:n,path:r,parentNode:a,content:i},{dispatch:u,rejectWithValue:c,getState:f})=>{const{qodly:p}=f().settings.server;try{const h=await Gd({name:dC(e,n,p),content:i||fC(n),path:r,asText:[le.CLASS,le.METHOD].includes(n)});return a.error&&(a.flags.expanded?await u(Po(a.path)):await u(zl(a.path))),{qodly:p,file:h,parentNode:a}}catch{return c("failed to create folder")}});function hC(e,n){const{qodly:r=!0,withExtension:a=!0}=n||{},i=Fs(e.type,r);let u="";switch(e.type){case le.WEBFORM:u=`${Wt.WEBFORMS}/${e.name}`;break;case le.METHOD:u=`${Wt.METHODS}/${e.name}`;break;case le.CLASS:u=`${Wt.CLASSES}/${e.name}`;break;default:return""}return`${u}${a?`.${i}`:""}`}const x6=xe("explorer/createNewFileAndOpen",async(e,{dispatch:n,getState:r})=>{const a=await n(Gs(e)).unwrap(),{qodly:i}=r().settings.server;if(a){const{file:u}=a,c=hC(u,{withExtension:!1,qodly:i}),{editor:f}=bo(c);await n(Hl({file:{name:e.fileName,type:u.type,path:c,editor:f,date:new Date().toISOString()}}))}}),qf=xe("explorer/createNewNode",async({fileName:e,path:n,parentNode:r},{rejectWithValue:a})=>{try{return{file:await yk({verb:Zt.CREATE_FOLDER,path:`${n}/${e}`,recursive:!0}),parentNode:r}}catch{return Ao.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),up=async e=>{try{const n=e.path.split(".").at(-1),r=await ni({verb:Zt.GET_INFO,path:e.path,content:!0,as:kT(n)?"json":"text"}),a={editor:e.editor},i=mT(e.path);i===le.METHOD&&(a.attributes=z_(r.content),r.content=wT(r.content,{}));const{content:u,date:c,ext:f}=r;return{date:c,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(n){const{data:r}=n;if(r.__ERROR.find(a=>a.errCode===TT.FILE_NOT_FOUND))switch(e.path){case Ur:{const a={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:le.ROLES,initialContent:a,content:a}}case oi:{const a={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:le.SETTINGS,initialContent:a,content:a}}}throw n}},Hl=xe("explorer/openFile",async({file:e,inactive:n,flags:r={}},{getState:a,dispatch:i})=>{const{root:{tabs:u},roles:c}=a(),f=u.find(({path:m})=>e.path===m);if(f){const m={...f,extra:{...f==null?void 0:f.extra,editor:e.editor},flags:{...f==null?void 0:f.flags,...r}};return i(wn(m)),m}if(e.path.startsWith("Debugger")){const m=a().debugger.sessions.find(b=>`Debugger/${b.threadId}`===e.path);if(m){const{source:{content:b},source:E}=m.currentStackFrame,O={name:e.name,type:le.DEBUGGER,date:new Date().toISOString(),path:e.path,content:b,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:b,flags:{},extra:{source:E,editor:e.editor}};return i(wn(O)),O}}const p=await up(e);return e.path===Ur&&!c.flags.touched?i(uw({content:p.content,date:p.date})):e.path===oi&&i(sp({path:"project",value:p.content})),i((n?KC:wn)(p)),p}),fw=xe("explorer/openFileAtLine",async({file:e},{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.find(({path:c})=>e.path===c);if(i){const c={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(wn(c)),c}const u=await up(e);return r(wn(u)),u}),vC=xe("explorer/injectContentAtLine",async(e,{getState:n,dispatch:r,rejectWithValue:a})=>{const i=n();e.path.split("/").pop();const c=Tr(i.explorer,e.path);if(!c)return a(`Error while trying to inject content in file ${e.path}`);const f=await up({name:c.name,date:c.date||new Date().toISOString(),path:`${c.path}.${c.ext}`,type:le.CLASS,editor:c.config.editor});return await r(wn(f)),{...e,path:`${c.path}.${c.ext}`}}),gC=xe("explorer/openFileAtSelection",async({file:e},{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.find(({path:c})=>e.path===c);if(i){const c={...i,extra:{...i==null?void 0:i.extra,editor:e.editor}};return r(wn(c)),c}const u=await up(e);return r(wn(u)),u}),c_=xe("explorer/deleteFile",async e=>{const{name:n,type:r,path:a,flags:i}=e;if(i.error)return{deleted:!0,node:e};const u=a.split("/");return u.pop(),{deleted:await dk({root:zs.ROOT,type:pC(r),verb:Zt.DROP,name:n,path:u.join("/")}),node:e}}),C6=xe("explorer/deleteFolder",async e=>{const{path:n,flags:r}=e;if(r.error)return{deleted:!0,node:e};const{deleted:a}=await OT({force:!0,path:n,verb:Zt.REMOVE_ITEM});return{deleted:a,node:e}}),R6=xe("explorer/removeFileNode",async e=>{const{ext:n,path:r}=e;return await OT({verb:Zt.REMOVE_ITEM,path:`${r}.${n}`,force:!0}),r==="Classes/DataStore"&&vf(),{deleted:!0,node:e}}),qs=xe("explorer/renameFile",async({file:e,newname:n})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const i=`${a.join("/")}/${e.name}.${e.ext}`,u=`${a.join("/")}/${n}.${e.ext}`;return await B1({verb:Zt.MOVE_ITEM,path:i,newpath:u}),{old:{...e,path:i},new:{...e,name:n,path:u}}}const r=e.path.split("/");return r.pop(),await B1({verb:Zt.MOVE_ITEM,path:`${r.join("/")}/${e.name}`,newpath:`${r.join("/")}/${n}`}),{old:e,new:{...e,name:n,path:`${r.join("/")}/${n}`}}}),Gl=xe("explorer/relocateNode",async({draggedNode:e,newLocation:n},{rejectWithValue:r})=>{try{await B1({verb:Zt.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${n.path}/${e.name}.${e.ext}`})}catch{return r("can't move item")}}),Vf=xe("explorer/duplicateNode",async({node:e,duplicateName:n},{rejectWithValue:r,fulfillWithValue:a,getState:i})=>{const u=e.path.split("/");u.pop();try{const{tabs:c}=i().root,f=c.find(({path:b})=>b===`${e.path}${e.ext?`.${e.ext}`:""}`),p=["4dm","4qm","4qs"].includes(e.ext),{content:h}=f||await ni({verb:Zt.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:p?"text":"json"}),m=await Gd({name:`${n}.${e.ext}`,content:h,path:u.join("/"),asText:p});return a({node:{...m,path:u.join("/")}})}catch{return r("failed to duplicate file")}}),A6=xe("explorer/executeMethod",async({methodName:e,params:n=[],resultingDataSource:r={},namespace:a=""},{rejectWithValue:i})=>{var u,c;try{const p=await window.Method4D.buildMethod({methodName:e,parameters:n,resultingDataSource:r},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return p!=null&&p.__NOTIFICATION?Ao.next({message:`${((u=p.__NOTIFICATION)==null?void 0:u.message)||""}`,kind:`${((c=p.__NOTIFICATION)==null?void 0:c.type)||"info"}`}):Ao.next({message:"Method executed Successfully",kind:"message"}),p}catch(f){return Ao.next({message:f.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),i("can't execute method")}}),P6=xe("files/fetchFiles",async()=>lk(zs.WEBFORMS,zs.METHODS,zs.CLASSES)),dw=xe("tabs/renameDatasource",async(e,{dispatch:n,getState:r})=>{var O,R;const a=!!e.datasourceNamespace,{confirmed:i}=await n(Eo({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:Hn.CONFIRM,color:Ga.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:c,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(bn("path",h));if(b=(R=(O=C==null?void 0:C.content)==null?void 0:O.metadata)==null?void 0:R.datasources,!b)return null}const E=new RegExp(`^${c}\\b`,"");if(b=b.map(C=>{const k=(U_(C)||!bT(C))&&C.from&&E.test(C.from),j=C.events?C.events.map(F=>{var D,M,S,q;switch(F==null?void 0:F.type){case"method":{const U=F;return U.params?{...U,params:U.params.map(V=>{var Ee;return{...V,datasource:(Ee=V.datasource)==null?void 0:Ee.replace(new RegExp(`^${c}`,""),p)}}),returns:(D=U.returns)!=null&&D.datasource?{...U.returns,datasource:(M=U.returns.datasource)==null?void 0:M.replace(new RegExp(`^${c}`,""),p)}:U.returns}:U}case"simple-action":{const U=F;return U.datasource?{...U,datasource:{...U.datasource,name:(S=U.datasource.name)==null?void 0:S.replace(new RegExp(`^${c}`,""),p),from:(q=U.datasource.from)==null?void 0:q.replace(new RegExp(`^${c}`,""),p)}}:U}default:return F}}):C.events;return C.id===c?{...C,id:p,events:j}:k&&C.from?{...C,from:C.from.replace(new RegExp(`^${c}`,""),p),events:j}:{...C,events:j}}),u){const C=a?`${f}:${c}`:`${c}`,k=a?`${f}:${p}`:`${p}`;hT.next({path:h??"",action:F_.RENAME,old_reference:C,new_reference:k,is_shared:a})}return{path:h,namespace:f,datasources:b}}),pw=xe("tabs/edit-datasource",(e,{getState:n})=>{var u,c;const r=n();let a=[];if(e.namespace)a=r.sharedDatasources.sources[e.namespace];else{const f=r.root.tabs.find(bn("path",e.path));f&&(a=((c=(u=f.content)==null?void 0:u.metadata)==null?void 0:c.datasources)||[])}return a.map(f=>f.id===e.datasourceId?Object.assign({},f,{[e.propertyKey]:e.value}):f)}),mC=xe("tabs/fetchChanges",async(e,{getState:n})=>{const a=cu(n()).filter(i=>[le.METHOD,le.CLASS].includes(i.type));return ST(...a.map(i=>{const[u]=i.path.split("/").filter(Boolean);return{name:i.name,type:i.type,root:u,path:"."}}))}),D6=xe("files/saveAll",async(e,{getState:n,dispatch:r})=>{const a=Z_(n());for(const i of a)r(Vs({tab:i}))}),hw=xe("files/tryCloseTab",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root,i=a.findIndex(c=>c.path===e);if(i===-1)return!1;const u=a[i];if(u!=null&&u.flags.touched){const{confirmed:c}=await r(Eo({title:qd(u),message:"Your unsaved changes will be lost. Proceed anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!c)return!1}return r(UC(i)),u.path===Ur&&u.flags.touched&&(async()=>{const f=await ni({verb:Zt.GET_INFO,path:Ur,content:!0,as:"json"});r(uw({content:f.content,date:f.date}))})(),!0}),I6=xe("files/tryCloseOtherTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root;if(a.some(u=>u.path!==e&&u.flags.touched===!0)){const{confirmed:u}=await r(Eo({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(qC(e))}),M6=xe("files/tryCloseAllTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().root;if(a.some(u=>u.flags.touched===!0)){const{confirmed:u}=await r(Eo({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(HC())}),k6=xe("files/tryCloseRightTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().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(Eo({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(GC(e))}),$6=xe("files/tryCloseLeftTabs",async(e,{getState:n,dispatch:r})=>{const{tabs:a}=n().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(Eo({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!u)return}r(VC(e))}),l_=xe("files/reloadTab",async(e,{dispatch:n})=>{if(e.flags.touched){const{confirmed:i}=await n(Eo({title:qd(e),message:"Changes made to the file will be lost. Continue?",type:Hn.CONFIRM,color:Ga.WARNING,icon:"AiFillWarning"})).unwrap();if(!i)return}const r=px(e.path),a=await ni({verb:Zt.GET_INFO,path:e.path,content:!0,as:r});if(e.path===Ur){const{roles:i,privileges:u}=ap(a.content);n(cw({roles:i,privileges:u})),n(ww({path:e.path,flags:{old:!1}}))}else if(e.path===oi){const{content:i}=a;n(sp({path:"project",value:i}))}else{const{content:i}=a;return e.type===le.WEBFORM?KM.next({path:e.path,action:pT.RELOAD,payload:i.components}):e.type===le.MODEL&&_x.next({action:"reload",payload:i}),a}}),Vs=xe("files/saveTab",async({tab:e},{dispatch:n,getState:r})=>{const{path:a,content:i}=e;if(e.type===le.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const c=await ST({path:a});if(c.files[0]){const m=new Date(e.date),b=new Date(c.files[0].date);if(m.getTime()<b.getTime()){const{confirmed:E}=await n(Eo({title:qd(e),message:"New content has been found on the server. Are you sure you want to continue?",type:Hn.CONFIRM,icon:"FaSave"})).unwrap();if(!E)return n(ww({path:a,flags:{old:!0}})),null}}const f=await bk({verb:Zt.SAVE_CONTENT,content:N6(e,r()),path:a});(e.type===le.CLASS||e.type===le.MODEL)&&vf();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}]:[]}}),N6=(e,n)=>{switch(!0){case e.path==="settings.json":case e.path===oi:return n.settings.project;case e.type===le.ROLES:return aw(n.roles);case e.type===le.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},jS=async e=>{if(e.type===le.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const n=e.path.split("/").filter(Boolean)[0],r=await fk({root:n,type:e.type,verb:Zt.GET,name:e.name}),a={};r.type===le.METHOD&&(a.attributes=z_(r.content));const{date:i,name:u,type:c,content:f}=r;return{date:i,flags:{enabled:e.type===le.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:u,path:e.path,type:c,initialContent:f,content:c===le.MODEL?MT(f):f}},yC=xe("files/tryInjectMethod",async({type:e,dataclass:n},{getState:r,dispatch:a})=>{const{root:{tabs:i},settings:{server:{qodly:u}}}=r(),c=Fs("class",u);let f="",p="",h=null;if(!n)f="DataStore",p=`Classes/DataStore.${c}`;else switch(e){case"dataclass":f=n,p=`Classes/${n}.${c}`;break;case"collection":f=`${n}Selection`,p=`Classes/${n}Selection.${c}`;break;case"entity":f=`${n}Entity`,p=`Classes/${n}Entity.${c}`;break;default:return h}const m=i.find(bn("path",p));if(m)return a(wn(m)),m;try{h=await jS({name:f,date:new Date().toISOString(),path:`class/${f}.${c}`,type:le.CLASS})}catch{n?await a(u_({type:"dataclass",className:n,collectionName:`${n}Selection`,toCreate:e})):await a(u_({type:"model"}))}return h=await jS({name:f,date:new Date().toISOString(),path:`class/${f}.${c}`,type:le.CLASS}),h.path=p,a(wn(h)),h}),j6=xe("roles/open",async(e,{dispatch:n,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path===Ur);if(i)return n(wn(i)),i;n(Sd())}),{debugger:js={meta:{state:Na.DETACHED},list:[],sessions:[],expressions:[]}}=nu();var HS,GS;const L6={meta:{...js.meta,state:((HS=js.meta)==null?void 0:HS.state)===Na.ATTACHED?(GS=js.meta)==null?void 0:GS.state:Na.DETACHED},list:js.list||[],sessions:js.sessions||[],expressions:js.expressions||[]};function LS(e,n){const{line:r,offset:a,type:i="saved"}=n;e.breakpoints[i].locations.push({line:r}),Bt.isNumber(a)&&(e.breakpoints[i].offset=a)}function FS(e,n,r,a){e.breakpoints[r].locations=n,Bt.isNumber(a)&&(e.breakpoints[r].offset=a)}function WS({filePath:e,fileType:n,methodName:r,className:a,ext:i,source:u}){return{filePath:e,fileType:n,methodName:r,className:a,ext:i,source:u,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function BS(e,n,r){let a=!1;const i=e.map(u=>u[r]!==n[r]?u:(a=!0,{...u,...n}));return a?i:[...i,n]}function kf(e){return e.map(({label:n})=>({label:n}))}const bC=qn({name:"debugger",initialState:L6,reducers:{addBreakpointDecoration(e,n){const{filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f,breakpoint:p}=n.payload,h=Ps(e.list,r,i,u);if(h)LS(h,p);else{if(a===le.CLASS&&p.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${u} class.`);const m=WS({filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f});LS(m,p),e.list.push(m)}},removeBreakpointDecoration(e,n){const{filePath:r,methodName:a,line:i,offset:u=0,type:c="saved"}=n.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[c].offset||0;h.breakpoints[c].locations=h.breakpoints[c].locations.filter(b=>b.line+m!==p),c==="saved"&&(h.breakpoints.draft.locations=h.breakpoints.draft.locations.filter(b=>b.line+m!==p))})}}else{const f=Ps(e.list,r,a);f&&(f.breakpoints[c].locations=f.breakpoints[c].locations.filter(p=>p.line!==i),c==="saved"&&(f.breakpoints.draft.locations=f.breakpoints.draft.locations.filter(p=>p.line!==i)))}},setBreakpointsDecoration(e,n){const{filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f,breakpoints:p,offset:h,type:m="saved",clearDraft:b}=n.payload,E=Ps(e.list,r,i);if(E)FS(E,p,m,h),b&&m!=="draft"&&(E.breakpoints.draft.locations=[]);else{const O=WS({filePath:r,fileType:a,methodName:i,className:u,ext:c,source:f});FS(O,p,m,h),e.list.push(O)}},clearBreakpoints(e,n){const{filePath:r,type:a="saved"}=n.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,n){const{threadId:r,line:a,highlight:i}=n.payload,u=dr(e.sessions,r);u&&(u.activeLine=a,i&&(u.highlightedLines={start:a,end:a}))},addExpression(e,n){const{threadId:r,label:a,save:i}=n.payload,u=dr(e.sessions,r);u&&u.stopped&&(u.expressions=[...u.expressions||[],{label:a}],i&&(e.expressions=kf(u.expressions)))},removeExpression(e,n){const{threadId:r,index:a,save:i}=n.payload,u=dr(e.sessions,r);u&&(u.expressions=u.expressions.filter((c,f)=>f!==a),i&&(e.expressions=kf(u.expressions)))},removeAllExpressions(e,n){const{threadId:r,save:a}=n.payload,i=dr(e.sessions,r);i&&(i.expressions=[],a&&(e.expressions=[]))},renameExpression(e,n){const{threadId:r,index:a,replacement:i,save:u}=n.payload,c=dr(e.sessions,r);c&&c.expressions[a]&&(c.expressions[a].label=i,u&&(e.expressions=kf(c.expressions)))},setExpression(e,n){const{threadId:r,expression:a}=n.payload,i=dr(e.sessions,r);if(i){const u=a.index>=0?a.index:i.expressions.length>0?i.expressions.length-1:0,c=i.expressions[u];c?(c.result=a.result,c.nakedResult=a.nakedResult,c.variablesReference=a.variablesReference||0,c.presentationHint=a.presentationHint):i.expressions.push(a)}},updateExpressionAt(e,n){const{threadId:r,index:a,value:i}=n.payload,u=dr(e.sessions,r);if(u){const c=u.expressions[a];c&&(c.result=`"${i}"`,c.nakedResult=i)}},saveExpressions(e,n){const{expressions:r}=n.payload;e.expressions=kf(r)},addSession(e,n){const{threadId:r,channelId:a,stackFrames:i,exceptions:u=[]}=n.payload,c=dr(e.sessions,r),f=i[0],{expressions:p=[]}=e;if(c)c.expressions=p;else{const h=V_(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,n){const{threadId:r,changes:a}=n.payload;e.sessions=e.sessions.map(i=>i.threadId===r?{...i,...a}:i)},removeSession(e,n){const{threadId:r}=n.payload;e.sessions=e.sessions.filter(a=>a.threadId!==r)},removeSessionByIndex(e,n){const r=n.payload;e.sessions.splice(r,1)},setSessions(e,n){const r=n.payload;e.sessions=r},setCallChainVariables(e,n){const{threadId:r,frameId:a,variables:i}=n.payload;e.sessions=e.sessions.map(u=>{var c;return u.threadId===r?{...u,variables:{...u.variables,callchain:BS((c=u.variables)==null?void 0:c.callchain,{frameId:a,items:i},"frameId")}}:u})},setExpressionVariables(e,n){const{threadId:r,variablesReference:a,variables:i}=n.payload;e.sessions=e.sessions.map(u=>{var c;return u.threadId===r?{...u,variables:{...u.variables,expressions:BS((c=u.variables)==null?void 0:c.expressions,{variablesReference:a,items:i},"variablesReference")}}:u})},setSourceContent(e,n){const{threadId:r,content:a}=n.payload,i=dr(e.sessions,r);i&&(i.currentStackFrame.source={...i.currentStackFrame.source,content:a})},setDebuggerMeta(e,n){if(n.payload.state===Na.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:r,error:a={code:null,reason:"",type:pd.SOCKET_ERROR}}=n.payload;if((r||e.meta.state!==Na.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===pd.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===Na.DETACHED)return}e.meta.state=n.payload.state}},extraReducers:e=>{e.addCase(wC.fulfilled,n=>{n.sessions=[]})}}),{addBreakpointDecoration:F6,removeBreakpointDecoration:W6,setBreakpointsDecoration:B6,clearBreakpoints:U6,setActiveLine:z6,addExpression:H6,renameExpression:G6,removeExpression:q6,removeAllExpressions:V6,setExpression:Y6,updateExpressionAt:K6,saveExpressions:X6,addSession:J6,updateSession:Z6,removeSession:Q6,removeSessionByIndex:eF,setSessions:_C,setCallChainVariables:tF,setExpressionVariables:rF,setSourceContent:nF,setDebuggerMeta:oF}=bC.actions,wC=xe("files/wipeDebuggerSessions",async(e,{getState:n,dispatch:r})=>{const{sessions:a}=n().debugger;for(const{threadId:i}of a){const u=V_(i);r(hw(u))}}),EC=xe("files/removeDebuggerSessionsNotIn",async(e,{getState:n,dispatch:r})=>{const{threadIds:a}=e,{sessions:i}=n().debugger,u=[],c=i.filter(f=>{const p=a.includes(f.threadId);return p||u.push(f.threadId),p});return r(_C(c)),{staleThreadIds:u}});var vw=(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))(vw||{}),Ia=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Ia||{});const aF=e=>["string","uuid","number","long"].includes(e.type),iF=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],sF=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],uF=[{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"}],cF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],lF=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],fF=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],SC=_n("model/add-dataclass"),OC=_n("model/rename-dataclass"),TC=_n("model/remove-dataclass"),xC=_n("model/add-attribute"),dF=_n("model/edit-attribute-property"),CC=_n("model/remove-attribute"),RC=_n("model/rename-attribute"),AC=_n("model/edit-primary-key"),pF=_n("model/edit-dataclass-property"),PC=_n("model/rename-collection"),hF=(e,n)=>({toJSON:!0,extraProperties:n,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 Yf(e,n,r){const a=e;let i=0;for(;r[`${a}${i||""}`];)i++;return`${a}${i||""}`}const ql=e=>e.kind===Ia.RELATEDENTITY,Od=e=>e.kind===Ia.RELATEDENTITIES,vF=e=>Od(e)||ql(e),gw=xe("models/fetch",async()=>{try{return(await hr(en,{method:"POST",body:JSON.stringify({verb:Zt.GET_INFO,path:B_,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),Td=xe("models/save",async(e,{getState:n,rejectWithValue:r})=>{const{tabs:a}=n().root,i=a.find(u=>u.path===B_);if(!i)return r("Error while saving the model");try{const u=await hr(en,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return vf(),{...u,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return r("Error while saving the model")}}),gF=xe("models/open",async(e,{dispatch:n,getState:r})=>{const{tabs:a}=r().root,i=a.find(u=>u.path==="models/main");if(i)return n(wn(i)),i;n(gw())}),mF=xe("model/rename-dataclass",async(e,{getState:n,dispatch:r})=>{var b,E;const{dataclassId:a,selectionId:i,name:u}=e;let c=n();const f=c.explorer.find(O=>O.path===Wt.CLASSES);if(!f)throw new Error("Classes folder was not found!");await r(Po(f.path)),c=n();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`}};(E=(b=c.explorer.find(O=>O.path===Wt.CLASSES))==null?void 0:b.children)==null||E.forEach(O=>{O.name===p.class.filename_update&&(p.class.newNameTaken=!0),O.name===p.entity.filename_update&&(p.entity.newNameTaken=!0),O.name===p.selection.filename_update&&(p.selection.newNameTaken=!0),O.name===a?(p.class.found=!0,p.class.file=O):O.name===`${a}Entity`?(p.entity.found=!0,p.entity.file=O):O.name===i&&(p.selection.found=!0,p.selection.file=O)});const h=Object.entries(p).reduce((O,R)=>{const[C,k]=R;return k.found?k.newNameTaken?[...O,{type:"error",message:`Cannot rename ${C} file to ${k.filename_update} because it already exists. The existing file will be used instead!`}]:O:[...O,{type:"warning",message:`${a} ${C} file was not found`}]},[]);h.length>0&&r(Eo({message:"The following errors were encountered during dataclass rename:",views:{tips:h}}));const m=Object.values(p).filter(O=>O.found&&O.file&&!O.newNameTaken);await Promise.all(m.map(async O=>await r(qs({file:O.file,newname:O.filename_update})))),m.length>0&&r(Po("Classes"))}),nf={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},yF={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[nf.DATACLASS_DELETE]:!0,[nf.DATACLASS_DRAGGABLE]:!0}},DC=qn({name:"Models",initialState:yF,reducers:{setModelFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(SC,({draft:{dataClasses:n}},r)=>{var c,f;const{dataclassID:a}=r.payload,i=Yf(a||"DataClass","className",n),u={className:i,collectionName:`${i}Selection`,attributes:[{name:"ID",kind:Ia.STORAGE,type:vw.LONG,scope:"public",indexKind:"auto",unique:!0,primKey:!0,autosequence:!0}],name:i,scope:"public",extraProperties:{position:{x:((c=r.payload.position)==null?void 0:c.x)||0,y:((f=r.payload.position)==null?void 0:f.y)||0}}};n[u.name]=u}).addCase(TC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a}=r.payload;n[a]&&(delete n[a],Object.values(n).forEach(u=>{u.attributes=u.attributes.filter(c=>c.type!==a&&c.type!==u.collectionName)}))}).addCase(OC,({draft:{dataClasses:n,collections:r}},a)=>{const{dataclassID:i,newName:u}=a.payload;if(!n[i]||n[u])return;const c=n[i].collectionName,f=Yf(`${u}Selection`,"collectionName",r);Object.values(n).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===c&&(h.type=f)})})}).addCase(xC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeName:i,attributeType:u,attributeKind:c,target:f}=r.payload;if(!n[a]||ek("name",i,n[a].attributes))return;const h={name:i,kind:c,type:u,exposed:!0,scope:"public"};if(c===Ia.RELATEDENTITY){if(!n[u])return;h.path=u;const b={name:Yf(n[u].collectionName,"name",n[u].attributes),type:n[a].collectionName,kind:Ia.RELATEDENTITIES,reversePath:!0,path:i,scope:"public",exposed:!0};n[u].attributes.push(b)}else if(c===Ia.RELATEDENTITIES){const m=n[u];if(!m)return;const b=m.attributes.find(bn("name",f));if(b){if(!ql(b)||b.type!==n[a].className)return}else{h.path=f,h.reversePath=!0,h.type=u;const E={name:f,kind:Ia.RELATEDENTITY,scope:"public",path:m.className,type:m.className,exposed:!0};m.attributes.push(E)}}n[a].attributes.push(h)}).addCase(RC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeID:i,newName:u}=r.payload,c=n[a].attributes.find(bn("name",i)),f=n[a].attributes.find(bn("name",u));!c||f||Object.values(n).forEach(({collectionName:p,attributes:h,className:m})=>{h.forEach(b=>{ql(c)&&Od(b)&&b.type===p&&b.path===i&&(b.path=u),m===a&&b.name===i&&(b.name=u)})})}).addCase(CC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,attributeID:i}=r.payload;if(!n[a])return;const u=n[a].attributes.find(bn("name",i));u&&(ql(u)&&Object.values(n).forEach(c=>{c.attributes=c.attributes.filter(f=>!(Od(f)&&f.type===c.collectionName&&f.path===u.name))}),n[a].attributes=n[a].attributes.filter(JM("name",i)))}).addCase(PC,({draft:{dataClasses:n,collections:r}},a)=>{const{dataclassID:i,collectionName:u}=a.payload;if(!n[i])return;const c=n[i].collectionName;r[u]||(n[i].collectionName=u,r[u]=n[i],delete r[c],Object.values(n).forEach(f=>f.attributes.forEach(p=>{p.type===c&&(p.type=u)})))}).addCase(AC,({draft:{dataClasses:n}},r)=>{const{dataclassID:a,newPrimKey:i}=r.payload;n[a]&&n[a].attributes.forEach(u=>{u.name===i?u.primKey=!0:u.primKey=!1})}),e.addCase(gw.fulfilled,(n,r)=>{var c;const a={},i={},u=r.payload.extraProperties||{};(c=r.payload.dataClasses)==null||c.forEach(f=>{a[f.name]=f,i[f.collectionName]=f}),n.draft.dataClasses=a,n.draft.collections=i,n.draft.extraProperties=u,n.model.dataClasses=a,n.model.collections=i,n.model.extraProperties=u}),e.addCase(Td.pending,()=>{}).addCase(Td.fulfilled,(n,r)=>{const a={},i={},u=r.payload.content.extraProperties||{};r.payload.content.dataClasses.forEach(c=>{a[c.name]=c,i[c.collectionName]=c}),n.draft.dataClasses=a,n.draft.collections=i,n.draft.extraProperties=u,n.model.dataClasses=a,n.model.collections=i,n.model.extraProperties=u})}}),{setModelFlag:bF}=DC.actions,_F=()=>Ua(e=>e.model.draft.dataClasses),wF=()=>Ua(e=>e.model.draft.collections),EF=e=>Ua(n=>n.model.draft.dataClasses[e]),SF=(e,n)=>Ua(r=>r.model.draft.dataClasses[e].attributes.find(bn("name",n))),OF=()=>Ua(e=>e.model.draft.extraProperties),TF=()=>{const e=Ua(i=>i.model.flags),n=i=>i in e?e[i]:void 0,r=n(nf.DATACLASS_DELETE),a=n(nf.DATACLASS_DRAGGABLE);return{deleteDataclass:r,draggableDataclass:a,flags:e}},xF=DC.reducer;function m1(e,n){const r=e.tabs.find(({path:a})=>a===oi);r&&(r.flags.touched=n)}const IC={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},{webforms:$f}=nu(),MC={[IC.SIDEBAR_SECTION_RESIZABLE]:!0},kC={...$f,templates:{data:[],selectedGroup:""},datasources:{...G_.webforms.datasources,...$f==null?void 0:$f.datasources},flags:MC},$C=qn({name:"webforms",initialState:kC,reducers:{toggleInspector:(e,n)=>{const{type:r}=n.payload;e.inspector[r].active=!e.inspector[r].active,e.inspector[r].active||(e.inspector[r].data=void 0)},inspect:(e,n)=>{const{type:r,data:a}=n.payload;e.inspector[r].active&&(e.inspector[r].data=a)},addComponent:(e,n)=>{e.components.push(n.payload)},editComponent:(e,n)=>{const{id:r,changes:a}=n.payload;e.components=e.components.map(i=>i.id===r?{...i,...a}:i)},removeComponent:(e,n)=>{const{payload:r}=n,a=e.components.findIndex(i=>i.id===r);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,n)=>{e.templates.selectedGroup=n.payload.selectedGroup},setTemplatesData:(e,n)=>{e.templates.data=n.payload},setTemplateData:(e,n)=>{const{group:r,components:a}=n.payload,i=e.templates.data.find(u=>u.group===r);i&&(i.components=a)},setDatasourcesTheme:(e,n)=>{e.datasources.theme=n.payload},setWebformsFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(BC.fulfilled,(n,r)=>{n.components=r.payload})}}),{toggleInspector:CF,inspect:RF,addComponent:NC,editComponent:jC,removeComponent:LC,setSelectedGroup:AF,setTemplatesData:FC,setTemplateData:WC,setDatasourcesTheme:PF,setWebformsFlag:DF}=$C.actions,IF=$C.reducer,mw=Bt.curry((e,n)=>{var i,u;const r={...n.sharedDatasources.sources},a=(u=((i=n.root.tabs.find(bn("path",e)))==null?void 0:i.content).metadata)==null?void 0:u.datasources;return a&&(r[e]=a),Bt.cloneDeep(r)}),MF=xe("webforms/fetchTemplates",async(e,{dispatch:n,getState:r})=>{const{data:a}=r().webforms.templates;if(!Bt.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 n(FC(u)),u}catch{return[]}}),kF=xe("webforms/fetchTemplate",async({name:e},{dispatch:n,getState:r})=>{const{data:a}=r().webforms.templates,i=a.find(u=>u.group===e);if(i&&!Bt.isEmpty(i.components))return i.components;try{const c=await(await fetch(`${i==null?void 0:i.link}?t=${Date.now()}`)).json();return n(WC({group:e,components:c})),c}catch{return[]}}),BC=xe("webforms/fetchCraftedComponents",async(e,{rejectWithValue:n})=>{try{return(await ni({path:"WebForms/crafted_components.json",verb:Zt.GET_INFO,content:!0,as:"json"})).content}catch{return n("Error while loading the crafted components")}}),$F=xe("webforms/addCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(NC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while adding the crafted component")}}),NF=xe("webforms/editCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(jC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while editing the crafted component")}}),jF=xe("webforms/removeCraftedComponent",async(e,{dispatch:n,rejectWithValue:r,getState:a})=>{try{n(LC(e));const{webforms:{components:i}}=a();H_(i)}catch{return r("Error while removing the crafted component")}}),yw=xe("datasources/add-datasource",async(e,{getState:n,rejectWithValue:r})=>{var a,i;try{const u=n(),c=e.datasource,f=!!c.namespace,p=[];if(f){const h={...u.sharedDatasources.sources,[c.namespace]:[...u.sharedDatasources.sources[c.namespace],c]};p.push(...h[c.namespace]),await ri(h)}else(((i=(a=u.root.tabs.find(bn("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:i.datasources)||[]).push(c);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")}}),bw=xe("datasources/edit-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const{namespace:a,path:i}=e,u=n(),c=!!e.namespace,f=mw(i,u);let p=Bt.defaultTo(f[a||i],[]);return p=p.map(h=>h.id===e.id?{...h,[e.property]:e.value}:h),c&&await ri({...u.sharedDatasources.sources,[e.namespace]:p}),{list:p,path:e.path,namespace:e.namespace}}catch{r(`Error while editing datasource ${e.id}`)}}),LF=e=>e.type===Ys.fulfilled.type,Ys=xe("datasources/rename-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const a=n(),i=!!e.namespace,u=e.namespace||e.path,c=mw(e.path,a),f=Bt.defaultTo(c[u],[]),p=new RegExp(`^${e.id}\\b`,"");if(f.forEach(h=>{var b;const m=(U_(h)||!bT(h))&&h.from&&p.test(h.from);e.updateRefs&&((b=h.events)==null||b.forEach(E=>{var O,R,C,k,j;switch(E.type){case"method":{const F=E;F.params.forEach(D=>{D.datasource&&Object.assign(D,{datasource:D.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),F.returns&&Object.assign(F.returns,{datasource:(R=(O=F.returns)==null?void 0:O.datasource)==null?void 0:R.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const F=E;F.datasource&&Object.assign(F.datasource,{name:(C=F.datasource.name)==null?void 0:C.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(k=F.datasource.from)==null?void 0:k.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(j=F.datasource.target)==null?void 0:j.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=fd({id:e.id,namespace:e.namespace}),m=fd({id:e.new_name,namespace:e.namespace});hT.next({path:e.path??"",action:F_.RENAME,old_reference:h,new_reference:m,is_shared:i})}return i&&await ri({...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}`)}}),Vl=xe("datasources/delete-datasource",async(e,{getState:n,rejectWithValue:r})=>{try{const a=n(),i=!!e.namespace,u=e.namespace||e.path,f=mw(e.path,a)[u].filter(ZM(e.id));return i&&await ri({...a.sharedDatasources.sources,[e.namespace]:f}),{list:f,path:e.path,namespace:e.namespace}}catch{return r(`Error while removing datasource ${e.id}`)}}),y1=nu(),FF={filesLoading:!1,tabs:y1.tabs||[],activeTab:y1.activeTab,recent:y1.recent||[]},_w=qn({name:"root",initialState:FF,reducers:{setPanelState(e,n){const{path:r,...a}=n.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,n){var u;const{payload:{path:r,datasourceDef:a}}=n,i=e.tabs.find(c=>c.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 n={date:new Date().toISOString(),flags:{},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:oi,type:le.SETTINGS,initialContent:{},content:{}};let r=e.tabs.find(a=>a.path===n.path);if(r||(e.tabs.push(n),r=e.tabs[e.tabs.length-1]),e.activeTab!==n.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=n.path,r.weight=((a==null?void 0:a.weight)||0)+1}},removeDataSource(e,n){const{path:r,datasourceID:a}=n.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,n){const{payload:{path:r,datasourceArr:a}}=n;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,n){e.tabs=n.payload},closeTab(e,n){const r=n.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,n){e.tabs=e.tabs.filter(r=>r.path===n.payload),e.activeTab=n.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,n){e.tabs.splice(n.payload+1),e.activeTab=e.tabs[n.payload].path},closeLeftTabs(e,n){e.tabs.splice(0,n.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:r}})=>r);const n=e.tabs.reduce((r,a)=>(a==null?void 0:a.weight)>((r==null?void 0:r.weight)||0)?a:r,null);e.activeTab=(n==null?void 0:n.path)||""},selectTab(e,n){const r=e.tabs.find(({path:i})=>i===n.payload);if(!r||e.activeTab===n.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=n.payload},openTabUnselected(e,n){const r=n.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,c)=>(c==null?void 0:c.weight)>((u==null?void 0:u.weight)||0)?c:u,null);a.weight=i?(i.weight||0)+1:1,a.extra={...a.extra,...r.extra}},selectTabByReference(e,n){const r=n.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,c)=>(c==null?void 0:c.weight)>((u==null?void 0:u.weight)||0)?c:u,null);e.activeTab=r.path,a.weight=((i==null?void 0:i.weight)||0)+1}a.extra={...a.extra,...r.extra},a.flags={...a.flags||{},...r.flags||{}}},setContent(e,n){const{path:r,content:a,contentPath:i}=n.payload;e.tabs=e.tabs.map(u=>{if(u.path!==r)return u;let c=!1;if(typeof a=="string")c=u.initialContent!==a;else{const f=JSON.stringify(Bt.get(u.initialContent,i||"",u.initialContent)),p=JSON.stringify(Bt.get(a,i||"",a));c=f!==p}return a&&typeof a=="object"&&(i?Bt.set(u.content,i,a):u.content=a),typeof a=="string"&&(u.content=a),{...u,flags:{...u.flags,touched:c}}})},setTabFlags(e,n){const{path:r,flags:a}=n.payload;e.tabs=e.tabs.map(i=>i.path===r?{...i,flags:{...i.flags,...a}}:i)},setTabsFlags(e,n){const{tabs:r,flags:a}=n.payload;e.tabs=e.tabs.map(i=>r.includes(i.path)?{...i,flags:{...i.flags,...a}}:i)},setTabExtra(e,n){const{path:r,extra:a,flags:i}=n.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,n){const{path:r,styles:a=[]}=n.payload,i=e.tabs.find(u=>u.path===r);if(i){const u=i.content.metadata.styles.map(({name:f})=>f),c=a.filter(({name:f})=>!u.includes(f));i.content.metadata.styles=[...i.content.metadata.styles,...c].map(({scope:f,...p})=>({...p}))}},changeTabEditor(e,n){return e.tabs=e.tabs.map(r=>r.path===n.payload.path?n.payload:r),e}},extraReducers:e=>{e.addCase(vC.fulfilled,(n,r)=>{if(!r.payload)return;const{content:a,line:i,path:u}=r.payload,c=n.tabs.find(f=>f.path===u);if(c&&typeof c.content=="string"){const f=c.content.trim().split(`
279
279
  `);f.splice(i,0,a),c.content=f.join(`
280
- `)}}),e.addCase(Ys.pending,(n,r)=>{const{tab:a}=r.meta.arg;switch(a.type){case le.CLASS:case le.METHOD:Xa.next({action:ka.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(Ys.fulfilled,(n,r)=>{if(!r.payload)return;const a=n.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 le.CLASS:case le.METHOD:Xa.next({action:ka.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}r.payload.errors.length>0&&Ao.next({kind:"error",message:r.payload.errors})}}),e.addCase(Ys.rejected,(n,r)=>{Ao.next({kind:"danger",message:"Cannot save file"})}),e.addCase(mC.fulfilled,(n,r)=>{const a=[...r.payload.files];n.tabs=n.tabs.map(i=>{if([le.CLASS,le.METHOD].includes(i.type)){const u=a.find(c=>c.name===i.name&&c.type===i.type);if(u){const c=new Date(i.date),f=new Date(u.date);if(c.getTime()!==f.getTime())return{...i,flags:{...i.flags,old:!0}}}}return i})}),e.addCase(l_.pending,(n,r)=>{n.tabs=n.tabs.map(a=>a.path===r.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(l_.fulfilled,(n,r)=>{const a=r.payload;if(a){const i=r.meta.arg;n.tabs=n.tabs.map(u=>{if(u.name===i.name&&u.type===i.type){const c=u.extra||{};return i.type===le.METHOD&&(c.attributes=z_(a.content),a.content=wT(a.content,{})),{...u,initialContent:a.content,content:a.content,date:a.date,flags:{},extra:c}}return u})}}),e.addCase(fw.fulfilled,(n,r)=>{if(!r.payload)return;const{line:a,offset:i}=r.meta.arg,u=n.tabs.find(({path:c})=>{var f;return c===((f=r.payload)==null?void 0:f.path)});u&&(u.extra={...u.extra,initialLineInfo:{line:a,offset:i,lastModification:Date.now()}})}),e.addCase(gC.fulfilled,(n,r)=>{if(!r.payload)return;const{selection:a}=r.meta.arg,i=n.tabs.find(({path:u})=>{var c;return u===((c=r.payload)==null?void 0:c.path)});i&&(i.extra={...i.extra,initialSelectionInfo:{selection:a,lastModification:Date.now()}})}),e.addCase(Vs.fulfilled,(n,r)=>{r.payload.new!==r.payload.old&&(n.tabs=[...n.tabs].map(a=>a.path===r.payload.old.path?{...a,path:r.payload.new.path,name:r.payload.new.name}:a),n.activeTab===r.payload.old.path&&(n.activeTab=r.payload.new.path))}),e.addCase(c_.pending,(n,r)=>{const a=r.meta.arg,i=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":Xa.next({action:ka.WILL_DELETE,payload:{filePath:i}});break}}),e.addCase(c_.fulfilled,(n,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":Xa.next({action:ka.DID_DELETE,payload:{filePath:u}});break}if(n.tabs=n.tabs.filter(c=>c.path!==u),n.recent=n.recent.filter(({path:c})=>u!==c),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(Gl.fulfilled,(n,r)=>{const{draggedNode:a,newLocation:i}=r.meta.arg;if(n.tabs.find(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`))return n.tabs=n.tabs.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),n.recent=n.recent.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),n.activeTab=`${i.path}/${a.name}.${a.ext}`,n}),e.addCase(Td.fulfilled,(n,r)=>{const a=n.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(yC.fulfilled,(n,r)=>{var u;if(!((u=r.payload)!=null&&u.path))return;const a=n.tabs.find(bn("path",r.payload.path));if(!a)return;a.content=a.content+`
280
+ `)}}),e.addCase(Vs.pending,(n,r)=>{const{tab:a}=r.meta.arg;switch(a.type){case le.CLASS:case le.METHOD:Xa.next({action:ka.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(Vs.fulfilled,(n,r)=>{if(!r.payload)return;const a=n.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 le.CLASS:case le.METHOD:Xa.next({action:ka.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}r.payload.errors.length>0&&Ao.next({kind:"error",message:r.payload.errors})}}),e.addCase(Vs.rejected,(n,r)=>{Ao.next({kind:"danger",message:"Cannot save file"})}),e.addCase(mC.fulfilled,(n,r)=>{const a=[...r.payload.files];n.tabs=n.tabs.map(i=>{if([le.CLASS,le.METHOD].includes(i.type)){const u=a.find(c=>c.name===i.name&&c.type===i.type);if(u){const c=new Date(i.date),f=new Date(u.date);if(c.getTime()!==f.getTime())return{...i,flags:{...i.flags,old:!0}}}}return i})}),e.addCase(l_.pending,(n,r)=>{n.tabs=n.tabs.map(a=>a.path===r.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(l_.fulfilled,(n,r)=>{const a=r.payload;if(a){const i=r.meta.arg;n.tabs=n.tabs.map(u=>{if(u.name===i.name&&u.type===i.type){const c=u.extra||{};return i.type===le.METHOD&&(c.attributes=z_(a.content),a.content=wT(a.content,{})),{...u,initialContent:a.content,content:a.content,date:a.date,flags:{},extra:c}}return u})}}),e.addCase(fw.fulfilled,(n,r)=>{if(!r.payload)return;const{line:a,offset:i}=r.meta.arg,u=n.tabs.find(({path:c})=>{var f;return c===((f=r.payload)==null?void 0:f.path)});u&&(u.extra={...u.extra,initialLineInfo:{line:a,offset:i,lastModification:Date.now()}})}),e.addCase(gC.fulfilled,(n,r)=>{if(!r.payload)return;const{selection:a}=r.meta.arg,i=n.tabs.find(({path:u})=>{var c;return u===((c=r.payload)==null?void 0:c.path)});i&&(i.extra={...i.extra,initialSelectionInfo:{selection:a,lastModification:Date.now()}})}),e.addCase(qs.fulfilled,(n,r)=>{r.payload.new!==r.payload.old&&(n.tabs=[...n.tabs].map(a=>a.path===r.payload.old.path?{...a,path:r.payload.new.path,name:r.payload.new.name}:a),n.activeTab===r.payload.old.path&&(n.activeTab=r.payload.new.path))}),e.addCase(c_.pending,(n,r)=>{const a=r.meta.arg,i=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":Xa.next({action:ka.WILL_DELETE,payload:{filePath:i}});break}}),e.addCase(c_.fulfilled,(n,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":Xa.next({action:ka.DID_DELETE,payload:{filePath:u}});break}if(n.tabs=n.tabs.filter(c=>c.path!==u),n.recent=n.recent.filter(({path:c})=>u!==c),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(Gl.fulfilled,(n,r)=>{const{draggedNode:a,newLocation:i}=r.meta.arg;if(n.tabs.find(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`))return n.tabs=n.tabs.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),n.recent=n.recent.map(u=>u.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...u,path:`${i.path}/${a.name}.${a.ext}`}:u),n.activeTab=`${i.path}/${a.name}.${a.ext}`,n}),e.addCase(Td.fulfilled,(n,r)=>{const a=n.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(yC.fulfilled,(n,r)=>{var u;if(!((u=r.payload)!=null&&u.path))return;const a=n.tabs.find(bn("path",r.payload.path));if(!a)return;a.content=a.content+`
281
281
 
282
282
  exposed Function ${r.meta.arg.name}()
283
283
  `,a.flags={...a.flags,touched:!0};const i=a.content.split(`
284
- `);a.extra={...a.extra,editor:_k.Code,initialLineInfo:{line:i.length-2,lastModification:Date.now()}}}),e.addCase(dw.fulfilled,(n,r)=>{var u,c;if(!((u=r.payload)!=null&&u.path)||(c=r.payload)!=null&&c.namespace)return;const a=r.payload.path,i=n.tabs.find(bn("path",a));!i||!i.content||!i.content.metadata||(Object.assign(i.content.metadata,{datasources:r.payload.datasources}),i.flags.touched=!0)}),e.addCase(pw.fulfilled,(n,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace||n.tabs.forEach(u=>{u.path===i.path&&Object.assign(u.content,{metadata:{...u.content.metadata,datasources:a}})})}),e.addCase(EC.fulfilled,(n,r)=>{const{staleThreadIds:a}=r.payload;if(a.length===0)return;const i=a.map(u=>`Debugger/${u}`);if(n.tabs=n.tabs.filter(u=>!i.includes(u.path)),n.recent=n.recent.filter(({path:u})=>!i.includes(u)),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(lw.pending,n=>m1(n,!1)),e.addMatcher(mo(uC),(n,r)=>{["project"].includes(r.payload.path)&&m1(n,!0)}),e.addMatcher(mo(sp),(n,r)=>{m1(n,!1)}),e.addMatcher(mo(YC,wn),(n,r)=>{const{payload:a}=r;let i;typeof a=="string"?i=n.tabs.find(({path:u})=>a===u):i=a,i&&(n.recent=[i,...n.recent.filter(({path:u})=>![i.path,"settings"].includes(u))])}),e.addMatcher(mo(aC,oC),(n,r)=>{n.tabs=n.tabs.map(a=>a.path===Ur?{...a,flags:{...a.flags,touched:!0}}:a)}),e.addMatcher(mo(cw),(n,r)=>{n.tabs=n.tabs.map(a=>a.path===Ur?{...a,flags:{...a.flags,touched:!1}}:a)}),e.addMatcher(mo(yw.fulfilled,bw.fulfilled,Vl.fulfilled,Ks.fulfilled),(n,r)=>{var i,u,c;const a=n.tabs.find(bn("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:(c=r.payload)==null?void 0:c.list}}))}),e.addMatcher(mo(Vl.fulfilled,Ks.fulfilled),(n,r)=>{var f;const a=n.tabs.find(bn("path",((f=r.payload)==null?void 0:f.path)||r.meta.arg.path));if(!a)return;const{panel:i}=a.view,u=fd({id:r.meta.arg.id,namespace:r.meta.arg.namespace});if(i.type==="datasource"&&i.current===u)switch(r.type){case Vl.fulfilled.type:Object.assign(a.view.panel,{type:"component",id:Nj});break;case Ks.fulfilled.type:const p=fd({id:r.meta.arg.new_name,namespace:r.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",id:p});break}})}}),{setTabs:WF,closeTab:UC,setContent:zC,setTabFlags:ww,setTabsFlags:BF,setTabExtra:UF,closeAllTabs:HC,addDataSource:zF,closeRightTabs:GC,closeOthers:qC,closeLeftTabs:VC,closeSavedTabs:HF,setDataSources:GF,removeDataSource:qF,selectTab:YC,selectTabByReference:wn,openTabUnselected:KC,addWebFormStyles:VF,changeTabEditor:YF,openSettingsTab:KF,setPanelState:XF}=_w.actions,XC=_w.reducer,JF=bC.reducer,ZF=qn({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(Gs.pending,n=>({state:"loading"})).addCase(Gs.fulfilled,(n,{payload:r})=>({state:"loaded",model:r})).addCase(Gs.rejected,(n,r)=>({state:"error",error:r.payload||"Error while loading the catalog"}))}}),QF=ZF.reducer,e5=Kx.reducer,Kf=xe("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:n})=>{try{return await vk()}catch{return n("Error while loading the shared datasources")}}),JC=xe("shared_datasources/addSharedSource",async(e,{rejectWithValue:n,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 n("Namespace is required");return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),ZC=xe("shared_datasources/editSharedSource",async(e,{rejectWithValue:n,getState:r})=>{try{const a=r().sharedDatasources;if(!e.namespace)return n("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 n("Namespace not found");return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),QC=xe("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:n,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,...c}=a.sources;a.sources=c}else a.sources={...a.sources,[e.namespace]:i}}return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),Ew=xe("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:n,getState:r})=>{try{const a={...r().sharedDatasources};for(const i of e){if(!i.namespace)return n("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 n("Namespace not found")}return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),t5=xe("shared_datasources/setDatasourceEvents",async({tabPath:e,name:n,namespace:r,events:a},{getState:i,dispatch:u})=>{var O,R,C;const{root:{tabs:c},sharedDatasources:f}=i(),p=((C=(R=(O=c.find(({path:k})=>k===e))==null?void 0:O.content)==null?void 0:R.metadata)==null?void 0:C.datasources)||[],h={local:!1,shared:!1},m=(k,j)=>k.id===n&&(!r&&!k.namespace||k.namespace===r)?(j==null||j(),{...k,events:a}):k,b=p.map(k=>m(k,()=>{h.local=!0})),E=Bt.flatten(Bt.values(f.sources)).map(k=>m(k,()=>{h.shared=!0}));h.local&&u(zC({path:e,content:b,contentPath:"metadata.datasources"})),h.shared&&u(Ew(E))}),eR=qn({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,n){e.sources[n.payload.name]=[]}},extraReducers(e){e.addCase(Kf.pending,n=>({state:"loading",sources:{}})).addCase(Kf.fulfilled,(n,r)=>({state:"loaded",sources:r.payload})).addCase(Kf.rejected,(n,r)=>({state:"error",sources:{},error:r.payload||"Error while loading the shared datasources"})).addCase(Ew.fulfilled,(n,r)=>({state:"loaded",sources:r.payload})).addCase(pw.fulfilled,(n,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace&&Object.assign(n.sources,{[i.namespace]:a})}).addCase(JC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(QC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(ZC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(dw.fulfilled,(n,r)=>{if(!r.payload)return n;const{datasources:a,namespace:i}=r.payload;i&&n.sources[i]&&Object.assign(n.sources[i],{[i]:a})}).addMatcher(mo(yw.fulfilled,Vl.fulfilled,bw.fulfilled,Ks.fulfilled),(n,r)=>{if(!r.payload)return;const{namespace:a,list:i}=r.payload;a&&Object.assign(n.sources,{[a]:i})})}}),{addEmptyNamespace:r5}=eR.actions,n5=eR.reducer,o5=cC.reducer,Xf=xe("shared_css/fetchSharedCSS",async(e,{rejectWithValue:n})=>{try{const{classes:r}=await gk();return r}catch{return n("Error while loading the shared CSS")}}),a5=nu().sharedCSS||{state:"loading",styles:[]},i5=yT();async function s5(e){const n={verb:Zt.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:r,...a})=>({...a}))}};await i5(()=>hr(en,{method:"POST",body:JSON.stringify(n),headers:new Headers({"Content-Type":"application/json"})}))}const tR=qn({name:"shared-css",initialState:a5,reducers:{updateSharedCss:(e,n)=>(e.styles=n.payload.classes,s5(n.payload.classes),e),initSharedCss:(e,n)=>(e.styles=n.payload.classes,e)},extraReducers(e){e.addCase(Xf.pending,n=>({...n,state:"loading"})).addCase(Xf.fulfilled,(n,{payload:r})=>({state:"loaded",styles:r})).addCase(Xf.rejected,(n,r)=>({...n,state:"error",error:r.payload||"Error while loading the shared css"}))}}),{updateSharedCss:u5,initSharedCss:c5}=tR.actions,l5=tR.reducer,f5={},d5=qn({name:"tabs",initialState:f5,reducers:{}}),p5=e=>pe(cu,n=>{var r,a;return(a=(r=n.find(i=>i.path===e))==null?void 0:r.view)==null?void 0:a.panel});d5.reducer;const rR=JS({root:XC,explorer:o5,debugger:JF,settings:h6,catalog:QF,roles:l6,sharedDatasources:n5,webforms:IF,modals:e5,sharedCSS:l5,model:xF}),Ds=ZR({reducer:rR});Ds.subscribe(fP(()=>{const{root:{activeTab:e,tabs:n,recent:r},roles:a,debugger:i,webforms:u,sharedCSS:c,settings:{session:f}}=Ds.getState();DT({...f}),PT({tabs:n,activeTab:e,recent:r,roles:a,debugger:i,webforms:u,sharedCSS:c})},1e3));var f_={exports:{}},Fs={};/** @license React v17.0.2
284
+ `);a.extra={...a.extra,editor:_k.Code,initialLineInfo:{line:i.length-2,lastModification:Date.now()}}}),e.addCase(dw.fulfilled,(n,r)=>{var u,c;if(!((u=r.payload)!=null&&u.path)||(c=r.payload)!=null&&c.namespace)return;const a=r.payload.path,i=n.tabs.find(bn("path",a));!i||!i.content||!i.content.metadata||(Object.assign(i.content.metadata,{datasources:r.payload.datasources}),i.flags.touched=!0)}),e.addCase(pw.fulfilled,(n,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace||n.tabs.forEach(u=>{u.path===i.path&&Object.assign(u.content,{metadata:{...u.content.metadata,datasources:a}})})}),e.addCase(EC.fulfilled,(n,r)=>{const{staleThreadIds:a}=r.payload;if(a.length===0)return;const i=a.map(u=>`Debugger/${u}`);if(n.tabs=n.tabs.filter(u=>!i.includes(u.path)),n.recent=n.recent.filter(({path:u})=>!i.includes(u)),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(lw.pending,n=>m1(n,!1)),e.addMatcher(mo(uC),(n,r)=>{["project"].includes(r.payload.path)&&m1(n,!0)}),e.addMatcher(mo(sp),(n,r)=>{m1(n,!1)}),e.addMatcher(mo(YC,wn),(n,r)=>{const{payload:a}=r;let i;typeof a=="string"?i=n.tabs.find(({path:u})=>a===u):i=a,i&&(n.recent=[i,...n.recent.filter(({path:u})=>![i.path,"settings"].includes(u))])}),e.addMatcher(mo(aC,oC),(n,r)=>{n.tabs=n.tabs.map(a=>a.path===Ur?{...a,flags:{...a.flags,touched:!0}}:a)}),e.addMatcher(mo(cw),(n,r)=>{n.tabs=n.tabs.map(a=>a.path===Ur?{...a,flags:{...a.flags,touched:!1}}:a)}),e.addMatcher(mo(yw.fulfilled,bw.fulfilled,Vl.fulfilled,Ys.fulfilled),(n,r)=>{var i,u,c;const a=n.tabs.find(bn("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:(c=r.payload)==null?void 0:c.list}}))}),e.addMatcher(mo(Vl.fulfilled,Ys.fulfilled),(n,r)=>{var f;const a=n.tabs.find(bn("path",((f=r.payload)==null?void 0:f.path)||r.meta.arg.path));if(!a)return;const{panel:i}=a.view,u=fd({id:r.meta.arg.id,namespace:r.meta.arg.namespace});if(i.type==="datasource"&&i.current===u)switch(r.type){case Vl.fulfilled.type:Object.assign(a.view.panel,{type:"component",id:Nj});break;case Ys.fulfilled.type:const p=fd({id:r.meta.arg.new_name,namespace:r.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",id:p});break}})}}),{setTabs:WF,closeTab:UC,setContent:zC,setTabFlags:ww,setTabsFlags:BF,setTabExtra:UF,closeAllTabs:HC,addDataSource:zF,closeRightTabs:GC,closeOthers:qC,closeLeftTabs:VC,closeSavedTabs:HF,setDataSources:GF,removeDataSource:qF,selectTab:YC,selectTabByReference:wn,openTabUnselected:KC,addWebFormStyles:VF,changeTabEditor:YF,openSettingsTab:KF,setPanelState:XF}=_w.actions,XC=_w.reducer,JF=bC.reducer,ZF=qn({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(Hs.pending,n=>({state:"loading"})).addCase(Hs.fulfilled,(n,{payload:r})=>({state:"loaded",model:r})).addCase(Hs.rejected,(n,r)=>({state:"error",error:r.payload||"Error while loading the catalog"}))}}),QF=ZF.reducer,e5=Kx.reducer,Kf=xe("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:n})=>{try{return await vk()}catch{return n("Error while loading the shared datasources")}}),JC=xe("shared_datasources/addSharedSource",async(e,{rejectWithValue:n,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 n("Namespace is required");return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),ZC=xe("shared_datasources/editSharedSource",async(e,{rejectWithValue:n,getState:r})=>{try{const a=r().sharedDatasources;if(!e.namespace)return n("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 n("Namespace not found");return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),QC=xe("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:n,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,...c}=a.sources;a.sources=c}else a.sources={...a.sources,[e.namespace]:i}}return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),Ew=xe("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:n,getState:r})=>{try{const a={...r().sharedDatasources};for(const i of e){if(!i.namespace)return n("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 n("Namespace not found")}return await ri(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),t5=xe("shared_datasources/setDatasourceEvents",async({tabPath:e,name:n,namespace:r,events:a},{getState:i,dispatch:u})=>{var O,R,C;const{root:{tabs:c},sharedDatasources:f}=i(),p=((C=(R=(O=c.find(({path:k})=>k===e))==null?void 0:O.content)==null?void 0:R.metadata)==null?void 0:C.datasources)||[],h={local:!1,shared:!1},m=(k,j)=>k.id===n&&(!r&&!k.namespace||k.namespace===r)?(j==null||j(),{...k,events:a}):k,b=p.map(k=>m(k,()=>{h.local=!0})),E=Bt.flatten(Bt.values(f.sources)).map(k=>m(k,()=>{h.shared=!0}));h.local&&u(zC({path:e,content:b,contentPath:"metadata.datasources"})),h.shared&&u(Ew(E))}),eR=qn({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,n){e.sources[n.payload.name]=[]}},extraReducers(e){e.addCase(Kf.pending,n=>({state:"loading",sources:{}})).addCase(Kf.fulfilled,(n,r)=>({state:"loaded",sources:r.payload})).addCase(Kf.rejected,(n,r)=>({state:"error",sources:{},error:r.payload||"Error while loading the shared datasources"})).addCase(Ew.fulfilled,(n,r)=>({state:"loaded",sources:r.payload})).addCase(pw.fulfilled,(n,r)=>{const{payload:a,meta:{arg:i}}=r;i.namespace&&Object.assign(n.sources,{[i.namespace]:a})}).addCase(JC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(QC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(ZC.fulfilled,(n,r)=>({...n,sources:r.payload})).addCase(dw.fulfilled,(n,r)=>{if(!r.payload)return n;const{datasources:a,namespace:i}=r.payload;i&&n.sources[i]&&Object.assign(n.sources[i],{[i]:a})}).addMatcher(mo(yw.fulfilled,Vl.fulfilled,bw.fulfilled,Ys.fulfilled),(n,r)=>{if(!r.payload)return;const{namespace:a,list:i}=r.payload;a&&Object.assign(n.sources,{[a]:i})})}}),{addEmptyNamespace:r5}=eR.actions,n5=eR.reducer,o5=cC.reducer,Xf=xe("shared_css/fetchSharedCSS",async(e,{rejectWithValue:n})=>{try{const{classes:r}=await gk();return r}catch{return n("Error while loading the shared CSS")}}),a5=nu().sharedCSS||{state:"loading",styles:[]},i5=yT();async function s5(e){const n={verb:Zt.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:r,...a})=>({...a}))}};await i5(()=>hr(en,{method:"POST",body:JSON.stringify(n),headers:new Headers({"Content-Type":"application/json"})}))}const tR=qn({name:"shared-css",initialState:a5,reducers:{updateSharedCss:(e,n)=>(e.styles=n.payload.classes,s5(n.payload.classes),e),initSharedCss:(e,n)=>(e.styles=n.payload.classes,e)},extraReducers(e){e.addCase(Xf.pending,n=>({...n,state:"loading"})).addCase(Xf.fulfilled,(n,{payload:r})=>({state:"loaded",styles:r})).addCase(Xf.rejected,(n,r)=>({...n,state:"error",error:r.payload||"Error while loading the shared css"}))}}),{updateSharedCss:u5,initSharedCss:c5}=tR.actions,l5=tR.reducer,f5={},d5=qn({name:"tabs",initialState:f5,reducers:{}}),p5=e=>pe(cu,n=>{var r,a;return(a=(r=n.find(i=>i.path===e))==null?void 0:r.view)==null?void 0:a.panel});d5.reducer;const rR=JS({root:XC,explorer:o5,debugger:JF,settings:h6,catalog:QF,roles:l6,sharedDatasources:n5,webforms:IF,modals:e5,sharedCSS:l5,model:xF}),Qs=ZR({reducer:rR});Qs.subscribe(fP(()=>{const{root:{activeTab:e,tabs:n,recent:r},roles:a,debugger:i,webforms:u,sharedCSS:c,settings:{session:f}}=Qs.getState();DT({...f}),PT({tabs:n,activeTab:e,recent:r,roles:a,debugger:i,webforms:u,sharedCSS:c})},1e3));var f_={exports:{}},Ls={};/** @license React v17.0.2
285
285
  * react-jsx-runtime.production.min.js
286
286
  *
287
287
  * Copyright (c) Facebook, Inc. and its affiliates.
288
288
  *
289
289
  * This source code is licensed under the MIT license found in the
290
290
  * LICENSE file in the root directory of this source tree.
291
- */var US;function h5(){if(US)return Fs;US=1,Y_();var e=ie,n=60103;if(Fs.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;n=r("react.element"),Fs.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 c(f,p,h){var m,b={},E=null,O=null;h!==void 0&&(E=""+h),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(O=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:n,type:f,key:E,ref:O,props:b,_owner:a.current}}return Fs.jsx=c,Fs.jsxs=c,Fs}var b1={};/** @license React v17.0.2
291
+ */var US;function h5(){if(US)return Ls;US=1,Y_();var e=ie,n=60103;if(Ls.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var r=Symbol.for;n=r("react.element"),Ls.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 c(f,p,h){var m,b={},E=null,O=null;h!==void 0&&(E=""+h),p.key!==void 0&&(E=""+p.key),p.ref!==void 0&&(O=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:n,type:f,key:E,ref:O,props:b,_owner:a.current}}return Ls.jsx=c,Ls.jsxs=c,Ls}var b1={};/** @license React v17.0.2
292
292
  * react-jsx-runtime.development.js
293
293
  *
294
294
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -305,5 +305,5 @@ Check the render method of \``+_+"`."}return""}}function si(_){{if(_!==void 0){v
305
305
 
306
306
  Check your code at `+B+":"+G+"."}return""}}var No={};function jo(_){{var B=$o();if(!B){var G=typeof _=="string"?_:_.displayName||_.name;G&&(B=`
307
307
 
308
- Check the top-level render call using <`+G+">.")}return B}}function Jn(_,B){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var G=jo(B);if(No[G])return;No[G]=!0;var te="";_&&_._owner&&_._owner!==an.current&&(te=" It was passed a child from "+Me(_._owner.type)+"."),ur(_),V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',G,te),ur(null)}}function Lo(_,B){{if(typeof _!="object")return;if(Array.isArray(_))for(var G=0;G<_.length;G++){var te=_[G];un(te)&&Jn(te,B)}else if(un(_))_._store&&(_._store.validated=!0);else if(_){var Ae=q(_);if(typeof Ae=="function"&&Ae!==_.entries)for(var Pe=Ae.call(_),Te;!(Te=Pe.next()).done;)un(Te.value)&&Jn(Te.value,B)}}}function ui(_){{var B=_.type;if(B==null||typeof B=="string")return;var G;if(typeof B=="function")G=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===h||B.$$typeof===E))G=B.propTypes;else return;if(G){var te=Me(B);ai(G,_.props,"prop",te,_)}else if(B.PropTypes!==void 0&&!sn){sn=!0;var Ae=Me(B);V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ci(_){{for(var B=Object.keys(_.props),G=0;G<B.length;G++){var te=B[G];if(te!=="children"&&te!=="key"){ur(_),V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),ur(null);break}}_.ref!==null&&(ur(_),V("Invalid attribute `ref` supplied to `React.Fragment`."),ur(null))}}function Fo(_,B,G,te,Ae,Pe){{var Te=Be(_);if(!Te){var _e="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(_e+=" 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=si(Ae);rt?_e+=rt:_e+=$o();var Fe;_===null?Fe="null":Array.isArray(_)?Fe="array":_!==void 0&&_.$$typeof===a?(Fe="<"+(Me(_.type)||"Unknown")+" />",_e=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,_e)}var Ue=Xn(_,B,G,Ae,Pe);if(Ue==null)return Ue;if(Te){var zt=B.children;if(zt!==void 0)if(te)if(Array.isArray(zt)){for(var Rr=0;Rr<zt.length;Rr++)Lo(zt[Rr],_);Object.freeze&&Object.freeze(zt)}else V("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(zt,_)}return _===e.Fragment?ci(Ue):ui(Ue),Ue}}function Wo(_,B,G){return Fo(_,B,G,!0)}function li(_,B,G){return Fo(_,B,G,!1)}var fi=li,di=Wo;e.jsx=fi,e.jsxs=di}()}(b1)),b1}process.env.NODE_ENV==="production"?f_.exports=h5():f_.exports=v5();var g5=f_.exports;const m5=({children:e,store:n})=>g5.jsx(GT,{store:n,children:e});exports.DEFAULT_CACHE=G_;exports.EAttributeKind=Ia;exports.EAttributeTypes=vw;exports.EDebuggerErrorReason=CT;exports.EDebuggerErrorType=pd;exports.EDebuggerState=Na;exports.EDisplayMode=$x;exports.EPermissionType=gt;exports.ETooltipBehavior=tw;exports.ExpressionIndex=xT;exports.FLAGS_INIT_STATE=MC;exports.FLAGS_KEYS=nf;exports.ModalCloseReason=iw;exports.ModalColor=Ga;exports.ModalIcons=t6;exports.ModalType=Hn;exports.ReduxProvider=m5;exports.SETTINGS_TAB_PATH=oi;exports.THEME_CLASSES=Dx;exports.WEBFORMS_INITIAL_STATE=kC;exports.WT_FLAGS_KEYS=IC;exports.actionsToPrivs=Hx;exports.addAttribute=xC;exports.addBreakpointDecoration=F6;exports.addComponent=NC;exports.addCraftedComponent=$F;exports.addDataSource=zF;exports.addDataclass=SC;exports.addDatasource=yw;exports.addEmptyNamespace=r5;exports.addExpression=H6;exports.addIn=P4;exports.addNewFile=lC;exports.addPermission=N4;exports.addSession=J6;exports.addSharedSource=JC;exports.addWebFormStyles=VF;exports.allowed=R4;exports.attributeKinds=iF;exports.attributeScopes=lF;exports.attributeTypes=uF;exports.castToFileFolder=w6;exports.changeTabEditor=YF;exports.children=Ed;exports.clearBreakpoints=U6;exports.closeAllTabs=HC;exports.closeLeftTabs=VC;exports.closeModal=V4;exports.closeOthers=qC;exports.closeRightTabs=GC;exports.closeSavedTabs=HF;exports.closeTab=UC;exports.create=zx;exports.createModal=Xx;exports.createModelFiles=u_;exports.createNewFile=qs;exports.createNewFileAndOpen=x6;exports.createNewNode=qf;exports.createRole=H4;exports.createWithResource=I4;exports.dataclassScopes=cF;exports.defaultWebformContent=Nx;exports.deleteDatasource=Vl;exports.deleteFile=c_;exports.deleteFolder=C6;exports.deleteSharedSource=QC;exports.deserializeModel=MT;exports.duplicateNode=Vf;exports.editAttributeProperty=dF;exports.editComponent=jC;exports.editCraftedComponent=NF;exports.editDataSource=pw;exports.editDataclassPrimaryKey=AC;exports.editDataclassProperty=pF;exports.editDatasource=bw;exports.editModal=Y4;exports.editRole=z4;exports.editSharedSource=ZC;exports.editors=lx;exports.executeMethod=A6;exports.expandFolder=m6;exports.extensions=fx;exports.fetchAppSettings=iC;exports.fetchCatalog=Gs;exports.fetchChanges=mC;exports.fetchCraftedComponents=BC;exports.fetchFiles=P6;exports.fetchFolderContent=Po;exports.fetchFolderContentWithoutExpanding=zl;exports.fetchModel=gw;exports.fetchRoles=Sd;exports.fetchRolesChanges=rC;exports.fetchSettings=lw;exports.fetchSharedCss=Xf;exports.fetchSharedDatasources=Kf;exports.fetchTemplate=kF;exports.fetchTemplates=MF;exports.findNodeByPath=Tr;exports.findOne=Ps;exports.findSession=dr;exports.findSessionByPath=Tx;exports.getCachedState=nu;exports.getCashedPrefrences=IT;exports.getDebuggerTabName=WT;exports.getDebuggerTabPath=V_;exports.getDefaultContent=fC;exports.getDefaultName=Yf;exports.getDictByName=qx;exports.getEditors=bo;exports.getExtension=px;exports.getFilePath=hC;exports.getFileType=pC;exports.getFilenameFromType=dC;exports.getGraphData=$4;exports.getInheritedResources=Yx;exports.getModalTitle=qd;exports.getNodeRelativePath=dx;exports.getPrivilegeById=Ha;exports.getPromotions=W4;exports.getResourceFromType=ow;exports.indexTypes=fF;exports.initSharedCss=c5;exports.injectContentAtLine=vC;exports.inspect=RF;exports.isJSON=kT;exports.isRelatedAttr=vF;exports.isRelatedEntitiesAttr=Od;exports.isRelatedEntityAttr=ql;exports.isRenameDatasource=LF;exports.isRolesOutdated=sw;exports.isValidPrimaryKey=aF;exports.modelSubject=_x;exports.openAddFileInput=y6;exports.openFile=Hl;exports.openFileAtLine=fw;exports.openFileAtSelection=gC;exports.openModal=Eo;exports.openModel=gF;exports.openRoles=j6;exports.openSettingsTab=KF;exports.openTabUnselected=KC;exports.parents=op;exports.populateShallow=k4;exports.primaryKeyAttributes=sF;exports.refreshCatalog=vf;exports.refreshFile=b6;exports.reloadTab=l_;exports.relocateNode=Gl;exports.remove=A4;exports.removeAllExpressions=V6;exports.removeAttribute=CC;exports.removeBreakpointDecoration=W6;exports.removeComponent=LC;exports.removeCraftedComponent=jF;exports.removeDataSource=qF;exports.removeDataclass=TC;exports.removeDebuggerSessionsNotIn=EC;exports.removeExpression=q6;exports.removeFile=s_;exports.removeFileNode=R6;exports.removeFrom=D4;exports.removeModal=Jx;exports.removePermission=j4;exports.removeRole=U4;exports.removeSession=Q6;exports.removeSessionByIndex=eF;exports.rename=M4;exports.renameAttribute=RC;exports.renameCollection=PC;exports.renameDataSource=dw;exports.renameDataclass=OC;exports.renameDatasource=Ks;exports.renameExpression=G6;exports.renameFile=Vs;exports.resetResources=L4;exports.rootReducer=XC;exports.sanitize=ap;exports.sanitizePermissions=Gx;exports.sanitizePrivileges=Bx;exports.saveAll=D6;exports.saveExpressions=X6;exports.saveModel=Td;exports.savePrefrences=DT;exports.saveRole=G4;exports.saveRoles=a_;exports.saveState=PT;exports.saveTab=Ys;exports.selectActiveLine=r3;exports.selectActiveTab=v3;exports.selectAllDatasourcesByPath=YL;exports.selectAppState=Ex;exports.selectBreakpoints=JL;exports.selectCSSClassesByPath=U3;exports.selectCallChainVariables=f3;exports.selectCatalog=J_;exports.selectCatalogMethods=UL;exports.selectClassBreakpoints=QL;exports.selectClassOffset=p3;exports.selectClasses=R3;exports.selectClassesFolder=Ax;exports.selectComponents=Mx;exports.selectComponentsByPath=qL;exports.selectContentByPath=xx;exports.selectCraftedComponent=Y3;exports.selectCurrentFrameByThreadId=u3;exports.selectCurrentTab=m3;exports.selectDataclasses=BL;exports.selectDatasource=VL;exports.selectDatasourcesByPath=Sx;exports.selectDatasourcesTheme=X3;exports.selectDebuggerChannels=c3;exports.selectDebuggerData=Is;exports.selectDebuggerMeta=KL;exports.selectDebuggerSessions=En;exports.selectDebuggerSessionsCount=XL;exports.selectDebuggers=O3;exports.selectDraftBreakpoints=ZL;exports.selectDraftClassBreakpoints=e3;exports.selectExceptions=h3;exports.selectExplorer=T3;exports.selectExpressions=n3;exports.selectExpressionsVariables=d3;exports.selectFlagsByPath=H3;exports.selectGuestPrivilege=I3;exports.selectHasTabs=_3;exports.selectHighlightedLines=t3;exports.selectInspectedCSSClass=G3;exports.selectInspectedDatasource=q3;exports.selectInspector=ep;exports.selectInspectorStateByType=K3;exports.selectIsLoaded=J3;exports.selectMethods=x3;exports.selectMethodsFolder=Rx;exports.selectModals=A3;exports.selectMonacoZoom=W3;exports.selectPanelByPath=p5;exports.selectPreferences=j3;exports.selectPreviewedWebformsPaths=b3;exports.selectPrivileges=D3;exports.selectProjectSettings=N3;exports.selectQodly=F3;exports.selectRecentFiles=g3;exports.selectRemoteDebuggerMode=L3;exports.selectRoles=P3;exports.selectRolesDate=$3;exports.selectRolesFlags=M3;exports.selectRoot=za;exports.selectSelectedTab=k3;exports.selectServerSettings=Q_;exports.selectSessionSettings=Px;exports.selectSharedCSS=z3;exports.selectSharedDatasources=Ox;exports.selectSourceByPath=a3;exports.selectSourceByThreadId=s3;exports.selectStackFrames=l3;exports.selectStoppedFromDebugSession=o3;exports.selectStylesByPath=B3;exports.selectTab=YC;exports.selectTabByPath=gf;exports.selectTabByReference=wn;exports.selectTabExtraByPath=w3;exports.selectTabMaxWeight=y3;exports.selectTabs=cu;exports.selectTemplates=kx;exports.selectTemplatesData=V3;exports.selectThreadIdByPath=i3;exports.selectTouchedTabs=Z_;exports.selectTouchedTabsLength=S3;exports.selectWebForms=C3;exports.selectWebFormsFolder=Cx;exports.selectWebformNodes=E3;exports.selectWebformStylesByPath=ew;exports.selectWebforms=mf;exports.serializeModel=hF;exports.setActiveLine=z6;exports.setBreakpointsDecoration=B6;exports.setCallChainVariables=tF;exports.setContent=zC;exports.setDataSources=GF;exports.setDatasourceEvents=t5;exports.setDatasourcesTheme=PF;exports.setDebuggerMeta=oF;exports.setExpression=Y6;exports.setExpressionVariables=rF;exports.setFolderChildren=_6;exports.setModelFlag=bF;exports.setPanelState=XF;exports.setRolesContent=uw;exports.setSelectedGroup=AF;exports.setSessions=_C;exports.setSetting=uC;exports.setSettings=sp;exports.setSettingsAsText=p6;exports.setSourceContent=nF;exports.setTabExtra=UF;exports.setTabFlags=ww;exports.setTabs=WF;exports.setTabsFlags=BF;exports.setTemplateData=WC;exports.setTemplatesData=FC;exports.setWebformsFlag=DF;exports.sort=Ux;exports.stateReducer=rR;exports.stateSlice=_w;exports.store=Ds;exports.toAPI=aw;exports.toState=B4;exports.toggleExpandFolder=g6;exports.toggleInspector=CF;exports.togglePermission=F4;exports.togglePrivilegePermission=Vx;exports.toggleTab=c6;exports.tryCloseAllTabs=M6;exports.tryCloseLeftTabs=$6;exports.tryCloseOtherTabs=I6;exports.tryCloseRightTabs=k6;exports.tryCloseTab=hw;exports.tryEditMethod=E6;exports.tryInjectMethod=yC;exports.tryRenameDataclass=mF;exports.uniquePush=Gn;exports.updateExpressionAt=K6;exports.updatePrivileges=oC;exports.updateRoles=aC;exports.updateRolesAndPrivileges=cw;exports.updateSession=Z6;exports.updateSharedCss=u5;exports.updateSharedDatasources=Ew;exports.uploadFile=T6;exports.uploadFileAndGetResponse=O6;exports.useAppDispatch=WL;exports.useAppSelector=Ua;exports.useAttribute=SF;exports.useCatalog=uL;exports.useCollections=wF;exports.useDataclass=EF;exports.useDataclasses=_F;exports.useMethod=GL;exports.useMethods=zL;exports.useModelFlags=TF;exports.useModelProperties=OF;exports.wipeDebuggerSessions=wC;
308
+ Check the top-level render call using <`+G+">.")}return B}}function Jn(_,B){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var G=jo(B);if(No[G])return;No[G]=!0;var te="";_&&_._owner&&_._owner!==an.current&&(te=" It was passed a child from "+Me(_._owner.type)+"."),ur(_),V('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',G,te),ur(null)}}function Lo(_,B){{if(typeof _!="object")return;if(Array.isArray(_))for(var G=0;G<_.length;G++){var te=_[G];un(te)&&Jn(te,B)}else if(un(_))_._store&&(_._store.validated=!0);else if(_){var Ae=q(_);if(typeof Ae=="function"&&Ae!==_.entries)for(var Pe=Ae.call(_),Te;!(Te=Pe.next()).done;)un(Te.value)&&Jn(Te.value,B)}}}function ui(_){{var B=_.type;if(B==null||typeof B=="string")return;var G;if(typeof B=="function")G=B.propTypes;else if(typeof B=="object"&&(B.$$typeof===h||B.$$typeof===E))G=B.propTypes;else return;if(G){var te=Me(B);ai(G,_.props,"prop",te,_)}else if(B.PropTypes!==void 0&&!sn){sn=!0;var Ae=Me(B);V("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof B.getDefaultProps=="function"&&!B.getDefaultProps.isReactClassApproved&&V("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ci(_){{for(var B=Object.keys(_.props),G=0;G<B.length;G++){var te=B[G];if(te!=="children"&&te!=="key"){ur(_),V("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",te),ur(null);break}}_.ref!==null&&(ur(_),V("Invalid attribute `ref` supplied to `React.Fragment`."),ur(null))}}function Fo(_,B,G,te,Ae,Pe){{var Te=Be(_);if(!Te){var _e="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(_e+=" 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=si(Ae);rt?_e+=rt:_e+=$o();var Fe;_===null?Fe="null":Array.isArray(_)?Fe="array":_!==void 0&&_.$$typeof===a?(Fe="<"+(Me(_.type)||"Unknown")+" />",_e=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,V("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,_e)}var Ue=Xn(_,B,G,Ae,Pe);if(Ue==null)return Ue;if(Te){var zt=B.children;if(zt!==void 0)if(te)if(Array.isArray(zt)){for(var Rr=0;Rr<zt.length;Rr++)Lo(zt[Rr],_);Object.freeze&&Object.freeze(zt)}else V("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(zt,_)}return _===e.Fragment?ci(Ue):ui(Ue),Ue}}function Wo(_,B,G){return Fo(_,B,G,!0)}function li(_,B,G){return Fo(_,B,G,!1)}var fi=li,di=Wo;e.jsx=fi,e.jsxs=di}()}(b1)),b1}process.env.NODE_ENV==="production"?f_.exports=h5():f_.exports=v5();var g5=f_.exports;const m5=({children:e,store:n})=>g5.jsx(GT,{store:n,children:e});exports.DEFAULT_CACHE=G_;exports.EAttributeKind=Ia;exports.EAttributeTypes=vw;exports.EDebuggerErrorReason=CT;exports.EDebuggerErrorType=pd;exports.EDebuggerState=Na;exports.EDisplayMode=$x;exports.EPermissionType=gt;exports.ETooltipBehavior=tw;exports.ExpressionIndex=xT;exports.FLAGS_INIT_STATE=MC;exports.FLAGS_KEYS=nf;exports.ModalCloseReason=iw;exports.ModalColor=Ga;exports.ModalIcons=t6;exports.ModalType=Hn;exports.ReduxProvider=m5;exports.SETTINGS_TAB_PATH=oi;exports.THEME_CLASSES=Dx;exports.WEBFORMS_INITIAL_STATE=kC;exports.WT_FLAGS_KEYS=IC;exports.actionsToPrivs=Hx;exports.addAttribute=xC;exports.addBreakpointDecoration=F6;exports.addComponent=NC;exports.addCraftedComponent=$F;exports.addDataSource=zF;exports.addDataclass=SC;exports.addDatasource=yw;exports.addEmptyNamespace=r5;exports.addExpression=H6;exports.addIn=P4;exports.addNewFile=lC;exports.addPermission=N4;exports.addSession=J6;exports.addSharedSource=JC;exports.addWebFormStyles=VF;exports.allowed=R4;exports.attributeKinds=iF;exports.attributeScopes=lF;exports.attributeTypes=uF;exports.castToFileFolder=w6;exports.changeTabEditor=YF;exports.children=Ed;exports.clearBreakpoints=U6;exports.closeAllTabs=HC;exports.closeLeftTabs=VC;exports.closeModal=V4;exports.closeOthers=qC;exports.closeRightTabs=GC;exports.closeSavedTabs=HF;exports.closeTab=UC;exports.create=zx;exports.createModal=Xx;exports.createModelFiles=u_;exports.createNewFile=Gs;exports.createNewFileAndOpen=x6;exports.createNewNode=qf;exports.createRole=H4;exports.createWithResource=I4;exports.dataclassScopes=cF;exports.defaultWebformContent=Nx;exports.deleteDatasource=Vl;exports.deleteFile=c_;exports.deleteFolder=C6;exports.deleteSharedSource=QC;exports.deserializeModel=MT;exports.duplicateNode=Vf;exports.editAttributeProperty=dF;exports.editComponent=jC;exports.editCraftedComponent=NF;exports.editDataSource=pw;exports.editDataclassPrimaryKey=AC;exports.editDataclassProperty=pF;exports.editDatasource=bw;exports.editModal=Y4;exports.editRole=z4;exports.editSharedSource=ZC;exports.editors=lx;exports.executeMethod=A6;exports.expandFolder=m6;exports.extensions=fx;exports.fetchAppSettings=iC;exports.fetchCatalog=Hs;exports.fetchChanges=mC;exports.fetchCraftedComponents=BC;exports.fetchFiles=P6;exports.fetchFolderContent=Po;exports.fetchFolderContentWithoutExpanding=zl;exports.fetchModel=gw;exports.fetchRoles=Sd;exports.fetchRolesChanges=rC;exports.fetchSettings=lw;exports.fetchSharedCss=Xf;exports.fetchSharedDatasources=Kf;exports.fetchTemplate=kF;exports.fetchTemplates=MF;exports.findNodeByPath=Tr;exports.findOne=Ps;exports.findSession=dr;exports.findSessionByPath=Tx;exports.getCachedState=nu;exports.getCashedPrefrences=IT;exports.getDebuggerTabName=WT;exports.getDebuggerTabPath=V_;exports.getDefaultContent=fC;exports.getDefaultName=Yf;exports.getDictByName=qx;exports.getEditors=bo;exports.getExtension=px;exports.getFilePath=hC;exports.getFileType=pC;exports.getFilenameFromType=dC;exports.getGraphData=$4;exports.getInheritedResources=Yx;exports.getModalTitle=qd;exports.getNodeRelativePath=dx;exports.getPrivilegeById=Ha;exports.getPromotions=W4;exports.getResourceFromType=ow;exports.indexTypes=fF;exports.initSharedCss=c5;exports.injectContentAtLine=vC;exports.inspect=RF;exports.isJSON=kT;exports.isRelatedAttr=vF;exports.isRelatedEntitiesAttr=Od;exports.isRelatedEntityAttr=ql;exports.isRenameDatasource=LF;exports.isRolesOutdated=sw;exports.isValidPrimaryKey=aF;exports.modelSubject=_x;exports.openAddFileInput=y6;exports.openFile=Hl;exports.openFileAtLine=fw;exports.openFileAtSelection=gC;exports.openModal=Eo;exports.openModel=gF;exports.openRoles=j6;exports.openSettingsTab=KF;exports.openTabUnselected=KC;exports.parents=op;exports.populateShallow=k4;exports.primaryKeyAttributes=sF;exports.refreshCatalog=vf;exports.refreshFile=b6;exports.reloadTab=l_;exports.relocateNode=Gl;exports.remove=A4;exports.removeAllExpressions=V6;exports.removeAttribute=CC;exports.removeBreakpointDecoration=W6;exports.removeComponent=LC;exports.removeCraftedComponent=jF;exports.removeDataSource=qF;exports.removeDataclass=TC;exports.removeDebuggerSessionsNotIn=EC;exports.removeExpression=q6;exports.removeFile=s_;exports.removeFileNode=R6;exports.removeFrom=D4;exports.removeModal=Jx;exports.removePermission=j4;exports.removeRole=U4;exports.removeSession=Q6;exports.removeSessionByIndex=eF;exports.rename=M4;exports.renameAttribute=RC;exports.renameCollection=PC;exports.renameDataSource=dw;exports.renameDataclass=OC;exports.renameDatasource=Ys;exports.renameExpression=G6;exports.renameFile=qs;exports.resetResources=L4;exports.rootReducer=XC;exports.sanitize=ap;exports.sanitizePermissions=Gx;exports.sanitizePrivileges=Bx;exports.saveAll=D6;exports.saveExpressions=X6;exports.saveModel=Td;exports.savePrefrences=DT;exports.saveRole=G4;exports.saveRoles=a_;exports.saveState=PT;exports.saveTab=Vs;exports.selectActiveLine=r3;exports.selectActiveTab=v3;exports.selectAllDatasourcesByPath=YL;exports.selectAppState=Ex;exports.selectBreakpoints=JL;exports.selectCSSClassesByPath=U3;exports.selectCallChainVariables=f3;exports.selectCatalog=J_;exports.selectCatalogMethods=UL;exports.selectClassBreakpoints=QL;exports.selectClassOffset=p3;exports.selectClasses=R3;exports.selectClassesFolder=Ax;exports.selectComponents=Mx;exports.selectComponentsByPath=qL;exports.selectContentByPath=xx;exports.selectCraftedComponent=Y3;exports.selectCurrentFrameByThreadId=u3;exports.selectCurrentTab=m3;exports.selectDataclasses=BL;exports.selectDatasource=VL;exports.selectDatasourcesByPath=Sx;exports.selectDatasourcesTheme=X3;exports.selectDebuggerChannels=c3;exports.selectDebuggerData=Ds;exports.selectDebuggerMeta=KL;exports.selectDebuggerSessions=En;exports.selectDebuggerSessionsCount=XL;exports.selectDebuggers=O3;exports.selectDraftBreakpoints=ZL;exports.selectDraftClassBreakpoints=e3;exports.selectExceptions=h3;exports.selectExplorer=T3;exports.selectExpressions=n3;exports.selectExpressionsVariables=d3;exports.selectFlagsByPath=H3;exports.selectGuestPrivilege=I3;exports.selectHasTabs=_3;exports.selectHighlightedLines=t3;exports.selectInspectedCSSClass=G3;exports.selectInspectedDatasource=q3;exports.selectInspector=ep;exports.selectInspectorStateByType=K3;exports.selectIsLoaded=J3;exports.selectMethods=x3;exports.selectMethodsFolder=Rx;exports.selectModals=A3;exports.selectMonacoZoom=W3;exports.selectPanelByPath=p5;exports.selectPreferences=j3;exports.selectPreviewedWebformsPaths=b3;exports.selectPrivileges=D3;exports.selectProjectSettings=N3;exports.selectQodly=F3;exports.selectRecentFiles=g3;exports.selectRemoteDebuggerMode=L3;exports.selectRoles=P3;exports.selectRolesDate=$3;exports.selectRolesFlags=M3;exports.selectRoot=za;exports.selectSelectedTab=k3;exports.selectServerSettings=Q_;exports.selectSessionSettings=Px;exports.selectSharedCSS=z3;exports.selectSharedDatasources=Ox;exports.selectSourceByPath=a3;exports.selectSourceByThreadId=s3;exports.selectStackFrames=l3;exports.selectStoppedFromDebugSession=o3;exports.selectStylesByPath=B3;exports.selectTab=YC;exports.selectTabByPath=gf;exports.selectTabByReference=wn;exports.selectTabExtraByPath=w3;exports.selectTabMaxWeight=y3;exports.selectTabs=cu;exports.selectTemplates=kx;exports.selectTemplatesData=V3;exports.selectThreadIdByPath=i3;exports.selectTouchedTabs=Z_;exports.selectTouchedTabsLength=S3;exports.selectWebForms=C3;exports.selectWebFormsFolder=Cx;exports.selectWebformNodes=E3;exports.selectWebformStylesByPath=ew;exports.selectWebforms=mf;exports.serializeModel=hF;exports.setActiveLine=z6;exports.setBreakpointsDecoration=B6;exports.setCallChainVariables=tF;exports.setContent=zC;exports.setDataSources=GF;exports.setDatasourceEvents=t5;exports.setDatasourcesTheme=PF;exports.setDebuggerMeta=oF;exports.setExpression=Y6;exports.setExpressionVariables=rF;exports.setFolderChildren=_6;exports.setModelFlag=bF;exports.setPanelState=XF;exports.setRolesContent=uw;exports.setSelectedGroup=AF;exports.setSessions=_C;exports.setSetting=uC;exports.setSettings=sp;exports.setSettingsAsText=p6;exports.setSourceContent=nF;exports.setTabExtra=UF;exports.setTabFlags=ww;exports.setTabs=WF;exports.setTabsFlags=BF;exports.setTemplateData=WC;exports.setTemplatesData=FC;exports.setWebformsFlag=DF;exports.sort=Ux;exports.stateReducer=rR;exports.stateSlice=_w;exports.store=Qs;exports.toAPI=aw;exports.toState=B4;exports.toggleExpandFolder=g6;exports.toggleInspector=CF;exports.togglePermission=F4;exports.togglePrivilegePermission=Vx;exports.toggleTab=c6;exports.tryCloseAllTabs=M6;exports.tryCloseLeftTabs=$6;exports.tryCloseOtherTabs=I6;exports.tryCloseRightTabs=k6;exports.tryCloseTab=hw;exports.tryEditMethod=E6;exports.tryInjectMethod=yC;exports.tryRenameDataclass=mF;exports.uniquePush=Gn;exports.updateExpressionAt=K6;exports.updatePrivileges=oC;exports.updateRoles=aC;exports.updateRolesAndPrivileges=cw;exports.updateSession=Z6;exports.updateSharedCss=u5;exports.updateSharedDatasources=Ew;exports.uploadFile=T6;exports.uploadFileAndGetResponse=O6;exports.useAppDispatch=WL;exports.useAppSelector=Ua;exports.useAttribute=SF;exports.useCatalog=uL;exports.useCollections=wF;exports.useDataclass=EF;exports.useDataclasses=_F;exports.useMethod=GL;exports.useMethods=zL;exports.useModelFlags=TF;exports.useModelProperties=OF;exports.wipeDebuggerSessions=wC;
309
309
  //# sourceMappingURL=index.cjs.js.map