@ws-ui/store 0.1.18 → 0.1.19

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,21 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@ws-ui/shared"),pt=require("react"),WS=require("react-dom");function Je(e){for(var n=arguments.length,t=Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];if(process.env.NODE_ENV!=="production"){var s=JS[e],i=s?typeof s=="function"?s.apply(null,t):s:"unknown error nr: "+e;throw Error("[Immer] "+i)}throw Error("[Immer] minified error nr: "+e+(t.length?" "+t.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Mr(e){return!!e&&!!e[ye]}function hr(e){var n;return!!e&&(function(t){if(!t||typeof t!="object")return!1;var a=Object.getPrototypeOf(t);if(a===null)return!0;var s=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===XS}(e)||Array.isArray(e)||!!e[Ra]||!!(!((n=e.constructor)===null||n===void 0)&&n[Ra])||ys(e)||bs(e))}function Lr(e,n,t){t===void 0&&(t=!1),rn(e)===0?(t?Object.keys:Hn)(e).forEach(function(a){t&&typeof a=="symbol"||n(a,e[a],e)}):e.forEach(function(a,s){return n(s,a,e)})}function rn(e){var n=e[ye];return n?n.i>3?n.i-4:n.i:Array.isArray(e)?1:ys(e)?2:bs(e)?3:0}function en(e,n){return rn(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function zo(e,n){return rn(e)===2?e.get(n):e[n]}function Hp(e,n,t){var a=rn(e);a===2?e.set(n,t):a===3?e.add(t):e[n]=t}function Gp(e,n){return e===n?e!==0||1/e==1/n:e!=e&&n!=n}function ys(e){return VS&&e instanceof Map}function bs(e){return KS&&e instanceof Set}function ft(e){return e.o||e.t}function dc(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var n=qp(e);delete n[ye];for(var t=Hn(n),a=0;a<t.length;a++){var s=t[a],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),n)}function pc(e,n){return n===void 0&&(n=!1),hc(e)||Mr(e)||!hr(e)||(rn(e)>1&&(e.set=e.add=e.clear=e.delete=US),Object.freeze(e),n&&Lr(e,function(t,a){return pc(a,!0)},!0)),e}function US(){Je(2)}function hc(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function br(e){var n=ku[e];return n||Je(18,e),n}function gc(e,n){ku[e]||(ku[e]=n)}function Fa(){return process.env.NODE_ENV==="production"||Vn||Je(0),Vn}function ou(e,n){n&&(br("Patches"),e.u=[],e.s=[],e.v=n)}function es(e){Nu(e),e.p.forEach(HS),e.p=null}function Nu(e){e===Vn&&(Vn=e.l)}function Rd(e){return Vn={p:[],l:Vn,h:e,m:!0,_:0}}function HS(e){var n=e[ye];n.i===0||n.i===1?n.j():n.g=!0}function su(e,n){n._=n.p.length;var t=n.p[0],a=e!==void 0&&e!==t;return n.h.O||br("ES5").S(n,e,a),a?(t[ye].P&&(es(n),Je(4)),hr(e)&&(e=ts(n,e),n.l||rs(n,e)),n.u&&br("Patches").M(t[ye].t,e,n.u,n.s)):e=ts(n,t,[]),es(n),n.u&&n.v(n.u,n.s),e!==mc?e:void 0}function ts(e,n,t){if(hc(n))return n;var a=n[ye];if(!a)return Lr(n,function(l,d){return Od(e,a,n,l,d,t)},!0),n;if(a.A!==e)return n;if(!a.P)return rs(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var s=a.i===4||a.i===5?a.o=dc(a.k):a.o,i=s,c=!1;a.i===3&&(i=new Set(s),s.clear(),c=!0),Lr(i,function(l,d){return Od(e,a,s,l,d,t,c)}),rs(e,s,!1),t&&e.u&&br("Patches").N(a,t,e.u,e.s)}return a.o}function Od(e,n,t,a,s,i,c){if(process.env.NODE_ENV!=="production"&&s===t&&Je(5),Mr(s)){var l=ts(e,s,i&&n&&n.i!==3&&!en(n.R,a)?i.concat(a):void 0);if(Hp(t,a,l),!Mr(l))return;e.m=!1}else c&&t.add(s);if(hr(s)&&!hc(s)){if(!e.h.D&&e._<1)return;ts(e,s),n&&n.A.l||rs(e,s)}}function rs(e,n,t){t===void 0&&(t=!1),!e.l&&e.h.D&&e.m&&pc(n,t)}function iu(e,n){var t=e[ye];return(t?ft(t):e)[n]}function Ad(e,n){if(n in e)for(var t=Object.getPrototypeOf(e);t;){var a=Object.getOwnPropertyDescriptor(t,n);if(a)return a;t=Object.getPrototypeOf(t)}}function Lt(e){e.P||(e.P=!0,e.l&&Lt(e.l))}function uu(e){e.o||(e.o=dc(e.t))}function $a(e,n,t){var a=ys(n)?br("MapSet").F(n,t):bs(n)?br("MapSet").T(n,t):e.O?function(s,i){var c=Array.isArray(s),l={i:c?1:0,A:i?i.A:Fa(),P:!1,I:!1,R:{},l:i,t:s,k:null,o:null,j:null,C:!1},d=l,p=Ma;c&&(d=[l],p=Ca);var h=Proxy.revocable(d,p),y=h.revoke,_=h.proxy;return l.k=_,l.j=y,_}(n,t):br("ES5").J(n,t);return(t?t.A:Fa()).p.push(a),a}function GS(e){return Mr(e)||Je(22,e),function n(t){if(!hr(t))return t;var a,s=t[ye],i=rn(t);if(s){if(!s.P&&(s.i<4||!br("ES5").K(s)))return s.t;s.I=!0,a=Pd(t,i),s.I=!1}else a=Pd(t,i);return Lr(a,function(c,l){s&&zo(s.t,c)===l||Hp(a,c,n(l))}),i===3?new Set(a):a}(e)}function Pd(e,n){switch(n){case 2:return new Map(e);case 3:return Array.from(e)}return dc(e)}function qS(){function e(c,l){var d=i[c];return d?d.enumerable=l:i[c]=d={configurable:!0,enumerable:l,get:function(){var p=this[ye];return process.env.NODE_ENV!=="production"&&s(p),Ma.get(p,c)},set:function(p){var h=this[ye];process.env.NODE_ENV!=="production"&&s(h),Ma.set(h,c,p)}},d}function n(c){for(var l=c.length-1;l>=0;l--){var d=c[l][ye];if(!d.P)switch(d.i){case 5:a(d)&&Lt(d);break;case 4:t(d)&&Lt(d)}}}function t(c){for(var l=c.t,d=c.k,p=Hn(d),h=p.length-1;h>=0;h--){var y=p[h];if(y!==ye){var _=l[y];if(_===void 0&&!en(l,y))return!0;var E=d[y],T=E&&E[ye];if(T?T.t!==_:!Gp(E,_))return!0}}var x=!!l[ye];return p.length!==Hn(l).length+(x?0:1)}function a(c){var l=c.k;if(l.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function s(c){c.g&&Je(3,JSON.stringify(ft(c)))}var i={};gc("ES5",{J:function(c,l){var d=Array.isArray(c),p=function(y,_){if(y){for(var E=Array(_.length),T=0;T<_.length;T++)Object.defineProperty(E,""+T,e(T,!0));return E}var x=qp(_);delete x[ye];for(var D=Hn(x),P=0;P<D.length;P++){var j=D[P];x[j]=e(j,y||!!x[j].enumerable)}return Object.create(Object.getPrototypeOf(_),x)}(d,c),h={i:d?5:4,A:l?l.A:Fa(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,ye,{value:h,writable:!0}),p},S:function(c,l,d){d?Mr(l)&&l[ye].A===c&&n(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var y=h[ye];if(y){var _=y.t,E=y.k,T=y.R,x=y.i;if(x===4)Lr(E,function(k){k!==ye&&(_[k]!==void 0||en(_,k)?T[k]||p(E[k]):(T[k]=!0,Lt(y)))}),Lr(_,function(k){E[k]!==void 0||en(E,k)||(T[k]=!1,Lt(y))});else if(x===5){if(a(y)&&(Lt(y),T.length=!0),E.length<_.length)for(var D=E.length;D<_.length;D++)T[D]=!1;else for(var P=_.length;P<E.length;P++)T[P]=!0;for(var j=Math.min(E.length,_.length),M=0;M<j;M++)E.hasOwnProperty(M)||(T[M]=!0),T[M]===void 0&&p(E[M])}}}}(c.p[0]),n(c.p))},K:function(c){return c.i===4?t(c):a(c)}})}function YS(){function e(a){if(!hr(a))return a;if(Array.isArray(a))return a.map(e);if(ys(a))return new Map(Array.from(a.entries()).map(function(c){return[c[0],e(c[1])]}));if(bs(a))return new Set(Array.from(a).map(e));var s=Object.create(Object.getPrototypeOf(a));for(var i in a)s[i]=e(a[i]);return en(a,Ra)&&(s[Ra]=a[Ra]),s}function n(a){return Mr(a)?e(a):a}var t="add";gc("Patches",{$:function(a,s){return s.forEach(function(i){for(var c=i.path,l=i.op,d=a,p=0;p<c.length-1;p++){var h=rn(d),y=c[p];typeof y!="string"&&typeof y!="number"&&(y=""+y),h!==0&&h!==1||y!=="__proto__"&&y!=="constructor"||Je(24),typeof d=="function"&&y==="prototype"&&Je(24),typeof(d=zo(d,y))!="object"&&Je(15,c.join("/"))}var _=rn(d),E=e(i.value),T=c[c.length-1];switch(l){case"replace":switch(_){case 2:return d.set(T,E);case 3:Je(16);default:return d[T]=E}case t:switch(_){case 1:return T==="-"?d.push(E):d.splice(T,0,E);case 2:return d.set(T,E);case 3:return d.add(E);default:return d[T]=E}case"remove":switch(_){case 1:return d.splice(T,1);case 2:return d.delete(T);case 3:return d.delete(i.value);default:return delete d[T]}default:Je(17,l)}}),a},N:function(a,s,i,c){switch(a.i){case 0:case 4:case 2:return function(l,d,p,h){var y=l.t,_=l.o;Lr(l.R,function(E,T){var x=zo(y,E),D=zo(_,E),P=T?en(y,E)?"replace":t:"remove";if(x!==D||P!=="replace"){var j=d.concat(E);p.push(P==="remove"?{op:P,path:j}:{op:P,path:j,value:D}),h.push(P===t?{op:"remove",path:j}:P==="remove"?{op:t,path:j,value:n(x)}:{op:"replace",path:j,value:n(x)})}})}(a,s,i,c);case 5:case 1:return function(l,d,p,h){var y=l.t,_=l.R,E=l.o;if(E.length<y.length){var T=[E,y];y=T[0],E=T[1];var x=[h,p];p=x[0],h=x[1]}for(var D=0;D<y.length;D++)if(_[D]&&E[D]!==y[D]){var P=d.concat([D]);p.push({op:"replace",path:P,value:n(E[D])}),h.push({op:"replace",path:P,value:n(y[D])})}for(var j=y.length;j<E.length;j++){var M=d.concat([j]);p.push({op:t,path:M,value:n(E[j])})}y.length<E.length&&h.push({op:"replace",path:d.concat(["length"]),value:y.length})}(a,s,i,c);case 3:return function(l,d,p,h){var y=l.t,_=l.o,E=0;y.forEach(function(T){if(!_.has(T)){var x=d.concat([E]);p.push({op:"remove",path:x,value:T}),h.unshift({op:t,path:x,value:T})}E++}),E=0,_.forEach(function(T){if(!y.has(T)){var x=d.concat([E]);p.push({op:t,path:x,value:T}),h.unshift({op:"remove",path:x,value:T})}E++})}(a,s,i,c)}},M:function(a,s,i,c){i.push({op:"replace",path:[],value:s===mc?void 0:s}),c.push({op:"replace",path:[],value:a})}})}function zS(){function e(l,d){function p(){this.constructor=l}s(l,d),l.prototype=(p.prototype=d.prototype,new p)}function n(l){l.o||(l.R=new Map,l.o=new Map(l.t))}function t(l){l.o||(l.o=new Set,l.t.forEach(function(d){if(hr(d)){var p=$a(l.A.h,d,l);l.p.set(d,p),l.o.add(p)}else l.o.add(d)}))}function a(l){l.g&&Je(3,JSON.stringify(ft(l)))}var s=function(l,d){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var y in h)h.hasOwnProperty(y)&&(p[y]=h[y])})(l,d)},i=function(){function l(p,h){return this[ye]={i:2,l:h,A:h?h.A:Fa(),P:!1,I:!1,o:void 0,R:void 0,t:p,k:this,C:!1,g:!1},this}e(l,Map);var d=l.prototype;return Object.defineProperty(d,"size",{get:function(){return ft(this[ye]).size}}),d.has=function(p){return ft(this[ye]).has(p)},d.set=function(p,h){var y=this[ye];return a(y),ft(y).has(p)&&ft(y).get(p)===h||(n(y),Lt(y),y.R.set(p,!0),y.o.set(p,h),y.R.set(p,!0)),this},d.delete=function(p){if(!this.has(p))return!1;var h=this[ye];return a(h),n(h),Lt(h),h.t.has(p)?h.R.set(p,!1):h.R.delete(p),h.o.delete(p),!0},d.clear=function(){var p=this[ye];a(p),ft(p).size&&(n(p),Lt(p),p.R=new Map,Lr(p.t,function(h){p.R.set(h,!1)}),p.o.clear())},d.forEach=function(p,h){var y=this;ft(this[ye]).forEach(function(_,E){p.call(h,y.get(E),E,y)})},d.get=function(p){var h=this[ye];a(h);var y=ft(h).get(p);if(h.I||!hr(y)||y!==h.t.get(p))return y;var _=$a(h.A.h,y,h);return n(h),h.o.set(p,_),_},d.keys=function(){return ft(this[ye]).keys()},d.values=function(){var p,h=this,y=this.keys();return(p={})[Wo]=function(){return h.values()},p.next=function(){var _=y.next();return _.done?_:{done:!1,value:h.get(_.value)}},p},d.entries=function(){var p,h=this,y=this.keys();return(p={})[Wo]=function(){return h.entries()},p.next=function(){var _=y.next();if(_.done)return _;var E=h.get(_.value);return{done:!1,value:[_.value,E]}},p},d[Wo]=function(){return this.entries()},l}(),c=function(){function l(p,h){return this[ye]={i:3,l:h,A:h?h.A:Fa(),P:!1,I:!1,o:void 0,t:p,k:this,p:new Map,g:!1,C:!1},this}e(l,Set);var d=l.prototype;return Object.defineProperty(d,"size",{get:function(){return ft(this[ye]).size}}),d.has=function(p){var h=this[ye];return a(h),h.o?!!h.o.has(p)||!(!h.p.has(p)||!h.o.has(h.p.get(p))):h.t.has(p)},d.add=function(p){var h=this[ye];return a(h),this.has(p)||(t(h),Lt(h),h.o.add(p)),this},d.delete=function(p){if(!this.has(p))return!1;var h=this[ye];return a(h),t(h),Lt(h),h.o.delete(p)||!!h.p.has(p)&&h.o.delete(h.p.get(p))},d.clear=function(){var p=this[ye];a(p),ft(p).size&&(t(p),Lt(p),p.o.clear())},d.values=function(){var p=this[ye];return a(p),t(p),p.o.values()},d.entries=function(){var p=this[ye];return a(p),t(p),p.o.entries()},d.keys=function(){return this.values()},d[Wo]=function(){return this.values()},d.forEach=function(p,h){for(var y=this.values(),_=y.next();!_.done;)p.call(h,_.value,_.value,this),_=y.next()},l}();gc("MapSet",{F:function(l,d){return new i(l,d)},T:function(l,d){return new c(l,d)}})}var Dd,Vn,vc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",VS=typeof Map<"u",KS=typeof Set<"u",Id=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",mc=vc?Symbol.for("immer-nothing"):((Dd={})["immer-nothing"]=!0,Dd),Ra=vc?Symbol.for("immer-draftable"):"__$immer_draftable",ye=vc?Symbol.for("immer-state"):"__$immer_state",Wo=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",JS={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"},XS=""+Object.prototype.constructor,Hn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,qp=Object.getOwnPropertyDescriptors||function(e){var n={};return Hn(e).forEach(function(t){n[t]=Object.getOwnPropertyDescriptor(e,t)}),n},ku={},Ma={get:function(e,n){if(n===ye)return e;var t=ft(e);if(!en(t,n))return function(s,i,c){var l,d=Ad(i,c);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(s.k):void 0}(e,t,n);var a=t[n];return e.I||!hr(a)?a:a===iu(e.t,n)?(uu(e),e.o[n]=$a(e.A.h,a,e)):a},has:function(e,n){return n in ft(e)},ownKeys:function(e){return Reflect.ownKeys(ft(e))},set:function(e,n,t){var a=Ad(ft(e),n);if(a!=null&&a.set)return a.set.call(e.k,t),!0;if(!e.P){var s=iu(ft(e),n),i=s==null?void 0:s[ye];if(i&&i.t===t)return e.o[n]=t,e.R[n]=!1,!0;if(Gp(t,s)&&(t!==void 0||en(e.t,n)))return!0;uu(e),Lt(e)}return e.o[n]===t&&(t!==void 0||n in e.o)||Number.isNaN(t)&&Number.isNaN(e.o[n])||(e.o[n]=t,e.R[n]=!0),!0},deleteProperty:function(e,n){return iu(e.t,n)!==void 0||n in e.t?(e.R[n]=!1,uu(e),Lt(e)):delete e.R[n],e.o&&delete e.o[n],!0},getOwnPropertyDescriptor:function(e,n){var t=ft(e),a=Reflect.getOwnPropertyDescriptor(t,n);return a&&{writable:!0,configurable:e.i!==1||n!=="length",enumerable:a.enumerable,value:t[n]}},defineProperty:function(){Je(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Je(12)}},Ca={};Lr(Ma,function(e,n){Ca[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}}),Ca.deleteProperty=function(e,n){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(n))&&Je(13),Ca.set.call(this,e,n,void 0)},Ca.set=function(e,n,t){return process.env.NODE_ENV!=="production"&&n!=="length"&&isNaN(parseInt(n))&&Je(14),Ma.set.call(this,e[0],n,t,e[0])};var ZS=function(){function e(t){var a=this;this.O=Id,this.D=!0,this.produce=function(s,i,c){if(typeof s=="function"&&typeof i!="function"){var l=i;i=s;var d=a;return function(x){var D=this;x===void 0&&(x=l);for(var P=arguments.length,j=Array(P>1?P-1:0),M=1;M<P;M++)j[M-1]=arguments[M];return d.produce(x,function(k){var O;return(O=i).call.apply(O,[D,k].concat(j))})}}var p;if(typeof i!="function"&&Je(6),c!==void 0&&typeof c!="function"&&Je(7),hr(s)){var h=Rd(a),y=$a(a,s,void 0),_=!0;try{p=i(y),_=!1}finally{_?es(h):Nu(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(x){return ou(h,c),su(x,h)},function(x){throw es(h),x}):(ou(h,c),su(p,h))}if(!s||typeof s!="object"){if((p=i(s))===void 0&&(p=s),p===mc&&(p=void 0),a.D&&pc(p,!0),c){var E=[],T=[];br("Patches").M(s,p,E,T),c(E,T)}return p}Je(21,s)},this.produceWithPatches=function(s,i){if(typeof s=="function")return function(p){for(var h=arguments.length,y=Array(h>1?h-1:0),_=1;_<h;_++)y[_-1]=arguments[_];return a.produceWithPatches(p,function(E){return s.apply(void 0,[E].concat(y))})};var c,l,d=a.produce(s,i,function(p,h){c=p,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,l]}):[d,c,l]},typeof(t==null?void 0:t.useProxies)=="boolean"&&this.setUseProxies(t.useProxies),typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var n=e.prototype;return n.createDraft=function(t){hr(t)||Je(8),Mr(t)&&(t=GS(t));var a=Rd(this),s=$a(this,t,void 0);return s[ye].C=!0,Nu(a),s},n.finishDraft=function(t,a){var s=t&&t[ye];process.env.NODE_ENV!=="production"&&(s&&s.C||Je(9),s.I&&Je(10));var i=s.A;return ou(i,a),su(void 0,i)},n.setAutoFreeze=function(t){this.D=t},n.setUseProxies=function(t){t&&!Id&&Je(20),this.O=t},n.applyPatches=function(t,a){var s;for(s=a.length-1;s>=0;s--){var i=a[s];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}s>-1&&(a=a.slice(s+1));var c=br("Patches").$;return Mr(t)?c(t,a):this.produce(t,function(l){return c(l,a)})},e}(),Gt=new ZS,Vo=Gt.produce;Gt.produceWithPatches.bind(Gt);Gt.setAutoFreeze.bind(Gt);Gt.setUseProxies.bind(Gt);Gt.applyPatches.bind(Gt);Gt.createDraft.bind(Gt);Gt.finishDraft.bind(Gt);function La(e){"@babel/helpers - typeof";return La=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},La(e)}function QS(e,n){if(La(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,n||"default");if(La(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function ew(e){var n=QS(e,"string");return La(n)==="symbol"?n:String(n)}function tw(e,n,t){return n=ew(n),n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Fd(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,a)}return t}function $d(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Fd(Object(t),!0).forEach(function(a){tw(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Fd(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function Ct(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 Md=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cu=function(){return Math.random().toString(36).substring(7).split("").join(".")},En={INIT:"@@redux/INIT"+cu(),REPLACE:"@@redux/REPLACE"+cu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cu()}};function Yp(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 rw(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(ow(e))return"date";if(aw(e))return"error";var t=nw(e);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return n.slice(8,-1).toLowerCase().replace(/\s/g,"")}function nw(e){return typeof e.constructor=="function"?e.constructor.name:null}function aw(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ow(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function _n(e){var n=typeof e;return process.env.NODE_ENV!=="production"&&(n=rw(e)),n}function zp(e,n,t){var a;if(typeof n=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ct(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 t>"u"&&(t=n,n=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(1):"Expected the enhancer to be a function. Instead, received: '"+_n(t)+"'");return t(zp)(e,n)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(2):"Expected the root reducer to be a function. Instead, received: '"+_n(e)+"'");var s=e,i=n,c=[],l=c,d=!1;function p(){l===c&&(l=c.slice())}function h(){if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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 i}function y(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(4):"Expected the listener to be a function. Instead, received: '"+_n(x)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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 D=!0;return p(),l.push(x),function(){if(D){if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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.");D=!1,p();var j=l.indexOf(x);l.splice(j,1),c=null}}}function _(x){if(!Yp(x))throw new Error(process.env.NODE_ENV==="production"?Ct(7):"Actions must be plain objects. Instead, the actual type was: '"+_n(x)+"'. 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 x.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(9):"Reducers may not dispatch actions.");try{d=!0,i=s(i,x)}finally{d=!1}for(var D=c=l,P=0;P<D.length;P++){var j=D[P];j()}return x}function E(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(10):"Expected the nextReducer to be a function. Instead, received: '"+_n(x));s=x,_({type:En.REPLACE})}function T(){var x,D=y;return x={subscribe:function(j){if(typeof j!="object"||j===null)throw new Error(process.env.NODE_ENV==="production"?Ct(11):"Expected the observer to be an object. Instead, received: '"+_n(j)+"'");function M(){j.next&&j.next(h())}M();var k=D(M);return{unsubscribe:k}}},x[Md]=function(){return this},x}return _({type:En.INIT}),a={dispatch:_,subscribe:y,getState:h,replaceReducer:E},a[Md]=T,a}function Ld(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function sw(e,n,t,a){var s=Object.keys(n),i=t&&t.type===En.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(s.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(!Yp(e))return"The "+i+' has unexpected type of "'+_n(e)+'". Expected argument to be an object with the following '+('keys: "'+s.join('", "')+'"');var c=Object.keys(e).filter(function(l){return!n.hasOwnProperty(l)&&!a[l]});if(c.forEach(function(l){a[l]=!0}),!(t&&t.type===En.REPLACE)&&c.length>0)return"Unexpected "+(c.length>1?"keys":"key")+" "+('"'+c.join('", "')+'" found in '+i+". ")+"Expected to find one of the known reducer keys instead: "+('"'+s.join('", "')+'". Unexpected keys will be ignored.')}function iw(e){Object.keys(e).forEach(function(n){var t=e[n],a=t(void 0,{type:En.INIT});if(typeof a>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(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 t(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(13):'The slice reducer for key "'+n+'" returned undefined when probed with a random type. '+("Don't try to handle '"+En.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 Vp(e){for(var n=Object.keys(e),t={},a=0;a<n.length;a++){var s=n[a];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Ld('No reducer provided for key "'+s+'"'),typeof e[s]=="function"&&(t[s]=e[s])}var i=Object.keys(t),c;process.env.NODE_ENV!=="production"&&(c={});var l;try{iw(t)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(process.env.NODE_ENV!=="production"){var y=sw(p,t,h,c);y&&Ld(y)}for(var _=!1,E={},T=0;T<i.length;T++){var x=i[T],D=t[x],P=p[x],j=D(P,h);if(typeof j>"u"){var M=h&&h.type;throw new Error(process.env.NODE_ENV==="production"?Ct(14):"When called with an action of type "+(M?'"'+String(M)+'"':"(unknown type)")+', the slice reducer for key "'+x+'" 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.')}E[x]=j,_=_||j!==P}return _=_||i.length!==Object.keys(p).length,_?E:p}}function ns(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.length===0?function(a){return a}:n.length===1?n[0]:n.reduce(function(a,s){return function(){return a(s.apply(void 0,arguments))}})}function uw(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(a){return function(){var s=a.apply(void 0,arguments),i=function(){throw new Error(process.env.NODE_ENV==="production"?Ct(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:s.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=n.map(function(d){return d(c)});return i=ns.apply(void 0,l)(s.dispatch),$d($d({},s),{},{dispatch:i})}}}var as="NOT_FOUND";function cw(e){var n;return{get:function(a){return n&&e(n.key,a)?n.value:as},put:function(a,s){n={key:a,value:s}},getEntries:function(){return n?[n]:[]},clear:function(){n=void 0}}}function lw(e,n){var t=[];function a(l){var d=t.findIndex(function(h){return n(l,h.key)});if(d>-1){var p=t[d];return d>0&&(t.splice(d,1),t.unshift(p)),p.value}return as}function s(l,d){a(l)===as&&(t.unshift({key:l,value:d}),t.length>e&&t.pop())}function i(){return t}function c(){t=[]}return{get:a,put:s,getEntries:i,clear:c}}var fw=function(n,t){return n===t};function dw(e){return function(t,a){if(t===null||a===null||t.length!==a.length)return!1;for(var s=t.length,i=0;i<s;i++)if(!e(t[i],a[i]))return!1;return!0}}function pw(e,n){var t=typeof n=="object"?n:{equalityCheck:n},a=t.equalityCheck,s=a===void 0?fw:a,i=t.maxSize,c=i===void 0?1:i,l=t.resultEqualityCheck,d=dw(s),p=c===1?cw(d):lw(c,d);function h(){var y=p.get(arguments);if(y===as){if(y=e.apply(null,arguments),l){var _=p.getEntries(),E=_.find(function(T){return l(T.value,y)});E&&(y=E.value)}p.put(arguments,y)}return y}return h.clearCache=function(){return p.clear()},h}function hw(e){var n=Array.isArray(e[0])?e[0]:e;if(!n.every(function(a){return typeof a=="function"})){var t=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: ["+t+"]")}return n}function gw(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];var s=function(){for(var c=arguments.length,l=new Array(c),d=0;d<c;d++)l[d]=arguments[d];var p=0,h,y={memoizeOptions:void 0},_=l.pop();if(typeof _=="object"&&(y=_,_=l.pop()),typeof _!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof _+"]");var E=y,T=E.memoizeOptions,x=T===void 0?t:T,D=Array.isArray(x)?x:[x],P=hw(l),j=e.apply(void 0,[function(){return p++,_.apply(null,arguments)}].concat(D)),M=e(function(){for(var O=[],z=P.length,H=0;H<z;H++)O.push(P[H].apply(null,arguments));return h=j.apply(null,O),h});return Object.assign(M,{resultFunc:_,memoizedResultFunc:j,dependencies:P,lastResult:function(){return h},recomputations:function(){return p},resetRecomputations:function(){return p=0}}),M};return s}var G=gw(pw);function Kp(e){var n=function(a){var s=a.dispatch,i=a.getState;return function(c){return function(l){return typeof l=="function"?l(s,i,e):c(l)}}};return n}var Jp=Kp();Jp.withExtraArgument=Kp;const Nd=Jp;var vw=globalThis&&globalThis.__extends||function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(a[i]=s[i])},e(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(n,t);function a(){this.constructor=n}n.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}(),mw=globalThis&&globalThis.__generator||function(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,s,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(h){return d([p,h])}}function d(p){if(a)throw new TypeError("Generator is already executing.");for(;t;)try{if(a=1,s&&(i=p[0]&2?s.return:p[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,p[1])).done)return i;switch(s=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,s=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){t.label=p[1];break}if(p[0]===6&&t.label<i[1]){t.label=i[1],i=p;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(p);break}i[2]&&t.ops.pop(),t.trys.pop();continue}p=n.call(e,t)}catch(h){p=[6,h],s=0}finally{a=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},os=globalThis&&globalThis.__spreadArray||function(e,n){for(var t=0,a=n.length,s=e.length;t<a;t++,s++)e[s]=n[t];return e},yw=Object.defineProperty,bw=Object.defineProperties,_w=Object.getOwnPropertyDescriptors,kd=Object.getOwnPropertySymbols,Ew=Object.prototype.hasOwnProperty,Sw=Object.prototype.propertyIsEnumerable,jd=function(e,n,t){return n in e?yw(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t},tn=function(e,n){for(var t in n||(n={}))Ew.call(n,t)&&jd(e,t,n[t]);if(kd)for(var a=0,s=kd(n);a<s.length;a++){var t=s[a];Sw.call(n,t)&&jd(e,t,n[t])}return e},lu=function(e,n){return bw(e,_w(n))},ww=function(e,n,t){return new Promise(function(a,s){var i=function(d){try{l(t.next(d))}catch(p){s(p)}},c=function(d){try{l(t.throw(d))}catch(p){s(p)}},l=function(d){return d.done?a(d.value):Promise.resolve(d.value).then(i,c)};l((t=t.apply(e,n)).next())})},Tw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ns:ns.apply(null,arguments)};function Xp(e){if(typeof e!="object"||e===null)return!1;var n=Object.getPrototypeOf(e);if(n===null)return!0;for(var t=n;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return n===t}function Zp(e,n){var t=0;return{measureTime:function(a){var s=Date.now();try{return a()}finally{var i=Date.now();t+=i-s}},warnIfExceeded:function(){t>e&&console.warn(n+" took "+t+"ms, which is more than the warning threshold of "+e+`ms.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@ws-ui/shared"),pt=require("react"),GS=require("react-dom");function Je(e){for(var r=arguments.length,t=Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];if(process.env.NODE_ENV!=="production"){var s=QS[e],i=s?typeof s=="function"?s.apply(null,t):s:"unknown error nr: "+e;throw Error("[Immer] "+i)}throw Error("[Immer] minified error nr: "+e+(t.length?" "+t.map(function(c){return"'"+c+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Mr(e){return!!e&&!!e[me]}function hr(e){var r;return!!e&&(function(t){if(!t||typeof t!="object")return!1;var a=Object.getPrototypeOf(t);if(a===null)return!0;var s=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return s===Object||typeof s=="function"&&Function.toString.call(s)===ew}(e)||Array.isArray(e)||!!e[Ra]||!!(!((r=e.constructor)===null||r===void 0)&&r[Ra])||ms(e)||bs(e))}function Lr(e,r,t){t===void 0&&(t=!1),rn(e)===0?(t?Object.keys:Gn)(e).forEach(function(a){t&&typeof a=="symbol"||r(a,e[a],e)}):e.forEach(function(a,s){return r(s,a,e)})}function rn(e){var r=e[me];return r?r.i>3?r.i-4:r.i:Array.isArray(e)?1:ms(e)?2:bs(e)?3:0}function en(e,r){return rn(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function zo(e,r){return rn(e)===2?e.get(r):e[r]}function Gp(e,r,t){var a=rn(e);a===2?e.set(r,t):a===3?e.add(t):e[r]=t}function qp(e,r){return e===r?e!==0||1/e==1/r:e!=e&&r!=r}function ms(e){return XS&&e instanceof Map}function bs(e){return ZS&&e instanceof Set}function ft(e){return e.o||e.t}function dc(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var r=Yp(e);delete r[me];for(var t=Gn(r),a=0;a<t.length;a++){var s=t[a],i=r[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(Object.getPrototypeOf(e),r)}function pc(e,r){return r===void 0&&(r=!1),hc(e)||Mr(e)||!hr(e)||(rn(e)>1&&(e.set=e.add=e.clear=e.delete=qS),Object.freeze(e),r&&Lr(e,function(t,a){return pc(a,!0)},!0)),e}function qS(){Je(2)}function hc(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function br(e){var r=ku[e];return r||Je(18,e),r}function gc(e,r){ku[e]||(ku[e]=r)}function Fa(){return process.env.NODE_ENV==="production"||Kn||Je(0),Kn}function ou(e,r){r&&(br("Patches"),e.u=[],e.s=[],e.v=r)}function es(e){Nu(e),e.p.forEach(YS),e.p=null}function Nu(e){e===Kn&&(Kn=e.l)}function Od(e){return Kn={p:[],l:Kn,h:e,m:!0,_:0}}function YS(e){var r=e[me];r.i===0||r.i===1?r.j():r.g=!0}function su(e,r){r._=r.p.length;var t=r.p[0],a=e!==void 0&&e!==t;return r.h.O||br("ES5").S(r,e,a),a?(t[me].P&&(es(r),Je(4)),hr(e)&&(e=ts(r,e),r.l||rs(r,e)),r.u&&br("Patches").M(t[me].t,e,r.u,r.s)):e=ts(r,t,[]),es(r),r.u&&r.v(r.u,r.s),e!==yc?e:void 0}function ts(e,r,t){if(hc(r))return r;var a=r[me];if(!a)return Lr(r,function(l,d){return Ad(e,a,r,l,d,t)},!0),r;if(a.A!==e)return r;if(!a.P)return rs(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var s=a.i===4||a.i===5?a.o=dc(a.k):a.o,i=s,c=!1;a.i===3&&(i=new Set(s),s.clear(),c=!0),Lr(i,function(l,d){return Ad(e,a,s,l,d,t,c)}),rs(e,s,!1),t&&e.u&&br("Patches").N(a,t,e.u,e.s)}return a.o}function Ad(e,r,t,a,s,i,c){if(process.env.NODE_ENV!=="production"&&s===t&&Je(5),Mr(s)){var l=ts(e,s,i&&r&&r.i!==3&&!en(r.R,a)?i.concat(a):void 0);if(Gp(t,a,l),!Mr(l))return;e.m=!1}else c&&t.add(s);if(hr(s)&&!hc(s)){if(!e.h.D&&e._<1)return;ts(e,s),r&&r.A.l||rs(e,s)}}function rs(e,r,t){t===void 0&&(t=!1),!e.l&&e.h.D&&e.m&&pc(r,t)}function iu(e,r){var t=e[me];return(t?ft(t):e)[r]}function Pd(e,r){if(r in e)for(var t=Object.getPrototypeOf(e);t;){var a=Object.getOwnPropertyDescriptor(t,r);if(a)return a;t=Object.getPrototypeOf(t)}}function Lt(e){e.P||(e.P=!0,e.l&&Lt(e.l))}function uu(e){e.o||(e.o=dc(e.t))}function $a(e,r,t){var a=ms(r)?br("MapSet").F(r,t):bs(r)?br("MapSet").T(r,t):e.O?function(s,i){var c=Array.isArray(s),l={i:c?1:0,A:i?i.A:Fa(),P:!1,I:!1,R:{},l:i,t:s,k:null,o:null,j:null,C:!1},d=l,p=Ma;c&&(d=[l],p=Ca);var h=Proxy.revocable(d,p),m=h.revoke,_=h.proxy;return l.k=_,l.j=m,_}(r,t):br("ES5").J(r,t);return(t?t.A:Fa()).p.push(a),a}function zS(e){return Mr(e)||Je(22,e),function r(t){if(!hr(t))return t;var a,s=t[me],i=rn(t);if(s){if(!s.P&&(s.i<4||!br("ES5").K(s)))return s.t;s.I=!0,a=Dd(t,i),s.I=!1}else a=Dd(t,i);return Lr(a,function(c,l){s&&zo(s.t,c)===l||Gp(a,c,r(l))}),i===3?new Set(a):a}(e)}function Dd(e,r){switch(r){case 2:return new Map(e);case 3:return Array.from(e)}return dc(e)}function VS(){function e(c,l){var d=i[c];return d?d.enumerable=l:i[c]=d={configurable:!0,enumerable:l,get:function(){var p=this[me];return process.env.NODE_ENV!=="production"&&s(p),Ma.get(p,c)},set:function(p){var h=this[me];process.env.NODE_ENV!=="production"&&s(h),Ma.set(h,c,p)}},d}function r(c){for(var l=c.length-1;l>=0;l--){var d=c[l][me];if(!d.P)switch(d.i){case 5:a(d)&&Lt(d);break;case 4:t(d)&&Lt(d)}}}function t(c){for(var l=c.t,d=c.k,p=Gn(d),h=p.length-1;h>=0;h--){var m=p[h];if(m!==me){var _=l[m];if(_===void 0&&!en(l,m))return!0;var E=d[m],T=E&&E[me];if(T?T.t!==_:!qp(E,_))return!0}}var x=!!l[me];return p.length!==Gn(l).length+(x?0:1)}function a(c){var l=c.k;if(l.length!==c.t.length)return!0;var d=Object.getOwnPropertyDescriptor(l,l.length-1);if(d&&!d.get)return!0;for(var p=0;p<l.length;p++)if(!l.hasOwnProperty(p))return!0;return!1}function s(c){c.g&&Je(3,JSON.stringify(ft(c)))}var i={};gc("ES5",{J:function(c,l){var d=Array.isArray(c),p=function(m,_){if(m){for(var E=Array(_.length),T=0;T<_.length;T++)Object.defineProperty(E,""+T,e(T,!0));return E}var x=Yp(_);delete x[me];for(var D=Gn(x),P=0;P<D.length;P++){var j=D[P];x[j]=e(j,m||!!x[j].enumerable)}return Object.create(Object.getPrototypeOf(_),x)}(d,c),h={i:d?5:4,A:l?l.A:Fa(),P:!1,I:!1,R:{},l,t:c,k:p,o:null,g:!1,C:!1};return Object.defineProperty(p,me,{value:h,writable:!0}),p},S:function(c,l,d){d?Mr(l)&&l[me].A===c&&r(c.p):(c.u&&function p(h){if(h&&typeof h=="object"){var m=h[me];if(m){var _=m.t,E=m.k,T=m.R,x=m.i;if(x===4)Lr(E,function(k){k!==me&&(_[k]!==void 0||en(_,k)?T[k]||p(E[k]):(T[k]=!0,Lt(m)))}),Lr(_,function(k){E[k]!==void 0||en(E,k)||(T[k]=!1,Lt(m))});else if(x===5){if(a(m)&&(Lt(m),T.length=!0),E.length<_.length)for(var D=E.length;D<_.length;D++)T[D]=!1;else for(var P=_.length;P<E.length;P++)T[P]=!0;for(var j=Math.min(E.length,_.length),M=0;M<j;M++)E.hasOwnProperty(M)||(T[M]=!0),T[M]===void 0&&p(E[M])}}}}(c.p[0]),r(c.p))},K:function(c){return c.i===4?t(c):a(c)}})}function KS(){function e(a){if(!hr(a))return a;if(Array.isArray(a))return a.map(e);if(ms(a))return new Map(Array.from(a.entries()).map(function(c){return[c[0],e(c[1])]}));if(bs(a))return new Set(Array.from(a).map(e));var s=Object.create(Object.getPrototypeOf(a));for(var i in a)s[i]=e(a[i]);return en(a,Ra)&&(s[Ra]=a[Ra]),s}function r(a){return Mr(a)?e(a):a}var t="add";gc("Patches",{$:function(a,s){return s.forEach(function(i){for(var c=i.path,l=i.op,d=a,p=0;p<c.length-1;p++){var h=rn(d),m=c[p];typeof m!="string"&&typeof m!="number"&&(m=""+m),h!==0&&h!==1||m!=="__proto__"&&m!=="constructor"||Je(24),typeof d=="function"&&m==="prototype"&&Je(24),typeof(d=zo(d,m))!="object"&&Je(15,c.join("/"))}var _=rn(d),E=e(i.value),T=c[c.length-1];switch(l){case"replace":switch(_){case 2:return d.set(T,E);case 3:Je(16);default:return d[T]=E}case t:switch(_){case 1:return T==="-"?d.push(E):d.splice(T,0,E);case 2:return d.set(T,E);case 3:return d.add(E);default:return d[T]=E}case"remove":switch(_){case 1:return d.splice(T,1);case 2:return d.delete(T);case 3:return d.delete(i.value);default:return delete d[T]}default:Je(17,l)}}),a},N:function(a,s,i,c){switch(a.i){case 0:case 4:case 2:return function(l,d,p,h){var m=l.t,_=l.o;Lr(l.R,function(E,T){var x=zo(m,E),D=zo(_,E),P=T?en(m,E)?"replace":t:"remove";if(x!==D||P!=="replace"){var j=d.concat(E);p.push(P==="remove"?{op:P,path:j}:{op:P,path:j,value:D}),h.push(P===t?{op:"remove",path:j}:P==="remove"?{op:t,path:j,value:r(x)}:{op:"replace",path:j,value:r(x)})}})}(a,s,i,c);case 5:case 1:return function(l,d,p,h){var m=l.t,_=l.R,E=l.o;if(E.length<m.length){var T=[E,m];m=T[0],E=T[1];var x=[h,p];p=x[0],h=x[1]}for(var D=0;D<m.length;D++)if(_[D]&&E[D]!==m[D]){var P=d.concat([D]);p.push({op:"replace",path:P,value:r(E[D])}),h.push({op:"replace",path:P,value:r(m[D])})}for(var j=m.length;j<E.length;j++){var M=d.concat([j]);p.push({op:t,path:M,value:r(E[j])})}m.length<E.length&&h.push({op:"replace",path:d.concat(["length"]),value:m.length})}(a,s,i,c);case 3:return function(l,d,p,h){var m=l.t,_=l.o,E=0;m.forEach(function(T){if(!_.has(T)){var x=d.concat([E]);p.push({op:"remove",path:x,value:T}),h.unshift({op:t,path:x,value:T})}E++}),E=0,_.forEach(function(T){if(!m.has(T)){var x=d.concat([E]);p.push({op:t,path:x,value:T}),h.unshift({op:"remove",path:x,value:T})}E++})}(a,s,i,c)}},M:function(a,s,i,c){i.push({op:"replace",path:[],value:s===yc?void 0:s}),c.push({op:"replace",path:[],value:a})}})}function JS(){function e(l,d){function p(){this.constructor=l}s(l,d),l.prototype=(p.prototype=d.prototype,new p)}function r(l){l.o||(l.R=new Map,l.o=new Map(l.t))}function t(l){l.o||(l.o=new Set,l.t.forEach(function(d){if(hr(d)){var p=$a(l.A.h,d,l);l.p.set(d,p),l.o.add(p)}else l.o.add(d)}))}function a(l){l.g&&Je(3,JSON.stringify(ft(l)))}var s=function(l,d){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var m in h)h.hasOwnProperty(m)&&(p[m]=h[m])})(l,d)},i=function(){function l(p,h){return this[me]={i:2,l:h,A:h?h.A:Fa(),P:!1,I:!1,o:void 0,R:void 0,t:p,k:this,C:!1,g:!1},this}e(l,Map);var d=l.prototype;return Object.defineProperty(d,"size",{get:function(){return ft(this[me]).size}}),d.has=function(p){return ft(this[me]).has(p)},d.set=function(p,h){var m=this[me];return a(m),ft(m).has(p)&&ft(m).get(p)===h||(r(m),Lt(m),m.R.set(p,!0),m.o.set(p,h),m.R.set(p,!0)),this},d.delete=function(p){if(!this.has(p))return!1;var h=this[me];return a(h),r(h),Lt(h),h.t.has(p)?h.R.set(p,!1):h.R.delete(p),h.o.delete(p),!0},d.clear=function(){var p=this[me];a(p),ft(p).size&&(r(p),Lt(p),p.R=new Map,Lr(p.t,function(h){p.R.set(h,!1)}),p.o.clear())},d.forEach=function(p,h){var m=this;ft(this[me]).forEach(function(_,E){p.call(h,m.get(E),E,m)})},d.get=function(p){var h=this[me];a(h);var m=ft(h).get(p);if(h.I||!hr(m)||m!==h.t.get(p))return m;var _=$a(h.A.h,m,h);return r(h),h.o.set(p,_),_},d.keys=function(){return ft(this[me]).keys()},d.values=function(){var p,h=this,m=this.keys();return(p={})[Wo]=function(){return h.values()},p.next=function(){var _=m.next();return _.done?_:{done:!1,value:h.get(_.value)}},p},d.entries=function(){var p,h=this,m=this.keys();return(p={})[Wo]=function(){return h.entries()},p.next=function(){var _=m.next();if(_.done)return _;var E=h.get(_.value);return{done:!1,value:[_.value,E]}},p},d[Wo]=function(){return this.entries()},l}(),c=function(){function l(p,h){return this[me]={i:3,l:h,A:h?h.A:Fa(),P:!1,I:!1,o:void 0,t:p,k:this,p:new Map,g:!1,C:!1},this}e(l,Set);var d=l.prototype;return Object.defineProperty(d,"size",{get:function(){return ft(this[me]).size}}),d.has=function(p){var h=this[me];return a(h),h.o?!!h.o.has(p)||!(!h.p.has(p)||!h.o.has(h.p.get(p))):h.t.has(p)},d.add=function(p){var h=this[me];return a(h),this.has(p)||(t(h),Lt(h),h.o.add(p)),this},d.delete=function(p){if(!this.has(p))return!1;var h=this[me];return a(h),t(h),Lt(h),h.o.delete(p)||!!h.p.has(p)&&h.o.delete(h.p.get(p))},d.clear=function(){var p=this[me];a(p),ft(p).size&&(t(p),Lt(p),p.o.clear())},d.values=function(){var p=this[me];return a(p),t(p),p.o.values()},d.entries=function(){var p=this[me];return a(p),t(p),p.o.entries()},d.keys=function(){return this.values()},d[Wo]=function(){return this.values()},d.forEach=function(p,h){for(var m=this.values(),_=m.next();!_.done;)p.call(h,_.value,_.value,this),_=m.next()},l}();gc("MapSet",{F:function(l,d){return new i(l,d)},T:function(l,d){return new c(l,d)}})}var Id,Kn,vc=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",XS=typeof Map<"u",ZS=typeof Set<"u",Fd=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",yc=vc?Symbol.for("immer-nothing"):((Id={})["immer-nothing"]=!0,Id),Ra=vc?Symbol.for("immer-draftable"):"__$immer_draftable",me=vc?Symbol.for("immer-state"):"__$immer_state",Wo=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",QS={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"},ew=""+Object.prototype.constructor,Gn=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Yp=Object.getOwnPropertyDescriptors||function(e){var r={};return Gn(e).forEach(function(t){r[t]=Object.getOwnPropertyDescriptor(e,t)}),r},ku={},Ma={get:function(e,r){if(r===me)return e;var t=ft(e);if(!en(t,r))return function(s,i,c){var l,d=Pd(i,c);return d?"value"in d?d.value:(l=d.get)===null||l===void 0?void 0:l.call(s.k):void 0}(e,t,r);var a=t[r];return e.I||!hr(a)?a:a===iu(e.t,r)?(uu(e),e.o[r]=$a(e.A.h,a,e)):a},has:function(e,r){return r in ft(e)},ownKeys:function(e){return Reflect.ownKeys(ft(e))},set:function(e,r,t){var a=Pd(ft(e),r);if(a!=null&&a.set)return a.set.call(e.k,t),!0;if(!e.P){var s=iu(ft(e),r),i=s==null?void 0:s[me];if(i&&i.t===t)return e.o[r]=t,e.R[r]=!1,!0;if(qp(t,s)&&(t!==void 0||en(e.t,r)))return!0;uu(e),Lt(e)}return e.o[r]===t&&(t!==void 0||r in e.o)||Number.isNaN(t)&&Number.isNaN(e.o[r])||(e.o[r]=t,e.R[r]=!0),!0},deleteProperty:function(e,r){return iu(e.t,r)!==void 0||r in e.t?(e.R[r]=!1,uu(e),Lt(e)):delete e.R[r],e.o&&delete e.o[r],!0},getOwnPropertyDescriptor:function(e,r){var t=ft(e),a=Reflect.getOwnPropertyDescriptor(t,r);return a&&{writable:!0,configurable:e.i!==1||r!=="length",enumerable:a.enumerable,value:t[r]}},defineProperty:function(){Je(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Je(12)}},Ca={};Lr(Ma,function(e,r){Ca[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),Ca.deleteProperty=function(e,r){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(r))&&Je(13),Ca.set.call(this,e,r,void 0)},Ca.set=function(e,r,t){return process.env.NODE_ENV!=="production"&&r!=="length"&&isNaN(parseInt(r))&&Je(14),Ma.set.call(this,e[0],r,t,e[0])};var tw=function(){function e(t){var a=this;this.O=Fd,this.D=!0,this.produce=function(s,i,c){if(typeof s=="function"&&typeof i!="function"){var l=i;i=s;var d=a;return function(x){var D=this;x===void 0&&(x=l);for(var P=arguments.length,j=Array(P>1?P-1:0),M=1;M<P;M++)j[M-1]=arguments[M];return d.produce(x,function(k){var O;return(O=i).call.apply(O,[D,k].concat(j))})}}var p;if(typeof i!="function"&&Je(6),c!==void 0&&typeof c!="function"&&Je(7),hr(s)){var h=Od(a),m=$a(a,s,void 0),_=!0;try{p=i(m),_=!1}finally{_?es(h):Nu(h)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(x){return ou(h,c),su(x,h)},function(x){throw es(h),x}):(ou(h,c),su(p,h))}if(!s||typeof s!="object"){if((p=i(s))===void 0&&(p=s),p===yc&&(p=void 0),a.D&&pc(p,!0),c){var E=[],T=[];br("Patches").M(s,p,E,T),c(E,T)}return p}Je(21,s)},this.produceWithPatches=function(s,i){if(typeof s=="function")return function(p){for(var h=arguments.length,m=Array(h>1?h-1:0),_=1;_<h;_++)m[_-1]=arguments[_];return a.produceWithPatches(p,function(E){return s.apply(void 0,[E].concat(m))})};var c,l,d=a.produce(s,i,function(p,h){c=p,l=h});return typeof Promise<"u"&&d instanceof Promise?d.then(function(p){return[p,c,l]}):[d,c,l]},typeof(t==null?void 0:t.useProxies)=="boolean"&&this.setUseProxies(t.useProxies),typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze)}var r=e.prototype;return r.createDraft=function(t){hr(t)||Je(8),Mr(t)&&(t=zS(t));var a=Od(this),s=$a(this,t,void 0);return s[me].C=!0,Nu(a),s},r.finishDraft=function(t,a){var s=t&&t[me];process.env.NODE_ENV!=="production"&&(s&&s.C||Je(9),s.I&&Je(10));var i=s.A;return ou(i,a),su(void 0,i)},r.setAutoFreeze=function(t){this.D=t},r.setUseProxies=function(t){t&&!Fd&&Je(20),this.O=t},r.applyPatches=function(t,a){var s;for(s=a.length-1;s>=0;s--){var i=a[s];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}s>-1&&(a=a.slice(s+1));var c=br("Patches").$;return Mr(t)?c(t,a):this.produce(t,function(l){return c(l,a)})},e}(),Gt=new tw,Vo=Gt.produce;Gt.produceWithPatches.bind(Gt);Gt.setAutoFreeze.bind(Gt);Gt.setUseProxies.bind(Gt);Gt.applyPatches.bind(Gt);Gt.createDraft.bind(Gt);Gt.finishDraft.bind(Gt);function La(e){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},La(e)}function rw(e,r){if(La(e)!=="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var a=t.call(e,r||"default");if(La(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function nw(e){var r=rw(e,"string");return La(r)==="symbol"?r:String(r)}function aw(e,r,t){return r=nw(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,a)}return t}function Md(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$d(Object(t),!0).forEach(function(a){aw(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$d(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function Ct(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 Ld=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),cu=function(){return Math.random().toString(36).substring(7).split("").join(".")},En={INIT:"@@redux/INIT"+cu(),REPLACE:"@@redux/REPLACE"+cu(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+cu()}};function zp(e){if(typeof e!="object"||e===null)return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function ow(e){if(e===void 0)return"undefined";if(e===null)return"null";var r=typeof e;switch(r){case"boolean":case"string":case"number":case"symbol":case"function":return r}if(Array.isArray(e))return"array";if(uw(e))return"date";if(iw(e))return"error";var t=sw(e);switch(t){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return t}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")}function sw(e){return typeof e.constructor=="function"?e.constructor.name:null}function iw(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function uw(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function _n(e){var r=typeof e;return process.env.NODE_ENV!=="production"&&(r=ow(e)),r}function Vp(e,r,t){var a;if(typeof r=="function"&&typeof t=="function"||typeof t=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Ct(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 r=="function"&&typeof t>"u"&&(t=r,r=void 0),typeof t<"u"){if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(1):"Expected the enhancer to be a function. Instead, received: '"+_n(t)+"'");return t(Vp)(e,r)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(2):"Expected the root reducer to be a function. Instead, received: '"+_n(e)+"'");var s=e,i=r,c=[],l=c,d=!1;function p(){l===c&&(l=c.slice())}function h(){if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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 i}function m(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(4):"Expected the listener to be a function. Instead, received: '"+_n(x)+"'");if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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 D=!0;return p(),l.push(x),function(){if(D){if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(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.");D=!1,p();var j=l.indexOf(x);l.splice(j,1),c=null}}}function _(x){if(!zp(x))throw new Error(process.env.NODE_ENV==="production"?Ct(7):"Actions must be plain objects. Instead, the actual type was: '"+_n(x)+"'. 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 x.type>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(d)throw new Error(process.env.NODE_ENV==="production"?Ct(9):"Reducers may not dispatch actions.");try{d=!0,i=s(i,x)}finally{d=!1}for(var D=c=l,P=0;P<D.length;P++){var j=D[P];j()}return x}function E(x){if(typeof x!="function")throw new Error(process.env.NODE_ENV==="production"?Ct(10):"Expected the nextReducer to be a function. Instead, received: '"+_n(x));s=x,_({type:En.REPLACE})}function T(){var x,D=m;return x={subscribe:function(j){if(typeof j!="object"||j===null)throw new Error(process.env.NODE_ENV==="production"?Ct(11):"Expected the observer to be an object. Instead, received: '"+_n(j)+"'");function M(){j.next&&j.next(h())}M();var k=D(M);return{unsubscribe:k}}},x[Ld]=function(){return this},x}return _({type:En.INIT}),a={dispatch:_,subscribe:m,getState:h,replaceReducer:E},a[Ld]=T,a}function Nd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function cw(e,r,t,a){var s=Object.keys(r),i=t&&t.type===En.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(s.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(!zp(e))return"The "+i+' has unexpected type of "'+_n(e)+'". Expected argument to be an object with the following '+('keys: "'+s.join('", "')+'"');var c=Object.keys(e).filter(function(l){return!r.hasOwnProperty(l)&&!a[l]});if(c.forEach(function(l){a[l]=!0}),!(t&&t.type===En.REPLACE)&&c.length>0)return"Unexpected "+(c.length>1?"keys":"key")+" "+('"'+c.join('", "')+'" found in '+i+". ")+"Expected to find one of the known reducer keys instead: "+('"'+s.join('", "')+'". Unexpected keys will be ignored.')}function lw(e){Object.keys(e).forEach(function(r){var t=e[r],a=t(void 0,{type:En.INIT});if(typeof a>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(12):'The slice reducer for key "'+r+`" 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 t(void 0,{type:En.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Ct(13):'The slice reducer for key "'+r+'" returned undefined when probed with a random type. '+("Don't try to handle '"+En.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 Kp(e){for(var r=Object.keys(e),t={},a=0;a<r.length;a++){var s=r[a];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Nd('No reducer provided for key "'+s+'"'),typeof e[s]=="function"&&(t[s]=e[s])}var i=Object.keys(t),c;process.env.NODE_ENV!=="production"&&(c={});var l;try{lw(t)}catch(d){l=d}return function(p,h){if(p===void 0&&(p={}),l)throw l;if(process.env.NODE_ENV!=="production"){var m=cw(p,t,h,c);m&&Nd(m)}for(var _=!1,E={},T=0;T<i.length;T++){var x=i[T],D=t[x],P=p[x],j=D(P,h);if(typeof j>"u"){var M=h&&h.type;throw new Error(process.env.NODE_ENV==="production"?Ct(14):"When called with an action of type "+(M?'"'+String(M)+'"':"(unknown type)")+', the slice reducer for key "'+x+'" 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.')}E[x]=j,_=_||j!==P}return _=_||i.length!==Object.keys(p).length,_?E:p}}function ns(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return r.length===0?function(a){return a}:r.length===1?r[0]:r.reduce(function(a,s){return function(){return a(s.apply(void 0,arguments))}})}function fw(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(a){return function(){var s=a.apply(void 0,arguments),i=function(){throw new Error(process.env.NODE_ENV==="production"?Ct(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},c={getState:s.getState,dispatch:function(){return i.apply(void 0,arguments)}},l=r.map(function(d){return d(c)});return i=ns.apply(void 0,l)(s.dispatch),Md(Md({},s),{},{dispatch:i})}}}var as="NOT_FOUND";function dw(e){var r;return{get:function(a){return r&&e(r.key,a)?r.value:as},put:function(a,s){r={key:a,value:s}},getEntries:function(){return r?[r]:[]},clear:function(){r=void 0}}}function pw(e,r){var t=[];function a(l){var d=t.findIndex(function(h){return r(l,h.key)});if(d>-1){var p=t[d];return d>0&&(t.splice(d,1),t.unshift(p)),p.value}return as}function s(l,d){a(l)===as&&(t.unshift({key:l,value:d}),t.length>e&&t.pop())}function i(){return t}function c(){t=[]}return{get:a,put:s,getEntries:i,clear:c}}var hw=function(r,t){return r===t};function gw(e){return function(t,a){if(t===null||a===null||t.length!==a.length)return!1;for(var s=t.length,i=0;i<s;i++)if(!e(t[i],a[i]))return!1;return!0}}function vw(e,r){var t=typeof r=="object"?r:{equalityCheck:r},a=t.equalityCheck,s=a===void 0?hw:a,i=t.maxSize,c=i===void 0?1:i,l=t.resultEqualityCheck,d=gw(s),p=c===1?dw(d):pw(c,d);function h(){var m=p.get(arguments);if(m===as){if(m=e.apply(null,arguments),l){var _=p.getEntries(),E=_.find(function(T){return l(T.value,m)});E&&(m=E.value)}p.put(arguments,m)}return m}return h.clearCache=function(){return p.clear()},h}function yw(e){var r=Array.isArray(e[0])?e[0]:e;if(!r.every(function(a){return typeof a=="function"})){var t=r.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: ["+t+"]")}return r}function mw(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];var s=function(){for(var c=arguments.length,l=new Array(c),d=0;d<c;d++)l[d]=arguments[d];var p=0,h,m={memoizeOptions:void 0},_=l.pop();if(typeof _=="object"&&(m=_,_=l.pop()),typeof _!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof _+"]");var E=m,T=E.memoizeOptions,x=T===void 0?t:T,D=Array.isArray(x)?x:[x],P=yw(l),j=e.apply(void 0,[function(){return p++,_.apply(null,arguments)}].concat(D)),M=e(function(){for(var O=[],z=P.length,G=0;G<z;G++)O.push(P[G].apply(null,arguments));return h=j.apply(null,O),h});return Object.assign(M,{resultFunc:_,memoizedResultFunc:j,dependencies:P,lastResult:function(){return h},recomputations:function(){return p},resetRecomputations:function(){return p=0}}),M};return s}var H=mw(vw);function Jp(e){var r=function(a){var s=a.dispatch,i=a.getState;return function(c){return function(l){return typeof l=="function"?l(s,i,e):c(l)}}};return r}var Xp=Jp();Xp.withExtraArgument=Jp;const kd=Xp;var bw=globalThis&&globalThis.__extends||function(){var e=function(r,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(a[i]=s[i])},e(r,t)};return function(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(r,t);function a(){this.constructor=r}r.prototype=t===null?Object.create(t):(a.prototype=t.prototype,new a)}}(),_w=globalThis&&globalThis.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,s,i,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(p){return function(h){return d([p,h])}}function d(p){if(a)throw new TypeError("Generator is already executing.");for(;t;)try{if(a=1,s&&(i=p[0]&2?s.return:p[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,p[1])).done)return i;switch(s=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,s=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){t.label=p[1];break}if(p[0]===6&&t.label<i[1]){t.label=i[1],i=p;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(p);break}i[2]&&t.ops.pop(),t.trys.pop();continue}p=r.call(e,t)}catch(h){p=[6,h],s=0}finally{a=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}},os=globalThis&&globalThis.__spreadArray||function(e,r){for(var t=0,a=r.length,s=e.length;t<a;t++,s++)e[s]=r[t];return e},Ew=Object.defineProperty,Sw=Object.defineProperties,ww=Object.getOwnPropertyDescriptors,jd=Object.getOwnPropertySymbols,Tw=Object.prototype.hasOwnProperty,Cw=Object.prototype.propertyIsEnumerable,Bd=function(e,r,t){return r in e?Ew(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t},tn=function(e,r){for(var t in r||(r={}))Tw.call(r,t)&&Bd(e,t,r[t]);if(jd)for(var a=0,s=jd(r);a<s.length;a++){var t=s[a];Cw.call(r,t)&&Bd(e,t,r[t])}return e},lu=function(e,r){return Sw(e,ww(r))},xw=function(e,r,t){return new Promise(function(a,s){var i=function(d){try{l(t.next(d))}catch(p){s(p)}},c=function(d){try{l(t.throw(d))}catch(p){s(p)}},l=function(d){return d.done?a(d.value):Promise.resolve(d.value).then(i,c)};l((t=t.apply(e,r)).next())})},Rw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ns:ns.apply(null,arguments)};function Zp(e){if(typeof e!="object"||e===null)return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return r===t}function Qp(e,r){var t=0;return{measureTime:function(a){var s=Date.now();try{return a()}finally{var i=Date.now();t+=i-s}},warnIfExceeded:function(){t>e&&console.warn(r+" took "+t+"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
- It is disabled in production builds, so you don't need to worry about that.`)}}}var Cw=function(e){vw(n,e);function n(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];var s=e.apply(this,t)||this;return Object.setPrototypeOf(s,n.prototype),s}return Object.defineProperty(n,Symbol.species,{get:function(){return n},enumerable:!1,configurable:!0}),n.prototype.concat=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return e.prototype.concat.apply(this,t)},n.prototype.prepend=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return t.length===1&&Array.isArray(t[0])?new(n.bind.apply(n,os([void 0],t[0].concat(this)))):new(n.bind.apply(n,os([void 0],t.concat(this))))},n}(Array),xw=process.env.NODE_ENV==="production",Bd="Invariant failed";function Wd(e,n){if(!e)throw xw?new Error(Bd):new Error(Bd+": "+(n||""))}function Rw(e,n,t,a){return JSON.stringify(e,Ow(n,a),t)}function Ow(e,n){var t=[],a=[];return n||(n=function(s,i){return t[0]===i?"[Circular ~]":"[Circular ~."+a.slice(0,t.indexOf(i)).join(".")+"]"}),function(s,i){if(t.length>0){var c=t.indexOf(this);~c?t.splice(c+1):t.push(this),~c?a.splice(c,1/0,s):a.push(s),~t.indexOf(i)&&(i=n.call(this,s,i))}else t.push(i);return e==null?i:e.call(this,s,i)}}function Aw(e){return typeof e!="object"||e===null||typeof e>"u"||Object.isFrozen(e)}function Pw(e,n,t){var a=Qp(e,n,t);return{detectMutations:function(){return eh(e,n,a,t)}}}function Qp(e,n,t,a){n===void 0&&(n=[]),a===void 0&&(a="");var s={value:t};if(!e(t)){s.children={};for(var i in t){var c=a?a+"."+i:i;n.length&&n.indexOf(c)!==-1||(s.children[i]=Qp(e,n,t[i],c))}}return s}function eh(e,n,t,a,s,i){n===void 0&&(n=[]),s===void 0&&(s=!1),i===void 0&&(i="");var c=t?t.value:void 0,l=c===a;if(s&&!l&&!Number.isNaN(a))return{wasMutated:!0,path:i};if(e(c)||e(a))return{wasMutated:!1};var d={};for(var p in t.children)d[p]=!0;for(var p in a)d[p]=!0;for(var p in d){var h=i?i+"."+p:p;if(!(n.length&&n.indexOf(h)!==-1)){var y=eh(e,n,t.children[p],a[p],l,h);if(y.wasMutated)return y}}return{wasMutated:!1}}function Dw(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(d){return function(p){return d(p)}}};var n=e.isImmutable,t=n===void 0?Aw:n,a=e.ignoredPaths,s=e.warnAfter,i=s===void 0?32:s,c=e.ignore;a=a||c;var l=Pw.bind(null,t,a);return function(d){var p=d.getState,h=p(),y=l(h),_;return function(E){return function(T){var x=Zp(i,"ImmutableStateInvariantMiddleware");x.measureTime(function(){h=p(),_=y.detectMutations(),y=l(h),Wd(!_.wasMutated,"A state mutation was detected between dispatches, in the path '"+(_.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var D=E(T);return x.measureTime(function(){h=p(),_=y.detectMutations(),y=l(h),_.wasMutated&&Wd(!_.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(_.path||"")+". Take a look at the reducer(s) handling the action "+Rw(T)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),x.warnIfExceeded(),D}}}}function th(e){var n=typeof e;return n==="undefined"||e===null||n==="string"||n==="boolean"||n==="number"||Array.isArray(e)||Xp(e)}function ju(e,n,t,a,s){n===void 0&&(n=""),t===void 0&&(t=th),s===void 0&&(s=[]);var i;if(!t(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),l=s.length>0,d=0,p=c;d<p.length;d++){var h=p[d],y=h[0],_=h[1],E=n?n+"."+y:y;if(!(l&&s.indexOf(E)>=0)){if(!t(_))return{keyPath:E,value:_};if(typeof _=="object"&&(i=ju(_,E,t,a,s),i))return i}}return!1}function Iw(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(T){return function(x){return T(x)}}};var n=e.isSerializable,t=n===void 0?th:n,a=e.getEntries,s=e.ignoredActions,i=s===void 0?[]:s,c=e.ignoredActionPaths,l=c===void 0?["meta.arg","meta.baseQueryMeta"]:c,d=e.ignoredPaths,p=d===void 0?[]:d,h=e.warnAfter,y=h===void 0?32:h,_=e.ignoreState,E=_===void 0?!1:_;return function(T){return function(x){return function(D){if(i.length&&i.indexOf(D.type)!==-1)return x(D);var P=Zp(y,"SerializableStateInvariantMiddleware");P.measureTime(function(){var M=ju(D,"",t,a,l);if(M){var k=M.keyPath,O=M.value;console.error("A non-serializable value was detected in an action, in the path: `"+k+"`. Value:",O,`
3
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var Ow=function(e){bw(r,e);function r(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];var s=e.apply(this,t)||this;return Object.setPrototypeOf(s,r.prototype),s}return Object.defineProperty(r,Symbol.species,{get:function(){return r},enumerable:!1,configurable:!0}),r.prototype.concat=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return e.prototype.concat.apply(this,t)},r.prototype.prepend=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return t.length===1&&Array.isArray(t[0])?new(r.bind.apply(r,os([void 0],t[0].concat(this)))):new(r.bind.apply(r,os([void 0],t.concat(this))))},r}(Array),Aw=process.env.NODE_ENV==="production",Wd="Invariant failed";function Ud(e,r){if(!e)throw Aw?new Error(Wd):new Error(Wd+": "+(r||""))}function Pw(e,r,t,a){return JSON.stringify(e,Dw(r,a),t)}function Dw(e,r){var t=[],a=[];return r||(r=function(s,i){return t[0]===i?"[Circular ~]":"[Circular ~."+a.slice(0,t.indexOf(i)).join(".")+"]"}),function(s,i){if(t.length>0){var c=t.indexOf(this);~c?t.splice(c+1):t.push(this),~c?a.splice(c,1/0,s):a.push(s),~t.indexOf(i)&&(i=r.call(this,s,i))}else t.push(i);return e==null?i:e.call(this,s,i)}}function Iw(e){return typeof e!="object"||e===null||typeof e>"u"||Object.isFrozen(e)}function Fw(e,r,t){var a=eh(e,r,t);return{detectMutations:function(){return th(e,r,a,t)}}}function eh(e,r,t,a){r===void 0&&(r=[]),a===void 0&&(a="");var s={value:t};if(!e(t)){s.children={};for(var i in t){var c=a?a+"."+i:i;r.length&&r.indexOf(c)!==-1||(s.children[i]=eh(e,r,t[i],c))}}return s}function th(e,r,t,a,s,i){r===void 0&&(r=[]),s===void 0&&(s=!1),i===void 0&&(i="");var c=t?t.value:void 0,l=c===a;if(s&&!l&&!Number.isNaN(a))return{wasMutated:!0,path:i};if(e(c)||e(a))return{wasMutated:!1};var d={};for(var p in t.children)d[p]=!0;for(var p in a)d[p]=!0;for(var p in d){var h=i?i+"."+p:p;if(!(r.length&&r.indexOf(h)!==-1)){var m=th(e,r,t.children[p],a[p],l,h);if(m.wasMutated)return m}}return{wasMutated:!1}}function $w(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(d){return function(p){return d(p)}}};var r=e.isImmutable,t=r===void 0?Iw:r,a=e.ignoredPaths,s=e.warnAfter,i=s===void 0?32:s,c=e.ignore;a=a||c;var l=Fw.bind(null,t,a);return function(d){var p=d.getState,h=p(),m=l(h),_;return function(E){return function(T){var x=Qp(i,"ImmutableStateInvariantMiddleware");x.measureTime(function(){h=p(),_=m.detectMutations(),m=l(h),Ud(!_.wasMutated,"A state mutation was detected between dispatches, in the path '"+(_.path||"")+"'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")});var D=E(T);return x.measureTime(function(){h=p(),_=m.detectMutations(),m=l(h),_.wasMutated&&Ud(!_.wasMutated,"A state mutation was detected inside a dispatch, in the path: "+(_.path||"")+". Take a look at the reducer(s) handling the action "+Pw(T)+". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)")}),x.warnIfExceeded(),D}}}}function rh(e){var r=typeof e;return r==="undefined"||e===null||r==="string"||r==="boolean"||r==="number"||Array.isArray(e)||Zp(e)}function ju(e,r,t,a,s){r===void 0&&(r=""),t===void 0&&(t=rh),s===void 0&&(s=[]);var i;if(!t(e))return{keyPath:r||"<root>",value:e};if(typeof e!="object"||e===null)return!1;for(var c=a!=null?a(e):Object.entries(e),l=s.length>0,d=0,p=c;d<p.length;d++){var h=p[d],m=h[0],_=h[1],E=r?r+"."+m:m;if(!(l&&s.indexOf(E)>=0)){if(!t(_))return{keyPath:E,value:_};if(typeof _=="object"&&(i=ju(_,E,t,a,s),i))return i}}return!1}function Mw(e){if(e===void 0&&(e={}),process.env.NODE_ENV==="production")return function(){return function(T){return function(x){return T(x)}}};var r=e.isSerializable,t=r===void 0?rh:r,a=e.getEntries,s=e.ignoredActions,i=s===void 0?[]:s,c=e.ignoredActionPaths,l=c===void 0?["meta.arg","meta.baseQueryMeta"]:c,d=e.ignoredPaths,p=d===void 0?[]:d,h=e.warnAfter,m=h===void 0?32:h,_=e.ignoreState,E=_===void 0?!1:_;return function(T){return function(x){return function(D){if(i.length&&i.indexOf(D.type)!==-1)return x(D);var P=Qp(m,"SerializableStateInvariantMiddleware");P.measureTime(function(){var M=ju(D,"",t,a,l);if(M){var k=M.keyPath,O=M.value;console.error("A non-serializable value was detected in an action, in the path: `"+k+"`. Value:",O,`
4
4
  Take a look at the logic that dispatched this action: `,D,`
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 j=x(D);return E||(P.measureTime(function(){var M=T.getState(),k=ju(M,"",t,a,p);if(k){var O=k.keyPath,z=k.value;console.error("A non-serializable value was detected in the state, in the path: `"+O+"`. Value:",z,`
7
7
  Take a look at the reducer(s) handling this action type: `+D.type+`.
8
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),P.warnIfExceeded()),j}}}}function fu(e){return typeof e=="boolean"}function Fw(){return function(n){return $w(n)}}function $w(e){e===void 0&&(e={});var n=e.thunk,t=n===void 0?!0:n,a=e.immutableCheck,s=a===void 0?!0:a,i=e.serializableCheck,c=i===void 0?!0:i,l=new Cw;if(t&&(fu(t)?l.push(Nd):l.push(Nd.withExtraArgument(t.extraArgument))),process.env.NODE_ENV!=="production"){if(s){var d={};fu(s)||(d=s),l.unshift(Dw(d))}if(c){var p={};fu(c)||(p=c),l.push(Iw(p))}}return l}var du=process.env.NODE_ENV==="production";function Mw(e){var n=Fw(),t=e||{},a=t.reducer,s=a===void 0?void 0:a,i=t.middleware,c=i===void 0?n():i,l=t.devTools,d=l===void 0?!0:l,p=t.preloadedState,h=p===void 0?void 0:p,y=t.enhancers,_=y===void 0?void 0:y,E;if(typeof s=="function")E=s;else if(Xp(s))E=Vp(s);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 T=c;if(typeof T=="function"&&(T=T(n),!du&&!Array.isArray(T)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!du&&T.some(function(M){return typeof M!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=uw.apply(void 0,T),D=ns;d&&(D=Tw(tn({trace:!du},typeof d=="object"&&d)));var P=[x];Array.isArray(_)?P=os([x],_):typeof _=="function"&&(P=_(P));var j=D.apply(void 0,P);return zp(E,h,j)}function Oa(e,n){function t(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(n){var i=n.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return tn(tn({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return t.toString=function(){return""+e},t.type=e,t.match=function(a){return a.type===e},t}function rh(e){var n={},t=[],a,s={addCase:function(i,c){if(process.env.NODE_ENV!=="production"){if(t.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 l=typeof i=="string"?i:i.type;if(l in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[l]=c,s},addMatcher:function(i,c){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return t.push({matcher:i,reducer:c}),s},addDefaultCase:function(i){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addDefaultCase` can only be called once");return a=i,s}};return e(s),[n,t,a]}function Lw(e){return typeof e=="function"}function Nw(e,n,t,a){t===void 0&&(t=[]);var s=typeof n=="function"?rh(n):[n,t,a],i=s[0],c=s[1],l=s[2],d;if(Lw(e))d=function(){return Vo(e(),function(){})};else{var p=Vo(e,function(){});d=function(){return p}}function h(y,_){y===void 0&&(y=d());var E=os([i[_.type]],c.filter(function(T){var x=T.matcher;return x(_)}).map(function(T){var x=T.reducer;return x}));return E.filter(function(T){return!!T}).length===0&&(E=[l]),E.reduce(function(T,x){if(x)if(Mr(T)){var D=T,P=x(D,_);return typeof P>"u"?T:P}else{if(hr(T))return Vo(T,function(j){return x(j,_)});var P=x(T,_);if(typeof P>"u"){if(T===null)return T;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return T},y)}return h.getInitialState=d,h}function kw(e,n){return e+"/"+n}function nr(e){var n=e.name;if(!n)throw new Error("`name` is a required option for createSlice");var t=typeof e.initialState=="function"?e.initialState:Vo(e.initialState,function(){}),a=e.reducers||{},s=Object.keys(a),i={},c={},l={};s.forEach(function(h){var y=a[h],_=kw(n,h),E,T;"reducer"in y?(E=y.reducer,T=y.prepare):E=y,i[h]=E,c[_]=E,l[h]=T?Oa(_,T):Oa(_)});function d(){var h=typeof e.extraReducers=="function"?rh(e.extraReducers):[e.extraReducers],y=h[0],_=y===void 0?{}:y,E=h[1],T=E===void 0?[]:E,x=h[2],D=x===void 0?void 0:x,P=tn(tn({},_),c);return Nw(t,P,T,D)}var p;return{name:n,reducer:function(h,y){return p||(p=d()),p(h,y)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var jw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",yc=function(e){e===void 0&&(e=21);for(var n="",t=e;t--;)n+=jw[Math.random()*64|0];return n},Bw=["name","message","stack","code"],pu=function(){function e(n,t){this.payload=n,this.meta=t}return e}(),Ud=function(){function e(n,t){this.payload=n,this.meta=t}return e}(),Ww=function(e){if(typeof e=="object"&&e!==null){for(var n={},t=0,a=Bw;t<a.length;t++){var s=a[t];typeof e[s]=="string"&&(n[s]=e[s])}return n}return{message:String(e)}};function Q(e,n,t){var a=Oa(e+"/fulfilled",function(p,h,y,_){return{payload:p,meta:lu(tn({},_||{}),{arg:y,requestId:h,requestStatus:"fulfilled"})}}),s=Oa(e+"/pending",function(p,h,y){return{payload:void 0,meta:lu(tn({},y||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),i=Oa(e+"/rejected",function(p,h,y,_,E){return{payload:_,error:(t&&t.serializeError||Ww)(p||"Rejected"),meta:lu(tn({},E||{}),{arg:y,requestId:h,rejectedWithValue:!!_,requestStatus:"rejected",aborted:(p==null?void 0:p.name)==="AbortError",condition:(p==null?void 0:p.name)==="ConditionError"})}}),c=!1,l=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return p.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'.")))},p}();function d(p){return function(h,y,_){var E=t!=null&&t.idGenerator?t.idGenerator(p):yc(),T=new l,x,D=new Promise(function(k,O){return T.signal.addEventListener("abort",function(){return O({name:"AbortError",message:x||"Aborted"})})}),P=!1;function j(k){P&&(x=k,T.abort())}var M=function(){return ww(this,null,function(){var k,O,z,H,Y,te;return mw(this,function(We){switch(We.label){case 0:return We.trys.push([0,4,,5]),H=(k=t==null?void 0:t.condition)==null?void 0:k.call(t,p,{getState:y,extra:_}),Hw(H)?[4,H]:[3,2];case 1:H=We.sent(),We.label=2;case 2:if(H===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return P=!0,h(s(E,p,(O=t==null?void 0:t.getPendingMeta)==null?void 0:O.call(t,{requestId:E,arg:p},{getState:y,extra:_}))),[4,Promise.race([D,Promise.resolve(n(p,{dispatch:h,getState:y,extra:_,requestId:E,signal:T.signal,rejectWithValue:function(Te,st){return new pu(Te,st)},fulfillWithValue:function(Te,st){return new Ud(Te,st)}})).then(function(Te){if(Te instanceof pu)throw Te;return Te instanceof Ud?a(Te.payload,E,p,Te.meta):a(Te,E,p)})])];case 3:return z=We.sent(),[3,5];case 4:return Y=We.sent(),z=Y instanceof pu?i(null,E,p,Y.payload,Y.meta):i(Y,E,p),[3,5];case 5:return te=t&&!t.dispatchConditionRejection&&i.match(z)&&z.meta.condition,te||h(z),[2,z]}})})}();return Object.assign(M,{abort:j,requestId:E,arg:p,unwrap:function(){return M.then(Uw)}})}}return Object.assign(d,{pending:s,rejected:i,fulfilled:a,typePrefix:e})}function Uw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Hw(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Gw=function(e){return e&&typeof e.match=="function"},qw=function(e,n){return Gw(e)?e.match(n):e(n)};function dr(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return function(t){return e.some(function(a){return qw(a,t)})}}function bc(e,n){if(!e||!e.meta)return!1;var t=typeof e.meta.requestId=="string",a=n.indexOf(e.meta.requestStatus)>-1;return t&&a}function _c(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function nh(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(t){return bc(t,["pending"])}:_c(e)?function(t){var a=e.map(function(i){return i.pending}),s=dr.apply(void 0,a);return s(t)}:nh()(e[0])}function ah(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(t){return bc(t,["rejected"])}:_c(e)?function(t){var a=e.map(function(i){return i.rejected}),s=dr.apply(void 0,a);return s(t)}:ah()(e[0])}function oh(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length===0?function(t){return bc(t,["fulfilled"])}:_c(e)?function(t){var a=e.map(function(i){return i.fulfilled}),s=dr.apply(void 0,a);return s(t)}:oh()(e[0])}qS();var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Yw(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),t}function zw(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var ja=zw,Vw=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,sh=Vw,Kw=sh,Jw=typeof self=="object"&&self&&self.Object===Object&&self,Xw=Kw||Jw||Function("return this")(),Er=Xw,Zw=Er,Qw=function(){return Zw.Date.now()},eT=Qw,tT=/\s/;function rT(e){for(var n=e.length;n--&&tT.test(e.charAt(n)););return n}var nT=rT,aT=nT,oT=/^\s+/;function sT(e){return e&&e.slice(0,aT(e)+1).replace(oT,"")}var iT=sT,uT=Er,cT=uT.Symbol,Ec=cT,Hd=Ec,ih=Object.prototype,lT=ih.hasOwnProperty,fT=ih.toString,wa=Hd?Hd.toStringTag:void 0;function dT(e){var n=lT.call(e,wa),t=e[wa];try{e[wa]=void 0;var a=!0}catch{}var s=fT.call(e);return a&&(n?e[wa]=t:delete e[wa]),s}var pT=dT,hT=Object.prototype,gT=hT.toString;function vT(e){return gT.call(e)}var mT=vT,Gd=Ec,yT=pT,bT=mT,_T="[object Null]",ET="[object Undefined]",qd=Gd?Gd.toStringTag:void 0;function ST(e){return e==null?e===void 0?ET:_T:qd&&qd in Object(e)?yT(e):bT(e)}var Es=ST;function wT(e){return e!=null&&typeof e=="object"}var Sc=wT,TT=Es,CT=Sc,xT="[object Symbol]";function RT(e){return typeof e=="symbol"||CT(e)&&TT(e)==xT}var OT=RT,AT=iT,Yd=ja,PT=OT,zd=0/0,DT=/^[-+]0x[0-9a-f]+$/i,IT=/^0b[01]+$/i,FT=/^0o[0-7]+$/i,$T=parseInt;function MT(e){if(typeof e=="number")return e;if(PT(e))return zd;if(Yd(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Yd(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=AT(e);var t=IT.test(e);return t||FT.test(e)?$T(e.slice(2),t?2:8):DT.test(e)?zd:+e}var LT=MT,NT=ja,hu=eT,Vd=LT,kT="Expected a function",jT=Math.max,BT=Math.min;function WT(e,n,t){var a,s,i,c,l,d,p=0,h=!1,y=!1,_=!0;if(typeof e!="function")throw new TypeError(kT);n=Vd(n)||0,NT(t)&&(h=!!t.leading,y="maxWait"in t,i=y?jT(Vd(t.maxWait)||0,n):i,_="trailing"in t?!!t.trailing:_);function E(z){var H=a,Y=s;return a=s=void 0,p=z,c=e.apply(Y,H),c}function T(z){return p=z,l=setTimeout(P,n),h?E(z):c}function x(z){var H=z-d,Y=z-p,te=n-H;return y?BT(te,i-Y):te}function D(z){var H=z-d,Y=z-p;return d===void 0||H>=n||H<0||y&&Y>=i}function P(){var z=hu();if(D(z))return j(z);l=setTimeout(P,x(z))}function j(z){return l=void 0,_&&a?E(z):(a=s=void 0,c)}function M(){l!==void 0&&clearTimeout(l),p=0,a=d=s=l=void 0}function k(){return l===void 0?c:j(hu())}function O(){var z=hu(),H=D(z);if(a=arguments,s=this,d=z,H){if(l===void 0)return T(d);if(y)return clearTimeout(l),l=setTimeout(P,n),E(d)}return l===void 0&&(l=setTimeout(P,n)),c}return O.cancel=M,O.flush=k,O}var UT=WT,HT=UT,GT=ja,qT="Expected a function";function YT(e,n,t){var a=!0,s=!0;if(typeof e!="function")throw new TypeError(qT);return GT(t)&&(a="leading"in t?!!t.leading:a,s="trailing"in t?!!t.trailing:s),HT(e,n,{leading:a,maxWait:n,trailing:s})}var zT=YT;const VT=_s(zT);var uh=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(uh||{}),Ir=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Ir||{}),ss=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(ss||{}),ch=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(ch||{});const Ss=2e3,wc={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles",forceLogin:!1},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Ir.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},lh="4DWS_PREFS",fh=e=>`APP_STATE_${e}`,dh=()=>{var e,n;return((n=(e=window==null?void 0:window.$$datastores)==null?void 0:e.ds)==null?void 0:n.getBaseID())||""};function ph(e){try{const n=dh(),t=JSON.stringify(e);localStorage.setItem(fh(n),t)}catch(n){console.error(n)}}function hh(e){try{const n=JSON.stringify(e);localStorage.setItem(lh,n)}catch(n){console.error(n)}}function gh(){try{const e=localStorage.getItem(lh);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Kn(){const e=dh(),n=localStorage.getItem(fh(e));if(n){const t=JSON.parse(n);return t.tabs=t.tabs.map(a=>({...a,flags:{...a.flags,enabled:!0}})),t}return wc}function ws(e){const{name:n,type:t,path:a}=e,s=a.split(".").at(-1);switch(t){case b.FileFolderType.WEBFORM:return`${n}.WebForm`;case b.FileFolderType.METHOD:case b.FileFolderType.CLASS:return s?`${n}.${s}`:n;case b.FileFolderType.ROLES:return n;default:return`${n}.${t}`}}const vh=e=>{if(!e)return[];const n=new Map;return e.dataClasses.forEach(t=>{var i,c;const a=t.extraProperties||{},s={id:t.className,type:"table",position:{x:((i=a.position)==null?void 0:i.x)||0,y:((c=a.position)==null?void 0:c.y)||0},dragHandle:".custom-drag-handle",data:t};n.set(t.name,s)}),Array.from(n.values())};function mh(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function yh(e,n){return{...e,components:Object.entries(e.components||{}).reduce((t,[a,s])=>({...t,[a]:{...s,custom:Object.entries(s.custom).reduce((i,[c,l])=>c===`states:${n}`?i:{...i,[c]:l},{}),props:Object.entries(s.props).reduce((i,[c,l])=>{let d=l;return c==="events"&&(d=d.map(p=>{var h,y;return p.type==="simple-action"?{...p,state:{...p.state,states:(y=(h=p.state)==null?void 0:h.states)==null?void 0:y.filter(_=>_!==n)}}:p})),{...i,[c]:d}},{})}}),{}),metadata:{...e.metadata,states:e.metadata.states.filter(t=>t.id!==n)}}}function KT(){this.__data__=[],this.size=0}var JT=KT;function XT(e,n){return e===n||e!==e&&n!==n}var ZT=XT,QT=ZT;function e1(e,n){for(var t=e.length;t--;)if(QT(e[t][0],n))return t;return-1}var Ts=e1,t1=Ts,r1=Array.prototype,n1=r1.splice;function a1(e){var n=this.__data__,t=t1(n,e);if(t<0)return!1;var a=n.length-1;return t==a?n.pop():n1.call(n,t,1),--this.size,!0}var o1=a1,s1=Ts;function i1(e){var n=this.__data__,t=s1(n,e);return t<0?void 0:n[t][1]}var u1=i1,c1=Ts;function l1(e){return c1(this.__data__,e)>-1}var f1=l1,d1=Ts;function p1(e,n){var t=this.__data__,a=d1(t,e);return a<0?(++this.size,t.push([e,n])):t[a][1]=n,this}var h1=p1,g1=JT,v1=o1,m1=u1,y1=f1,b1=h1;function Jn(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var a=e[n];this.set(a[0],a[1])}}Jn.prototype.clear=g1;Jn.prototype.delete=v1;Jn.prototype.get=m1;Jn.prototype.has=y1;Jn.prototype.set=b1;var Cs=Jn,_1=Cs;function E1(){this.__data__=new _1,this.size=0}var S1=E1;function w1(e){var n=this.__data__,t=n.delete(e);return this.size=n.size,t}var T1=w1;function C1(e){return this.__data__.get(e)}var x1=C1;function R1(e){return this.__data__.has(e)}var O1=R1,A1=Es,P1=ja,D1="[object AsyncFunction]",I1="[object Function]",F1="[object GeneratorFunction]",$1="[object Proxy]";function M1(e){if(!P1(e))return!1;var n=A1(e);return n==I1||n==F1||n==D1||n==$1}var L1=M1,N1=Er,k1=N1["__core-js_shared__"],j1=k1,gu=j1,Kd=function(){var e=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function B1(e){return!!Kd&&Kd in e}var W1=B1,U1=Function.prototype,H1=U1.toString;function G1(e){if(e!=null){try{return H1.call(e)}catch{}try{return e+""}catch{}}return""}var bh=G1,q1=L1,Y1=W1,z1=ja,V1=bh,K1=/[\\^$.*+?()[\]{}|]/g,J1=/^\[object .+?Constructor\]$/,X1=Function.prototype,Z1=Object.prototype,Q1=X1.toString,eC=Z1.hasOwnProperty,tC=RegExp("^"+Q1.call(eC).replace(K1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rC(e){if(!z1(e)||Y1(e))return!1;var n=q1(e)?tC:J1;return n.test(V1(e))}var nC=rC;function aC(e,n){return e==null?void 0:e[n]}var oC=aC,sC=nC,iC=oC;function uC(e,n){var t=iC(e,n);return sC(t)?t:void 0}var Xn=uC,cC=Xn,lC=Er,fC=cC(lC,"Map"),Tc=fC,dC=Xn,pC=dC(Object,"create"),xs=pC,Jd=xs;function hC(){this.__data__=Jd?Jd(null):{},this.size=0}var gC=hC;function vC(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var mC=vC,yC=xs,bC="__lodash_hash_undefined__",_C=Object.prototype,EC=_C.hasOwnProperty;function SC(e){var n=this.__data__;if(yC){var t=n[e];return t===bC?void 0:t}return EC.call(n,e)?n[e]:void 0}var wC=SC,TC=xs,CC=Object.prototype,xC=CC.hasOwnProperty;function RC(e){var n=this.__data__;return TC?n[e]!==void 0:xC.call(n,e)}var OC=RC,AC=xs,PC="__lodash_hash_undefined__";function DC(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=AC&&n===void 0?PC:n,this}var IC=DC,FC=gC,$C=mC,MC=wC,LC=OC,NC=IC;function Zn(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var a=e[n];this.set(a[0],a[1])}}Zn.prototype.clear=FC;Zn.prototype.delete=$C;Zn.prototype.get=MC;Zn.prototype.has=LC;Zn.prototype.set=NC;var kC=Zn,Xd=kC,jC=Cs,BC=Tc;function WC(){this.size=0,this.__data__={hash:new Xd,map:new(BC||jC),string:new Xd}}var UC=WC;function HC(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var GC=HC,qC=GC;function YC(e,n){var t=e.__data__;return qC(n)?t[typeof n=="string"?"string":"hash"]:t.map}var Rs=YC,zC=Rs;function VC(e){var n=zC(this,e).delete(e);return this.size-=n?1:0,n}var KC=VC,JC=Rs;function XC(e){return JC(this,e).get(e)}var ZC=XC,QC=Rs;function ex(e){return QC(this,e).has(e)}var tx=ex,rx=Rs;function nx(e,n){var t=rx(this,e),a=t.size;return t.set(e,n),this.size+=t.size==a?0:1,this}var ax=nx,ox=UC,sx=KC,ix=ZC,ux=tx,cx=ax;function Qn(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n<t;){var a=e[n];this.set(a[0],a[1])}}Qn.prototype.clear=ox;Qn.prototype.delete=sx;Qn.prototype.get=ix;Qn.prototype.has=ux;Qn.prototype.set=cx;var _h=Qn,lx=Cs,fx=Tc,dx=_h,px=200;function hx(e,n){var t=this.__data__;if(t instanceof lx){var a=t.__data__;if(!fx||a.length<px-1)return a.push([e,n]),this.size=++t.size,this;t=this.__data__=new dx(a)}return t.set(e,n),this.size=t.size,this}var gx=hx,vx=Cs,mx=S1,yx=T1,bx=x1,_x=O1,Ex=gx;function Ba(e){var n=this.__data__=new vx(e);this.size=n.size}Ba.prototype.clear=mx;Ba.prototype.delete=yx;Ba.prototype.get=bx;Ba.prototype.has=_x;Ba.prototype.set=Ex;var Sx="__lodash_hash_undefined__";function wx(e){return this.__data__.set(e,Sx),this}var Tx=wx;function Cx(e){return this.__data__.has(e)}var xx=Cx,Rx=_h,Ox=Tx,Ax=xx;function Bu(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new Rx;++n<t;)this.add(e[n])}Bu.prototype.add=Bu.prototype.push=Ox;Bu.prototype.has=Ax;var Px=Er;Px.Uint8Array;var Zd=Ec,Qd=Zd?Zd.prototype:void 0;Qd&&Qd.valueOf;var Dx=Es,Ix=Sc,Fx="[object Arguments]";function $x(e){return Ix(e)&&Dx(e)==Fx}var Mx=$x,ep=Mx,Lx=Sc,Eh=Object.prototype,Nx=Eh.hasOwnProperty,kx=Eh.propertyIsEnumerable;ep(function(){return arguments}());var is={exports:{}};function jx(){return!1}var Bx=jx;is.exports;(function(e,n){var t=Er,a=Bx,s=n&&!n.nodeType&&n,i=s&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===s,l=c?t.Buffer:void 0,d=l?l.isBuffer:void 0,p=d||a;e.exports=p})(is,is.exports);is.exports;var us={exports:{}};us.exports;(function(e,n){var t=sh,a=n&&!n.nodeType&&n,s=a&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===a,c=i&&t.process,l=function(){try{var d=s&&s.require&&s.require("util").types;return d||c&&c.binding&&c.binding("util")}catch{}}();e.exports=l})(us,us.exports);var Wx=us.exports,tp=Wx;tp&&tp.isTypedArray;var Ux=Xn,Hx=Er,Gx=Ux(Hx,"DataView"),qx=Gx,Yx=Xn,zx=Er,Vx=Yx(zx,"Promise"),Kx=Vx,Jx=Xn,Xx=Er,Zx=Jx(Xx,"Set"),Qx=Zx,eR=Xn,tR=Er,rR=eR(tR,"WeakMap"),nR=rR,Wu=qx,Uu=Tc,Hu=Kx,Gu=Qx,qu=nR,Sh=Es,ea=bh,rp="[object Map]",aR="[object Object]",np="[object Promise]",ap="[object Set]",op="[object WeakMap]",sp="[object DataView]",oR=ea(Wu),sR=ea(Uu),iR=ea(Hu),uR=ea(Gu),cR=ea(qu),Bn=Sh;(Wu&&Bn(new Wu(new ArrayBuffer(1)))!=sp||Uu&&Bn(new Uu)!=rp||Hu&&Bn(Hu.resolve())!=np||Gu&&Bn(new Gu)!=ap||qu&&Bn(new qu)!=op)&&(Bn=function(e){var n=Sh(e),t=n==aR?e.constructor:void 0,a=t?ea(t):"";if(a)switch(a){case oR:return sp;case sR:return rp;case iR:return np;case uR:return ap;case cR:return op}return n});const lR="ROOT";zS(),YS();var ip;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(ip||(ip={}));var cs={exports:{}};/**
8
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),P.warnIfExceeded()),j}}}}function fu(e){return typeof e=="boolean"}function Lw(){return function(r){return Nw(r)}}function Nw(e){e===void 0&&(e={});var r=e.thunk,t=r===void 0?!0:r,a=e.immutableCheck,s=a===void 0?!0:a,i=e.serializableCheck,c=i===void 0?!0:i,l=new Ow;if(t&&(fu(t)?l.push(kd):l.push(kd.withExtraArgument(t.extraArgument))),process.env.NODE_ENV!=="production"){if(s){var d={};fu(s)||(d=s),l.unshift($w(d))}if(c){var p={};fu(c)||(p=c),l.push(Mw(p))}}return l}var du=process.env.NODE_ENV==="production";function kw(e){var r=Lw(),t=e||{},a=t.reducer,s=a===void 0?void 0:a,i=t.middleware,c=i===void 0?r():i,l=t.devTools,d=l===void 0?!0:l,p=t.preloadedState,h=p===void 0?void 0:p,m=t.enhancers,_=m===void 0?void 0:m,E;if(typeof s=="function")E=s;else if(Zp(s))E=Kp(s);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 T=c;if(typeof T=="function"&&(T=T(r),!du&&!Array.isArray(T)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!du&&T.some(function(M){return typeof M!="function"}))throw new Error("each middleware provided to configureStore must be a function");var x=fw.apply(void 0,T),D=ns;d&&(D=Rw(tn({trace:!du},typeof d=="object"&&d)));var P=[x];Array.isArray(_)?P=os([x],_):typeof _=="function"&&(P=_(P));var j=D.apply(void 0,P);return Vp(E,h,j)}function Oa(e,r){function t(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(r){var i=r.apply(void 0,a);if(!i)throw new Error("prepareAction did not return an object");return tn(tn({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:a[0]}}return t.toString=function(){return""+e},t.type=e,t.match=function(a){return a.type===e},t}function nh(e){var r={},t=[],a,s={addCase:function(i,c){if(process.env.NODE_ENV!=="production"){if(t.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 l=typeof i=="string"?i:i.type;if(l in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[l]=c,s},addMatcher:function(i,c){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return t.push({matcher:i,reducer:c}),s},addDefaultCase:function(i){if(process.env.NODE_ENV!=="production"&&a)throw new Error("`builder.addDefaultCase` can only be called once");return a=i,s}};return e(s),[r,t,a]}function jw(e){return typeof e=="function"}function Bw(e,r,t,a){t===void 0&&(t=[]);var s=typeof r=="function"?nh(r):[r,t,a],i=s[0],c=s[1],l=s[2],d;if(jw(e))d=function(){return Vo(e(),function(){})};else{var p=Vo(e,function(){});d=function(){return p}}function h(m,_){m===void 0&&(m=d());var E=os([i[_.type]],c.filter(function(T){var x=T.matcher;return x(_)}).map(function(T){var x=T.reducer;return x}));return E.filter(function(T){return!!T}).length===0&&(E=[l]),E.reduce(function(T,x){if(x)if(Mr(T)){var D=T,P=x(D,_);return typeof P>"u"?T:P}else{if(hr(T))return Vo(T,function(j){return x(j,_)});var P=x(T,_);if(typeof P>"u"){if(T===null)return T;throw Error("A case reducer on a non-draftable value must not return undefined")}return P}return T},m)}return h.getInitialState=d,h}function Ww(e,r){return e+"/"+r}function nr(e){var r=e.name;if(!r)throw new Error("`name` is a required option for createSlice");var t=typeof e.initialState=="function"?e.initialState:Vo(e.initialState,function(){}),a=e.reducers||{},s=Object.keys(a),i={},c={},l={};s.forEach(function(h){var m=a[h],_=Ww(r,h),E,T;"reducer"in m?(E=m.reducer,T=m.prepare):E=m,i[h]=E,c[_]=E,l[h]=T?Oa(_,T):Oa(_)});function d(){var h=typeof e.extraReducers=="function"?nh(e.extraReducers):[e.extraReducers],m=h[0],_=m===void 0?{}:m,E=h[1],T=E===void 0?[]:E,x=h[2],D=x===void 0?void 0:x,P=tn(tn({},_),c);return Bw(t,P,T,D)}var p;return{name:r,reducer:function(h,m){return p||(p=d()),p(h,m)},actions:l,caseReducers:i,getInitialState:function(){return p||(p=d()),p.getInitialState()}}}var Uw="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",mc=function(e){e===void 0&&(e=21);for(var r="",t=e;t--;)r+=Uw[Math.random()*64|0];return r},Hw=["name","message","stack","code"],pu=function(){function e(r,t){this.payload=r,this.meta=t}return e}(),Hd=function(){function e(r,t){this.payload=r,this.meta=t}return e}(),Gw=function(e){if(typeof e=="object"&&e!==null){for(var r={},t=0,a=Hw;t<a.length;t++){var s=a[t];typeof e[s]=="string"&&(r[s]=e[s])}return r}return{message:String(e)}};function Q(e,r,t){var a=Oa(e+"/fulfilled",function(p,h,m,_){return{payload:p,meta:lu(tn({},_||{}),{arg:m,requestId:h,requestStatus:"fulfilled"})}}),s=Oa(e+"/pending",function(p,h,m){return{payload:void 0,meta:lu(tn({},m||{}),{arg:h,requestId:p,requestStatus:"pending"})}}),i=Oa(e+"/rejected",function(p,h,m,_,E){return{payload:_,error:(t&&t.serializeError||Gw)(p||"Rejected"),meta:lu(tn({},E||{}),{arg:m,requestId:h,rejectedWithValue:!!_,requestStatus:"rejected",aborted:(p==null?void 0:p.name)==="AbortError",condition:(p==null?void 0:p.name)==="ConditionError"})}}),c=!1,l=typeof AbortController<"u"?AbortController:function(){function p(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return p.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'.")))},p}();function d(p){return function(h,m,_){var E=t!=null&&t.idGenerator?t.idGenerator(p):mc(),T=new l,x,D=new Promise(function(k,O){return T.signal.addEventListener("abort",function(){return O({name:"AbortError",message:x||"Aborted"})})}),P=!1;function j(k){P&&(x=k,T.abort())}var M=function(){return xw(this,null,function(){var k,O,z,G,Y,te;return _w(this,function(Ue){switch(Ue.label){case 0:return Ue.trys.push([0,4,,5]),G=(k=t==null?void 0:t.condition)==null?void 0:k.call(t,p,{getState:m,extra:_}),Yw(G)?[4,G]:[3,2];case 1:G=Ue.sent(),Ue.label=2;case 2:if(G===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return P=!0,h(s(E,p,(O=t==null?void 0:t.getPendingMeta)==null?void 0:O.call(t,{requestId:E,arg:p},{getState:m,extra:_}))),[4,Promise.race([D,Promise.resolve(r(p,{dispatch:h,getState:m,extra:_,requestId:E,signal:T.signal,rejectWithValue:function(Te,st){return new pu(Te,st)},fulfillWithValue:function(Te,st){return new Hd(Te,st)}})).then(function(Te){if(Te instanceof pu)throw Te;return Te instanceof Hd?a(Te.payload,E,p,Te.meta):a(Te,E,p)})])];case 3:return z=Ue.sent(),[3,5];case 4:return Y=Ue.sent(),z=Y instanceof pu?i(null,E,p,Y.payload,Y.meta):i(Y,E,p),[3,5];case 5:return te=t&&!t.dispatchConditionRejection&&i.match(z)&&z.meta.condition,te||h(z),[2,z]}})})}();return Object.assign(M,{abort:j,requestId:E,arg:p,unwrap:function(){return M.then(qw)}})}}return Object.assign(d,{pending:s,rejected:i,fulfilled:a,typePrefix:e})}function qw(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Yw(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zw=function(e){return e&&typeof e.match=="function"},Vw=function(e,r){return zw(e)?e.match(r):e(r)};function dr(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.some(function(a){return Vw(a,t)})}}function bc(e,r){if(!e||!e.meta)return!1;var t=typeof e.meta.requestId=="string",a=r.indexOf(e.meta.requestStatus)>-1;return t&&a}function _c(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ah(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return bc(t,["pending"])}:_c(e)?function(t){var a=e.map(function(i){return i.pending}),s=dr.apply(void 0,a);return s(t)}:ah()(e[0])}function oh(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return bc(t,["rejected"])}:_c(e)?function(t){var a=e.map(function(i){return i.rejected}),s=dr.apply(void 0,a);return s(t)}:oh()(e[0])}function sh(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.length===0?function(t){return bc(t,["fulfilled"])}:_c(e)?function(t){var a=e.map(function(i){return i.fulfilled}),s=dr.apply(void 0,a);return s(t)}:sh()(e[0])}VS();var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kw(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),t}function Jw(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var ja=Jw,Xw=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,ih=Xw,Zw=ih,Qw=typeof self=="object"&&self&&self.Object===Object&&self,eT=Zw||Qw||Function("return this")(),Er=eT,tT=Er,rT=function(){return tT.Date.now()},nT=rT,aT=/\s/;function oT(e){for(var r=e.length;r--&&aT.test(e.charAt(r)););return r}var sT=oT,iT=sT,uT=/^\s+/;function cT(e){return e&&e.slice(0,iT(e)+1).replace(uT,"")}var lT=cT,fT=Er,dT=fT.Symbol,Ec=dT,Gd=Ec,uh=Object.prototype,pT=uh.hasOwnProperty,hT=uh.toString,wa=Gd?Gd.toStringTag:void 0;function gT(e){var r=pT.call(e,wa),t=e[wa];try{e[wa]=void 0;var a=!0}catch{}var s=hT.call(e);return a&&(r?e[wa]=t:delete e[wa]),s}var vT=gT,yT=Object.prototype,mT=yT.toString;function bT(e){return mT.call(e)}var _T=bT,qd=Ec,ET=vT,ST=_T,wT="[object Null]",TT="[object Undefined]",Yd=qd?qd.toStringTag:void 0;function CT(e){return e==null?e===void 0?TT:wT:Yd&&Yd in Object(e)?ET(e):ST(e)}var Es=CT;function xT(e){return e!=null&&typeof e=="object"}var Sc=xT,RT=Es,OT=Sc,AT="[object Symbol]";function PT(e){return typeof e=="symbol"||OT(e)&&RT(e)==AT}var DT=PT,IT=lT,zd=ja,FT=DT,Vd=0/0,$T=/^[-+]0x[0-9a-f]+$/i,MT=/^0b[01]+$/i,LT=/^0o[0-7]+$/i,NT=parseInt;function kT(e){if(typeof e=="number")return e;if(FT(e))return Vd;if(zd(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=zd(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=IT(e);var t=MT.test(e);return t||LT.test(e)?NT(e.slice(2),t?2:8):$T.test(e)?Vd:+e}var jT=kT,BT=ja,hu=nT,Kd=jT,WT="Expected a function",UT=Math.max,HT=Math.min;function GT(e,r,t){var a,s,i,c,l,d,p=0,h=!1,m=!1,_=!0;if(typeof e!="function")throw new TypeError(WT);r=Kd(r)||0,BT(t)&&(h=!!t.leading,m="maxWait"in t,i=m?UT(Kd(t.maxWait)||0,r):i,_="trailing"in t?!!t.trailing:_);function E(z){var G=a,Y=s;return a=s=void 0,p=z,c=e.apply(Y,G),c}function T(z){return p=z,l=setTimeout(P,r),h?E(z):c}function x(z){var G=z-d,Y=z-p,te=r-G;return m?HT(te,i-Y):te}function D(z){var G=z-d,Y=z-p;return d===void 0||G>=r||G<0||m&&Y>=i}function P(){var z=hu();if(D(z))return j(z);l=setTimeout(P,x(z))}function j(z){return l=void 0,_&&a?E(z):(a=s=void 0,c)}function M(){l!==void 0&&clearTimeout(l),p=0,a=d=s=l=void 0}function k(){return l===void 0?c:j(hu())}function O(){var z=hu(),G=D(z);if(a=arguments,s=this,d=z,G){if(l===void 0)return T(d);if(m)return clearTimeout(l),l=setTimeout(P,r),E(d)}return l===void 0&&(l=setTimeout(P,r)),c}return O.cancel=M,O.flush=k,O}var qT=GT,YT=qT,zT=ja,VT="Expected a function";function KT(e,r,t){var a=!0,s=!0;if(typeof e!="function")throw new TypeError(VT);return zT(t)&&(a="leading"in t?!!t.leading:a,s="trailing"in t?!!t.trailing:s),YT(e,r,{leading:a,maxWait:r,trailing:s})}var JT=KT;const XT=_s(JT);var ch=(e=>(e[e.First=0]="First",e[e.Last=-1]="Last",e))(ch||{}),Ir=(e=>(e.ATTACHED="attached",e.DETACHED="detached",e.ERROR="error",e))(Ir||{}),ss=(e=>(e.SOCKET_ERROR="socket-error",e.SOCKET_CLOSURE="socket-closure",e))(ss||{}),lh=(e=>(e.NOT_STARTED="remote debugger not started",e.ALREADY_IN_USE="already in use",e.TIMEOUT="timeout",e))(lh||{});const Ss=2e3,wc={tabs:[],activeTab:"",recent:[],roles:{roles:{},privileges:{},flags:{touched:!1},selectedTab:"roles",forceLogin:!1},sharedCSS:{state:"loading",styles:[]},debugger:{meta:{state:Ir.DETACHED},list:[],sessions:[],expressions:[]},webforms:{templates:{selectedGroup:"",data:[]},components:[],inspector:{css:{active:!1},datasource:{active:!1}},datasources:{theme:"grey"},flags:{"sidebar.section.resizable":!0}}},fh="4DWS_PREFS",dh=e=>`APP_STATE_${e}`,ph=()=>{var e,r;return((r=(e=window==null?void 0:window.$$datastores)==null?void 0:e.ds)==null?void 0:r.getBaseID())||""};function hh(e){try{const r=ph(),t=JSON.stringify(e);localStorage.setItem(dh(r),t)}catch(r){console.error(r)}}function gh(e){try{const r=JSON.stringify(e);localStorage.setItem(fh,r)}catch(r){console.error(r)}}function vh(){try{const e=localStorage.getItem(fh);if(e)return JSON.parse(e)}catch(e){console.error(e)}}function Jn(){const e=ph(),r=localStorage.getItem(dh(e));if(r){const t=JSON.parse(r);return t.tabs=t.tabs.map(a=>({...a,flags:{...a.flags,enabled:!0}})),t}return wc}function ws(e){const{name:r,type:t,path:a}=e,s=a.split(".").at(-1);switch(t){case b.FileFolderType.WEBFORM:return`${r}.WebForm`;case b.FileFolderType.METHOD:case b.FileFolderType.CLASS:return s?`${r}.${s}`:r;case b.FileFolderType.ROLES:return r;default:return`${r}.${t}`}}const yh=e=>{if(!e)return[];const r=new Map;return e.dataClasses.forEach(t=>{var i,c;const a=t.extraProperties||{},s={id:t.className,type:"table",position:{x:((i=a.position)==null?void 0:i.x)||0,y:((c=a.position)==null?void 0:c.y)||0},dragHandle:".custom-drag-handle",data:t};r.set(t.name,s)}),Array.from(r.values())};function mh(e){return e?["json","4dmodel","webform","mform"].includes(e.toLowerCase()):!1}function bh(e,r){return{...e,components:Object.entries(e.components||{}).reduce((t,[a,s])=>({...t,[a]:{...s,custom:Object.entries(s.custom).reduce((i,[c,l])=>c===`states:${r}`?i:{...i,[c]:l},{}),props:Object.entries(s.props).reduce((i,[c,l])=>{let d=l;return c==="events"&&(d=d.map(p=>{var h,m;return p.type==="simple-action"?{...p,state:{...p.state,states:(m=(h=p.state)==null?void 0:h.states)==null?void 0:m.filter(_=>_!==r)}}:p})),{...i,[c]:d}},{})}}),{}),metadata:{...e.metadata,states:e.metadata.states.filter(t=>t.id!==r)}}}function ZT(){this.__data__=[],this.size=0}var QT=ZT;function e1(e,r){return e===r||e!==e&&r!==r}var t1=e1,r1=t1;function n1(e,r){for(var t=e.length;t--;)if(r1(e[t][0],r))return t;return-1}var Ts=n1,a1=Ts,o1=Array.prototype,s1=o1.splice;function i1(e){var r=this.__data__,t=a1(r,e);if(t<0)return!1;var a=r.length-1;return t==a?r.pop():s1.call(r,t,1),--this.size,!0}var u1=i1,c1=Ts;function l1(e){var r=this.__data__,t=c1(r,e);return t<0?void 0:r[t][1]}var f1=l1,d1=Ts;function p1(e){return d1(this.__data__,e)>-1}var h1=p1,g1=Ts;function v1(e,r){var t=this.__data__,a=g1(t,e);return a<0?(++this.size,t.push([e,r])):t[a][1]=r,this}var y1=v1,m1=QT,b1=u1,_1=f1,E1=h1,S1=y1;function Xn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}Xn.prototype.clear=m1;Xn.prototype.delete=b1;Xn.prototype.get=_1;Xn.prototype.has=E1;Xn.prototype.set=S1;var Cs=Xn,w1=Cs;function T1(){this.__data__=new w1,this.size=0}var C1=T1;function x1(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var R1=x1;function O1(e){return this.__data__.get(e)}var A1=O1;function P1(e){return this.__data__.has(e)}var D1=P1,I1=Es,F1=ja,$1="[object AsyncFunction]",M1="[object Function]",L1="[object GeneratorFunction]",N1="[object Proxy]";function k1(e){if(!F1(e))return!1;var r=I1(e);return r==M1||r==L1||r==$1||r==N1}var j1=k1,B1=Er,W1=B1["__core-js_shared__"],U1=W1,gu=U1,Jd=function(){var e=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function H1(e){return!!Jd&&Jd in e}var G1=H1,q1=Function.prototype,Y1=q1.toString;function z1(e){if(e!=null){try{return Y1.call(e)}catch{}try{return e+""}catch{}}return""}var _h=z1,V1=j1,K1=G1,J1=ja,X1=_h,Z1=/[\\^$.*+?()[\]{}|]/g,Q1=/^\[object .+?Constructor\]$/,eC=Function.prototype,tC=Object.prototype,rC=eC.toString,nC=tC.hasOwnProperty,aC=RegExp("^"+rC.call(nC).replace(Z1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function oC(e){if(!J1(e)||K1(e))return!1;var r=V1(e)?aC:Q1;return r.test(X1(e))}var sC=oC;function iC(e,r){return e==null?void 0:e[r]}var uC=iC,cC=sC,lC=uC;function fC(e,r){var t=lC(e,r);return cC(t)?t:void 0}var Zn=fC,dC=Zn,pC=Er,hC=dC(pC,"Map"),Tc=hC,gC=Zn,vC=gC(Object,"create"),xs=vC,Xd=xs;function yC(){this.__data__=Xd?Xd(null):{},this.size=0}var mC=yC;function bC(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var _C=bC,EC=xs,SC="__lodash_hash_undefined__",wC=Object.prototype,TC=wC.hasOwnProperty;function CC(e){var r=this.__data__;if(EC){var t=r[e];return t===SC?void 0:t}return TC.call(r,e)?r[e]:void 0}var xC=CC,RC=xs,OC=Object.prototype,AC=OC.hasOwnProperty;function PC(e){var r=this.__data__;return RC?r[e]!==void 0:AC.call(r,e)}var DC=PC,IC=xs,FC="__lodash_hash_undefined__";function $C(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=IC&&r===void 0?FC:r,this}var MC=$C,LC=mC,NC=_C,kC=xC,jC=DC,BC=MC;function Qn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}Qn.prototype.clear=LC;Qn.prototype.delete=NC;Qn.prototype.get=kC;Qn.prototype.has=jC;Qn.prototype.set=BC;var WC=Qn,Zd=WC,UC=Cs,HC=Tc;function GC(){this.size=0,this.__data__={hash:new Zd,map:new(HC||UC),string:new Zd}}var qC=GC;function YC(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var zC=YC,VC=zC;function KC(e,r){var t=e.__data__;return VC(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Rs=KC,JC=Rs;function XC(e){var r=JC(this,e).delete(e);return this.size-=r?1:0,r}var ZC=XC,QC=Rs;function ex(e){return QC(this,e).get(e)}var tx=ex,rx=Rs;function nx(e){return rx(this,e).has(e)}var ax=nx,ox=Rs;function sx(e,r){var t=ox(this,e),a=t.size;return t.set(e,r),this.size+=t.size==a?0:1,this}var ix=sx,ux=qC,cx=ZC,lx=tx,fx=ax,dx=ix;function ea(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var a=e[r];this.set(a[0],a[1])}}ea.prototype.clear=ux;ea.prototype.delete=cx;ea.prototype.get=lx;ea.prototype.has=fx;ea.prototype.set=dx;var Eh=ea,px=Cs,hx=Tc,gx=Eh,vx=200;function yx(e,r){var t=this.__data__;if(t instanceof px){var a=t.__data__;if(!hx||a.length<vx-1)return a.push([e,r]),this.size=++t.size,this;t=this.__data__=new gx(a)}return t.set(e,r),this.size=t.size,this}var mx=yx,bx=Cs,_x=C1,Ex=R1,Sx=A1,wx=D1,Tx=mx;function Ba(e){var r=this.__data__=new bx(e);this.size=r.size}Ba.prototype.clear=_x;Ba.prototype.delete=Ex;Ba.prototype.get=Sx;Ba.prototype.has=wx;Ba.prototype.set=Tx;var Cx="__lodash_hash_undefined__";function xx(e){return this.__data__.set(e,Cx),this}var Rx=xx;function Ox(e){return this.__data__.has(e)}var Ax=Ox,Px=Eh,Dx=Rx,Ix=Ax;function Bu(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Px;++r<t;)this.add(e[r])}Bu.prototype.add=Bu.prototype.push=Dx;Bu.prototype.has=Ix;var Fx=Er;Fx.Uint8Array;var Qd=Ec,ep=Qd?Qd.prototype:void 0;ep&&ep.valueOf;var $x=Es,Mx=Sc,Lx="[object Arguments]";function Nx(e){return Mx(e)&&$x(e)==Lx}var kx=Nx,tp=kx,jx=Sc,Sh=Object.prototype,Bx=Sh.hasOwnProperty,Wx=Sh.propertyIsEnumerable;tp(function(){return arguments}());var is={exports:{}};function Ux(){return!1}var Hx=Ux;is.exports;(function(e,r){var t=Er,a=Hx,s=r&&!r.nodeType&&r,i=s&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===s,l=c?t.Buffer:void 0,d=l?l.isBuffer:void 0,p=d||a;e.exports=p})(is,is.exports);is.exports;var us={exports:{}};us.exports;(function(e,r){var t=ih,a=r&&!r.nodeType&&r,s=a&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===a,c=i&&t.process,l=function(){try{var d=s&&s.require&&s.require("util").types;return d||c&&c.binding&&c.binding("util")}catch{}}();e.exports=l})(us,us.exports);var Gx=us.exports,rp=Gx;rp&&rp.isTypedArray;var qx=Zn,Yx=Er,zx=qx(Yx,"DataView"),Vx=zx,Kx=Zn,Jx=Er,Xx=Kx(Jx,"Promise"),Zx=Xx,Qx=Zn,eR=Er,tR=Qx(eR,"Set"),rR=tR,nR=Zn,aR=Er,oR=nR(aR,"WeakMap"),sR=oR,Wu=Vx,Uu=Tc,Hu=Zx,Gu=rR,qu=sR,wh=Es,ta=_h,np="[object Map]",iR="[object Object]",ap="[object Promise]",op="[object Set]",sp="[object WeakMap]",ip="[object DataView]",uR=ta(Wu),cR=ta(Uu),lR=ta(Hu),fR=ta(Gu),dR=ta(qu),Wn=wh;(Wu&&Wn(new Wu(new ArrayBuffer(1)))!=ip||Uu&&Wn(new Uu)!=np||Hu&&Wn(Hu.resolve())!=ap||Gu&&Wn(new Gu)!=op||qu&&Wn(new qu)!=sp)&&(Wn=function(e){var r=wh(e),t=r==iR?e.constructor:void 0,a=t?ta(t):"";if(a)switch(a){case uR:return ip;case cR:return np;case lR:return ap;case fR:return op;case dR:return sp}return r});const pR="ROOT";JS(),KS();var up;(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(up||(up={}));var cs={exports:{}};/**
9
9
  * @license
10
10
  * Lodash <https://lodash.com/>
11
11
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
12
12
  * Released under MIT license <https://lodash.com/license>
13
13
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
14
14
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
15
- */cs.exports;(function(e,n){(function(){var t,a="4.17.21",s=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",l="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",p=500,h="__lodash_placeholder__",y=1,_=2,E=4,T=1,x=2,D=1,P=2,j=4,M=8,k=16,O=32,z=64,H=128,Y=256,te=512,We=30,Te="...",st=800,X=16,Pe=1,it=2,Qe=3,Ge=1/0,rt=9007199254740991,qt=17976931348623157e292,W=0/0,q=4294967295,de=q-1,le=q>>>1,se=[["ary",H],["bind",D],["bindKey",P],["curry",M],["curryRight",k],["flip",te],["partial",O],["partialRight",z],["rearg",Y]],fe="[object Arguments]",ne="[object Array]",ce="[object AsyncFunction]",ue="[object Boolean]",he="[object Date]",ge="[object DOMException]",K="[object Error]",F="[object Function]",ze="[object GeneratorFunction]",qe="[object Map]",yt="[object Number]",Ha="[object Null]",Yt="[object Object]",nn="[object Promise]",Ws="[object Proxy]",or="[object RegExp]",xt="[object Set]",an="[object String]",on="[object Symbol]",Ga="[object Undefined]",Sr="[object WeakMap]",Us="[object WeakSet]",sn="[object ArrayBuffer]",Wr="[object DataView]",na="[object Float32Array]",aa="[object Float64Array]",oa="[object Int8Array]",sa="[object Int16Array]",un="[object Int32Array]",Cn="[object Uint8Array]",gr="[object Uint8ClampedArray]",cn="[object Uint16Array]",ln="[object Uint32Array]",qa=/\b__p \+= '';/g,Hs=/\b(__p \+=) '' \+/g,Ya=/(__e\(.*?\)|\b__t\)) \+\n'';/g,za=/&(?:amp|lt|gt|quot|#39);/g,ia=/[&<>"']/g,Va=RegExp(za.source),Gs=RegExp(ia.source),qs=/<%-([\s\S]+?)%>/g,Ka=/<%([\s\S]+?)%>/g,Ja=/<%=([\s\S]+?)%>/g,Ys=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zs=/^\w*$/,Vs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/[\\^$.*+?()[\]{}|]/g,U=RegExp(w.source),J=/^\s+/,ie=/\s/,Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,Ce=/,? & /,Ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,Xe=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,Ur=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,sr=/^\[object .+?Constructor\]$/,Pv=/^0o[0-7]+$/i,Dv=/^(?:0|[1-9]\d*)$/,Iv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,Fv=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",$v="\\u0300-\\u036f",Mv="\\ufe20-\\ufe2f",Lv="\\u20d0-\\u20ff",tl=$v+Mv+Lv,rl="\\u2700-\\u27bf",nl="a-z\\xdf-\\xf6\\xf8-\\xff",Nv="\\xac\\xb1\\xd7\\xf7",kv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",jv="\\u2000-\\u206f",Bv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",al="A-Z\\xc0-\\xd6\\xd8-\\xde",ol="\\ufe0e\\ufe0f",sl=Nv+kv+jv+Bv,Ks="['’]",Wv="["+Qa+"]",il="["+sl+"]",eo="["+tl+"]",ul="\\d+",Uv="["+rl+"]",cl="["+nl+"]",ll="[^"+Qa+sl+ul+rl+nl+al+"]",Js="\\ud83c[\\udffb-\\udfff]",Hv="(?:"+eo+"|"+Js+")",fl="[^"+Qa+"]",Xs="(?:\\ud83c[\\udde6-\\uddff]){2}",Zs="[\\ud800-\\udbff][\\udc00-\\udfff]",xn="["+al+"]",dl="\\u200d",pl="(?:"+cl+"|"+ll+")",Gv="(?:"+xn+"|"+ll+")",hl="(?:"+Ks+"(?:d|ll|m|re|s|t|ve))?",gl="(?:"+Ks+"(?:D|LL|M|RE|S|T|VE))?",vl=Hv+"?",ml="["+ol+"]?",qv="(?:"+dl+"(?:"+[fl,Xs,Zs].join("|")+")"+ml+vl+")*",Yv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yl=ml+vl+qv,Vv="(?:"+[Uv,Xs,Zs].join("|")+")"+yl,Kv="(?:"+[fl+eo+"?",eo,Xs,Zs,Wv].join("|")+")",Jv=RegExp(Ks,"g"),Xv=RegExp(eo,"g"),Qs=RegExp(Js+"(?="+Js+")|"+Kv+yl,"g"),Zv=RegExp([xn+"?"+cl+"+"+hl+"(?="+[il,xn,"$"].join("|")+")",Gv+"+"+gl+"(?="+[il,xn+pl,"$"].join("|")+")",xn+"?"+pl+"+"+hl,xn+"+"+gl,zv,Yv,ul,Vv].join("|"),"g"),Qv=RegExp("["+dl+Qa+tl+ol+"]"),em=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rm=-1,Ve={};Ve[na]=Ve[aa]=Ve[oa]=Ve[sa]=Ve[un]=Ve[Cn]=Ve[gr]=Ve[cn]=Ve[ln]=!0,Ve[fe]=Ve[ne]=Ve[sn]=Ve[ue]=Ve[Wr]=Ve[he]=Ve[K]=Ve[F]=Ve[qe]=Ve[yt]=Ve[Yt]=Ve[or]=Ve[xt]=Ve[an]=Ve[Sr]=!1;var Ye={};Ye[fe]=Ye[ne]=Ye[sn]=Ye[Wr]=Ye[ue]=Ye[he]=Ye[na]=Ye[aa]=Ye[oa]=Ye[sa]=Ye[un]=Ye[qe]=Ye[yt]=Ye[Yt]=Ye[or]=Ye[xt]=Ye[an]=Ye[on]=Ye[Cn]=Ye[gr]=Ye[cn]=Ye[ln]=!0,Ye[K]=Ye[F]=Ye[Sr]=!1;var nm={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},am={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},om={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},sm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},im=parseFloat,um=parseInt,bl=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,cm=typeof self=="object"&&self&&self.Object===Object&&self,gt=bl||cm||Function("return this")(),ei=n&&!n.nodeType&&n,fn=ei&&!0&&e&&!e.nodeType&&e,_l=fn&&fn.exports===ei,ti=_l&&bl.process,Vt=function(){try{var R=fn&&fn.require&&fn.require("util").types;return R||ti&&ti.binding&&ti.binding("util")}catch{}}(),El=Vt&&Vt.isArrayBuffer,Sl=Vt&&Vt.isDate,wl=Vt&&Vt.isMap,Tl=Vt&&Vt.isRegExp,Cl=Vt&&Vt.isSet,xl=Vt&&Vt.isTypedArray;function Nt(R,$,I){switch(I.length){case 0:return R.call($);case 1:return R.call($,I[0]);case 2:return R.call($,I[0],I[1]);case 3:return R.call($,I[0],I[1],I[2])}return R.apply($,I)}function lm(R,$,I,Z){for(var pe=-1,Oe=R==null?0:R.length;++pe<Oe;){var ut=R[pe];$(Z,ut,I(ut),R)}return Z}function Kt(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z&&$(R[I],I,R)!==!1;);return R}function fm(R,$){for(var I=R==null?0:R.length;I--&&$(R[I],I,R)!==!1;);return R}function Rl(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z;)if(!$(R[I],I,R))return!1;return!0}function Hr(R,$){for(var I=-1,Z=R==null?0:R.length,pe=0,Oe=[];++I<Z;){var ut=R[I];$(ut,I,R)&&(Oe[pe++]=ut)}return Oe}function to(R,$){var I=R==null?0:R.length;return!!I&&Rn(R,$,0)>-1}function ri(R,$,I){for(var Z=-1,pe=R==null?0:R.length;++Z<pe;)if(I($,R[Z]))return!0;return!1}function Ke(R,$){for(var I=-1,Z=R==null?0:R.length,pe=Array(Z);++I<Z;)pe[I]=$(R[I],I,R);return pe}function Gr(R,$){for(var I=-1,Z=$.length,pe=R.length;++I<Z;)R[pe+I]=$[I];return R}function ni(R,$,I,Z){var pe=-1,Oe=R==null?0:R.length;for(Z&&Oe&&(I=R[++pe]);++pe<Oe;)I=$(I,R[pe],pe,R);return I}function dm(R,$,I,Z){var pe=R==null?0:R.length;for(Z&&pe&&(I=R[--pe]);pe--;)I=$(I,R[pe],pe,R);return I}function ai(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z;)if($(R[I],I,R))return!0;return!1}var pm=oi("length");function hm(R){return R.split("")}function gm(R){return R.match(Ee)||[]}function Ol(R,$,I){var Z;return I(R,function(pe,Oe,ut){if($(pe,Oe,ut))return Z=Oe,!1}),Z}function ro(R,$,I,Z){for(var pe=R.length,Oe=I+(Z?1:-1);Z?Oe--:++Oe<pe;)if($(R[Oe],Oe,R))return Oe;return-1}function Rn(R,$,I){return $===$?Rm(R,$,I):ro(R,Al,I)}function vm(R,$,I,Z){for(var pe=I-1,Oe=R.length;++pe<Oe;)if(Z(R[pe],$))return pe;return-1}function Al(R){return R!==R}function Pl(R,$){var I=R==null?0:R.length;return I?ii(R,$)/I:W}function oi(R){return function($){return $==null?t:$[R]}}function si(R){return function($){return R==null?t:R[$]}}function Dl(R,$,I,Z,pe){return pe(R,function(Oe,ut,Ue){I=Z?(Z=!1,Oe):$(I,Oe,ut,Ue)}),I}function mm(R,$){var I=R.length;for(R.sort($);I--;)R[I]=R[I].value;return R}function ii(R,$){for(var I,Z=-1,pe=R.length;++Z<pe;){var Oe=$(R[Z]);Oe!==t&&(I=I===t?Oe:I+Oe)}return I}function ui(R,$){for(var I=-1,Z=Array(R);++I<R;)Z[I]=$(I);return Z}function ym(R,$){return Ke($,function(I){return[I,R[I]]})}function Il(R){return R&&R.slice(0,Ll(R)+1).replace(J,"")}function kt(R){return function($){return R($)}}function ci(R,$){return Ke($,function(I){return R[I]})}function ua(R,$){return R.has($)}function Fl(R,$){for(var I=-1,Z=R.length;++I<Z&&Rn($,R[I],0)>-1;);return I}function $l(R,$){for(var I=R.length;I--&&Rn($,R[I],0)>-1;);return I}function bm(R,$){for(var I=R.length,Z=0;I--;)R[I]===$&&++Z;return Z}var _m=si(nm),Em=si(am);function Sm(R){return"\\"+sm[R]}function wm(R,$){return R==null?t:R[$]}function On(R){return Qv.test(R)}function Tm(R){return em.test(R)}function Cm(R){for(var $,I=[];!($=R.next()).done;)I.push($.value);return I}function li(R){var $=-1,I=Array(R.size);return R.forEach(function(Z,pe){I[++$]=[pe,Z]}),I}function Ml(R,$){return function(I){return R($(I))}}function qr(R,$){for(var I=-1,Z=R.length,pe=0,Oe=[];++I<Z;){var ut=R[I];(ut===$||ut===h)&&(R[I]=h,Oe[pe++]=I)}return Oe}function no(R){var $=-1,I=Array(R.size);return R.forEach(function(Z){I[++$]=Z}),I}function xm(R){var $=-1,I=Array(R.size);return R.forEach(function(Z){I[++$]=[Z,Z]}),I}function Rm(R,$,I){for(var Z=I-1,pe=R.length;++Z<pe;)if(R[Z]===$)return Z;return-1}function Om(R,$,I){for(var Z=I+1;Z--;)if(R[Z]===$)return Z;return Z}function An(R){return On(R)?Pm(R):pm(R)}function ir(R){return On(R)?Dm(R):hm(R)}function Ll(R){for(var $=R.length;$--&&ie.test(R.charAt($)););return $}var Am=si(om);function Pm(R){for(var $=Qs.lastIndex=0;Qs.test(R);)++$;return $}function Dm(R){return R.match(Qs)||[]}function Im(R){return R.match(Zv)||[]}var Fm=function R($){$=$==null?gt:Pn.defaults(gt.Object(),$,Pn.pick(gt,tm));var I=$.Array,Z=$.Date,pe=$.Error,Oe=$.Function,ut=$.Math,Ue=$.Object,fi=$.RegExp,$m=$.String,Jt=$.TypeError,ao=I.prototype,Mm=Oe.prototype,Dn=Ue.prototype,oo=$["__core-js_shared__"],so=Mm.toString,ke=Dn.hasOwnProperty,Lm=0,Nl=function(){var r=/[^.]+$/.exec(oo&&oo.keys&&oo.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),io=Dn.toString,Nm=so.call(Ue),km=gt._,jm=fi("^"+so.call(ke).replace(w,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uo=_l?$.Buffer:t,Yr=$.Symbol,co=$.Uint8Array,kl=uo?uo.allocUnsafe:t,lo=Ml(Ue.getPrototypeOf,Ue),jl=Ue.create,Bl=Dn.propertyIsEnumerable,fo=ao.splice,Wl=Yr?Yr.isConcatSpreadable:t,ca=Yr?Yr.iterator:t,dn=Yr?Yr.toStringTag:t,po=function(){try{var r=mn(Ue,"defineProperty");return r({},"",{}),r}catch{}}(),Bm=$.clearTimeout!==gt.clearTimeout&&$.clearTimeout,Wm=Z&&Z.now!==gt.Date.now&&Z.now,Um=$.setTimeout!==gt.setTimeout&&$.setTimeout,ho=ut.ceil,go=ut.floor,di=Ue.getOwnPropertySymbols,Hm=uo?uo.isBuffer:t,Ul=$.isFinite,Gm=ao.join,qm=Ml(Ue.keys,Ue),ct=ut.max,bt=ut.min,Ym=Z.now,zm=$.parseInt,Hl=ut.random,Vm=ao.reverse,pi=mn($,"DataView"),la=mn($,"Map"),hi=mn($,"Promise"),In=mn($,"Set"),fa=mn($,"WeakMap"),da=mn(Ue,"create"),vo=fa&&new fa,Fn={},Km=yn(pi),Jm=yn(la),Xm=yn(hi),Zm=yn(In),Qm=yn(fa),mo=Yr?Yr.prototype:t,pa=mo?mo.valueOf:t,Gl=mo?mo.toString:t;function v(r){if(tt(r)&&!ve(r)&&!(r instanceof we)){if(r instanceof Xt)return r;if(ke.call(r,"__wrapped__"))return Yf(r)}return new Xt(r)}var $n=function(){function r(){}return function(o){if(!Ze(o))return{};if(jl)return jl(o);r.prototype=o;var u=new r;return r.prototype=t,u}}();function yo(){}function Xt(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=t}v.templateSettings={escape:qs,evaluate:Ka,interpolate:Ja,variable:"",imports:{_:v}},v.prototype=yo.prototype,v.prototype.constructor=v,Xt.prototype=$n(yo.prototype),Xt.prototype.constructor=Xt;function we(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function ey(){var r=new we(this.__wrapped__);return r.__actions__=It(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=It(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=It(this.__views__),r}function ty(){if(this.__filtered__){var r=new we(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function ry(){var r=this.__wrapped__.value(),o=this.__dir__,u=ve(r),f=o<0,g=u?r.length:0,m=hb(0,g,this.__views__),S=m.start,C=m.end,A=C-S,L=f?C:S-1,N=this.__iteratees__,B=N.length,V=0,ee=bt(A,this.__takeCount__);if(!u||!f&&g==A&&ee==A)return gf(r,this.__actions__);var ae=[];e:for(;A--&&V<ee;){L+=o;for(var be=-1,oe=r[L];++be<B;){var Se=N[be],xe=Se.iteratee,Wt=Se.type,At=xe(oe);if(Wt==it)oe=At;else if(!At){if(Wt==Pe)continue e;break e}}ae[V++]=oe}return ae}we.prototype=$n(yo.prototype),we.prototype.constructor=we;function pn(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var f=r[o];this.set(f[0],f[1])}}function ny(){this.__data__=da?da(null):{},this.size=0}function ay(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function oy(r){var o=this.__data__;if(da){var u=o[r];return u===d?t:u}return ke.call(o,r)?o[r]:t}function sy(r){var o=this.__data__;return da?o[r]!==t:ke.call(o,r)}function iy(r,o){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=da&&o===t?d:o,this}pn.prototype.clear=ny,pn.prototype.delete=ay,pn.prototype.get=oy,pn.prototype.has=sy,pn.prototype.set=iy;function wr(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var f=r[o];this.set(f[0],f[1])}}function uy(){this.__data__=[],this.size=0}function cy(r){var o=this.__data__,u=bo(o,r);if(u<0)return!1;var f=o.length-1;return u==f?o.pop():fo.call(o,u,1),--this.size,!0}function ly(r){var o=this.__data__,u=bo(o,r);return u<0?t:o[u][1]}function fy(r){return bo(this.__data__,r)>-1}function dy(r,o){var u=this.__data__,f=bo(u,r);return f<0?(++this.size,u.push([r,o])):u[f][1]=o,this}wr.prototype.clear=uy,wr.prototype.delete=cy,wr.prototype.get=ly,wr.prototype.has=fy,wr.prototype.set=dy;function Tr(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var f=r[o];this.set(f[0],f[1])}}function py(){this.size=0,this.__data__={hash:new pn,map:new(la||wr),string:new pn}}function hy(r){var o=Do(this,r).delete(r);return this.size-=o?1:0,o}function gy(r){return Do(this,r).get(r)}function vy(r){return Do(this,r).has(r)}function my(r,o){var u=Do(this,r),f=u.size;return u.set(r,o),this.size+=u.size==f?0:1,this}Tr.prototype.clear=py,Tr.prototype.delete=hy,Tr.prototype.get=gy,Tr.prototype.has=vy,Tr.prototype.set=my;function hn(r){var o=-1,u=r==null?0:r.length;for(this.__data__=new Tr;++o<u;)this.add(r[o])}function yy(r){return this.__data__.set(r,d),this}function by(r){return this.__data__.has(r)}hn.prototype.add=hn.prototype.push=yy,hn.prototype.has=by;function ur(r){var o=this.__data__=new wr(r);this.size=o.size}function _y(){this.__data__=new wr,this.size=0}function Ey(r){var o=this.__data__,u=o.delete(r);return this.size=o.size,u}function Sy(r){return this.__data__.get(r)}function wy(r){return this.__data__.has(r)}function Ty(r,o){var u=this.__data__;if(u instanceof wr){var f=u.__data__;if(!la||f.length<s-1)return f.push([r,o]),this.size=++u.size,this;u=this.__data__=new Tr(f)}return u.set(r,o),this.size=u.size,this}ur.prototype.clear=_y,ur.prototype.delete=Ey,ur.prototype.get=Sy,ur.prototype.has=wy,ur.prototype.set=Ty;function ql(r,o){var u=ve(r),f=!u&&bn(r),g=!u&&!f&&Xr(r),m=!u&&!f&&!g&&kn(r),S=u||f||g||m,C=S?ui(r.length,$m):[],A=C.length;for(var L in r)(o||ke.call(r,L))&&!(S&&(L=="length"||g&&(L=="offset"||L=="parent")||m&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||Or(L,A)))&&C.push(L);return C}function Yl(r){var o=r.length;return o?r[Ci(0,o-1)]:t}function Cy(r,o){return Io(It(r),gn(o,0,r.length))}function xy(r){return Io(It(r))}function gi(r,o,u){(u!==t&&!cr(r[o],u)||u===t&&!(o in r))&&Cr(r,o,u)}function ha(r,o,u){var f=r[o];(!(ke.call(r,o)&&cr(f,u))||u===t&&!(o in r))&&Cr(r,o,u)}function bo(r,o){for(var u=r.length;u--;)if(cr(r[u][0],o))return u;return-1}function Ry(r,o,u,f){return zr(r,function(g,m,S){o(f,g,u(g),S)}),f}function zl(r,o){return r&&mr(o,dt(o),r)}function Oy(r,o){return r&&mr(o,$t(o),r)}function Cr(r,o,u){o=="__proto__"&&po?po(r,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[o]=u}function vi(r,o){for(var u=-1,f=o.length,g=I(f),m=r==null;++u<f;)g[u]=m?t:Ji(r,o[u]);return g}function gn(r,o,u){return r===r&&(u!==t&&(r=r<=u?r:u),o!==t&&(r=r>=o?r:o)),r}function Zt(r,o,u,f,g,m){var S,C=o&y,A=o&_,L=o&E;if(u&&(S=g?u(r,f,g,m):u(r)),S!==t)return S;if(!Ze(r))return r;var N=ve(r);if(N){if(S=vb(r),!C)return It(r,S)}else{var B=_t(r),V=B==F||B==ze;if(Xr(r))return yf(r,C);if(B==Yt||B==fe||V&&!g){if(S=A||V?{}:Nf(r),!C)return A?ob(r,Oy(S,r)):ab(r,zl(S,r))}else{if(!Ye[B])return g?r:{};S=mb(r,B,C)}}m||(m=new ur);var ee=m.get(r);if(ee)return ee;m.set(r,S),dd(r)?r.forEach(function(oe){S.add(Zt(oe,o,u,oe,r,m))}):ld(r)&&r.forEach(function(oe,Se){S.set(Se,Zt(oe,o,u,Se,r,m))});var ae=L?A?Li:Mi:A?$t:dt,be=N?t:ae(r);return Kt(be||r,function(oe,Se){be&&(Se=oe,oe=r[Se]),ha(S,Se,Zt(oe,o,u,Se,r,m))}),S}function Ay(r){var o=dt(r);return function(u){return Vl(u,r,o)}}function Vl(r,o,u){var f=u.length;if(r==null)return!f;for(r=Ue(r);f--;){var g=u[f],m=o[g],S=r[g];if(S===t&&!(g in r)||!m(S))return!1}return!0}function Kl(r,o,u){if(typeof r!="function")throw new Jt(c);return Ea(function(){r.apply(t,u)},o)}function ga(r,o,u,f){var g=-1,m=to,S=!0,C=r.length,A=[],L=o.length;if(!C)return A;u&&(o=Ke(o,kt(u))),f?(m=ri,S=!1):o.length>=s&&(m=ua,S=!1,o=new hn(o));e:for(;++g<C;){var N=r[g],B=u==null?N:u(N);if(N=f||N!==0?N:0,S&&B===B){for(var V=L;V--;)if(o[V]===B)continue e;A.push(N)}else m(o,B,f)||A.push(N)}return A}var zr=wf(vr),Jl=wf(yi,!0);function Py(r,o){var u=!0;return zr(r,function(f,g,m){return u=!!o(f,g,m),u}),u}function _o(r,o,u){for(var f=-1,g=r.length;++f<g;){var m=r[f],S=o(m);if(S!=null&&(C===t?S===S&&!Bt(S):u(S,C)))var C=S,A=m}return A}function Dy(r,o,u,f){var g=r.length;for(u=me(u),u<0&&(u=-u>g?0:g+u),f=f===t||f>g?g:me(f),f<0&&(f+=g),f=u>f?0:hd(f);u<f;)r[u++]=o;return r}function Xl(r,o){var u=[];return zr(r,function(f,g,m){o(f,g,m)&&u.push(f)}),u}function vt(r,o,u,f,g){var m=-1,S=r.length;for(u||(u=bb),g||(g=[]);++m<S;){var C=r[m];o>0&&u(C)?o>1?vt(C,o-1,u,f,g):Gr(g,C):f||(g[g.length]=C)}return g}var mi=Tf(),Zl=Tf(!0);function vr(r,o){return r&&mi(r,o,dt)}function yi(r,o){return r&&Zl(r,o,dt)}function Eo(r,o){return Hr(o,function(u){return Ar(r[u])})}function vn(r,o){o=Kr(o,r);for(var u=0,f=o.length;r!=null&&u<f;)r=r[yr(o[u++])];return u&&u==f?r:t}function Ql(r,o,u){var f=o(r);return ve(r)?f:Gr(f,u(r))}function Rt(r){return r==null?r===t?Ga:Ha:dn&&dn in Ue(r)?pb(r):xb(r)}function bi(r,o){return r>o}function Iy(r,o){return r!=null&&ke.call(r,o)}function Fy(r,o){return r!=null&&o in Ue(r)}function $y(r,o,u){return r>=bt(o,u)&&r<ct(o,u)}function _i(r,o,u){for(var f=u?ri:to,g=r[0].length,m=r.length,S=m,C=I(m),A=1/0,L=[];S--;){var N=r[S];S&&o&&(N=Ke(N,kt(o))),A=bt(N.length,A),C[S]=!u&&(o||g>=120&&N.length>=120)?new hn(S&&N):t}N=r[0];var B=-1,V=C[0];e:for(;++B<g&&L.length<A;){var ee=N[B],ae=o?o(ee):ee;if(ee=u||ee!==0?ee:0,!(V?ua(V,ae):f(L,ae,u))){for(S=m;--S;){var be=C[S];if(!(be?ua(be,ae):f(r[S],ae,u)))continue e}V&&V.push(ae),L.push(ee)}}return L}function My(r,o,u,f){return vr(r,function(g,m,S){o(f,u(g),m,S)}),f}function va(r,o,u){o=Kr(o,r),r=Wf(r,o);var f=r==null?r:r[yr(er(o))];return f==null?t:Nt(f,r,u)}function ef(r){return tt(r)&&Rt(r)==fe}function Ly(r){return tt(r)&&Rt(r)==sn}function Ny(r){return tt(r)&&Rt(r)==he}function ma(r,o,u,f,g){return r===o?!0:r==null||o==null||!tt(r)&&!tt(o)?r!==r&&o!==o:ky(r,o,u,f,ma,g)}function ky(r,o,u,f,g,m){var S=ve(r),C=ve(o),A=S?ne:_t(r),L=C?ne:_t(o);A=A==fe?Yt:A,L=L==fe?Yt:L;var N=A==Yt,B=L==Yt,V=A==L;if(V&&Xr(r)){if(!Xr(o))return!1;S=!0,N=!1}if(V&&!N)return m||(m=new ur),S||kn(r)?$f(r,o,u,f,g,m):fb(r,o,A,u,f,g,m);if(!(u&T)){var ee=N&&ke.call(r,"__wrapped__"),ae=B&&ke.call(o,"__wrapped__");if(ee||ae){var be=ee?r.value():r,oe=ae?o.value():o;return m||(m=new ur),g(be,oe,u,f,m)}}return V?(m||(m=new ur),db(r,o,u,f,g,m)):!1}function jy(r){return tt(r)&&_t(r)==qe}function Ei(r,o,u,f){var g=u.length,m=g,S=!f;if(r==null)return!m;for(r=Ue(r);g--;){var C=u[g];if(S&&C[2]?C[1]!==r[C[0]]:!(C[0]in r))return!1}for(;++g<m;){C=u[g];var A=C[0],L=r[A],N=C[1];if(S&&C[2]){if(L===t&&!(A in r))return!1}else{var B=new ur;if(f)var V=f(L,N,A,r,o,B);if(!(V===t?ma(N,L,T|x,f,B):V))return!1}}return!0}function tf(r){if(!Ze(r)||Eb(r))return!1;var o=Ar(r)?jm:sr;return o.test(yn(r))}function By(r){return tt(r)&&Rt(r)==or}function Wy(r){return tt(r)&&_t(r)==xt}function Uy(r){return tt(r)&&ko(r.length)&&!!Ve[Rt(r)]}function rf(r){return typeof r=="function"?r:r==null?Mt:typeof r=="object"?ve(r)?of(r[0],r[1]):af(r):Cd(r)}function Si(r){if(!_a(r))return qm(r);var o=[];for(var u in Ue(r))ke.call(r,u)&&u!="constructor"&&o.push(u);return o}function Hy(r){if(!Ze(r))return Cb(r);var o=_a(r),u=[];for(var f in r)f=="constructor"&&(o||!ke.call(r,f))||u.push(f);return u}function wi(r,o){return r<o}function nf(r,o){var u=-1,f=Ft(r)?I(r.length):[];return zr(r,function(g,m,S){f[++u]=o(g,m,S)}),f}function af(r){var o=ki(r);return o.length==1&&o[0][2]?jf(o[0][0],o[0][1]):function(u){return u===r||Ei(u,r,o)}}function of(r,o){return Bi(r)&&kf(o)?jf(yr(r),o):function(u){var f=Ji(u,r);return f===t&&f===o?Xi(u,r):ma(o,f,T|x)}}function So(r,o,u,f,g){r!==o&&mi(o,function(m,S){if(g||(g=new ur),Ze(m))Gy(r,o,S,u,So,f,g);else{var C=f?f(Ui(r,S),m,S+"",r,o,g):t;C===t&&(C=m),gi(r,S,C)}},$t)}function Gy(r,o,u,f,g,m,S){var C=Ui(r,u),A=Ui(o,u),L=S.get(A);if(L){gi(r,u,L);return}var N=m?m(C,A,u+"",r,o,S):t,B=N===t;if(B){var V=ve(A),ee=!V&&Xr(A),ae=!V&&!ee&&kn(A);N=A,V||ee||ae?ve(C)?N=C:nt(C)?N=It(C):ee?(B=!1,N=yf(A,!0)):ae?(B=!1,N=bf(A,!0)):N=[]:Sa(A)||bn(A)?(N=C,bn(C)?N=gd(C):(!Ze(C)||Ar(C))&&(N=Nf(A))):B=!1}B&&(S.set(A,N),g(N,A,f,m,S),S.delete(A)),gi(r,u,N)}function sf(r,o){var u=r.length;if(u)return o+=o<0?u:0,Or(o,u)?r[o]:t}function uf(r,o,u){o.length?o=Ke(o,function(m){return ve(m)?function(S){return vn(S,m.length===1?m[0]:m)}:m}):o=[Mt];var f=-1;o=Ke(o,kt(re()));var g=nf(r,function(m,S,C){var A=Ke(o,function(L){return L(m)});return{criteria:A,index:++f,value:m}});return mm(g,function(m,S){return nb(m,S,u)})}function qy(r,o){return cf(r,o,function(u,f){return Xi(r,f)})}function cf(r,o,u){for(var f=-1,g=o.length,m={};++f<g;){var S=o[f],C=vn(r,S);u(C,S)&&ya(m,Kr(S,r),C)}return m}function Yy(r){return function(o){return vn(o,r)}}function Ti(r,o,u,f){var g=f?vm:Rn,m=-1,S=o.length,C=r;for(r===o&&(o=It(o)),u&&(C=Ke(r,kt(u)));++m<S;)for(var A=0,L=o[m],N=u?u(L):L;(A=g(C,N,A,f))>-1;)C!==r&&fo.call(C,A,1),fo.call(r,A,1);return r}function lf(r,o){for(var u=r?o.length:0,f=u-1;u--;){var g=o[u];if(u==f||g!==m){var m=g;Or(g)?fo.call(r,g,1):Oi(r,g)}}return r}function Ci(r,o){return r+go(Hl()*(o-r+1))}function zy(r,o,u,f){for(var g=-1,m=ct(ho((o-r)/(u||1)),0),S=I(m);m--;)S[f?m:++g]=r,r+=u;return S}function xi(r,o){var u="";if(!r||o<1||o>rt)return u;do o%2&&(u+=r),o=go(o/2),o&&(r+=r);while(o);return u}function _e(r,o){return Hi(Bf(r,o,Mt),r+"")}function Vy(r){return Yl(jn(r))}function Ky(r,o){var u=jn(r);return Io(u,gn(o,0,u.length))}function ya(r,o,u,f){if(!Ze(r))return r;o=Kr(o,r);for(var g=-1,m=o.length,S=m-1,C=r;C!=null&&++g<m;){var A=yr(o[g]),L=u;if(A==="__proto__"||A==="constructor"||A==="prototype")return r;if(g!=S){var N=C[A];L=f?f(N,A,C):t,L===t&&(L=Ze(N)?N:Or(o[g+1])?[]:{})}ha(C,A,L),C=C[A]}return r}var ff=vo?function(r,o){return vo.set(r,o),r}:Mt,Jy=po?function(r,o){return po(r,"toString",{configurable:!0,enumerable:!1,value:Qi(o),writable:!0})}:Mt;function Xy(r){return Io(jn(r))}function Qt(r,o,u){var f=-1,g=r.length;o<0&&(o=-o>g?0:g+o),u=u>g?g:u,u<0&&(u+=g),g=o>u?0:u-o>>>0,o>>>=0;for(var m=I(g);++f<g;)m[f]=r[f+o];return m}function Zy(r,o){var u;return zr(r,function(f,g,m){return u=o(f,g,m),!u}),!!u}function wo(r,o,u){var f=0,g=r==null?f:r.length;if(typeof o=="number"&&o===o&&g<=le){for(;f<g;){var m=f+g>>>1,S=r[m];S!==null&&!Bt(S)&&(u?S<=o:S<o)?f=m+1:g=m}return g}return Ri(r,o,Mt,u)}function Ri(r,o,u,f){var g=0,m=r==null?0:r.length;if(m===0)return 0;o=u(o);for(var S=o!==o,C=o===null,A=Bt(o),L=o===t;g<m;){var N=go((g+m)/2),B=u(r[N]),V=B!==t,ee=B===null,ae=B===B,be=Bt(B);if(S)var oe=f||ae;else L?oe=ae&&(f||V):C?oe=ae&&V&&(f||!ee):A?oe=ae&&V&&!ee&&(f||!be):ee||be?oe=!1:oe=f?B<=o:B<o;oe?g=N+1:m=N}return bt(m,de)}function df(r,o){for(var u=-1,f=r.length,g=0,m=[];++u<f;){var S=r[u],C=o?o(S):S;if(!u||!cr(C,A)){var A=C;m[g++]=S===0?0:S}}return m}function pf(r){return typeof r=="number"?r:Bt(r)?W:+r}function jt(r){if(typeof r=="string")return r;if(ve(r))return Ke(r,jt)+"";if(Bt(r))return Gl?Gl.call(r):"";var o=r+"";return o=="0"&&1/r==-Ge?"-0":o}function Vr(r,o,u){var f=-1,g=to,m=r.length,S=!0,C=[],A=C;if(u)S=!1,g=ri;else if(m>=s){var L=o?null:cb(r);if(L)return no(L);S=!1,g=ua,A=new hn}else A=o?[]:C;e:for(;++f<m;){var N=r[f],B=o?o(N):N;if(N=u||N!==0?N:0,S&&B===B){for(var V=A.length;V--;)if(A[V]===B)continue e;o&&A.push(B),C.push(N)}else g(A,B,u)||(A!==C&&A.push(B),C.push(N))}return C}function Oi(r,o){return o=Kr(o,r),r=Wf(r,o),r==null||delete r[yr(er(o))]}function hf(r,o,u,f){return ya(r,o,u(vn(r,o)),f)}function To(r,o,u,f){for(var g=r.length,m=f?g:-1;(f?m--:++m<g)&&o(r[m],m,r););return u?Qt(r,f?0:m,f?m+1:g):Qt(r,f?m+1:0,f?g:m)}function gf(r,o){var u=r;return u instanceof we&&(u=u.value()),ni(o,function(f,g){return g.func.apply(g.thisArg,Gr([f],g.args))},u)}function Ai(r,o,u){var f=r.length;if(f<2)return f?Vr(r[0]):[];for(var g=-1,m=I(f);++g<f;)for(var S=r[g],C=-1;++C<f;)C!=g&&(m[g]=ga(m[g]||S,r[C],o,u));return Vr(vt(m,1),o,u)}function vf(r,o,u){for(var f=-1,g=r.length,m=o.length,S={};++f<g;){var C=f<m?o[f]:t;u(S,r[f],C)}return S}function Pi(r){return nt(r)?r:[]}function Di(r){return typeof r=="function"?r:Mt}function Kr(r,o){return ve(r)?r:Bi(r,o)?[r]:qf(De(r))}var Qy=_e;function Jr(r,o,u){var f=r.length;return u=u===t?f:u,!o&&u>=f?r:Qt(r,o,u)}var mf=Bm||function(r){return gt.clearTimeout(r)};function yf(r,o){if(o)return r.slice();var u=r.length,f=kl?kl(u):new r.constructor(u);return r.copy(f),f}function Ii(r){var o=new r.constructor(r.byteLength);return new co(o).set(new co(r)),o}function eb(r,o){var u=o?Ii(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function tb(r){var o=new r.constructor(r.source,zt.exec(r));return o.lastIndex=r.lastIndex,o}function rb(r){return pa?Ue(pa.call(r)):{}}function bf(r,o){var u=o?Ii(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function _f(r,o){if(r!==o){var u=r!==t,f=r===null,g=r===r,m=Bt(r),S=o!==t,C=o===null,A=o===o,L=Bt(o);if(!C&&!L&&!m&&r>o||m&&S&&A&&!C&&!L||f&&S&&A||!u&&A||!g)return 1;if(!f&&!m&&!L&&r<o||L&&u&&g&&!f&&!m||C&&u&&g||!S&&g||!A)return-1}return 0}function nb(r,o,u){for(var f=-1,g=r.criteria,m=o.criteria,S=g.length,C=u.length;++f<S;){var A=_f(g[f],m[f]);if(A){if(f>=C)return A;var L=u[f];return A*(L=="desc"?-1:1)}}return r.index-o.index}function Ef(r,o,u,f){for(var g=-1,m=r.length,S=u.length,C=-1,A=o.length,L=ct(m-S,0),N=I(A+L),B=!f;++C<A;)N[C]=o[C];for(;++g<S;)(B||g<m)&&(N[u[g]]=r[g]);for(;L--;)N[C++]=r[g++];return N}function Sf(r,o,u,f){for(var g=-1,m=r.length,S=-1,C=u.length,A=-1,L=o.length,N=ct(m-C,0),B=I(N+L),V=!f;++g<N;)B[g]=r[g];for(var ee=g;++A<L;)B[ee+A]=o[A];for(;++S<C;)(V||g<m)&&(B[ee+u[S]]=r[g++]);return B}function It(r,o){var u=-1,f=r.length;for(o||(o=I(f));++u<f;)o[u]=r[u];return o}function mr(r,o,u,f){var g=!u;u||(u={});for(var m=-1,S=o.length;++m<S;){var C=o[m],A=f?f(u[C],r[C],C,u,r):t;A===t&&(A=r[C]),g?Cr(u,C,A):ha(u,C,A)}return u}function ab(r,o){return mr(r,ji(r),o)}function ob(r,o){return mr(r,Mf(r),o)}function Co(r,o){return function(u,f){var g=ve(u)?lm:Ry,m=o?o():{};return g(u,r,re(f,2),m)}}function Mn(r){return _e(function(o,u){var f=-1,g=u.length,m=g>1?u[g-1]:t,S=g>2?u[2]:t;for(m=r.length>3&&typeof m=="function"?(g--,m):t,S&&Ot(u[0],u[1],S)&&(m=g<3?t:m,g=1),o=Ue(o);++f<g;){var C=u[f];C&&r(o,C,f,m)}return o})}function wf(r,o){return function(u,f){if(u==null)return u;if(!Ft(u))return r(u,f);for(var g=u.length,m=o?g:-1,S=Ue(u);(o?m--:++m<g)&&f(S[m],m,S)!==!1;);return u}}function Tf(r){return function(o,u,f){for(var g=-1,m=Ue(o),S=f(o),C=S.length;C--;){var A=S[r?C:++g];if(u(m[A],A,m)===!1)break}return o}}function sb(r,o,u){var f=o&D,g=ba(r);function m(){var S=this&&this!==gt&&this instanceof m?g:r;return S.apply(f?u:this,arguments)}return m}function Cf(r){return function(o){o=De(o);var u=On(o)?ir(o):t,f=u?u[0]:o.charAt(0),g=u?Jr(u,1).join(""):o.slice(1);return f[r]()+g}}function Ln(r){return function(o){return ni(wd(Sd(o).replace(Jv,"")),r,"")}}function ba(r){return function(){var o=arguments;switch(o.length){case 0:return new r;case 1:return new r(o[0]);case 2:return new r(o[0],o[1]);case 3:return new r(o[0],o[1],o[2]);case 4:return new r(o[0],o[1],o[2],o[3]);case 5:return new r(o[0],o[1],o[2],o[3],o[4]);case 6:return new r(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new r(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var u=$n(r.prototype),f=r.apply(u,o);return Ze(f)?f:u}}function ib(r,o,u){var f=ba(r);function g(){for(var m=arguments.length,S=I(m),C=m,A=Nn(g);C--;)S[C]=arguments[C];var L=m<3&&S[0]!==A&&S[m-1]!==A?[]:qr(S,A);if(m-=L.length,m<u)return Pf(r,o,xo,g.placeholder,t,S,L,t,t,u-m);var N=this&&this!==gt&&this instanceof g?f:r;return Nt(N,this,S)}return g}function xf(r){return function(o,u,f){var g=Ue(o);if(!Ft(o)){var m=re(u,3);o=dt(o),u=function(C){return m(g[C],C,g)}}var S=r(o,u,f);return S>-1?g[m?o[S]:S]:t}}function Rf(r){return Rr(function(o){var u=o.length,f=u,g=Xt.prototype.thru;for(r&&o.reverse();f--;){var m=o[f];if(typeof m!="function")throw new Jt(c);if(g&&!S&&Po(m)=="wrapper")var S=new Xt([],!0)}for(f=S?f:u;++f<u;){m=o[f];var C=Po(m),A=C=="wrapper"?Ni(m):t;A&&Wi(A[0])&&A[1]==(H|M|O|Y)&&!A[4].length&&A[9]==1?S=S[Po(A[0])].apply(S,A[3]):S=m.length==1&&Wi(m)?S[C]():S.thru(m)}return function(){var L=arguments,N=L[0];if(S&&L.length==1&&ve(N))return S.plant(N).value();for(var B=0,V=u?o[B].apply(this,L):N;++B<u;)V=o[B].call(this,V);return V}})}function xo(r,o,u,f,g,m,S,C,A,L){var N=o&H,B=o&D,V=o&P,ee=o&(M|k),ae=o&te,be=V?t:ba(r);function oe(){for(var Se=arguments.length,xe=I(Se),Wt=Se;Wt--;)xe[Wt]=arguments[Wt];if(ee)var At=Nn(oe),Ut=bm(xe,At);if(f&&(xe=Ef(xe,f,g,ee)),m&&(xe=Sf(xe,m,S,ee)),Se-=Ut,ee&&Se<L){var at=qr(xe,At);return Pf(r,o,xo,oe.placeholder,u,xe,at,C,A,L-Se)}var lr=B?u:this,Dr=V?lr[r]:r;return Se=xe.length,C?xe=Rb(xe,C):ae&&Se>1&&xe.reverse(),N&&A<Se&&(xe.length=A),this&&this!==gt&&this instanceof oe&&(Dr=be||ba(Dr)),Dr.apply(lr,xe)}return oe}function Of(r,o){return function(u,f){return My(u,r,o(f),{})}}function Ro(r,o){return function(u,f){var g;if(u===t&&f===t)return o;if(u!==t&&(g=u),f!==t){if(g===t)return f;typeof u=="string"||typeof f=="string"?(u=jt(u),f=jt(f)):(u=pf(u),f=pf(f)),g=r(u,f)}return g}}function Fi(r){return Rr(function(o){return o=Ke(o,kt(re())),_e(function(u){var f=this;return r(o,function(g){return Nt(g,f,u)})})})}function Oo(r,o){o=o===t?" ":jt(o);var u=o.length;if(u<2)return u?xi(o,r):o;var f=xi(o,ho(r/An(o)));return On(o)?Jr(ir(f),0,r).join(""):f.slice(0,r)}function ub(r,o,u,f){var g=o&D,m=ba(r);function S(){for(var C=-1,A=arguments.length,L=-1,N=f.length,B=I(N+A),V=this&&this!==gt&&this instanceof S?m:r;++L<N;)B[L]=f[L];for(;A--;)B[L++]=arguments[++C];return Nt(V,g?u:this,B)}return S}function Af(r){return function(o,u,f){return f&&typeof f!="number"&&Ot(o,u,f)&&(u=f=t),o=Pr(o),u===t?(u=o,o=0):u=Pr(u),f=f===t?o<u?1:-1:Pr(f),zy(o,u,f,r)}}function Ao(r){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=tr(o),u=tr(u)),r(o,u)}}function Pf(r,o,u,f,g,m,S,C,A,L){var N=o&M,B=N?S:t,V=N?t:S,ee=N?m:t,ae=N?t:m;o|=N?O:z,o&=~(N?z:O),o&j||(o&=~(D|P));var be=[r,o,g,ee,B,ae,V,C,A,L],oe=u.apply(t,be);return Wi(r)&&Uf(oe,be),oe.placeholder=f,Hf(oe,r,o)}function $i(r){var o=ut[r];return function(u,f){if(u=tr(u),f=f==null?0:bt(me(f),292),f&&Ul(u)){var g=(De(u)+"e").split("e"),m=o(g[0]+"e"+(+g[1]+f));return g=(De(m)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return o(u)}}var cb=In&&1/no(new In([,-0]))[1]==Ge?function(r){return new In(r)}:ru;function Df(r){return function(o){var u=_t(o);return u==qe?li(o):u==xt?xm(o):ym(o,r(o))}}function xr(r,o,u,f,g,m,S,C){var A=o&P;if(!A&&typeof r!="function")throw new Jt(c);var L=f?f.length:0;if(L||(o&=~(O|z),f=g=t),S=S===t?S:ct(me(S),0),C=C===t?C:me(C),L-=g?g.length:0,o&z){var N=f,B=g;f=g=t}var V=A?t:Ni(r),ee=[r,o,u,f,g,N,B,m,S,C];if(V&&Tb(ee,V),r=ee[0],o=ee[1],u=ee[2],f=ee[3],g=ee[4],C=ee[9]=ee[9]===t?A?0:r.length:ct(ee[9]-L,0),!C&&o&(M|k)&&(o&=~(M|k)),!o||o==D)var ae=sb(r,o,u);else o==M||o==k?ae=ib(r,o,C):(o==O||o==(D|O))&&!g.length?ae=ub(r,o,u,f):ae=xo.apply(t,ee);var be=V?ff:Uf;return Hf(be(ae,ee),r,o)}function If(r,o,u,f){return r===t||cr(r,Dn[u])&&!ke.call(f,u)?o:r}function Ff(r,o,u,f,g,m){return Ze(r)&&Ze(o)&&(m.set(o,r),So(r,o,t,Ff,m),m.delete(o)),r}function lb(r){return Sa(r)?t:r}function $f(r,o,u,f,g,m){var S=u&T,C=r.length,A=o.length;if(C!=A&&!(S&&A>C))return!1;var L=m.get(r),N=m.get(o);if(L&&N)return L==o&&N==r;var B=-1,V=!0,ee=u&x?new hn:t;for(m.set(r,o),m.set(o,r);++B<C;){var ae=r[B],be=o[B];if(f)var oe=S?f(be,ae,B,o,r,m):f(ae,be,B,r,o,m);if(oe!==t){if(oe)continue;V=!1;break}if(ee){if(!ai(o,function(Se,xe){if(!ua(ee,xe)&&(ae===Se||g(ae,Se,u,f,m)))return ee.push(xe)})){V=!1;break}}else if(!(ae===be||g(ae,be,u,f,m))){V=!1;break}}return m.delete(r),m.delete(o),V}function fb(r,o,u,f,g,m,S){switch(u){case Wr:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case sn:return!(r.byteLength!=o.byteLength||!m(new co(r),new co(o)));case ue:case he:case yt:return cr(+r,+o);case K:return r.name==o.name&&r.message==o.message;case or:case an:return r==o+"";case qe:var C=li;case xt:var A=f&T;if(C||(C=no),r.size!=o.size&&!A)return!1;var L=S.get(r);if(L)return L==o;f|=x,S.set(r,o);var N=$f(C(r),C(o),f,g,m,S);return S.delete(r),N;case on:if(pa)return pa.call(r)==pa.call(o)}return!1}function db(r,o,u,f,g,m){var S=u&T,C=Mi(r),A=C.length,L=Mi(o),N=L.length;if(A!=N&&!S)return!1;for(var B=A;B--;){var V=C[B];if(!(S?V in o:ke.call(o,V)))return!1}var ee=m.get(r),ae=m.get(o);if(ee&&ae)return ee==o&&ae==r;var be=!0;m.set(r,o),m.set(o,r);for(var oe=S;++B<A;){V=C[B];var Se=r[V],xe=o[V];if(f)var Wt=S?f(xe,Se,V,o,r,m):f(Se,xe,V,r,o,m);if(!(Wt===t?Se===xe||g(Se,xe,u,f,m):Wt)){be=!1;break}oe||(oe=V=="constructor")}if(be&&!oe){var At=r.constructor,Ut=o.constructor;At!=Ut&&"constructor"in r&&"constructor"in o&&!(typeof At=="function"&&At instanceof At&&typeof Ut=="function"&&Ut instanceof Ut)&&(be=!1)}return m.delete(r),m.delete(o),be}function Rr(r){return Hi(Bf(r,t,Kf),r+"")}function Mi(r){return Ql(r,dt,ji)}function Li(r){return Ql(r,$t,Mf)}var Ni=vo?function(r){return vo.get(r)}:ru;function Po(r){for(var o=r.name+"",u=Fn[o],f=ke.call(Fn,o)?u.length:0;f--;){var g=u[f],m=g.func;if(m==null||m==r)return g.name}return o}function Nn(r){var o=ke.call(v,"placeholder")?v:r;return o.placeholder}function re(){var r=v.iteratee||eu;return r=r===eu?rf:r,arguments.length?r(arguments[0],arguments[1]):r}function Do(r,o){var u=r.__data__;return _b(o)?u[typeof o=="string"?"string":"hash"]:u.map}function ki(r){for(var o=dt(r),u=o.length;u--;){var f=o[u],g=r[f];o[u]=[f,g,kf(g)]}return o}function mn(r,o){var u=wm(r,o);return tf(u)?u:t}function pb(r){var o=ke.call(r,dn),u=r[dn];try{r[dn]=t;var f=!0}catch{}var g=io.call(r);return f&&(o?r[dn]=u:delete r[dn]),g}var ji=di?function(r){return r==null?[]:(r=Ue(r),Hr(di(r),function(o){return Bl.call(r,o)}))}:nu,Mf=di?function(r){for(var o=[];r;)Gr(o,ji(r)),r=lo(r);return o}:nu,_t=Rt;(pi&&_t(new pi(new ArrayBuffer(1)))!=Wr||la&&_t(new la)!=qe||hi&&_t(hi.resolve())!=nn||In&&_t(new In)!=xt||fa&&_t(new fa)!=Sr)&&(_t=function(r){var o=Rt(r),u=o==Yt?r.constructor:t,f=u?yn(u):"";if(f)switch(f){case Km:return Wr;case Jm:return qe;case Xm:return nn;case Zm:return xt;case Qm:return Sr}return o});function hb(r,o,u){for(var f=-1,g=u.length;++f<g;){var m=u[f],S=m.size;switch(m.type){case"drop":r+=S;break;case"dropRight":o-=S;break;case"take":o=bt(o,r+S);break;case"takeRight":r=ct(r,o-S);break}}return{start:r,end:o}}function gb(r){var o=r.match(Ne);return o?o[1].split(Ce):[]}function Lf(r,o,u){o=Kr(o,r);for(var f=-1,g=o.length,m=!1;++f<g;){var S=yr(o[f]);if(!(m=r!=null&&u(r,S)))break;r=r[S]}return m||++f!=g?m:(g=r==null?0:r.length,!!g&&ko(g)&&Or(S,g)&&(ve(r)||bn(r)))}function vb(r){var o=r.length,u=new r.constructor(o);return o&&typeof r[0]=="string"&&ke.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function Nf(r){return typeof r.constructor=="function"&&!_a(r)?$n(lo(r)):{}}function mb(r,o,u){var f=r.constructor;switch(o){case sn:return Ii(r);case ue:case he:return new f(+r);case Wr:return eb(r,u);case na:case aa:case oa:case sa:case un:case Cn:case gr:case cn:case ln:return bf(r,u);case qe:return new f;case yt:case an:return new f(r);case or:return tb(r);case xt:return new f;case on:return rb(r)}}function yb(r,o){var u=o.length;if(!u)return r;var f=u-1;return o[f]=(u>1?"& ":"")+o[f],o=o.join(u>2?", ":" "),r.replace(Le,`{
15
+ */cs.exports;(function(e,r){(function(){var t,a="4.17.21",s=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",l="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",p=500,h="__lodash_placeholder__",m=1,_=2,E=4,T=1,x=2,D=1,P=2,j=4,M=8,k=16,O=32,z=64,G=128,Y=256,te=512,Ue=30,Te="...",st=800,X=16,Pe=1,it=2,Qe=3,Ge=1/0,rt=9007199254740991,qt=17976931348623157e292,W=0/0,q=4294967295,de=q-1,le=q>>>1,se=[["ary",G],["bind",D],["bindKey",P],["curry",M],["curryRight",k],["flip",te],["partial",O],["partialRight",z],["rearg",Y]],fe="[object Arguments]",ne="[object Array]",ce="[object AsyncFunction]",ue="[object Boolean]",he="[object Date]",ge="[object DOMException]",K="[object Error]",F="[object Function]",ze="[object GeneratorFunction]",qe="[object Map]",mt="[object Number]",Ha="[object Null]",Yt="[object Object]",nn="[object Promise]",Ws="[object Proxy]",or="[object RegExp]",xt="[object Set]",an="[object String]",on="[object Symbol]",Ga="[object Undefined]",Sr="[object WeakMap]",Us="[object WeakSet]",sn="[object ArrayBuffer]",Wr="[object DataView]",na="[object Float32Array]",aa="[object Float64Array]",oa="[object Int8Array]",sa="[object Int16Array]",un="[object Int32Array]",xn="[object Uint8Array]",gr="[object Uint8ClampedArray]",cn="[object Uint16Array]",ln="[object Uint32Array]",qa=/\b__p \+= '';/g,Hs=/\b(__p \+=) '' \+/g,Ya=/(__e\(.*?\)|\b__t\)) \+\n'';/g,za=/&(?:amp|lt|gt|quot|#39);/g,ia=/[&<>"']/g,Va=RegExp(za.source),Gs=RegExp(ia.source),qs=/<%-([\s\S]+?)%>/g,Ka=/<%([\s\S]+?)%>/g,Ja=/<%=([\s\S]+?)%>/g,Ys=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zs=/^\w*$/,Vs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/[\\^$.*+?()[\]{}|]/g,U=RegExp(w.source),J=/^\s+/,ie=/\s/,Le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ne=/\{\n\/\* \[wrapped with (.+)\] \*/,Ce=/,? & /,Ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,Xe=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,Ur=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,sr=/^\[object .+?Constructor\]$/,Fv=/^0o[0-7]+$/i,$v=/^(?:0|[1-9]\d*)$/,Mv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Za=/($^)/,Lv=/['\n\r\u2028\u2029\\]/g,Qa="\\ud800-\\udfff",Nv="\\u0300-\\u036f",kv="\\ufe20-\\ufe2f",jv="\\u20d0-\\u20ff",rl=Nv+kv+jv,nl="\\u2700-\\u27bf",al="a-z\\xdf-\\xf6\\xf8-\\xff",Bv="\\xac\\xb1\\xd7\\xf7",Wv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Uv="\\u2000-\\u206f",Hv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ol="A-Z\\xc0-\\xd6\\xd8-\\xde",sl="\\ufe0e\\ufe0f",il=Bv+Wv+Uv+Hv,Ks="['’]",Gv="["+Qa+"]",ul="["+il+"]",eo="["+rl+"]",cl="\\d+",qv="["+nl+"]",ll="["+al+"]",fl="[^"+Qa+il+cl+nl+al+ol+"]",Js="\\ud83c[\\udffb-\\udfff]",Yv="(?:"+eo+"|"+Js+")",dl="[^"+Qa+"]",Xs="(?:\\ud83c[\\udde6-\\uddff]){2}",Zs="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="["+ol+"]",pl="\\u200d",hl="(?:"+ll+"|"+fl+")",zv="(?:"+Rn+"|"+fl+")",gl="(?:"+Ks+"(?:d|ll|m|re|s|t|ve))?",vl="(?:"+Ks+"(?:D|LL|M|RE|S|T|VE))?",yl=Yv+"?",ml="["+sl+"]?",Vv="(?:"+pl+"(?:"+[dl,Xs,Zs].join("|")+")"+ml+yl+")*",Kv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Jv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",bl=ml+yl+Vv,Xv="(?:"+[qv,Xs,Zs].join("|")+")"+bl,Zv="(?:"+[dl+eo+"?",eo,Xs,Zs,Gv].join("|")+")",Qv=RegExp(Ks,"g"),ey=RegExp(eo,"g"),Qs=RegExp(Js+"(?="+Js+")|"+Zv+bl,"g"),ty=RegExp([Rn+"?"+ll+"+"+gl+"(?="+[ul,Rn,"$"].join("|")+")",zv+"+"+vl+"(?="+[ul,Rn+hl,"$"].join("|")+")",Rn+"?"+hl+"+"+gl,Rn+"+"+vl,Jv,Kv,cl,Xv].join("|"),"g"),ry=RegExp("["+pl+Qa+rl+sl+"]"),ny=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ay=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oy=-1,Ve={};Ve[na]=Ve[aa]=Ve[oa]=Ve[sa]=Ve[un]=Ve[xn]=Ve[gr]=Ve[cn]=Ve[ln]=!0,Ve[fe]=Ve[ne]=Ve[sn]=Ve[ue]=Ve[Wr]=Ve[he]=Ve[K]=Ve[F]=Ve[qe]=Ve[mt]=Ve[Yt]=Ve[or]=Ve[xt]=Ve[an]=Ve[Sr]=!1;var Ye={};Ye[fe]=Ye[ne]=Ye[sn]=Ye[Wr]=Ye[ue]=Ye[he]=Ye[na]=Ye[aa]=Ye[oa]=Ye[sa]=Ye[un]=Ye[qe]=Ye[mt]=Ye[Yt]=Ye[or]=Ye[xt]=Ye[an]=Ye[on]=Ye[xn]=Ye[gr]=Ye[cn]=Ye[ln]=!0,Ye[K]=Ye[F]=Ye[Sr]=!1;var sy={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},iy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uy={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ly=parseFloat,fy=parseInt,_l=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,dy=typeof self=="object"&&self&&self.Object===Object&&self,gt=_l||dy||Function("return this")(),ei=r&&!r.nodeType&&r,fn=ei&&!0&&e&&!e.nodeType&&e,El=fn&&fn.exports===ei,ti=El&&_l.process,Vt=function(){try{var R=fn&&fn.require&&fn.require("util").types;return R||ti&&ti.binding&&ti.binding("util")}catch{}}(),Sl=Vt&&Vt.isArrayBuffer,wl=Vt&&Vt.isDate,Tl=Vt&&Vt.isMap,Cl=Vt&&Vt.isRegExp,xl=Vt&&Vt.isSet,Rl=Vt&&Vt.isTypedArray;function Nt(R,$,I){switch(I.length){case 0:return R.call($);case 1:return R.call($,I[0]);case 2:return R.call($,I[0],I[1]);case 3:return R.call($,I[0],I[1],I[2])}return R.apply($,I)}function py(R,$,I,Z){for(var pe=-1,Oe=R==null?0:R.length;++pe<Oe;){var ut=R[pe];$(Z,ut,I(ut),R)}return Z}function Kt(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z&&$(R[I],I,R)!==!1;);return R}function hy(R,$){for(var I=R==null?0:R.length;I--&&$(R[I],I,R)!==!1;);return R}function Ol(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z;)if(!$(R[I],I,R))return!1;return!0}function Hr(R,$){for(var I=-1,Z=R==null?0:R.length,pe=0,Oe=[];++I<Z;){var ut=R[I];$(ut,I,R)&&(Oe[pe++]=ut)}return Oe}function to(R,$){var I=R==null?0:R.length;return!!I&&On(R,$,0)>-1}function ri(R,$,I){for(var Z=-1,pe=R==null?0:R.length;++Z<pe;)if(I($,R[Z]))return!0;return!1}function Ke(R,$){for(var I=-1,Z=R==null?0:R.length,pe=Array(Z);++I<Z;)pe[I]=$(R[I],I,R);return pe}function Gr(R,$){for(var I=-1,Z=$.length,pe=R.length;++I<Z;)R[pe+I]=$[I];return R}function ni(R,$,I,Z){var pe=-1,Oe=R==null?0:R.length;for(Z&&Oe&&(I=R[++pe]);++pe<Oe;)I=$(I,R[pe],pe,R);return I}function gy(R,$,I,Z){var pe=R==null?0:R.length;for(Z&&pe&&(I=R[--pe]);pe--;)I=$(I,R[pe],pe,R);return I}function ai(R,$){for(var I=-1,Z=R==null?0:R.length;++I<Z;)if($(R[I],I,R))return!0;return!1}var vy=oi("length");function yy(R){return R.split("")}function my(R){return R.match(Ee)||[]}function Al(R,$,I){var Z;return I(R,function(pe,Oe,ut){if($(pe,Oe,ut))return Z=Oe,!1}),Z}function ro(R,$,I,Z){for(var pe=R.length,Oe=I+(Z?1:-1);Z?Oe--:++Oe<pe;)if($(R[Oe],Oe,R))return Oe;return-1}function On(R,$,I){return $===$?Py(R,$,I):ro(R,Pl,I)}function by(R,$,I,Z){for(var pe=I-1,Oe=R.length;++pe<Oe;)if(Z(R[pe],$))return pe;return-1}function Pl(R){return R!==R}function Dl(R,$){var I=R==null?0:R.length;return I?ii(R,$)/I:W}function oi(R){return function($){return $==null?t:$[R]}}function si(R){return function($){return R==null?t:R[$]}}function Il(R,$,I,Z,pe){return pe(R,function(Oe,ut,He){I=Z?(Z=!1,Oe):$(I,Oe,ut,He)}),I}function _y(R,$){var I=R.length;for(R.sort($);I--;)R[I]=R[I].value;return R}function ii(R,$){for(var I,Z=-1,pe=R.length;++Z<pe;){var Oe=$(R[Z]);Oe!==t&&(I=I===t?Oe:I+Oe)}return I}function ui(R,$){for(var I=-1,Z=Array(R);++I<R;)Z[I]=$(I);return Z}function Ey(R,$){return Ke($,function(I){return[I,R[I]]})}function Fl(R){return R&&R.slice(0,Nl(R)+1).replace(J,"")}function kt(R){return function($){return R($)}}function ci(R,$){return Ke($,function(I){return R[I]})}function ua(R,$){return R.has($)}function $l(R,$){for(var I=-1,Z=R.length;++I<Z&&On($,R[I],0)>-1;);return I}function Ml(R,$){for(var I=R.length;I--&&On($,R[I],0)>-1;);return I}function Sy(R,$){for(var I=R.length,Z=0;I--;)R[I]===$&&++Z;return Z}var wy=si(sy),Ty=si(iy);function Cy(R){return"\\"+cy[R]}function xy(R,$){return R==null?t:R[$]}function An(R){return ry.test(R)}function Ry(R){return ny.test(R)}function Oy(R){for(var $,I=[];!($=R.next()).done;)I.push($.value);return I}function li(R){var $=-1,I=Array(R.size);return R.forEach(function(Z,pe){I[++$]=[pe,Z]}),I}function Ll(R,$){return function(I){return R($(I))}}function qr(R,$){for(var I=-1,Z=R.length,pe=0,Oe=[];++I<Z;){var ut=R[I];(ut===$||ut===h)&&(R[I]=h,Oe[pe++]=I)}return Oe}function no(R){var $=-1,I=Array(R.size);return R.forEach(function(Z){I[++$]=Z}),I}function Ay(R){var $=-1,I=Array(R.size);return R.forEach(function(Z){I[++$]=[Z,Z]}),I}function Py(R,$,I){for(var Z=I-1,pe=R.length;++Z<pe;)if(R[Z]===$)return Z;return-1}function Dy(R,$,I){for(var Z=I+1;Z--;)if(R[Z]===$)return Z;return Z}function Pn(R){return An(R)?Fy(R):vy(R)}function ir(R){return An(R)?$y(R):yy(R)}function Nl(R){for(var $=R.length;$--&&ie.test(R.charAt($)););return $}var Iy=si(uy);function Fy(R){for(var $=Qs.lastIndex=0;Qs.test(R);)++$;return $}function $y(R){return R.match(Qs)||[]}function My(R){return R.match(ty)||[]}var Ly=function R($){$=$==null?gt:Dn.defaults(gt.Object(),$,Dn.pick(gt,ay));var I=$.Array,Z=$.Date,pe=$.Error,Oe=$.Function,ut=$.Math,He=$.Object,fi=$.RegExp,Ny=$.String,Jt=$.TypeError,ao=I.prototype,ky=Oe.prototype,In=He.prototype,oo=$["__core-js_shared__"],so=ky.toString,ke=In.hasOwnProperty,jy=0,kl=function(){var n=/[^.]+$/.exec(oo&&oo.keys&&oo.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),io=In.toString,By=so.call(He),Wy=gt._,Uy=fi("^"+so.call(ke).replace(w,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uo=El?$.Buffer:t,Yr=$.Symbol,co=$.Uint8Array,jl=uo?uo.allocUnsafe:t,lo=Ll(He.getPrototypeOf,He),Bl=He.create,Wl=In.propertyIsEnumerable,fo=ao.splice,Ul=Yr?Yr.isConcatSpreadable:t,ca=Yr?Yr.iterator:t,dn=Yr?Yr.toStringTag:t,po=function(){try{var n=yn(He,"defineProperty");return n({},"",{}),n}catch{}}(),Hy=$.clearTimeout!==gt.clearTimeout&&$.clearTimeout,Gy=Z&&Z.now!==gt.Date.now&&Z.now,qy=$.setTimeout!==gt.setTimeout&&$.setTimeout,ho=ut.ceil,go=ut.floor,di=He.getOwnPropertySymbols,Yy=uo?uo.isBuffer:t,Hl=$.isFinite,zy=ao.join,Vy=Ll(He.keys,He),ct=ut.max,bt=ut.min,Ky=Z.now,Jy=$.parseInt,Gl=ut.random,Xy=ao.reverse,pi=yn($,"DataView"),la=yn($,"Map"),hi=yn($,"Promise"),Fn=yn($,"Set"),fa=yn($,"WeakMap"),da=yn(He,"create"),vo=fa&&new fa,$n={},Zy=mn(pi),Qy=mn(la),em=mn(hi),tm=mn(Fn),rm=mn(fa),yo=Yr?Yr.prototype:t,pa=yo?yo.valueOf:t,ql=yo?yo.toString:t;function v(n){if(tt(n)&&!ve(n)&&!(n instanceof we)){if(n instanceof Xt)return n;if(ke.call(n,"__wrapped__"))return zf(n)}return new Xt(n)}var Mn=function(){function n(){}return function(o){if(!Ze(o))return{};if(Bl)return Bl(o);n.prototype=o;var u=new n;return n.prototype=t,u}}();function mo(){}function Xt(n,o){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=t}v.templateSettings={escape:qs,evaluate:Ka,interpolate:Ja,variable:"",imports:{_:v}},v.prototype=mo.prototype,v.prototype.constructor=v,Xt.prototype=Mn(mo.prototype),Xt.prototype.constructor=Xt;function we(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=q,this.__views__=[]}function nm(){var n=new we(this.__wrapped__);return n.__actions__=It(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=It(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=It(this.__views__),n}function am(){if(this.__filtered__){var n=new we(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function om(){var n=this.__wrapped__.value(),o=this.__dir__,u=ve(n),f=o<0,g=u?n.length:0,y=yb(0,g,this.__views__),S=y.start,C=y.end,A=C-S,L=f?C:S-1,N=this.__iteratees__,B=N.length,V=0,ee=bt(A,this.__takeCount__);if(!u||!f&&g==A&&ee==A)return vf(n,this.__actions__);var ae=[];e:for(;A--&&V<ee;){L+=o;for(var be=-1,oe=n[L];++be<B;){var Se=N[be],xe=Se.iteratee,Wt=Se.type,At=xe(oe);if(Wt==it)oe=At;else if(!At){if(Wt==Pe)continue e;break e}}ae[V++]=oe}return ae}we.prototype=Mn(mo.prototype),we.prototype.constructor=we;function pn(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var f=n[o];this.set(f[0],f[1])}}function sm(){this.__data__=da?da(null):{},this.size=0}function im(n){var o=this.has(n)&&delete this.__data__[n];return this.size-=o?1:0,o}function um(n){var o=this.__data__;if(da){var u=o[n];return u===d?t:u}return ke.call(o,n)?o[n]:t}function cm(n){var o=this.__data__;return da?o[n]!==t:ke.call(o,n)}function lm(n,o){var u=this.__data__;return this.size+=this.has(n)?0:1,u[n]=da&&o===t?d:o,this}pn.prototype.clear=sm,pn.prototype.delete=im,pn.prototype.get=um,pn.prototype.has=cm,pn.prototype.set=lm;function wr(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var f=n[o];this.set(f[0],f[1])}}function fm(){this.__data__=[],this.size=0}function dm(n){var o=this.__data__,u=bo(o,n);if(u<0)return!1;var f=o.length-1;return u==f?o.pop():fo.call(o,u,1),--this.size,!0}function pm(n){var o=this.__data__,u=bo(o,n);return u<0?t:o[u][1]}function hm(n){return bo(this.__data__,n)>-1}function gm(n,o){var u=this.__data__,f=bo(u,n);return f<0?(++this.size,u.push([n,o])):u[f][1]=o,this}wr.prototype.clear=fm,wr.prototype.delete=dm,wr.prototype.get=pm,wr.prototype.has=hm,wr.prototype.set=gm;function Tr(n){var o=-1,u=n==null?0:n.length;for(this.clear();++o<u;){var f=n[o];this.set(f[0],f[1])}}function vm(){this.size=0,this.__data__={hash:new pn,map:new(la||wr),string:new pn}}function ym(n){var o=Do(this,n).delete(n);return this.size-=o?1:0,o}function mm(n){return Do(this,n).get(n)}function bm(n){return Do(this,n).has(n)}function _m(n,o){var u=Do(this,n),f=u.size;return u.set(n,o),this.size+=u.size==f?0:1,this}Tr.prototype.clear=vm,Tr.prototype.delete=ym,Tr.prototype.get=mm,Tr.prototype.has=bm,Tr.prototype.set=_m;function hn(n){var o=-1,u=n==null?0:n.length;for(this.__data__=new Tr;++o<u;)this.add(n[o])}function Em(n){return this.__data__.set(n,d),this}function Sm(n){return this.__data__.has(n)}hn.prototype.add=hn.prototype.push=Em,hn.prototype.has=Sm;function ur(n){var o=this.__data__=new wr(n);this.size=o.size}function wm(){this.__data__=new wr,this.size=0}function Tm(n){var o=this.__data__,u=o.delete(n);return this.size=o.size,u}function Cm(n){return this.__data__.get(n)}function xm(n){return this.__data__.has(n)}function Rm(n,o){var u=this.__data__;if(u instanceof wr){var f=u.__data__;if(!la||f.length<s-1)return f.push([n,o]),this.size=++u.size,this;u=this.__data__=new Tr(f)}return u.set(n,o),this.size=u.size,this}ur.prototype.clear=wm,ur.prototype.delete=Tm,ur.prototype.get=Cm,ur.prototype.has=xm,ur.prototype.set=Rm;function Yl(n,o){var u=ve(n),f=!u&&bn(n),g=!u&&!f&&Xr(n),y=!u&&!f&&!g&&jn(n),S=u||f||g||y,C=S?ui(n.length,Ny):[],A=C.length;for(var L in n)(o||ke.call(n,L))&&!(S&&(L=="length"||g&&(L=="offset"||L=="parent")||y&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||Or(L,A)))&&C.push(L);return C}function zl(n){var o=n.length;return o?n[Ci(0,o-1)]:t}function Om(n,o){return Io(It(n),gn(o,0,n.length))}function Am(n){return Io(It(n))}function gi(n,o,u){(u!==t&&!cr(n[o],u)||u===t&&!(o in n))&&Cr(n,o,u)}function ha(n,o,u){var f=n[o];(!(ke.call(n,o)&&cr(f,u))||u===t&&!(o in n))&&Cr(n,o,u)}function bo(n,o){for(var u=n.length;u--;)if(cr(n[u][0],o))return u;return-1}function Pm(n,o,u,f){return zr(n,function(g,y,S){o(f,g,u(g),S)}),f}function Vl(n,o){return n&&yr(o,dt(o),n)}function Dm(n,o){return n&&yr(o,$t(o),n)}function Cr(n,o,u){o=="__proto__"&&po?po(n,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):n[o]=u}function vi(n,o){for(var u=-1,f=o.length,g=I(f),y=n==null;++u<f;)g[u]=y?t:Ji(n,o[u]);return g}function gn(n,o,u){return n===n&&(u!==t&&(n=n<=u?n:u),o!==t&&(n=n>=o?n:o)),n}function Zt(n,o,u,f,g,y){var S,C=o&m,A=o&_,L=o&E;if(u&&(S=g?u(n,f,g,y):u(n)),S!==t)return S;if(!Ze(n))return n;var N=ve(n);if(N){if(S=bb(n),!C)return It(n,S)}else{var B=_t(n),V=B==F||B==ze;if(Xr(n))return bf(n,C);if(B==Yt||B==fe||V&&!g){if(S=A||V?{}:kf(n),!C)return A?ub(n,Dm(S,n)):ib(n,Vl(S,n))}else{if(!Ye[B])return g?n:{};S=_b(n,B,C)}}y||(y=new ur);var ee=y.get(n);if(ee)return ee;y.set(n,S),pd(n)?n.forEach(function(oe){S.add(Zt(oe,o,u,oe,n,y))}):fd(n)&&n.forEach(function(oe,Se){S.set(Se,Zt(oe,o,u,Se,n,y))});var ae=L?A?Li:Mi:A?$t:dt,be=N?t:ae(n);return Kt(be||n,function(oe,Se){be&&(Se=oe,oe=n[Se]),ha(S,Se,Zt(oe,o,u,Se,n,y))}),S}function Im(n){var o=dt(n);return function(u){return Kl(u,n,o)}}function Kl(n,o,u){var f=u.length;if(n==null)return!f;for(n=He(n);f--;){var g=u[f],y=o[g],S=n[g];if(S===t&&!(g in n)||!y(S))return!1}return!0}function Jl(n,o,u){if(typeof n!="function")throw new Jt(c);return Ea(function(){n.apply(t,u)},o)}function ga(n,o,u,f){var g=-1,y=to,S=!0,C=n.length,A=[],L=o.length;if(!C)return A;u&&(o=Ke(o,kt(u))),f?(y=ri,S=!1):o.length>=s&&(y=ua,S=!1,o=new hn(o));e:for(;++g<C;){var N=n[g],B=u==null?N:u(N);if(N=f||N!==0?N:0,S&&B===B){for(var V=L;V--;)if(o[V]===B)continue e;A.push(N)}else y(o,B,f)||A.push(N)}return A}var zr=Tf(vr),Xl=Tf(mi,!0);function Fm(n,o){var u=!0;return zr(n,function(f,g,y){return u=!!o(f,g,y),u}),u}function _o(n,o,u){for(var f=-1,g=n.length;++f<g;){var y=n[f],S=o(y);if(S!=null&&(C===t?S===S&&!Bt(S):u(S,C)))var C=S,A=y}return A}function $m(n,o,u,f){var g=n.length;for(u=ye(u),u<0&&(u=-u>g?0:g+u),f=f===t||f>g?g:ye(f),f<0&&(f+=g),f=u>f?0:gd(f);u<f;)n[u++]=o;return n}function Zl(n,o){var u=[];return zr(n,function(f,g,y){o(f,g,y)&&u.push(f)}),u}function vt(n,o,u,f,g){var y=-1,S=n.length;for(u||(u=Sb),g||(g=[]);++y<S;){var C=n[y];o>0&&u(C)?o>1?vt(C,o-1,u,f,g):Gr(g,C):f||(g[g.length]=C)}return g}var yi=Cf(),Ql=Cf(!0);function vr(n,o){return n&&yi(n,o,dt)}function mi(n,o){return n&&Ql(n,o,dt)}function Eo(n,o){return Hr(o,function(u){return Ar(n[u])})}function vn(n,o){o=Kr(o,n);for(var u=0,f=o.length;n!=null&&u<f;)n=n[mr(o[u++])];return u&&u==f?n:t}function ef(n,o,u){var f=o(n);return ve(n)?f:Gr(f,u(n))}function Rt(n){return n==null?n===t?Ga:Ha:dn&&dn in He(n)?vb(n):Ab(n)}function bi(n,o){return n>o}function Mm(n,o){return n!=null&&ke.call(n,o)}function Lm(n,o){return n!=null&&o in He(n)}function Nm(n,o,u){return n>=bt(o,u)&&n<ct(o,u)}function _i(n,o,u){for(var f=u?ri:to,g=n[0].length,y=n.length,S=y,C=I(y),A=1/0,L=[];S--;){var N=n[S];S&&o&&(N=Ke(N,kt(o))),A=bt(N.length,A),C[S]=!u&&(o||g>=120&&N.length>=120)?new hn(S&&N):t}N=n[0];var B=-1,V=C[0];e:for(;++B<g&&L.length<A;){var ee=N[B],ae=o?o(ee):ee;if(ee=u||ee!==0?ee:0,!(V?ua(V,ae):f(L,ae,u))){for(S=y;--S;){var be=C[S];if(!(be?ua(be,ae):f(n[S],ae,u)))continue e}V&&V.push(ae),L.push(ee)}}return L}function km(n,o,u,f){return vr(n,function(g,y,S){o(f,u(g),y,S)}),f}function va(n,o,u){o=Kr(o,n),n=Uf(n,o);var f=n==null?n:n[mr(er(o))];return f==null?t:Nt(f,n,u)}function tf(n){return tt(n)&&Rt(n)==fe}function jm(n){return tt(n)&&Rt(n)==sn}function Bm(n){return tt(n)&&Rt(n)==he}function ya(n,o,u,f,g){return n===o?!0:n==null||o==null||!tt(n)&&!tt(o)?n!==n&&o!==o:Wm(n,o,u,f,ya,g)}function Wm(n,o,u,f,g,y){var S=ve(n),C=ve(o),A=S?ne:_t(n),L=C?ne:_t(o);A=A==fe?Yt:A,L=L==fe?Yt:L;var N=A==Yt,B=L==Yt,V=A==L;if(V&&Xr(n)){if(!Xr(o))return!1;S=!0,N=!1}if(V&&!N)return y||(y=new ur),S||jn(n)?Mf(n,o,u,f,g,y):hb(n,o,A,u,f,g,y);if(!(u&T)){var ee=N&&ke.call(n,"__wrapped__"),ae=B&&ke.call(o,"__wrapped__");if(ee||ae){var be=ee?n.value():n,oe=ae?o.value():o;return y||(y=new ur),g(be,oe,u,f,y)}}return V?(y||(y=new ur),gb(n,o,u,f,g,y)):!1}function Um(n){return tt(n)&&_t(n)==qe}function Ei(n,o,u,f){var g=u.length,y=g,S=!f;if(n==null)return!y;for(n=He(n);g--;){var C=u[g];if(S&&C[2]?C[1]!==n[C[0]]:!(C[0]in n))return!1}for(;++g<y;){C=u[g];var A=C[0],L=n[A],N=C[1];if(S&&C[2]){if(L===t&&!(A in n))return!1}else{var B=new ur;if(f)var V=f(L,N,A,n,o,B);if(!(V===t?ya(N,L,T|x,f,B):V))return!1}}return!0}function rf(n){if(!Ze(n)||Tb(n))return!1;var o=Ar(n)?Uy:sr;return o.test(mn(n))}function Hm(n){return tt(n)&&Rt(n)==or}function Gm(n){return tt(n)&&_t(n)==xt}function qm(n){return tt(n)&&ko(n.length)&&!!Ve[Rt(n)]}function nf(n){return typeof n=="function"?n:n==null?Mt:typeof n=="object"?ve(n)?sf(n[0],n[1]):of(n):xd(n)}function Si(n){if(!_a(n))return Vy(n);var o=[];for(var u in He(n))ke.call(n,u)&&u!="constructor"&&o.push(u);return o}function Ym(n){if(!Ze(n))return Ob(n);var o=_a(n),u=[];for(var f in n)f=="constructor"&&(o||!ke.call(n,f))||u.push(f);return u}function wi(n,o){return n<o}function af(n,o){var u=-1,f=Ft(n)?I(n.length):[];return zr(n,function(g,y,S){f[++u]=o(g,y,S)}),f}function of(n){var o=ki(n);return o.length==1&&o[0][2]?Bf(o[0][0],o[0][1]):function(u){return u===n||Ei(u,n,o)}}function sf(n,o){return Bi(n)&&jf(o)?Bf(mr(n),o):function(u){var f=Ji(u,n);return f===t&&f===o?Xi(u,n):ya(o,f,T|x)}}function So(n,o,u,f,g){n!==o&&yi(o,function(y,S){if(g||(g=new ur),Ze(y))zm(n,o,S,u,So,f,g);else{var C=f?f(Ui(n,S),y,S+"",n,o,g):t;C===t&&(C=y),gi(n,S,C)}},$t)}function zm(n,o,u,f,g,y,S){var C=Ui(n,u),A=Ui(o,u),L=S.get(A);if(L){gi(n,u,L);return}var N=y?y(C,A,u+"",n,o,S):t,B=N===t;if(B){var V=ve(A),ee=!V&&Xr(A),ae=!V&&!ee&&jn(A);N=A,V||ee||ae?ve(C)?N=C:nt(C)?N=It(C):ee?(B=!1,N=bf(A,!0)):ae?(B=!1,N=_f(A,!0)):N=[]:Sa(A)||bn(A)?(N=C,bn(C)?N=vd(C):(!Ze(C)||Ar(C))&&(N=kf(A))):B=!1}B&&(S.set(A,N),g(N,A,f,y,S),S.delete(A)),gi(n,u,N)}function uf(n,o){var u=n.length;if(u)return o+=o<0?u:0,Or(o,u)?n[o]:t}function cf(n,o,u){o.length?o=Ke(o,function(y){return ve(y)?function(S){return vn(S,y.length===1?y[0]:y)}:y}):o=[Mt];var f=-1;o=Ke(o,kt(re()));var g=af(n,function(y,S,C){var A=Ke(o,function(L){return L(y)});return{criteria:A,index:++f,value:y}});return _y(g,function(y,S){return sb(y,S,u)})}function Vm(n,o){return lf(n,o,function(u,f){return Xi(n,f)})}function lf(n,o,u){for(var f=-1,g=o.length,y={};++f<g;){var S=o[f],C=vn(n,S);u(C,S)&&ma(y,Kr(S,n),C)}return y}function Km(n){return function(o){return vn(o,n)}}function Ti(n,o,u,f){var g=f?by:On,y=-1,S=o.length,C=n;for(n===o&&(o=It(o)),u&&(C=Ke(n,kt(u)));++y<S;)for(var A=0,L=o[y],N=u?u(L):L;(A=g(C,N,A,f))>-1;)C!==n&&fo.call(C,A,1),fo.call(n,A,1);return n}function ff(n,o){for(var u=n?o.length:0,f=u-1;u--;){var g=o[u];if(u==f||g!==y){var y=g;Or(g)?fo.call(n,g,1):Oi(n,g)}}return n}function Ci(n,o){return n+go(Gl()*(o-n+1))}function Jm(n,o,u,f){for(var g=-1,y=ct(ho((o-n)/(u||1)),0),S=I(y);y--;)S[f?y:++g]=n,n+=u;return S}function xi(n,o){var u="";if(!n||o<1||o>rt)return u;do o%2&&(u+=n),o=go(o/2),o&&(n+=n);while(o);return u}function _e(n,o){return Hi(Wf(n,o,Mt),n+"")}function Xm(n){return zl(Bn(n))}function Zm(n,o){var u=Bn(n);return Io(u,gn(o,0,u.length))}function ma(n,o,u,f){if(!Ze(n))return n;o=Kr(o,n);for(var g=-1,y=o.length,S=y-1,C=n;C!=null&&++g<y;){var A=mr(o[g]),L=u;if(A==="__proto__"||A==="constructor"||A==="prototype")return n;if(g!=S){var N=C[A];L=f?f(N,A,C):t,L===t&&(L=Ze(N)?N:Or(o[g+1])?[]:{})}ha(C,A,L),C=C[A]}return n}var df=vo?function(n,o){return vo.set(n,o),n}:Mt,Qm=po?function(n,o){return po(n,"toString",{configurable:!0,enumerable:!1,value:Qi(o),writable:!0})}:Mt;function eb(n){return Io(Bn(n))}function Qt(n,o,u){var f=-1,g=n.length;o<0&&(o=-o>g?0:g+o),u=u>g?g:u,u<0&&(u+=g),g=o>u?0:u-o>>>0,o>>>=0;for(var y=I(g);++f<g;)y[f]=n[f+o];return y}function tb(n,o){var u;return zr(n,function(f,g,y){return u=o(f,g,y),!u}),!!u}function wo(n,o,u){var f=0,g=n==null?f:n.length;if(typeof o=="number"&&o===o&&g<=le){for(;f<g;){var y=f+g>>>1,S=n[y];S!==null&&!Bt(S)&&(u?S<=o:S<o)?f=y+1:g=y}return g}return Ri(n,o,Mt,u)}function Ri(n,o,u,f){var g=0,y=n==null?0:n.length;if(y===0)return 0;o=u(o);for(var S=o!==o,C=o===null,A=Bt(o),L=o===t;g<y;){var N=go((g+y)/2),B=u(n[N]),V=B!==t,ee=B===null,ae=B===B,be=Bt(B);if(S)var oe=f||ae;else L?oe=ae&&(f||V):C?oe=ae&&V&&(f||!ee):A?oe=ae&&V&&!ee&&(f||!be):ee||be?oe=!1:oe=f?B<=o:B<o;oe?g=N+1:y=N}return bt(y,de)}function pf(n,o){for(var u=-1,f=n.length,g=0,y=[];++u<f;){var S=n[u],C=o?o(S):S;if(!u||!cr(C,A)){var A=C;y[g++]=S===0?0:S}}return y}function hf(n){return typeof n=="number"?n:Bt(n)?W:+n}function jt(n){if(typeof n=="string")return n;if(ve(n))return Ke(n,jt)+"";if(Bt(n))return ql?ql.call(n):"";var o=n+"";return o=="0"&&1/n==-Ge?"-0":o}function Vr(n,o,u){var f=-1,g=to,y=n.length,S=!0,C=[],A=C;if(u)S=!1,g=ri;else if(y>=s){var L=o?null:db(n);if(L)return no(L);S=!1,g=ua,A=new hn}else A=o?[]:C;e:for(;++f<y;){var N=n[f],B=o?o(N):N;if(N=u||N!==0?N:0,S&&B===B){for(var V=A.length;V--;)if(A[V]===B)continue e;o&&A.push(B),C.push(N)}else g(A,B,u)||(A!==C&&A.push(B),C.push(N))}return C}function Oi(n,o){return o=Kr(o,n),n=Uf(n,o),n==null||delete n[mr(er(o))]}function gf(n,o,u,f){return ma(n,o,u(vn(n,o)),f)}function To(n,o,u,f){for(var g=n.length,y=f?g:-1;(f?y--:++y<g)&&o(n[y],y,n););return u?Qt(n,f?0:y,f?y+1:g):Qt(n,f?y+1:0,f?g:y)}function vf(n,o){var u=n;return u instanceof we&&(u=u.value()),ni(o,function(f,g){return g.func.apply(g.thisArg,Gr([f],g.args))},u)}function Ai(n,o,u){var f=n.length;if(f<2)return f?Vr(n[0]):[];for(var g=-1,y=I(f);++g<f;)for(var S=n[g],C=-1;++C<f;)C!=g&&(y[g]=ga(y[g]||S,n[C],o,u));return Vr(vt(y,1),o,u)}function yf(n,o,u){for(var f=-1,g=n.length,y=o.length,S={};++f<g;){var C=f<y?o[f]:t;u(S,n[f],C)}return S}function Pi(n){return nt(n)?n:[]}function Di(n){return typeof n=="function"?n:Mt}function Kr(n,o){return ve(n)?n:Bi(n,o)?[n]:Yf(De(n))}var rb=_e;function Jr(n,o,u){var f=n.length;return u=u===t?f:u,!o&&u>=f?n:Qt(n,o,u)}var mf=Hy||function(n){return gt.clearTimeout(n)};function bf(n,o){if(o)return n.slice();var u=n.length,f=jl?jl(u):new n.constructor(u);return n.copy(f),f}function Ii(n){var o=new n.constructor(n.byteLength);return new co(o).set(new co(n)),o}function nb(n,o){var u=o?Ii(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.byteLength)}function ab(n){var o=new n.constructor(n.source,zt.exec(n));return o.lastIndex=n.lastIndex,o}function ob(n){return pa?He(pa.call(n)):{}}function _f(n,o){var u=o?Ii(n.buffer):n.buffer;return new n.constructor(u,n.byteOffset,n.length)}function Ef(n,o){if(n!==o){var u=n!==t,f=n===null,g=n===n,y=Bt(n),S=o!==t,C=o===null,A=o===o,L=Bt(o);if(!C&&!L&&!y&&n>o||y&&S&&A&&!C&&!L||f&&S&&A||!u&&A||!g)return 1;if(!f&&!y&&!L&&n<o||L&&u&&g&&!f&&!y||C&&u&&g||!S&&g||!A)return-1}return 0}function sb(n,o,u){for(var f=-1,g=n.criteria,y=o.criteria,S=g.length,C=u.length;++f<S;){var A=Ef(g[f],y[f]);if(A){if(f>=C)return A;var L=u[f];return A*(L=="desc"?-1:1)}}return n.index-o.index}function Sf(n,o,u,f){for(var g=-1,y=n.length,S=u.length,C=-1,A=o.length,L=ct(y-S,0),N=I(A+L),B=!f;++C<A;)N[C]=o[C];for(;++g<S;)(B||g<y)&&(N[u[g]]=n[g]);for(;L--;)N[C++]=n[g++];return N}function wf(n,o,u,f){for(var g=-1,y=n.length,S=-1,C=u.length,A=-1,L=o.length,N=ct(y-C,0),B=I(N+L),V=!f;++g<N;)B[g]=n[g];for(var ee=g;++A<L;)B[ee+A]=o[A];for(;++S<C;)(V||g<y)&&(B[ee+u[S]]=n[g++]);return B}function It(n,o){var u=-1,f=n.length;for(o||(o=I(f));++u<f;)o[u]=n[u];return o}function yr(n,o,u,f){var g=!u;u||(u={});for(var y=-1,S=o.length;++y<S;){var C=o[y],A=f?f(u[C],n[C],C,u,n):t;A===t&&(A=n[C]),g?Cr(u,C,A):ha(u,C,A)}return u}function ib(n,o){return yr(n,ji(n),o)}function ub(n,o){return yr(n,Lf(n),o)}function Co(n,o){return function(u,f){var g=ve(u)?py:Pm,y=o?o():{};return g(u,n,re(f,2),y)}}function Ln(n){return _e(function(o,u){var f=-1,g=u.length,y=g>1?u[g-1]:t,S=g>2?u[2]:t;for(y=n.length>3&&typeof y=="function"?(g--,y):t,S&&Ot(u[0],u[1],S)&&(y=g<3?t:y,g=1),o=He(o);++f<g;){var C=u[f];C&&n(o,C,f,y)}return o})}function Tf(n,o){return function(u,f){if(u==null)return u;if(!Ft(u))return n(u,f);for(var g=u.length,y=o?g:-1,S=He(u);(o?y--:++y<g)&&f(S[y],y,S)!==!1;);return u}}function Cf(n){return function(o,u,f){for(var g=-1,y=He(o),S=f(o),C=S.length;C--;){var A=S[n?C:++g];if(u(y[A],A,y)===!1)break}return o}}function cb(n,o,u){var f=o&D,g=ba(n);function y(){var S=this&&this!==gt&&this instanceof y?g:n;return S.apply(f?u:this,arguments)}return y}function xf(n){return function(o){o=De(o);var u=An(o)?ir(o):t,f=u?u[0]:o.charAt(0),g=u?Jr(u,1).join(""):o.slice(1);return f[n]()+g}}function Nn(n){return function(o){return ni(Td(wd(o).replace(Qv,"")),n,"")}}function ba(n){return function(){var o=arguments;switch(o.length){case 0:return new n;case 1:return new n(o[0]);case 2:return new n(o[0],o[1]);case 3:return new n(o[0],o[1],o[2]);case 4:return new n(o[0],o[1],o[2],o[3]);case 5:return new n(o[0],o[1],o[2],o[3],o[4]);case 6:return new n(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new n(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var u=Mn(n.prototype),f=n.apply(u,o);return Ze(f)?f:u}}function lb(n,o,u){var f=ba(n);function g(){for(var y=arguments.length,S=I(y),C=y,A=kn(g);C--;)S[C]=arguments[C];var L=y<3&&S[0]!==A&&S[y-1]!==A?[]:qr(S,A);if(y-=L.length,y<u)return Df(n,o,xo,g.placeholder,t,S,L,t,t,u-y);var N=this&&this!==gt&&this instanceof g?f:n;return Nt(N,this,S)}return g}function Rf(n){return function(o,u,f){var g=He(o);if(!Ft(o)){var y=re(u,3);o=dt(o),u=function(C){return y(g[C],C,g)}}var S=n(o,u,f);return S>-1?g[y?o[S]:S]:t}}function Of(n){return Rr(function(o){var u=o.length,f=u,g=Xt.prototype.thru;for(n&&o.reverse();f--;){var y=o[f];if(typeof y!="function")throw new Jt(c);if(g&&!S&&Po(y)=="wrapper")var S=new Xt([],!0)}for(f=S?f:u;++f<u;){y=o[f];var C=Po(y),A=C=="wrapper"?Ni(y):t;A&&Wi(A[0])&&A[1]==(G|M|O|Y)&&!A[4].length&&A[9]==1?S=S[Po(A[0])].apply(S,A[3]):S=y.length==1&&Wi(y)?S[C]():S.thru(y)}return function(){var L=arguments,N=L[0];if(S&&L.length==1&&ve(N))return S.plant(N).value();for(var B=0,V=u?o[B].apply(this,L):N;++B<u;)V=o[B].call(this,V);return V}})}function xo(n,o,u,f,g,y,S,C,A,L){var N=o&G,B=o&D,V=o&P,ee=o&(M|k),ae=o&te,be=V?t:ba(n);function oe(){for(var Se=arguments.length,xe=I(Se),Wt=Se;Wt--;)xe[Wt]=arguments[Wt];if(ee)var At=kn(oe),Ut=Sy(xe,At);if(f&&(xe=Sf(xe,f,g,ee)),y&&(xe=wf(xe,y,S,ee)),Se-=Ut,ee&&Se<L){var at=qr(xe,At);return Df(n,o,xo,oe.placeholder,u,xe,at,C,A,L-Se)}var lr=B?u:this,Dr=V?lr[n]:n;return Se=xe.length,C?xe=Pb(xe,C):ae&&Se>1&&xe.reverse(),N&&A<Se&&(xe.length=A),this&&this!==gt&&this instanceof oe&&(Dr=be||ba(Dr)),Dr.apply(lr,xe)}return oe}function Af(n,o){return function(u,f){return km(u,n,o(f),{})}}function Ro(n,o){return function(u,f){var g;if(u===t&&f===t)return o;if(u!==t&&(g=u),f!==t){if(g===t)return f;typeof u=="string"||typeof f=="string"?(u=jt(u),f=jt(f)):(u=hf(u),f=hf(f)),g=n(u,f)}return g}}function Fi(n){return Rr(function(o){return o=Ke(o,kt(re())),_e(function(u){var f=this;return n(o,function(g){return Nt(g,f,u)})})})}function Oo(n,o){o=o===t?" ":jt(o);var u=o.length;if(u<2)return u?xi(o,n):o;var f=xi(o,ho(n/Pn(o)));return An(o)?Jr(ir(f),0,n).join(""):f.slice(0,n)}function fb(n,o,u,f){var g=o&D,y=ba(n);function S(){for(var C=-1,A=arguments.length,L=-1,N=f.length,B=I(N+A),V=this&&this!==gt&&this instanceof S?y:n;++L<N;)B[L]=f[L];for(;A--;)B[L++]=arguments[++C];return Nt(V,g?u:this,B)}return S}function Pf(n){return function(o,u,f){return f&&typeof f!="number"&&Ot(o,u,f)&&(u=f=t),o=Pr(o),u===t?(u=o,o=0):u=Pr(u),f=f===t?o<u?1:-1:Pr(f),Jm(o,u,f,n)}}function Ao(n){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=tr(o),u=tr(u)),n(o,u)}}function Df(n,o,u,f,g,y,S,C,A,L){var N=o&M,B=N?S:t,V=N?t:S,ee=N?y:t,ae=N?t:y;o|=N?O:z,o&=~(N?z:O),o&j||(o&=~(D|P));var be=[n,o,g,ee,B,ae,V,C,A,L],oe=u.apply(t,be);return Wi(n)&&Hf(oe,be),oe.placeholder=f,Gf(oe,n,o)}function $i(n){var o=ut[n];return function(u,f){if(u=tr(u),f=f==null?0:bt(ye(f),292),f&&Hl(u)){var g=(De(u)+"e").split("e"),y=o(g[0]+"e"+(+g[1]+f));return g=(De(y)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return o(u)}}var db=Fn&&1/no(new Fn([,-0]))[1]==Ge?function(n){return new Fn(n)}:ru;function If(n){return function(o){var u=_t(o);return u==qe?li(o):u==xt?Ay(o):Ey(o,n(o))}}function xr(n,o,u,f,g,y,S,C){var A=o&P;if(!A&&typeof n!="function")throw new Jt(c);var L=f?f.length:0;if(L||(o&=~(O|z),f=g=t),S=S===t?S:ct(ye(S),0),C=C===t?C:ye(C),L-=g?g.length:0,o&z){var N=f,B=g;f=g=t}var V=A?t:Ni(n),ee=[n,o,u,f,g,N,B,y,S,C];if(V&&Rb(ee,V),n=ee[0],o=ee[1],u=ee[2],f=ee[3],g=ee[4],C=ee[9]=ee[9]===t?A?0:n.length:ct(ee[9]-L,0),!C&&o&(M|k)&&(o&=~(M|k)),!o||o==D)var ae=cb(n,o,u);else o==M||o==k?ae=lb(n,o,C):(o==O||o==(D|O))&&!g.length?ae=fb(n,o,u,f):ae=xo.apply(t,ee);var be=V?df:Hf;return Gf(be(ae,ee),n,o)}function Ff(n,o,u,f){return n===t||cr(n,In[u])&&!ke.call(f,u)?o:n}function $f(n,o,u,f,g,y){return Ze(n)&&Ze(o)&&(y.set(o,n),So(n,o,t,$f,y),y.delete(o)),n}function pb(n){return Sa(n)?t:n}function Mf(n,o,u,f,g,y){var S=u&T,C=n.length,A=o.length;if(C!=A&&!(S&&A>C))return!1;var L=y.get(n),N=y.get(o);if(L&&N)return L==o&&N==n;var B=-1,V=!0,ee=u&x?new hn:t;for(y.set(n,o),y.set(o,n);++B<C;){var ae=n[B],be=o[B];if(f)var oe=S?f(be,ae,B,o,n,y):f(ae,be,B,n,o,y);if(oe!==t){if(oe)continue;V=!1;break}if(ee){if(!ai(o,function(Se,xe){if(!ua(ee,xe)&&(ae===Se||g(ae,Se,u,f,y)))return ee.push(xe)})){V=!1;break}}else if(!(ae===be||g(ae,be,u,f,y))){V=!1;break}}return y.delete(n),y.delete(o),V}function hb(n,o,u,f,g,y,S){switch(u){case Wr:if(n.byteLength!=o.byteLength||n.byteOffset!=o.byteOffset)return!1;n=n.buffer,o=o.buffer;case sn:return!(n.byteLength!=o.byteLength||!y(new co(n),new co(o)));case ue:case he:case mt:return cr(+n,+o);case K:return n.name==o.name&&n.message==o.message;case or:case an:return n==o+"";case qe:var C=li;case xt:var A=f&T;if(C||(C=no),n.size!=o.size&&!A)return!1;var L=S.get(n);if(L)return L==o;f|=x,S.set(n,o);var N=Mf(C(n),C(o),f,g,y,S);return S.delete(n),N;case on:if(pa)return pa.call(n)==pa.call(o)}return!1}function gb(n,o,u,f,g,y){var S=u&T,C=Mi(n),A=C.length,L=Mi(o),N=L.length;if(A!=N&&!S)return!1;for(var B=A;B--;){var V=C[B];if(!(S?V in o:ke.call(o,V)))return!1}var ee=y.get(n),ae=y.get(o);if(ee&&ae)return ee==o&&ae==n;var be=!0;y.set(n,o),y.set(o,n);for(var oe=S;++B<A;){V=C[B];var Se=n[V],xe=o[V];if(f)var Wt=S?f(xe,Se,V,o,n,y):f(Se,xe,V,n,o,y);if(!(Wt===t?Se===xe||g(Se,xe,u,f,y):Wt)){be=!1;break}oe||(oe=V=="constructor")}if(be&&!oe){var At=n.constructor,Ut=o.constructor;At!=Ut&&"constructor"in n&&"constructor"in o&&!(typeof At=="function"&&At instanceof At&&typeof Ut=="function"&&Ut instanceof Ut)&&(be=!1)}return y.delete(n),y.delete(o),be}function Rr(n){return Hi(Wf(n,t,Jf),n+"")}function Mi(n){return ef(n,dt,ji)}function Li(n){return ef(n,$t,Lf)}var Ni=vo?function(n){return vo.get(n)}:ru;function Po(n){for(var o=n.name+"",u=$n[o],f=ke.call($n,o)?u.length:0;f--;){var g=u[f],y=g.func;if(y==null||y==n)return g.name}return o}function kn(n){var o=ke.call(v,"placeholder")?v:n;return o.placeholder}function re(){var n=v.iteratee||eu;return n=n===eu?nf:n,arguments.length?n(arguments[0],arguments[1]):n}function Do(n,o){var u=n.__data__;return wb(o)?u[typeof o=="string"?"string":"hash"]:u.map}function ki(n){for(var o=dt(n),u=o.length;u--;){var f=o[u],g=n[f];o[u]=[f,g,jf(g)]}return o}function yn(n,o){var u=xy(n,o);return rf(u)?u:t}function vb(n){var o=ke.call(n,dn),u=n[dn];try{n[dn]=t;var f=!0}catch{}var g=io.call(n);return f&&(o?n[dn]=u:delete n[dn]),g}var ji=di?function(n){return n==null?[]:(n=He(n),Hr(di(n),function(o){return Wl.call(n,o)}))}:nu,Lf=di?function(n){for(var o=[];n;)Gr(o,ji(n)),n=lo(n);return o}:nu,_t=Rt;(pi&&_t(new pi(new ArrayBuffer(1)))!=Wr||la&&_t(new la)!=qe||hi&&_t(hi.resolve())!=nn||Fn&&_t(new Fn)!=xt||fa&&_t(new fa)!=Sr)&&(_t=function(n){var o=Rt(n),u=o==Yt?n.constructor:t,f=u?mn(u):"";if(f)switch(f){case Zy:return Wr;case Qy:return qe;case em:return nn;case tm:return xt;case rm:return Sr}return o});function yb(n,o,u){for(var f=-1,g=u.length;++f<g;){var y=u[f],S=y.size;switch(y.type){case"drop":n+=S;break;case"dropRight":o-=S;break;case"take":o=bt(o,n+S);break;case"takeRight":n=ct(n,o-S);break}}return{start:n,end:o}}function mb(n){var o=n.match(Ne);return o?o[1].split(Ce):[]}function Nf(n,o,u){o=Kr(o,n);for(var f=-1,g=o.length,y=!1;++f<g;){var S=mr(o[f]);if(!(y=n!=null&&u(n,S)))break;n=n[S]}return y||++f!=g?y:(g=n==null?0:n.length,!!g&&ko(g)&&Or(S,g)&&(ve(n)||bn(n)))}function bb(n){var o=n.length,u=new n.constructor(o);return o&&typeof n[0]=="string"&&ke.call(n,"index")&&(u.index=n.index,u.input=n.input),u}function kf(n){return typeof n.constructor=="function"&&!_a(n)?Mn(lo(n)):{}}function _b(n,o,u){var f=n.constructor;switch(o){case sn:return Ii(n);case ue:case he:return new f(+n);case Wr:return nb(n,u);case na:case aa:case oa:case sa:case un:case xn:case gr:case cn:case ln:return _f(n,u);case qe:return new f;case mt:case an:return new f(n);case or:return ab(n);case xt:return new f;case on:return ob(n)}}function Eb(n,o){var u=o.length;if(!u)return n;var f=u-1;return o[f]=(u>1?"& ":"")+o[f],o=o.join(u>2?", ":" "),n.replace(Le,`{
16
16
  /* [wrapped with `+o+`] */
17
- `)}function bb(r){return ve(r)||bn(r)||!!(Wl&&r&&r[Wl])}function Or(r,o){var u=typeof r;return o=o??rt,!!o&&(u=="number"||u!="symbol"&&Dv.test(r))&&r>-1&&r%1==0&&r<o}function Ot(r,o,u){if(!Ze(u))return!1;var f=typeof o;return(f=="number"?Ft(u)&&Or(o,u.length):f=="string"&&o in u)?cr(u[o],r):!1}function Bi(r,o){if(ve(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||Bt(r)?!0:zs.test(r)||!Ys.test(r)||o!=null&&r in Ue(o)}function _b(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function Wi(r){var o=Po(r),u=v[o];if(typeof u!="function"||!(o in we.prototype))return!1;if(r===u)return!0;var f=Ni(u);return!!f&&r===f[0]}function Eb(r){return!!Nl&&Nl in r}var Sb=oo?Ar:au;function _a(r){var o=r&&r.constructor,u=typeof o=="function"&&o.prototype||Dn;return r===u}function kf(r){return r===r&&!Ze(r)}function jf(r,o){return function(u){return u==null?!1:u[r]===o&&(o!==t||r in Ue(u))}}function wb(r){var o=Lo(r,function(f){return u.size===p&&u.clear(),f}),u=o.cache;return o}function Tb(r,o){var u=r[1],f=o[1],g=u|f,m=g<(D|P|H),S=f==H&&u==M||f==H&&u==Y&&r[7].length<=o[8]||f==(H|Y)&&o[7].length<=o[8]&&u==M;if(!(m||S))return r;f&D&&(r[2]=o[2],g|=u&D?0:j);var C=o[3];if(C){var A=r[3];r[3]=A?Ef(A,C,o[4]):C,r[4]=A?qr(r[3],h):o[4]}return C=o[5],C&&(A=r[5],r[5]=A?Sf(A,C,o[6]):C,r[6]=A?qr(r[5],h):o[6]),C=o[7],C&&(r[7]=C),f&H&&(r[8]=r[8]==null?o[8]:bt(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=g,r}function Cb(r){var o=[];if(r!=null)for(var u in Ue(r))o.push(u);return o}function xb(r){return io.call(r)}function Bf(r,o,u){return o=ct(o===t?r.length-1:o,0),function(){for(var f=arguments,g=-1,m=ct(f.length-o,0),S=I(m);++g<m;)S[g]=f[o+g];g=-1;for(var C=I(o+1);++g<o;)C[g]=f[g];return C[o]=u(S),Nt(r,this,C)}}function Wf(r,o){return o.length<2?r:vn(r,Qt(o,0,-1))}function Rb(r,o){for(var u=r.length,f=bt(o.length,u),g=It(r);f--;){var m=o[f];r[f]=Or(m,u)?g[m]:t}return r}function Ui(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var Uf=Gf(ff),Ea=Um||function(r,o){return gt.setTimeout(r,o)},Hi=Gf(Jy);function Hf(r,o,u){var f=o+"";return Hi(r,yb(f,Ob(gb(f),u)))}function Gf(r){var o=0,u=0;return function(){var f=Ym(),g=X-(f-u);if(u=f,g>0){if(++o>=st)return arguments[0]}else o=0;return r.apply(t,arguments)}}function Io(r,o){var u=-1,f=r.length,g=f-1;for(o=o===t?f:o;++u<o;){var m=Ci(u,g),S=r[m];r[m]=r[u],r[u]=S}return r.length=o,r}var qf=wb(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(Vs,function(u,f,g,m){o.push(g?m.replace(Xe,"$1"):f||u)}),o});function yr(r){if(typeof r=="string"||Bt(r))return r;var o=r+"";return o=="0"&&1/r==-Ge?"-0":o}function yn(r){if(r!=null){try{return so.call(r)}catch{}try{return r+""}catch{}}return""}function Ob(r,o){return Kt(se,function(u){var f="_."+u[0];o&u[1]&&!to(r,f)&&r.push(f)}),r.sort()}function Yf(r){if(r instanceof we)return r.clone();var o=new Xt(r.__wrapped__,r.__chain__);return o.__actions__=It(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function Ab(r,o,u){(u?Ot(r,o,u):o===t)?o=1:o=ct(me(o),0);var f=r==null?0:r.length;if(!f||o<1)return[];for(var g=0,m=0,S=I(ho(f/o));g<f;)S[m++]=Qt(r,g,g+=o);return S}function Pb(r){for(var o=-1,u=r==null?0:r.length,f=0,g=[];++o<u;){var m=r[o];m&&(g[f++]=m)}return g}function Db(){var r=arguments.length;if(!r)return[];for(var o=I(r-1),u=arguments[0],f=r;f--;)o[f-1]=arguments[f];return Gr(ve(u)?It(u):[u],vt(o,1))}var Ib=_e(function(r,o){return nt(r)?ga(r,vt(o,1,nt,!0)):[]}),Fb=_e(function(r,o){var u=er(o);return nt(u)&&(u=t),nt(r)?ga(r,vt(o,1,nt,!0),re(u,2)):[]}),$b=_e(function(r,o){var u=er(o);return nt(u)&&(u=t),nt(r)?ga(r,vt(o,1,nt,!0),t,u):[]});function Mb(r,o,u){var f=r==null?0:r.length;return f?(o=u||o===t?1:me(o),Qt(r,o<0?0:o,f)):[]}function Lb(r,o,u){var f=r==null?0:r.length;return f?(o=u||o===t?1:me(o),o=f-o,Qt(r,0,o<0?0:o)):[]}function Nb(r,o){return r&&r.length?To(r,re(o,3),!0,!0):[]}function kb(r,o){return r&&r.length?To(r,re(o,3),!0):[]}function jb(r,o,u,f){var g=r==null?0:r.length;return g?(u&&typeof u!="number"&&Ot(r,o,u)&&(u=0,f=g),Dy(r,o,u,f)):[]}function zf(r,o,u){var f=r==null?0:r.length;if(!f)return-1;var g=u==null?0:me(u);return g<0&&(g=ct(f+g,0)),ro(r,re(o,3),g)}function Vf(r,o,u){var f=r==null?0:r.length;if(!f)return-1;var g=f-1;return u!==t&&(g=me(u),g=u<0?ct(f+g,0):bt(g,f-1)),ro(r,re(o,3),g,!0)}function Kf(r){var o=r==null?0:r.length;return o?vt(r,1):[]}function Bb(r){var o=r==null?0:r.length;return o?vt(r,Ge):[]}function Wb(r,o){var u=r==null?0:r.length;return u?(o=o===t?1:me(o),vt(r,o)):[]}function Ub(r){for(var o=-1,u=r==null?0:r.length,f={};++o<u;){var g=r[o];f[g[0]]=g[1]}return f}function Jf(r){return r&&r.length?r[0]:t}function Hb(r,o,u){var f=r==null?0:r.length;if(!f)return-1;var g=u==null?0:me(u);return g<0&&(g=ct(f+g,0)),Rn(r,o,g)}function Gb(r){var o=r==null?0:r.length;return o?Qt(r,0,-1):[]}var qb=_e(function(r){var o=Ke(r,Pi);return o.length&&o[0]===r[0]?_i(o):[]}),Yb=_e(function(r){var o=er(r),u=Ke(r,Pi);return o===er(u)?o=t:u.pop(),u.length&&u[0]===r[0]?_i(u,re(o,2)):[]}),zb=_e(function(r){var o=er(r),u=Ke(r,Pi);return o=typeof o=="function"?o:t,o&&u.pop(),u.length&&u[0]===r[0]?_i(u,t,o):[]});function Vb(r,o){return r==null?"":Gm.call(r,o)}function er(r){var o=r==null?0:r.length;return o?r[o-1]:t}function Kb(r,o,u){var f=r==null?0:r.length;if(!f)return-1;var g=f;return u!==t&&(g=me(u),g=g<0?ct(f+g,0):bt(g,f-1)),o===o?Om(r,o,g):ro(r,Al,g,!0)}function Jb(r,o){return r&&r.length?sf(r,me(o)):t}var Xb=_e(Xf);function Xf(r,o){return r&&r.length&&o&&o.length?Ti(r,o):r}function Zb(r,o,u){return r&&r.length&&o&&o.length?Ti(r,o,re(u,2)):r}function Qb(r,o,u){return r&&r.length&&o&&o.length?Ti(r,o,t,u):r}var e0=Rr(function(r,o){var u=r==null?0:r.length,f=vi(r,o);return lf(r,Ke(o,function(g){return Or(g,u)?+g:g}).sort(_f)),f});function t0(r,o){var u=[];if(!(r&&r.length))return u;var f=-1,g=[],m=r.length;for(o=re(o,3);++f<m;){var S=r[f];o(S,f,r)&&(u.push(S),g.push(f))}return lf(r,g),u}function Gi(r){return r==null?r:Vm.call(r)}function r0(r,o,u){var f=r==null?0:r.length;return f?(u&&typeof u!="number"&&Ot(r,o,u)?(o=0,u=f):(o=o==null?0:me(o),u=u===t?f:me(u)),Qt(r,o,u)):[]}function n0(r,o){return wo(r,o)}function a0(r,o,u){return Ri(r,o,re(u,2))}function o0(r,o){var u=r==null?0:r.length;if(u){var f=wo(r,o);if(f<u&&cr(r[f],o))return f}return-1}function s0(r,o){return wo(r,o,!0)}function i0(r,o,u){return Ri(r,o,re(u,2),!0)}function u0(r,o){var u=r==null?0:r.length;if(u){var f=wo(r,o,!0)-1;if(cr(r[f],o))return f}return-1}function c0(r){return r&&r.length?df(r):[]}function l0(r,o){return r&&r.length?df(r,re(o,2)):[]}function f0(r){var o=r==null?0:r.length;return o?Qt(r,1,o):[]}function d0(r,o,u){return r&&r.length?(o=u||o===t?1:me(o),Qt(r,0,o<0?0:o)):[]}function p0(r,o,u){var f=r==null?0:r.length;return f?(o=u||o===t?1:me(o),o=f-o,Qt(r,o<0?0:o,f)):[]}function h0(r,o){return r&&r.length?To(r,re(o,3),!1,!0):[]}function g0(r,o){return r&&r.length?To(r,re(o,3)):[]}var v0=_e(function(r){return Vr(vt(r,1,nt,!0))}),m0=_e(function(r){var o=er(r);return nt(o)&&(o=t),Vr(vt(r,1,nt,!0),re(o,2))}),y0=_e(function(r){var o=er(r);return o=typeof o=="function"?o:t,Vr(vt(r,1,nt,!0),t,o)});function b0(r){return r&&r.length?Vr(r):[]}function _0(r,o){return r&&r.length?Vr(r,re(o,2)):[]}function E0(r,o){return o=typeof o=="function"?o:t,r&&r.length?Vr(r,t,o):[]}function qi(r){if(!(r&&r.length))return[];var o=0;return r=Hr(r,function(u){if(nt(u))return o=ct(u.length,o),!0}),ui(o,function(u){return Ke(r,oi(u))})}function Zf(r,o){if(!(r&&r.length))return[];var u=qi(r);return o==null?u:Ke(u,function(f){return Nt(o,t,f)})}var S0=_e(function(r,o){return nt(r)?ga(r,o):[]}),w0=_e(function(r){return Ai(Hr(r,nt))}),T0=_e(function(r){var o=er(r);return nt(o)&&(o=t),Ai(Hr(r,nt),re(o,2))}),C0=_e(function(r){var o=er(r);return o=typeof o=="function"?o:t,Ai(Hr(r,nt),t,o)}),x0=_e(qi);function R0(r,o){return vf(r||[],o||[],ha)}function O0(r,o){return vf(r||[],o||[],ya)}var A0=_e(function(r){var o=r.length,u=o>1?r[o-1]:t;return u=typeof u=="function"?(r.pop(),u):t,Zf(r,u)});function Qf(r){var o=v(r);return o.__chain__=!0,o}function P0(r,o){return o(r),r}function Fo(r,o){return o(r)}var D0=Rr(function(r){var o=r.length,u=o?r[0]:0,f=this.__wrapped__,g=function(m){return vi(m,r)};return o>1||this.__actions__.length||!(f instanceof we)||!Or(u)?this.thru(g):(f=f.slice(u,+u+(o?1:0)),f.__actions__.push({func:Fo,args:[g],thisArg:t}),new Xt(f,this.__chain__).thru(function(m){return o&&!m.length&&m.push(t),m}))});function I0(){return Qf(this)}function F0(){return new Xt(this.value(),this.__chain__)}function $0(){this.__values__===t&&(this.__values__=pd(this.value()));var r=this.__index__>=this.__values__.length,o=r?t:this.__values__[this.__index__++];return{done:r,value:o}}function M0(){return this}function L0(r){for(var o,u=this;u instanceof yo;){var f=Yf(u);f.__index__=0,f.__values__=t,o?g.__wrapped__=f:o=f;var g=f;u=u.__wrapped__}return g.__wrapped__=r,o}function N0(){var r=this.__wrapped__;if(r instanceof we){var o=r;return this.__actions__.length&&(o=new we(this)),o=o.reverse(),o.__actions__.push({func:Fo,args:[Gi],thisArg:t}),new Xt(o,this.__chain__)}return this.thru(Gi)}function k0(){return gf(this.__wrapped__,this.__actions__)}var j0=Co(function(r,o,u){ke.call(r,u)?++r[u]:Cr(r,u,1)});function B0(r,o,u){var f=ve(r)?Rl:Py;return u&&Ot(r,o,u)&&(o=t),f(r,re(o,3))}function W0(r,o){var u=ve(r)?Hr:Xl;return u(r,re(o,3))}var U0=xf(zf),H0=xf(Vf);function G0(r,o){return vt($o(r,o),1)}function q0(r,o){return vt($o(r,o),Ge)}function Y0(r,o,u){return u=u===t?1:me(u),vt($o(r,o),u)}function ed(r,o){var u=ve(r)?Kt:zr;return u(r,re(o,3))}function td(r,o){var u=ve(r)?fm:Jl;return u(r,re(o,3))}var z0=Co(function(r,o,u){ke.call(r,u)?r[u].push(o):Cr(r,u,[o])});function V0(r,o,u,f){r=Ft(r)?r:jn(r),u=u&&!f?me(u):0;var g=r.length;return u<0&&(u=ct(g+u,0)),jo(r)?u<=g&&r.indexOf(o,u)>-1:!!g&&Rn(r,o,u)>-1}var K0=_e(function(r,o,u){var f=-1,g=typeof o=="function",m=Ft(r)?I(r.length):[];return zr(r,function(S){m[++f]=g?Nt(o,S,u):va(S,o,u)}),m}),J0=Co(function(r,o,u){Cr(r,u,o)});function $o(r,o){var u=ve(r)?Ke:nf;return u(r,re(o,3))}function X0(r,o,u,f){return r==null?[]:(ve(o)||(o=o==null?[]:[o]),u=f?t:u,ve(u)||(u=u==null?[]:[u]),uf(r,o,u))}var Z0=Co(function(r,o,u){r[u?0:1].push(o)},function(){return[[],[]]});function Q0(r,o,u){var f=ve(r)?ni:Dl,g=arguments.length<3;return f(r,re(o,4),u,g,zr)}function e_(r,o,u){var f=ve(r)?dm:Dl,g=arguments.length<3;return f(r,re(o,4),u,g,Jl)}function t_(r,o){var u=ve(r)?Hr:Xl;return u(r,No(re(o,3)))}function r_(r){var o=ve(r)?Yl:Vy;return o(r)}function n_(r,o,u){(u?Ot(r,o,u):o===t)?o=1:o=me(o);var f=ve(r)?Cy:Ky;return f(r,o)}function a_(r){var o=ve(r)?xy:Xy;return o(r)}function o_(r){if(r==null)return 0;if(Ft(r))return jo(r)?An(r):r.length;var o=_t(r);return o==qe||o==xt?r.size:Si(r).length}function s_(r,o,u){var f=ve(r)?ai:Zy;return u&&Ot(r,o,u)&&(o=t),f(r,re(o,3))}var i_=_e(function(r,o){if(r==null)return[];var u=o.length;return u>1&&Ot(r,o[0],o[1])?o=[]:u>2&&Ot(o[0],o[1],o[2])&&(o=[o[0]]),uf(r,vt(o,1),[])}),Mo=Wm||function(){return gt.Date.now()};function u_(r,o){if(typeof o!="function")throw new Jt(c);return r=me(r),function(){if(--r<1)return o.apply(this,arguments)}}function rd(r,o,u){return o=u?t:o,o=r&&o==null?r.length:o,xr(r,H,t,t,t,t,o)}function nd(r,o){var u;if(typeof o!="function")throw new Jt(c);return r=me(r),function(){return--r>0&&(u=o.apply(this,arguments)),r<=1&&(o=t),u}}var Yi=_e(function(r,o,u){var f=D;if(u.length){var g=qr(u,Nn(Yi));f|=O}return xr(r,f,o,u,g)}),ad=_e(function(r,o,u){var f=D|P;if(u.length){var g=qr(u,Nn(ad));f|=O}return xr(o,f,r,u,g)});function od(r,o,u){o=u?t:o;var f=xr(r,M,t,t,t,t,t,o);return f.placeholder=od.placeholder,f}function sd(r,o,u){o=u?t:o;var f=xr(r,k,t,t,t,t,t,o);return f.placeholder=sd.placeholder,f}function id(r,o,u){var f,g,m,S,C,A,L=0,N=!1,B=!1,V=!0;if(typeof r!="function")throw new Jt(c);o=tr(o)||0,Ze(u)&&(N=!!u.leading,B="maxWait"in u,m=B?ct(tr(u.maxWait)||0,o):m,V="trailing"in u?!!u.trailing:V);function ee(at){var lr=f,Dr=g;return f=g=t,L=at,S=r.apply(Dr,lr),S}function ae(at){return L=at,C=Ea(Se,o),N?ee(at):S}function be(at){var lr=at-A,Dr=at-L,xd=o-lr;return B?bt(xd,m-Dr):xd}function oe(at){var lr=at-A,Dr=at-L;return A===t||lr>=o||lr<0||B&&Dr>=m}function Se(){var at=Mo();if(oe(at))return xe(at);C=Ea(Se,be(at))}function xe(at){return C=t,V&&f?ee(at):(f=g=t,S)}function Wt(){C!==t&&mf(C),L=0,f=A=g=C=t}function At(){return C===t?S:xe(Mo())}function Ut(){var at=Mo(),lr=oe(at);if(f=arguments,g=this,A=at,lr){if(C===t)return ae(A);if(B)return mf(C),C=Ea(Se,o),ee(A)}return C===t&&(C=Ea(Se,o)),S}return Ut.cancel=Wt,Ut.flush=At,Ut}var c_=_e(function(r,o){return Kl(r,1,o)}),l_=_e(function(r,o,u){return Kl(r,tr(o)||0,u)});function f_(r){return xr(r,te)}function Lo(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new Jt(c);var u=function(){var f=arguments,g=o?o.apply(this,f):f[0],m=u.cache;if(m.has(g))return m.get(g);var S=r.apply(this,f);return u.cache=m.set(g,S)||m,S};return u.cache=new(Lo.Cache||Tr),u}Lo.Cache=Tr;function No(r){if(typeof r!="function")throw new Jt(c);return function(){var o=arguments;switch(o.length){case 0:return!r.call(this);case 1:return!r.call(this,o[0]);case 2:return!r.call(this,o[0],o[1]);case 3:return!r.call(this,o[0],o[1],o[2])}return!r.apply(this,o)}}function d_(r){return nd(2,r)}var p_=Qy(function(r,o){o=o.length==1&&ve(o[0])?Ke(o[0],kt(re())):Ke(vt(o,1),kt(re()));var u=o.length;return _e(function(f){for(var g=-1,m=bt(f.length,u);++g<m;)f[g]=o[g].call(this,f[g]);return Nt(r,this,f)})}),zi=_e(function(r,o){var u=qr(o,Nn(zi));return xr(r,O,t,o,u)}),ud=_e(function(r,o){var u=qr(o,Nn(ud));return xr(r,z,t,o,u)}),h_=Rr(function(r,o){return xr(r,Y,t,t,t,o)});function g_(r,o){if(typeof r!="function")throw new Jt(c);return o=o===t?o:me(o),_e(r,o)}function v_(r,o){if(typeof r!="function")throw new Jt(c);return o=o==null?0:ct(me(o),0),_e(function(u){var f=u[o],g=Jr(u,0,o);return f&&Gr(g,f),Nt(r,this,g)})}function m_(r,o,u){var f=!0,g=!0;if(typeof r!="function")throw new Jt(c);return Ze(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),id(r,o,{leading:f,maxWait:o,trailing:g})}function y_(r){return rd(r,1)}function b_(r,o){return zi(Di(o),r)}function __(){if(!arguments.length)return[];var r=arguments[0];return ve(r)?r:[r]}function E_(r){return Zt(r,E)}function S_(r,o){return o=typeof o=="function"?o:t,Zt(r,E,o)}function w_(r){return Zt(r,y|E)}function T_(r,o){return o=typeof o=="function"?o:t,Zt(r,y|E,o)}function C_(r,o){return o==null||Vl(r,o,dt(o))}function cr(r,o){return r===o||r!==r&&o!==o}var x_=Ao(bi),R_=Ao(function(r,o){return r>=o}),bn=ef(function(){return arguments}())?ef:function(r){return tt(r)&&ke.call(r,"callee")&&!Bl.call(r,"callee")},ve=I.isArray,O_=El?kt(El):Ly;function Ft(r){return r!=null&&ko(r.length)&&!Ar(r)}function nt(r){return tt(r)&&Ft(r)}function A_(r){return r===!0||r===!1||tt(r)&&Rt(r)==ue}var Xr=Hm||au,P_=Sl?kt(Sl):Ny;function D_(r){return tt(r)&&r.nodeType===1&&!Sa(r)}function I_(r){if(r==null)return!0;if(Ft(r)&&(ve(r)||typeof r=="string"||typeof r.splice=="function"||Xr(r)||kn(r)||bn(r)))return!r.length;var o=_t(r);if(o==qe||o==xt)return!r.size;if(_a(r))return!Si(r).length;for(var u in r)if(ke.call(r,u))return!1;return!0}function F_(r,o){return ma(r,o)}function $_(r,o,u){u=typeof u=="function"?u:t;var f=u?u(r,o):t;return f===t?ma(r,o,t,u):!!f}function Vi(r){if(!tt(r))return!1;var o=Rt(r);return o==K||o==ge||typeof r.message=="string"&&typeof r.name=="string"&&!Sa(r)}function M_(r){return typeof r=="number"&&Ul(r)}function Ar(r){if(!Ze(r))return!1;var o=Rt(r);return o==F||o==ze||o==ce||o==Ws}function cd(r){return typeof r=="number"&&r==me(r)}function ko(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=rt}function Ze(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function tt(r){return r!=null&&typeof r=="object"}var ld=wl?kt(wl):jy;function L_(r,o){return r===o||Ei(r,o,ki(o))}function N_(r,o,u){return u=typeof u=="function"?u:t,Ei(r,o,ki(o),u)}function k_(r){return fd(r)&&r!=+r}function j_(r){if(Sb(r))throw new pe(i);return tf(r)}function B_(r){return r===null}function W_(r){return r==null}function fd(r){return typeof r=="number"||tt(r)&&Rt(r)==yt}function Sa(r){if(!tt(r)||Rt(r)!=Yt)return!1;var o=lo(r);if(o===null)return!0;var u=ke.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&so.call(u)==Nm}var Ki=Tl?kt(Tl):By;function U_(r){return cd(r)&&r>=-rt&&r<=rt}var dd=Cl?kt(Cl):Wy;function jo(r){return typeof r=="string"||!ve(r)&&tt(r)&&Rt(r)==an}function Bt(r){return typeof r=="symbol"||tt(r)&&Rt(r)==on}var kn=xl?kt(xl):Uy;function H_(r){return r===t}function G_(r){return tt(r)&&_t(r)==Sr}function q_(r){return tt(r)&&Rt(r)==Us}var Y_=Ao(wi),z_=Ao(function(r,o){return r<=o});function pd(r){if(!r)return[];if(Ft(r))return jo(r)?ir(r):It(r);if(ca&&r[ca])return Cm(r[ca]());var o=_t(r),u=o==qe?li:o==xt?no:jn;return u(r)}function Pr(r){if(!r)return r===0?r:0;if(r=tr(r),r===Ge||r===-Ge){var o=r<0?-1:1;return o*qt}return r===r?r:0}function me(r){var o=Pr(r),u=o%1;return o===o?u?o-u:o:0}function hd(r){return r?gn(me(r),0,q):0}function tr(r){if(typeof r=="number")return r;if(Bt(r))return W;if(Ze(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=Ze(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=Il(r);var u=Xa.test(r);return u||Pv.test(r)?um(r.slice(2),u?2:8):Ur.test(r)?W:+r}function gd(r){return mr(r,$t(r))}function V_(r){return r?gn(me(r),-rt,rt):r===0?r:0}function De(r){return r==null?"":jt(r)}var K_=Mn(function(r,o){if(_a(o)||Ft(o)){mr(o,dt(o),r);return}for(var u in o)ke.call(o,u)&&ha(r,u,o[u])}),vd=Mn(function(r,o){mr(o,$t(o),r)}),Bo=Mn(function(r,o,u,f){mr(o,$t(o),r,f)}),J_=Mn(function(r,o,u,f){mr(o,dt(o),r,f)}),X_=Rr(vi);function Z_(r,o){var u=$n(r);return o==null?u:zl(u,o)}var Q_=_e(function(r,o){r=Ue(r);var u=-1,f=o.length,g=f>2?o[2]:t;for(g&&Ot(o[0],o[1],g)&&(f=1);++u<f;)for(var m=o[u],S=$t(m),C=-1,A=S.length;++C<A;){var L=S[C],N=r[L];(N===t||cr(N,Dn[L])&&!ke.call(r,L))&&(r[L]=m[L])}return r}),eE=_e(function(r){return r.push(t,Ff),Nt(md,t,r)});function tE(r,o){return Ol(r,re(o,3),vr)}function rE(r,o){return Ol(r,re(o,3),yi)}function nE(r,o){return r==null?r:mi(r,re(o,3),$t)}function aE(r,o){return r==null?r:Zl(r,re(o,3),$t)}function oE(r,o){return r&&vr(r,re(o,3))}function sE(r,o){return r&&yi(r,re(o,3))}function iE(r){return r==null?[]:Eo(r,dt(r))}function uE(r){return r==null?[]:Eo(r,$t(r))}function Ji(r,o,u){var f=r==null?t:vn(r,o);return f===t?u:f}function cE(r,o){return r!=null&&Lf(r,o,Iy)}function Xi(r,o){return r!=null&&Lf(r,o,Fy)}var lE=Of(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=io.call(o)),r[o]=u},Qi(Mt)),fE=Of(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=io.call(o)),ke.call(r,o)?r[o].push(u):r[o]=[u]},re),dE=_e(va);function dt(r){return Ft(r)?ql(r):Si(r)}function $t(r){return Ft(r)?ql(r,!0):Hy(r)}function pE(r,o){var u={};return o=re(o,3),vr(r,function(f,g,m){Cr(u,o(f,g,m),f)}),u}function hE(r,o){var u={};return o=re(o,3),vr(r,function(f,g,m){Cr(u,g,o(f,g,m))}),u}var gE=Mn(function(r,o,u){So(r,o,u)}),md=Mn(function(r,o,u,f){So(r,o,u,f)}),vE=Rr(function(r,o){var u={};if(r==null)return u;var f=!1;o=Ke(o,function(m){return m=Kr(m,r),f||(f=m.length>1),m}),mr(r,Li(r),u),f&&(u=Zt(u,y|_|E,lb));for(var g=o.length;g--;)Oi(u,o[g]);return u});function mE(r,o){return yd(r,No(re(o)))}var yE=Rr(function(r,o){return r==null?{}:qy(r,o)});function yd(r,o){if(r==null)return{};var u=Ke(Li(r),function(f){return[f]});return o=re(o),cf(r,u,function(f,g){return o(f,g[0])})}function bE(r,o,u){o=Kr(o,r);var f=-1,g=o.length;for(g||(g=1,r=t);++f<g;){var m=r==null?t:r[yr(o[f])];m===t&&(f=g,m=u),r=Ar(m)?m.call(r):m}return r}function _E(r,o,u){return r==null?r:ya(r,o,u)}function EE(r,o,u,f){return f=typeof f=="function"?f:t,r==null?r:ya(r,o,u,f)}var bd=Df(dt),_d=Df($t);function SE(r,o,u){var f=ve(r),g=f||Xr(r)||kn(r);if(o=re(o,4),u==null){var m=r&&r.constructor;g?u=f?new m:[]:Ze(r)?u=Ar(m)?$n(lo(r)):{}:u={}}return(g?Kt:vr)(r,function(S,C,A){return o(u,S,C,A)}),u}function wE(r,o){return r==null?!0:Oi(r,o)}function TE(r,o,u){return r==null?r:hf(r,o,Di(u))}function CE(r,o,u,f){return f=typeof f=="function"?f:t,r==null?r:hf(r,o,Di(u),f)}function jn(r){return r==null?[]:ci(r,dt(r))}function xE(r){return r==null?[]:ci(r,$t(r))}function RE(r,o,u){return u===t&&(u=o,o=t),u!==t&&(u=tr(u),u=u===u?u:0),o!==t&&(o=tr(o),o=o===o?o:0),gn(tr(r),o,u)}function OE(r,o,u){return o=Pr(o),u===t?(u=o,o=0):u=Pr(u),r=tr(r),$y(r,o,u)}function AE(r,o,u){if(u&&typeof u!="boolean"&&Ot(r,o,u)&&(o=u=t),u===t&&(typeof o=="boolean"?(u=o,o=t):typeof r=="boolean"&&(u=r,r=t)),r===t&&o===t?(r=0,o=1):(r=Pr(r),o===t?(o=r,r=0):o=Pr(o)),r>o){var f=r;r=o,o=f}if(u||r%1||o%1){var g=Hl();return bt(r+g*(o-r+im("1e-"+((g+"").length-1))),o)}return Ci(r,o)}var PE=Ln(function(r,o,u){return o=o.toLowerCase(),r+(u?Ed(o):o)});function Ed(r){return Zi(De(r).toLowerCase())}function Sd(r){return r=De(r),r&&r.replace(Iv,_m).replace(Xv,"")}function DE(r,o,u){r=De(r),o=jt(o);var f=r.length;u=u===t?f:gn(me(u),0,f);var g=u;return u-=o.length,u>=0&&r.slice(u,g)==o}function IE(r){return r=De(r),r&&Gs.test(r)?r.replace(ia,Em):r}function FE(r){return r=De(r),r&&U.test(r)?r.replace(w,"\\$&"):r}var $E=Ln(function(r,o,u){return r+(u?"-":"")+o.toLowerCase()}),ME=Ln(function(r,o,u){return r+(u?" ":"")+o.toLowerCase()}),LE=Cf("toLowerCase");function NE(r,o,u){r=De(r),o=me(o);var f=o?An(r):0;if(!o||f>=o)return r;var g=(o-f)/2;return Oo(go(g),u)+r+Oo(ho(g),u)}function kE(r,o,u){r=De(r),o=me(o);var f=o?An(r):0;return o&&f<o?r+Oo(o-f,u):r}function jE(r,o,u){r=De(r),o=me(o);var f=o?An(r):0;return o&&f<o?Oo(o-f,u)+r:r}function BE(r,o,u){return u||o==null?o=0:o&&(o=+o),zm(De(r).replace(J,""),o||0)}function WE(r,o,u){return(u?Ot(r,o,u):o===t)?o=1:o=me(o),xi(De(r),o)}function UE(){var r=arguments,o=De(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var HE=Ln(function(r,o,u){return r+(u?"_":"")+o.toLowerCase()});function GE(r,o,u){return u&&typeof u!="number"&&Ot(r,o,u)&&(o=u=t),u=u===t?q:u>>>0,u?(r=De(r),r&&(typeof o=="string"||o!=null&&!Ki(o))&&(o=jt(o),!o&&On(r))?Jr(ir(r),0,u):r.split(o,u)):[]}var qE=Ln(function(r,o,u){return r+(u?" ":"")+Zi(o)});function YE(r,o,u){return r=De(r),u=u==null?0:gn(me(u),0,r.length),o=jt(o),r.slice(u,u+o.length)==o}function zE(r,o,u){var f=v.templateSettings;u&&Ot(r,o,u)&&(o=t),r=De(r),o=Bo({},o,f,If);var g=Bo({},o.imports,f.imports,If),m=dt(g),S=ci(g,m),C,A,L=0,N=o.interpolate||Za,B="__p += '",V=fi((o.escape||Za).source+"|"+N.source+"|"+(N===Ja?et:Za).source+"|"+(o.evaluate||Za).source+"|$","g"),ee="//# sourceURL="+(ke.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rm+"]")+`
18
- `;r.replace(V,function(oe,Se,xe,Wt,At,Ut){return xe||(xe=Wt),B+=r.slice(L,Ut).replace(Fv,Sm),Se&&(C=!0,B+=`' +
17
+ `)}function Sb(n){return ve(n)||bn(n)||!!(Ul&&n&&n[Ul])}function Or(n,o){var u=typeof n;return o=o??rt,!!o&&(u=="number"||u!="symbol"&&$v.test(n))&&n>-1&&n%1==0&&n<o}function Ot(n,o,u){if(!Ze(u))return!1;var f=typeof o;return(f=="number"?Ft(u)&&Or(o,u.length):f=="string"&&o in u)?cr(u[o],n):!1}function Bi(n,o){if(ve(n))return!1;var u=typeof n;return u=="number"||u=="symbol"||u=="boolean"||n==null||Bt(n)?!0:zs.test(n)||!Ys.test(n)||o!=null&&n in He(o)}function wb(n){var o=typeof n;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?n!=="__proto__":n===null}function Wi(n){var o=Po(n),u=v[o];if(typeof u!="function"||!(o in we.prototype))return!1;if(n===u)return!0;var f=Ni(u);return!!f&&n===f[0]}function Tb(n){return!!kl&&kl in n}var Cb=oo?Ar:au;function _a(n){var o=n&&n.constructor,u=typeof o=="function"&&o.prototype||In;return n===u}function jf(n){return n===n&&!Ze(n)}function Bf(n,o){return function(u){return u==null?!1:u[n]===o&&(o!==t||n in He(u))}}function xb(n){var o=Lo(n,function(f){return u.size===p&&u.clear(),f}),u=o.cache;return o}function Rb(n,o){var u=n[1],f=o[1],g=u|f,y=g<(D|P|G),S=f==G&&u==M||f==G&&u==Y&&n[7].length<=o[8]||f==(G|Y)&&o[7].length<=o[8]&&u==M;if(!(y||S))return n;f&D&&(n[2]=o[2],g|=u&D?0:j);var C=o[3];if(C){var A=n[3];n[3]=A?Sf(A,C,o[4]):C,n[4]=A?qr(n[3],h):o[4]}return C=o[5],C&&(A=n[5],n[5]=A?wf(A,C,o[6]):C,n[6]=A?qr(n[5],h):o[6]),C=o[7],C&&(n[7]=C),f&G&&(n[8]=n[8]==null?o[8]:bt(n[8],o[8])),n[9]==null&&(n[9]=o[9]),n[0]=o[0],n[1]=g,n}function Ob(n){var o=[];if(n!=null)for(var u in He(n))o.push(u);return o}function Ab(n){return io.call(n)}function Wf(n,o,u){return o=ct(o===t?n.length-1:o,0),function(){for(var f=arguments,g=-1,y=ct(f.length-o,0),S=I(y);++g<y;)S[g]=f[o+g];g=-1;for(var C=I(o+1);++g<o;)C[g]=f[g];return C[o]=u(S),Nt(n,this,C)}}function Uf(n,o){return o.length<2?n:vn(n,Qt(o,0,-1))}function Pb(n,o){for(var u=n.length,f=bt(o.length,u),g=It(n);f--;){var y=o[f];n[f]=Or(y,u)?g[y]:t}return n}function Ui(n,o){if(!(o==="constructor"&&typeof n[o]=="function")&&o!="__proto__")return n[o]}var Hf=qf(df),Ea=qy||function(n,o){return gt.setTimeout(n,o)},Hi=qf(Qm);function Gf(n,o,u){var f=o+"";return Hi(n,Eb(f,Db(mb(f),u)))}function qf(n){var o=0,u=0;return function(){var f=Ky(),g=X-(f-u);if(u=f,g>0){if(++o>=st)return arguments[0]}else o=0;return n.apply(t,arguments)}}function Io(n,o){var u=-1,f=n.length,g=f-1;for(o=o===t?f:o;++u<o;){var y=Ci(u,g),S=n[y];n[y]=n[u],n[u]=S}return n.length=o,n}var Yf=xb(function(n){var o=[];return n.charCodeAt(0)===46&&o.push(""),n.replace(Vs,function(u,f,g,y){o.push(g?y.replace(Xe,"$1"):f||u)}),o});function mr(n){if(typeof n=="string"||Bt(n))return n;var o=n+"";return o=="0"&&1/n==-Ge?"-0":o}function mn(n){if(n!=null){try{return so.call(n)}catch{}try{return n+""}catch{}}return""}function Db(n,o){return Kt(se,function(u){var f="_."+u[0];o&u[1]&&!to(n,f)&&n.push(f)}),n.sort()}function zf(n){if(n instanceof we)return n.clone();var o=new Xt(n.__wrapped__,n.__chain__);return o.__actions__=It(n.__actions__),o.__index__=n.__index__,o.__values__=n.__values__,o}function Ib(n,o,u){(u?Ot(n,o,u):o===t)?o=1:o=ct(ye(o),0);var f=n==null?0:n.length;if(!f||o<1)return[];for(var g=0,y=0,S=I(ho(f/o));g<f;)S[y++]=Qt(n,g,g+=o);return S}function Fb(n){for(var o=-1,u=n==null?0:n.length,f=0,g=[];++o<u;){var y=n[o];y&&(g[f++]=y)}return g}function $b(){var n=arguments.length;if(!n)return[];for(var o=I(n-1),u=arguments[0],f=n;f--;)o[f-1]=arguments[f];return Gr(ve(u)?It(u):[u],vt(o,1))}var Mb=_e(function(n,o){return nt(n)?ga(n,vt(o,1,nt,!0)):[]}),Lb=_e(function(n,o){var u=er(o);return nt(u)&&(u=t),nt(n)?ga(n,vt(o,1,nt,!0),re(u,2)):[]}),Nb=_e(function(n,o){var u=er(o);return nt(u)&&(u=t),nt(n)?ga(n,vt(o,1,nt,!0),t,u):[]});function kb(n,o,u){var f=n==null?0:n.length;return f?(o=u||o===t?1:ye(o),Qt(n,o<0?0:o,f)):[]}function jb(n,o,u){var f=n==null?0:n.length;return f?(o=u||o===t?1:ye(o),o=f-o,Qt(n,0,o<0?0:o)):[]}function Bb(n,o){return n&&n.length?To(n,re(o,3),!0,!0):[]}function Wb(n,o){return n&&n.length?To(n,re(o,3),!0):[]}function Ub(n,o,u,f){var g=n==null?0:n.length;return g?(u&&typeof u!="number"&&Ot(n,o,u)&&(u=0,f=g),$m(n,o,u,f)):[]}function Vf(n,o,u){var f=n==null?0:n.length;if(!f)return-1;var g=u==null?0:ye(u);return g<0&&(g=ct(f+g,0)),ro(n,re(o,3),g)}function Kf(n,o,u){var f=n==null?0:n.length;if(!f)return-1;var g=f-1;return u!==t&&(g=ye(u),g=u<0?ct(f+g,0):bt(g,f-1)),ro(n,re(o,3),g,!0)}function Jf(n){var o=n==null?0:n.length;return o?vt(n,1):[]}function Hb(n){var o=n==null?0:n.length;return o?vt(n,Ge):[]}function Gb(n,o){var u=n==null?0:n.length;return u?(o=o===t?1:ye(o),vt(n,o)):[]}function qb(n){for(var o=-1,u=n==null?0:n.length,f={};++o<u;){var g=n[o];f[g[0]]=g[1]}return f}function Xf(n){return n&&n.length?n[0]:t}function Yb(n,o,u){var f=n==null?0:n.length;if(!f)return-1;var g=u==null?0:ye(u);return g<0&&(g=ct(f+g,0)),On(n,o,g)}function zb(n){var o=n==null?0:n.length;return o?Qt(n,0,-1):[]}var Vb=_e(function(n){var o=Ke(n,Pi);return o.length&&o[0]===n[0]?_i(o):[]}),Kb=_e(function(n){var o=er(n),u=Ke(n,Pi);return o===er(u)?o=t:u.pop(),u.length&&u[0]===n[0]?_i(u,re(o,2)):[]}),Jb=_e(function(n){var o=er(n),u=Ke(n,Pi);return o=typeof o=="function"?o:t,o&&u.pop(),u.length&&u[0]===n[0]?_i(u,t,o):[]});function Xb(n,o){return n==null?"":zy.call(n,o)}function er(n){var o=n==null?0:n.length;return o?n[o-1]:t}function Zb(n,o,u){var f=n==null?0:n.length;if(!f)return-1;var g=f;return u!==t&&(g=ye(u),g=g<0?ct(f+g,0):bt(g,f-1)),o===o?Dy(n,o,g):ro(n,Pl,g,!0)}function Qb(n,o){return n&&n.length?uf(n,ye(o)):t}var e0=_e(Zf);function Zf(n,o){return n&&n.length&&o&&o.length?Ti(n,o):n}function t0(n,o,u){return n&&n.length&&o&&o.length?Ti(n,o,re(u,2)):n}function r0(n,o,u){return n&&n.length&&o&&o.length?Ti(n,o,t,u):n}var n0=Rr(function(n,o){var u=n==null?0:n.length,f=vi(n,o);return ff(n,Ke(o,function(g){return Or(g,u)?+g:g}).sort(Ef)),f});function a0(n,o){var u=[];if(!(n&&n.length))return u;var f=-1,g=[],y=n.length;for(o=re(o,3);++f<y;){var S=n[f];o(S,f,n)&&(u.push(S),g.push(f))}return ff(n,g),u}function Gi(n){return n==null?n:Xy.call(n)}function o0(n,o,u){var f=n==null?0:n.length;return f?(u&&typeof u!="number"&&Ot(n,o,u)?(o=0,u=f):(o=o==null?0:ye(o),u=u===t?f:ye(u)),Qt(n,o,u)):[]}function s0(n,o){return wo(n,o)}function i0(n,o,u){return Ri(n,o,re(u,2))}function u0(n,o){var u=n==null?0:n.length;if(u){var f=wo(n,o);if(f<u&&cr(n[f],o))return f}return-1}function c0(n,o){return wo(n,o,!0)}function l0(n,o,u){return Ri(n,o,re(u,2),!0)}function f0(n,o){var u=n==null?0:n.length;if(u){var f=wo(n,o,!0)-1;if(cr(n[f],o))return f}return-1}function d0(n){return n&&n.length?pf(n):[]}function p0(n,o){return n&&n.length?pf(n,re(o,2)):[]}function h0(n){var o=n==null?0:n.length;return o?Qt(n,1,o):[]}function g0(n,o,u){return n&&n.length?(o=u||o===t?1:ye(o),Qt(n,0,o<0?0:o)):[]}function v0(n,o,u){var f=n==null?0:n.length;return f?(o=u||o===t?1:ye(o),o=f-o,Qt(n,o<0?0:o,f)):[]}function y0(n,o){return n&&n.length?To(n,re(o,3),!1,!0):[]}function m0(n,o){return n&&n.length?To(n,re(o,3)):[]}var b0=_e(function(n){return Vr(vt(n,1,nt,!0))}),_0=_e(function(n){var o=er(n);return nt(o)&&(o=t),Vr(vt(n,1,nt,!0),re(o,2))}),E0=_e(function(n){var o=er(n);return o=typeof o=="function"?o:t,Vr(vt(n,1,nt,!0),t,o)});function S0(n){return n&&n.length?Vr(n):[]}function w0(n,o){return n&&n.length?Vr(n,re(o,2)):[]}function T0(n,o){return o=typeof o=="function"?o:t,n&&n.length?Vr(n,t,o):[]}function qi(n){if(!(n&&n.length))return[];var o=0;return n=Hr(n,function(u){if(nt(u))return o=ct(u.length,o),!0}),ui(o,function(u){return Ke(n,oi(u))})}function Qf(n,o){if(!(n&&n.length))return[];var u=qi(n);return o==null?u:Ke(u,function(f){return Nt(o,t,f)})}var C0=_e(function(n,o){return nt(n)?ga(n,o):[]}),x0=_e(function(n){return Ai(Hr(n,nt))}),R0=_e(function(n){var o=er(n);return nt(o)&&(o=t),Ai(Hr(n,nt),re(o,2))}),O0=_e(function(n){var o=er(n);return o=typeof o=="function"?o:t,Ai(Hr(n,nt),t,o)}),A0=_e(qi);function P0(n,o){return yf(n||[],o||[],ha)}function D0(n,o){return yf(n||[],o||[],ma)}var I0=_e(function(n){var o=n.length,u=o>1?n[o-1]:t;return u=typeof u=="function"?(n.pop(),u):t,Qf(n,u)});function ed(n){var o=v(n);return o.__chain__=!0,o}function F0(n,o){return o(n),n}function Fo(n,o){return o(n)}var $0=Rr(function(n){var o=n.length,u=o?n[0]:0,f=this.__wrapped__,g=function(y){return vi(y,n)};return o>1||this.__actions__.length||!(f instanceof we)||!Or(u)?this.thru(g):(f=f.slice(u,+u+(o?1:0)),f.__actions__.push({func:Fo,args:[g],thisArg:t}),new Xt(f,this.__chain__).thru(function(y){return o&&!y.length&&y.push(t),y}))});function M0(){return ed(this)}function L0(){return new Xt(this.value(),this.__chain__)}function N0(){this.__values__===t&&(this.__values__=hd(this.value()));var n=this.__index__>=this.__values__.length,o=n?t:this.__values__[this.__index__++];return{done:n,value:o}}function k0(){return this}function j0(n){for(var o,u=this;u instanceof mo;){var f=zf(u);f.__index__=0,f.__values__=t,o?g.__wrapped__=f:o=f;var g=f;u=u.__wrapped__}return g.__wrapped__=n,o}function B0(){var n=this.__wrapped__;if(n instanceof we){var o=n;return this.__actions__.length&&(o=new we(this)),o=o.reverse(),o.__actions__.push({func:Fo,args:[Gi],thisArg:t}),new Xt(o,this.__chain__)}return this.thru(Gi)}function W0(){return vf(this.__wrapped__,this.__actions__)}var U0=Co(function(n,o,u){ke.call(n,u)?++n[u]:Cr(n,u,1)});function H0(n,o,u){var f=ve(n)?Ol:Fm;return u&&Ot(n,o,u)&&(o=t),f(n,re(o,3))}function G0(n,o){var u=ve(n)?Hr:Zl;return u(n,re(o,3))}var q0=Rf(Vf),Y0=Rf(Kf);function z0(n,o){return vt($o(n,o),1)}function V0(n,o){return vt($o(n,o),Ge)}function K0(n,o,u){return u=u===t?1:ye(u),vt($o(n,o),u)}function td(n,o){var u=ve(n)?Kt:zr;return u(n,re(o,3))}function rd(n,o){var u=ve(n)?hy:Xl;return u(n,re(o,3))}var J0=Co(function(n,o,u){ke.call(n,u)?n[u].push(o):Cr(n,u,[o])});function X0(n,o,u,f){n=Ft(n)?n:Bn(n),u=u&&!f?ye(u):0;var g=n.length;return u<0&&(u=ct(g+u,0)),jo(n)?u<=g&&n.indexOf(o,u)>-1:!!g&&On(n,o,u)>-1}var Z0=_e(function(n,o,u){var f=-1,g=typeof o=="function",y=Ft(n)?I(n.length):[];return zr(n,function(S){y[++f]=g?Nt(o,S,u):va(S,o,u)}),y}),Q0=Co(function(n,o,u){Cr(n,u,o)});function $o(n,o){var u=ve(n)?Ke:af;return u(n,re(o,3))}function e_(n,o,u,f){return n==null?[]:(ve(o)||(o=o==null?[]:[o]),u=f?t:u,ve(u)||(u=u==null?[]:[u]),cf(n,o,u))}var t_=Co(function(n,o,u){n[u?0:1].push(o)},function(){return[[],[]]});function r_(n,o,u){var f=ve(n)?ni:Il,g=arguments.length<3;return f(n,re(o,4),u,g,zr)}function n_(n,o,u){var f=ve(n)?gy:Il,g=arguments.length<3;return f(n,re(o,4),u,g,Xl)}function a_(n,o){var u=ve(n)?Hr:Zl;return u(n,No(re(o,3)))}function o_(n){var o=ve(n)?zl:Xm;return o(n)}function s_(n,o,u){(u?Ot(n,o,u):o===t)?o=1:o=ye(o);var f=ve(n)?Om:Zm;return f(n,o)}function i_(n){var o=ve(n)?Am:eb;return o(n)}function u_(n){if(n==null)return 0;if(Ft(n))return jo(n)?Pn(n):n.length;var o=_t(n);return o==qe||o==xt?n.size:Si(n).length}function c_(n,o,u){var f=ve(n)?ai:tb;return u&&Ot(n,o,u)&&(o=t),f(n,re(o,3))}var l_=_e(function(n,o){if(n==null)return[];var u=o.length;return u>1&&Ot(n,o[0],o[1])?o=[]:u>2&&Ot(o[0],o[1],o[2])&&(o=[o[0]]),cf(n,vt(o,1),[])}),Mo=Gy||function(){return gt.Date.now()};function f_(n,o){if(typeof o!="function")throw new Jt(c);return n=ye(n),function(){if(--n<1)return o.apply(this,arguments)}}function nd(n,o,u){return o=u?t:o,o=n&&o==null?n.length:o,xr(n,G,t,t,t,t,o)}function ad(n,o){var u;if(typeof o!="function")throw new Jt(c);return n=ye(n),function(){return--n>0&&(u=o.apply(this,arguments)),n<=1&&(o=t),u}}var Yi=_e(function(n,o,u){var f=D;if(u.length){var g=qr(u,kn(Yi));f|=O}return xr(n,f,o,u,g)}),od=_e(function(n,o,u){var f=D|P;if(u.length){var g=qr(u,kn(od));f|=O}return xr(o,f,n,u,g)});function sd(n,o,u){o=u?t:o;var f=xr(n,M,t,t,t,t,t,o);return f.placeholder=sd.placeholder,f}function id(n,o,u){o=u?t:o;var f=xr(n,k,t,t,t,t,t,o);return f.placeholder=id.placeholder,f}function ud(n,o,u){var f,g,y,S,C,A,L=0,N=!1,B=!1,V=!0;if(typeof n!="function")throw new Jt(c);o=tr(o)||0,Ze(u)&&(N=!!u.leading,B="maxWait"in u,y=B?ct(tr(u.maxWait)||0,o):y,V="trailing"in u?!!u.trailing:V);function ee(at){var lr=f,Dr=g;return f=g=t,L=at,S=n.apply(Dr,lr),S}function ae(at){return L=at,C=Ea(Se,o),N?ee(at):S}function be(at){var lr=at-A,Dr=at-L,Rd=o-lr;return B?bt(Rd,y-Dr):Rd}function oe(at){var lr=at-A,Dr=at-L;return A===t||lr>=o||lr<0||B&&Dr>=y}function Se(){var at=Mo();if(oe(at))return xe(at);C=Ea(Se,be(at))}function xe(at){return C=t,V&&f?ee(at):(f=g=t,S)}function Wt(){C!==t&&mf(C),L=0,f=A=g=C=t}function At(){return C===t?S:xe(Mo())}function Ut(){var at=Mo(),lr=oe(at);if(f=arguments,g=this,A=at,lr){if(C===t)return ae(A);if(B)return mf(C),C=Ea(Se,o),ee(A)}return C===t&&(C=Ea(Se,o)),S}return Ut.cancel=Wt,Ut.flush=At,Ut}var d_=_e(function(n,o){return Jl(n,1,o)}),p_=_e(function(n,o,u){return Jl(n,tr(o)||0,u)});function h_(n){return xr(n,te)}function Lo(n,o){if(typeof n!="function"||o!=null&&typeof o!="function")throw new Jt(c);var u=function(){var f=arguments,g=o?o.apply(this,f):f[0],y=u.cache;if(y.has(g))return y.get(g);var S=n.apply(this,f);return u.cache=y.set(g,S)||y,S};return u.cache=new(Lo.Cache||Tr),u}Lo.Cache=Tr;function No(n){if(typeof n!="function")throw new Jt(c);return function(){var o=arguments;switch(o.length){case 0:return!n.call(this);case 1:return!n.call(this,o[0]);case 2:return!n.call(this,o[0],o[1]);case 3:return!n.call(this,o[0],o[1],o[2])}return!n.apply(this,o)}}function g_(n){return ad(2,n)}var v_=rb(function(n,o){o=o.length==1&&ve(o[0])?Ke(o[0],kt(re())):Ke(vt(o,1),kt(re()));var u=o.length;return _e(function(f){for(var g=-1,y=bt(f.length,u);++g<y;)f[g]=o[g].call(this,f[g]);return Nt(n,this,f)})}),zi=_e(function(n,o){var u=qr(o,kn(zi));return xr(n,O,t,o,u)}),cd=_e(function(n,o){var u=qr(o,kn(cd));return xr(n,z,t,o,u)}),y_=Rr(function(n,o){return xr(n,Y,t,t,t,o)});function m_(n,o){if(typeof n!="function")throw new Jt(c);return o=o===t?o:ye(o),_e(n,o)}function b_(n,o){if(typeof n!="function")throw new Jt(c);return o=o==null?0:ct(ye(o),0),_e(function(u){var f=u[o],g=Jr(u,0,o);return f&&Gr(g,f),Nt(n,this,g)})}function __(n,o,u){var f=!0,g=!0;if(typeof n!="function")throw new Jt(c);return Ze(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),ud(n,o,{leading:f,maxWait:o,trailing:g})}function E_(n){return nd(n,1)}function S_(n,o){return zi(Di(o),n)}function w_(){if(!arguments.length)return[];var n=arguments[0];return ve(n)?n:[n]}function T_(n){return Zt(n,E)}function C_(n,o){return o=typeof o=="function"?o:t,Zt(n,E,o)}function x_(n){return Zt(n,m|E)}function R_(n,o){return o=typeof o=="function"?o:t,Zt(n,m|E,o)}function O_(n,o){return o==null||Kl(n,o,dt(o))}function cr(n,o){return n===o||n!==n&&o!==o}var A_=Ao(bi),P_=Ao(function(n,o){return n>=o}),bn=tf(function(){return arguments}())?tf:function(n){return tt(n)&&ke.call(n,"callee")&&!Wl.call(n,"callee")},ve=I.isArray,D_=Sl?kt(Sl):jm;function Ft(n){return n!=null&&ko(n.length)&&!Ar(n)}function nt(n){return tt(n)&&Ft(n)}function I_(n){return n===!0||n===!1||tt(n)&&Rt(n)==ue}var Xr=Yy||au,F_=wl?kt(wl):Bm;function $_(n){return tt(n)&&n.nodeType===1&&!Sa(n)}function M_(n){if(n==null)return!0;if(Ft(n)&&(ve(n)||typeof n=="string"||typeof n.splice=="function"||Xr(n)||jn(n)||bn(n)))return!n.length;var o=_t(n);if(o==qe||o==xt)return!n.size;if(_a(n))return!Si(n).length;for(var u in n)if(ke.call(n,u))return!1;return!0}function L_(n,o){return ya(n,o)}function N_(n,o,u){u=typeof u=="function"?u:t;var f=u?u(n,o):t;return f===t?ya(n,o,t,u):!!f}function Vi(n){if(!tt(n))return!1;var o=Rt(n);return o==K||o==ge||typeof n.message=="string"&&typeof n.name=="string"&&!Sa(n)}function k_(n){return typeof n=="number"&&Hl(n)}function Ar(n){if(!Ze(n))return!1;var o=Rt(n);return o==F||o==ze||o==ce||o==Ws}function ld(n){return typeof n=="number"&&n==ye(n)}function ko(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=rt}function Ze(n){var o=typeof n;return n!=null&&(o=="object"||o=="function")}function tt(n){return n!=null&&typeof n=="object"}var fd=Tl?kt(Tl):Um;function j_(n,o){return n===o||Ei(n,o,ki(o))}function B_(n,o,u){return u=typeof u=="function"?u:t,Ei(n,o,ki(o),u)}function W_(n){return dd(n)&&n!=+n}function U_(n){if(Cb(n))throw new pe(i);return rf(n)}function H_(n){return n===null}function G_(n){return n==null}function dd(n){return typeof n=="number"||tt(n)&&Rt(n)==mt}function Sa(n){if(!tt(n)||Rt(n)!=Yt)return!1;var o=lo(n);if(o===null)return!0;var u=ke.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&so.call(u)==By}var Ki=Cl?kt(Cl):Hm;function q_(n){return ld(n)&&n>=-rt&&n<=rt}var pd=xl?kt(xl):Gm;function jo(n){return typeof n=="string"||!ve(n)&&tt(n)&&Rt(n)==an}function Bt(n){return typeof n=="symbol"||tt(n)&&Rt(n)==on}var jn=Rl?kt(Rl):qm;function Y_(n){return n===t}function z_(n){return tt(n)&&_t(n)==Sr}function V_(n){return tt(n)&&Rt(n)==Us}var K_=Ao(wi),J_=Ao(function(n,o){return n<=o});function hd(n){if(!n)return[];if(Ft(n))return jo(n)?ir(n):It(n);if(ca&&n[ca])return Oy(n[ca]());var o=_t(n),u=o==qe?li:o==xt?no:Bn;return u(n)}function Pr(n){if(!n)return n===0?n:0;if(n=tr(n),n===Ge||n===-Ge){var o=n<0?-1:1;return o*qt}return n===n?n:0}function ye(n){var o=Pr(n),u=o%1;return o===o?u?o-u:o:0}function gd(n){return n?gn(ye(n),0,q):0}function tr(n){if(typeof n=="number")return n;if(Bt(n))return W;if(Ze(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Ze(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=Fl(n);var u=Xa.test(n);return u||Fv.test(n)?fy(n.slice(2),u?2:8):Ur.test(n)?W:+n}function vd(n){return yr(n,$t(n))}function X_(n){return n?gn(ye(n),-rt,rt):n===0?n:0}function De(n){return n==null?"":jt(n)}var Z_=Ln(function(n,o){if(_a(o)||Ft(o)){yr(o,dt(o),n);return}for(var u in o)ke.call(o,u)&&ha(n,u,o[u])}),yd=Ln(function(n,o){yr(o,$t(o),n)}),Bo=Ln(function(n,o,u,f){yr(o,$t(o),n,f)}),Q_=Ln(function(n,o,u,f){yr(o,dt(o),n,f)}),eE=Rr(vi);function tE(n,o){var u=Mn(n);return o==null?u:Vl(u,o)}var rE=_e(function(n,o){n=He(n);var u=-1,f=o.length,g=f>2?o[2]:t;for(g&&Ot(o[0],o[1],g)&&(f=1);++u<f;)for(var y=o[u],S=$t(y),C=-1,A=S.length;++C<A;){var L=S[C],N=n[L];(N===t||cr(N,In[L])&&!ke.call(n,L))&&(n[L]=y[L])}return n}),nE=_e(function(n){return n.push(t,$f),Nt(md,t,n)});function aE(n,o){return Al(n,re(o,3),vr)}function oE(n,o){return Al(n,re(o,3),mi)}function sE(n,o){return n==null?n:yi(n,re(o,3),$t)}function iE(n,o){return n==null?n:Ql(n,re(o,3),$t)}function uE(n,o){return n&&vr(n,re(o,3))}function cE(n,o){return n&&mi(n,re(o,3))}function lE(n){return n==null?[]:Eo(n,dt(n))}function fE(n){return n==null?[]:Eo(n,$t(n))}function Ji(n,o,u){var f=n==null?t:vn(n,o);return f===t?u:f}function dE(n,o){return n!=null&&Nf(n,o,Mm)}function Xi(n,o){return n!=null&&Nf(n,o,Lm)}var pE=Af(function(n,o,u){o!=null&&typeof o.toString!="function"&&(o=io.call(o)),n[o]=u},Qi(Mt)),hE=Af(function(n,o,u){o!=null&&typeof o.toString!="function"&&(o=io.call(o)),ke.call(n,o)?n[o].push(u):n[o]=[u]},re),gE=_e(va);function dt(n){return Ft(n)?Yl(n):Si(n)}function $t(n){return Ft(n)?Yl(n,!0):Ym(n)}function vE(n,o){var u={};return o=re(o,3),vr(n,function(f,g,y){Cr(u,o(f,g,y),f)}),u}function yE(n,o){var u={};return o=re(o,3),vr(n,function(f,g,y){Cr(u,g,o(f,g,y))}),u}var mE=Ln(function(n,o,u){So(n,o,u)}),md=Ln(function(n,o,u,f){So(n,o,u,f)}),bE=Rr(function(n,o){var u={};if(n==null)return u;var f=!1;o=Ke(o,function(y){return y=Kr(y,n),f||(f=y.length>1),y}),yr(n,Li(n),u),f&&(u=Zt(u,m|_|E,pb));for(var g=o.length;g--;)Oi(u,o[g]);return u});function _E(n,o){return bd(n,No(re(o)))}var EE=Rr(function(n,o){return n==null?{}:Vm(n,o)});function bd(n,o){if(n==null)return{};var u=Ke(Li(n),function(f){return[f]});return o=re(o),lf(n,u,function(f,g){return o(f,g[0])})}function SE(n,o,u){o=Kr(o,n);var f=-1,g=o.length;for(g||(g=1,n=t);++f<g;){var y=n==null?t:n[mr(o[f])];y===t&&(f=g,y=u),n=Ar(y)?y.call(n):y}return n}function wE(n,o,u){return n==null?n:ma(n,o,u)}function TE(n,o,u,f){return f=typeof f=="function"?f:t,n==null?n:ma(n,o,u,f)}var _d=If(dt),Ed=If($t);function CE(n,o,u){var f=ve(n),g=f||Xr(n)||jn(n);if(o=re(o,4),u==null){var y=n&&n.constructor;g?u=f?new y:[]:Ze(n)?u=Ar(y)?Mn(lo(n)):{}:u={}}return(g?Kt:vr)(n,function(S,C,A){return o(u,S,C,A)}),u}function xE(n,o){return n==null?!0:Oi(n,o)}function RE(n,o,u){return n==null?n:gf(n,o,Di(u))}function OE(n,o,u,f){return f=typeof f=="function"?f:t,n==null?n:gf(n,o,Di(u),f)}function Bn(n){return n==null?[]:ci(n,dt(n))}function AE(n){return n==null?[]:ci(n,$t(n))}function PE(n,o,u){return u===t&&(u=o,o=t),u!==t&&(u=tr(u),u=u===u?u:0),o!==t&&(o=tr(o),o=o===o?o:0),gn(tr(n),o,u)}function DE(n,o,u){return o=Pr(o),u===t?(u=o,o=0):u=Pr(u),n=tr(n),Nm(n,o,u)}function IE(n,o,u){if(u&&typeof u!="boolean"&&Ot(n,o,u)&&(o=u=t),u===t&&(typeof o=="boolean"?(u=o,o=t):typeof n=="boolean"&&(u=n,n=t)),n===t&&o===t?(n=0,o=1):(n=Pr(n),o===t?(o=n,n=0):o=Pr(o)),n>o){var f=n;n=o,o=f}if(u||n%1||o%1){var g=Gl();return bt(n+g*(o-n+ly("1e-"+((g+"").length-1))),o)}return Ci(n,o)}var FE=Nn(function(n,o,u){return o=o.toLowerCase(),n+(u?Sd(o):o)});function Sd(n){return Zi(De(n).toLowerCase())}function wd(n){return n=De(n),n&&n.replace(Mv,wy).replace(ey,"")}function $E(n,o,u){n=De(n),o=jt(o);var f=n.length;u=u===t?f:gn(ye(u),0,f);var g=u;return u-=o.length,u>=0&&n.slice(u,g)==o}function ME(n){return n=De(n),n&&Gs.test(n)?n.replace(ia,Ty):n}function LE(n){return n=De(n),n&&U.test(n)?n.replace(w,"\\$&"):n}var NE=Nn(function(n,o,u){return n+(u?"-":"")+o.toLowerCase()}),kE=Nn(function(n,o,u){return n+(u?" ":"")+o.toLowerCase()}),jE=xf("toLowerCase");function BE(n,o,u){n=De(n),o=ye(o);var f=o?Pn(n):0;if(!o||f>=o)return n;var g=(o-f)/2;return Oo(go(g),u)+n+Oo(ho(g),u)}function WE(n,o,u){n=De(n),o=ye(o);var f=o?Pn(n):0;return o&&f<o?n+Oo(o-f,u):n}function UE(n,o,u){n=De(n),o=ye(o);var f=o?Pn(n):0;return o&&f<o?Oo(o-f,u)+n:n}function HE(n,o,u){return u||o==null?o=0:o&&(o=+o),Jy(De(n).replace(J,""),o||0)}function GE(n,o,u){return(u?Ot(n,o,u):o===t)?o=1:o=ye(o),xi(De(n),o)}function qE(){var n=arguments,o=De(n[0]);return n.length<3?o:o.replace(n[1],n[2])}var YE=Nn(function(n,o,u){return n+(u?"_":"")+o.toLowerCase()});function zE(n,o,u){return u&&typeof u!="number"&&Ot(n,o,u)&&(o=u=t),u=u===t?q:u>>>0,u?(n=De(n),n&&(typeof o=="string"||o!=null&&!Ki(o))&&(o=jt(o),!o&&An(n))?Jr(ir(n),0,u):n.split(o,u)):[]}var VE=Nn(function(n,o,u){return n+(u?" ":"")+Zi(o)});function KE(n,o,u){return n=De(n),u=u==null?0:gn(ye(u),0,n.length),o=jt(o),n.slice(u,u+o.length)==o}function JE(n,o,u){var f=v.templateSettings;u&&Ot(n,o,u)&&(o=t),n=De(n),o=Bo({},o,f,Ff);var g=Bo({},o.imports,f.imports,Ff),y=dt(g),S=ci(g,y),C,A,L=0,N=o.interpolate||Za,B="__p += '",V=fi((o.escape||Za).source+"|"+N.source+"|"+(N===Ja?et:Za).source+"|"+(o.evaluate||Za).source+"|$","g"),ee="//# sourceURL="+(ke.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oy+"]")+`
18
+ `;n.replace(V,function(oe,Se,xe,Wt,At,Ut){return xe||(xe=Wt),B+=n.slice(L,Ut).replace(Lv,Cy),Se&&(C=!0,B+=`' +
19
19
  __e(`+Se+`) +
20
20
  '`),At&&(A=!0,B+=`';
21
21
  `+At+`;
@@ -31,64 +31,64 @@ __p += '`),xe&&(B+=`' +
31
31
  function print() { __p += __j.call(arguments, '') }
32
32
  `:`;
33
33
  `)+B+`return __p
34
- }`;var be=Td(function(){return Oe(m,ee+"return "+B).apply(t,S)});if(be.source=B,Vi(be))throw be;return be}function VE(r){return De(r).toLowerCase()}function KE(r){return De(r).toUpperCase()}function JE(r,o,u){if(r=De(r),r&&(u||o===t))return Il(r);if(!r||!(o=jt(o)))return r;var f=ir(r),g=ir(o),m=Fl(f,g),S=$l(f,g)+1;return Jr(f,m,S).join("")}function XE(r,o,u){if(r=De(r),r&&(u||o===t))return r.slice(0,Ll(r)+1);if(!r||!(o=jt(o)))return r;var f=ir(r),g=$l(f,ir(o))+1;return Jr(f,0,g).join("")}function ZE(r,o,u){if(r=De(r),r&&(u||o===t))return r.replace(J,"");if(!r||!(o=jt(o)))return r;var f=ir(r),g=Fl(f,ir(o));return Jr(f,g).join("")}function QE(r,o){var u=We,f=Te;if(Ze(o)){var g="separator"in o?o.separator:g;u="length"in o?me(o.length):u,f="omission"in o?jt(o.omission):f}r=De(r);var m=r.length;if(On(r)){var S=ir(r);m=S.length}if(u>=m)return r;var C=u-An(f);if(C<1)return f;var A=S?Jr(S,0,C).join(""):r.slice(0,C);if(g===t)return A+f;if(S&&(C+=A.length-C),Ki(g)){if(r.slice(C).search(g)){var L,N=A;for(g.global||(g=fi(g.source,De(zt.exec(g))+"g")),g.lastIndex=0;L=g.exec(N);)var B=L.index;A=A.slice(0,B===t?C:B)}}else if(r.indexOf(jt(g),C)!=C){var V=A.lastIndexOf(g);V>-1&&(A=A.slice(0,V))}return A+f}function eS(r){return r=De(r),r&&Va.test(r)?r.replace(za,Am):r}var tS=Ln(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),Zi=Cf("toUpperCase");function wd(r,o,u){return r=De(r),o=u?t:o,o===t?Tm(r)?Im(r):gm(r):r.match(o)||[]}var Td=_e(function(r,o){try{return Nt(r,t,o)}catch(u){return Vi(u)?u:new pe(u)}}),rS=Rr(function(r,o){return Kt(o,function(u){u=yr(u),Cr(r,u,Yi(r[u],r))}),r});function nS(r){var o=r==null?0:r.length,u=re();return r=o?Ke(r,function(f){if(typeof f[1]!="function")throw new Jt(c);return[u(f[0]),f[1]]}):[],_e(function(f){for(var g=-1;++g<o;){var m=r[g];if(Nt(m[0],this,f))return Nt(m[1],this,f)}})}function aS(r){return Ay(Zt(r,y))}function Qi(r){return function(){return r}}function oS(r,o){return r==null||r!==r?o:r}var sS=Rf(),iS=Rf(!0);function Mt(r){return r}function eu(r){return rf(typeof r=="function"?r:Zt(r,y))}function uS(r){return af(Zt(r,y))}function cS(r,o){return of(r,Zt(o,y))}var lS=_e(function(r,o){return function(u){return va(u,r,o)}}),fS=_e(function(r,o){return function(u){return va(r,u,o)}});function tu(r,o,u){var f=dt(o),g=Eo(o,f);u==null&&!(Ze(o)&&(g.length||!f.length))&&(u=o,o=r,r=this,g=Eo(o,dt(o)));var m=!(Ze(u)&&"chain"in u)||!!u.chain,S=Ar(r);return Kt(g,function(C){var A=o[C];r[C]=A,S&&(r.prototype[C]=function(){var L=this.__chain__;if(m||L){var N=r(this.__wrapped__),B=N.__actions__=It(this.__actions__);return B.push({func:A,args:arguments,thisArg:r}),N.__chain__=L,N}return A.apply(r,Gr([this.value()],arguments))})}),r}function dS(){return gt._===this&&(gt._=km),this}function ru(){}function pS(r){return r=me(r),_e(function(o){return sf(o,r)})}var hS=Fi(Ke),gS=Fi(Rl),vS=Fi(ai);function Cd(r){return Bi(r)?oi(yr(r)):Yy(r)}function mS(r){return function(o){return r==null?t:vn(r,o)}}var yS=Af(),bS=Af(!0);function nu(){return[]}function au(){return!1}function _S(){return{}}function ES(){return""}function SS(){return!0}function wS(r,o){if(r=me(r),r<1||r>rt)return[];var u=q,f=bt(r,q);o=re(o),r-=q;for(var g=ui(f,o);++u<r;)o(u);return g}function TS(r){return ve(r)?Ke(r,yr):Bt(r)?[r]:It(qf(De(r)))}function CS(r){var o=++Lm;return De(r)+o}var xS=Ro(function(r,o){return r+o},0),RS=$i("ceil"),OS=Ro(function(r,o){return r/o},1),AS=$i("floor");function PS(r){return r&&r.length?_o(r,Mt,bi):t}function DS(r,o){return r&&r.length?_o(r,re(o,2),bi):t}function IS(r){return Pl(r,Mt)}function FS(r,o){return Pl(r,re(o,2))}function $S(r){return r&&r.length?_o(r,Mt,wi):t}function MS(r,o){return r&&r.length?_o(r,re(o,2),wi):t}var LS=Ro(function(r,o){return r*o},1),NS=$i("round"),kS=Ro(function(r,o){return r-o},0);function jS(r){return r&&r.length?ii(r,Mt):0}function BS(r,o){return r&&r.length?ii(r,re(o,2)):0}return v.after=u_,v.ary=rd,v.assign=K_,v.assignIn=vd,v.assignInWith=Bo,v.assignWith=J_,v.at=X_,v.before=nd,v.bind=Yi,v.bindAll=rS,v.bindKey=ad,v.castArray=__,v.chain=Qf,v.chunk=Ab,v.compact=Pb,v.concat=Db,v.cond=nS,v.conforms=aS,v.constant=Qi,v.countBy=j0,v.create=Z_,v.curry=od,v.curryRight=sd,v.debounce=id,v.defaults=Q_,v.defaultsDeep=eE,v.defer=c_,v.delay=l_,v.difference=Ib,v.differenceBy=Fb,v.differenceWith=$b,v.drop=Mb,v.dropRight=Lb,v.dropRightWhile=Nb,v.dropWhile=kb,v.fill=jb,v.filter=W0,v.flatMap=G0,v.flatMapDeep=q0,v.flatMapDepth=Y0,v.flatten=Kf,v.flattenDeep=Bb,v.flattenDepth=Wb,v.flip=f_,v.flow=sS,v.flowRight=iS,v.fromPairs=Ub,v.functions=iE,v.functionsIn=uE,v.groupBy=z0,v.initial=Gb,v.intersection=qb,v.intersectionBy=Yb,v.intersectionWith=zb,v.invert=lE,v.invertBy=fE,v.invokeMap=K0,v.iteratee=eu,v.keyBy=J0,v.keys=dt,v.keysIn=$t,v.map=$o,v.mapKeys=pE,v.mapValues=hE,v.matches=uS,v.matchesProperty=cS,v.memoize=Lo,v.merge=gE,v.mergeWith=md,v.method=lS,v.methodOf=fS,v.mixin=tu,v.negate=No,v.nthArg=pS,v.omit=vE,v.omitBy=mE,v.once=d_,v.orderBy=X0,v.over=hS,v.overArgs=p_,v.overEvery=gS,v.overSome=vS,v.partial=zi,v.partialRight=ud,v.partition=Z0,v.pick=yE,v.pickBy=yd,v.property=Cd,v.propertyOf=mS,v.pull=Xb,v.pullAll=Xf,v.pullAllBy=Zb,v.pullAllWith=Qb,v.pullAt=e0,v.range=yS,v.rangeRight=bS,v.rearg=h_,v.reject=t_,v.remove=t0,v.rest=g_,v.reverse=Gi,v.sampleSize=n_,v.set=_E,v.setWith=EE,v.shuffle=a_,v.slice=r0,v.sortBy=i_,v.sortedUniq=c0,v.sortedUniqBy=l0,v.split=GE,v.spread=v_,v.tail=f0,v.take=d0,v.takeRight=p0,v.takeRightWhile=h0,v.takeWhile=g0,v.tap=P0,v.throttle=m_,v.thru=Fo,v.toArray=pd,v.toPairs=bd,v.toPairsIn=_d,v.toPath=TS,v.toPlainObject=gd,v.transform=SE,v.unary=y_,v.union=v0,v.unionBy=m0,v.unionWith=y0,v.uniq=b0,v.uniqBy=_0,v.uniqWith=E0,v.unset=wE,v.unzip=qi,v.unzipWith=Zf,v.update=TE,v.updateWith=CE,v.values=jn,v.valuesIn=xE,v.without=S0,v.words=wd,v.wrap=b_,v.xor=w0,v.xorBy=T0,v.xorWith=C0,v.zip=x0,v.zipObject=R0,v.zipObjectDeep=O0,v.zipWith=A0,v.entries=bd,v.entriesIn=_d,v.extend=vd,v.extendWith=Bo,tu(v,v),v.add=xS,v.attempt=Td,v.camelCase=PE,v.capitalize=Ed,v.ceil=RS,v.clamp=RE,v.clone=E_,v.cloneDeep=w_,v.cloneDeepWith=T_,v.cloneWith=S_,v.conformsTo=C_,v.deburr=Sd,v.defaultTo=oS,v.divide=OS,v.endsWith=DE,v.eq=cr,v.escape=IE,v.escapeRegExp=FE,v.every=B0,v.find=U0,v.findIndex=zf,v.findKey=tE,v.findLast=H0,v.findLastIndex=Vf,v.findLastKey=rE,v.floor=AS,v.forEach=ed,v.forEachRight=td,v.forIn=nE,v.forInRight=aE,v.forOwn=oE,v.forOwnRight=sE,v.get=Ji,v.gt=x_,v.gte=R_,v.has=cE,v.hasIn=Xi,v.head=Jf,v.identity=Mt,v.includes=V0,v.indexOf=Hb,v.inRange=OE,v.invoke=dE,v.isArguments=bn,v.isArray=ve,v.isArrayBuffer=O_,v.isArrayLike=Ft,v.isArrayLikeObject=nt,v.isBoolean=A_,v.isBuffer=Xr,v.isDate=P_,v.isElement=D_,v.isEmpty=I_,v.isEqual=F_,v.isEqualWith=$_,v.isError=Vi,v.isFinite=M_,v.isFunction=Ar,v.isInteger=cd,v.isLength=ko,v.isMap=ld,v.isMatch=L_,v.isMatchWith=N_,v.isNaN=k_,v.isNative=j_,v.isNil=W_,v.isNull=B_,v.isNumber=fd,v.isObject=Ze,v.isObjectLike=tt,v.isPlainObject=Sa,v.isRegExp=Ki,v.isSafeInteger=U_,v.isSet=dd,v.isString=jo,v.isSymbol=Bt,v.isTypedArray=kn,v.isUndefined=H_,v.isWeakMap=G_,v.isWeakSet=q_,v.join=Vb,v.kebabCase=$E,v.last=er,v.lastIndexOf=Kb,v.lowerCase=ME,v.lowerFirst=LE,v.lt=Y_,v.lte=z_,v.max=PS,v.maxBy=DS,v.mean=IS,v.meanBy=FS,v.min=$S,v.minBy=MS,v.stubArray=nu,v.stubFalse=au,v.stubObject=_S,v.stubString=ES,v.stubTrue=SS,v.multiply=LS,v.nth=Jb,v.noConflict=dS,v.noop=ru,v.now=Mo,v.pad=NE,v.padEnd=kE,v.padStart=jE,v.parseInt=BE,v.random=AE,v.reduce=Q0,v.reduceRight=e_,v.repeat=WE,v.replace=UE,v.result=bE,v.round=NS,v.runInContext=R,v.sample=r_,v.size=o_,v.snakeCase=HE,v.some=s_,v.sortedIndex=n0,v.sortedIndexBy=a0,v.sortedIndexOf=o0,v.sortedLastIndex=s0,v.sortedLastIndexBy=i0,v.sortedLastIndexOf=u0,v.startCase=qE,v.startsWith=YE,v.subtract=kS,v.sum=jS,v.sumBy=BS,v.template=zE,v.times=wS,v.toFinite=Pr,v.toInteger=me,v.toLength=hd,v.toLower=VE,v.toNumber=tr,v.toSafeInteger=V_,v.toString=De,v.toUpper=KE,v.trim=JE,v.trimEnd=XE,v.trimStart=ZE,v.truncate=QE,v.unescape=eS,v.uniqueId=CS,v.upperCase=tS,v.upperFirst=Zi,v.each=ed,v.eachRight=td,v.first=Jf,tu(v,function(){var r={};return vr(v,function(o,u){ke.call(v.prototype,u)||(r[u]=o)}),r}(),{chain:!1}),v.VERSION=a,Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),Kt(["drop","take"],function(r,o){we.prototype[r]=function(u){u=u===t?1:ct(me(u),0);var f=this.__filtered__&&!o?new we(this):this.clone();return f.__filtered__?f.__takeCount__=bt(u,f.__takeCount__):f.__views__.push({size:bt(u,q),type:r+(f.__dir__<0?"Right":"")}),f},we.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),Kt(["filter","map","takeWhile"],function(r,o){var u=o+1,f=u==Pe||u==Qe;we.prototype[r]=function(g){var m=this.clone();return m.__iteratees__.push({iteratee:re(g,3),type:u}),m.__filtered__=m.__filtered__||f,m}}),Kt(["head","last"],function(r,o){var u="take"+(o?"Right":"");we.prototype[r]=function(){return this[u](1).value()[0]}}),Kt(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");we.prototype[r]=function(){return this.__filtered__?new we(this):this[u](1)}}),we.prototype.compact=function(){return this.filter(Mt)},we.prototype.find=function(r){return this.filter(r).head()},we.prototype.findLast=function(r){return this.reverse().find(r)},we.prototype.invokeMap=_e(function(r,o){return typeof r=="function"?new we(this):this.map(function(u){return va(u,r,o)})}),we.prototype.reject=function(r){return this.filter(No(re(r)))},we.prototype.slice=function(r,o){r=me(r);var u=this;return u.__filtered__&&(r>0||o<0)?new we(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==t&&(o=me(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},we.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},we.prototype.toArray=function(){return this.take(q)},vr(we.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),f=/^(?:head|last)$/.test(o),g=v[f?"take"+(o=="last"?"Right":""):o],m=f||/^find/.test(o);g&&(v.prototype[o]=function(){var S=this.__wrapped__,C=f?[1]:arguments,A=S instanceof we,L=C[0],N=A||ve(S),B=function(Se){var xe=g.apply(v,Gr([Se],C));return f&&V?xe[0]:xe};N&&u&&typeof L=="function"&&L.length!=1&&(A=N=!1);var V=this.__chain__,ee=!!this.__actions__.length,ae=m&&!V,be=A&&!ee;if(!m&&N){S=be?S:new we(this);var oe=r.apply(S,C);return oe.__actions__.push({func:Fo,args:[B],thisArg:t}),new Xt(oe,V)}return ae&&be?r.apply(this,C):(oe=this.thru(B),ae?f?oe.value()[0]:oe.value():oe)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(r){var o=ao[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var g=arguments;if(f&&!this.__chain__){var m=this.value();return o.apply(ve(m)?m:[],g)}return this[u](function(S){return o.apply(ve(S)?S:[],g)})}}),vr(we.prototype,function(r,o){var u=v[o];if(u){var f=u.name+"";ke.call(Fn,f)||(Fn[f]=[]),Fn[f].push({name:o,func:u})}}),Fn[xo(t,P).name]=[{name:"wrapper",func:t}],we.prototype.clone=ey,we.prototype.reverse=ty,we.prototype.value=ry,v.prototype.at=D0,v.prototype.chain=I0,v.prototype.commit=F0,v.prototype.next=$0,v.prototype.plant=L0,v.prototype.reverse=N0,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=k0,v.prototype.first=v.prototype.head,ca&&(v.prototype[ca]=M0),v},Pn=Fm();fn?((fn.exports=Pn)._=Pn,ei._=Pn):gt._=Pn}).call(Fr)})(cs,cs.exports);var He=cs.exports;const wh=_s(He);function Cc(e){return`Debugger/${e}`}function Th(e,n){var a;const t=(a=n.name)==null?void 0:a.replace(/\.(4dm|4qs)$/,"");return`#${e} ${t}`}const fR=typeof process=="object"&&process&&process.platform==="win32";var dR=fR?{sep:"\\"}:{sep:"/"},pR=Ch;function Ch(e,n,t){e instanceof RegExp&&(e=up(e,t)),n instanceof RegExp&&(n=up(n,t));var a=xh(e,n,t);return a&&{start:a[0],end:a[1],pre:t.slice(0,a[0]),body:t.slice(a[0]+e.length,a[1]),post:t.slice(a[1]+n.length)}}function up(e,n){var t=n.match(e);return t?t[0]:null}Ch.range=xh;function xh(e,n,t){var a,s,i,c,l,d=t.indexOf(e),p=t.indexOf(n,d+1),h=d;if(d>=0&&p>0){if(e===n)return[d,p];for(a=[],i=t.length;h>=0&&!l;)h==d?(a.push(h),d=t.indexOf(e,h+1)):a.length==1?l=[a.pop(),p]:(s=a.pop(),s<i&&(i=s,c=p),p=t.indexOf(n,h+1)),h=d<p&&d>=0?d:p;a.length&&(l=[i,c])}return l}var Rh=pR,hR=mR,Oh="\0SLASH"+Math.random()+"\0",Ah="\0OPEN"+Math.random()+"\0",xc="\0CLOSE"+Math.random()+"\0",Ph="\0COMMA"+Math.random()+"\0",Dh="\0PERIOD"+Math.random()+"\0";function vu(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function gR(e){return e.split("\\\\").join(Oh).split("\\{").join(Ah).split("\\}").join(xc).split("\\,").join(Ph).split("\\.").join(Dh)}function vR(e){return e.split(Oh).join("\\").split(Ah).join("{").split(xc).join("}").split(Ph).join(",").split(Dh).join(".")}function Ih(e){if(!e)return[""];var n=[],t=Rh("{","}",e);if(!t)return e.split(",");var a=t.pre,s=t.body,i=t.post,c=a.split(",");c[c.length-1]+="{"+s+"}";var l=Ih(i);return i.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),n.push.apply(n,c),n}function mR(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),xa(gR(e),!0).map(vR)):[]}function yR(e){return"{"+e+"}"}function bR(e){return/^-?0\d/.test(e)}function _R(e,n){return e<=n}function ER(e,n){return e>=n}function xa(e,n){var t=[],a=Rh("{","}",e);if(!a)return[e];var s=a.pre,i=a.post.length?xa(a.post,!1):[""];if(/\$$/.test(a.pre))for(var c=0;c<i.length;c++){var l=s+"{"+a.body+"}"+i[c];t.push(l)}else{var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=d||p,y=a.body.indexOf(",")>=0;if(!h&&!y)return a.post.match(/,.*\}/)?(e=a.pre+"{"+a.body+xc+a.post,xa(e)):[e];var _;if(h)_=a.body.split(/\.\./);else if(_=Ih(a.body),_.length===1&&(_=xa(_[0],!1).map(yR),_.length===1))return i.map(function(We){return a.pre+_[0]+We});var E;if(h){var T=vu(_[0]),x=vu(_[1]),D=Math.max(_[0].length,_[1].length),P=_.length==3?Math.abs(vu(_[2])):1,j=_R,M=x<T;M&&(P*=-1,j=ER);var k=_.some(bR);E=[];for(var O=T;j(O,x);O+=P){var z;if(p)z=String.fromCharCode(O),z==="\\"&&(z="");else if(z=String(O),k){var H=D-z.length;if(H>0){var Y=new Array(H+1).join("0");O<0?z="-"+Y+z.slice(1):z=Y+z}}E.push(z)}}else{E=[];for(var te=0;te<_.length;te++)E.push.apply(E,xa(_[te],!1))}for(var te=0;te<E.length;te++)for(var c=0;c<i.length;c++){var l=s+E[te]+i[c];(!n||h||l)&&t.push(l)}}return t}const Ht=Fh=(e,n,t={})=>(ls(n),!t.nocomment&&n.charAt(0)==="#"?!1:new Os(n,t).match(e));var Fh=Ht;const Yu=dR;Ht.sep=Yu.sep;const fr=Symbol("globstar **");Ht.GLOBSTAR=fr;const SR=hR,cp={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},zu="[^/]",mu=zu+"*?",wR="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",TR="(?:(?!(?:\\/|^)\\.).)*?",$h=e=>e.split("").reduce((n,t)=>(n[t]=!0,n),{}),lp=$h("().*{}+?[]^$\\!"),CR=$h("[.("),fp=/\/+/;Ht.filter=(e,n={})=>(t,a,s)=>Ht(t,e,n);const Zr=(e,n={})=>{const t={};return Object.keys(e).forEach(a=>t[a]=e[a]),Object.keys(n).forEach(a=>t[a]=n[a]),t};Ht.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ht;const n=Ht,t=(a,s,i)=>n(a,s,Zr(e,i));return t.Minimatch=class extends n.Minimatch{constructor(s,i){super(s,Zr(e,i))}},t.Minimatch.defaults=a=>n.defaults(Zr(e,a)).Minimatch,t.filter=(a,s)=>n.filter(a,Zr(e,s)),t.defaults=a=>n.defaults(Zr(e,a)),t.makeRe=(a,s)=>n.makeRe(a,Zr(e,s)),t.braceExpand=(a,s)=>n.braceExpand(a,Zr(e,s)),t.match=(a,s,i)=>n.match(a,s,Zr(e,i)),t};Ht.braceExpand=(e,n)=>Mh(e,n);const Mh=(e,n={})=>(ls(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:SR(e)),xR=1024*64,ls=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>xR)throw new TypeError("pattern is too long")},yu=Symbol("subparse");Ht.makeRe=(e,n)=>new Os(e,n||{}).makeRe();Ht.match=(e,n,t={})=>{const a=new Os(n,t);return e=e.filter(s=>a.match(s)),a.options.nonull&&!e.length&&e.push(n),e};const RR=e=>e.replace(/\\(.)/g,"$1"),OR=e=>e.replace(/\\([^-\]])/g,"$1"),AR=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),PR=e=>e.replace(/[[\]\\]/g,"\\$&");class Os{constructor(n,t){ls(n),t||(t={}),this.options=t,this.set=[],this.pattern=n,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const n=this.pattern,t=this.options;if(!t.nocomment&&n.charAt(0)==="#"){this.comment=!0;return}if(!n){this.empty=!0;return}this.parseNegate();let a=this.globSet=this.braceExpand();t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,a),a=this.globParts=a.map(s=>s.split(fp)),this.debug(this.pattern,a),a=a.map((s,i,c)=>s.map(this.parse,this)),this.debug(this.pattern,a),a=a.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,a),this.set=a}parseNegate(){if(this.options.nonegate)return;const n=this.pattern;let t=!1,a=0;for(let s=0;s<n.length&&n.charAt(s)==="!";s++)t=!t,a++;a&&(this.pattern=n.slice(a)),this.negate=t}matchOne(n,t,a){var s=this.options;this.debug("matchOne",{this:this,file:n,pattern:t}),this.debug("matchOne",n.length,t.length);for(var i=0,c=0,l=n.length,d=t.length;i<l&&c<d;i++,c++){this.debug("matchOne loop");var p=t[c],h=n[i];if(this.debug(t,p,h),p===!1)return!1;if(p===fr){this.debug("GLOBSTAR",[t,p,h]);var y=i,_=c+1;if(_===d){for(this.debug("** at the end");i<l;i++)if(n[i]==="."||n[i]===".."||!s.dot&&n[i].charAt(0)===".")return!1;return!0}for(;y<l;){var E=n[y];if(this.debug(`
35
- globstar while`,n,y,t,_,E),this.matchOne(n.slice(y),t.slice(_),a))return this.debug("globstar found match!",y,l,E),!0;if(E==="."||E===".."||!s.dot&&E.charAt(0)==="."){this.debug("dot detected!",n,y,t,_);break}this.debug("globstar swallow a segment, and continue"),y++}return!!(a&&(this.debug(`
36
- >>> no match, partial?`,n,y,t,_),y===l))}var T;if(typeof p=="string"?(T=h===p,this.debug("string match",p,h,T)):(T=h.match(p),this.debug("pattern match",p,h,T)),!T)return!1}if(i===l&&c===d)return!0;if(i===l)return a;if(c===d)return i===l-1&&n[i]==="";throw new Error("wtf?")}braceExpand(){return Mh(this.pattern,this.options)}parse(n,t){ls(n);const a=this.options;if(n==="**")if(a.noglobstar)n="*";else return fr;if(n==="")return"";let s="",i=!1,c=!1;const l=[],d=[];let p,h=!1,y=-1,_=-1,E,T,x,D=n.charAt(0)===".",P=a.dot||D;const j=()=>D?"":P?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=H=>H.charAt(0)==="."?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=()=>{if(p){switch(p){case"*":s+=mu,i=!0;break;case"?":s+=zu,i=!0;break;default:s+="\\"+p;break}this.debug("clearStateChar %j %j",p,s),p=!1}};for(let H=0,Y;H<n.length&&(Y=n.charAt(H));H++){if(this.debug("%s %s %s %j",n,H,s,Y),c){if(Y==="/")return!1;lp[Y]&&(s+="\\"),s+=Y,c=!1;continue}switch(Y){case"/":return!1;case"\\":if(h&&n.charAt(H+1)==="-"){s+=Y;continue}k(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",n,H,s,Y),h){this.debug(" in class"),Y==="!"&&H===_+1&&(Y="^"),s+=Y;continue}this.debug("call clearStateChar %j",p),k(),p=Y,a.noext&&k();continue;case"(":{if(h){s+="(";continue}if(!p){s+="\\(";continue}const te={type:p,start:H-1,reStart:s.length,open:cp[p].open,close:cp[p].close};this.debug(this.pattern," ",te),l.push(te),s+=te.open,te.start===0&&te.type!=="!"&&(D=!0,s+=M(n.slice(H+1))),this.debug("plType %j %j",p,s),p=!1;continue}case")":{const te=l[l.length-1];if(h||!te){s+="\\)";continue}l.pop(),k(),i=!0,T=te,s+=T.close,T.type==="!"&&d.push(Object.assign(T,{reEnd:s.length}));continue}case"|":{const te=l[l.length-1];if(h||!te){s+="\\|";continue}k(),s+="|",te.start===0&&te.type!=="!"&&(D=!0,s+=M(n.slice(H+1)));continue}case"[":if(k(),h){s+="\\"+Y;continue}h=!0,_=H,y=s.length,s+=Y;continue;case"]":if(H===_+1||!h){s+="\\"+Y;continue}E=n.substring(_+1,H);try{RegExp("["+PR(OR(E))+"]"),s+=Y}catch{s=s.substring(0,y)+"(?:$.)"}i=!0,h=!1;continue;default:k(),lp[Y]&&!(Y==="^"&&h)&&(s+="\\"),s+=Y;break}}for(h&&(E=n.slice(_+1),x=this.parse(E,yu),s=s.substring(0,y)+"\\["+x[0],i=i||x[1]),T=l.pop();T;T=l.pop()){let H;H=s.slice(T.reStart+T.open.length),this.debug("setting tail",s,T),H=H.replace(/((?:\\{2}){0,64})(\\?)\|/g,(te,We,Te)=>(Te||(Te="\\"),We+We+Te+"|")),this.debug(`tail=%j
37
- %s`,H,H,T,s);const Y=T.type==="*"?mu:T.type==="?"?zu:"\\"+T.type;i=!0,s=s.slice(0,T.reStart)+Y+"\\("+H}k(),c&&(s+="\\\\");const O=CR[s.charAt(0)];for(let H=d.length-1;H>-1;H--){const Y=d[H],te=s.slice(0,Y.reStart),We=s.slice(Y.reStart,Y.reEnd-8);let Te=s.slice(Y.reEnd);const st=s.slice(Y.reEnd-8,Y.reEnd)+Te,X=te.split(")").length,Pe=te.split("(").length-X;let it=Te;for(let Ge=0;Ge<Pe;Ge++)it=it.replace(/\)[+*?]?/,"");Te=it;const Qe=Te===""&&t!==yu?"(?:$|\\/)":"";s=te+We+Te+Qe+st}if(s!==""&&i&&(s="(?=.)"+s),O&&(s=j()+s),t===yu)return[s,i];if(a.nocase&&!i&&(i=n.toUpperCase()!==n.toLowerCase()),!i)return RR(n);const z=a.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",z),{_glob:n,_src:s})}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 t=this.options,a=t.noglobstar?mu:t.dot?wR:TR,s=t.nocase?"i":"";let i=n.map(c=>(c=c.map(l=>typeof l=="string"?AR(l):l===fr?fr:l._src).reduce((l,d)=>(l[l.length-1]===fr&&d===fr||l.push(d),l),[]),c.forEach((l,d)=>{l!==fr||c[d-1]===fr||(d===0?c.length>1?c[d+1]="(?:\\/|"+a+"\\/)?"+c[d+1]:c[d]=a:d===c.length-1?c[d-1]+="(?:\\/|"+a+")?":(c[d-1]+="(?:\\/|\\/"+a+"\\/)"+c[d+1],c[d+1]=fr))}),c.filter(l=>l!==fr).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch{this.regexp=!1}return this.regexp}match(n,t=this.partial){if(this.debug("match",n,this.pattern),this.comment)return!1;if(this.empty)return n==="";if(n==="/"&&t)return!0;const a=this.options;Yu.sep!=="/"&&(n=n.split(Yu.sep).join("/")),n=n.split(fp),this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let i;for(let c=n.length-1;c>=0&&(i=n[c],!i);c--);for(let c=0;c<s.length;c++){const l=s[c];let d=n;if(a.matchBase&&l.length===1&&(d=[i]),this.matchOne(d,l,t))return a.flipNegate?!0:!this.negate}return a.flipNegate?!1:this.negate}static defaults(n){return Ht.defaults(n).Minimatch}}Ht.Minimatch=Os;const Lh=_s(Fh),Nh=[{pattern:b.ROLES_TAB_PATH,editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:b.MODEL_TAB_PATH,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"}}],kh=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function jh(e){const n=e.split("/");return n.pop(),n.join("/")}function pr(e){const n=Nh.find(({pattern:t})=>Lh(e,t,{nocase:!0}));return n||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function Bh(e){const n=kh.find(({pattern:t})=>Lh(e,t,{nocase:!0}));return n?n.type:"text"}var Vu=function(e,n){return Vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])},Vu(e,n)};function As(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Vu(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}function Ku(e){var n=typeof Symbol=="function"&&Symbol.iterator,t=n&&e[n],a=0;if(t)return t.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 fs(e,n){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var a=t.call(e),s,i=[],c;try{for(;(n===void 0||n-- >0)&&!(s=a.next()).done;)i.push(s.value)}catch(l){c={error:l}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(c)throw c.error}}return i}function ds(e,n,t){if(t||arguments.length===2)for(var a=0,s=n.length,i;a<s;a++)(i||!(a in n))&&(i||(i=Array.prototype.slice.call(n,0,a)),i[a]=n[a]);return e.concat(i||Array.prototype.slice.call(n))}function $r(e){return typeof e=="function"}function Wh(e){var n=function(a){Error.call(a),a.stack=new Error().stack},t=e(n);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var bu=Wh(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
34
+ }`;var be=Cd(function(){return Oe(y,ee+"return "+B).apply(t,S)});if(be.source=B,Vi(be))throw be;return be}function XE(n){return De(n).toLowerCase()}function ZE(n){return De(n).toUpperCase()}function QE(n,o,u){if(n=De(n),n&&(u||o===t))return Fl(n);if(!n||!(o=jt(o)))return n;var f=ir(n),g=ir(o),y=$l(f,g),S=Ml(f,g)+1;return Jr(f,y,S).join("")}function eS(n,o,u){if(n=De(n),n&&(u||o===t))return n.slice(0,Nl(n)+1);if(!n||!(o=jt(o)))return n;var f=ir(n),g=Ml(f,ir(o))+1;return Jr(f,0,g).join("")}function tS(n,o,u){if(n=De(n),n&&(u||o===t))return n.replace(J,"");if(!n||!(o=jt(o)))return n;var f=ir(n),g=$l(f,ir(o));return Jr(f,g).join("")}function rS(n,o){var u=Ue,f=Te;if(Ze(o)){var g="separator"in o?o.separator:g;u="length"in o?ye(o.length):u,f="omission"in o?jt(o.omission):f}n=De(n);var y=n.length;if(An(n)){var S=ir(n);y=S.length}if(u>=y)return n;var C=u-Pn(f);if(C<1)return f;var A=S?Jr(S,0,C).join(""):n.slice(0,C);if(g===t)return A+f;if(S&&(C+=A.length-C),Ki(g)){if(n.slice(C).search(g)){var L,N=A;for(g.global||(g=fi(g.source,De(zt.exec(g))+"g")),g.lastIndex=0;L=g.exec(N);)var B=L.index;A=A.slice(0,B===t?C:B)}}else if(n.indexOf(jt(g),C)!=C){var V=A.lastIndexOf(g);V>-1&&(A=A.slice(0,V))}return A+f}function nS(n){return n=De(n),n&&Va.test(n)?n.replace(za,Iy):n}var aS=Nn(function(n,o,u){return n+(u?" ":"")+o.toUpperCase()}),Zi=xf("toUpperCase");function Td(n,o,u){return n=De(n),o=u?t:o,o===t?Ry(n)?My(n):my(n):n.match(o)||[]}var Cd=_e(function(n,o){try{return Nt(n,t,o)}catch(u){return Vi(u)?u:new pe(u)}}),oS=Rr(function(n,o){return Kt(o,function(u){u=mr(u),Cr(n,u,Yi(n[u],n))}),n});function sS(n){var o=n==null?0:n.length,u=re();return n=o?Ke(n,function(f){if(typeof f[1]!="function")throw new Jt(c);return[u(f[0]),f[1]]}):[],_e(function(f){for(var g=-1;++g<o;){var y=n[g];if(Nt(y[0],this,f))return Nt(y[1],this,f)}})}function iS(n){return Im(Zt(n,m))}function Qi(n){return function(){return n}}function uS(n,o){return n==null||n!==n?o:n}var cS=Of(),lS=Of(!0);function Mt(n){return n}function eu(n){return nf(typeof n=="function"?n:Zt(n,m))}function fS(n){return of(Zt(n,m))}function dS(n,o){return sf(n,Zt(o,m))}var pS=_e(function(n,o){return function(u){return va(u,n,o)}}),hS=_e(function(n,o){return function(u){return va(n,u,o)}});function tu(n,o,u){var f=dt(o),g=Eo(o,f);u==null&&!(Ze(o)&&(g.length||!f.length))&&(u=o,o=n,n=this,g=Eo(o,dt(o)));var y=!(Ze(u)&&"chain"in u)||!!u.chain,S=Ar(n);return Kt(g,function(C){var A=o[C];n[C]=A,S&&(n.prototype[C]=function(){var L=this.__chain__;if(y||L){var N=n(this.__wrapped__),B=N.__actions__=It(this.__actions__);return B.push({func:A,args:arguments,thisArg:n}),N.__chain__=L,N}return A.apply(n,Gr([this.value()],arguments))})}),n}function gS(){return gt._===this&&(gt._=Wy),this}function ru(){}function vS(n){return n=ye(n),_e(function(o){return uf(o,n)})}var yS=Fi(Ke),mS=Fi(Ol),bS=Fi(ai);function xd(n){return Bi(n)?oi(mr(n)):Km(n)}function _S(n){return function(o){return n==null?t:vn(n,o)}}var ES=Pf(),SS=Pf(!0);function nu(){return[]}function au(){return!1}function wS(){return{}}function TS(){return""}function CS(){return!0}function xS(n,o){if(n=ye(n),n<1||n>rt)return[];var u=q,f=bt(n,q);o=re(o),n-=q;for(var g=ui(f,o);++u<n;)o(u);return g}function RS(n){return ve(n)?Ke(n,mr):Bt(n)?[n]:It(Yf(De(n)))}function OS(n){var o=++jy;return De(n)+o}var AS=Ro(function(n,o){return n+o},0),PS=$i("ceil"),DS=Ro(function(n,o){return n/o},1),IS=$i("floor");function FS(n){return n&&n.length?_o(n,Mt,bi):t}function $S(n,o){return n&&n.length?_o(n,re(o,2),bi):t}function MS(n){return Dl(n,Mt)}function LS(n,o){return Dl(n,re(o,2))}function NS(n){return n&&n.length?_o(n,Mt,wi):t}function kS(n,o){return n&&n.length?_o(n,re(o,2),wi):t}var jS=Ro(function(n,o){return n*o},1),BS=$i("round"),WS=Ro(function(n,o){return n-o},0);function US(n){return n&&n.length?ii(n,Mt):0}function HS(n,o){return n&&n.length?ii(n,re(o,2)):0}return v.after=f_,v.ary=nd,v.assign=Z_,v.assignIn=yd,v.assignInWith=Bo,v.assignWith=Q_,v.at=eE,v.before=ad,v.bind=Yi,v.bindAll=oS,v.bindKey=od,v.castArray=w_,v.chain=ed,v.chunk=Ib,v.compact=Fb,v.concat=$b,v.cond=sS,v.conforms=iS,v.constant=Qi,v.countBy=U0,v.create=tE,v.curry=sd,v.curryRight=id,v.debounce=ud,v.defaults=rE,v.defaultsDeep=nE,v.defer=d_,v.delay=p_,v.difference=Mb,v.differenceBy=Lb,v.differenceWith=Nb,v.drop=kb,v.dropRight=jb,v.dropRightWhile=Bb,v.dropWhile=Wb,v.fill=Ub,v.filter=G0,v.flatMap=z0,v.flatMapDeep=V0,v.flatMapDepth=K0,v.flatten=Jf,v.flattenDeep=Hb,v.flattenDepth=Gb,v.flip=h_,v.flow=cS,v.flowRight=lS,v.fromPairs=qb,v.functions=lE,v.functionsIn=fE,v.groupBy=J0,v.initial=zb,v.intersection=Vb,v.intersectionBy=Kb,v.intersectionWith=Jb,v.invert=pE,v.invertBy=hE,v.invokeMap=Z0,v.iteratee=eu,v.keyBy=Q0,v.keys=dt,v.keysIn=$t,v.map=$o,v.mapKeys=vE,v.mapValues=yE,v.matches=fS,v.matchesProperty=dS,v.memoize=Lo,v.merge=mE,v.mergeWith=md,v.method=pS,v.methodOf=hS,v.mixin=tu,v.negate=No,v.nthArg=vS,v.omit=bE,v.omitBy=_E,v.once=g_,v.orderBy=e_,v.over=yS,v.overArgs=v_,v.overEvery=mS,v.overSome=bS,v.partial=zi,v.partialRight=cd,v.partition=t_,v.pick=EE,v.pickBy=bd,v.property=xd,v.propertyOf=_S,v.pull=e0,v.pullAll=Zf,v.pullAllBy=t0,v.pullAllWith=r0,v.pullAt=n0,v.range=ES,v.rangeRight=SS,v.rearg=y_,v.reject=a_,v.remove=a0,v.rest=m_,v.reverse=Gi,v.sampleSize=s_,v.set=wE,v.setWith=TE,v.shuffle=i_,v.slice=o0,v.sortBy=l_,v.sortedUniq=d0,v.sortedUniqBy=p0,v.split=zE,v.spread=b_,v.tail=h0,v.take=g0,v.takeRight=v0,v.takeRightWhile=y0,v.takeWhile=m0,v.tap=F0,v.throttle=__,v.thru=Fo,v.toArray=hd,v.toPairs=_d,v.toPairsIn=Ed,v.toPath=RS,v.toPlainObject=vd,v.transform=CE,v.unary=E_,v.union=b0,v.unionBy=_0,v.unionWith=E0,v.uniq=S0,v.uniqBy=w0,v.uniqWith=T0,v.unset=xE,v.unzip=qi,v.unzipWith=Qf,v.update=RE,v.updateWith=OE,v.values=Bn,v.valuesIn=AE,v.without=C0,v.words=Td,v.wrap=S_,v.xor=x0,v.xorBy=R0,v.xorWith=O0,v.zip=A0,v.zipObject=P0,v.zipObjectDeep=D0,v.zipWith=I0,v.entries=_d,v.entriesIn=Ed,v.extend=yd,v.extendWith=Bo,tu(v,v),v.add=AS,v.attempt=Cd,v.camelCase=FE,v.capitalize=Sd,v.ceil=PS,v.clamp=PE,v.clone=T_,v.cloneDeep=x_,v.cloneDeepWith=R_,v.cloneWith=C_,v.conformsTo=O_,v.deburr=wd,v.defaultTo=uS,v.divide=DS,v.endsWith=$E,v.eq=cr,v.escape=ME,v.escapeRegExp=LE,v.every=H0,v.find=q0,v.findIndex=Vf,v.findKey=aE,v.findLast=Y0,v.findLastIndex=Kf,v.findLastKey=oE,v.floor=IS,v.forEach=td,v.forEachRight=rd,v.forIn=sE,v.forInRight=iE,v.forOwn=uE,v.forOwnRight=cE,v.get=Ji,v.gt=A_,v.gte=P_,v.has=dE,v.hasIn=Xi,v.head=Xf,v.identity=Mt,v.includes=X0,v.indexOf=Yb,v.inRange=DE,v.invoke=gE,v.isArguments=bn,v.isArray=ve,v.isArrayBuffer=D_,v.isArrayLike=Ft,v.isArrayLikeObject=nt,v.isBoolean=I_,v.isBuffer=Xr,v.isDate=F_,v.isElement=$_,v.isEmpty=M_,v.isEqual=L_,v.isEqualWith=N_,v.isError=Vi,v.isFinite=k_,v.isFunction=Ar,v.isInteger=ld,v.isLength=ko,v.isMap=fd,v.isMatch=j_,v.isMatchWith=B_,v.isNaN=W_,v.isNative=U_,v.isNil=G_,v.isNull=H_,v.isNumber=dd,v.isObject=Ze,v.isObjectLike=tt,v.isPlainObject=Sa,v.isRegExp=Ki,v.isSafeInteger=q_,v.isSet=pd,v.isString=jo,v.isSymbol=Bt,v.isTypedArray=jn,v.isUndefined=Y_,v.isWeakMap=z_,v.isWeakSet=V_,v.join=Xb,v.kebabCase=NE,v.last=er,v.lastIndexOf=Zb,v.lowerCase=kE,v.lowerFirst=jE,v.lt=K_,v.lte=J_,v.max=FS,v.maxBy=$S,v.mean=MS,v.meanBy=LS,v.min=NS,v.minBy=kS,v.stubArray=nu,v.stubFalse=au,v.stubObject=wS,v.stubString=TS,v.stubTrue=CS,v.multiply=jS,v.nth=Qb,v.noConflict=gS,v.noop=ru,v.now=Mo,v.pad=BE,v.padEnd=WE,v.padStart=UE,v.parseInt=HE,v.random=IE,v.reduce=r_,v.reduceRight=n_,v.repeat=GE,v.replace=qE,v.result=SE,v.round=BS,v.runInContext=R,v.sample=o_,v.size=u_,v.snakeCase=YE,v.some=c_,v.sortedIndex=s0,v.sortedIndexBy=i0,v.sortedIndexOf=u0,v.sortedLastIndex=c0,v.sortedLastIndexBy=l0,v.sortedLastIndexOf=f0,v.startCase=VE,v.startsWith=KE,v.subtract=WS,v.sum=US,v.sumBy=HS,v.template=JE,v.times=xS,v.toFinite=Pr,v.toInteger=ye,v.toLength=gd,v.toLower=XE,v.toNumber=tr,v.toSafeInteger=X_,v.toString=De,v.toUpper=ZE,v.trim=QE,v.trimEnd=eS,v.trimStart=tS,v.truncate=rS,v.unescape=nS,v.uniqueId=OS,v.upperCase=aS,v.upperFirst=Zi,v.each=td,v.eachRight=rd,v.first=Xf,tu(v,function(){var n={};return vr(v,function(o,u){ke.call(v.prototype,u)||(n[u]=o)}),n}(),{chain:!1}),v.VERSION=a,Kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){v[n].placeholder=v}),Kt(["drop","take"],function(n,o){we.prototype[n]=function(u){u=u===t?1:ct(ye(u),0);var f=this.__filtered__&&!o?new we(this):this.clone();return f.__filtered__?f.__takeCount__=bt(u,f.__takeCount__):f.__views__.push({size:bt(u,q),type:n+(f.__dir__<0?"Right":"")}),f},we.prototype[n+"Right"]=function(u){return this.reverse()[n](u).reverse()}}),Kt(["filter","map","takeWhile"],function(n,o){var u=o+1,f=u==Pe||u==Qe;we.prototype[n]=function(g){var y=this.clone();return y.__iteratees__.push({iteratee:re(g,3),type:u}),y.__filtered__=y.__filtered__||f,y}}),Kt(["head","last"],function(n,o){var u="take"+(o?"Right":"");we.prototype[n]=function(){return this[u](1).value()[0]}}),Kt(["initial","tail"],function(n,o){var u="drop"+(o?"":"Right");we.prototype[n]=function(){return this.__filtered__?new we(this):this[u](1)}}),we.prototype.compact=function(){return this.filter(Mt)},we.prototype.find=function(n){return this.filter(n).head()},we.prototype.findLast=function(n){return this.reverse().find(n)},we.prototype.invokeMap=_e(function(n,o){return typeof n=="function"?new we(this):this.map(function(u){return va(u,n,o)})}),we.prototype.reject=function(n){return this.filter(No(re(n)))},we.prototype.slice=function(n,o){n=ye(n);var u=this;return u.__filtered__&&(n>0||o<0)?new we(u):(n<0?u=u.takeRight(-n):n&&(u=u.drop(n)),o!==t&&(o=ye(o),u=o<0?u.dropRight(-o):u.take(o-n)),u)},we.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},we.prototype.toArray=function(){return this.take(q)},vr(we.prototype,function(n,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),f=/^(?:head|last)$/.test(o),g=v[f?"take"+(o=="last"?"Right":""):o],y=f||/^find/.test(o);g&&(v.prototype[o]=function(){var S=this.__wrapped__,C=f?[1]:arguments,A=S instanceof we,L=C[0],N=A||ve(S),B=function(Se){var xe=g.apply(v,Gr([Se],C));return f&&V?xe[0]:xe};N&&u&&typeof L=="function"&&L.length!=1&&(A=N=!1);var V=this.__chain__,ee=!!this.__actions__.length,ae=y&&!V,be=A&&!ee;if(!y&&N){S=be?S:new we(this);var oe=n.apply(S,C);return oe.__actions__.push({func:Fo,args:[B],thisArg:t}),new Xt(oe,V)}return ae&&be?n.apply(this,C):(oe=this.thru(B),ae?f?oe.value()[0]:oe.value():oe)})}),Kt(["pop","push","shift","sort","splice","unshift"],function(n){var o=ao[n],u=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",f=/^(?:pop|shift)$/.test(n);v.prototype[n]=function(){var g=arguments;if(f&&!this.__chain__){var y=this.value();return o.apply(ve(y)?y:[],g)}return this[u](function(S){return o.apply(ve(S)?S:[],g)})}}),vr(we.prototype,function(n,o){var u=v[o];if(u){var f=u.name+"";ke.call($n,f)||($n[f]=[]),$n[f].push({name:o,func:u})}}),$n[xo(t,P).name]=[{name:"wrapper",func:t}],we.prototype.clone=nm,we.prototype.reverse=am,we.prototype.value=om,v.prototype.at=$0,v.prototype.chain=M0,v.prototype.commit=L0,v.prototype.next=N0,v.prototype.plant=j0,v.prototype.reverse=B0,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=W0,v.prototype.first=v.prototype.head,ca&&(v.prototype[ca]=k0),v},Dn=Ly();fn?((fn.exports=Dn)._=Dn,ei._=Dn):gt._=Dn}).call(Fr)})(cs,cs.exports);var We=cs.exports;const Th=_s(We);function Cc(e){return`Debugger/${e}`}function Ch(e,r){var a;const t=(a=r.name)==null?void 0:a.replace(/\.(4dm|4qs)$/,"");return`#${e} ${t}`}const hR=typeof process=="object"&&process&&process.platform==="win32";var gR=hR?{sep:"\\"}:{sep:"/"},vR=xh;function xh(e,r,t){e instanceof RegExp&&(e=cp(e,t)),r instanceof RegExp&&(r=cp(r,t));var a=Rh(e,r,t);return a&&{start:a[0],end:a[1],pre:t.slice(0,a[0]),body:t.slice(a[0]+e.length,a[1]),post:t.slice(a[1]+r.length)}}function cp(e,r){var t=r.match(e);return t?t[0]:null}xh.range=Rh;function Rh(e,r,t){var a,s,i,c,l,d=t.indexOf(e),p=t.indexOf(r,d+1),h=d;if(d>=0&&p>0){if(e===r)return[d,p];for(a=[],i=t.length;h>=0&&!l;)h==d?(a.push(h),d=t.indexOf(e,h+1)):a.length==1?l=[a.pop(),p]:(s=a.pop(),s<i&&(i=s,c=p),p=t.indexOf(r,h+1)),h=d<p&&d>=0?d:p;a.length&&(l=[i,c])}return l}var Oh=vR,yR=_R,Ah="\0SLASH"+Math.random()+"\0",Ph="\0OPEN"+Math.random()+"\0",xc="\0CLOSE"+Math.random()+"\0",Dh="\0COMMA"+Math.random()+"\0",Ih="\0PERIOD"+Math.random()+"\0";function vu(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function mR(e){return e.split("\\\\").join(Ah).split("\\{").join(Ph).split("\\}").join(xc).split("\\,").join(Dh).split("\\.").join(Ih)}function bR(e){return e.split(Ah).join("\\").split(Ph).join("{").split(xc).join("}").split(Dh).join(",").split(Ih).join(".")}function Fh(e){if(!e)return[""];var r=[],t=Oh("{","}",e);if(!t)return e.split(",");var a=t.pre,s=t.body,i=t.post,c=a.split(",");c[c.length-1]+="{"+s+"}";var l=Fh(i);return i.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l)),r.push.apply(r,c),r}function _R(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),xa(mR(e),!0).map(bR)):[]}function ER(e){return"{"+e+"}"}function SR(e){return/^-?0\d/.test(e)}function wR(e,r){return e<=r}function TR(e,r){return e>=r}function xa(e,r){var t=[],a=Oh("{","}",e);if(!a)return[e];var s=a.pre,i=a.post.length?xa(a.post,!1):[""];if(/\$$/.test(a.pre))for(var c=0;c<i.length;c++){var l=s+"{"+a.body+"}"+i[c];t.push(l)}else{var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=d||p,m=a.body.indexOf(",")>=0;if(!h&&!m)return a.post.match(/,.*\}/)?(e=a.pre+"{"+a.body+xc+a.post,xa(e)):[e];var _;if(h)_=a.body.split(/\.\./);else if(_=Fh(a.body),_.length===1&&(_=xa(_[0],!1).map(ER),_.length===1))return i.map(function(Ue){return a.pre+_[0]+Ue});var E;if(h){var T=vu(_[0]),x=vu(_[1]),D=Math.max(_[0].length,_[1].length),P=_.length==3?Math.abs(vu(_[2])):1,j=wR,M=x<T;M&&(P*=-1,j=TR);var k=_.some(SR);E=[];for(var O=T;j(O,x);O+=P){var z;if(p)z=String.fromCharCode(O),z==="\\"&&(z="");else if(z=String(O),k){var G=D-z.length;if(G>0){var Y=new Array(G+1).join("0");O<0?z="-"+Y+z.slice(1):z=Y+z}}E.push(z)}}else{E=[];for(var te=0;te<_.length;te++)E.push.apply(E,xa(_[te],!1))}for(var te=0;te<E.length;te++)for(var c=0;c<i.length;c++){var l=s+E[te]+i[c];(!r||h||l)&&t.push(l)}}return t}const Ht=$h=(e,r,t={})=>(ls(r),!t.nocomment&&r.charAt(0)==="#"?!1:new Os(r,t).match(e));var $h=Ht;const Yu=gR;Ht.sep=Yu.sep;const fr=Symbol("globstar **");Ht.GLOBSTAR=fr;const CR=yR,lp={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},zu="[^/]",yu=zu+"*?",xR="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",RR="(?:(?!(?:\\/|^)\\.).)*?",Mh=e=>e.split("").reduce((r,t)=>(r[t]=!0,r),{}),fp=Mh("().*{}+?[]^$\\!"),OR=Mh("[.("),dp=/\/+/;Ht.filter=(e,r={})=>(t,a,s)=>Ht(t,e,r);const Zr=(e,r={})=>{const t={};return Object.keys(e).forEach(a=>t[a]=e[a]),Object.keys(r).forEach(a=>t[a]=r[a]),t};Ht.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ht;const r=Ht,t=(a,s,i)=>r(a,s,Zr(e,i));return t.Minimatch=class extends r.Minimatch{constructor(s,i){super(s,Zr(e,i))}},t.Minimatch.defaults=a=>r.defaults(Zr(e,a)).Minimatch,t.filter=(a,s)=>r.filter(a,Zr(e,s)),t.defaults=a=>r.defaults(Zr(e,a)),t.makeRe=(a,s)=>r.makeRe(a,Zr(e,s)),t.braceExpand=(a,s)=>r.braceExpand(a,Zr(e,s)),t.match=(a,s,i)=>r.match(a,s,Zr(e,i)),t};Ht.braceExpand=(e,r)=>Lh(e,r);const Lh=(e,r={})=>(ls(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:CR(e)),AR=1024*64,ls=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>AR)throw new TypeError("pattern is too long")},mu=Symbol("subparse");Ht.makeRe=(e,r)=>new Os(e,r||{}).makeRe();Ht.match=(e,r,t={})=>{const a=new Os(r,t);return e=e.filter(s=>a.match(s)),a.options.nonull&&!e.length&&e.push(r),e};const PR=e=>e.replace(/\\(.)/g,"$1"),DR=e=>e.replace(/\\([^-\]])/g,"$1"),IR=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),FR=e=>e.replace(/[[\]\\]/g,"\\$&");class Os{constructor(r,t){ls(r),t||(t={}),this.options=t,this.set=[],this.pattern=r,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const r=this.pattern,t=this.options;if(!t.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();let a=this.globSet=this.braceExpand();t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,a),a=this.globParts=a.map(s=>s.split(dp)),this.debug(this.pattern,a),a=a.map((s,i,c)=>s.map(this.parse,this)),this.debug(this.pattern,a),a=a.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,a),this.set=a}parseNegate(){if(this.options.nonegate)return;const r=this.pattern;let t=!1,a=0;for(let s=0;s<r.length&&r.charAt(s)==="!";s++)t=!t,a++;a&&(this.pattern=r.slice(a)),this.negate=t}matchOne(r,t,a){var s=this.options;this.debug("matchOne",{this:this,file:r,pattern:t}),this.debug("matchOne",r.length,t.length);for(var i=0,c=0,l=r.length,d=t.length;i<l&&c<d;i++,c++){this.debug("matchOne loop");var p=t[c],h=r[i];if(this.debug(t,p,h),p===!1)return!1;if(p===fr){this.debug("GLOBSTAR",[t,p,h]);var m=i,_=c+1;if(_===d){for(this.debug("** at the end");i<l;i++)if(r[i]==="."||r[i]===".."||!s.dot&&r[i].charAt(0)===".")return!1;return!0}for(;m<l;){var E=r[m];if(this.debug(`
35
+ globstar while`,r,m,t,_,E),this.matchOne(r.slice(m),t.slice(_),a))return this.debug("globstar found match!",m,l,E),!0;if(E==="."||E===".."||!s.dot&&E.charAt(0)==="."){this.debug("dot detected!",r,m,t,_);break}this.debug("globstar swallow a segment, and continue"),m++}return!!(a&&(this.debug(`
36
+ >>> no match, partial?`,r,m,t,_),m===l))}var T;if(typeof p=="string"?(T=h===p,this.debug("string match",p,h,T)):(T=h.match(p),this.debug("pattern match",p,h,T)),!T)return!1}if(i===l&&c===d)return!0;if(i===l)return a;if(c===d)return i===l-1&&r[i]==="";throw new Error("wtf?")}braceExpand(){return Lh(this.pattern,this.options)}parse(r,t){ls(r);const a=this.options;if(r==="**")if(a.noglobstar)r="*";else return fr;if(r==="")return"";let s="",i=!1,c=!1;const l=[],d=[];let p,h=!1,m=-1,_=-1,E,T,x,D=r.charAt(0)===".",P=a.dot||D;const j=()=>D?"":P?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",M=G=>G.charAt(0)==="."?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=()=>{if(p){switch(p){case"*":s+=yu,i=!0;break;case"?":s+=zu,i=!0;break;default:s+="\\"+p;break}this.debug("clearStateChar %j %j",p,s),p=!1}};for(let G=0,Y;G<r.length&&(Y=r.charAt(G));G++){if(this.debug("%s %s %s %j",r,G,s,Y),c){if(Y==="/")return!1;fp[Y]&&(s+="\\"),s+=Y,c=!1;continue}switch(Y){case"/":return!1;case"\\":if(h&&r.charAt(G+1)==="-"){s+=Y;continue}k(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,G,s,Y),h){this.debug(" in class"),Y==="!"&&G===_+1&&(Y="^"),s+=Y;continue}this.debug("call clearStateChar %j",p),k(),p=Y,a.noext&&k();continue;case"(":{if(h){s+="(";continue}if(!p){s+="\\(";continue}const te={type:p,start:G-1,reStart:s.length,open:lp[p].open,close:lp[p].close};this.debug(this.pattern," ",te),l.push(te),s+=te.open,te.start===0&&te.type!=="!"&&(D=!0,s+=M(r.slice(G+1))),this.debug("plType %j %j",p,s),p=!1;continue}case")":{const te=l[l.length-1];if(h||!te){s+="\\)";continue}l.pop(),k(),i=!0,T=te,s+=T.close,T.type==="!"&&d.push(Object.assign(T,{reEnd:s.length}));continue}case"|":{const te=l[l.length-1];if(h||!te){s+="\\|";continue}k(),s+="|",te.start===0&&te.type!=="!"&&(D=!0,s+=M(r.slice(G+1)));continue}case"[":if(k(),h){s+="\\"+Y;continue}h=!0,_=G,m=s.length,s+=Y;continue;case"]":if(G===_+1||!h){s+="\\"+Y;continue}E=r.substring(_+1,G);try{RegExp("["+FR(DR(E))+"]"),s+=Y}catch{s=s.substring(0,m)+"(?:$.)"}i=!0,h=!1;continue;default:k(),fp[Y]&&!(Y==="^"&&h)&&(s+="\\"),s+=Y;break}}for(h&&(E=r.slice(_+1),x=this.parse(E,mu),s=s.substring(0,m)+"\\["+x[0],i=i||x[1]),T=l.pop();T;T=l.pop()){let G;G=s.slice(T.reStart+T.open.length),this.debug("setting tail",s,T),G=G.replace(/((?:\\{2}){0,64})(\\?)\|/g,(te,Ue,Te)=>(Te||(Te="\\"),Ue+Ue+Te+"|")),this.debug(`tail=%j
37
+ %s`,G,G,T,s);const Y=T.type==="*"?yu:T.type==="?"?zu:"\\"+T.type;i=!0,s=s.slice(0,T.reStart)+Y+"\\("+G}k(),c&&(s+="\\\\");const O=OR[s.charAt(0)];for(let G=d.length-1;G>-1;G--){const Y=d[G],te=s.slice(0,Y.reStart),Ue=s.slice(Y.reStart,Y.reEnd-8);let Te=s.slice(Y.reEnd);const st=s.slice(Y.reEnd-8,Y.reEnd)+Te,X=te.split(")").length,Pe=te.split("(").length-X;let it=Te;for(let Ge=0;Ge<Pe;Ge++)it=it.replace(/\)[+*?]?/,"");Te=it;const Qe=Te===""&&t!==mu?"(?:$|\\/)":"";s=te+Ue+Te+Qe+st}if(s!==""&&i&&(s="(?=.)"+s),O&&(s=j()+s),t===mu)return[s,i];if(a.nocase&&!i&&(i=r.toUpperCase()!==r.toLowerCase()),!i)return PR(r);const z=a.nocase?"i":"";try{return Object.assign(new RegExp("^"+s+"$",z),{_glob:r,_src:s})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const r=this.set;if(!r.length)return this.regexp=!1,this.regexp;const t=this.options,a=t.noglobstar?yu:t.dot?xR:RR,s=t.nocase?"i":"";let i=r.map(c=>(c=c.map(l=>typeof l=="string"?IR(l):l===fr?fr:l._src).reduce((l,d)=>(l[l.length-1]===fr&&d===fr||l.push(d),l),[]),c.forEach((l,d)=>{l!==fr||c[d-1]===fr||(d===0?c.length>1?c[d+1]="(?:\\/|"+a+"\\/)?"+c[d+1]:c[d]=a:d===c.length-1?c[d-1]+="(?:\\/|"+a+")?":(c[d-1]+="(?:\\/|\\/"+a+"\\/)"+c[d+1],c[d+1]=fr))}),c.filter(l=>l!==fr).join("/"))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,s)}catch{this.regexp=!1}return this.regexp}match(r,t=this.partial){if(this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&t)return!0;const a=this.options;Yu.sep!=="/"&&(r=r.split(Yu.sep).join("/")),r=r.split(dp),this.debug(this.pattern,"split",r);const s=this.set;this.debug(this.pattern,"set",s);let i;for(let c=r.length-1;c>=0&&(i=r[c],!i);c--);for(let c=0;c<s.length;c++){const l=s[c];let d=r;if(a.matchBase&&l.length===1&&(d=[i]),this.matchOne(d,l,t))return a.flipNegate?!0:!this.negate}return a.flipNegate?!1:this.negate}static defaults(r){return Ht.defaults(r).Minimatch}}Ht.Minimatch=Os;const Nh=_s($h),kh=[{pattern:b.ROLES_TAB_PATH,editor:{key:"editors:roles"},supportedEditors:[{key:"editors:code",config:{language:"json",theme:"vs-dark"}}]},{pattern:b.MODEL_TAB_PATH,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"}}],jh=[{pattern:"**/*.+(json|4DModel|WebForm)",type:"json"},{pattern:"**/*.+(4dm|txt|json|4qs)",type:"text"}];function Bh(e){const r=e.split("/");return r.pop(),r.join("/")}function pr(e){const r=kh.find(({pattern:t})=>Nh(e,t,{nocase:!0}));return r||{pattern:"",editor:{key:"editors:unknown",config:{language:"text"}}}}function Wh(e){const r=jh.find(({pattern:t})=>Nh(e,t,{nocase:!0}));return r?r.type:"text"}var Vu=function(e,r){return Vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])},Vu(e,r)};function As(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Vu(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}function Ku(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],a=0;if(t)return t.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(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function fs(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var a=t.call(e),s,i=[],c;try{for(;(r===void 0||r-- >0)&&!(s=a.next()).done;)i.push(s.value)}catch(l){c={error:l}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(c)throw c.error}}return i}function ds(e,r,t){if(t||arguments.length===2)for(var a=0,s=r.length,i;a<s;a++)(i||!(a in r))&&(i||(i=Array.prototype.slice.call(r,0,a)),i[a]=r[a]);return e.concat(i||Array.prototype.slice.call(r))}function $r(e){return typeof e=="function"}function Uh(e){var r=function(a){Error.call(a),a.stack=new Error().stack},t=e(r);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var bu=Uh(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
38
38
  `+t.map(function(a,s){return s+1+") "+a.toString()}).join(`
39
- `):"",this.name="UnsubscriptionError",this.errors=t}});function Ju(e,n){if(e){var t=e.indexOf(n);0<=t&&e.splice(t,1)}}var Ps=function(){function e(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var n,t,a,s,i;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var l=Ku(c),d=l.next();!d.done;d=l.next()){var p=d.value;p.remove(this)}}catch(x){n={error:x}}finally{try{d&&!d.done&&(t=l.return)&&t.call(l)}finally{if(n)throw n.error}}else c.remove(this);var h=this.initialTeardown;if($r(h))try{h()}catch(x){i=x instanceof bu?x.errors:[x]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var _=Ku(y),E=_.next();!E.done;E=_.next()){var T=E.value;try{dp(T)}catch(x){i=i??[],x instanceof bu?i=ds(ds([],fs(i)),fs(x.errors)):i.push(x)}}}catch(x){a={error:x}}finally{try{E&&!E.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}}if(i)throw new bu(i)}},e.prototype.add=function(n){var t;if(n&&n!==this)if(this.closed)dp(n);else{if(n instanceof e){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(n)}},e.prototype._hasParent=function(n){var t=this._parentage;return t===n||Array.isArray(t)&&t.includes(n)},e.prototype._addParent=function(n){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n},e.prototype._removeParent=function(n){var t=this._parentage;t===n?this._parentage=null:Array.isArray(t)&&Ju(t,n)},e.prototype.remove=function(n){var t=this._finalizers;t&&Ju(t,n),n instanceof e&&n._removeParent(this)},e.EMPTY=function(){var n=new e;return n.closed=!0,n}(),e}(),Uh=Ps.EMPTY;function Hh(e){return e instanceof Ps||e&&"closed"in e&&$r(e.remove)&&$r(e.add)&&$r(e.unsubscribe)}function dp(e){$r(e)?e():e.unsubscribe()}var Gh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Xu={setTimeout:function(e,n){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=Xu.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,ds([e,n],fs(t))):setTimeout.apply(void 0,ds([e,n],fs(t)))},clearTimeout:function(e){var n=Xu.delegate;return((n==null?void 0:n.clearTimeout)||clearTimeout)(e)},delegate:void 0};function DR(e){Xu.setTimeout(function(){throw e})}function pp(){}function Ko(e){e()}var qh=function(e){As(n,e);function n(t){var a=e.call(this)||this;return a.isStopped=!1,t?(a.destination=t,Hh(t)&&t.add(a)):a.destination=MR,a}return n.create=function(t,a,s){return new Zu(t,a,s)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},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(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(Ps),IR=Function.prototype.bind;function _u(e,n){return IR.call(e,n)}var FR=function(){function e(n){this.partialObserver=n}return e.prototype.next=function(n){var t=this.partialObserver;if(t.next)try{t.next(n)}catch(a){Uo(a)}},e.prototype.error=function(n){var t=this.partialObserver;if(t.error)try{t.error(n)}catch(a){Uo(a)}else Uo(n)},e.prototype.complete=function(){var n=this.partialObserver;if(n.complete)try{n.complete()}catch(t){Uo(t)}},e}(),Zu=function(e){As(n,e);function n(t,a,s){var i=e.call(this)||this,c;if($r(t)||!t)c={next:t??void 0,error:a??void 0,complete:s??void 0};else{var l;i&&Gh.useDeprecatedNextContext?(l=Object.create(t),l.unsubscribe=function(){return i.unsubscribe()},c={next:t.next&&_u(t.next,l),error:t.error&&_u(t.error,l),complete:t.complete&&_u(t.complete,l)}):c=t}return i.destination=new FR(c),i}return n}(qh);function Uo(e){DR(e)}function $R(e){throw e}var MR={closed:!0,next:pp,error:$R,complete:pp},LR=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function NR(e){return e}function kR(e){return e.length===0?NR:e.length===1?e[0]:function(t){return e.reduce(function(a,s){return s(a)},t)}}var hp=function(){function e(n){n&&(this._subscribe=n)}return e.prototype.lift=function(n){var t=new e;return t.source=this,t.operator=n,t},e.prototype.subscribe=function(n,t,a){var s=this,i=BR(n)?n:new Zu(n,t,a);return Ko(function(){var c=s,l=c.operator,d=c.source;i.add(l?l.call(i,d):d?s._subscribe(i):s._trySubscribe(i))}),i},e.prototype._trySubscribe=function(n){try{return this._subscribe(n)}catch(t){n.error(t)}},e.prototype.forEach=function(n,t){var a=this;return t=gp(t),new t(function(s,i){var c=new Zu({next:function(l){try{n(l)}catch(d){i(d),c.unsubscribe()}},error:i,complete:s});a.subscribe(c)})},e.prototype._subscribe=function(n){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(n)},e.prototype[LR]=function(){return this},e.prototype.pipe=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return kR(n)(this)},e.prototype.toPromise=function(n){var t=this;return n=gp(n),new n(function(a,s){var i;t.subscribe(function(c){return i=c},function(c){return s(c)},function(){return a(i)})})},e.create=function(n){return new e(n)},e}();function gp(e){var n;return(n=e??Gh.Promise)!==null&&n!==void 0?n:Promise}function jR(e){return e&&$r(e.next)&&$r(e.error)&&$r(e.complete)}function BR(e){return e&&e instanceof qh||jR(e)&&Hh(e)}var WR=Wh(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Yh=function(e){As(n,e);function n(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return n.prototype.lift=function(t){var a=new vp(this,this);return a.operator=t,a},n.prototype._throwIfClosed=function(){if(this.closed)throw new WR},n.prototype.next=function(t){var a=this;Ko(function(){var s,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=Ku(a.currentObservers),l=c.next();!l.done;l=c.next()){var d=l.value;d.next(t)}}catch(p){s={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(s)throw s.error}}}})},n.prototype.error=function(t){var a=this;Ko(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=t;for(var s=a.observers;s.length;)s.shift().error(t)}})},n.prototype.complete=function(){var t=this;Ko(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var a=t.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 t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var a=this,s=this,i=s.hasError,c=s.isStopped,l=s.observers;return i||c?Uh:(this.currentObservers=null,l.push(t),new Ps(function(){a.currentObservers=null,Ju(l,t)}))},n.prototype._checkFinalizedStatuses=function(t){var a=this,s=a.hasError,i=a.thrownError,c=a.isStopped;s?t.error(i):c&&t.complete()},n.prototype.asObservable=function(){var t=new hp;return t.source=this,t},n.create=function(t,a){return new vp(t,a)},n}(hp),vp=function(e){As(n,e);function n(t,a){var s=e.call(this)||this;return s.destination=t,s.source=a,s}return n.prototype.next=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.next)===null||s===void 0||s.call(a,t)},n.prototype.error=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.error)===null||s===void 0||s.call(a,t)},n.prototype.complete=function(){var t,a;(a=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||a===void 0||a.call(t)},n.prototype._subscribe=function(t){var a,s;return(s=(a=this.source)===null||a===void 0?void 0:a.subscribe(t))!==null&&s!==void 0?s:Uh},n}(Yh);const zh=new Yh;var Qu={exports:{}},Ho={exports:{}},Ie={};/** @license React v16.13.1
39
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function Ju(e,r){if(e){var t=e.indexOf(r);0<=t&&e.splice(t,1)}}var Ps=function(){function e(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var r,t,a,s,i;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var l=Ku(c),d=l.next();!d.done;d=l.next()){var p=d.value;p.remove(this)}}catch(x){r={error:x}}finally{try{d&&!d.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}else c.remove(this);var h=this.initialTeardown;if($r(h))try{h()}catch(x){i=x instanceof bu?x.errors:[x]}var m=this._finalizers;if(m){this._finalizers=null;try{for(var _=Ku(m),E=_.next();!E.done;E=_.next()){var T=E.value;try{pp(T)}catch(x){i=i??[],x instanceof bu?i=ds(ds([],fs(i)),fs(x.errors)):i.push(x)}}}catch(x){a={error:x}}finally{try{E&&!E.done&&(s=_.return)&&s.call(_)}finally{if(a)throw a.error}}}if(i)throw new bu(i)}},e.prototype.add=function(r){var t;if(r&&r!==this)if(this.closed)pp(r);else{if(r instanceof e){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(r)}},e.prototype._hasParent=function(r){var t=this._parentage;return t===r||Array.isArray(t)&&t.includes(r)},e.prototype._addParent=function(r){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(r),t):t?[t,r]:r},e.prototype._removeParent=function(r){var t=this._parentage;t===r?this._parentage=null:Array.isArray(t)&&Ju(t,r)},e.prototype.remove=function(r){var t=this._finalizers;t&&Ju(t,r),r instanceof e&&r._removeParent(this)},e.EMPTY=function(){var r=new e;return r.closed=!0,r}(),e}(),Hh=Ps.EMPTY;function Gh(e){return e instanceof Ps||e&&"closed"in e&&$r(e.remove)&&$r(e.add)&&$r(e.unsubscribe)}function pp(e){$r(e)?e():e.unsubscribe()}var qh={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Xu={setTimeout:function(e,r){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=Xu.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,ds([e,r],fs(t))):setTimeout.apply(void 0,ds([e,r],fs(t)))},clearTimeout:function(e){var r=Xu.delegate;return((r==null?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0};function $R(e){Xu.setTimeout(function(){throw e})}function hp(){}function Ko(e){e()}var Yh=function(e){As(r,e);function r(t){var a=e.call(this)||this;return a.isStopped=!1,t?(a.destination=t,Gh(t)&&t.add(a)):a.destination=kR,a}return r.create=function(t,a,s){return new Zu(t,a,s)},r.prototype.next=function(t){this.isStopped||this._next(t)},r.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(t){this.destination.next(t)},r.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(Ps),MR=Function.prototype.bind;function _u(e,r){return MR.call(e,r)}var LR=function(){function e(r){this.partialObserver=r}return e.prototype.next=function(r){var t=this.partialObserver;if(t.next)try{t.next(r)}catch(a){Uo(a)}},e.prototype.error=function(r){var t=this.partialObserver;if(t.error)try{t.error(r)}catch(a){Uo(a)}else Uo(r)},e.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(t){Uo(t)}},e}(),Zu=function(e){As(r,e);function r(t,a,s){var i=e.call(this)||this,c;if($r(t)||!t)c={next:t??void 0,error:a??void 0,complete:s??void 0};else{var l;i&&qh.useDeprecatedNextContext?(l=Object.create(t),l.unsubscribe=function(){return i.unsubscribe()},c={next:t.next&&_u(t.next,l),error:t.error&&_u(t.error,l),complete:t.complete&&_u(t.complete,l)}):c=t}return i.destination=new LR(c),i}return r}(Yh);function Uo(e){$R(e)}function NR(e){throw e}var kR={closed:!0,next:hp,error:NR,complete:hp},jR=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function BR(e){return e}function WR(e){return e.length===0?BR:e.length===1?e[0]:function(t){return e.reduce(function(a,s){return s(a)},t)}}var gp=function(){function e(r){r&&(this._subscribe=r)}return e.prototype.lift=function(r){var t=new e;return t.source=this,t.operator=r,t},e.prototype.subscribe=function(r,t,a){var s=this,i=HR(r)?r:new Zu(r,t,a);return Ko(function(){var c=s,l=c.operator,d=c.source;i.add(l?l.call(i,d):d?s._subscribe(i):s._trySubscribe(i))}),i},e.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(t){r.error(t)}},e.prototype.forEach=function(r,t){var a=this;return t=vp(t),new t(function(s,i){var c=new Zu({next:function(l){try{r(l)}catch(d){i(d),c.unsubscribe()}},error:i,complete:s});a.subscribe(c)})},e.prototype._subscribe=function(r){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(r)},e.prototype[jR]=function(){return this},e.prototype.pipe=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return WR(r)(this)},e.prototype.toPromise=function(r){var t=this;return r=vp(r),new r(function(a,s){var i;t.subscribe(function(c){return i=c},function(c){return s(c)},function(){return a(i)})})},e.create=function(r){return new e(r)},e}();function vp(e){var r;return(r=e??qh.Promise)!==null&&r!==void 0?r:Promise}function UR(e){return e&&$r(e.next)&&$r(e.error)&&$r(e.complete)}function HR(e){return e&&e instanceof Yh||UR(e)&&Gh(e)}var GR=Uh(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),zh=function(e){As(r,e);function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return r.prototype.lift=function(t){var a=new yp(this,this);return a.operator=t,a},r.prototype._throwIfClosed=function(){if(this.closed)throw new GR},r.prototype.next=function(t){var a=this;Ko(function(){var s,i;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=Ku(a.currentObservers),l=c.next();!l.done;l=c.next()){var d=l.value;d.next(t)}}catch(p){s={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(s)throw s.error}}}})},r.prototype.error=function(t){var a=this;Ko(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=t;for(var s=a.observers;s.length;)s.shift().error(t)}})},r.prototype.complete=function(){var t=this;Ko(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var a=t.observers;a.length;)a.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},r.prototype._innerSubscribe=function(t){var a=this,s=this,i=s.hasError,c=s.isStopped,l=s.observers;return i||c?Hh:(this.currentObservers=null,l.push(t),new Ps(function(){a.currentObservers=null,Ju(l,t)}))},r.prototype._checkFinalizedStatuses=function(t){var a=this,s=a.hasError,i=a.thrownError,c=a.isStopped;s?t.error(i):c&&t.complete()},r.prototype.asObservable=function(){var t=new gp;return t.source=this,t},r.create=function(t,a){return new yp(t,a)},r}(gp),yp=function(e){As(r,e);function r(t,a){var s=e.call(this)||this;return s.destination=t,s.source=a,s}return r.prototype.next=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.next)===null||s===void 0||s.call(a,t)},r.prototype.error=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.error)===null||s===void 0||s.call(a,t)},r.prototype.complete=function(){var t,a;(a=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||a===void 0||a.call(t)},r.prototype._subscribe=function(t){var a,s;return(s=(a=this.source)===null||a===void 0?void 0:a.subscribe(t))!==null&&s!==void 0?s:Hh},r}(zh);const Vh=new zh;var Qu={exports:{}},Ho={exports:{}},Ie={};/** @license React v16.13.1
40
40
  * react-is.production.min.js
41
41
  *
42
42
  * Copyright (c) Facebook, Inc. and its affiliates.
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */var mp;function UR(){if(mp)return Ie;mp=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(O){if(typeof O=="object"&&O!==null){var z=O.$$typeof;switch(z){case n:switch(O=O.type,O){case d:case p:case a:case i:case s:case y:return O;default:switch(O=O&&O.$$typeof,O){case l:case h:case T:case E:case c:return O;default:return z}}case t:return z}}}function k(O){return M(O)===p}return Ie.AsyncMode=d,Ie.ConcurrentMode=p,Ie.ContextConsumer=l,Ie.ContextProvider=c,Ie.Element=n,Ie.ForwardRef=h,Ie.Fragment=a,Ie.Lazy=T,Ie.Memo=E,Ie.Portal=t,Ie.Profiler=i,Ie.StrictMode=s,Ie.Suspense=y,Ie.isAsyncMode=function(O){return k(O)||M(O)===d},Ie.isConcurrentMode=k,Ie.isContextConsumer=function(O){return M(O)===l},Ie.isContextProvider=function(O){return M(O)===c},Ie.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===n},Ie.isForwardRef=function(O){return M(O)===h},Ie.isFragment=function(O){return M(O)===a},Ie.isLazy=function(O){return M(O)===T},Ie.isMemo=function(O){return M(O)===E},Ie.isPortal=function(O){return M(O)===t},Ie.isProfiler=function(O){return M(O)===i},Ie.isStrictMode=function(O){return M(O)===s},Ie.isSuspense=function(O){return M(O)===y},Ie.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===a||O===p||O===i||O===s||O===y||O===_||typeof O=="object"&&O!==null&&(O.$$typeof===T||O.$$typeof===E||O.$$typeof===c||O.$$typeof===l||O.$$typeof===h||O.$$typeof===D||O.$$typeof===P||O.$$typeof===j||O.$$typeof===x)},Ie.typeOf=M,Ie}var Fe={};/** @license React v16.13.1
46
+ */var mp;function qR(){if(mp)return Ie;mp=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(O){if(typeof O=="object"&&O!==null){var z=O.$$typeof;switch(z){case r:switch(O=O.type,O){case d:case p:case a:case i:case s:case m:return O;default:switch(O=O&&O.$$typeof,O){case l:case h:case T:case E:case c:return O;default:return z}}case t:return z}}}function k(O){return M(O)===p}return Ie.AsyncMode=d,Ie.ConcurrentMode=p,Ie.ContextConsumer=l,Ie.ContextProvider=c,Ie.Element=r,Ie.ForwardRef=h,Ie.Fragment=a,Ie.Lazy=T,Ie.Memo=E,Ie.Portal=t,Ie.Profiler=i,Ie.StrictMode=s,Ie.Suspense=m,Ie.isAsyncMode=function(O){return k(O)||M(O)===d},Ie.isConcurrentMode=k,Ie.isContextConsumer=function(O){return M(O)===l},Ie.isContextProvider=function(O){return M(O)===c},Ie.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===r},Ie.isForwardRef=function(O){return M(O)===h},Ie.isFragment=function(O){return M(O)===a},Ie.isLazy=function(O){return M(O)===T},Ie.isMemo=function(O){return M(O)===E},Ie.isPortal=function(O){return M(O)===t},Ie.isProfiler=function(O){return M(O)===i},Ie.isStrictMode=function(O){return M(O)===s},Ie.isSuspense=function(O){return M(O)===m},Ie.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===a||O===p||O===i||O===s||O===m||O===_||typeof O=="object"&&O!==null&&(O.$$typeof===T||O.$$typeof===E||O.$$typeof===c||O.$$typeof===l||O.$$typeof===h||O.$$typeof===D||O.$$typeof===P||O.$$typeof===j||O.$$typeof===x)},Ie.typeOf=M,Ie}var Fe={};/** @license React v16.13.1
47
47
  * react-is.development.js
48
48
  *
49
49
  * Copyright (c) Facebook, Inc. and its affiliates.
50
50
  *
51
51
  * This source code is licensed under the MIT license found in the
52
52
  * LICENSE file in the root directory of this source tree.
53
- */var yp;function HR(){return yp||(yp=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(F){return typeof F=="string"||typeof F=="function"||F===a||F===p||F===i||F===s||F===y||F===_||typeof F=="object"&&F!==null&&(F.$$typeof===T||F.$$typeof===E||F.$$typeof===c||F.$$typeof===l||F.$$typeof===h||F.$$typeof===D||F.$$typeof===P||F.$$typeof===j||F.$$typeof===x)}function k(F){if(typeof F=="object"&&F!==null){var ze=F.$$typeof;switch(ze){case n:var qe=F.type;switch(qe){case d:case p:case a:case i:case s:case y:return qe;default:var yt=qe&&qe.$$typeof;switch(yt){case l:case h:case T:case E:case c:return yt;default:return ze}}case t:return ze}}}var O=d,z=p,H=l,Y=c,te=n,We=h,Te=a,st=T,X=E,Pe=t,it=i,Qe=s,Ge=y,rt=!1;function qt(F){return rt||(rt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(F)||k(F)===d}function W(F){return k(F)===p}function q(F){return k(F)===l}function de(F){return k(F)===c}function le(F){return typeof F=="object"&&F!==null&&F.$$typeof===n}function se(F){return k(F)===h}function fe(F){return k(F)===a}function ne(F){return k(F)===T}function ce(F){return k(F)===E}function ue(F){return k(F)===t}function he(F){return k(F)===i}function ge(F){return k(F)===s}function K(F){return k(F)===y}Fe.AsyncMode=O,Fe.ConcurrentMode=z,Fe.ContextConsumer=H,Fe.ContextProvider=Y,Fe.Element=te,Fe.ForwardRef=We,Fe.Fragment=Te,Fe.Lazy=st,Fe.Memo=X,Fe.Portal=Pe,Fe.Profiler=it,Fe.StrictMode=Qe,Fe.Suspense=Ge,Fe.isAsyncMode=qt,Fe.isConcurrentMode=W,Fe.isContextConsumer=q,Fe.isContextProvider=de,Fe.isElement=le,Fe.isForwardRef=se,Fe.isFragment=fe,Fe.isLazy=ne,Fe.isMemo=ce,Fe.isPortal=ue,Fe.isProfiler=he,Fe.isStrictMode=ge,Fe.isSuspense=K,Fe.isValidElementType=M,Fe.typeOf=k}()),Fe}var bp;function Vh(){return bp||(bp=1,process.env.NODE_ENV==="production"?Ho.exports=UR():Ho.exports=HR()),Ho.exports}/*
53
+ */var bp;function YR(){return bp||(bp=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(F){return typeof F=="string"||typeof F=="function"||F===a||F===p||F===i||F===s||F===m||F===_||typeof F=="object"&&F!==null&&(F.$$typeof===T||F.$$typeof===E||F.$$typeof===c||F.$$typeof===l||F.$$typeof===h||F.$$typeof===D||F.$$typeof===P||F.$$typeof===j||F.$$typeof===x)}function k(F){if(typeof F=="object"&&F!==null){var ze=F.$$typeof;switch(ze){case r:var qe=F.type;switch(qe){case d:case p:case a:case i:case s:case m:return qe;default:var mt=qe&&qe.$$typeof;switch(mt){case l:case h:case T:case E:case c:return mt;default:return ze}}case t:return ze}}}var O=d,z=p,G=l,Y=c,te=r,Ue=h,Te=a,st=T,X=E,Pe=t,it=i,Qe=s,Ge=m,rt=!1;function qt(F){return rt||(rt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(F)||k(F)===d}function W(F){return k(F)===p}function q(F){return k(F)===l}function de(F){return k(F)===c}function le(F){return typeof F=="object"&&F!==null&&F.$$typeof===r}function se(F){return k(F)===h}function fe(F){return k(F)===a}function ne(F){return k(F)===T}function ce(F){return k(F)===E}function ue(F){return k(F)===t}function he(F){return k(F)===i}function ge(F){return k(F)===s}function K(F){return k(F)===m}Fe.AsyncMode=O,Fe.ConcurrentMode=z,Fe.ContextConsumer=G,Fe.ContextProvider=Y,Fe.Element=te,Fe.ForwardRef=Ue,Fe.Fragment=Te,Fe.Lazy=st,Fe.Memo=X,Fe.Portal=Pe,Fe.Profiler=it,Fe.StrictMode=Qe,Fe.Suspense=Ge,Fe.isAsyncMode=qt,Fe.isConcurrentMode=W,Fe.isContextConsumer=q,Fe.isContextProvider=de,Fe.isElement=le,Fe.isForwardRef=se,Fe.isFragment=fe,Fe.isLazy=ne,Fe.isMemo=ce,Fe.isPortal=ue,Fe.isProfiler=he,Fe.isStrictMode=ge,Fe.isSuspense=K,Fe.isValidElementType=M,Fe.typeOf=k}()),Fe}var _p;function Kh(){return _p||(_p=1,process.env.NODE_ENV==="production"?Ho.exports=qR():Ho.exports=YR()),Ho.exports}/*
54
54
  object-assign
55
55
  (c) Sindre Sorhus
56
56
  @license MIT
57
- */var Eu,_p;function Rc(){if(_p)return Eu;_p=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function a(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var d=Object.getOwnPropertyNames(c).map(function(h){return c[h]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(h){p[h]=h}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Eu=s()?Object.assign:function(i,c){for(var l,d=a(i),p,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var y in l)n.call(l,y)&&(d[y]=l[y]);if(e){p=e(l);for(var _=0;_<p.length;_++)t.call(l,p[_])&&(d[p[_]]=l[p[_]])}}return d},Eu}var Su,Ep;function Oc(){if(Ep)return Su;Ep=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Su=e,Su}var wu,Sp;function Kh(){return Sp||(Sp=1,wu=Function.call.bind(Object.prototype.hasOwnProperty)),wu}var Tu,wp;function GR(){if(wp)return Tu;wp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=Oc(),t={},a=Kh();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function s(i,c,l,d,p){if(process.env.NODE_ENV!=="production"){for(var h in i)if(a(i,h)){var y;try{if(typeof i[h]!="function"){var _=Error((d||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}y=i[h](c,h,d,l,null,n)}catch(T){y=T}if(y&&!(y instanceof Error)&&e((d||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in t)){t[y.message]=!0;var E=p?p():"";e("Failed "+l+" type: "+y.message+(E??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Tu=s,Tu}var Cu,Tp;function qR(){if(Tp)return Cu;Tp=1;var e=Vh(),n=Rc(),t=Oc(),a=Kh(),s=GR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function c(){return null}return Cu=function(l,d){var p=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function y(W){var q=W&&(p&&W[p]||W[h]);if(typeof q=="function")return q}var _="<<anonymous>>",E={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:j(),arrayOf:M,element:k(),elementType:O(),instanceOf:z,node:We(),objectOf:Y,oneOf:H,oneOfType:te,shape:st,exact:X};function T(W,q){return W===q?W!==0||1/W===1/q:W!==W&&q!==q}function x(W,q){this.message=W,this.data=q&&typeof q=="object"?q:{},this.stack=""}x.prototype=Error.prototype;function D(W){if(process.env.NODE_ENV!=="production")var q={},de=0;function le(fe,ne,ce,ue,he,ge,K){if(ue=ue||_,ge=ge||ce,K!==t){if(d){var F=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 F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ze=ue+":"+ce;!q[ze]&&de<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ge+"` prop on `"+ue+"`. 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."),q[ze]=!0,de++)}}return ne[ce]==null?fe?ne[ce]===null?new x("The "+he+" `"+ge+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new x("The "+he+" `"+ge+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:W(ne,ce,ue,he,ge)}var se=le.bind(null,!1);return se.isRequired=le.bind(null,!0),se}function P(W){function q(de,le,se,fe,ne,ce){var ue=de[le],he=Qe(ue);if(he!==W){var ge=Ge(ue);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ge+"` supplied to `"+se+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return D(q)}function j(){return D(c)}function M(W){function q(de,le,se,fe,ne){if(typeof W!="function")return new x("Property `"+ne+"` of component `"+se+"` has invalid PropType notation inside arrayOf.");var ce=de[le];if(!Array.isArray(ce)){var ue=Qe(ce);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected an array."))}for(var he=0;he<ce.length;he++){var ge=W(ce,he,se,fe,ne+"["+he+"]",t);if(ge instanceof Error)return ge}return null}return D(q)}function k(){function W(q,de,le,se,fe){var ne=q[de];if(!l(ne)){var ce=Qe(ne);return new x("Invalid "+se+" `"+fe+"` of type "+("`"+ce+"` supplied to `"+le+"`, expected a single ReactElement."))}return null}return D(W)}function O(){function W(q,de,le,se,fe){var ne=q[de];if(!e.isValidElementType(ne)){var ce=Qe(ne);return new x("Invalid "+se+" `"+fe+"` of type "+("`"+ce+"` supplied to `"+le+"`, expected a single ReactElement type."))}return null}return D(W)}function z(W){function q(de,le,se,fe,ne){if(!(de[le]instanceof W)){var ce=W.name||_,ue=qt(de[le]);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected ")+("instance of `"+ce+"`."))}return null}return D(q)}function H(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function q(de,le,se,fe,ne){for(var ce=de[le],ue=0;ue<W.length;ue++)if(T(ce,W[ue]))return null;var he=JSON.stringify(W,function(K,F){var ze=Ge(F);return ze==="symbol"?String(F):F});return new x("Invalid "+fe+" `"+ne+"` of value `"+String(ce)+"` "+("supplied to `"+se+"`, expected one of "+he+"."))}return D(q)}function Y(W){function q(de,le,se,fe,ne){if(typeof W!="function")return new x("Property `"+ne+"` of component `"+se+"` has invalid PropType notation inside objectOf.");var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected an object."));for(var he in ce)if(a(ce,he)){var ge=W(ce,he,se,fe,ne+"."+he,t);if(ge instanceof Error)return ge}return null}return D(q)}function te(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var q=0;q<W.length;q++){var de=W[q];if(typeof de!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+rt(de)+" at index "+q+"."),c}function le(se,fe,ne,ce,ue){for(var he=[],ge=0;ge<W.length;ge++){var K=W[ge],F=K(se,fe,ne,ce,ue,t);if(F==null)return null;F.data&&a(F.data,"expectedType")&&he.push(F.data.expectedType)}var ze=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new x("Invalid "+ce+" `"+ue+"` supplied to "+("`"+ne+"`"+ze+"."))}return D(le)}function We(){function W(q,de,le,se,fe){return Pe(q[de])?null:new x("Invalid "+se+" `"+fe+"` supplied to "+("`"+le+"`, expected a ReactNode."))}return D(W)}function Te(W,q,de,le,se){return new x((W||"React class")+": "+q+" type `"+de+"."+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+se+"`.")}function st(W){function q(de,le,se,fe,ne){var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type `"+ue+"` "+("supplied to `"+se+"`, expected `object`."));for(var he in W){var ge=W[he];if(typeof ge!="function")return Te(se,fe,ne,he,Ge(ge));var K=ge(ce,he,se,fe,ne+"."+he,t);if(K)return K}return null}return D(q)}function X(W){function q(de,le,se,fe,ne){var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type `"+ue+"` "+("supplied to `"+se+"`, expected `object`."));var he=n({},de[le],W);for(var ge in he){var K=W[ge];if(a(W,ge)&&typeof K!="function")return Te(se,fe,ne,ge,Ge(K));if(!K)return new x("Invalid "+fe+" `"+ne+"` key `"+ge+"` supplied to `"+se+"`.\nBad object: "+JSON.stringify(de[le],null," ")+`
58
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var F=K(ce,ge,se,fe,ne+"."+ge,t);if(F)return F}return null}return D(q)}function Pe(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(Pe);if(W===null||l(W))return!0;var q=y(W);if(q){var de=q.call(W),le;if(q!==W.entries){for(;!(le=de.next()).done;)if(!Pe(le.value))return!1}else for(;!(le=de.next()).done;){var se=le.value;if(se&&!Pe(se[1]))return!1}}else return!1;return!0;default:return!1}}function it(W,q){return W==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function Qe(W){var q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":it(q,W)?"symbol":q}function Ge(W){if(typeof W>"u"||W===null)return""+W;var q=Qe(W);if(q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return q}function rt(W){var q=Ge(W);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function qt(W){return!W.constructor||!W.constructor.name?_:W.constructor.name}return E.checkPropTypes=s,E.resetWarningCache=s.resetWarningCache,E.PropTypes=E,E},Cu}var xu,Cp;function YR(){if(Cp)return xu;Cp=1;var e=Oc();function n(){}function t(){}return t.resetWarningCache=n,xu=function(){function a(c,l,d,p,h,y){if(y!==e){var _=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 _.name="Invariant Violation",_}}a.isRequired=a;function s(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:s,element:a,elementType:a,instanceOf:s,node:a,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:n};return i.PropTypes=i,i},xu}if(process.env.NODE_ENV!=="production"){var zR=Vh(),VR=!0;Qu.exports=qR()(zR.isElement,VR)}else Qu.exports=YR()();var KR=Qu.exports;const Wn=_s(KR);var Nr=pt.createContext(null);process.env.NODE_ENV!=="production"&&(Nr.displayName="ReactRedux");function JR(e){e()}var Jh=JR,XR=function(n){return Jh=n},ZR=function(){return Jh};function QR(){var e=ZR(),n=null,t=null;return{clear:function(){n=null,t=null},notify:function(){e(function(){for(var s=n;s;)s.callback(),s=s.next})},get:function(){for(var s=[],i=n;i;)s.push(i),i=i.next;return s},subscribe:function(s){var i=!0,c=t={callback:s,next:null,prev:t};return c.prev?c.prev.next=c:n=c,function(){!i||n===null||(i=!1,c.next?c.next.prev=c.prev:t=c.prev,c.prev?c.prev.next=c.next:n=c.next)}}}}var xp={notify:function(){},get:function(){return[]}};function Xh(e,n){var t,a=xp;function s(y){return d(),a.subscribe(y)}function i(){a.notify()}function c(){h.onStateChange&&h.onStateChange()}function l(){return!!t}function d(){t||(t=n?n.addNestedSub(c):e.subscribe(c),a=QR())}function p(){t&&(t(),t=void 0,a.clear(),a=xp)}var h={addNestedSub:s,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:d,tryUnsubscribe:p,getListeners:function(){return a}};return h}var ec=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?pt.useLayoutEffect:pt.useEffect;function Zh(e){var n=e.store,t=e.context,a=e.children,s=pt.useMemo(function(){var l=Xh(n);return{store:n,subscription:l}},[n]),i=pt.useMemo(function(){return n.getState()},[n]);ec(function(){var l=s.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==n.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[s,i]);var c=t||Nr;return pt.createElement(c.Provider,{value:s},a)}process.env.NODE_ENV!=="production"&&(Zh.propTypes={store:Wn.shape({subscribe:Wn.func.isRequired,dispatch:Wn.func.isRequired,getState:Wn.func.isRequired}),context:Wn.object,children:Wn.any});var tc={exports:{}},$e={};/** @license React v16.13.1
57
+ */var Eu,Ep;function Rc(){if(Ep)return Eu;Ep=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function a(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},l=0;l<10;l++)c["_"+String.fromCharCode(l)]=l;var d=Object.getOwnPropertyNames(c).map(function(h){return c[h]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(h){p[h]=h}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Eu=s()?Object.assign:function(i,c){for(var l,d=a(i),p,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var m in l)r.call(l,m)&&(d[m]=l[m]);if(e){p=e(l);for(var _=0;_<p.length;_++)t.call(l,p[_])&&(d[p[_]]=l[p[_]])}}return d},Eu}var Su,Sp;function Oc(){if(Sp)return Su;Sp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Su=e,Su}var wu,wp;function Jh(){return wp||(wp=1,wu=Function.call.bind(Object.prototype.hasOwnProperty)),wu}var Tu,Tp;function zR(){if(Tp)return Tu;Tp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=Oc(),t={},a=Jh();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function s(i,c,l,d,p){if(process.env.NODE_ENV!=="production"){for(var h in i)if(a(i,h)){var m;try{if(typeof i[h]!="function"){var _=Error((d||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}m=i[h](c,h,d,l,null,r)}catch(T){m=T}if(m&&!(m instanceof Error)&&e((d||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof m+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),m instanceof Error&&!(m.message in t)){t[m.message]=!0;var E=p?p():"";e("Failed "+l+" type: "+m.message+(E??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Tu=s,Tu}var Cu,Cp;function VR(){if(Cp)return Cu;Cp=1;var e=Kh(),r=Rc(),t=Oc(),a=Jh(),s=zR(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(l){var d="Warning: "+l;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function c(){return null}return Cu=function(l,d){var p=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function m(W){var q=W&&(p&&W[p]||W[h]);if(typeof q=="function")return q}var _="<<anonymous>>",E={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:j(),arrayOf:M,element:k(),elementType:O(),instanceOf:z,node:Ue(),objectOf:Y,oneOf:G,oneOfType:te,shape:st,exact:X};function T(W,q){return W===q?W!==0||1/W===1/q:W!==W&&q!==q}function x(W,q){this.message=W,this.data=q&&typeof q=="object"?q:{},this.stack=""}x.prototype=Error.prototype;function D(W){if(process.env.NODE_ENV!=="production")var q={},de=0;function le(fe,ne,ce,ue,he,ge,K){if(ue=ue||_,ge=ge||ce,K!==t){if(d){var F=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 F.name="Invariant Violation",F}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ze=ue+":"+ce;!q[ze]&&de<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ge+"` prop on `"+ue+"`. 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."),q[ze]=!0,de++)}}return ne[ce]==null?fe?ne[ce]===null?new x("The "+he+" `"+ge+"` is marked as required "+("in `"+ue+"`, but its value is `null`.")):new x("The "+he+" `"+ge+"` is marked as required in "+("`"+ue+"`, but its value is `undefined`.")):null:W(ne,ce,ue,he,ge)}var se=le.bind(null,!1);return se.isRequired=le.bind(null,!0),se}function P(W){function q(de,le,se,fe,ne,ce){var ue=de[le],he=Qe(ue);if(he!==W){var ge=Ge(ue);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ge+"` supplied to `"+se+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return D(q)}function j(){return D(c)}function M(W){function q(de,le,se,fe,ne){if(typeof W!="function")return new x("Property `"+ne+"` of component `"+se+"` has invalid PropType notation inside arrayOf.");var ce=de[le];if(!Array.isArray(ce)){var ue=Qe(ce);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected an array."))}for(var he=0;he<ce.length;he++){var ge=W(ce,he,se,fe,ne+"["+he+"]",t);if(ge instanceof Error)return ge}return null}return D(q)}function k(){function W(q,de,le,se,fe){var ne=q[de];if(!l(ne)){var ce=Qe(ne);return new x("Invalid "+se+" `"+fe+"` of type "+("`"+ce+"` supplied to `"+le+"`, expected a single ReactElement."))}return null}return D(W)}function O(){function W(q,de,le,se,fe){var ne=q[de];if(!e.isValidElementType(ne)){var ce=Qe(ne);return new x("Invalid "+se+" `"+fe+"` of type "+("`"+ce+"` supplied to `"+le+"`, expected a single ReactElement type."))}return null}return D(W)}function z(W){function q(de,le,se,fe,ne){if(!(de[le]instanceof W)){var ce=W.name||_,ue=qt(de[le]);return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected ")+("instance of `"+ce+"`."))}return null}return D(q)}function G(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function q(de,le,se,fe,ne){for(var ce=de[le],ue=0;ue<W.length;ue++)if(T(ce,W[ue]))return null;var he=JSON.stringify(W,function(K,F){var ze=Ge(F);return ze==="symbol"?String(F):F});return new x("Invalid "+fe+" `"+ne+"` of value `"+String(ce)+"` "+("supplied to `"+se+"`, expected one of "+he+"."))}return D(q)}function Y(W){function q(de,le,se,fe,ne){if(typeof W!="function")return new x("Property `"+ne+"` of component `"+se+"` has invalid PropType notation inside objectOf.");var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type "+("`"+ue+"` supplied to `"+se+"`, expected an object."));for(var he in ce)if(a(ce,he)){var ge=W(ce,he,se,fe,ne+"."+he,t);if(ge instanceof Error)return ge}return null}return D(q)}function te(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var q=0;q<W.length;q++){var de=W[q];if(typeof de!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+rt(de)+" at index "+q+"."),c}function le(se,fe,ne,ce,ue){for(var he=[],ge=0;ge<W.length;ge++){var K=W[ge],F=K(se,fe,ne,ce,ue,t);if(F==null)return null;F.data&&a(F.data,"expectedType")&&he.push(F.data.expectedType)}var ze=he.length>0?", expected one of type ["+he.join(", ")+"]":"";return new x("Invalid "+ce+" `"+ue+"` supplied to "+("`"+ne+"`"+ze+"."))}return D(le)}function Ue(){function W(q,de,le,se,fe){return Pe(q[de])?null:new x("Invalid "+se+" `"+fe+"` supplied to "+("`"+le+"`, expected a ReactNode."))}return D(W)}function Te(W,q,de,le,se){return new x((W||"React class")+": "+q+" type `"+de+"."+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+se+"`.")}function st(W){function q(de,le,se,fe,ne){var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type `"+ue+"` "+("supplied to `"+se+"`, expected `object`."));for(var he in W){var ge=W[he];if(typeof ge!="function")return Te(se,fe,ne,he,Ge(ge));var K=ge(ce,he,se,fe,ne+"."+he,t);if(K)return K}return null}return D(q)}function X(W){function q(de,le,se,fe,ne){var ce=de[le],ue=Qe(ce);if(ue!=="object")return new x("Invalid "+fe+" `"+ne+"` of type `"+ue+"` "+("supplied to `"+se+"`, expected `object`."));var he=r({},de[le],W);for(var ge in he){var K=W[ge];if(a(W,ge)&&typeof K!="function")return Te(se,fe,ne,ge,Ge(K));if(!K)return new x("Invalid "+fe+" `"+ne+"` key `"+ge+"` supplied to `"+se+"`.\nBad object: "+JSON.stringify(de[le],null," ")+`
58
+ Valid keys: `+JSON.stringify(Object.keys(W),null," "));var F=K(ce,ge,se,fe,ne+"."+ge,t);if(F)return F}return null}return D(q)}function Pe(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(Pe);if(W===null||l(W))return!0;var q=m(W);if(q){var de=q.call(W),le;if(q!==W.entries){for(;!(le=de.next()).done;)if(!Pe(le.value))return!1}else for(;!(le=de.next()).done;){var se=le.value;if(se&&!Pe(se[1]))return!1}}else return!1;return!0;default:return!1}}function it(W,q){return W==="symbol"?!0:q?q["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&q instanceof Symbol:!1}function Qe(W){var q=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":it(q,W)?"symbol":q}function Ge(W){if(typeof W>"u"||W===null)return""+W;var q=Qe(W);if(q==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return q}function rt(W){var q=Ge(W);switch(q){case"array":case"object":return"an "+q;case"boolean":case"date":case"regexp":return"a "+q;default:return q}}function qt(W){return!W.constructor||!W.constructor.name?_:W.constructor.name}return E.checkPropTypes=s,E.resetWarningCache=s.resetWarningCache,E.PropTypes=E,E},Cu}var xu,xp;function KR(){if(xp)return xu;xp=1;var e=Oc();function r(){}function t(){}return t.resetWarningCache=r,xu=function(){function a(c,l,d,p,h,m){if(m!==e){var _=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 _.name="Invariant Violation",_}}a.isRequired=a;function s(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:s,element:a,elementType:a,instanceOf:s,node:a,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:r};return i.PropTypes=i,i},xu}if(process.env.NODE_ENV!=="production"){var JR=Kh(),XR=!0;Qu.exports=VR()(JR.isElement,XR)}else Qu.exports=KR()();var ZR=Qu.exports;const Un=_s(ZR);var Nr=pt.createContext(null);process.env.NODE_ENV!=="production"&&(Nr.displayName="ReactRedux");function QR(e){e()}var Xh=QR,eO=function(r){return Xh=r},tO=function(){return Xh};function rO(){var e=tO(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var s=r;s;)s.callback(),s=s.next})},get:function(){for(var s=[],i=r;i;)s.push(i),i=i.next;return s},subscribe:function(s){var i=!0,c=t={callback:s,next:null,prev:t};return c.prev?c.prev.next=c:r=c,function(){!i||r===null||(i=!1,c.next?c.next.prev=c.prev:t=c.prev,c.prev?c.prev.next=c.next:r=c.next)}}}}var Rp={notify:function(){},get:function(){return[]}};function Zh(e,r){var t,a=Rp;function s(m){return d(),a.subscribe(m)}function i(){a.notify()}function c(){h.onStateChange&&h.onStateChange()}function l(){return!!t}function d(){t||(t=r?r.addNestedSub(c):e.subscribe(c),a=rO())}function p(){t&&(t(),t=void 0,a.clear(),a=Rp)}var h={addNestedSub:s,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:d,tryUnsubscribe:p,getListeners:function(){return a}};return h}var ec=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?pt.useLayoutEffect:pt.useEffect;function Qh(e){var r=e.store,t=e.context,a=e.children,s=pt.useMemo(function(){var l=Zh(r);return{store:r,subscription:l}},[r]),i=pt.useMemo(function(){return r.getState()},[r]);ec(function(){var l=s.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==r.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[s,i]);var c=t||Nr;return pt.createElement(c.Provider,{value:s},a)}process.env.NODE_ENV!=="production"&&(Qh.propTypes={store:Un.shape({subscribe:Un.func.isRequired,dispatch:Un.func.isRequired,getState:Un.func.isRequired}),context:Un.object,children:Un.any});var tc={exports:{}},$e={};/** @license React v16.13.1
59
59
  * react-is.production.min.js
60
60
  *
61
61
  * Copyright (c) Facebook, Inc. and its affiliates.
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var Rp;function eO(){if(Rp)return $e;Rp=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(O){if(typeof O=="object"&&O!==null){var z=O.$$typeof;switch(z){case n:switch(O=O.type,O){case d:case p:case a:case i:case s:case y:return O;default:switch(O=O&&O.$$typeof,O){case l:case h:case T:case E:case c:return O;default:return z}}case t:return z}}}function k(O){return M(O)===p}return $e.AsyncMode=d,$e.ConcurrentMode=p,$e.ContextConsumer=l,$e.ContextProvider=c,$e.Element=n,$e.ForwardRef=h,$e.Fragment=a,$e.Lazy=T,$e.Memo=E,$e.Portal=t,$e.Profiler=i,$e.StrictMode=s,$e.Suspense=y,$e.isAsyncMode=function(O){return k(O)||M(O)===d},$e.isConcurrentMode=k,$e.isContextConsumer=function(O){return M(O)===l},$e.isContextProvider=function(O){return M(O)===c},$e.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===n},$e.isForwardRef=function(O){return M(O)===h},$e.isFragment=function(O){return M(O)===a},$e.isLazy=function(O){return M(O)===T},$e.isMemo=function(O){return M(O)===E},$e.isPortal=function(O){return M(O)===t},$e.isProfiler=function(O){return M(O)===i},$e.isStrictMode=function(O){return M(O)===s},$e.isSuspense=function(O){return M(O)===y},$e.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===a||O===p||O===i||O===s||O===y||O===_||typeof O=="object"&&O!==null&&(O.$$typeof===T||O.$$typeof===E||O.$$typeof===c||O.$$typeof===l||O.$$typeof===h||O.$$typeof===D||O.$$typeof===P||O.$$typeof===j||O.$$typeof===x)},$e.typeOf=M,$e}var Me={};/** @license React v16.13.1
65
+ */var Op;function nO(){if(Op)return $e;Op=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(O){if(typeof O=="object"&&O!==null){var z=O.$$typeof;switch(z){case r:switch(O=O.type,O){case d:case p:case a:case i:case s:case m:return O;default:switch(O=O&&O.$$typeof,O){case l:case h:case T:case E:case c:return O;default:return z}}case t:return z}}}function k(O){return M(O)===p}return $e.AsyncMode=d,$e.ConcurrentMode=p,$e.ContextConsumer=l,$e.ContextProvider=c,$e.Element=r,$e.ForwardRef=h,$e.Fragment=a,$e.Lazy=T,$e.Memo=E,$e.Portal=t,$e.Profiler=i,$e.StrictMode=s,$e.Suspense=m,$e.isAsyncMode=function(O){return k(O)||M(O)===d},$e.isConcurrentMode=k,$e.isContextConsumer=function(O){return M(O)===l},$e.isContextProvider=function(O){return M(O)===c},$e.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===r},$e.isForwardRef=function(O){return M(O)===h},$e.isFragment=function(O){return M(O)===a},$e.isLazy=function(O){return M(O)===T},$e.isMemo=function(O){return M(O)===E},$e.isPortal=function(O){return M(O)===t},$e.isProfiler=function(O){return M(O)===i},$e.isStrictMode=function(O){return M(O)===s},$e.isSuspense=function(O){return M(O)===m},$e.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===a||O===p||O===i||O===s||O===m||O===_||typeof O=="object"&&O!==null&&(O.$$typeof===T||O.$$typeof===E||O.$$typeof===c||O.$$typeof===l||O.$$typeof===h||O.$$typeof===D||O.$$typeof===P||O.$$typeof===j||O.$$typeof===x)},$e.typeOf=M,$e}var Me={};/** @license React v16.13.1
66
66
  * react-is.development.js
67
67
  *
68
68
  * Copyright (c) Facebook, Inc. and its affiliates.
69
69
  *
70
70
  * This source code is licensed under the MIT license found in the
71
71
  * LICENSE file in the root directory of this source tree.
72
- */var Op;function tO(){return Op||(Op=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(F){return typeof F=="string"||typeof F=="function"||F===a||F===p||F===i||F===s||F===y||F===_||typeof F=="object"&&F!==null&&(F.$$typeof===T||F.$$typeof===E||F.$$typeof===c||F.$$typeof===l||F.$$typeof===h||F.$$typeof===D||F.$$typeof===P||F.$$typeof===j||F.$$typeof===x)}function k(F){if(typeof F=="object"&&F!==null){var ze=F.$$typeof;switch(ze){case n:var qe=F.type;switch(qe){case d:case p:case a:case i:case s:case y:return qe;default:var yt=qe&&qe.$$typeof;switch(yt){case l:case h:case T:case E:case c:return yt;default:return ze}}case t:return ze}}}var O=d,z=p,H=l,Y=c,te=n,We=h,Te=a,st=T,X=E,Pe=t,it=i,Qe=s,Ge=y,rt=!1;function qt(F){return rt||(rt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(F)||k(F)===d}function W(F){return k(F)===p}function q(F){return k(F)===l}function de(F){return k(F)===c}function le(F){return typeof F=="object"&&F!==null&&F.$$typeof===n}function se(F){return k(F)===h}function fe(F){return k(F)===a}function ne(F){return k(F)===T}function ce(F){return k(F)===E}function ue(F){return k(F)===t}function he(F){return k(F)===i}function ge(F){return k(F)===s}function K(F){return k(F)===y}Me.AsyncMode=O,Me.ConcurrentMode=z,Me.ContextConsumer=H,Me.ContextProvider=Y,Me.Element=te,Me.ForwardRef=We,Me.Fragment=Te,Me.Lazy=st,Me.Memo=X,Me.Portal=Pe,Me.Profiler=it,Me.StrictMode=Qe,Me.Suspense=Ge,Me.isAsyncMode=qt,Me.isConcurrentMode=W,Me.isContextConsumer=q,Me.isContextProvider=de,Me.isElement=le,Me.isForwardRef=se,Me.isFragment=fe,Me.isLazy=ne,Me.isMemo=ce,Me.isPortal=ue,Me.isProfiler=he,Me.isStrictMode=ge,Me.isSuspense=K,Me.isValidElementType=M,Me.typeOf=k}()),Me}process.env.NODE_ENV==="production"?tc.exports=eO():tc.exports=tO();var rO=tc.exports,Qh=rO,nO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},aO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},eg={};eg[Qh.ForwardRef]=nO;eg[Qh.Memo]=aO;var je={};/** @license React v17.0.2
72
+ */var Ap;function aO(){return Ap||(Ap=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,m=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,T=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,D=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,j=e?Symbol.for("react.scope"):60119;function M(F){return typeof F=="string"||typeof F=="function"||F===a||F===p||F===i||F===s||F===m||F===_||typeof F=="object"&&F!==null&&(F.$$typeof===T||F.$$typeof===E||F.$$typeof===c||F.$$typeof===l||F.$$typeof===h||F.$$typeof===D||F.$$typeof===P||F.$$typeof===j||F.$$typeof===x)}function k(F){if(typeof F=="object"&&F!==null){var ze=F.$$typeof;switch(ze){case r:var qe=F.type;switch(qe){case d:case p:case a:case i:case s:case m:return qe;default:var mt=qe&&qe.$$typeof;switch(mt){case l:case h:case T:case E:case c:return mt;default:return ze}}case t:return ze}}}var O=d,z=p,G=l,Y=c,te=r,Ue=h,Te=a,st=T,X=E,Pe=t,it=i,Qe=s,Ge=m,rt=!1;function qt(F){return rt||(rt=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(F)||k(F)===d}function W(F){return k(F)===p}function q(F){return k(F)===l}function de(F){return k(F)===c}function le(F){return typeof F=="object"&&F!==null&&F.$$typeof===r}function se(F){return k(F)===h}function fe(F){return k(F)===a}function ne(F){return k(F)===T}function ce(F){return k(F)===E}function ue(F){return k(F)===t}function he(F){return k(F)===i}function ge(F){return k(F)===s}function K(F){return k(F)===m}Me.AsyncMode=O,Me.ConcurrentMode=z,Me.ContextConsumer=G,Me.ContextProvider=Y,Me.Element=te,Me.ForwardRef=Ue,Me.Fragment=Te,Me.Lazy=st,Me.Memo=X,Me.Portal=Pe,Me.Profiler=it,Me.StrictMode=Qe,Me.Suspense=Ge,Me.isAsyncMode=qt,Me.isConcurrentMode=W,Me.isContextConsumer=q,Me.isContextProvider=de,Me.isElement=le,Me.isForwardRef=se,Me.isFragment=fe,Me.isLazy=ne,Me.isMemo=ce,Me.isPortal=ue,Me.isProfiler=he,Me.isStrictMode=ge,Me.isSuspense=K,Me.isValidElementType=M,Me.typeOf=k}()),Me}process.env.NODE_ENV==="production"?tc.exports=nO():tc.exports=aO();var oO=tc.exports,eg=oO,sO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},iO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tg={};tg[eg.ForwardRef]=sO;tg[eg.Memo]=iO;var je={};/** @license React v17.0.2
73
73
  * react-is.production.min.js
74
74
  *
75
75
  * Copyright (c) Facebook, Inc. and its affiliates.
76
76
  *
77
77
  * This source code is licensed under the MIT license found in the
78
78
  * LICENSE file in the root directory of this source tree.
79
- */var Ap;function oO(){if(Ap)return je;Ap=1;var e=60103,n=60106,t=60107,a=60108,s=60114,i=60109,c=60110,l=60112,d=60113,p=60120,h=60115,y=60116,_=60121,E=60122,T=60117,x=60129,D=60131;if(typeof Symbol=="function"&&Symbol.for){var P=Symbol.for;e=P("react.element"),n=P("react.portal"),t=P("react.fragment"),a=P("react.strict_mode"),s=P("react.profiler"),i=P("react.provider"),c=P("react.context"),l=P("react.forward_ref"),d=P("react.suspense"),p=P("react.suspense_list"),h=P("react.memo"),y=P("react.lazy"),_=P("react.block"),E=P("react.server.block"),T=P("react.fundamental"),x=P("react.debug_trace_mode"),D=P("react.legacy_hidden")}function j(X){if(typeof X=="object"&&X!==null){var Pe=X.$$typeof;switch(Pe){case e:switch(X=X.type,X){case t:case s:case a:case d:case p:return X;default:switch(X=X&&X.$$typeof,X){case c:case l:case y:case h:case i:return X;default:return Pe}}case n:return Pe}}}var M=i,k=e,O=l,z=t,H=y,Y=h,te=n,We=s,Te=a,st=d;return je.ContextConsumer=c,je.ContextProvider=M,je.Element=k,je.ForwardRef=O,je.Fragment=z,je.Lazy=H,je.Memo=Y,je.Portal=te,je.Profiler=We,je.StrictMode=Te,je.Suspense=st,je.isAsyncMode=function(){return!1},je.isConcurrentMode=function(){return!1},je.isContextConsumer=function(X){return j(X)===c},je.isContextProvider=function(X){return j(X)===i},je.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===e},je.isForwardRef=function(X){return j(X)===l},je.isFragment=function(X){return j(X)===t},je.isLazy=function(X){return j(X)===y},je.isMemo=function(X){return j(X)===h},je.isPortal=function(X){return j(X)===n},je.isProfiler=function(X){return j(X)===s},je.isStrictMode=function(X){return j(X)===a},je.isSuspense=function(X){return j(X)===d},je.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===t||X===s||X===x||X===a||X===d||X===p||X===D||typeof X=="object"&&X!==null&&(X.$$typeof===y||X.$$typeof===h||X.$$typeof===i||X.$$typeof===c||X.$$typeof===l||X.$$typeof===T||X.$$typeof===_||X[0]===E)},je.typeOf=j,je}var Be={};/** @license React v17.0.2
79
+ */var Pp;function uO(){if(Pp)return je;Pp=1;var e=60103,r=60106,t=60107,a=60108,s=60114,i=60109,c=60110,l=60112,d=60113,p=60120,h=60115,m=60116,_=60121,E=60122,T=60117,x=60129,D=60131;if(typeof Symbol=="function"&&Symbol.for){var P=Symbol.for;e=P("react.element"),r=P("react.portal"),t=P("react.fragment"),a=P("react.strict_mode"),s=P("react.profiler"),i=P("react.provider"),c=P("react.context"),l=P("react.forward_ref"),d=P("react.suspense"),p=P("react.suspense_list"),h=P("react.memo"),m=P("react.lazy"),_=P("react.block"),E=P("react.server.block"),T=P("react.fundamental"),x=P("react.debug_trace_mode"),D=P("react.legacy_hidden")}function j(X){if(typeof X=="object"&&X!==null){var Pe=X.$$typeof;switch(Pe){case e:switch(X=X.type,X){case t:case s:case a:case d:case p:return X;default:switch(X=X&&X.$$typeof,X){case c:case l:case m:case h:case i:return X;default:return Pe}}case r:return Pe}}}var M=i,k=e,O=l,z=t,G=m,Y=h,te=r,Ue=s,Te=a,st=d;return je.ContextConsumer=c,je.ContextProvider=M,je.Element=k,je.ForwardRef=O,je.Fragment=z,je.Lazy=G,je.Memo=Y,je.Portal=te,je.Profiler=Ue,je.StrictMode=Te,je.Suspense=st,je.isAsyncMode=function(){return!1},je.isConcurrentMode=function(){return!1},je.isContextConsumer=function(X){return j(X)===c},je.isContextProvider=function(X){return j(X)===i},je.isElement=function(X){return typeof X=="object"&&X!==null&&X.$$typeof===e},je.isForwardRef=function(X){return j(X)===l},je.isFragment=function(X){return j(X)===t},je.isLazy=function(X){return j(X)===m},je.isMemo=function(X){return j(X)===h},je.isPortal=function(X){return j(X)===r},je.isProfiler=function(X){return j(X)===s},je.isStrictMode=function(X){return j(X)===a},je.isSuspense=function(X){return j(X)===d},je.isValidElementType=function(X){return typeof X=="string"||typeof X=="function"||X===t||X===s||X===x||X===a||X===d||X===p||X===D||typeof X=="object"&&X!==null&&(X.$$typeof===m||X.$$typeof===h||X.$$typeof===i||X.$$typeof===c||X.$$typeof===l||X.$$typeof===T||X.$$typeof===_||X[0]===E)},je.typeOf=j,je}var Be={};/** @license React v17.0.2
80
80
  * react-is.development.js
81
81
  *
82
82
  * Copyright (c) Facebook, Inc. and its affiliates.
83
83
  *
84
84
  * This source code is licensed under the MIT license found in the
85
85
  * LICENSE file in the root directory of this source tree.
86
- */var Pp;function sO(){return Pp||(Pp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,n=60106,t=60107,a=60108,s=60114,i=60109,c=60110,l=60112,d=60113,p=60120,h=60115,y=60116,_=60121,E=60122,T=60117,x=60129,D=60131;if(typeof Symbol=="function"&&Symbol.for){var P=Symbol.for;e=P("react.element"),n=P("react.portal"),t=P("react.fragment"),a=P("react.strict_mode"),s=P("react.profiler"),i=P("react.provider"),c=P("react.context"),l=P("react.forward_ref"),d=P("react.suspense"),p=P("react.suspense_list"),h=P("react.memo"),y=P("react.lazy"),_=P("react.block"),E=P("react.server.block"),T=P("react.fundamental"),P("react.scope"),P("react.opaque.id"),x=P("react.debug_trace_mode"),P("react.offscreen"),D=P("react.legacy_hidden")}var j=!1;function M(K){return!!(typeof K=="string"||typeof K=="function"||K===t||K===s||K===x||K===a||K===d||K===p||K===D||j||typeof K=="object"&&K!==null&&(K.$$typeof===y||K.$$typeof===h||K.$$typeof===i||K.$$typeof===c||K.$$typeof===l||K.$$typeof===T||K.$$typeof===_||K[0]===E))}function k(K){if(typeof K=="object"&&K!==null){var F=K.$$typeof;switch(F){case e:var ze=K.type;switch(ze){case t:case s:case a:case d:case p:return ze;default:var qe=ze&&ze.$$typeof;switch(qe){case c:case l:case y:case h:case i:return qe;default:return F}}case n:return F}}}var O=c,z=i,H=e,Y=l,te=t,We=y,Te=h,st=n,X=s,Pe=a,it=d,Qe=!1,Ge=!1;function rt(K){return Qe||(Qe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function qt(K){return Ge||(Ge=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(K){return k(K)===c}function q(K){return k(K)===i}function de(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function le(K){return k(K)===l}function se(K){return k(K)===t}function fe(K){return k(K)===y}function ne(K){return k(K)===h}function ce(K){return k(K)===n}function ue(K){return k(K)===s}function he(K){return k(K)===a}function ge(K){return k(K)===d}Be.ContextConsumer=O,Be.ContextProvider=z,Be.Element=H,Be.ForwardRef=Y,Be.Fragment=te,Be.Lazy=We,Be.Memo=Te,Be.Portal=st,Be.Profiler=X,Be.StrictMode=Pe,Be.Suspense=it,Be.isAsyncMode=rt,Be.isConcurrentMode=qt,Be.isContextConsumer=W,Be.isContextProvider=q,Be.isElement=de,Be.isForwardRef=le,Be.isFragment=se,Be.isLazy=fe,Be.isMemo=ne,Be.isPortal=ce,Be.isProfiler=ue,Be.isStrictMode=he,Be.isSuspense=ge,Be.isValidElementType=M,Be.typeOf=k}()),Be}process.env.NODE_ENV==="production"?oO():sO();function Dp(e,n){return e===n?e!==0||n!==0||1/e===1/n:e!==e&&n!==n}function tg(e,n){if(Dp(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var t=Object.keys(e),a=Object.keys(n);if(t.length!==a.length)return!1;for(var s=0;s<t.length;s++)if(!Object.prototype.hasOwnProperty.call(n,t[s])||!Dp(e[t[s]],n[t[s]]))return!1;return!0}function rg(){var e=pt.useContext(Nr);if(process.env.NODE_ENV!=="production"&&!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return e}function ng(e){e===void 0&&(e=Nr);var n=e===Nr?rg:function(){return pt.useContext(e)};return function(){var a=n(),s=a.store;return s}}var iO=ng();function uO(e){e===void 0&&(e=Nr);var n=e===Nr?iO:ng(e);return function(){var a=n();return a.dispatch}}var cO=uO(),lO=function(n,t){return n===t};function fO(e,n,t,a){var s=pt.useReducer(function(T){return T+1},0),i=s[1],c=pt.useMemo(function(){return Xh(t,a)},[t,a]),l=pt.useRef(),d=pt.useRef(),p=pt.useRef(),h=pt.useRef(),y=t.getState(),_;try{if(e!==d.current||y!==p.current||l.current){var E=e(y);h.current===void 0||!n(E,h.current)?_=E:_=h.current}else _=h.current}catch(T){throw l.current&&(T.message+=`
86
+ */var Dp;function cO(){return Dp||(Dp=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,r=60106,t=60107,a=60108,s=60114,i=60109,c=60110,l=60112,d=60113,p=60120,h=60115,m=60116,_=60121,E=60122,T=60117,x=60129,D=60131;if(typeof Symbol=="function"&&Symbol.for){var P=Symbol.for;e=P("react.element"),r=P("react.portal"),t=P("react.fragment"),a=P("react.strict_mode"),s=P("react.profiler"),i=P("react.provider"),c=P("react.context"),l=P("react.forward_ref"),d=P("react.suspense"),p=P("react.suspense_list"),h=P("react.memo"),m=P("react.lazy"),_=P("react.block"),E=P("react.server.block"),T=P("react.fundamental"),P("react.scope"),P("react.opaque.id"),x=P("react.debug_trace_mode"),P("react.offscreen"),D=P("react.legacy_hidden")}var j=!1;function M(K){return!!(typeof K=="string"||typeof K=="function"||K===t||K===s||K===x||K===a||K===d||K===p||K===D||j||typeof K=="object"&&K!==null&&(K.$$typeof===m||K.$$typeof===h||K.$$typeof===i||K.$$typeof===c||K.$$typeof===l||K.$$typeof===T||K.$$typeof===_||K[0]===E))}function k(K){if(typeof K=="object"&&K!==null){var F=K.$$typeof;switch(F){case e:var ze=K.type;switch(ze){case t:case s:case a:case d:case p:return ze;default:var qe=ze&&ze.$$typeof;switch(qe){case c:case l:case m:case h:case i:return qe;default:return F}}case r:return F}}}var O=c,z=i,G=e,Y=l,te=t,Ue=m,Te=h,st=r,X=s,Pe=a,it=d,Qe=!1,Ge=!1;function rt(K){return Qe||(Qe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function qt(K){return Ge||(Ge=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(K){return k(K)===c}function q(K){return k(K)===i}function de(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function le(K){return k(K)===l}function se(K){return k(K)===t}function fe(K){return k(K)===m}function ne(K){return k(K)===h}function ce(K){return k(K)===r}function ue(K){return k(K)===s}function he(K){return k(K)===a}function ge(K){return k(K)===d}Be.ContextConsumer=O,Be.ContextProvider=z,Be.Element=G,Be.ForwardRef=Y,Be.Fragment=te,Be.Lazy=Ue,Be.Memo=Te,Be.Portal=st,Be.Profiler=X,Be.StrictMode=Pe,Be.Suspense=it,Be.isAsyncMode=rt,Be.isConcurrentMode=qt,Be.isContextConsumer=W,Be.isContextProvider=q,Be.isElement=de,Be.isForwardRef=le,Be.isFragment=se,Be.isLazy=fe,Be.isMemo=ne,Be.isPortal=ce,Be.isProfiler=ue,Be.isStrictMode=he,Be.isSuspense=ge,Be.isValidElementType=M,Be.typeOf=k}()),Be}process.env.NODE_ENV==="production"?uO():cO();function Ip(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function rg(e,r){if(Ip(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var t=Object.keys(e),a=Object.keys(r);if(t.length!==a.length)return!1;for(var s=0;s<t.length;s++)if(!Object.prototype.hasOwnProperty.call(r,t[s])||!Ip(e[t[s]],r[t[s]]))return!1;return!0}function ng(){var e=pt.useContext(Nr);if(process.env.NODE_ENV!=="production"&&!e)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return e}function ag(e){e===void 0&&(e=Nr);var r=e===Nr?ng:function(){return pt.useContext(e)};return function(){var a=r(),s=a.store;return s}}var lO=ag();function fO(e){e===void 0&&(e=Nr);var r=e===Nr?lO:ag(e);return function(){var a=r();return a.dispatch}}var dO=fO(),pO=function(r,t){return r===t};function hO(e,r,t,a){var s=pt.useReducer(function(T){return T+1},0),i=s[1],c=pt.useMemo(function(){return Zh(t,a)},[t,a]),l=pt.useRef(),d=pt.useRef(),p=pt.useRef(),h=pt.useRef(),m=t.getState(),_;try{if(e!==d.current||m!==p.current||l.current){var E=e(m);h.current===void 0||!r(E,h.current)?_=E:_=h.current}else _=h.current}catch(T){throw l.current&&(T.message+=`
87
87
  The error may be correlated with this previous error:
88
88
  `+l.current.stack+`
89
89
 
90
- `),T}return ec(function(){d.current=e,p.current=y,h.current=_,l.current=void 0}),ec(function(){function T(){try{var x=t.getState();if(x===p.current)return;var D=d.current(x);if(n(D,h.current))return;h.current=D,p.current=x}catch(P){l.current=P}i()}return c.onStateChange=T,c.trySubscribe(),T(),function(){return c.tryUnsubscribe()}},[t,c]),_}function dO(e){e===void 0&&(e=Nr);var n=e===Nr?rg:function(){return pt.useContext(e)};return function(a,s){if(s===void 0&&(s=lO),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 s!="function")throw new Error("You must pass a function as an equality function to useSelector")}var i=n(),c=i.store,l=i.subscription,d=fO(a,s,c,l);return pt.useDebugValue(d),d}}var pO=dO();XR(WS.unstable_batchedUpdates);const hO=()=>cO(),kr=pO,Ac=G(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),gO=G(e=>e,({catalog:e})=>e.state),ag=G(Ac,e=>e?e.dataClasses:[]),vO=G(ag,e=>Object.values(e).filter(({virtual:n})=>n)),mO=G(Ac,e=>e?e.methods:[]),og=e=>G(n=>n,n=>{switch(n.catalog.state){case"loaded":const t=e?n.catalog.model.dataClasses[e]:n.catalog.model;return(t==null?void 0:t.methods)||[];default:return[]}}),yO=e=>kr(og(e),tg),bO=(e,n)=>G(og(e),t=>t.find(a=>`${a.applyTo}.${a.name}`===n)),_O=(e,n,t)=>kr(bO(e,`${t}.${n}`),tg),sg=G(e=>e,e=>e),EO=e=>G(jr,n=>{var s;const t=n.tabs.find(({path:i})=>i===e),a=t==null?void 0:t.content.components;return!t||!a?[]:(s=Object.keys(a))==null?void 0:s.map(i=>({id:i,...a[i]}))}),ig=e=>G(jr,n=>{var a,s;const t=n.tabs.find(({path:i})=>i===e);return((s=(a=t==null?void 0:t.content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]}),SO=(e,n,t)=>G(sg,a=>{var s,i;if(n){const c=a.sharedDatasources.sources[n];return c?c.find(l=>l.id===e):void 0}else{const c=a.root.tabs.find(d=>d.path===t);return c?(i=(s=c.content.metadata)==null?void 0:s.datasources)==null?void 0:i.find(d=>d.id===e):void 0}}),ug=G(e=>e,e=>{var n;return((n=e.sharedDatasources)==null?void 0:n.sources)||[]}),wO=(e,n,t,a)=>G(ig(e),ug,(s,i)=>{const c=He.flatten(He.values(i)),l=[...n!=="private"?s:[],...n!=="shared"?c:[]];return t?l.filter(d=>(!a||a.every(({id:p,namespace:h=""})=>d.id!==p||(d.namespace||"")!==h))&&(t.includes(d.type)||d.dataType&&(t.includes(d.dataType)||t.includes("objectFromArray")&&d.dataType==="object"&&d.from))):l}),TO=G(e=>e.debugger,e=>e.meta),Tn=G(e=>e.debugger,e=>e.list),Dt=G(e=>e.debugger,e=>e.sessions),CO=G(Dt,e=>e.length),Sn=(e,n,t,a)=>e.find(s=>s.filePath===n&&s.methodName===t&&(!a||s.className===a)),ot=(e,n)=>e.find(t=>t.threadId===n),cg=(e,n)=>e.find(t=>t.tabPath===n),xO=(e,n)=>G(Tn,t=>{var a;return((a=Sn(t,e,n))==null?void 0:a.breakpoints.saved.locations)||[]}),RO=(e,n)=>G(Tn,t=>{var a;return((a=Sn(t,e,n))==null?void 0:a.breakpoints.draft.locations)||[]}),OO=e=>G(Tn,n=>n.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.saved.locations.map(s=>({...s,line:s.line+(a.breakpoints.saved.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),AO=e=>G(Tn,n=>n.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.draft.locations.map(s=>({...s,line:s.line+(a.breakpoints.draft.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),PO=e=>G(Dt,n=>{const t=ot(n,e);return t!=null&&t.stopped?t.highlightedLines:null}),DO=e=>G(Dt,n=>{const t=ot(n,e);return t!=null&&t.stopped?t.activeLine:null}),IO=e=>G(Dt,n=>{var t;return((t=ot(n,e))==null?void 0:t.expressions)||[]}),FO=e=>G(Dt,n=>{var t;return((t=ot(n,e))==null?void 0:t.stopped)||!1}),$O=(e,n)=>G(Tn,t=>{var a;return(a=Sn(t,e,n))==null?void 0:a.source}),MO=e=>G(Dt,n=>{var t;return((t=cg(n,e))==null?void 0:t.threadId)||-1}),LO=e=>G(Dt,n=>{var t,a;return(a=(t=ot(n,e))==null?void 0:t.currentStackFrame)==null?void 0:a.source}),NO=e=>G(Dt,n=>{var t;return(t=ot(n,e))==null?void 0:t.currentStackFrame}),kO=G(Dt,e=>e.map(({channelId:n,threadId:t})=>({id:n,threadId:t}))),jO=e=>G(Dt,n=>{var t;return((t=ot(n,e))==null?void 0:t.stackFrames)||[]}),BO=e=>G(Dt,n=>{var t,a;return((a=(t=ot(n,e))==null?void 0:t.variables)==null?void 0:a.callchain)||[]}),WO=e=>G(Dt,n=>{var t,a;return((a=(t=ot(n,e))==null?void 0:t.variables)==null?void 0:a.expressions)||[]}),UO=(e,n="saved")=>G(Tn,t=>{const a=t.find(s=>s.filePath===e);return(a==null?void 0:a.breakpoints[n].offset)||0}),HO=(e,n,t,a)=>G(Dt,s=>{var p;const i=((p=ot(s,e))==null?void 0:p.exceptions)||[],c=n===b.FileFolderType.CLASS,l=c&&a?`${a}.${t}`:t;return(l?i.filter(h=>h.location===l):i).map(h=>({...h,locationLine:c?h.locationLine:h.locationLine+1}))}),jr=G(e=>e.root,e=>e),ta=G(jr,e=>e.tabs),GO=G(jr,e=>e.activeTab),qO=G(jr,e=>e.recent.filter(({type:n})=>n!==b.FileFolderType.DEBUGGER)),YO=G(jr,({tabs:e,activeTab:n})=>e.find(({path:t})=>t===n)),zO=G(jr,({tabs:e})=>e.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null)),VO=G(ta,e=>e.filter(({type:n,flags:t})=>n===b.FileFolderType.WEBFORM&&t.enabled===!1).map(({path:n})=>n)),KO=G(ta,e=>e.length>0),ra=e=>G(jr,n=>n.tabs.find(({path:t})=>t===e)),lg=(e,n="")=>G(ra(e),t=>!t||!t.content||typeof t.content=="string"?t==null?void 0:t.content:He.get(t.content,n)),JO=e=>G(ra(e),n=>n==null?void 0:n.extra),XO=(e,n=t=>t)=>G(lg(e,"components"),t=>n(t||{})),Pc=G(ta,e=>e.filter(n=>n.flags.touched)),ZO=G(Pc,e=>e.length),QO=G(Dt,e=>e.map(({threadId:n,currentStackFrame:{source:t},tabPath:a})=>({name:Th(n,t),path:a,type:b.FileFolderType.DEBUGGER,content:t==null?void 0:t.content,flags:{},extra:{source:t}}))),eA=G(e=>e,e=>e.explorer||[]),fg=G(e=>e,e=>e.explorer.find(n=>n.path===b.FolderRootPath.WEBFORMS)),dg=G(e=>e,e=>e.explorer.find(n=>n.path===b.FolderRootPath.METHODS)),pg=G(e=>e,e=>e.explorer.find(n=>n.path===b.FolderRootPath.CLASSES)),tA=G(dg,e=>(e==null?void 0:e.children)||[]),rA=G(fg,e=>(e==null?void 0:e.children)||[]),nA=G(pg,e=>(e==null?void 0:e.children)||[]),aA=G(e=>e.modals,e=>e.list),oA=G(e=>e.roles,e=>Ns(e)),sA=G(e=>e.roles,({roles:e})=>e),iA=G(e=>e.roles,({privileges:e})=>e),uA=G(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:n})=>n==="guest")),cA=G(e=>e.roles,({flags:e})=>e),lA=G(e=>e.roles,({selectedTab:e})=>e),fA=G(e=>e.roles,({forceLogin:e})=>e),dA=G(e=>e.roles,({date:e})=>e),Dc=G(e=>e.settings,e=>e.session),pA=(...e)=>G(Dc,n=>e.length>0?He.pick(n,e):n),hA=G(e=>e.settings,e=>e.project),gA=G(e=>e.settings,e=>e),Ic=G(e=>e.settings,e=>e.server),vA=G(Ic,e=>e.remoteDebuggerMode),mA=G(Ic,e=>e.qodly),yA=G(Dc,e=>e["monaco.zoom"]),hg=["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"],gg=hg.map(e=>({id:yc(),content:"",name:e,parentId:null,scope:b.EWebFormStyleClassScope.THEME})),Fc=e=>G(ra(e),n=>{var t,a;return((a=(t=n==null?void 0:n.content)==null?void 0:t.metadata)==null?void 0:a.styles)||[]}),bA=(e,n)=>G(Fc(e),t=>n.map(a=>{switch(!0){case a===b.EWebFormStyleClassScope.LOCAL:return t.map(s=>({...s,scope:b.EWebFormStyleClassScope.LOCAL}));case a===b.EWebFormStyleClassScope.THEME:return gg;default:return[]}}).flat()),_A=e=>G(Fc(e),n=>[...n.map(t=>({...t,scope:b.EWebFormStyleClassScope.LOCAL})),...gg]),EA=G(e=>e,e=>{var n;return[...(((n=e.sharedCSS)==null?void 0:n.styles)||[]).map(t=>({...t,scope:b.EWebFormStyleClassScope.SHARED}))]}),SA=e=>G(ra(e),n=>n==null?void 0:n.flags),Wa=G(e=>e.webforms,e=>e),vg=G(Wa,e=>(e==null?void 0:e.components)||[]),Ds=G(Wa,e=>e.inspector),wA=G(Ds,e=>e.css),TA=G(Ds,e=>e.datasource),mg=G(Wa,e=>e.templates||{data:[]}),CA=G(mg,e=>e.data||[]),xA=e=>G(vg,n=>n.find(t=>t.id===e)),RA=e=>G(Ds,n=>n[e]),OA=G(Wa,e=>e.datasources.theme),AA=G(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,n,t)=>[e.state,n.state,t.state].every(a=>["loaded","error"].includes(a))),$c={label:"Base",id:"root"},PA=e=>G(ra(e),n=>{var t,a;return((a=(t=n==null?void 0:n.content)==null?void 0:t.metadata)==null?void 0:a.states)||[$c]});var Mc=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(Mc||{}),Lc=(e=>(e.NONE="none",e.SAVE_ALL_AND_PROCEED="saved_all_and_proceed",e.PROCEED="proceed",e))(Lc||{}),Nc=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Nc||{}),Go,DA=new Uint8Array(16);function yg(){if(!Go&&(Go=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Go))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Go(DA)}const IA=/^(?:[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 Is(e){return typeof e=="string"&&IA.test(e)}var mt=[];for(var Ru=0;Ru<256;++Ru)mt.push((Ru+256).toString(16).substr(1));function Fs(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(mt[e[n+0]]+mt[e[n+1]]+mt[e[n+2]]+mt[e[n+3]]+"-"+mt[e[n+4]]+mt[e[n+5]]+"-"+mt[e[n+6]]+mt[e[n+7]]+"-"+mt[e[n+8]]+mt[e[n+9]]+"-"+mt[e[n+10]]+mt[e[n+11]]+mt[e[n+12]]+mt[e[n+13]]+mt[e[n+14]]+mt[e[n+15]]).toLowerCase();if(!Is(t))throw TypeError("Stringified UUID is invalid");return t}var Ip,Ou,Au=0,Pu=0;function FA(e,n,t){var a=n&&t||0,s=n||new Array(16);e=e||{};var i=e.node||Ip,c=e.clockseq!==void 0?e.clockseq:Ou;if(i==null||c==null){var l=e.random||(e.rng||yg)();i==null&&(i=Ip=[l[0]|1,l[1],l[2],l[3],l[4],l[5]]),c==null&&(c=Ou=(l[6]<<8|l[7])&16383)}var d=e.msecs!==void 0?e.msecs:Date.now(),p=e.nsecs!==void 0?e.nsecs:Pu+1,h=d-Au+(p-Pu)/1e4;if(h<0&&e.clockseq===void 0&&(c=c+1&16383),(h<0||d>Au)&&e.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Au=d,Pu=p,Ou=c,d+=122192928e5;var y=((d&268435455)*1e4+p)%4294967296;s[a++]=y>>>24&255,s[a++]=y>>>16&255,s[a++]=y>>>8&255,s[a++]=y&255;var _=d/4294967296*1e4&268435455;s[a++]=_>>>8&255,s[a++]=_&255,s[a++]=_>>>24&15|16,s[a++]=_>>>16&255,s[a++]=c>>>8|128,s[a++]=c&255;for(var E=0;E<6;++E)s[a+E]=i[E];return n||Fs(s)}function bg(e){if(!Is(e))throw TypeError("Invalid UUID");var n,t=new Uint8Array(16);return t[0]=(n=parseInt(e.slice(0,8),16))>>>24,t[1]=n>>>16&255,t[2]=n>>>8&255,t[3]=n&255,t[4]=(n=parseInt(e.slice(9,13),16))>>>8,t[5]=n&255,t[6]=(n=parseInt(e.slice(14,18),16))>>>8,t[7]=n&255,t[8]=(n=parseInt(e.slice(19,23),16))>>>8,t[9]=n&255,t[10]=(n=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=n/4294967296&255,t[12]=n>>>24&255,t[13]=n>>>16&255,t[14]=n>>>8&255,t[15]=n&255,t}function $A(e){e=unescape(encodeURIComponent(e));for(var n=[],t=0;t<e.length;++t)n.push(e.charCodeAt(t));return n}var MA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",LA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function _g(e,n,t){function a(s,i,c,l){if(typeof s=="string"&&(s=$A(s)),typeof i=="string"&&(i=bg(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+s.length);if(d.set(i),d.set(s,i.length),d=t(d),d[6]=d[6]&15|n,d[8]=d[8]&63|128,c){l=l||0;for(var p=0;p<16;++p)c[l+p]=d[p];return c}return Fs(d)}try{a.name=e}catch{}return a.DNS=MA,a.URL=LA,a}function NA(e){if(typeof e=="string"){var n=unescape(encodeURIComponent(e));e=new Uint8Array(n.length);for(var t=0;t<n.length;++t)e[t]=n.charCodeAt(t)}return kA(jA(BA(e),e.length*8))}function kA(e){for(var n=[],t=e.length*32,a="0123456789abcdef",s=0;s<t;s+=8){var i=e[s>>5]>>>s%32&255,c=parseInt(a.charAt(i>>>4&15)+a.charAt(i&15),16);n.push(c)}return n}function Eg(e){return(e+64>>>9<<4)+14+1}function jA(e,n){e[n>>5]|=128<<n%32,e[Eg(n)-1]=n;for(var t=1732584193,a=-271733879,s=-1732584194,i=271733878,c=0;c<e.length;c+=16){var l=t,d=a,p=s,h=i;t=Et(t,a,s,i,e[c],7,-680876936),i=Et(i,t,a,s,e[c+1],12,-389564586),s=Et(s,i,t,a,e[c+2],17,606105819),a=Et(a,s,i,t,e[c+3],22,-1044525330),t=Et(t,a,s,i,e[c+4],7,-176418897),i=Et(i,t,a,s,e[c+5],12,1200080426),s=Et(s,i,t,a,e[c+6],17,-1473231341),a=Et(a,s,i,t,e[c+7],22,-45705983),t=Et(t,a,s,i,e[c+8],7,1770035416),i=Et(i,t,a,s,e[c+9],12,-1958414417),s=Et(s,i,t,a,e[c+10],17,-42063),a=Et(a,s,i,t,e[c+11],22,-1990404162),t=Et(t,a,s,i,e[c+12],7,1804603682),i=Et(i,t,a,s,e[c+13],12,-40341101),s=Et(s,i,t,a,e[c+14],17,-1502002290),a=Et(a,s,i,t,e[c+15],22,1236535329),t=St(t,a,s,i,e[c+1],5,-165796510),i=St(i,t,a,s,e[c+6],9,-1069501632),s=St(s,i,t,a,e[c+11],14,643717713),a=St(a,s,i,t,e[c],20,-373897302),t=St(t,a,s,i,e[c+5],5,-701558691),i=St(i,t,a,s,e[c+10],9,38016083),s=St(s,i,t,a,e[c+15],14,-660478335),a=St(a,s,i,t,e[c+4],20,-405537848),t=St(t,a,s,i,e[c+9],5,568446438),i=St(i,t,a,s,e[c+14],9,-1019803690),s=St(s,i,t,a,e[c+3],14,-187363961),a=St(a,s,i,t,e[c+8],20,1163531501),t=St(t,a,s,i,e[c+13],5,-1444681467),i=St(i,t,a,s,e[c+2],9,-51403784),s=St(s,i,t,a,e[c+7],14,1735328473),a=St(a,s,i,t,e[c+12],20,-1926607734),t=wt(t,a,s,i,e[c+5],4,-378558),i=wt(i,t,a,s,e[c+8],11,-2022574463),s=wt(s,i,t,a,e[c+11],16,1839030562),a=wt(a,s,i,t,e[c+14],23,-35309556),t=wt(t,a,s,i,e[c+1],4,-1530992060),i=wt(i,t,a,s,e[c+4],11,1272893353),s=wt(s,i,t,a,e[c+7],16,-155497632),a=wt(a,s,i,t,e[c+10],23,-1094730640),t=wt(t,a,s,i,e[c+13],4,681279174),i=wt(i,t,a,s,e[c],11,-358537222),s=wt(s,i,t,a,e[c+3],16,-722521979),a=wt(a,s,i,t,e[c+6],23,76029189),t=wt(t,a,s,i,e[c+9],4,-640364487),i=wt(i,t,a,s,e[c+12],11,-421815835),s=wt(s,i,t,a,e[c+15],16,530742520),a=wt(a,s,i,t,e[c+2],23,-995338651),t=Tt(t,a,s,i,e[c],6,-198630844),i=Tt(i,t,a,s,e[c+7],10,1126891415),s=Tt(s,i,t,a,e[c+14],15,-1416354905),a=Tt(a,s,i,t,e[c+5],21,-57434055),t=Tt(t,a,s,i,e[c+12],6,1700485571),i=Tt(i,t,a,s,e[c+3],10,-1894986606),s=Tt(s,i,t,a,e[c+10],15,-1051523),a=Tt(a,s,i,t,e[c+1],21,-2054922799),t=Tt(t,a,s,i,e[c+8],6,1873313359),i=Tt(i,t,a,s,e[c+15],10,-30611744),s=Tt(s,i,t,a,e[c+6],15,-1560198380),a=Tt(a,s,i,t,e[c+13],21,1309151649),t=Tt(t,a,s,i,e[c+4],6,-145523070),i=Tt(i,t,a,s,e[c+11],10,-1120210379),s=Tt(s,i,t,a,e[c+2],15,718787259),a=Tt(a,s,i,t,e[c+9],21,-343485551),t=Qr(t,l),a=Qr(a,d),s=Qr(s,p),i=Qr(i,h)}return[t,a,s,i]}function BA(e){if(e.length===0)return[];for(var n=e.length*8,t=new Uint32Array(Eg(n)),a=0;a<n;a+=8)t[a>>5]|=(e[a/8]&255)<<a%32;return t}function Qr(e,n){var t=(e&65535)+(n&65535),a=(e>>16)+(n>>16)+(t>>16);return a<<16|t&65535}function WA(e,n){return e<<n|e>>>32-n}function $s(e,n,t,a,s,i){return Qr(WA(Qr(Qr(n,e),Qr(a,i)),s),t)}function Et(e,n,t,a,s,i,c){return $s(n&t|~n&a,e,n,s,i,c)}function St(e,n,t,a,s,i,c){return $s(n&a|t&~a,e,n,s,i,c)}function wt(e,n,t,a,s,i,c){return $s(n^t^a,e,n,s,i,c)}function Tt(e,n,t,a,s,i,c){return $s(t^(n|~a),e,n,s,i,c)}var UA=_g("v3",48,NA);const HA=UA;function GA(e,n,t){e=e||{};var a=e.random||(e.rng||yg)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){t=t||0;for(var s=0;s<16;++s)n[t+s]=a[s];return n}return Fs(a)}function qA(e,n,t,a){switch(e){case 0:return n&t^~n&a;case 1:return n^t^a;case 2:return n&t^n&a^t&a;case 3:return n^t^a}}function Du(e,n){return e<<n|e>>>32-n}function YA(e){var n=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var a=unescape(encodeURIComponent(e));e=[];for(var s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,c=Math.ceil(i/16),l=new Array(c),d=0;d<c;++d){for(var p=new Uint32Array(16),h=0;h<16;++h)p[h]=e[d*64+h*4]<<24|e[d*64+h*4+1]<<16|e[d*64+h*4+2]<<8|e[d*64+h*4+3];l[d]=p}l[c-1][14]=(e.length-1)*8/Math.pow(2,32),l[c-1][14]=Math.floor(l[c-1][14]),l[c-1][15]=(e.length-1)*8&4294967295;for(var y=0;y<c;++y){for(var _=new Uint32Array(80),E=0;E<16;++E)_[E]=l[y][E];for(var T=16;T<80;++T)_[T]=Du(_[T-3]^_[T-8]^_[T-14]^_[T-16],1);for(var x=t[0],D=t[1],P=t[2],j=t[3],M=t[4],k=0;k<80;++k){var O=Math.floor(k/20),z=Du(x,5)+qA(O,D,P,j)+M+n[O]+_[k]>>>0;M=j,j=P,P=Du(D,30)>>>0,D=x,x=z}t[0]=t[0]+x>>>0,t[1]=t[1]+D>>>0,t[2]=t[2]+P>>>0,t[3]=t[3]+j>>>0,t[4]=t[4]+M>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var zA=_g("v5",80,YA);const VA=zA,KA="00000000-0000-0000-0000-000000000000";function JA(e){if(!Is(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const XA=Object.freeze(Object.defineProperty({__proto__:null,NIL:KA,parse:bg,stringify:Fs,v1:FA,v3:HA,v4:GA,v5:VA,validate:Is,version:JA},Symbol.toStringTag,{value:"Module"})),ZA=Yw(XA);function kc(e,n){if(!e||!n||!e.length||!n.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=n}kc.prototype.convert=function(e){var n,t,a,s={},i=this.srcAlphabet.length,c=this.dstAlphabet.length,l=e.length,d=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<l;n++)s[n]=this.srcAlphabet.indexOf(e[n]);do{for(t=0,a=0,n=0;n<l;n++)t=t*i+s[n],t>=c?(s[a++]=parseInt(t/c,10),t=t%c):a>0&&(s[a++]=0);l=a,d=this.dstAlphabet.slice(t,t+1).concat(d)}while(a!==0);return d};kc.prototype.isValid=function(e){for(var n=0;n<e.length;++n)if(this.srcAlphabet.indexOf(e[n])===-1)return!1;return!0};var QA=kc,eP=QA;function Ua(e,n){var t=new eP(e,n);return function(a){return t.convert(a)}}Ua.BIN="01";Ua.OCT="01234567";Ua.DEC="0123456789";Ua.HEX="0123456789abcdef";var tP=Ua;const{v4:Iu}=ZA,qo=tP,Fu="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",rP="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",nP={consistentLength:!0};let $u;const Fp=(e,n,t)=>{const a=n(e.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?a:a.padStart(t.shortIdLength,t.paddingChar)},aP=(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("-")},oP=e=>Math.ceil(Math.log(2**128)/Math.log(e));var ps=(()=>{const e=(n,t)=>{const a=n||Fu,s={...nP,...t};if([...new Set(Array.from(a))].length!==a.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const i=oP(a.length),c={shortIdLength:i,consistentLength:s.consistentLength,paddingChar:a[0]},l=qo(qo.HEX,a),d=qo(a,qo.HEX),p=()=>Fp(Iu(),l,c),h={new:p,generate:p,uuid:Iu,fromUUID:y=>Fp(y,l,c),toUUID:y=>aP(y,d),alphabet:a,maxLength:i};return Object.freeze(h),h};return e.constants={flickrBase58:Fu,cookieBase90:rP},e.uuid=Iu,e.generate=()=>($u||($u=e(Fu).generate),$u()),e})(),Ae=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(Ae||{});const sP=[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE,Ae.METHOD],hs="guest",jc=[{key:"read",label:"Read",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE,Ae.METHOD]},{key:"execute",label:"Execute",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.METHOD]},{key:"promote",label:"Promote",canApplyTo:[Ae.METHOD]}];function rr(e,...n){return Array.from(new Set([...e,...n]))}function Sg(e){const n={},t=new Map;e.forEach(d=>{const p=d.id||ps.generate();n[p]={...d,id:p,parents:[],includes:rr(d.includes||[]),resources:[]},t.set(d.privilege,p)}),Object.entries(n).forEach(([d,p])=>{const h=p.includes.map(y=>{const _=t.get(y);return _?(n[_].parents=rr(n[_].parents,_),_):""}).filter(Boolean);n[d]={...p,includes:h}});const a=wg(n),s=new Set;function i(d){s.add(d.id),d.includes=d.includes.filter(p=>!s.has(p))}if(a.forEach(i),a.forEach(d=>d.parents=[]),a.forEach(d=>{d.includes.forEach(p=>n[p].parents.push(d.id))}),Object.values(n).find(({privilege:d})=>d===hs))return n;const l=ps.generate();return{[l]:{id:l,privilege:hs,includes:[],parents:[],resources:[]},...n}}function wg(e){return Object.values(e).sort((n,t)=>n.parents.length-t.parents.length)}function Ms(e,n){const t=n[e];let a=[];return t&&t.parents.forEach(s=>{a=rr(a,...Ms(s,n),s)}),a}function gs(e,n){const t=n[e];let a=[];return t&&t.includes.forEach(s=>{a=rr(a,...gs(s,n),s)}),a}function iP(e,n){const t=n[e];if(!t)return[];const a=[e,...Ms(e,n),...t.includes];return Object.keys(n).filter(s=>!a.includes(s))}function uP(e,n){return n[e]?Object.keys(n).reduce((a,s)=>s===e?a:{...a,[s]:{...n[s],parents:n[s].parents.filter(i=>i!==e),includes:n[s].includes.filter(i=>i!==e)}},{}):n}function cP(e,n,t){const a=t[e],s=t[n];return!a||!s?t:{...t,[e]:{...t[e],includes:rr(a.includes,n)},[n]:{...t[n],parents:rr(s.parents,e)}}}function lP(e,n,t){const a=t[e],s=t[n];return!a||!s?t:{...t,[e]:{...t[e],includes:t[e].includes.filter(i=>i!==n)},[n]:{...t[n],parents:t[n].parents.filter(i=>i!==e)}}}function Tg(e,n){b.validateName(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 t=ps.generate();return{[t]:{id:t,privilege:e,includes:[],parents:[],resources:[]},...n}}function fP(e,n,t,a,s){let i=Tg(e,s);const c=Object.entries(i).find(([,l])=>l.privilege===e);return c?(i=Og(c[1].id,n,t,a,i),i):s}function dP(e,n,t){if(!e)throw new Error("Please enter a name");if(!t[n])throw new Error("Invalid privilege");return Object.entries(t).forEach(([,{privilege:a,id:s}])=>{if(e.toLowerCase()===a.toLowerCase()&&n!==s)throw new Error(`There's already a Privilege with the name ${e}`)}),{...t,[n]:{...t[n],privilege:e}}}function pP(e,n){return e.map(t=>Br(t,n))}function Br(e,n){return n[e]?n[e]:null}function Cg({applyTo:e,type:n,...t}){return Object.entries(t).reduce((a,[s,i])=>{const c=He.find(jc,["key",s]);return!c||!c.canApplyTo.includes(n)||(typeof i=="string"?i.split(","):i).forEach(d=>{a[d]=rr(a[d]||[],s)}),a},{})}const rc=(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 Bc(e){return{permissions:jc.filter(({canApplyTo:n})=>n.includes(e.type)).map(({key:n,label:t})=>{const a={name:n,from:[]};switch(e.type){case Ae.DATASTORE:return{...a,info:rc(t,!0)};case Ae.DATACLASS:return{...a,info:rc(t)};default:return a}}),resource:e.applyTo,type:e.type}}function xg(e,n){const t=Rg(n),a={};return e.filter(({type:s})=>sP.includes(s)).forEach(s=>{const i=Cg(s);Object.entries(i).forEach(([c,l])=>{var h;const d=(h=t[c])==null?void 0:h.id;if(!d)return;a[d]=a[d]||{...n[d]};let p=He.find(a[d].resources,{resource:s.applyTo,type:s.type});p||(p=Bc(s),a[d].resources.push(p)),p.permissions=p.permissions.map(y=>({...y,checked:y.checked||l.includes(y.name)}))})}),{...n,...a}}function Rg(e){return Object.values(e).reduce((n,t)=>({...n,[t.privilege]:t}),{})}function Ls(e){var t;const n=Sg(e.privileges||[]);return{forceLogin:e==null?void 0:e.forceLogin,privileges:xg(((t=e.permissions)==null?void 0:t.allowed)||[],n),roles:(e.roles||[]).map(({id:a=ps.generate(),role:s,privileges:i=[]})=>({id:a,role:s,privileges:rr(i).map(c=>{var l;return(l=Object.values(n).find(({privilege:d})=>d===c))==null?void 0:l.id}).filter(Boolean)})).reduce((a,s)=>({...a,[s.id]:{...s}}),{})}}function Ns(e){const n=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),t=[...n,...n.map(a=>Ms(a,e.privileges).reverse())].flat().filter((a,s,i)=>i.indexOf(a)===s).map(a=>e.privileges[a]);return{forceLogin:e.forceLogin,permissions:{allowed:Object.values(e.privileges).reduce((a,s)=>(s.resources.forEach(({permissions:i,resource:c,type:l})=>{let d=He.find(a,{applyTo:c,type:l});d||(d={applyTo:c,type:l},a.push(d)),i.forEach(({name:p,checked:h})=>{h&&d&&(d[p]=d[p]||[],d[p].push(s.privilege))})}),a),[])},privileges:t.filter(({privilege:a})=>a!==hs).map(({id:a,includes:s,privilege:i})=>({id:a,privilege:i,includes:s.map(c=>e.privileges[c].privilege)})),roles:Object.values(e.roles).map(a=>({...a,privileges:a.privileges.map(s=>{var i;return(i=e.privileges[s])==null?void 0:i.privilege}).filter(Boolean)}))}}function hP(e,n){const t=n[e],a={children:[],links:[],parents:[],selected:e};if(!t)return a;function s(l,d,p=[]){const h=l.reduce((y,_)=>[...y,...n[_][d]],[]);return h.length===0?p:(p.push(h),s(h,d,p))}function i(l){const d=[],p=[];for(let h=l.length-1;h>=0;h-=1){const y=l[h].filter(_=>d.includes(_)?!1:(d.push(_),!0));y.length>0&&p.unshift(rr(y))}return p}function c(l,d){const p=[];return l.reduce((h,y)=>(y.forEach(_=>{n[_][d==="parents"?"includes":"parents"].forEach(T=>{p.includes(T)&&h.push(d==="parents"?{source:_,target:T}:{source:T,target:_})}),p.push(_)}),h),[])}return a.children=s([e],"includes"),a.children=i(a.children),a.parents=s([e],"parents"),a.parents=i(a.parents),a.links=[...c([[e],...a.parents],"parents"),...c([[e],...a.children],"includes")],a}function gP(e,n,t){const a=Br(e,t);if(!a||He.find(a.resources,{resource:n.applyTo,type:n.type}))return t;const s={...a,resources:[...a.resources,Bc(n)]};return{...t,[e]:s}}function vP(e,n,t){const a=Br(e,t);if(!a)return t;const s={...a,resources:a.resources.filter(({resource:i,type:c})=>i!==n.applyTo||c!==n.type)};return{...t,[e]:s}}function mP(e,n){const t=Br(e,n);if(!t)return n;const a={...t,resources:t.resources.filter(s=>s.permissions.some(i=>i.from.length)).map(s=>({...s,permissions:s.permissions.map(i=>({...i,checked:!1}))}))};return{...n,[e]:a}}function Og(e,n,t,a,s){const i=Br(e,s);if(!i)return s;const l=He.find(i.resources,{type:t,resource:n})?{...i,resources:i.resources.map(d=>d.type===t&&d.resource===n?{...d,permissions:d.permissions.map(p=>p.name===a?{...p,checked:!p.checked,from:[]}:p)}:d)}:{...i,resources:[...i.resources,{type:t,resource:n,permissions:jc.filter(d=>d.canApplyTo.includes(t)).map(d=>({from:[],name:d.key,checked:d.key===a,info:rc(d.key,t===Ae.DATASTORE)}))}]};return{...s,[e]:l}}function yP(e,n,t,a){const s=Br(e,a);if(!s)return a;const c=He.find(s.resources,{type:n.type,resource:n.resource})?{...s,resources:s.resources.map(l=>l.type===n.type&&l.resource===n.resource?{...l,permissions:n.permissions.map(d=>d.name===t.name?{...d,checked:!d.checked,from:[]}:d)}:l)}:{...s,resources:[...s.resources,{...n,permissions:n.permissions.map(l=>({...l,checked:t.name===l.name,from:[]}))}]};return{...a,[e]:c}}function bP(e,n){var d;const t=Ag(e,n)||[],a=((d=Br(e,n))==null?void 0:d.resources)||[],c=([...t,...a].filter(({type:p})=>p===Ae.METHOD)||[]).map(({resource:p})=>p);return Object.entries(n).reduce((p,[h,{resources:y}])=>(y.filter(({resource:_,type:E})=>E===Ae.METHOD&&c.includes(_)).forEach(({permissions:_,resource:E})=>{var x;((x=_.find(({name:D})=>D==="promote"))==null?void 0:x.checked)&&(p[E]=rr(p[E]||[],h))}),p),{})}function Ag(e,n){var c;const t=Br(e,n);if(!t)return[];const a=(c=Object.values(n).find(l=>l.privilege===hs))==null?void 0:c.id;return(a&&a!==e?rr(gs(e,n),a):gs(e,n)).reduce((l,d)=>(n[d].resources.forEach(h=>{if(h.permissions.filter(({checked:E})=>E).length===0)return;const _=He.find(l,{type:h.type,resource:h.resource});if(!_){l.push({...h,permissions:h.permissions.map(E=>({...E,from:E.checked?[d]:[],checked:!1}))});return}_.permissions=_.permissions.map((E,T)=>{let{from:x=[]}=E;return h.permissions[T].checked&&!x.includes(d)&&(x=[...x,d]),{...E,from:x,checked:E.checked}})}),l),He.clone(t.resources.map(l=>({...l,permissions:l.permissions.map(({checked:d,...p})=>({...p,checked:!!d}))}))))}const _P=e=>e.reduce((n,t)=>({...n,[t.id]:{...t}}),{}),EP=(e,n)=>n[e]?Object.values(n).reduce((t,a)=>e===a.id||a.role===""?t:{...t,[a.id]:a},{}):n,SP=(e,n,t)=>t[e]?Object.values(t).reduce((a,s)=>e===s.id?{...a,[s.id]:{...s,name:n}}:{...a,[s.id]:s},{}):t,wP=(e,n)=>{const t={id:e,role:"",privileges:[]};return{...n,[t.id]:t}},TP=(e,n)=>{if(b.validateName(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,s)=>e.id===s.id?{...a,[e.id]:e}:{...a,[s.id]:s},{})},CP={list:[]},$p=(e,n)=>e.list.filter(t=>t.id!==n),Pg=nr({name:"modals",initialState:CP,reducers:{createModal:(e,n)=>{e.list.push(n.payload)},editModal:(e,n)=>{const{id:t,...a}=n.payload,s=e.list.find(b.byId(t));s&&Object.assign(s,{...a})},removeModal:(e,n)=>{const t=n.payload;e.list=$p(e,t)},closeModal:(e,n)=>{const{id:t,reason:a}=n.payload;if(a){const s=e.list.find(i=>i.id===t);s&&(s.closeReason=a,s.isOpen=!1)}else e.list=$p(e,t)}}}),{createModal:Dg,removeModal:Ig,closeModal:xP,editModal:RP}=Pg.actions,ar=Q("modals/open",async(e,{dispatch:n})=>{const{type:t=b.ModalType.ALERT,store:a=Av()}=e,s=yc();switch(n(Dg({id:s,type:t,isOpen:!0,...e})),t){case b.ModalType.CONFIRM:return new Promise(i=>{const c=a.subscribe(()=>{var p;const{modals:l}=a.getState(),d=l.list.find(h=>h.id===s);if(d&&!d.isOpen){const h=d.closeReason===b.ModalCloseReason.CONFIRMED,y=He.entries((p=d.views)==null?void 0:p.toggles).reduce((_,E)=>({..._,[E[0]]:E[1].value}),{});n(Ig(s)),c(),i({confirmed:h,options:y})}})});default:return{}}}),Fg=()=>b.getFileContent({name:b.ROLES_TAB_PATH}),$g="Roles & Privileges",vs=Q("roles/fetchRoles",async(e,{dispatch:n,rejectWithValue:t})=>{var i;let a;try{a=await Fg()}catch(c){if(!Array.isArray((i=c==null?void 0:c.data)==null?void 0:i.__ERROR))return t("Error while loading the roles");a={name:b.ROLES_TAB_PATH,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const s={name:$g,type:b.FileFolderType.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:b.ROLES_TAB_PATH,flags:{},extra:{editor:{key:"editors:roles"}},content:{}};return n(Pt(s)),{...a,content:Ls(a.content)}}),Mg=Q("roles/fetchRolesChanges",async(e,{getState:n})=>{const{tabs:t}=n().root;if(t.find(s=>s.path===b.ROLES_TAB_PATH)){const{date:s}=n().roles;if(s&&await Wc(s))return{old:!0}}return{}}),Wc=async e=>{if(!e)return!1;try{const n=await Fg();if(n.date){const t=new Date(e),a=new Date(n.date);if(t>a)return!0}}catch(n){if(!Array.isArray(n==null?void 0:n.data.__ERROR))throw n}return!1},nc=Q("roles/saveRoles",async(e,{getState:n,rejectWithValue:t,dispatch:a})=>{try{const{flags:s,date:i}=n().roles;if(s.old||await Wc(i)){const{confirmed:d}=await a(ar({title:$g,message:"New content has been found on the server. Are you sure you want to continue?",type:b.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!d)return t({old:!0})}return await b.setFileContent({name:b.ROLES_TAB_PATH,content:Ns(e)})}catch{return t("Error while loading the roles")}}),Lg=nr({name:"roles",initialState:()=>{const{roles:e}=Kn(),{roles:n={},privileges:t={},flags:a={touched:!1},date:s,selectedTab:i="roles"}=e||{};return{flags:a,roles:n,privileges:t,date:s,selectedTab:i}},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},toggleForceLogin:(e,n)=>{e.forceLogin!==n.payload&&(e.forceLogin=n.payload,e.flags.touched=!0)},setRolesContent(e,n){const{content:t,flags:a={},...s}=n.payload,i=Ls(t),c={...e.flags,...a};return{...e,...i,...s,flags:c}}},extraReducers(e){e.addCase(vs.fulfilled,(n,t)=>{const{content:a,date:s}=t.payload;n={...n,...a,date:s}}).addCase(vs.rejected,n=>({...n,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(nc.fulfilled,(n,t)=>({...n,flags:{...n.flags,confirmed:!0,touched:!1,old:!1},date:t.payload.date})).addCase(nc.rejected,(n,t)=>wh.isString(t.payload)?n:{...n,flags:{...n.flags,...t.payload}}).addCase(Mg.fulfilled,(n,t)=>({...n,flags:{...n.flags,...t.payload}})).addCase(Yn.fulfilled,(n,t)=>{!t.payload||t.payload.path!==b.ROLES_TAB_PATH||(n.flags.touched=!1,n.flags.old=!1)}).addCase(Vc.fulfilled,(n,t)=>{t.meta.arg!==b.ROLES_TAB_PATH||!t.payload||(n.flags.touched=!1,n.flags.old=!1)})}}),{updatePrivileges:Ng,updateRoles:kg,setRolesContent:Uc,toggleTab:OP,toggleForceLogin:AP,updateRolesAndPrivileges:Hc}=Lg.actions,PP=Lg.reducer,Gc=Q("settings/fetch",async()=>await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:b.SETTINGS_TAB_PATH,content:!0,as:"json"})),jg=Q("settings/app",b.getAppSettings),DP=gh(),Mp={session:{"studio.tips":!0,"studio.notifications":!0,"studio.enablePreview":!1,"studio.tipsBaseUrl":"https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build","webforms.tooltip.behavior":Mc.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"webforms.renderer.showUnsavedPopOver":!0,"webforms.renderer.unsavedPopOverChoice":Lc.NONE,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral"},server:{projectOpened:!1,remoteDebuggerMode:b.RemoteDebuggerMode.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},IP={...Mp,session:{...Mp.session,...DP},welcometour:{}},Bg=nr({name:"settings",initialState:IP,reducers:{setSetting(e,n){const{path:t,settingsKey:a,value:s}=n.payload;e[t][a]=s},setSettings(e,n){const{path:t,value:a}=n.payload;e[t]={...e[t],...a}},setSettingsAsText(e,n){const{path:t,settings:a}=n.payload;e[t]=a}},extraReducers(e){e.addCase(Gc.fulfilled,(n,t)=>{n.project={...n.project,...t.payload.content}}),e.addCase(jg.fulfilled,(n,t)=>{n.server=t.payload,n.server.qodly&&(n.project["webforms.display-mode"]="airy")})}}),{setSetting:ac,setSettings:ks,setSettingsAsText:FP}=Bg.actions,$P=Bg.reducer,oc=e=>{const n=["folder","file"];return e.sort((t,a)=>t.type===a.type?t.name.localeCompare(a.name):n.indexOf(t.type)-n.indexOf(a.type))},Re=(e,n)=>e.reduce((t,a)=>a.path===n.path&&a.type===n.type?[...t,n]:a.children?[...t,{...a,children:oc(Re(a.children,n))}]:[...t,a],[]),lt=(e,n)=>e.reduce((t,a)=>t||(a.path===n?a:a.children?lt(a.children,n):null),null),MP=[{name:b.FolderRootPath.WEBFORMS,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:b.FolderRootPath.METHODS,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:b.FolderRootPath.CLASSES,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:b.FolderRootPath.SHARED,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:b.FileFolderType.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:b.FileFolderType.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:b.FileFolderType.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:b.FileFolderType.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],Wg=nr({name:"explorer",initialState:MP,reducers:{toggleExpandFolder:(e,n)=>(e=Re(e,{...n.payload,flags:{...n.payload.flags,expanded:!n.payload.flags.expanded}}),e),expandFolder:(e,n)=>(e=Re(e,{...n.payload,flags:{...n.payload.flags,expanded:!0}}),e),openAddFileInput:(e,n)=>Re(e,{...n.payload,flags:{...n.payload.flags,adding:!0}}),addNewFile:(e,n)=>{const{parent:t,child:a}=n.payload;return Re(e,{...t,children:[a,...t.children||[]]})},removeFile:(e,n)=>{const{parent:t,child:a}=n.payload;return Re(e,{...t,children:t.children.filter(s=>s.path!==a.path)})},refreshFile:(e,n)=>{const{parent:t,child:a}=n.payload,s=(t.children||[]).filter(i=>i.path!==a.path&&!a.error);return Re(e,{...t,children:[a,...s]})},setFolderChildren:(e,n)=>{const t=lt(e,n.payload.parentPath);return t?Re(e,{...t,children:n.payload.children}):e}},extraReducers:e=>{e.addCase(qn.pending,(n,t)=>{const{file:a,newname:s}=t.meta.arg,i=lt(n,a.path);if(!i)return n;const c=a.path.split("/");c.pop();const l=`${c.join("/")}/${a.name}.${a.ext}`,d=`${c.join("/")}/${s}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_RENAME,payload:{oldPath:l,newPath:d}});break}return Re(n,{...i,flags:{...i.flags,loading:!0}})}),e.addCase(qn.fulfilled,(n,t)=>{const{meta:{arg:{file:a}},payload:s}=t,i=lt(n,a.path);if(!i)return n;switch(s.old.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_RENAME,payload:{oldPath:s.old.path,newPath:s.new.path}});break}return Re(n,{...i,flags:{...i.flags,loading:!1}})}),e.addCase(qn.rejected,(n,t)=>{const{file:a}=t.meta.arg,s=lt(n,a.path);return s?Re(n,{...s,flags:{...s.flags,loading:!1}}):n}),e.addCase(_r.pending,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,flags:{...s.flags,loading:!0}}):n}),e.addCase(_r.fulfilled,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,children:oc(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!0},error:null}):n}),e.addCase(_r.rejected,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!0}}):n}),e.addCase(Aa.pending,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,flags:{...s.flags,loading:!0}}):n}),e.addCase(Aa.fulfilled,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,children:oc(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!1},error:null}):n}),e.addCase(Aa.rejected,(n,t)=>{const a=t.meta.arg,s=lt(n,a);return s?Re(n,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!1}}):n}),e.addCase(Jo.pending,(n,t)=>{const{fileName:a,parentNode:s,path:i,type:c}=t.meta.arg;return Re(n,{...s,children:[{name:a,path:`${i}/${a}`,type:c,error:null,flags:{loading:!0},config:{}},...s.children]})}),e.addCase(Jo.fulfilled,(n,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg,c=b.getFileExtentionFromType(i),{editor:l,supportedEditors:d}=pr(`${a}${c?`.${c.toLowerCase()}`:""}`);return Re(n,{name:s,path:`${a}/${s}`,type:i,error:null,flags:{loading:!1},config:{editor:l,supportedEditors:d}})}),e.addCase(Jo.rejected,(n,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg;return Re(n,{name:s,path:`${a}/${s}`,type:i,error:{message:t.payload},flags:{loading:!1},config:{}})}),e.addCase(Xo.pending,(n,t)=>{const{node:a,parentNode:s}=t.meta.arg;return Re(n,{...s,children:[{name:`${a.name}_copy`,path:`${a.path}/${a.name}_copy`,type:a.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...s.children]})}),e.addCase(Xo.fulfilled,(n,t)=>{const{node:a}=t.payload,{node:{path:s,ext:i}}=t.meta.arg,{editor:c,supportedEditors:l}=pr(`${s}${i?`.${i.toLowerCase()}`:""}`);return Re(n,{name:`${a.name}`,path:`${s}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:c,supportedEditors:l}})}),e.addCase(Xo.rejected,(n,t)=>{const a=t.payload,{node:s}=t.meta.arg;return Re(n,{name:`${s.name}_copy`,path:`${s.path}/${s.name}_copy`,type:s.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(Da.pending,(n,t)=>{}),e.addCase(Da.fulfilled,(n,t)=>{var y;const{draggedNode:a,newLocation:s}=t.meta.arg,i=jh(a.path),c=lt(n,i),l=lt(n,s.path),d=(y=c==null?void 0:c.children)==null?void 0:y.filter(_=>_.path!==a.path),p=s.path.split("/").length,h=a.path.split("/").length;return p>=h?(n=Re(n,{...c,children:d}),n=Re(n,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l==null?void 0:l.children:[]],flags:{...l.flags,expanded:!0}})):(n=Re(n,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l==null?void 0:l.children:[]],flags:{...l.flags,expanded:!0}}),n=Re(n,{...c,children:d})),n}),e.addCase(Da.rejected,(n,t)=>{b.toastSubject.next({message:"Error moving file",kind:"danger"})}),e.addCase(Gn.pending,(n,t)=>{var x;const{fileName:a,parentNode:s,path:i,type:c,qodly:l}=t.meta.arg,d=b.getFileExtentionFromType(c,l),p=`${i}/${a}${d?`.${d.toLowerCase()}`:""}`,{editor:h,supportedEditors:y}=pr(p);switch(c){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.WILL_CREATE,payload:{filePath:p}});break}const _=(x=s.children)==null?void 0:x.filter(D=>D.path!==`${i}/${a}`),E=[{name:a,path:`${i}/${a}`,type:b.FileFolderType.FILE,error:null,flags:{loading:!0},config:{editor:h,supportedEditors:y},ext:d,date:new Date().toISOString()},..._],T=Re(n,{...s,children:E});return wh.merge(n,T)}),e.addCase(Gn.fulfilled,(n,t)=>{const{fileName:a,path:s,type:i,qodly:c}=t.meta.arg,l=b.getFileExtentionFromType(i,c),d=`${s}/${a}${l?`.${l.toLowerCase()}`:""}`,{editor:p,supportedEditors:h}=pr(d),y=Re(n,{name:a,path:`${s}/${a}`,type:b.FileFolderType.FILE,error:null,flags:{},config:{editor:p,supportedEditors:h},ext:l,date:new Date().toISOString()});switch(i){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.DID_CREATE,payload:{filePath:d}});break}return n=y,n}),e.addCase(Gn.rejected,(n,t)=>{const{fileName:a,path:s,type:i}=t.meta.arg,c=b.getFileExtentionFromType(i),{editor:l,supportedEditors:d}=pr(`${s}${c?`.${c.toLowerCase()}`:""}`);return n=Re(n,{name:a,path:`${s}/${a}`,type:b.FileFolderType.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:l,supportedEditors:d},ext:c,date:new Date().toISOString()}),n}),e.addMatcher(nh(Pa),(n,t)=>{const a=lt(n,t.meta.arg.file.path.split(".")[0]);return a&&(n=Re(n,{...a,flags:{...a.flags,loading:!0}})),n}),e.addMatcher(oh(Pa),(n,t)=>{const a=lt(n,t.meta.arg.file.path.split(".")[0]);return a&&(n=Re(n,{...a,flags:{...a.flags,loading:!1}})),n}),e.addMatcher(ah(Pa),(n,t)=>{const a=lt(n,t.meta.arg.file.path.split(".")[0]);return a&&(n=Re(n,{...a,flags:{...a.flags,loading:!1}})),b.toastSubject.next({message:"Failed to open file, try again",kind:"danger"}),n})}}),{toggleExpandFolder:LP,expandFolder:NP,openAddFileInput:kP,addNewFile:Ug,refreshFile:jP,removeFile:sc,setFolderChildren:BP}=Wg.actions;function Hg(e,n){switch(e){case b.FileFolderType.WEBFORMS:const t={metadata:{v:"1.0",datasources:[],styles:[]},components:{ROOT:{parent:"",type:{resolvedName:"Container"},isCanvas:!0,props:{airyMode:!1,className:"bg-white h-full w-full px-6",classNames:[],events:[]},displayName:"App",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}};return n["webforms.display-mode"]===Nc.AIRY&&(t.components.ROOT.props.airyMode=!0),t;case b.FileFolderType.METHODS:return`//%attributes = {}
91
- `;default:return""}}function Gg(e,n,t){switch(n){case b.FileFolderType.MOBILEFORM:return`${e}.MForm`;case b.FileFolderType.WEBFORM:return`${e}.WebForm`;case b.FileFolderType.METHOD:case b.FileFolderType.CLASS:return`${e}.${t?"4qs":"4dm"}`;default:return e}}function WP(e){switch(e){case b.FolderRootPath.WEBFORMS:return b.FileFolderType.WEBFORMS;case b.FolderRootPath.METHODS:return b.FileFolderType.METHODS;case b.FolderRootPath.CLASSES:return b.FileFolderType.CLASSES;case"Mobile":return b.FileFolderType.MOBILE;default:return e}}function qg(e){switch(e){case b.FileFolderType.WEBFORMS:return b.FileFolderType.WEBFORM;case b.FileFolderType.CLASSES:return b.FileFolderType.CLASS;case b.FileFolderType.METHODS:return b.FileFolderType.METHOD;case b.FileFolderType.FOLDER:return b.FileFolderType.FOLDER;case b.FileFolderType.MOBILE:return b.FileFolderType.MOBILEFORM;default:return e}}const UP=Q("files/tryEditMethod",async({method:e},{dispatch:n})=>{const t=e.filePath.split("/"),[a]=t[1].split("."),{editor:s}=pr(e.filePath);return await n(qc({file:{name:a,path:e.filePath,date:new Date().toISOString(),type:b.FileFolderType.CLASS,editor:s},line:e.startingLine+1})).unwrap()}),ic=Q("explorer/createModelFiles",async(e,{dispatch:n,getState:t})=>{var y;const a=t(),s=b.FolderRootPath.CLASSES,i=a.settings.server.qodly,c=lt(a.explorer,s);if(!c)return;await n(_r(s));const d=((y=t().explorer.find(_=>_.name===s))==null?void 0:y.children)||[];let p=[{content:"",name:""}];const h=_=>{switch(_){case"dataclass":return{name:e.type==="dataclass"?e.className:"DataStore",content:i?`extends DataClass
90
+ `),T}return ec(function(){d.current=e,p.current=m,h.current=_,l.current=void 0}),ec(function(){function T(){try{var x=t.getState();if(x===p.current)return;var D=d.current(x);if(r(D,h.current))return;h.current=D,p.current=x}catch(P){l.current=P}i()}return c.onStateChange=T,c.trySubscribe(),T(),function(){return c.tryUnsubscribe()}},[t,c]),_}function gO(e){e===void 0&&(e=Nr);var r=e===Nr?ng:function(){return pt.useContext(e)};return function(a,s){if(s===void 0&&(s=pO),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 s!="function")throw new Error("You must pass a function as an equality function to useSelector")}var i=r(),c=i.store,l=i.subscription,d=hO(a,s,c,l);return pt.useDebugValue(d),d}}var vO=gO();eO(GS.unstable_batchedUpdates);const yO=()=>dO(),kr=vO,Ac=H(e=>e,e=>e.catalog.state==="loaded"?e.catalog.model:null),mO=H(e=>e,({catalog:e})=>e.state),og=H(Ac,e=>e?e.dataClasses:[]),bO=H(og,e=>Object.values(e).filter(({virtual:r})=>r)),_O=H(Ac,e=>e?e.methods:[]),sg=e=>H(r=>r,r=>{switch(r.catalog.state){case"loaded":const t=e?r.catalog.model.dataClasses[e]:r.catalog.model;return(t==null?void 0:t.methods)||[];default:return[]}}),EO=e=>kr(sg(e),rg),SO=(e,r)=>H(sg(e),t=>t.find(a=>`${a.applyTo}.${a.name}`===r)),wO=(e,r,t)=>kr(SO(e,`${t}.${r}`),rg),ig=H(e=>e,e=>e),TO=e=>H(jr,r=>{var s;const t=r.tabs.find(({path:i})=>i===e),a=t==null?void 0:t.content.components;return!t||!a?[]:(s=Object.keys(a))==null?void 0:s.map(i=>({id:i,...a[i]}))}),ug=e=>H(jr,r=>{var a,s;const t=r.tabs.find(({path:i})=>i===e);return((s=(a=t==null?void 0:t.content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]}),CO=(e,r,t)=>H(ig,a=>{var s,i;if(r){const c=a.sharedDatasources.sources[r];return c?c.find(l=>l.id===e):void 0}else{const c=a.root.tabs.find(d=>d.path===t);return c?(i=(s=c.content.metadata)==null?void 0:s.datasources)==null?void 0:i.find(d=>d.id===e):void 0}}),cg=H(e=>e,e=>{var r;return((r=e.sharedDatasources)==null?void 0:r.sources)||[]}),xO=(e,r,t,a)=>H(ug(e),cg,(s,i)=>{const c=We.flatten(We.values(i)),l=[...r!=="private"?s:[],...r!=="shared"?c:[]];return t?l.filter(d=>(!a||a.every(({id:p,namespace:h=""})=>d.id!==p||(d.namespace||"")!==h))&&(t.includes(d.type)||d.dataType&&(t.includes(d.dataType)||t.includes("objectFromArray")&&d.dataType==="object"&&d.from))):l}),RO=H(e=>e.debugger,e=>e.meta),Tn=H(e=>e.debugger,e=>e.list),Dt=H(e=>e.debugger,e=>e.sessions),OO=H(Dt,e=>e.length),Sn=(e,r,t,a)=>e.find(s=>s.filePath===r&&s.methodName===t&&(!a||s.className===a)),ot=(e,r)=>e.find(t=>t.threadId===r),lg=(e,r)=>e.find(t=>t.tabPath===r),AO=(e,r)=>H(Tn,t=>{var a;return((a=Sn(t,e,r))==null?void 0:a.breakpoints.saved.locations)||[]}),PO=(e,r)=>H(Tn,t=>{var a;return((a=Sn(t,e,r))==null?void 0:a.breakpoints.draft.locations)||[]}),DO=e=>H(Tn,r=>r.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.saved.locations.map(s=>({...s,line:s.line+(a.breakpoints.saved.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),IO=e=>H(Tn,r=>r.filter(t=>t.filePath===e).reduce((t,a)=>[...t,...a.breakpoints.draft.locations.map(s=>({...s,line:s.line+(a.breakpoints.draft.offset||0)}))],[]).sort((t,a)=>t.line-a.line)),FO=e=>H(Dt,r=>{const t=ot(r,e);return t!=null&&t.stopped?t.highlightedLines:null}),$O=e=>H(Dt,r=>{const t=ot(r,e);return t!=null&&t.stopped?t.activeLine:null}),MO=e=>H(Dt,r=>{var t;return((t=ot(r,e))==null?void 0:t.expressions)||[]}),LO=e=>H(Dt,r=>{var t;return((t=ot(r,e))==null?void 0:t.stopped)||!1}),NO=(e,r)=>H(Tn,t=>{var a;return(a=Sn(t,e,r))==null?void 0:a.source}),kO=e=>H(Dt,r=>{var t;return((t=lg(r,e))==null?void 0:t.threadId)||-1}),jO=e=>H(Dt,r=>{var t,a;return(a=(t=ot(r,e))==null?void 0:t.currentStackFrame)==null?void 0:a.source}),BO=e=>H(Dt,r=>{var t;return(t=ot(r,e))==null?void 0:t.currentStackFrame}),WO=H(Dt,e=>e.map(({channelId:r,threadId:t})=>({id:r,threadId:t}))),UO=e=>H(Dt,r=>{var t;return((t=ot(r,e))==null?void 0:t.stackFrames)||[]}),HO=e=>H(Dt,r=>{var t,a;return((a=(t=ot(r,e))==null?void 0:t.variables)==null?void 0:a.callchain)||[]}),GO=e=>H(Dt,r=>{var t,a;return((a=(t=ot(r,e))==null?void 0:t.variables)==null?void 0:a.expressions)||[]}),qO=(e,r="saved")=>H(Tn,t=>{const a=t.find(s=>s.filePath===e);return(a==null?void 0:a.breakpoints[r].offset)||0}),YO=(e,r,t,a)=>H(Dt,s=>{var p;const i=((p=ot(s,e))==null?void 0:p.exceptions)||[],c=r===b.FileFolderType.CLASS,l=c&&a?`${a}.${t}`:t;return(l?i.filter(h=>h.location===l):i).map(h=>({...h,locationLine:c?h.locationLine:h.locationLine+1}))}),jr=H(e=>e.root,e=>e),ra=H(jr,e=>e.tabs),zO=H(jr,e=>e.activeTab),VO=H(jr,e=>e.recent.filter(({type:r})=>r!==b.FileFolderType.DEBUGGER)),fg=H(jr,({tabs:e,activeTab:r})=>e.find(({path:t})=>t===r)),KO=H(jr,({tabs:e})=>e.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null)),JO=H(ra,e=>e.filter(({type:r,flags:t})=>r===b.FileFolderType.WEBFORM&&t.enabled===!1).map(({path:r})=>r)),XO=H(ra,e=>e.length>0),Cn=e=>H(jr,r=>r.tabs.find(({path:t})=>t===e)),dg=(e,r="")=>H(Cn(e),t=>!t||!t.content||typeof t.content=="string"?t==null?void 0:t.content:We.get(t.content,r)),ZO=e=>H(Cn(e),r=>r==null?void 0:r.extra),QO=(e,r=t=>t)=>H(dg(e,"components"),t=>r(t||{})),Pc=H(ra,e=>e.filter(r=>r.flags.touched)),eA=H(Pc,e=>e.length),tA=H(Dt,e=>e.map(({threadId:r,currentStackFrame:{source:t},tabPath:a})=>({name:Ch(r,t),path:a,type:b.FileFolderType.DEBUGGER,content:t==null?void 0:t.content,flags:{},extra:{source:t}}))),rA=H(e=>e,e=>e.explorer||[]),pg=H(e=>e,e=>e.explorer.find(r=>r.path===b.FolderRootPath.WEBFORMS)),hg=H(e=>e,e=>e.explorer.find(r=>r.path===b.FolderRootPath.METHODS)),gg=H(e=>e,e=>e.explorer.find(r=>r.path===b.FolderRootPath.CLASSES)),nA=H(hg,e=>(e==null?void 0:e.children)||[]),aA=H(pg,e=>(e==null?void 0:e.children)||[]),oA=H(gg,e=>(e==null?void 0:e.children)||[]),sA=H(e=>e.modals,e=>e.list),iA=H(e=>e.roles,e=>Ns(e)),uA=H(e=>e.roles,({roles:e})=>e),cA=H(e=>e.roles,({privileges:e})=>e),lA=H(e=>e.roles,({privileges:e})=>Object.values(e).find(({privilege:r})=>r==="guest")),fA=H(e=>e.roles,({flags:e})=>e),dA=H(e=>e.roles,({selectedTab:e})=>e),pA=H(e=>e.roles,({forceLogin:e})=>e),hA=H(e=>e.roles,({date:e})=>e),Dc=H(e=>e.settings,e=>e.session),gA=(...e)=>H(Dc,r=>e.length>0?We.pick(r,e):r),vA=H(e=>e.settings,e=>e.project),yA=H(e=>e.settings,e=>e),Ic=H(e=>e.settings,e=>e.server),mA=H(Ic,e=>e.remoteDebuggerMode),bA=H(Ic,e=>e.qodly),_A=H(Dc,e=>e["monaco.zoom"]),vg=["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"],yg=vg.map(e=>({id:mc(),content:"",name:e,parentId:null,scope:b.EWebFormStyleClassScope.THEME})),Fc=e=>H(Cn(e),r=>{var t,a;return((a=(t=r==null?void 0:r.content)==null?void 0:t.metadata)==null?void 0:a.styles)||[]}),EA=(e,r)=>H(Fc(e),t=>r.map(a=>{switch(!0){case a===b.EWebFormStyleClassScope.LOCAL:return t.map(s=>({...s,scope:b.EWebFormStyleClassScope.LOCAL}));case a===b.EWebFormStyleClassScope.THEME:return yg;default:return[]}}).flat()),SA=e=>H(Fc(e),r=>[...r.map(t=>({...t,scope:b.EWebFormStyleClassScope.LOCAL})),...yg]),wA=H(e=>e,e=>{var r;return[...(((r=e.sharedCSS)==null?void 0:r.styles)||[]).map(t=>({...t,scope:b.EWebFormStyleClassScope.SHARED}))]}),TA=e=>H(Cn(e),r=>r==null?void 0:r.flags),CA=e=>H(Cn(e),r=>r==null?void 0:r.history),xA=H(fg,e=>{const r=e!=null&&e.history?e.history.active>0:!1,t=e!=null&&e.history?e.history.active<e.history.stack.length-1:!1;return{canUndo:r,canRedo:t}}),Wa=H(e=>e.webforms,e=>e),mg=H(Wa,e=>(e==null?void 0:e.components)||[]),Ds=H(Wa,e=>e.inspector),RA=H(Ds,e=>e.css),OA=H(Ds,e=>e.datasource),bg=H(Wa,e=>e.templates||{data:[]}),AA=H(bg,e=>e.data||[]),PA=e=>H(mg,r=>r.find(t=>t.id===e)),DA=e=>H(Ds,r=>r[e]),IA=H(Wa,e=>e.datasources.theme),FA=H(e=>e.catalog,e=>e.sharedDatasources,e=>e.sharedCSS,(e,r,t)=>[e.state,r.state,t.state].every(a=>["loaded","error"].includes(a))),$c={label:"Base",id:"root"},$A=e=>H(Cn(e),r=>{var t,a;return((a=(t=r==null?void 0:r.content)==null?void 0:t.metadata)==null?void 0:a.states)||[$c]});var Mc=(e=>(e.SHOW_AFTER_TIMEOUT="show_after_timeout",e.HIDE_AFTER_TIMEOUT="hide_after_timeout",e))(Mc||{}),Lc=(e=>(e.NONE="none",e.SAVE_ALL_AND_PROCEED="saved_all_and_proceed",e.PROCEED="proceed",e))(Lc||{}),Nc=(e=>(e.AIRY="airy",e.COMPACT="neutral",e))(Nc||{}),Go,MA=new Uint8Array(16);function _g(){if(!Go&&(Go=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Go))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Go(MA)}const LA=/^(?:[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 Is(e){return typeof e=="string"&&LA.test(e)}var yt=[];for(var Ru=0;Ru<256;++Ru)yt.push((Ru+256).toString(16).substr(1));function Fs(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(yt[e[r+0]]+yt[e[r+1]]+yt[e[r+2]]+yt[e[r+3]]+"-"+yt[e[r+4]]+yt[e[r+5]]+"-"+yt[e[r+6]]+yt[e[r+7]]+"-"+yt[e[r+8]]+yt[e[r+9]]+"-"+yt[e[r+10]]+yt[e[r+11]]+yt[e[r+12]]+yt[e[r+13]]+yt[e[r+14]]+yt[e[r+15]]).toLowerCase();if(!Is(t))throw TypeError("Stringified UUID is invalid");return t}var Fp,Ou,Au=0,Pu=0;function NA(e,r,t){var a=r&&t||0,s=r||new Array(16);e=e||{};var i=e.node||Fp,c=e.clockseq!==void 0?e.clockseq:Ou;if(i==null||c==null){var l=e.random||(e.rng||_g)();i==null&&(i=Fp=[l[0]|1,l[1],l[2],l[3],l[4],l[5]]),c==null&&(c=Ou=(l[6]<<8|l[7])&16383)}var d=e.msecs!==void 0?e.msecs:Date.now(),p=e.nsecs!==void 0?e.nsecs:Pu+1,h=d-Au+(p-Pu)/1e4;if(h<0&&e.clockseq===void 0&&(c=c+1&16383),(h<0||d>Au)&&e.nsecs===void 0&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Au=d,Pu=p,Ou=c,d+=122192928e5;var m=((d&268435455)*1e4+p)%4294967296;s[a++]=m>>>24&255,s[a++]=m>>>16&255,s[a++]=m>>>8&255,s[a++]=m&255;var _=d/4294967296*1e4&268435455;s[a++]=_>>>8&255,s[a++]=_&255,s[a++]=_>>>24&15|16,s[a++]=_>>>16&255,s[a++]=c>>>8|128,s[a++]=c&255;for(var E=0;E<6;++E)s[a+E]=i[E];return r||Fs(s)}function Eg(e){if(!Is(e))throw TypeError("Invalid UUID");var r,t=new Uint8Array(16);return t[0]=(r=parseInt(e.slice(0,8),16))>>>24,t[1]=r>>>16&255,t[2]=r>>>8&255,t[3]=r&255,t[4]=(r=parseInt(e.slice(9,13),16))>>>8,t[5]=r&255,t[6]=(r=parseInt(e.slice(14,18),16))>>>8,t[7]=r&255,t[8]=(r=parseInt(e.slice(19,23),16))>>>8,t[9]=r&255,t[10]=(r=parseInt(e.slice(24,36),16))/1099511627776&255,t[11]=r/4294967296&255,t[12]=r>>>24&255,t[13]=r>>>16&255,t[14]=r>>>8&255,t[15]=r&255,t}function kA(e){e=unescape(encodeURIComponent(e));for(var r=[],t=0;t<e.length;++t)r.push(e.charCodeAt(t));return r}var jA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",BA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Sg(e,r,t){function a(s,i,c,l){if(typeof s=="string"&&(s=kA(s)),typeof i=="string"&&(i=Eg(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var d=new Uint8Array(16+s.length);if(d.set(i),d.set(s,i.length),d=t(d),d[6]=d[6]&15|r,d[8]=d[8]&63|128,c){l=l||0;for(var p=0;p<16;++p)c[l+p]=d[p];return c}return Fs(d)}try{a.name=e}catch{}return a.DNS=jA,a.URL=BA,a}function WA(e){if(typeof e=="string"){var r=unescape(encodeURIComponent(e));e=new Uint8Array(r.length);for(var t=0;t<r.length;++t)e[t]=r.charCodeAt(t)}return UA(HA(GA(e),e.length*8))}function UA(e){for(var r=[],t=e.length*32,a="0123456789abcdef",s=0;s<t;s+=8){var i=e[s>>5]>>>s%32&255,c=parseInt(a.charAt(i>>>4&15)+a.charAt(i&15),16);r.push(c)}return r}function wg(e){return(e+64>>>9<<4)+14+1}function HA(e,r){e[r>>5]|=128<<r%32,e[wg(r)-1]=r;for(var t=1732584193,a=-271733879,s=-1732584194,i=271733878,c=0;c<e.length;c+=16){var l=t,d=a,p=s,h=i;t=Et(t,a,s,i,e[c],7,-680876936),i=Et(i,t,a,s,e[c+1],12,-389564586),s=Et(s,i,t,a,e[c+2],17,606105819),a=Et(a,s,i,t,e[c+3],22,-1044525330),t=Et(t,a,s,i,e[c+4],7,-176418897),i=Et(i,t,a,s,e[c+5],12,1200080426),s=Et(s,i,t,a,e[c+6],17,-1473231341),a=Et(a,s,i,t,e[c+7],22,-45705983),t=Et(t,a,s,i,e[c+8],7,1770035416),i=Et(i,t,a,s,e[c+9],12,-1958414417),s=Et(s,i,t,a,e[c+10],17,-42063),a=Et(a,s,i,t,e[c+11],22,-1990404162),t=Et(t,a,s,i,e[c+12],7,1804603682),i=Et(i,t,a,s,e[c+13],12,-40341101),s=Et(s,i,t,a,e[c+14],17,-1502002290),a=Et(a,s,i,t,e[c+15],22,1236535329),t=St(t,a,s,i,e[c+1],5,-165796510),i=St(i,t,a,s,e[c+6],9,-1069501632),s=St(s,i,t,a,e[c+11],14,643717713),a=St(a,s,i,t,e[c],20,-373897302),t=St(t,a,s,i,e[c+5],5,-701558691),i=St(i,t,a,s,e[c+10],9,38016083),s=St(s,i,t,a,e[c+15],14,-660478335),a=St(a,s,i,t,e[c+4],20,-405537848),t=St(t,a,s,i,e[c+9],5,568446438),i=St(i,t,a,s,e[c+14],9,-1019803690),s=St(s,i,t,a,e[c+3],14,-187363961),a=St(a,s,i,t,e[c+8],20,1163531501),t=St(t,a,s,i,e[c+13],5,-1444681467),i=St(i,t,a,s,e[c+2],9,-51403784),s=St(s,i,t,a,e[c+7],14,1735328473),a=St(a,s,i,t,e[c+12],20,-1926607734),t=wt(t,a,s,i,e[c+5],4,-378558),i=wt(i,t,a,s,e[c+8],11,-2022574463),s=wt(s,i,t,a,e[c+11],16,1839030562),a=wt(a,s,i,t,e[c+14],23,-35309556),t=wt(t,a,s,i,e[c+1],4,-1530992060),i=wt(i,t,a,s,e[c+4],11,1272893353),s=wt(s,i,t,a,e[c+7],16,-155497632),a=wt(a,s,i,t,e[c+10],23,-1094730640),t=wt(t,a,s,i,e[c+13],4,681279174),i=wt(i,t,a,s,e[c],11,-358537222),s=wt(s,i,t,a,e[c+3],16,-722521979),a=wt(a,s,i,t,e[c+6],23,76029189),t=wt(t,a,s,i,e[c+9],4,-640364487),i=wt(i,t,a,s,e[c+12],11,-421815835),s=wt(s,i,t,a,e[c+15],16,530742520),a=wt(a,s,i,t,e[c+2],23,-995338651),t=Tt(t,a,s,i,e[c],6,-198630844),i=Tt(i,t,a,s,e[c+7],10,1126891415),s=Tt(s,i,t,a,e[c+14],15,-1416354905),a=Tt(a,s,i,t,e[c+5],21,-57434055),t=Tt(t,a,s,i,e[c+12],6,1700485571),i=Tt(i,t,a,s,e[c+3],10,-1894986606),s=Tt(s,i,t,a,e[c+10],15,-1051523),a=Tt(a,s,i,t,e[c+1],21,-2054922799),t=Tt(t,a,s,i,e[c+8],6,1873313359),i=Tt(i,t,a,s,e[c+15],10,-30611744),s=Tt(s,i,t,a,e[c+6],15,-1560198380),a=Tt(a,s,i,t,e[c+13],21,1309151649),t=Tt(t,a,s,i,e[c+4],6,-145523070),i=Tt(i,t,a,s,e[c+11],10,-1120210379),s=Tt(s,i,t,a,e[c+2],15,718787259),a=Tt(a,s,i,t,e[c+9],21,-343485551),t=Qr(t,l),a=Qr(a,d),s=Qr(s,p),i=Qr(i,h)}return[t,a,s,i]}function GA(e){if(e.length===0)return[];for(var r=e.length*8,t=new Uint32Array(wg(r)),a=0;a<r;a+=8)t[a>>5]|=(e[a/8]&255)<<a%32;return t}function Qr(e,r){var t=(e&65535)+(r&65535),a=(e>>16)+(r>>16)+(t>>16);return a<<16|t&65535}function qA(e,r){return e<<r|e>>>32-r}function $s(e,r,t,a,s,i){return Qr(qA(Qr(Qr(r,e),Qr(a,i)),s),t)}function Et(e,r,t,a,s,i,c){return $s(r&t|~r&a,e,r,s,i,c)}function St(e,r,t,a,s,i,c){return $s(r&a|t&~a,e,r,s,i,c)}function wt(e,r,t,a,s,i,c){return $s(r^t^a,e,r,s,i,c)}function Tt(e,r,t,a,s,i,c){return $s(t^(r|~a),e,r,s,i,c)}var YA=Sg("v3",48,WA);const zA=YA;function VA(e,r,t){e=e||{};var a=e.random||(e.rng||_g)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,r){t=t||0;for(var s=0;s<16;++s)r[t+s]=a[s];return r}return Fs(a)}function KA(e,r,t,a){switch(e){case 0:return r&t^~r&a;case 1:return r^t^a;case 2:return r&t^r&a^t&a;case 3:return r^t^a}}function Du(e,r){return e<<r|e>>>32-r}function JA(e){var r=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var a=unescape(encodeURIComponent(e));e=[];for(var s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,c=Math.ceil(i/16),l=new Array(c),d=0;d<c;++d){for(var p=new Uint32Array(16),h=0;h<16;++h)p[h]=e[d*64+h*4]<<24|e[d*64+h*4+1]<<16|e[d*64+h*4+2]<<8|e[d*64+h*4+3];l[d]=p}l[c-1][14]=(e.length-1)*8/Math.pow(2,32),l[c-1][14]=Math.floor(l[c-1][14]),l[c-1][15]=(e.length-1)*8&4294967295;for(var m=0;m<c;++m){for(var _=new Uint32Array(80),E=0;E<16;++E)_[E]=l[m][E];for(var T=16;T<80;++T)_[T]=Du(_[T-3]^_[T-8]^_[T-14]^_[T-16],1);for(var x=t[0],D=t[1],P=t[2],j=t[3],M=t[4],k=0;k<80;++k){var O=Math.floor(k/20),z=Du(x,5)+KA(O,D,P,j)+M+r[O]+_[k]>>>0;M=j,j=P,P=Du(D,30)>>>0,D=x,x=z}t[0]=t[0]+x>>>0,t[1]=t[1]+D>>>0,t[2]=t[2]+P>>>0,t[3]=t[3]+j>>>0,t[4]=t[4]+M>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,t[0]&255,t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,t[1]&255,t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,t[2]&255,t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,t[3]&255,t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,t[4]&255]}var XA=Sg("v5",80,JA);const ZA=XA,QA="00000000-0000-0000-0000-000000000000";function eP(e){if(!Is(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}const tP=Object.freeze(Object.defineProperty({__proto__:null,NIL:QA,parse:Eg,stringify:Fs,v1:NA,v3:zA,v4:VA,v5:ZA,validate:Is,version:eP},Symbol.toStringTag,{value:"Module"})),rP=Kw(tP);function kc(e,r){if(!e||!r||!e.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=r}kc.prototype.convert=function(e){var r,t,a,s={},i=this.srcAlphabet.length,c=this.dstAlphabet.length,l=e.length,d=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(r=0;r<l;r++)s[r]=this.srcAlphabet.indexOf(e[r]);do{for(t=0,a=0,r=0;r<l;r++)t=t*i+s[r],t>=c?(s[a++]=parseInt(t/c,10),t=t%c):a>0&&(s[a++]=0);l=a,d=this.dstAlphabet.slice(t,t+1).concat(d)}while(a!==0);return d};kc.prototype.isValid=function(e){for(var r=0;r<e.length;++r)if(this.srcAlphabet.indexOf(e[r])===-1)return!1;return!0};var nP=kc,aP=nP;function Ua(e,r){var t=new aP(e,r);return function(a){return t.convert(a)}}Ua.BIN="01";Ua.OCT="01234567";Ua.DEC="0123456789";Ua.HEX="0123456789abcdef";var oP=Ua;const{v4:Iu}=rP,qo=oP,Fu="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",sP="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",iP={consistentLength:!0};let $u;const $p=(e,r,t)=>{const a=r(e.toLowerCase().replace(/-/g,""));return!t||!t.consistentLength?a:a.padStart(t.shortIdLength,t.paddingChar)},uP=(e,r)=>{const a=r(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("-")},cP=e=>Math.ceil(Math.log(2**128)/Math.log(e));var ps=(()=>{const e=(r,t)=>{const a=r||Fu,s={...iP,...t};if([...new Set(Array.from(a))].length!==a.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const i=cP(a.length),c={shortIdLength:i,consistentLength:s.consistentLength,paddingChar:a[0]},l=qo(qo.HEX,a),d=qo(a,qo.HEX),p=()=>$p(Iu(),l,c),h={new:p,generate:p,uuid:Iu,fromUUID:m=>$p(m,l,c),toUUID:m=>uP(m,d),alphabet:a,maxLength:i};return Object.freeze(h),h};return e.constants={flickrBase58:Fu,cookieBase90:sP},e.uuid=Iu,e.generate=()=>($u||($u=e(Fu).generate),$u()),e})(),Ae=(e=>(e.DATACLASS="dataclass",e.METHOD="method",e.ATTRIBUTE="attribute",e.DATASTORE="datastore",e))(Ae||{});const lP=[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE,Ae.METHOD],hs="guest",jc=[{key:"read",label:"Read",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"create",label:"Create",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"update",label:"Update",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"drop",label:"Delete",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE]},{key:"describe",label:"Describe",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.ATTRIBUTE,Ae.METHOD]},{key:"execute",label:"Execute",canApplyTo:[Ae.DATASTORE,Ae.DATACLASS,Ae.METHOD]},{key:"promote",label:"Promote",canApplyTo:[Ae.METHOD]}];function rr(e,...r){return Array.from(new Set([...e,...r]))}function Tg(e){const r={},t=new Map;e.forEach(d=>{const p=d.id||ps.generate();r[p]={...d,id:p,parents:[],includes:rr(d.includes||[]),resources:[]},t.set(d.privilege,p)}),Object.entries(r).forEach(([d,p])=>{const h=p.includes.map(m=>{const _=t.get(m);return _?(r[_].parents=rr(r[_].parents,_),_):""}).filter(Boolean);r[d]={...p,includes:h}});const a=Cg(r),s=new Set;function i(d){s.add(d.id),d.includes=d.includes.filter(p=>!s.has(p))}if(a.forEach(i),a.forEach(d=>d.parents=[]),a.forEach(d=>{d.includes.forEach(p=>r[p].parents.push(d.id))}),Object.values(r).find(({privilege:d})=>d===hs))return r;const l=ps.generate();return{[l]:{id:l,privilege:hs,includes:[],parents:[],resources:[]},...r}}function Cg(e){return Object.values(e).sort((r,t)=>r.parents.length-t.parents.length)}function Ms(e,r){const t=r[e];let a=[];return t&&t.parents.forEach(s=>{a=rr(a,...Ms(s,r),s)}),a}function gs(e,r){const t=r[e];let a=[];return t&&t.includes.forEach(s=>{a=rr(a,...gs(s,r),s)}),a}function fP(e,r){const t=r[e];if(!t)return[];const a=[e,...Ms(e,r),...t.includes];return Object.keys(r).filter(s=>!a.includes(s))}function dP(e,r){return r[e]?Object.keys(r).reduce((a,s)=>s===e?a:{...a,[s]:{...r[s],parents:r[s].parents.filter(i=>i!==e),includes:r[s].includes.filter(i=>i!==e)}},{}):r}function pP(e,r,t){const a=t[e],s=t[r];return!a||!s?t:{...t,[e]:{...t[e],includes:rr(a.includes,r)},[r]:{...t[r],parents:rr(s.parents,e)}}}function hP(e,r,t){const a=t[e],s=t[r];return!a||!s?t:{...t,[e]:{...t[e],includes:t[e].includes.filter(i=>i!==r)},[r]:{...t[r],parents:t[r].parents.filter(i=>i!==e)}}}function xg(e,r){b.validateName(e),Object.entries(r).forEach(([,{privilege:a}])=>{if(e.toLowerCase()===a.toLowerCase())throw new Error(`There's already a Privilege with the name ${e}`)});const t=ps.generate();return{[t]:{id:t,privilege:e,includes:[],parents:[],resources:[]},...r}}function gP(e,r,t,a,s){let i=xg(e,s);const c=Object.entries(i).find(([,l])=>l.privilege===e);return c?(i=Pg(c[1].id,r,t,a,i),i):s}function vP(e,r,t){if(!e)throw new Error("Please enter a name");if(!t[r])throw new Error("Invalid privilege");return Object.entries(t).forEach(([,{privilege:a,id:s}])=>{if(e.toLowerCase()===a.toLowerCase()&&r!==s)throw new Error(`There's already a Privilege with the name ${e}`)}),{...t,[r]:{...t[r],privilege:e}}}function yP(e,r){return e.map(t=>Br(t,r))}function Br(e,r){return r[e]?r[e]:null}function Rg({applyTo:e,type:r,...t}){return Object.entries(t).reduce((a,[s,i])=>{const c=We.find(jc,["key",s]);return!c||!c.canApplyTo.includes(r)||(typeof i=="string"?i.split(","):i).forEach(d=>{a[d]=rr(a[d]||[],s)}),a},{})}const rc=(e,r=!1)=>["read","create","update","delete"].includes(e.toLowerCase())?`All ${r?"dataclasses and ":""}attributes have the '${e.toLowerCase()}' permission`:e.toLowerCase()==="execute"?`All functions defined ${r?"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 ${r?"dataclasses, ":""}attributes and functions have the '${e.toLowerCase()}' permission`;function Bc(e){return{permissions:jc.filter(({canApplyTo:r})=>r.includes(e.type)).map(({key:r,label:t})=>{const a={name:r,from:[]};switch(e.type){case Ae.DATASTORE:return{...a,info:rc(t,!0)};case Ae.DATACLASS:return{...a,info:rc(t)};default:return a}}),resource:e.applyTo,type:e.type}}function Og(e,r){const t=Ag(r),a={};return e.filter(({type:s})=>lP.includes(s)).forEach(s=>{const i=Rg(s);Object.entries(i).forEach(([c,l])=>{var h;const d=(h=t[c])==null?void 0:h.id;if(!d)return;a[d]=a[d]||{...r[d]};let p=We.find(a[d].resources,{resource:s.applyTo,type:s.type});p||(p=Bc(s),a[d].resources.push(p)),p.permissions=p.permissions.map(m=>({...m,checked:m.checked||l.includes(m.name)}))})}),{...r,...a}}function Ag(e){return Object.values(e).reduce((r,t)=>({...r,[t.privilege]:t}),{})}function Ls(e){var t;const r=Tg(e.privileges||[]);return{forceLogin:e==null?void 0:e.forceLogin,privileges:Og(((t=e.permissions)==null?void 0:t.allowed)||[],r),roles:(e.roles||[]).map(({id:a=ps.generate(),role:s,privileges:i=[]})=>({id:a,role:s,privileges:rr(i).map(c=>{var l;return(l=Object.values(r).find(({privilege:d})=>d===c))==null?void 0:l.id}).filter(Boolean)})).reduce((a,s)=>({...a,[s.id]:{...s}}),{})}}function Ns(e){const r=Object.values(e.privileges).filter(({includes:a})=>a.length===0).map(({id:a})=>a),t=[...r,...r.map(a=>Ms(a,e.privileges).reverse())].flat().filter((a,s,i)=>i.indexOf(a)===s).map(a=>e.privileges[a]);return{forceLogin:e.forceLogin,permissions:{allowed:Object.values(e.privileges).reduce((a,s)=>(s.resources.forEach(({permissions:i,resource:c,type:l})=>{let d=We.find(a,{applyTo:c,type:l});d||(d={applyTo:c,type:l},a.push(d)),i.forEach(({name:p,checked:h})=>{h&&d&&(d[p]=d[p]||[],d[p].push(s.privilege))})}),a),[])},privileges:t.filter(({privilege:a})=>a!==hs).map(({id:a,includes:s,privilege:i})=>({id:a,privilege:i,includes:s.map(c=>e.privileges[c].privilege)})),roles:Object.values(e.roles).map(a=>({...a,privileges:a.privileges.map(s=>{var i;return(i=e.privileges[s])==null?void 0:i.privilege}).filter(Boolean)}))}}function mP(e,r){const t=r[e],a={children:[],links:[],parents:[],selected:e};if(!t)return a;function s(l,d,p=[]){const h=l.reduce((m,_)=>[...m,...r[_][d]],[]);return h.length===0?p:(p.push(h),s(h,d,p))}function i(l){const d=[],p=[];for(let h=l.length-1;h>=0;h-=1){const m=l[h].filter(_=>d.includes(_)?!1:(d.push(_),!0));m.length>0&&p.unshift(rr(m))}return p}function c(l,d){const p=[];return l.reduce((h,m)=>(m.forEach(_=>{r[_][d==="parents"?"includes":"parents"].forEach(T=>{p.includes(T)&&h.push(d==="parents"?{source:_,target:T}:{source:T,target:_})}),p.push(_)}),h),[])}return a.children=s([e],"includes"),a.children=i(a.children),a.parents=s([e],"parents"),a.parents=i(a.parents),a.links=[...c([[e],...a.parents],"parents"),...c([[e],...a.children],"includes")],a}function bP(e,r,t){const a=Br(e,t);if(!a||We.find(a.resources,{resource:r.applyTo,type:r.type}))return t;const s={...a,resources:[...a.resources,Bc(r)]};return{...t,[e]:s}}function _P(e,r,t){const a=Br(e,t);if(!a)return t;const s={...a,resources:a.resources.filter(({resource:i,type:c})=>i!==r.applyTo||c!==r.type)};return{...t,[e]:s}}function EP(e,r){const t=Br(e,r);if(!t)return r;const a={...t,resources:t.resources.filter(s=>s.permissions.some(i=>i.from.length)).map(s=>({...s,permissions:s.permissions.map(i=>({...i,checked:!1}))}))};return{...r,[e]:a}}function Pg(e,r,t,a,s){const i=Br(e,s);if(!i)return s;const l=We.find(i.resources,{type:t,resource:r})?{...i,resources:i.resources.map(d=>d.type===t&&d.resource===r?{...d,permissions:d.permissions.map(p=>p.name===a?{...p,checked:!p.checked,from:[]}:p)}:d)}:{...i,resources:[...i.resources,{type:t,resource:r,permissions:jc.filter(d=>d.canApplyTo.includes(t)).map(d=>({from:[],name:d.key,checked:d.key===a,info:rc(d.key,t===Ae.DATASTORE)}))}]};return{...s,[e]:l}}function SP(e,r,t,a){const s=Br(e,a);if(!s)return a;const c=We.find(s.resources,{type:r.type,resource:r.resource})?{...s,resources:s.resources.map(l=>l.type===r.type&&l.resource===r.resource?{...l,permissions:r.permissions.map(d=>d.name===t.name?{...d,checked:!d.checked,from:[]}:d)}:l)}:{...s,resources:[...s.resources,{...r,permissions:r.permissions.map(l=>({...l,checked:t.name===l.name,from:[]}))}]};return{...a,[e]:c}}function wP(e,r){var d;const t=Dg(e,r)||[],a=((d=Br(e,r))==null?void 0:d.resources)||[],c=([...t,...a].filter(({type:p})=>p===Ae.METHOD)||[]).map(({resource:p})=>p);return Object.entries(r).reduce((p,[h,{resources:m}])=>(m.filter(({resource:_,type:E})=>E===Ae.METHOD&&c.includes(_)).forEach(({permissions:_,resource:E})=>{var x;((x=_.find(({name:D})=>D==="promote"))==null?void 0:x.checked)&&(p[E]=rr(p[E]||[],h))}),p),{})}function Dg(e,r){var c;const t=Br(e,r);if(!t)return[];const a=(c=Object.values(r).find(l=>l.privilege===hs))==null?void 0:c.id;return(a&&a!==e?rr(gs(e,r),a):gs(e,r)).reduce((l,d)=>(r[d].resources.forEach(h=>{if(h.permissions.filter(({checked:E})=>E).length===0)return;const _=We.find(l,{type:h.type,resource:h.resource});if(!_){l.push({...h,permissions:h.permissions.map(E=>({...E,from:E.checked?[d]:[],checked:!1}))});return}_.permissions=_.permissions.map((E,T)=>{let{from:x=[]}=E;return h.permissions[T].checked&&!x.includes(d)&&(x=[...x,d]),{...E,from:x,checked:E.checked}})}),l),We.clone(t.resources.map(l=>({...l,permissions:l.permissions.map(({checked:d,...p})=>({...p,checked:!!d}))}))))}const TP=e=>e.reduce((r,t)=>({...r,[t.id]:{...t}}),{}),CP=(e,r)=>r[e]?Object.values(r).reduce((t,a)=>e===a.id||a.role===""?t:{...t,[a.id]:a},{}):r,xP=(e,r,t)=>t[e]?Object.values(t).reduce((a,s)=>e===s.id?{...a,[s.id]:{...s,name:r}}:{...a,[s.id]:s},{}):t,RP=(e,r)=>{const t={id:e,role:"",privileges:[]};return{...r,[t.id]:t}},OP=(e,r)=>{if(b.validateName(e.role),Object.values(r).find(a=>a.role===e.role))throw new Error(`a role with the name ${e.role} already exists`);return Object.values(r).reduce((a,s)=>e.id===s.id?{...a,[e.id]:e}:{...a,[s.id]:s},{})},AP={list:[]},Mp=(e,r)=>e.list.filter(t=>t.id!==r),Ig=nr({name:"modals",initialState:AP,reducers:{createModal:(e,r)=>{e.list.push(r.payload)},editModal:(e,r)=>{const{id:t,...a}=r.payload,s=e.list.find(b.byId(t));s&&Object.assign(s,{...a})},removeModal:(e,r)=>{const t=r.payload;e.list=Mp(e,t)},closeModal:(e,r)=>{const{id:t,reason:a}=r.payload;if(a){const s=e.list.find(i=>i.id===t);s&&(s.closeReason=a,s.isOpen=!1)}else e.list=Mp(e,t)}}}),{createModal:Fg,removeModal:$g,closeModal:PP,editModal:DP}=Ig.actions,ar=Q("modals/open",async(e,{dispatch:r})=>{const{type:t=b.ModalType.ALERT,store:a=Iv()}=e,s=mc();switch(r(Fg({id:s,type:t,isOpen:!0,...e})),t){case b.ModalType.CONFIRM:return new Promise(i=>{const c=a.subscribe(()=>{var p;const{modals:l}=a.getState(),d=l.list.find(h=>h.id===s);if(d&&!d.isOpen){const h=d.closeReason===b.ModalCloseReason.CONFIRMED,m=We.entries((p=d.views)==null?void 0:p.toggles).reduce((_,E)=>({..._,[E[0]]:E[1].value}),{});r($g(s)),c(),i({confirmed:h,options:m})}})});default:return{}}}),Mg=()=>b.getFileContent({name:b.ROLES_TAB_PATH}),Lg="Roles & Privileges",vs=Q("roles/fetchRoles",async(e,{dispatch:r,rejectWithValue:t})=>{var i;let a;try{a=await Mg()}catch(c){if(!Array.isArray((i=c==null?void 0:c.data)==null?void 0:i.__ERROR))return t("Error while loading the roles");a={name:b.ROLES_TAB_PATH,date:new Date().toISOString(),content:{permissions:{allowed:[]},privileges:[],roles:[]}}}const s={name:Lg,type:b.FileFolderType.ROLES,date:a.date,view:{panel:{isOpen:!1,type:"",current:""}},path:b.ROLES_TAB_PATH,flags:{},extra:{editor:{key:"editors:roles"}},content:{}};return r(Pt(s)),{...a,content:Ls(a.content)}}),Ng=Q("roles/fetchRolesChanges",async(e,{getState:r})=>{const{tabs:t}=r().root;if(t.find(s=>s.path===b.ROLES_TAB_PATH)){const{date:s}=r().roles;if(s&&await Wc(s))return{old:!0}}return{}}),Wc=async e=>{if(!e)return!1;try{const r=await Mg();if(r.date){const t=new Date(e),a=new Date(r.date);if(t>a)return!0}}catch(r){if(!Array.isArray(r==null?void 0:r.data.__ERROR))throw r}return!1},nc=Q("roles/saveRoles",async(e,{getState:r,rejectWithValue:t,dispatch:a})=>{try{const{flags:s,date:i}=r().roles;if(s.old||await Wc(i)){const{confirmed:d}=await a(ar({title:Lg,message:"New content has been found on the server. Are you sure you want to continue?",type:b.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!d)return t({old:!0})}return await b.setFileContent({name:b.ROLES_TAB_PATH,content:Ns(e)})}catch{return t("Error while loading the roles")}}),kg=nr({name:"roles",initialState:()=>{const{roles:e}=Jn(),{roles:r={},privileges:t={},flags:a={touched:!1},date:s,selectedTab:i="roles"}=e||{};return{flags:a,roles:r,privileges:t,date:s,selectedTab:i}},reducers:{updatePrivileges:(e,r)=>{e.privileges=r.payload,e.flags.touched=!0},updateRoles:(e,r)=>{e.roles=r.payload,e.flags.touched=!0},updateRolesAndPrivileges:(e,r)=>{e.roles=r.payload.roles,e.privileges=r.payload.privileges},toggleTab:(e,r)=>{e.selectedTab=r.payload},toggleForceLogin:(e,r)=>{e.forceLogin!==r.payload&&(e.forceLogin=r.payload,e.flags.touched=!0)},setRolesContent(e,r){const{content:t,flags:a={},...s}=r.payload,i=Ls(t),c={...e.flags,...a};return{...e,...i,...s,flags:c}}},extraReducers(e){e.addCase(vs.fulfilled,(r,t)=>{const{content:a,date:s}=t.payload;r={...r,...a,date:s}}).addCase(vs.rejected,r=>({...r,roles:{},privileges:{},flags:{touched:!1},date:void 0})).addCase(nc.fulfilled,(r,t)=>({...r,flags:{...r.flags,confirmed:!0,touched:!1,old:!1},date:t.payload.date})).addCase(nc.rejected,(r,t)=>Th.isString(t.payload)?r:{...r,flags:{...r.flags,...t.payload}}).addCase(Ng.fulfilled,(r,t)=>({...r,flags:{...r.flags,...t.payload}})).addCase(zn.fulfilled,(r,t)=>{!t.payload||t.payload.path!==b.ROLES_TAB_PATH||(r.flags.touched=!1,r.flags.old=!1)}).addCase(Vc.fulfilled,(r,t)=>{t.meta.arg!==b.ROLES_TAB_PATH||!t.payload||(r.flags.touched=!1,r.flags.old=!1)})}}),{updatePrivileges:jg,updateRoles:Bg,setRolesContent:Uc,toggleTab:IP,toggleForceLogin:FP,updateRolesAndPrivileges:Hc}=kg.actions,$P=kg.reducer,Gc=Q("settings/fetch",async()=>await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:b.SETTINGS_TAB_PATH,content:!0,as:"json"})),Wg=Q("settings/app",b.getAppSettings),MP=vh(),Lp={session:{"studio.tips":!0,"studio.notifications":!0,"studio.enablePreview":!1,"studio.tipsBaseUrl":"https://raw.githubusercontent.com/4d/Web-studio-TIPS/gh-build","webforms.tooltip.behavior":Mc.SHOW_AFTER_TIMEOUT,"webforms.tooltip.timeout":3e3,"webforms.renderer.showPopOver":!0,"webforms.renderer.showUnsavedPopOver":!0,"webforms.renderer.unsavedPopOverChoice":Lc.NONE,"welcometour.active":!0,"webforms.properties.advanced-mode":!1,"monaco.zoom":0},project:{"webforms.renderer.indexPage":"","webforms.display-mode":"neutral"},server:{projectOpened:!1,remoteDebuggerMode:b.RemoteDebuggerMode.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:"",lsp:""},isRestActive:!0}},LP={...Lp,session:{...Lp.session,...MP},welcometour:{}},Ug=nr({name:"settings",initialState:LP,reducers:{setSetting(e,r){const{path:t,settingsKey:a,value:s}=r.payload;e[t][a]=s},setSettings(e,r){const{path:t,value:a}=r.payload;e[t]={...e[t],...a}},setSettingsAsText(e,r){const{path:t,settings:a}=r.payload;e[t]=a}},extraReducers(e){e.addCase(Gc.fulfilled,(r,t)=>{r.project={...r.project,...t.payload.content}}),e.addCase(Wg.fulfilled,(r,t)=>{r.server=t.payload,r.server.qodly&&(r.project["webforms.display-mode"]="airy")})}}),{setSetting:ac,setSettings:ks,setSettingsAsText:NP}=Ug.actions,kP=Ug.reducer,oc=e=>{const r=["folder","file"];return e.sort((t,a)=>t.type===a.type?t.name.localeCompare(a.name):r.indexOf(t.type)-r.indexOf(a.type))},Re=(e,r)=>e.reduce((t,a)=>a.path===r.path&&a.type===r.type?[...t,r]:a.children?[...t,{...a,children:oc(Re(a.children,r))}]:[...t,a],[]),lt=(e,r)=>e.reduce((t,a)=>t||(a.path===r?a:a.children?lt(a.children,r):null),null),jP=[{name:b.FolderRootPath.WEBFORMS,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.WEBFORMS,error:null,flags:{expanded:!1,loading:!1,cached:!1},tipKey:"editors:webform:explorer:webforms",config:{},isRoot:!0},{name:b.FolderRootPath.METHODS,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.METHODS,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:b.FolderRootPath.CLASSES,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.CLASSES,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:b.FolderRootPath.SHARED,type:b.FileFolderType.FOLDER,children:[],path:b.FolderRootPath.SHARED,error:null,flags:{expanded:!1,loading:!1,cached:!1},config:{},isRoot:!0},{name:"Debugger",type:b.FileFolderType.FOLDER,children:[],path:"Debugger",error:null,flags:{expanded:!1,cached:!0},config:{},isRoot:!0},{name:"Roles And Privileges",type:b.FileFolderType.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:b.FileFolderType.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:b.FileFolderType.FILE,ext:"json",path:"qodlyApp",error:null,flags:{},config:{editor:{key:"editors:settings"}},isRoot:!0}],Hg=nr({name:"explorer",initialState:jP,reducers:{toggleExpandFolder:(e,r)=>(e=Re(e,{...r.payload,flags:{...r.payload.flags,expanded:!r.payload.flags.expanded}}),e),expandFolder:(e,r)=>(e=Re(e,{...r.payload,flags:{...r.payload.flags,expanded:!0}}),e),openAddFileInput:(e,r)=>Re(e,{...r.payload,flags:{...r.payload.flags,adding:!0}}),addNewFile:(e,r)=>{const{parent:t,child:a}=r.payload;return Re(e,{...t,children:[a,...t.children||[]]})},removeFile:(e,r)=>{const{parent:t,child:a}=r.payload;return Re(e,{...t,children:t.children.filter(s=>s.path!==a.path)})},refreshFile:(e,r)=>{const{parent:t,child:a}=r.payload,s=(t.children||[]).filter(i=>i.path!==a.path&&!a.error);return Re(e,{...t,children:[a,...s]})},setFolderChildren:(e,r)=>{const t=lt(e,r.payload.parentPath);return t?Re(e,{...t,children:r.payload.children}):e}},extraReducers:e=>{e.addCase(Yn.pending,(r,t)=>{const{file:a,newname:s}=t.meta.arg,i=lt(r,a.path);if(!i)return r;const c=a.path.split("/");c.pop();const l=`${c.join("/")}/${a.name}.${a.ext}`,d=`${c.join("/")}/${s}.${a.ext}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_RENAME,payload:{oldPath:l,newPath:d}});break}return Re(r,{...i,flags:{...i.flags,loading:!0}})}),e.addCase(Yn.fulfilled,(r,t)=>{const{meta:{arg:{file:a}},payload:s}=t,i=lt(r,a.path);if(!i)return r;switch(s.old.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_RENAME,payload:{oldPath:s.old.path,newPath:s.new.path}});break}return Re(r,{...i,flags:{...i.flags,loading:!1}})}),e.addCase(Yn.rejected,(r,t)=>{const{file:a}=t.meta.arg,s=lt(r,a.path);return s?Re(r,{...s,flags:{...s.flags,loading:!1}}):r}),e.addCase(_r.pending,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,flags:{...s.flags,loading:!0}}):r}),e.addCase(_r.fulfilled,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,children:oc(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!0},error:null}):r}),e.addCase(_r.rejected,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!0}}):r}),e.addCase(Aa.pending,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,flags:{...s.flags,loading:!0}}):r}),e.addCase(Aa.fulfilled,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,children:oc(t.payload),flags:{...s.flags,loading:!1,cached:!0,expanded:!1},error:null}):r}),e.addCase(Aa.rejected,(r,t)=>{const a=t.meta.arg,s=lt(r,a);return s?Re(r,{...s,error:{message:t.payload},flags:{...s.flags,loading:!1,cached:!0,expanded:!1}}):r}),e.addCase(Jo.pending,(r,t)=>{const{fileName:a,parentNode:s,path:i,type:c}=t.meta.arg;return Re(r,{...s,children:[{name:a,path:`${i}/${a}`,type:c,error:null,flags:{loading:!0},config:{}},...s.children]})}),e.addCase(Jo.fulfilled,(r,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg,c=b.getFileExtentionFromType(i),{editor:l,supportedEditors:d}=pr(`${a}${c?`.${c.toLowerCase()}`:""}`);return Re(r,{name:s,path:`${a}/${s}`,type:i,error:null,flags:{loading:!1},config:{editor:l,supportedEditors:d}})}),e.addCase(Jo.rejected,(r,t)=>{const{path:a,fileName:s,type:i}=t.meta.arg;return Re(r,{name:s,path:`${a}/${s}`,type:i,error:{message:t.payload},flags:{loading:!1},config:{}})}),e.addCase(Xo.pending,(r,t)=>{const{node:a,parentNode:s}=t.meta.arg;return Re(r,{...s,children:[{name:`${a.name}_copy`,path:`${a.path}/${a.name}_copy`,type:a.type,error:null,flags:{loading:!0},permissions:{canRename:!0,canDelete:!0}},...s.children]})}),e.addCase(Xo.fulfilled,(r,t)=>{const{node:a}=t.payload,{node:{path:s,ext:i}}=t.meta.arg,{editor:c,supportedEditors:l}=pr(`${s}${i?`.${i.toLowerCase()}`:""}`);return Re(r,{name:`${a.name}`,path:`${s}/${a.name}`,type:a.type,error:null,flags:{loading:!1},config:{editor:c,supportedEditors:l}})}),e.addCase(Xo.rejected,(r,t)=>{const a=t.payload,{node:s}=t.meta.arg;return Re(r,{name:`${s.name}_copy`,path:`${s.path}/${s.name}_copy`,type:s.type,error:{message:a},flags:{loading:!1},config:{}})}),e.addCase(Da.pending,(r,t)=>{}),e.addCase(Da.fulfilled,(r,t)=>{var m;const{draggedNode:a,newLocation:s}=t.meta.arg,i=Bh(a.path),c=lt(r,i),l=lt(r,s.path),d=(m=c==null?void 0:c.children)==null?void 0:m.filter(_=>_.path!==a.path),p=s.path.split("/").length,h=a.path.split("/").length;return p>=h?(r=Re(r,{...c,children:d}),r=Re(r,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l==null?void 0:l.children:[]],flags:{...l.flags,expanded:!0}})):(r=Re(r,{...l,children:[{...a,path:`${l.path}/${a.name}`},...l!=null&&l.children?l==null?void 0:l.children:[]],flags:{...l.flags,expanded:!0}}),r=Re(r,{...c,children:d})),r}),e.addCase(Da.rejected,(r,t)=>{b.toastSubject.next({message:"Error moving file",kind:"danger"})}),e.addCase(qn.pending,(r,t)=>{var x;const{fileName:a,parentNode:s,path:i,type:c,qodly:l}=t.meta.arg,d=b.getFileExtentionFromType(c,l),p=`${i}/${a}${d?`.${d.toLowerCase()}`:""}`,{editor:h,supportedEditors:m}=pr(p);switch(c){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.WILL_CREATE,payload:{filePath:p}});break}const _=(x=s.children)==null?void 0:x.filter(D=>D.path!==`${i}/${a}`),E=[{name:a,path:`${i}/${a}`,type:b.FileFolderType.FILE,error:null,flags:{loading:!0},config:{editor:h,supportedEditors:m},ext:d,date:new Date().toISOString()},..._],T=Re(r,{...s,children:E});return Th.merge(r,T)}),e.addCase(qn.fulfilled,(r,t)=>{const{fileName:a,path:s,type:i,qodly:c}=t.meta.arg,l=b.getFileExtentionFromType(i,c),d=`${s}/${a}${l?`.${l.toLowerCase()}`:""}`,{editor:p,supportedEditors:h}=pr(d),m=Re(r,{name:a,path:`${s}/${a}`,type:b.FileFolderType.FILE,error:null,flags:{},config:{editor:p,supportedEditors:h},ext:l,date:new Date().toISOString()});switch(i){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.DID_CREATE,payload:{filePath:d}});break}return r=m,r}),e.addCase(qn.rejected,(r,t)=>{const{fileName:a,path:s,type:i}=t.meta.arg,c=b.getFileExtentionFromType(i),{editor:l,supportedEditors:d}=pr(`${s}${c?`.${c.toLowerCase()}`:""}`);return r=Re(r,{name:a,path:`${s}/${a}`,type:b.FileFolderType.FILE,error:{message:"Failed creating file"},flags:{},config:{editor:l,supportedEditors:d},ext:c,date:new Date().toISOString()}),r}),e.addMatcher(ah(Pa),(r,t)=>{const a=lt(r,t.meta.arg.file.path.split(".")[0]);return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!0}})),r}),e.addMatcher(sh(Pa),(r,t)=>{const a=lt(r,t.meta.arg.file.path.split(".")[0]);return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!1}})),r}),e.addMatcher(oh(Pa),(r,t)=>{const a=lt(r,t.meta.arg.file.path.split(".")[0]);return a&&(r=Re(r,{...a,flags:{...a.flags,loading:!1}})),b.toastSubject.next({message:"Failed to open file, try again",kind:"danger"}),r})}}),{toggleExpandFolder:BP,expandFolder:WP,openAddFileInput:UP,addNewFile:Gg,refreshFile:HP,removeFile:sc,setFolderChildren:GP}=Hg.actions;function qg(e,r){switch(e){case b.FileFolderType.WEBFORMS:const t={metadata:{v:"1.0",datasources:[],styles:[]},components:{ROOT:{parent:"",type:{resolvedName:"Container"},isCanvas:!0,props:{airyMode:!1,className:"bg-white h-full w-full px-6",classNames:[],events:[]},displayName:"App",custom:{},hidden:!1,nodes:[],linkedNodes:{}}}};return r["webforms.display-mode"]===Nc.AIRY&&(t.components.ROOT.props.airyMode=!0),t;case b.FileFolderType.METHODS:return`//%attributes = {}
91
+ `;default:return""}}function Yg(e,r,t){switch(r){case b.FileFolderType.MOBILEFORM:return`${e}.MForm`;case b.FileFolderType.WEBFORM:return`${e}.WebForm`;case b.FileFolderType.METHOD:case b.FileFolderType.CLASS:return`${e}.${t?"4qs":"4dm"}`;default:return e}}function qP(e){switch(e){case b.FolderRootPath.WEBFORMS:return b.FileFolderType.WEBFORMS;case b.FolderRootPath.METHODS:return b.FileFolderType.METHODS;case b.FolderRootPath.CLASSES:return b.FileFolderType.CLASSES;case"Mobile":return b.FileFolderType.MOBILE;default:return e}}function zg(e){switch(e){case b.FileFolderType.WEBFORMS:return b.FileFolderType.WEBFORM;case b.FileFolderType.CLASSES:return b.FileFolderType.CLASS;case b.FileFolderType.METHODS:return b.FileFolderType.METHOD;case b.FileFolderType.FOLDER:return b.FileFolderType.FOLDER;case b.FileFolderType.MOBILE:return b.FileFolderType.MOBILEFORM;default:return e}}const YP=Q("files/tryEditMethod",async({method:e},{dispatch:r})=>{const t=e.filePath.split("/"),[a]=t[1].split("."),{editor:s}=pr(e.filePath);return await r(qc({file:{name:a,path:e.filePath,date:new Date().toISOString(),type:b.FileFolderType.CLASS,editor:s},line:e.startingLine+1})).unwrap()}),ic=Q("explorer/createModelFiles",async(e,{dispatch:r,getState:t})=>{var m;const a=t(),s=b.FolderRootPath.CLASSES,i=a.settings.server.qodly,c=lt(a.explorer,s);if(!c)return;await r(_r(s));const d=((m=t().explorer.find(_=>_.name===s))==null?void 0:m.children)||[];let p=[{content:"",name:""}];const h=_=>{switch(_){case"dataclass":return{name:e.type==="dataclass"?e.className:"DataStore",content:i?`extends DataClass
92
92
  `:`Class extends DataClass
93
93
  `};case"collection":return{name:e.type==="dataclass"?e.collectionName:"DataStore",content:i?`extends EntitySelection
94
94
  `:`Class extends EntitySelection
@@ -96,34 +96,34 @@ The error may be correlated with this previous error:
96
96
  `:`Class extends Entity
97
97
  `};case"model":return{name:"DataStore",content:i?`extends DataStoreImplementation
98
98
  `:`Class extends DataStoreImplementation
99
- `}}};e.type==="dataclass"&&!e.toCreate?p=[{...h("dataclass")},{...h("collection")},{...h("entity")}]:e.type==="dataclass"&&e.toCreate?p=[{...h(e.toCreate)}]:p=[{...h("model")}],p=p.filter(_=>!d.find(({name:E,ext:T})=>E===_.name&&T===(i?"4qs":"4dm"))),await Promise.all(p.map(async({name:_,content:E})=>{await n(Gn({type:b.FileFolderType.CLASS,path:s,fileName:_,parentNode:c,content:E,qodly:a.settings.server.qodly}))})),await n(_r(s))}),_r=Q("explorer/fetchFolderContent",async(e,{rejectWithValue:n})=>{try{return(await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e})).map(a=>{const s=`${e}/${a.name}`,{editor:i,supportedEditors:c}=pr(`${s}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:s,ext:a.ext,config:a.type==="folder"?{}:{editor:i,supportedEditors:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),Aa=Q("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:n})=>{try{return(await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e})).map(a=>{const s=`${e}/${a.name}`,{editor:i,supportedEditors:c}=pr(`${s}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:s,ext:a.ext,config:a.type==="folder"?{}:{editor:i,supportedEditors:c}}})}catch{return n("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function HP(e){const n=e.split(".");return n.pop(),{name:n.join("."),ext:e.split(".")[e.split(".").length-1]}}const GP=Q("explorer/uploadFile",async e=>{const n=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const t=await fetch(`/rest/$upload?${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:t.status,data:await t.json()}}catch{return{status:500,data:null}}}),qP=Q("explorer/uploadFile",async({file:e,path:n,parentNode:t},{dispatch:a})=>{const{editor:s,supportedEditors:i}=pr(n),{name:c,ext:l}=HP(e.name);a(Ug({parent:t,child:{name:c,path:`${n}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:s,supportedEditors:i},ext:l}}));try{const d=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${n}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return d.status>=300?(a(sc({parent:t,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),d.status!==413&&b.toastSubject.next({message:"error uploading file",kind:"danger"})):await a(_r(t.path)),{status:d.status,fileName:e.name}}catch{return a(sc({parent:t,child:{name:c,path:`${n}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),b.toastSubject.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),Gn=Q("explorer/createNewFile",async({fileName:e,type:n,path:t,parentNode:a,content:s},{dispatch:i,rejectWithValue:c,getState:l})=>{const{server:{qodly:d},project:p}=l().settings;try{const h=await b.setFileContent({name:Gg(e,n,d),content:s||Hg(n,p),path:t,asText:[b.FileFolderType.CLASS,b.FileFolderType.METHOD].includes(n)});return a.error&&(a.flags.expanded?await i(_r(a.path)):await i(Aa(a.path))),{qodly:d,file:h,parentNode:a}}catch{return c("failed to create folder")}});function Yg(e,n){const{qodly:t=!0,withExtension:a=!0}=n||{},s=b.getFileExtentionFromType(e.type,t);let i="";switch(e.type){case b.FileFolderType.WEBFORM:i=`${b.FolderRootPath.WEBFORMS}/${e.name}`;break;case b.FileFolderType.METHOD:i=`${b.FolderRootPath.METHODS}/${e.name}`;break;case b.FileFolderType.CLASS:i=`${b.FolderRootPath.CLASSES}/${e.name}`;break;default:return""}return`${i}${a?`.${s}`:""}`}const YP=Q("explorer/createNewFileAndOpen",async(e,{dispatch:n,getState:t})=>{const a=await n(Gn(e)).unwrap(),{qodly:s}=t().settings.server;if(a){const{file:i}=a,c=Yg(i,{withExtension:!1,qodly:s}),{editor:l}=pr(c);await n(Pa({file:{name:e.fileName,type:i.type,path:c,editor:l,date:new Date().toISOString()}}))}}),Jo=Q("explorer/createNewNode",async({fileName:e,path:n,parentNode:t},{rejectWithValue:a})=>{try{return{file:await b.createFolder({verb:b.DesignerRequestVerb.CREATE_FOLDER,path:`${n}/${e}`,recursive:!0}),parentNode:t}}catch{return b.toastSubject.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),js=async(e,n={})=>{try{const t=e.path.split(".").at(-1),a=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:mh(t)?"json":"text"}),s={editor:e.editor},i=b.getTypeFromExtension(e.path);i===b.FileFolderType.METHOD&&(s.attributes=b.parseAttributes(a.content),a.content=b.addAttributesToContent(a.content,{}));const{content:c,date:l,ext:d}=a;return n.confirmed===void 0&&(n.confirmed=!0),{date:l,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(d),confirmed:n.confirmed},extra:s,name:e.name,path:e.path,type:i,initialContent:c,content:c}}catch(t){const{data:a}=t;if(a.__ERROR.find(s=>s.errCode===b.ERROR_CODES.FILE_NOT_FOUND))switch(e.path){case b.ROLES_TAB_PATH:{const s={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:b.FileFolderType.ROLES,initialContent:s,content:s}}case b.SETTINGS_TAB_PATH:{const s={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:b.FileFolderType.SETTINGS,initialContent:s,content:s}}}throw t}},Pa=Q("explorer/openFile",async({file:e,inactive:n,isNew:t,flags:a={}},{getState:s,dispatch:i})=>{const{root:{tabs:c},roles:l,debugger:{sessions:d}}=s(),p=c.find(({path:_})=>e.path===_);if(p){const _={...p,extra:{...p==null?void 0:p.extra,editor:e.editor},flags:{...p==null?void 0:p.flags,...a}};return i(Pt(_)),_}if(e.path.startsWith("Debugger")){const _=d.find(E=>`Debugger/${E.threadId}`===e.path);if(_){const{source:{content:E},source:T}=_.currentStackFrame,x={name:e.name,type:b.FileFolderType.DEBUGGER,date:new Date().toISOString(),path:e.path,content:E,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:E,flags:{confirmed:!0},extra:{source:T,editor:e.editor}};return i(Pt(x)),x}}let h=null;try{h=await js(e,a)}catch(_){const{data:E}=_;if(E.__ERROR.find(T=>[b.ERROR_CODES.JSON_MALFORMED,b.ERROR_CODES.JSON_MALFORMED_AT_LINE].includes(T.errCode))){const{confirmed:T}=await i(ar({title:"Corrupt file",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,message:"Open in code editor ?"})).unwrap();if(T){const x=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:"text"}),{content:D,date:P,ext:j}=x;h={date:P,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(j),confirmed:!0},extra:{editor:b.EDITOR.Code},name:e.name,path:e.path,type:b.getTypeFromExtension(e.path),initialContent:D,content:D}}}}return h&&(e.path===b.ROLES_TAB_PATH&&!l.flags.touched?i(Uc({content:h.content,date:h.date})):e.path===b.SETTINGS_TAB_PATH&&i(ks({path:"project",value:h.content})),i((n?Ev:Pt)({...h,isNew:t})),h)}),qc=Q("explorer/openFileAtLine",async({file:e},{getState:n,dispatch:t})=>{const{tabs:a}=n().root,s=a.find(({path:c})=>e.path===c);if(s){const c={...s,extra:{...s==null?void 0:s.extra,editor:e.editor}};return t(Pt(c)),c}const i=await js(e);return t(Pt(i)),i}),zg=Q("explorer/injectContentAtLine",async(e,{getState:n,dispatch:t,rejectWithValue:a})=>{const s=n();e.path.split("/").pop();const c=lt(s.explorer,e.path);if(!c)return a(`Error while trying to inject content in file ${e.path}`);const l=await js({name:c.name,date:c.date||new Date().toISOString(),path:`${c.path}.${c.ext}`,type:b.FileFolderType.CLASS,editor:c.config.editor});return await t(Pt(l)),{...e,path:`${c.path}.${c.ext}`}}),Vg=Q("explorer/openFileAtSelection",async({file:e},{getState:n,dispatch:t})=>{const{tabs:a}=n().root,s=a.find(({path:c})=>e.path===c);if(s){const c={...s,extra:{...s==null?void 0:s.extra,editor:e.editor}};return t(Pt(c)),c}const i=await js(e);return t(Pt(i)),i}),uc=Q("explorer/deleteFile",async e=>{const{name:n,type:t,path:a,flags:s}=e;if(s.error)return{deleted:!0,node:e};const i=a.split("/");return i.pop(),{deleted:await b.dropFile({root:b.FolderRootType.ROOT,type:qg(t),verb:b.DesignerRequestVerb.DROP,name:n,path:i.join("/")}),node:e}}),zP=Q("explorer/deleteFolder",async e=>{const{path:n,flags:t}=e;if(t.error)return{deleted:!0,node:e};const{deleted:a}=await b.removeItem({force:!0,path:n,verb:b.DesignerRequestVerb.REMOVE_ITEM}).catch(console.error)||{deleted:!1};return{deleted:a,node:e}}),cc=Q("explorer/removeFileNode",async(e,{getState:n,dispatch:t})=>{const a=`${e.path}.${e.ext}`;if(await b.removeItem({verb:b.DesignerRequestVerb.REMOVE_ITEM,path:a,force:!0}).catch(console.error),e.path==="Classes/DataStore"&&setTimeout(()=>{t(wn())},Ss),e.ext){const{tabs:s}=n().root,i=s.findIndex(c=>c.path===a);i>=0&&t(Qc(i))}return{deleted:!0,node:e}}),qn=Q("explorer/renameFile",async({file:e,newname:n})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const s=`${a.join("/")}/${e.name}.${e.ext}`,i=`${a.join("/")}/${n}.${e.ext}`;return await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:s,newpath:i}),{old:{...e,path:s},new:{...e,name:n,path:i}}}const t=e.path.split("/");return t.pop(),await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:`${t.join("/")}/${e.name}`,newpath:`${t.join("/")}/${n}`}),{old:e,new:{...e,name:n,path:`${t.join("/")}/${n}`}}}),Da=Q("explorer/relocateNode",async({draggedNode:e,newLocation:n},{rejectWithValue:t})=>{try{await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${n.path}/${e.name}.${e.ext}`})}catch{return t("can't move item")}}),Xo=Q("explorer/duplicateNode",async({node:e,duplicateName:n},{rejectWithValue:t,fulfillWithValue:a,getState:s})=>{const i=e.path.split("/");i.pop();try{const{tabs:c}=s().root,l=c.find(({path:y})=>y===`${e.path}${e.ext?`.${e.ext}`:""}`),d=["4dm","4qm","4qs"].includes(e.ext),{content:p}=l||await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:d?"text":"json"}),h=await b.setFileContent({name:`${n}.${e.ext}`,content:p,path:i.join("/"),asText:d});return a({node:{...h,path:i.join("/")}})}catch{return t("failed to duplicate file")}}),VP=Q("explorer/executeMethod",async({methodName:e,params:n=[],resultingDataSource:t={},namespace:a=""},{rejectWithValue:s})=>{var i,c;try{const d=await window.Method4D.buildMethod({methodName:e,parameters:n,resultingDataSource:t},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return d!=null&&d.__NOTIFICATION?b.toastSubject.next({message:`${((i=d.__NOTIFICATION)==null?void 0:i.message)||""}`,kind:`${((c=d.__NOTIFICATION)==null?void 0:c.type)||"info"}`}):b.toastSubject.next({message:"Method executed Successfully",kind:"message"}),d}catch(l){return b.toastSubject.next({message:l.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),s("can't execute method")}}),KP=Q("files/fetchFiles",async()=>b.getFolders(b.FolderRootType.WEBFORMS,b.FolderRootType.METHODS,b.FolderRootType.CLASSES)),Yc=Q("tabs/renameDatasource",async(e,{dispatch:n,getState:t})=>{var E,T;const a=!!e.datasourceNamespace,{confirmed:s}=await n(ar({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:b.ModalType.CONFIRM,color:b.ModalColor.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(!s)return null;const{autoUpdateReferences:i,datasourceId:c,datasourceNamespace:l,value:d,path:p}=e,h=t();let y=[];if(a){const x=h.sharedDatasources.sources[l]||[];y.push(...x)}else if(p){const x=h.root.tabs.find(b.by("path",p));if(y=(T=(E=x==null?void 0:x.content)==null?void 0:E.metadata)==null?void 0:T.datasources,!y)return null}const _=new RegExp(`^${c}\\b`,"");if(y=y.map(x=>{const D=(b.isObjectDatasource(x)||!b.isSimpleDatasource(x))&&x.from&&_.test(x.from),P=x.events?x.events.map(j=>{var M,k,O,z;switch(j==null?void 0:j.type){case"method":{const H=j;return H.params?{...H,params:H.params.map(Y=>{var te;return{...Y,datasource:(te=Y.datasource)==null?void 0:te.replace(new RegExp(`^${c}`,""),d)}}),returns:(M=H.returns)!=null&&M.datasource?{...H.returns,datasource:(k=H.returns.datasource)==null?void 0:k.replace(new RegExp(`^${c}`,""),d)}:H.returns}:H}case"simple-action":{const H=j;return H.datasource?{...H,datasource:{...H.datasource,name:(O=H.datasource.name)==null?void 0:O.replace(new RegExp(`^${c}`,""),d),from:(z=H.datasource.from)==null?void 0:z.replace(new RegExp(`^${c}`,""),d)}}:H}default:return j}}):x.events;return x.id===c?{...x,id:d,events:P}:D&&x.from?{...x,from:x.from.replace(new RegExp(`^${c}`,""),d),events:P}:{...x,events:P}}),i){const x=a?`${l}:${c}`:`${c}`,D=a?`${l}:${d}`:`${d}`;b.datasourcesSubject.next({path:p??"",action:b.DatasourcesActions.RENAME,old_reference:x,new_reference:D,is_shared:a})}return{path:p,namespace:l,datasources:y}}),zc=Q("tabs/edit-datasource",(e,{getState:n})=>{var i,c;const t=n();let a=[];if(e.namespace)a=t.sharedDatasources.sources[e.namespace];else{const l=t.root.tabs.find(b.by("path",e.path));l&&(a=((c=(i=l.content)==null?void 0:i.metadata)==null?void 0:c.datasources)||[])}return a.map(l=>l.id===e.datasourceId?Object.assign({},l,{[e.propertyKey]:e.value}):l)}),Kg=Q("tabs/fetchChanges",async(e,{getState:n})=>{const a=ta(n()).filter(s=>[b.FileFolderType.METHOD,b.FileFolderType.CLASS].includes(s.type));return b.getFilesInfo(...a.map(s=>{const[i]=s.path.split("/").filter(Boolean);return{name:s.name,type:s.type,root:i,path:"."}}))}),JP=Q("files/saveAll",async(e,{getState:n,dispatch:t})=>{const a=Pc(n());for(const s of a)t(Yn({tab:s}))}),Vc=Q("files/tryCloseTab",async(e,{getState:n,dispatch:t})=>{const{tabs:a}=n().root,s=a.findIndex(c=>c.path===e);if(s===-1)return!1;const i=a[s];if(i!=null&&i.flags.touched){const{confirmed:c}=await t(ar({title:ws(i),message:"Your unsaved changes will be lost. Proceed anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!c)return!1}return t(Qc(s)),i.path===b.ROLES_TAB_PATH&&i.flags.touched&&(async()=>{const l=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:b.ROLES_TAB_PATH,content:!0,as:"json"});t(Uc({content:l.content,date:l.date}))})(),!0}),XP=Q("files/tryCloseOtherTabs",async(e,{getState:n,dispatch:t})=>{const{tabs:a}=n().root;if(a.some(i=>i.path!==e&&i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(yv(e))}),ZP=Q("files/tryCloseAllTabs",async(e,{getState:n,dispatch:t})=>{const{tabs:a}=n().root;if(a.some(i=>i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(vv())}),QP=Q("files/tryCloseRightTabs",async(e,{getState:n,dispatch:t})=>{const{tabs:a}=n().root;let s=!1;for(let i=a.length-1;i>e;i-=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(mv(e))}),eD=Q("files/tryCloseLeftTabs",async(e,{getState:n,dispatch:t})=>{const{tabs:a}=n().root;let s=!1;for(let i=0;i<e;i+=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(bv(e))}),lc=Q("files/reloadTab",async(e,{dispatch:n})=>{if(e.flags.touched){const{confirmed:s}=await n(ar({title:ws(e),message:"Changes made to the file will be lost. Continue?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!s)return}const t=Bh(e.path),a=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:t});if(e.path===b.ROLES_TAB_PATH){const{roles:s,privileges:i}=Ls(a.content);n(Hc({roles:s,privileges:i}))}else if(e.path===b.SETTINGS_TAB_PATH){const{content:s}=a;n(ks({path:"project",value:s}))}else{const{content:s}=a;e.type===b.FileFolderType.WEBFORM?b.webformSubject.next({path:e.path,action:b.WebformActions.RELOAD,payload:s.components}):e.type===b.FileFolderType.MODEL&&zh.next({action:"reload",payload:s})}return a}),Yn=Q("files/saveTab",async({tab:e},{dispatch:n,getState:t})=>{const{path:a,content:s}=e;if(e.type===b.FileFolderType.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const c=await b.getFilesInfo({path:a});if(c.files[0]){const h=new Date(e.date),y=new Date(c.files[0].date);if(h.getTime()<y.getTime()){const{confirmed:_}=await n(ar({title:ws(e),message:"New content has been found on the server. Are you sure you want to continue?",type:b.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!_)return n(gv({path:a,flags:{old:!0}})),null}}const l=await b.saveContent({verb:b.DesignerRequestVerb.SAVE_CONTENT,content:tD(e,t()),path:a});(e.type===b.FileFolderType.CLASS||e.type===b.FileFolderType.MODEL)&&setTimeout(()=>{n(wn())},Ss);const d=(l.modelErrors||[]).map(h=>h.message),p=(l.permissionsErrors||[]).map(h=>h.message);return{...e,content:s,date:l.date,initialContent:s,errors:d.length>0||p.length>0?[{title:"Model errors",messages:d},{title:"Permissions errors",messages:p}]:[]}}),tD=(e,n)=>{switch(!0){case e.path==="settings.json":case e.path===b.SETTINGS_TAB_PATH:return n.settings.project;case e.type===b.FileFolderType.ROLES:return{...e.content,...Ns(n.roles)};case e.type===b.FileFolderType.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},Lp=async e=>{if(e.type===b.FileFolderType.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],t=await b.getFile({root:n,type:e.type,verb:b.DesignerRequestVerb.GET,name:e.name}),a={};t.type===b.FileFolderType.METHOD&&(a.attributes=b.parseAttributes(t.content));const{date:s,name:i,type:c,content:l}=t;return{date:s,flags:{enabled:e.type===b.FileFolderType.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:i,path:e.path,type:c,initialContent:l,content:c===b.FileFolderType.MODEL?vh(l):l}},Jg=Q("files/tryInjectMethod",async({type:e,dataclass:n},{getState:t,dispatch:a})=>{const{root:{tabs:s},settings:{server:{qodly:i}}}=t(),c=b.getFileExtentionFromType("class",i);let l="",d="",p=null;if(!n)l="DataStore",d=`Classes/DataStore.${c}`;else switch(e){case"dataclass":l=n,d=`Classes/${n}.${c}`;break;case"collection":l=`${n}Selection`,d=`Classes/${n}Selection.${c}`;break;case"entity":l=`${n}Entity`,d=`Classes/${n}Entity.${c}`;break;default:return p}const h=s.find(b.by("path",d));if(h)return a(Pt(h)),h;try{p=await Lp({name:l,date:new Date().toISOString(),path:`class/${l}.${c}`,type:b.FileFolderType.CLASS})}catch{n?await a(ic({type:"dataclass",className:n,collectionName:`${n}Selection`,toCreate:e})):await a(ic({type:"model"}))}return p=await Lp({name:l,date:new Date().toISOString(),path:`class/${l}.${c}`,type:b.FileFolderType.CLASS}),p.path=d,a(Pt(p)),p}),rD=Q("roles/open",async(e,{dispatch:n,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path===b.ROLES_TAB_PATH);if(s)return n(Pt(s)),s;n(vs())});function Np(e,n){const{line:t,offset:a,type:s="saved"}=n;e.breakpoints[s].locations.push({line:t}),He.isNumber(a)&&(e.breakpoints[s].offset=a)}function kp(e,n,t,a){e.breakpoints[t].locations=n,He.isNumber(a)&&(e.breakpoints[t].offset=a)}function jp({filePath:e,fileType:n,methodName:t,className:a,ext:s,source:i}){return{filePath:e,fileType:n,methodName:t,className:a,ext:s,source:i,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function Bp(e,n,t){let a=!1;const s=e.map(i=>i[t]!==n[t]?i:(a=!0,{...i,...n}));return a?s:[...s,n]}function Yo(e){return e.map(({label:n})=>({label:n}))}const Xg=nr({name:"debugger",initialState:()=>{var n,t;const{debugger:e={meta:{state:Ir.DETACHED},list:[],sessions:[],expressions:[]}}=Kn();return{meta:{...e.meta,state:((n=e.meta)==null?void 0:n.state)===Ir.ATTACHED?(t=e.meta)==null?void 0:t.state:Ir.DETACHED},list:e.list||[],sessions:e.sessions||[],expressions:e.expressions||[]}},reducers:{addBreakpointDecoration(e,n){const{filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l,breakpoint:d}=n.payload,p=Sn(e.list,t,s,i);if(p)Np(p,d);else{if(a===b.FileFolderType.CLASS&&d.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${i} class.`);const h=jp({filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l});Np(h,d),e.list.push(h)}},removeBreakpointDecoration(e,n){const{filePath:t,methodName:a,line:s,offset:i=0,type:c="saved"}=n.payload;if(t.startsWith("Classes/")){const l=e.list.filter(d=>d.filePath===t);if(l.length>0){const d=s+i;l.forEach(p=>{const h=p.breakpoints[c].offset||0;p.breakpoints[c].locations=p.breakpoints[c].locations.filter(y=>y.line+h!==d),c==="saved"&&(p.breakpoints.draft.locations=p.breakpoints.draft.locations.filter(y=>y.line+h!==d))})}}else{const l=Sn(e.list,t,a);l&&(l.breakpoints[c].locations=l.breakpoints[c].locations.filter(d=>d.line!==s),c==="saved"&&(l.breakpoints.draft.locations=l.breakpoints.draft.locations.filter(d=>d.line!==s)))}},setBreakpointsDecoration(e,n){const{filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l,breakpoints:d,offset:p,type:h="saved",clearDraft:y}=n.payload,_=Sn(e.list,t,s);if(_)kp(_,d,h,p),y&&h!=="draft"&&(_.breakpoints.draft.locations=[]);else{const E=jp({filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l});kp(E,d,h,p),e.list.push(E)}},clearBreakpoints(e,n){const{filePath:t,type:a="saved"}=n.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath===t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearBreakpointsExcept(e,n){const{exceptedFilePath:t,type:a="saved"}=n.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath!==t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearAllBreakpoints(e){e.list=e.list.map(n=>({...n,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}))},setActiveLine(e,n){const{threadId:t,line:a,highlight:s}=n.payload,i=ot(e.sessions,t);i&&(i.activeLine=a,s&&(i.highlightedLines={start:a,end:a}))},addExpression(e,n){const{threadId:t,label:a,save:s}=n.payload,i=ot(e.sessions,t);i&&i.stopped&&(i.expressions=[...i.expressions||[],{label:a}],s&&(e.expressions=Yo(i.expressions)))},removeExpression(e,n){const{threadId:t,index:a,save:s}=n.payload,i=ot(e.sessions,t);i&&(i.expressions=i.expressions.filter((c,l)=>l!==a),s&&(e.expressions=Yo(i.expressions)))},removeAllExpressions(e,n){const{threadId:t,save:a}=n.payload,s=ot(e.sessions,t);s&&(s.expressions=[],a&&(e.expressions=[]))},renameExpression(e,n){const{threadId:t,index:a,replacement:s,save:i}=n.payload,c=ot(e.sessions,t);c&&c.expressions[a]&&(c.expressions[a].label=s,i&&(e.expressions=Yo(c.expressions)))},setExpression(e,n){const{threadId:t,expression:a}=n.payload,s=ot(e.sessions,t);if(s){const i=a.index>=0?a.index:s.expressions.length>0?s.expressions.length-1:0,c=s.expressions[i];c?(c.result=a.result,c.nakedResult=a.nakedResult,c.variablesReference=a.variablesReference||0,c.presentationHint=a.presentationHint):s.expressions.push(a)}},updateExpressionAt(e,n){const{threadId:t,index:a,value:s}=n.payload,i=ot(e.sessions,t);if(i){const c=i.expressions[a];c&&(c.result=`"${s}"`,c.nakedResult=s)}},saveExpressions(e,n){const{expressions:t}=n.payload;e.expressions=Yo(t)},addSession(e,n){const{threadId:t,channelId:a,stackFrames:s,exceptions:i=[]}=n.payload,c=ot(e.sessions,t),l=s[0],{expressions:d=[]}=e;if(c)c.expressions=d;else{const p=Cc(t);e.sessions.push({tabPath:p,threadId:t,channelId:a,stackFrames:s,currentStackFrame:l,exceptions:i,expressions:d,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,n){const{threadId:t,changes:a}=n.payload;e.sessions=e.sessions.map(s=>s.threadId===t?{...s,...a}:s)},removeSession(e,n){const{threadId:t}=n.payload;e.sessions=e.sessions.filter(a=>a.threadId!==t)},removeSessionByIndex(e,n){const t=n.payload;e.sessions.splice(t,1)},setSessions(e,n){const t=n.payload;e.sessions=t},setCallChainVariables(e,n){const{threadId:t,frameId:a,variables:s}=n.payload;e.sessions=e.sessions.map(i=>{var c;return i.threadId===t?{...i,variables:{...i.variables,callchain:Bp((c=i.variables)==null?void 0:c.callchain,{frameId:a,items:s},"frameId")}}:i})},setExpressionVariables(e,n){const{threadId:t,variablesReference:a,variables:s}=n.payload;e.sessions=e.sessions.map(i=>{var c;return i.threadId===t?{...i,variables:{...i.variables,expressions:Bp((c=i.variables)==null?void 0:c.expressions,{variablesReference:a,items:s},"variablesReference")}}:i})},setSourceContent(e,n){const{threadId:t,content:a}=n.payload,s=ot(e.sessions,t);s&&(s.currentStackFrame.source={...s.currentStackFrame.source,content:a})},setDebuggerMeta(e,n){if(n.payload.state===Ir.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:t,error:a={code:null,reason:"",type:ss.SOCKET_ERROR}}=n.payload;if((t||e.meta.state!==Ir.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===ss.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===Ir.DETACHED)return}e.meta.state=n.payload.state}},extraReducers:e=>{e.addCase(Qg.fulfilled,n=>{n.sessions=[]})}}),{addBreakpointDecoration:nD,removeBreakpointDecoration:aD,setBreakpointsDecoration:oD,clearBreakpoints:sD,clearBreakpointsExcept:iD,clearAllBreakpoints:uD,setActiveLine:cD,addExpression:lD,renameExpression:fD,removeExpression:dD,removeAllExpressions:pD,setExpression:hD,updateExpressionAt:gD,saveExpressions:vD,addSession:mD,updateSession:yD,removeSession:bD,removeSessionByIndex:_D,setSessions:Zg,setCallChainVariables:ED,setExpressionVariables:SD,setSourceContent:wD,setDebuggerMeta:TD}=Xg.actions,Qg=Q("files/wipeDebuggerSessions",async(e,{getState:n,dispatch:t})=>{const{sessions:a}=n().debugger;for(const{threadId:s}of a){const i=Cc(s);t(Vc(i))}}),ev=Q("files/removeDebuggerSessionsNotIn",async(e,{getState:n,dispatch:t})=>{const{threadIds:a}=e,{sessions:s}=n().debugger,i=[],c=s.filter(l=>{const d=a.includes(l.threadId);return d||i.push(l.threadId),d});return t(Zg(c)),{staleThreadIds:i}}),Kc=Q("models/fetch",async()=>{try{return(await b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify({verb:b.DesignerRequestVerb.GET_INFO,path:b.MODEL_TAB_PATH,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),ms=Q("models/save",async(e,{getState:n,dispatch:t,rejectWithValue:a})=>{const{tabs:s}=n().root,i=s.find(c=>c.path===b.MODEL_TAB_PATH);if(!i)return a("Error while saving the model");try{const c=await b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return setTimeout(()=>{t(wn())},Ss),{...c,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return a("Error while saving the model")}}),CD=Q("models/open",async(e,{dispatch:n,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path==="models/main");if(s)return n(Pt(s)),s;n(Kc())}),xD=Q("model/rename-dataclass",async(e,{getState:n,dispatch:t})=>{var y,_;const{dataclassId:a,selectionId:s,name:i}=e;let c=n();const l=c.explorer.find(E=>E.path===b.FolderRootPath.CLASSES);if(!l)throw new Error("Classes folder was not found!");await t(_r(l.path)),c=n();const d={class:{found:!1,newNameTaken:!1,file:null,filename_update:i},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Selection`}};(_=(y=c.explorer.find(E=>E.path===b.FolderRootPath.CLASSES))==null?void 0:y.children)==null||_.forEach(E=>{E.name===d.class.filename_update&&(d.class.newNameTaken=!0),E.name===d.entity.filename_update&&(d.entity.newNameTaken=!0),E.name===d.selection.filename_update&&(d.selection.newNameTaken=!0),E.name===a?(d.class.found=!0,d.class.file=E):E.name===`${a}Entity`?(d.entity.found=!0,d.entity.file=E):E.name===s&&(d.selection.found=!0,d.selection.file=E)});const p=Object.entries(d).reduce((E,T)=>{const[x,D]=T;return D.found?D.newNameTaken?[...E,{type:"error",message:`Cannot rename ${x} file to ${D.filename_update} because it already exists. The existing file will be used instead!`}]:E:[...E,{type:"warning",message:`${a} ${x} file was not found`}]},[]);p.length>0&&t(ar({message:"The following errors were encountered during dataclass rename:",views:{tips:p}}));const h=Object.values(d).filter(E=>E.found&&E.file&&!E.newNameTaken);await Promise.all(h.map(async E=>await t(qn({file:E.file,newname:E.filename_update})))),h.length>0&&t(_r("Classes"))}),Na={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},RD={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Na.DATACLASS_DELETE]:!0,[Na.DATACLASS_DRAGGABLE]:!0}},tv=nr({name:"Models",initialState:RD,reducers:{setModelFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(Kc.fulfilled,(n,t)=>{var c;const a={},s={},i=t.payload.extraProperties||{};(c=t.payload.dataClasses)==null||c.forEach(l=>{a[l.name]=l,s[l.collectionName]=l}),n.draft.dataClasses=a,n.draft.collections=s,n.draft.extraProperties=i,n.model.dataClasses=a,n.model.collections=s,n.model.extraProperties=i}),e.addCase(ms.pending,()=>{}).addCase(ms.fulfilled,(n,t)=>{const a={},s={},i=t.payload.content.extraProperties||{};t.payload.content.dataClasses.forEach(c=>{a[c.name]=c,s[c.collectionName]=c}),n.draft.dataClasses=a,n.draft.collections=s,n.draft.extraProperties=i,n.model.dataClasses=a,n.model.collections=s,n.model.extraProperties=i})}}),{setModelFlag:OD}=tv.actions;var rv=(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))(rv||{}),Bs=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Bs||{});const AD=e=>["string","uuid","number","long"].includes(e.type),PD=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],DD=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],ID=[{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"}],FD=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],$D=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],MD=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],LD=(e,n)=>({toJSON:!0,extraProperties:n,dataClasses:e.map(t=>{var a;return{...t.data,extraProperties:{position:{x:t.position.x,y:t.position.y},panelColor:(a=t.data.extraProperties)==null?void 0:a.panelColor}}})});function ND(e,n,t){const a=e;let s=0;for(;t[`${a}${s||""}`];)s++;return`${a}${s||""}`}const nv=e=>e.kind===Bs.RELATEDENTITY,av=e=>e.kind===Bs.RELATEDENTITIES,kD=e=>av(e)||nv(e),jD=()=>kr(e=>e.model.draft.dataClasses),BD=()=>kr(e=>e.model.draft.collections),WD=e=>kr(n=>n.model.draft.dataClasses[e]),UD=(e,n)=>kr(t=>t.model.draft.dataClasses[e].attributes.find(b.by("name",n))),HD=()=>kr(e=>e.model.draft.extraProperties),GD=()=>{const e=kr(s=>s.model.flags),n=s=>s in e?e[s]:void 0,t=n(Na.DATACLASS_DELETE),a=n(Na.DATACLASS_DRAGGABLE);return{deleteDataclass:t,draggableDataclass:a,flags:e}},qD=tv.reducer;function Mu(e,n){const t=e.tabs.find(({path:a})=>a===b.SETTINGS_TAB_PATH);t&&(t.flags.touched=n)}const ov={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},sv={[ov.SIDEBAR_SECTION_RESIZABLE]:!0},iv=nr({name:"webforms",initialState:()=>{const{webforms:e}=Kn();return{...e,templates:{data:[],selectedGroup:""},datasources:{...wc.webforms.datasources,...e==null?void 0:e.datasources},flags:sv}},reducers:{toggleInspector:(e,n)=>{const{type:t}=n.payload;e.inspector[t].active=!e.inspector[t].active,e.inspector[t].active||(e.inspector[t].data=void 0)},inspect:(e,n)=>{const{type:t,data:a}=n.payload;e.inspector[t].active&&(e.inspector[t].data=a)},addComponent:(e,n)=>{e.components.push(n.payload)},editComponent:(e,n)=>{const{id:t,changes:a}=n.payload;e.components=e.components.map(s=>s.id===t?{...s,...a}:s)},removeComponent:(e,n)=>{const{payload:t}=n,a=e.components.findIndex(s=>s.id===t);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:t,components:a}=n.payload,s=e.templates.data.find(i=>i.group===t);s&&(s.components=a)},setDatasourcesTheme:(e,n)=>{e.datasources.theme=n.payload},setWebformsFlag(e,n){e.flags={...e.flags,...n.payload}}},extraReducers(e){e.addCase(pv.fulfilled,(n,t)=>{n.components=t.payload})}}),{toggleInspector:YD,inspect:zD,addComponent:uv,editComponent:cv,removeComponent:lv,setSelectedGroup:VD,setTemplatesData:fv,setTemplateData:dv,setDatasourcesTheme:KD,setWebformsFlag:JD}=iv.actions,XD=iv.reducer,Jc=He.curry((e,n)=>{var s,i;const t={...n.sharedDatasources.sources},a=(i=((s=n.root.tabs.find(b.by("path",e)))==null?void 0:s.content).metadata)==null?void 0:i.datasources;return a&&(t[e]=a),He.cloneDeep(t)}),ZD=Q("webforms/fetchTemplates",async(e,{dispatch:n,getState:t})=>{const{data:a}=t().webforms.templates,s=t().settings.session["studio.tipsBaseUrl"]||"";if(!He.isEmpty(a))return a;try{const c=await(await fetch(`${s}/build/index.json?t=${Date.now()}`)).json();return n(fv(c)),c}catch{return[]}}),QD=Q("webforms/fetchTemplate",async({name:e},{dispatch:n,getState:t})=>{const{data:a}=t().webforms.templates,s=a.find(i=>i.group===e);if(s&&!He.isEmpty(s.components))return s.components;try{const c=await(await fetch(`${s==null?void 0:s.link}?t=${Date.now()}`)).json();return n(dv({group:e,components:c})),c}catch{return[]}}),pv=Q("webforms/fetchCraftedComponents",async(e,{rejectWithValue:n})=>{try{return(await b.getNodeInfo({path:"WebForms/crafted_components.json",verb:b.DesignerRequestVerb.GET_INFO,content:!0,as:"json"})).content}catch{return n("Error while loading the crafted components")}}),eI=Q("webforms/addCraftedComponent",async(e,{dispatch:n,rejectWithValue:t,getState:a})=>{try{n(uv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while adding the crafted component")}}),tI=Q("webforms/editCraftedComponent",async(e,{dispatch:n,rejectWithValue:t,getState:a})=>{try{n(cv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while editing the crafted component")}}),rI=Q("webforms/removeCraftedComponent",async(e,{dispatch:n,rejectWithValue:t,getState:a})=>{try{n(lv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while removing the crafted component")}}),Xc=Q("datasources/add-datasource",async(e,{getState:n,rejectWithValue:t})=>{var a,s;try{const i=n(),c=e.datasource,l=!!c.namespace,d=[];if(l){const p={...i.sharedDatasources.sources,[c.namespace]:[...i.sharedDatasources.sources[c.namespace],c]};d.push(...p[c.namespace]),await b.setSharedSources(p)}else(((s=(a=i.root.tabs.find(b.by("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]).push(c);return{list:d,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),t("Error while adding the datasource")}}),Zc=Q("datasources/edit-datasource",async(e,{getState:n,rejectWithValue:t})=>{try{const{namespace:a,path:s}=e,i=n(),c=!!e.namespace,l=Jc(s,i);let d=He.defaultTo(l[a||s],[]);return d=d.map(p=>p.id===e.id?{...p,[e.property]:e.value}:p),c&&await b.setSharedSources({...i.sharedDatasources.sources,[e.namespace]:d}),{list:d,path:e.path,namespace:e.namespace}}catch{t(`Error while editing datasource ${e.id}`)}}),nI=e=>e.type===zn.fulfilled.type,zn=Q("datasources/rename-datasource",async(e,{getState:n,rejectWithValue:t})=>{try{const a=n(),s=!!e.namespace,i=e.namespace||e.path,c=Jc(e.path,a),l=He.defaultTo(c[i],[]),d=new RegExp(`^${e.id}\\b`,"");if(l.forEach(p=>{var y;const h=(b.isObjectDatasource(p)||!b.isSimpleDatasource(p))&&p.from&&d.test(p.from);e.updateRefs&&((y=p.events)==null||y.forEach(_=>{var E,T,x,D,P;switch(_.type){case"method":{const j=_;j.params.forEach(M=>{M.datasource&&Object.assign(M,{datasource:M.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),j.returns&&Object.assign(j.returns,{datasource:(T=(E=j.returns)==null?void 0:E.datasource)==null?void 0:T.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const j=_;j.datasource&&Object.assign(j.datasource,{name:(x=j.datasource.name)==null?void 0:x.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(D=j.datasource.from)==null?void 0:D.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(P=j.datasource.target)==null?void 0:P.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),p.id===e.id?p.id=e.new_name:h&&p.from&&(p.from=p.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const p=b.getDatasourceId({id:e.id,namespace:e.namespace}),h=b.getDatasourceId({id:e.new_name,namespace:e.namespace});b.datasourcesSubject.next({path:e.path??"",action:b.DatasourcesActions.RENAME,old_reference:p,new_reference:h,is_shared:s})}return s&&await b.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),Ia=Q("datasources/delete-datasource",async(e,{getState:n,rejectWithValue:t})=>{try{const a=n(),s=!!e.namespace,i=e.namespace||e.path,l=Jc(e.path,a)[i].filter(b.outById(e.id));return s&&await b.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while removing datasource ${e.id}`)}}),ka=nr({name:"root",initialState:()=>{const e=Kn();return{filesLoading:!1,tabs:e.tabs||[],activeTab:e.activeTab,recent:e.recent||[]}},reducers:{setPanelState(e,n){const{path:t,...a}=n.payload;e.tabs.forEach(s=>{s.path===t&&(s.view||(s.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(s.view.panel,a))})},openSettingsTab(e){const n={date:new Date().toISOString(),flags:{confirmed:!0},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:b.SETTINGS_TAB_PATH,type:b.FileFolderType.SETTINGS,initialContent:{},content:{}};let t=e.tabs.find(a=>a.path===n.path);if(t||(e.tabs.push(n),t=e.tabs[e.tabs.length-1]),e.activeTab!==n.path){const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=n.path,t.weight=((a==null?void 0:a.weight)||0)+1}},addDataSource(e,n){var i;const{payload:{path:t,datasourceDef:a}}=n,s=e.tabs.find(c=>c.path===t);s&&(s.content.metadata.datasources=s.content.metadata.datasources||[],(i=s.content.metadata.datasources)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.datasources=[...s.content.metadata.datasources,{...a,events:[]}],s.flags={...s.flags,touched:!0,confirmed:!0}))},addWebformState(e,n){var i;const{payload:{path:t,stateDef:a}}=n,s=e.tabs.find(c=>c.path===t);s&&(s.content.metadata.states=s.content.metadata.states||[$c],(i=s.content.metadata.states)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.states=[...s.content.metadata.states,a],s.flags={...s.flags,touched:!0,confirmed:!0}))},removeWebformState(e,n){const{path:t,id:a}=n.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:yh(s.content,a)}:s)},editWebformState(e,n){const{path:t,state:a}=n.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,states:s.content.metadata.states.map(i=>i.id===a.id?a:i)}}}:s)},removeDataSource(e,n){const{path:t,datasourceID:a}=n.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,datasources:s.content.metadata.datasources.filter(i=>i.id!==a)}}}:s)},setDataSources(e,n){const{payload:{path:t,datasourceArr:a}}=n;e.tabs=e.tabs.map(s=>{var i;return s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...(i=s.content)==null?void 0:i.metadata,datasources:a}}}:s})},setTabs(e,n){e.tabs=n.payload},closeTab(e,n){const t=n.payload;e.tabs.splice(t,1);const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=(a==null?void 0:a.path)||""},closeOthers(e,n){e.tabs=e.tabs.filter(t=>t.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:t}})=>t);const n=e.tabs.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null);e.activeTab=(n==null?void 0:n.path)||""},confirmTab(e,n){const t=e.tabs.find(({path:a})=>a===n.payload);t&&(t.flags.confirmed||ka.caseReducers.setTabFlags(e,{type:n.type,payload:{path:n.payload,flags:{confirmed:!0}}}))},selectTab(e,n){const t=e.tabs.find(({path:s})=>s===n.payload);if(!t||e.activeTab===n.payload)return;const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);t.weight=a?(a.weight||0)+1:1,e.activeTab=n.payload},openTabUnselected(e,n){const t=n.payload;let a=e.tabs.find(({path:i})=>t.path===i);a||(e.tabs.push(t),a=e.tabs[e.tabs.length-1]);const s=e.tabs.reduce((i,c)=>(c==null?void 0:c.weight)>((i==null?void 0:i.weight)||0)?c:i,null);a.weight=s?(s.weight||0)+1:1,a.extra={...a.extra,...t.extra}},selectTabByReference(e,n){const t=[b.FileFolderType.DEBUGGER],{isNew:a,...s}=n.payload;let i=s,c=e.tabs.find(({path:l})=>i.path===l);if((t.includes(i.type)||c!=null&&c.flags.confirmed)&&(i={...i,flags:{...i.flags,confirmed:!0}}),!c){const l=e.tabs.findIndex(({flags:{confirmed:d}})=>d===!1);l!==-1&&!t.includes(i.type)&&!a?e.activeTab===e.tabs[l].path?(e.tabs[l]=i,c=e.tabs[l]):(e.tabs.push(i),c=e.tabs[e.tabs.length-1],e.tabs.splice(l,1)):(e.tabs.push(i),c=e.tabs[e.tabs.length-1])}if(e.activeTab!==i.path){const l=e.tabs.reduce((d,p)=>(p==null?void 0:p.weight)>((d==null?void 0:d.weight)||0)?p:d,null);e.activeTab=i.path,c.weight=((l==null?void 0:l.weight)||0)+1}c.extra={...c.extra,...i.extra},c.flags={...c.flags||{},...i.flags||{}}},setContent(e,n){const{path:t,content:a,contentPath:s}=n.payload;e.tabs=e.tabs.map(i=>{if(i.path!==t)return i;let c=!1,l=i.flags.confirmed;if(typeof a=="string")c=i.initialContent!==a,l=!l&&c?!0:l;else{const d=JSON.stringify(He.get(i.initialContent,s||"",i.initialContent)),p=JSON.stringify(He.get(a,s||"",a));c=d!==p,l=!l&&c?!0:l}return a&&typeof a=="object"&&(s?He.set(i.content,s,a):i.content=a),typeof a=="string"&&(i.content=a),{...i,flags:{...i.flags,touched:c,confirmed:l}}})},setTabFlags(e,n){const{path:t,flags:a}=n.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,...a}}:s)},setTabsFlags(e,n){const{tabs:t,flags:a}=n.payload;e.tabs=e.tabs.map(s=>t.includes(s.path)?{...s,flags:{...s.flags,...a}}:s)},setTabExtra(e,n){const{path:t,extra:a,flags:s}=n.payload;e.tabs=e.tabs.map(i=>i.path===t?{...i,extra:{...i.extra,...a},flags:s?{...i.flags,...s}:i.flags}:i)},addWebFormStyles(e,n){const{path:t,styles:a=[]}=n.payload,s=e.tabs.find(i=>i.path===t);if(s){const i=s.content.metadata.styles.map(({name:l})=>l),c=a.filter(({name:l})=>!i.includes(l));s.content.metadata.styles=[...s.content.metadata.styles,...c].map(({scope:l,...d})=>({...d}))}},changeTabEditor(e,n){return e.tabs=e.tabs.map(t=>t.path===n.payload.path?n.payload:t),e}},extraReducers:e=>{e.addCase(ac,(n,t)=>{if(t.payload.settingsKey==="studio.enablePreview"&&t.payload.value===!1){const a=n.tabs.find(({flags:{confirmed:s}})=>s===!1);a&&ka.caseReducers.setTabFlags(n,{type:"",payload:{path:a.path,flags:{confirmed:!0}}})}}),e.addCase(zg.fulfilled,(n,t)=>{if(!t.payload)return;const{content:a,line:s,path:i}=t.payload,c=n.tabs.find(l=>l.path===i);if(c&&typeof c.content=="string"){const l=c.content.trim().split(`
99
+ `}}};e.type==="dataclass"&&!e.toCreate?p=[{...h("dataclass")},{...h("collection")},{...h("entity")}]:e.type==="dataclass"&&e.toCreate?p=[{...h(e.toCreate)}]:p=[{...h("model")}],p=p.filter(_=>!d.find(({name:E,ext:T})=>E===_.name&&T===(i?"4qs":"4dm"))),await Promise.all(p.map(async({name:_,content:E})=>{await r(qn({type:b.FileFolderType.CLASS,path:s,fileName:_,parentNode:c,content:E,qodly:a.settings.server.qodly}))})),await r(_r(s))}),_r=Q("explorer/fetchFolderContent",async(e,{rejectWithValue:r})=>{try{return(await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e})).map(a=>{const s=`${e}/${a.name}`,{editor:i,supportedEditors:c}=pr(`${s}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:s,ext:a.ext,config:a.type==="folder"?{}:{editor:i,supportedEditors:c}}})}catch{return r("Failed loading file content please Reload")}},{getPendingMeta:()=>{}}),Aa=Q("explorer/fetchFolderContentWithoutExpanding",async(e,{rejectWithValue:r})=>{try{return(await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e})).map(a=>{const s=`${e}/${a.name}`,{editor:i,supportedEditors:c}=pr(`${s}${a.ext?`.${a.ext.toLowerCase()}`:""}`);return{name:a.name,size:a.size,type:a.type,date:`${a.date}`,flags:{},error:null,path:s,ext:a.ext,config:a.type==="folder"?{}:{editor:i,supportedEditors:c}}})}catch{return r("Failed loading file content please Reload")}},{getPendingMeta:()=>{}});function zP(e){const r=e.split(".");return r.pop(),{name:r.join("."),ext:e.split(".")[e.split(".").length-1]}}const VP=Q("explorer/uploadFile",async e=>{const r=e.type.includes("image/")?"$rawPict=true":"$binary=true";try{const t=await fetch(`/rest/$upload?${r}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return{status:t.status,data:await t.json()}}catch{return{status:500,data:null}}}),KP=Q("explorer/uploadFile",async({file:e,path:r,parentNode:t},{dispatch:a})=>{const{editor:s,supportedEditors:i}=pr(r),{name:c,ext:l}=zP(e.name);a(Gg({parent:t,child:{name:c,path:`${r}/${e.name}?t=${Date.now()}`,type:e.type,error:null,flags:{loading:!0},config:{editor:s,supportedEditors:i},ext:l}}));try{const d=await fetch(`/rest/$upload?$sharedFolder=true&$filename=${e.name}&$path=${r}`,{method:"POST",headers:{"Content-Type":e.type},body:e});return d.status>=300?(a(sc({parent:t,child:{name:c,path:`${r}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),d.status!==413&&b.toastSubject.next({message:"error uploading file",kind:"danger"})):await a(_r(t.path)),{status:d.status,fileName:e.name}}catch{return a(sc({parent:t,child:{name:c,path:`${r}/${e.name}`,type:e.type,error:{message:"error uploading file"},flags:{},config:{editor:s,supportedEditors:i},ext:l}})),b.toastSubject.next({message:"error uploading file",kind:"danger"}),{status:500,fileName:e.name}}}),qn=Q("explorer/createNewFile",async({fileName:e,type:r,path:t,parentNode:a,content:s},{dispatch:i,rejectWithValue:c,getState:l})=>{const{server:{qodly:d},project:p}=l().settings;try{const h=await b.setFileContent({name:Yg(e,r,d),content:s||qg(r,p),path:t,asText:[b.FileFolderType.CLASS,b.FileFolderType.METHOD].includes(r)});return a.error&&(a.flags.expanded?await i(_r(a.path)):await i(Aa(a.path))),{qodly:d,file:h,parentNode:a}}catch{return c("failed to create folder")}});function Vg(e,r){const{qodly:t=!0,withExtension:a=!0}=r||{},s=b.getFileExtentionFromType(e.type,t);let i="";switch(e.type){case b.FileFolderType.WEBFORM:i=`${b.FolderRootPath.WEBFORMS}/${e.name}`;break;case b.FileFolderType.METHOD:i=`${b.FolderRootPath.METHODS}/${e.name}`;break;case b.FileFolderType.CLASS:i=`${b.FolderRootPath.CLASSES}/${e.name}`;break;default:return""}return`${i}${a?`.${s}`:""}`}const JP=Q("explorer/createNewFileAndOpen",async(e,{dispatch:r,getState:t})=>{const a=await r(qn(e)).unwrap(),{qodly:s}=t().settings.server;if(a){const{file:i}=a,c=Vg(i,{withExtension:!1,qodly:s}),{editor:l}=pr(c);await r(Pa({file:{name:e.fileName,type:i.type,path:c,editor:l,date:new Date().toISOString()}}))}}),Jo=Q("explorer/createNewNode",async({fileName:e,path:r,parentNode:t},{rejectWithValue:a})=>{try{return{file:await b.createFolder({verb:b.DesignerRequestVerb.CREATE_FOLDER,path:`${r}/${e}`,recursive:!0}),parentNode:t}}catch{return b.toastSubject.next({message:"failed to create folder",kind:"danger"}),a("failed to create folder")}}),js=async(e,r={})=>{try{const t=e.path.split(".").at(-1),a=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:mh(t)?"json":"text"}),s={editor:e.editor},i=b.getTypeFromExtension(e.path);i===b.FileFolderType.METHOD&&(s.attributes=b.parseAttributes(a.content),a.content=b.addAttributesToContent(a.content,{}));const{content:c,date:l,ext:d}=a;return r.confirmed===void 0&&(r.confirmed=!0),{date:l,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(d),confirmed:r.confirmed},extra:s,name:e.name,path:e.path,type:i,initialContent:c,content:c,history:{stack:[],active:-1,locked:!1}}}catch(t){const{data:a}=t;if(a.__ERROR.find(s=>s.errCode===b.ERROR_CODES.FILE_NOT_FOUND))switch(e.path){case b.ROLES_TAB_PATH:{const s={permissions:{allowed:[]},privileges:[],roles:[]};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:roles"}},name:"Roles & Privileges",path:e.path,type:b.FileFolderType.ROLES,initialContent:s,content:s}}case b.SETTINGS_TAB_PATH:{const s={};return{date:new Date().toISOString(),flags:{},extra:{editor:{key:"editors:settings"}},name:"Settings",path:e.path,type:b.FileFolderType.SETTINGS,initialContent:s,content:s}}}throw t}},Pa=Q("explorer/openFile",async({file:e,inactive:r,isNew:t,flags:a={}},{getState:s,dispatch:i})=>{const{root:{tabs:c},roles:l,debugger:{sessions:d}}=s(),p=c.find(({path:_})=>e.path===_);if(p){const _={...p,extra:{...p==null?void 0:p.extra,editor:e.editor},flags:{...p==null?void 0:p.flags,...a}};return i(Pt(_)),_}if(e.path.startsWith("Debugger")){const _=d.find(E=>`Debugger/${E.threadId}`===e.path);if(_){const{source:{content:E},source:T}=_.currentStackFrame,x={name:e.name,type:b.FileFolderType.DEBUGGER,date:new Date().toISOString(),path:e.path,content:E,view:{panel:{isOpen:!1,type:"",current:""}},initialContent:E,flags:{confirmed:!0},extra:{source:T,editor:e.editor}};return i(Pt(x)),x}}let h=null;try{h=await js(e,a)}catch(_){const{data:E}=_;if(E.__ERROR.find(T=>[b.ERROR_CODES.JSON_MALFORMED,b.ERROR_CODES.JSON_MALFORMED_AT_LINE].includes(T.errCode))){const{confirmed:T}=await i(ar({title:"Corrupt file",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,message:"Open in code editor ?"})).unwrap();if(T){const x=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:"text"}),{content:D,date:P,ext:j}=x;h={date:P,view:{panel:{isOpen:!1,type:"",current:""}},flags:{enabled:["WebForm","MForm"].includes(j),confirmed:!0},extra:{editor:b.EDITOR.Code},name:e.name,path:e.path,type:b.getTypeFromExtension(e.path),initialContent:D,content:D,history:{stack:[],active:-1,locked:!1}}}}}return h&&(e.path===b.ROLES_TAB_PATH&&!l.flags.touched?i(Uc({content:h.content,date:h.date})):e.path===b.SETTINGS_TAB_PATH&&i(ks({path:"project",value:h.content})),i((r?Sv:Pt)({...h,isNew:t})),h)}),qc=Q("explorer/openFileAtLine",async({file:e},{getState:r,dispatch:t})=>{const{tabs:a}=r().root,s=a.find(({path:c})=>e.path===c);if(s){const c={...s,extra:{...s==null?void 0:s.extra,editor:e.editor}};return t(Pt(c)),c}const i=await js(e);return t(Pt(i)),i}),Kg=Q("explorer/injectContentAtLine",async(e,{getState:r,dispatch:t,rejectWithValue:a})=>{const s=r();e.path.split("/").pop();const c=lt(s.explorer,e.path);if(!c)return a(`Error while trying to inject content in file ${e.path}`);const l=await js({name:c.name,date:c.date||new Date().toISOString(),path:`${c.path}.${c.ext}`,type:b.FileFolderType.CLASS,editor:c.config.editor});return await t(Pt(l)),{...e,path:`${c.path}.${c.ext}`}}),Jg=Q("explorer/openFileAtSelection",async({file:e},{getState:r,dispatch:t})=>{const{tabs:a}=r().root,s=a.find(({path:c})=>e.path===c);if(s){const c={...s,extra:{...s==null?void 0:s.extra,editor:e.editor}};return t(Pt(c)),c}const i=await js(e);return t(Pt(i)),i}),uc=Q("explorer/deleteFile",async e=>{const{name:r,type:t,path:a,flags:s}=e;if(s.error)return{deleted:!0,node:e};const i=a.split("/");return i.pop(),{deleted:await b.dropFile({root:b.FolderRootType.ROOT,type:zg(t),verb:b.DesignerRequestVerb.DROP,name:r,path:i.join("/")}),node:e}}),XP=Q("explorer/deleteFolder",async e=>{const{path:r,flags:t}=e;if(t.error)return{deleted:!0,node:e};const{deleted:a}=await b.removeItem({force:!0,path:r,verb:b.DesignerRequestVerb.REMOVE_ITEM}).catch(console.error)||{deleted:!1};return{deleted:a,node:e}}),cc=Q("explorer/removeFileNode",async(e,{getState:r,dispatch:t})=>{const a=`${e.path}.${e.ext}`;if(await b.removeItem({verb:b.DesignerRequestVerb.REMOVE_ITEM,path:a,force:!0}).catch(console.error),e.path==="Classes/DataStore"&&setTimeout(()=>{t(wn())},Ss),e.ext){const{tabs:s}=r().root,i=s.findIndex(c=>c.path===a);i>=0&&t(Qc(i))}return{deleted:!0,node:e}}),Yn=Q("explorer/renameFile",async({file:e,newname:r})=>{if(e.type!=="folder"){const a=e.path.split("/");a.pop();const s=`${a.join("/")}/${e.name}.${e.ext}`,i=`${a.join("/")}/${r}.${e.ext}`;return await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:s,newpath:i}),{old:{...e,path:s},new:{...e,name:r,path:i}}}const t=e.path.split("/");return t.pop(),await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:`${t.join("/")}/${e.name}`,newpath:`${t.join("/")}/${r}`}),{old:e,new:{...e,name:r,path:`${t.join("/")}/${r}`}}}),Da=Q("explorer/relocateNode",async({draggedNode:e,newLocation:r},{rejectWithValue:t})=>{try{await b.moveItem({verb:b.DesignerRequestVerb.MOVE_ITEM,path:`${e.path}.${e.ext}`,newpath:`${r.path}/${e.name}.${e.ext}`})}catch{return t("can't move item")}}),Xo=Q("explorer/duplicateNode",async({node:e,duplicateName:r},{rejectWithValue:t,fulfillWithValue:a,getState:s})=>{const i=e.path.split("/");i.pop();try{const{tabs:c}=s().root,l=c.find(({path:m})=>m===`${e.path}${e.ext?`.${e.ext}`:""}`),d=["4dm","4qm","4qs"].includes(e.ext),{content:p}=l||await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:`${e.path}.${e.ext}`,content:!0,as:d?"text":"json"}),h=await b.setFileContent({name:`${r}.${e.ext}`,content:p,path:i.join("/"),asText:d});return a({node:{...h,path:i.join("/")}})}catch{return t("failed to duplicate file")}}),ZP=Q("explorer/executeMethod",async({methodName:e,params:r=[],resultingDataSource:t={},namespace:a=""},{rejectWithValue:s})=>{var i,c;try{const d=await window.Method4D.buildMethod({methodName:e,parameters:r,resultingDataSource:t},{namespace:a},null).callServerSide({id:"",serverSideRef:""},"onclick",{});return d!=null&&d.__NOTIFICATION?b.toastSubject.next({message:`${((i=d.__NOTIFICATION)==null?void 0:i.message)||""}`,kind:`${((c=d.__NOTIFICATION)==null?void 0:c.type)||"info"}`}):b.toastSubject.next({message:"Method executed Successfully",kind:"message"}),d}catch(l){return b.toastSubject.next({message:l.message||`Error executing the method "**${e}**"`,kind:"danger",markdown:!0}),s("can't execute method")}}),QP=Q("files/fetchFiles",async()=>b.getFolders(b.FolderRootType.WEBFORMS,b.FolderRootType.METHODS,b.FolderRootType.CLASSES)),Yc=Q("tabs/renameDatasource",async(e,{dispatch:r,getState:t})=>{var E,T;const a=!!e.datasourceNamespace,{confirmed:s}=await r(ar({message:"Are you sure you want to rename the datasource?",title:"Rename Datasource",type:b.ModalType.CONFIRM,color:b.ModalColor.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(!s)return null;const{autoUpdateReferences:i,datasourceId:c,datasourceNamespace:l,value:d,path:p}=e,h=t();let m=[];if(a){const x=h.sharedDatasources.sources[l]||[];m.push(...x)}else if(p){const x=h.root.tabs.find(b.by("path",p));if(m=(T=(E=x==null?void 0:x.content)==null?void 0:E.metadata)==null?void 0:T.datasources,!m)return null}const _=new RegExp(`^${c}\\b`,"");if(m=m.map(x=>{const D=(b.isObjectDatasource(x)||!b.isSimpleDatasource(x))&&x.from&&_.test(x.from),P=x.events?x.events.map(j=>{var M,k,O,z;switch(j==null?void 0:j.type){case"method":{const G=j;return G.params?{...G,params:G.params.map(Y=>{var te;return{...Y,datasource:(te=Y.datasource)==null?void 0:te.replace(new RegExp(`^${c}`,""),d)}}),returns:(M=G.returns)!=null&&M.datasource?{...G.returns,datasource:(k=G.returns.datasource)==null?void 0:k.replace(new RegExp(`^${c}`,""),d)}:G.returns}:G}case"simple-action":{const G=j;return G.datasource?{...G,datasource:{...G.datasource,name:(O=G.datasource.name)==null?void 0:O.replace(new RegExp(`^${c}`,""),d),from:(z=G.datasource.from)==null?void 0:z.replace(new RegExp(`^${c}`,""),d)}}:G}default:return j}}):x.events;return x.id===c?{...x,id:d,events:P}:D&&x.from?{...x,from:x.from.replace(new RegExp(`^${c}`,""),d),events:P}:{...x,events:P}}),i){const x=a?`${l}:${c}`:`${c}`,D=a?`${l}:${d}`:`${d}`;b.datasourcesSubject.next({path:p??"",action:b.DatasourcesActions.RENAME,old_reference:x,new_reference:D,is_shared:a})}return{path:p,namespace:l,datasources:m}}),zc=Q("tabs/edit-datasource",(e,{getState:r})=>{var i,c;const t=r();let a=[];if(e.namespace)a=t.sharedDatasources.sources[e.namespace];else{const l=t.root.tabs.find(b.by("path",e.path));l&&(a=((c=(i=l.content)==null?void 0:i.metadata)==null?void 0:c.datasources)||[])}return a.map(l=>l.id===e.datasourceId?Object.assign({},l,{[e.propertyKey]:e.value}):l)}),Xg=Q("tabs/fetchChanges",async(e,{getState:r})=>{const a=ra(r()).filter(s=>[b.FileFolderType.METHOD,b.FileFolderType.CLASS].includes(s.type));return b.getFilesInfo(...a.map(s=>{const[i]=s.path.split("/").filter(Boolean);return{name:s.name,type:s.type,root:i,path:"."}}))}),eD=Q("files/saveAll",async(e,{getState:r,dispatch:t})=>{const a=Pc(r());for(const s of a)t(zn({tab:s}))}),Vc=Q("files/tryCloseTab",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root,s=a.findIndex(c=>c.path===e);if(s===-1)return!1;const i=a[s];if(i!=null&&i.flags.touched){const{confirmed:c}=await t(ar({title:ws(i),message:"Your unsaved changes will be lost. Proceed anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!c)return!1}return t(Qc(s)),i.path===b.ROLES_TAB_PATH&&i.flags.touched&&(async()=>{const l=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:b.ROLES_TAB_PATH,content:!0,as:"json"});t(Uc({content:l.content,date:l.date}))})(),!0}),tD=Q("files/tryCloseOtherTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;if(a.some(i=>i.path!==e&&i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing other tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(bv(e))}),rD=Q("files/tryCloseAllTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;if(a.some(i=>i.flags.touched===!0)){const{confirmed:i}=await t(ar({title:"Closing all tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(yv())}),nD=Q("files/tryCloseRightTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;let s=!1;for(let i=a.length-1;i>e;i-=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing right tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(mv(e))}),aD=Q("files/tryCloseLeftTabs",async(e,{getState:r,dispatch:t})=>{const{tabs:a}=r().root;let s=!1;for(let i=0;i<e;i+=1)if(a[i].flags.touched){s=!0;break}if(s){const{confirmed:i}=await t(ar({title:"Closing left tabs",message:"Your changes will be lost if you do not save them. Close anyway?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!i)return}t(_v(e))}),lc=Q("files/reloadTab",async(e,{dispatch:r})=>{if(e.flags.touched){const{confirmed:s}=await r(ar({title:ws(e),message:"Changes made to the file will be lost. Continue?",type:b.ModalType.CONFIRM,color:b.ModalColor.WARNING,icon:"FdWarningDanger"})).unwrap();if(!s)return}const t=Wh(e.path),a=await b.getNodeInfo({verb:b.DesignerRequestVerb.GET_INFO,path:e.path,content:!0,as:t});if(e.path===b.ROLES_TAB_PATH){const{roles:s,privileges:i}=Ls(a.content);r(Hc({roles:s,privileges:i}))}else if(e.path===b.SETTINGS_TAB_PATH){const{content:s}=a;r(ks({path:"project",value:s}))}else{const{content:s}=a;e.type===b.FileFolderType.WEBFORM?b.webformSubject.next({path:e.path,action:b.WebformActions.RELOAD,payload:s.components}):e.type===b.FileFolderType.MODEL&&Vh.next({action:"reload",payload:s})}return a}),zn=Q("files/saveTab",async({tab:e},{dispatch:r,getState:t})=>{const{path:a,content:s}=e;if(e.type===b.FileFolderType.DEBUGGER)return{...e,errors:[]};a.split("/").pop();const c=await b.getFilesInfo({path:a});if(c.files[0]){const h=new Date(e.date),m=new Date(c.files[0].date);if(h.getTime()<m.getTime()){const{confirmed:_}=await r(ar({title:ws(e),message:"New content has been found on the server. Are you sure you want to continue?",type:b.ModalType.CONFIRM,icon:"FdSave"})).unwrap();if(!_)return r(vv({path:a,flags:{old:!0}})),null}}const l=await b.saveContent({verb:b.DesignerRequestVerb.SAVE_CONTENT,content:oD(e,t()),path:a});(e.type===b.FileFolderType.CLASS||e.type===b.FileFolderType.MODEL)&&setTimeout(()=>{r(wn())},Ss);const d=(l.modelErrors||[]).map(h=>h.message),p=(l.permissionsErrors||[]).map(h=>h.message);return{...e,content:s,date:l.date,initialContent:s,errors:d.length>0||p.length>0?[{title:"Model errors",messages:d},{title:"Permissions errors",messages:p}]:[]}}),oD=(e,r)=>{switch(!0){case e.path==="settings.json":case e.path===b.SETTINGS_TAB_PATH:return r.settings.project;case e.type===b.FileFolderType.ROLES:return{...e.content,...Ns(r.roles)};case e.type===b.FileFolderType.MODEL:return e.content||{toJSON:!0,dataClasses:[],extraProperties:{}};default:return e.content}},Np=async e=>{if(e.type===b.FileFolderType.DATA_EXPLORER)return{name:"Data Explorer",path:e.path,flags:{},view:{panel:{isOpen:!1,type:"",current:""}},type:e.type,date:new Date().toISOString()};const r=e.path.split("/").filter(Boolean)[0],t=await b.getFile({root:r,type:e.type,verb:b.DesignerRequestVerb.GET,name:e.name}),a={};t.type===b.FileFolderType.METHOD&&(a.attributes=b.parseAttributes(t.content));const{date:s,name:i,type:c,content:l}=t;return{date:s,flags:{enabled:e.type===b.FileFolderType.WEBFORM},extra:a,view:{panel:{isOpen:!1,type:"",current:""}},name:i,path:e.path,type:c,initialContent:l,content:c===b.FileFolderType.MODEL?yh(l):l,history:{stack:[],active:-1,locked:!1}}},sD=We.debounce((e,r)=>{r(wv(e))},300),iD=Q("tabs/setTabContent",(e,{getState:r,dispatch:t})=>{var c;const{root:{tabs:a}}=r(),s=a.find(l=>l.path===e.path),i=!!((c=s==null?void 0:s.history)!=null&&c.locked);t(el(e)),i?t(Tv(e.path)):sD(e.path,t)}),Zg=Q("files/tryInjectMethod",async({type:e,dataclass:r},{getState:t,dispatch:a})=>{const{root:{tabs:s},settings:{server:{qodly:i}}}=t(),c=b.getFileExtentionFromType("class",i);let l="",d="",p=null;if(!r)l="DataStore",d=`Classes/DataStore.${c}`;else switch(e){case"dataclass":l=r,d=`Classes/${r}.${c}`;break;case"collection":l=`${r}Selection`,d=`Classes/${r}Selection.${c}`;break;case"entity":l=`${r}Entity`,d=`Classes/${r}Entity.${c}`;break;default:return p}const h=s.find(b.by("path",d));if(h)return a(Pt(h)),h;try{p=await Np({name:l,date:new Date().toISOString(),path:`class/${l}.${c}`,type:b.FileFolderType.CLASS})}catch{r?await a(ic({type:"dataclass",className:r,collectionName:`${r}Selection`,toCreate:e})):await a(ic({type:"model"}))}return p=await Np({name:l,date:new Date().toISOString(),path:`class/${l}.${c}`,type:b.FileFolderType.CLASS}),p.path=d,a(Pt(p)),p}),uD=Q("roles/open",async(e,{dispatch:r,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path===b.ROLES_TAB_PATH);if(s)return r(Pt(s)),s;r(vs())});function kp(e,r){const{line:t,offset:a,type:s="saved"}=r;e.breakpoints[s].locations.push({line:t}),We.isNumber(a)&&(e.breakpoints[s].offset=a)}function jp(e,r,t,a){e.breakpoints[t].locations=r,We.isNumber(a)&&(e.breakpoints[t].offset=a)}function Bp({filePath:e,fileType:r,methodName:t,className:a,ext:s,source:i}){return{filePath:e,fileType:r,methodName:t,className:a,ext:s,source:i,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}}function Wp(e,r,t){let a=!1;const s=e.map(i=>i[t]!==r[t]?i:(a=!0,{...i,...r}));return a?s:[...s,r]}function Yo(e){return e.map(({label:r})=>({label:r}))}const Qg=nr({name:"debugger",initialState:()=>{var r,t;const{debugger:e={meta:{state:Ir.DETACHED},list:[],sessions:[],expressions:[]}}=Jn();return{meta:{...e.meta,state:((r=e.meta)==null?void 0:r.state)===Ir.ATTACHED?(t=e.meta)==null?void 0:t.state:Ir.DETACHED},list:e.list||[],sessions:e.sessions||[],expressions:e.expressions||[]}},reducers:{addBreakpointDecoration(e,r){const{filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l,breakpoint:d}=r.payload,p=Sn(e.list,t,s,i);if(p)kp(p,d);else{if(a===b.FileFolderType.CLASS&&d.offset===void 0)throw new Error(`Cannot add a breakpoint on a function without offset. Try editing the ${i} class.`);const h=Bp({filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l});kp(h,d),e.list.push(h)}},removeBreakpointDecoration(e,r){const{filePath:t,methodName:a,line:s,offset:i=0,type:c="saved"}=r.payload;if(t.startsWith("Classes/")){const l=e.list.filter(d=>d.filePath===t);if(l.length>0){const d=s+i;l.forEach(p=>{const h=p.breakpoints[c].offset||0;p.breakpoints[c].locations=p.breakpoints[c].locations.filter(m=>m.line+h!==d),c==="saved"&&(p.breakpoints.draft.locations=p.breakpoints.draft.locations.filter(m=>m.line+h!==d))})}}else{const l=Sn(e.list,t,a);l&&(l.breakpoints[c].locations=l.breakpoints[c].locations.filter(d=>d.line!==s),c==="saved"&&(l.breakpoints.draft.locations=l.breakpoints.draft.locations.filter(d=>d.line!==s)))}},setBreakpointsDecoration(e,r){const{filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l,breakpoints:d,offset:p,type:h="saved",clearDraft:m}=r.payload,_=Sn(e.list,t,s);if(_)jp(_,d,h,p),m&&h!=="draft"&&(_.breakpoints.draft.locations=[]);else{const E=Bp({filePath:t,fileType:a,methodName:s,className:i,ext:c,source:l});jp(E,d,h,p),e.list.push(E)}},clearBreakpoints(e,r){const{filePath:t,type:a="saved"}=r.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath===t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearBreakpointsExcept(e,r){const{exceptedFilePath:t,type:a="saved"}=r.payload;e.list=e.list.map(s=>({...s,breakpoints:s.filePath!==t?{draft:!a||a==="draft"||a==="any"?{locations:[],offset:0}:s.breakpoints.draft,saved:!a||a==="saved"||a==="any"?{locations:[],offset:0}:s.breakpoints.saved}:s.breakpoints}))},clearAllBreakpoints(e){e.list=e.list.map(r=>({...r,breakpoints:{draft:{locations:[],offset:0},saved:{locations:[],offset:0}}}))},setActiveLine(e,r){const{threadId:t,line:a,highlight:s}=r.payload,i=ot(e.sessions,t);i&&(i.activeLine=a,s&&(i.highlightedLines={start:a,end:a}))},addExpression(e,r){const{threadId:t,label:a,save:s}=r.payload,i=ot(e.sessions,t);i&&i.stopped&&(i.expressions=[...i.expressions||[],{label:a}],s&&(e.expressions=Yo(i.expressions)))},removeExpression(e,r){const{threadId:t,index:a,save:s}=r.payload,i=ot(e.sessions,t);i&&(i.expressions=i.expressions.filter((c,l)=>l!==a),s&&(e.expressions=Yo(i.expressions)))},removeAllExpressions(e,r){const{threadId:t,save:a}=r.payload,s=ot(e.sessions,t);s&&(s.expressions=[],a&&(e.expressions=[]))},renameExpression(e,r){const{threadId:t,index:a,replacement:s,save:i}=r.payload,c=ot(e.sessions,t);c&&c.expressions[a]&&(c.expressions[a].label=s,i&&(e.expressions=Yo(c.expressions)))},setExpression(e,r){const{threadId:t,expression:a}=r.payload,s=ot(e.sessions,t);if(s){const i=a.index>=0?a.index:s.expressions.length>0?s.expressions.length-1:0,c=s.expressions[i];c?(c.result=a.result,c.nakedResult=a.nakedResult,c.variablesReference=a.variablesReference||0,c.presentationHint=a.presentationHint):s.expressions.push(a)}},updateExpressionAt(e,r){const{threadId:t,index:a,value:s}=r.payload,i=ot(e.sessions,t);if(i){const c=i.expressions[a];c&&(c.result=`"${s}"`,c.nakedResult=s)}},saveExpressions(e,r){const{expressions:t}=r.payload;e.expressions=Yo(t)},addSession(e,r){const{threadId:t,channelId:a,stackFrames:s,exceptions:i=[]}=r.payload,c=ot(e.sessions,t),l=s[0],{expressions:d=[]}=e;if(c)c.expressions=d;else{const p=Cc(t);e.sessions.push({tabPath:p,threadId:t,channelId:a,stackFrames:s,currentStackFrame:l,exceptions:i,expressions:d,variables:{callchain:[],expressions:[]},highlightedLines:null,activeLine:null,stopped:!0})}},updateSession(e,r){const{threadId:t,changes:a}=r.payload;e.sessions=e.sessions.map(s=>s.threadId===t?{...s,...a}:s)},removeSession(e,r){const{threadId:t}=r.payload;e.sessions=e.sessions.filter(a=>a.threadId!==t)},removeSessionByIndex(e,r){const t=r.payload;e.sessions.splice(t,1)},setSessions(e,r){const t=r.payload;e.sessions=t},setCallChainVariables(e,r){const{threadId:t,frameId:a,variables:s}=r.payload;e.sessions=e.sessions.map(i=>{var c;return i.threadId===t?{...i,variables:{...i.variables,callchain:Wp((c=i.variables)==null?void 0:c.callchain,{frameId:a,items:s},"frameId")}}:i})},setExpressionVariables(e,r){const{threadId:t,variablesReference:a,variables:s}=r.payload;e.sessions=e.sessions.map(i=>{var c;return i.threadId===t?{...i,variables:{...i.variables,expressions:Wp((c=i.variables)==null?void 0:c.expressions,{variablesReference:a,items:s},"variablesReference")}}:i})},setSourceContent(e,r){const{threadId:t,content:a}=r.payload,s=ot(e.sessions,t);s&&(s.currentStackFrame.source={...s.currentStackFrame.source,content:a})},setDebuggerMeta(e,r){if(r.payload.state===Ir.ERROR){e.meta.error={...e.meta.error,time:Date.now()};const{override:t,error:a={code:null,reason:"",type:ss.SOCKET_ERROR}}=r.payload;if((t||e.meta.state!==Ir.ERROR)&&(e.meta.error={...e.meta.error,...a}),(a==null?void 0:a.type)===ss.SOCKET_CLOSURE&&!(a!=null&&a.reason)&&e.meta.state===Ir.DETACHED)return}e.meta.state=r.payload.state}},extraReducers:e=>{e.addCase(tv.fulfilled,r=>{r.sessions=[]})}}),{addBreakpointDecoration:cD,removeBreakpointDecoration:lD,setBreakpointsDecoration:fD,clearBreakpoints:dD,clearBreakpointsExcept:pD,clearAllBreakpoints:hD,setActiveLine:gD,addExpression:vD,renameExpression:yD,removeExpression:mD,removeAllExpressions:bD,setExpression:_D,updateExpressionAt:ED,saveExpressions:SD,addSession:wD,updateSession:TD,removeSession:CD,removeSessionByIndex:xD,setSessions:ev,setCallChainVariables:RD,setExpressionVariables:OD,setSourceContent:AD,setDebuggerMeta:PD}=Qg.actions,tv=Q("files/wipeDebuggerSessions",async(e,{getState:r,dispatch:t})=>{const{sessions:a}=r().debugger;for(const{threadId:s}of a){const i=Cc(s);t(Vc(i))}}),rv=Q("files/removeDebuggerSessionsNotIn",async(e,{getState:r,dispatch:t})=>{const{threadIds:a}=e,{sessions:s}=r().debugger,i=[],c=s.filter(l=>{const d=a.includes(l.threadId);return d||i.push(l.threadId),d});return t(ev(c)),{staleThreadIds:i}}),Kc=Q("models/fetch",async()=>{try{return(await b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify({verb:b.DesignerRequestVerb.GET_INFO,path:b.MODEL_TAB_PATH,as:"json",content:!0}),headers:new Headers({"Content-Type":"application/json"})})).content}catch(e){return e.message}}),ys=Q("models/save",async(e,{getState:r,dispatch:t,rejectWithValue:a})=>{const{tabs:s}=r().root,i=s.find(c=>c.path===b.MODEL_TAB_PATH);if(!i)return a("Error while saving the model");try{const c=await b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify({verb:"save",path:i.path,content:i.content}),headers:new Headers({"Content-Type":"application/json"})});return setTimeout(()=>{t(wn())},Ss),{...c,path:i.path,content:e.content||{toJSON:!0,dataClasses:[],extraProperties:{}}}}catch{return a("Error while saving the model")}}),DD=Q("models/open",async(e,{dispatch:r,getState:t})=>{const{tabs:a}=t().root,s=a.find(i=>i.path==="models/main");if(s)return r(Pt(s)),s;r(Kc())}),ID=Q("model/rename-dataclass",async(e,{getState:r,dispatch:t})=>{var m,_;const{dataclassId:a,selectionId:s,name:i}=e;let c=r();const l=c.explorer.find(E=>E.path===b.FolderRootPath.CLASSES);if(!l)throw new Error("Classes folder was not found!");await t(_r(l.path)),c=r();const d={class:{found:!1,newNameTaken:!1,file:null,filename_update:i},entity:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Entity`},selection:{found:!1,newNameTaken:!1,file:null,filename_update:`${i}Selection`}};(_=(m=c.explorer.find(E=>E.path===b.FolderRootPath.CLASSES))==null?void 0:m.children)==null||_.forEach(E=>{E.name===d.class.filename_update&&(d.class.newNameTaken=!0),E.name===d.entity.filename_update&&(d.entity.newNameTaken=!0),E.name===d.selection.filename_update&&(d.selection.newNameTaken=!0),E.name===a?(d.class.found=!0,d.class.file=E):E.name===`${a}Entity`?(d.entity.found=!0,d.entity.file=E):E.name===s&&(d.selection.found=!0,d.selection.file=E)});const p=Object.entries(d).reduce((E,T)=>{const[x,D]=T;return D.found?D.newNameTaken?[...E,{type:"error",message:`Cannot rename ${x} file to ${D.filename_update} because it already exists. The existing file will be used instead!`}]:E:[...E,{type:"warning",message:`${a} ${x} file was not found`}]},[]);p.length>0&&t(ar({message:"The following errors were encountered during dataclass rename:",views:{tips:p}}));const h=Object.values(d).filter(E=>E.found&&E.file&&!E.newNameTaken);await Promise.all(h.map(async E=>await t(Yn({file:E.file,newname:E.filename_update})))),h.length>0&&t(_r("Classes"))}),Na={DATACLASS_DELETE:"dataclass.delete",DATACLASS_DRAGGABLE:"dataclass.draggable"},FD={model:{dataClasses:{},collections:{},extraProperties:{}},draft:{dataClasses:{},collections:{},extraProperties:{}},flags:{[Na.DATACLASS_DELETE]:!0,[Na.DATACLASS_DRAGGABLE]:!0}},nv=nr({name:"Models",initialState:FD,reducers:{setModelFlag(e,r){e.flags={...e.flags,...r.payload}}},extraReducers(e){e.addCase(Kc.fulfilled,(r,t)=>{var c;const a={},s={},i=t.payload.extraProperties||{};(c=t.payload.dataClasses)==null||c.forEach(l=>{a[l.name]=l,s[l.collectionName]=l}),r.draft.dataClasses=a,r.draft.collections=s,r.draft.extraProperties=i,r.model.dataClasses=a,r.model.collections=s,r.model.extraProperties=i}),e.addCase(ys.pending,()=>{}).addCase(ys.fulfilled,(r,t)=>{const a={},s={},i=t.payload.content.extraProperties||{};t.payload.content.dataClasses.forEach(c=>{a[c.name]=c,s[c.collectionName]=c}),r.draft.dataClasses=a,r.draft.collections=s,r.draft.extraProperties=i,r.model.dataClasses=a,r.model.collections=s,r.model.extraProperties=i})}}),{setModelFlag:$D}=nv.actions;var av=(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))(av||{}),Bs=(e=>(e.STORAGE="storage",e.RELATEDENTITY="relatedEntity",e.RELATEDENTITIES="relatedEntities",e.CALCULATED="calculated",e.COMPOSITION="composition",e.ALIAS="alias",e))(Bs||{});const MD=e=>["string","uuid","number","long"].includes(e.type),LD=[{label:"Storage",value:"storage"},{label:"Calculated",value:"calculated"}],ND=[{title:"UUID",kind:"storage",value:"uuid",calculatedType:"uuid",calculatedKind:"storage"},{title:"Long",kind:"storage",value:"long",calculatedType:"long",calculatedKind:"storage"}],kD=[{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"}],jD=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],BD=[{label:"Expose as REST",value:"public"},{label:"Do not expose as REST",value:"publicOnServer"}],WD=[{label:"None",value:"none"},{label:"B-tree",value:"btree"},{label:"Cluster",value:"cluster"},{label:"Automatic",value:"auto"}],UD=(e,r)=>({toJSON:!0,extraProperties:r,dataClasses:e.map(t=>{var a;return{...t.data,extraProperties:{position:{x:t.position.x,y:t.position.y},panelColor:(a=t.data.extraProperties)==null?void 0:a.panelColor}}})});function HD(e,r,t){const a=e;let s=0;for(;t[`${a}${s||""}`];)s++;return`${a}${s||""}`}const ov=e=>e.kind===Bs.RELATEDENTITY,sv=e=>e.kind===Bs.RELATEDENTITIES,GD=e=>sv(e)||ov(e),qD=()=>kr(e=>e.model.draft.dataClasses),YD=()=>kr(e=>e.model.draft.collections),zD=e=>kr(r=>r.model.draft.dataClasses[e]),VD=(e,r)=>kr(t=>t.model.draft.dataClasses[e].attributes.find(b.by("name",r))),KD=()=>kr(e=>e.model.draft.extraProperties),JD=()=>{const e=kr(s=>s.model.flags),r=s=>s in e?e[s]:void 0,t=r(Na.DATACLASS_DELETE),a=r(Na.DATACLASS_DRAGGABLE);return{deleteDataclass:t,draggableDataclass:a,flags:e}},XD=nv.reducer;function Mu(e,r){const t=e.tabs.find(({path:a})=>a===b.SETTINGS_TAB_PATH);t&&(t.flags.touched=r)}const iv={SIDEBAR_SECTION_RESIZABLE:"sidebar.section.resizable"},uv={[iv.SIDEBAR_SECTION_RESIZABLE]:!0},cv=nr({name:"webforms",initialState:()=>{const{webforms:e}=Jn();return{...e,templates:{data:[],selectedGroup:""},datasources:{...wc.webforms.datasources,...e==null?void 0:e.datasources},flags:uv}},reducers:{toggleInspector:(e,r)=>{const{type:t}=r.payload;e.inspector[t].active=!e.inspector[t].active,e.inspector[t].active||(e.inspector[t].data=void 0)},inspect:(e,r)=>{const{type:t,data:a}=r.payload;e.inspector[t].active&&(e.inspector[t].data=a)},addComponent:(e,r)=>{e.components.push(r.payload)},editComponent:(e,r)=>{const{id:t,changes:a}=r.payload;e.components=e.components.map(s=>s.id===t?{...s,...a}:s)},removeComponent:(e,r)=>{const{payload:t}=r,a=e.components.findIndex(s=>s.id===t);a!==-1&&e.components.splice(a,1)},setSelectedGroup:(e,r)=>{e.templates.selectedGroup=r.payload.selectedGroup},setTemplatesData:(e,r)=>{e.templates.data=r.payload},setTemplateData:(e,r)=>{const{group:t,components:a}=r.payload,s=e.templates.data.find(i=>i.group===t);s&&(s.components=a)},setDatasourcesTheme:(e,r)=>{e.datasources.theme=r.payload},setWebformsFlag(e,r){e.flags={...e.flags,...r.payload}}},extraReducers(e){e.addCase(gv.fulfilled,(r,t)=>{r.components=t.payload})}}),{toggleInspector:ZD,inspect:QD,addComponent:lv,editComponent:fv,removeComponent:dv,setSelectedGroup:eI,setTemplatesData:pv,setTemplateData:hv,setDatasourcesTheme:tI,setWebformsFlag:rI}=cv.actions,nI=cv.reducer,Jc=We.curry((e,r)=>{var s,i;const t={...r.sharedDatasources.sources},a=(i=((s=r.root.tabs.find(b.by("path",e)))==null?void 0:s.content).metadata)==null?void 0:i.datasources;return a&&(t[e]=a),We.cloneDeep(t)}),aI=Q("webforms/fetchTemplates",async(e,{dispatch:r,getState:t})=>{const{data:a}=t().webforms.templates,s=t().settings.session["studio.tipsBaseUrl"]||"";if(!We.isEmpty(a))return a;try{const c=await(await fetch(`${s}/build/index.json?t=${Date.now()}`)).json();return r(pv(c)),c}catch{return[]}}),oI=Q("webforms/fetchTemplate",async({name:e},{dispatch:r,getState:t})=>{const{data:a}=t().webforms.templates,s=a.find(i=>i.group===e);if(s&&!We.isEmpty(s.components))return s.components;try{const c=await(await fetch(`${s==null?void 0:s.link}?t=${Date.now()}`)).json();return r(hv({group:e,components:c})),c}catch{return[]}}),gv=Q("webforms/fetchCraftedComponents",async(e,{rejectWithValue:r})=>{try{return(await b.getNodeInfo({path:"WebForms/crafted_components.json",verb:b.DesignerRequestVerb.GET_INFO,content:!0,as:"json"})).content}catch{return r("Error while loading the crafted components")}}),sI=Q("webforms/addCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(lv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while adding the crafted component")}}),iI=Q("webforms/editCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(fv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while editing the crafted component")}}),uI=Q("webforms/removeCraftedComponent",async(e,{dispatch:r,rejectWithValue:t,getState:a})=>{try{r(dv(e));const{webforms:{components:s}}=a();b.setCraftedComponents(s)}catch{return t("Error while removing the crafted component")}}),Xc=Q("datasources/add-datasource",async(e,{getState:r,rejectWithValue:t})=>{var a,s;try{const i=r(),c=e.datasource,l=!!c.namespace,d=[];if(l){const p={...i.sharedDatasources.sources,[c.namespace]:[...i.sharedDatasources.sources[c.namespace],c]};d.push(...p[c.namespace]),await b.setSharedSources(p)}else(((s=(a=i.root.tabs.find(b.by("path",e.path)).content)==null?void 0:a.metadata)==null?void 0:s.datasources)||[]).push(c);return{list:d,path:e.path,namespace:e.datasource.namespace}}catch{console.error("Error while adding the datasource",e.datasource.id),t("Error while adding the datasource")}}),Zc=Q("datasources/edit-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const{namespace:a,path:s}=e,i=r(),c=!!e.namespace,l=Jc(s,i);let d=We.defaultTo(l[a||s],[]);return d=d.map(p=>p.id===e.id?{...p,[e.property]:e.value}:p),c&&await b.setSharedSources({...i.sharedDatasources.sources,[e.namespace]:d}),{list:d,path:e.path,namespace:e.namespace}}catch{t(`Error while editing datasource ${e.id}`)}}),cI=e=>e.type===Vn.fulfilled.type,Vn=Q("datasources/rename-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const a=r(),s=!!e.namespace,i=e.namespace||e.path,c=Jc(e.path,a),l=We.defaultTo(c[i],[]),d=new RegExp(`^${e.id}\\b`,"");if(l.forEach(p=>{var m;const h=(b.isObjectDatasource(p)||!b.isSimpleDatasource(p))&&p.from&&d.test(p.from);e.updateRefs&&((m=p.events)==null||m.forEach(_=>{var E,T,x,D,P;switch(_.type){case"method":{const j=_;j.params.forEach(M=>{M.datasource&&Object.assign(M,{datasource:M.datasource.replace(new RegExp(`^${e.id}`,""),e.new_name)})}),j.returns&&Object.assign(j.returns,{datasource:(T=(E=j.returns)==null?void 0:E.datasource)==null?void 0:T.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}case"simple-action":{const j=_;j.datasource&&Object.assign(j.datasource,{name:(x=j.datasource.name)==null?void 0:x.replace(new RegExp(`^${e.id}`,""),e.new_name),from:(D=j.datasource.from)==null?void 0:D.replace(new RegExp(`^${e.id}`,""),e.new_name),target:(P=j.datasource.target)==null?void 0:P.replace(new RegExp(`^${e.id}`,""),e.new_name)});return}default:return}})),p.id===e.id?p.id=e.new_name:h&&p.from&&(p.from=p.from.replace(new RegExp(`^${e.id}`,""),e.new_name))}),e.updateRefs){const p=b.getDatasourceId({id:e.id,namespace:e.namespace}),h=b.getDatasourceId({id:e.new_name,namespace:e.namespace});b.datasourcesSubject.next({path:e.path??"",action:b.DatasourcesActions.RENAME,old_reference:p,new_reference:h,is_shared:s})}return s&&await b.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while renaming datasource ${e.namespace}:${e.id}`)}}),Ia=Q("datasources/delete-datasource",async(e,{getState:r,rejectWithValue:t})=>{try{const a=r(),s=!!e.namespace,i=e.namespace||e.path,l=Jc(e.path,a)[i].filter(b.outById(e.id));return s&&await b.setSharedSources({...a.sharedDatasources.sources,[e.namespace]:l}),{list:l,path:e.path,namespace:e.namespace}}catch{return t(`Error while removing datasource ${e.id}`)}}),ka=nr({name:"root",initialState:()=>{const e=Jn();return{filesLoading:!1,tabs:e.tabs||[],activeTab:e.activeTab,recent:e.recent||[]}},reducers:{setPanelState(e,r){const{path:t,...a}=r.payload;e.tabs.forEach(s=>{s.path===t&&(s.view||(s.view={panel:{isOpen:!1,type:"",current:""}}),Object.assign(s.view.panel,a))})},openSettingsTab(e){const r={date:new Date().toISOString(),flags:{confirmed:!0},view:{panel:{isOpen:!1,type:"",current:""}},extra:{editor:{key:"editors:settings"}},name:"Settings",path:b.SETTINGS_TAB_PATH,type:b.FileFolderType.SETTINGS,initialContent:{},content:{}};let t=e.tabs.find(a=>a.path===r.path);if(t||(e.tabs.push(r),t=e.tabs[e.tabs.length-1]),e.activeTab!==r.path){const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=r.path,t.weight=((a==null?void 0:a.weight)||0)+1}},addDataSource(e,r){var i;const{payload:{path:t,datasourceDef:a}}=r,s=e.tabs.find(c=>c.path===t);s&&(s.content.metadata.datasources=s.content.metadata.datasources||[],(i=s.content.metadata.datasources)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.datasources=[...s.content.metadata.datasources,{...a,events:[]}],s.flags={...s.flags,touched:!0,confirmed:!0}))},addWebformState(e,r){var i;const{payload:{path:t,stateDef:a}}=r,s=e.tabs.find(c=>c.path===t);s&&(s.content.metadata.states=s.content.metadata.states||[$c],(i=s.content.metadata.states)!=null&&i.find(l=>l.id===a.id)||(s.content.metadata.states=[...s.content.metadata.states,a],s.flags={...s.flags,touched:!0,confirmed:!0}))},removeWebformState(e,r){const{path:t,id:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:bh(s.content,a)}:s)},editWebformState(e,r){const{path:t,state:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,states:s.content.metadata.states.map(i=>i.id===a.id?a:i)}}}:s)},removeDataSource(e,r){const{path:t,datasourceID:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...s.content.metadata,datasources:s.content.metadata.datasources.filter(i=>i.id!==a)}}}:s)},setDataSources(e,r){const{payload:{path:t,datasourceArr:a}}=r;e.tabs=e.tabs.map(s=>{var i;return s.path===t?{...s,flags:{...s.flags,touched:!0,confirmed:!0},content:{...s.content,metadata:{...(i=s.content)==null?void 0:i.metadata,datasources:a}}}:s})},setTabs(e,r){e.tabs=r.payload},closeTab(e,r){const t=r.payload;e.tabs.splice(t,1);const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);e.activeTab=(a==null?void 0:a.path)||""},closeOthers(e,r){e.tabs=e.tabs.filter(t=>t.path===r.payload),e.activeTab=r.payload},closeAllTabs(e){e.tabs=[],e.activeTab=""},closeRightTabs(e,r){e.tabs.splice(r.payload+1),e.activeTab=e.tabs[r.payload].path},closeLeftTabs(e,r){e.tabs.splice(0,r.payload)},closeSavedTabs(e){e.tabs=e.tabs.filter(({flags:{touched:t}})=>t);const r=e.tabs.reduce((t,a)=>(a==null?void 0:a.weight)>((t==null?void 0:t.weight)||0)?a:t,null);e.activeTab=(r==null?void 0:r.path)||""},confirmTab(e,r){const t=e.tabs.find(({path:a})=>a===r.payload);t&&(t.flags.confirmed||ka.caseReducers.setTabFlags(e,{type:r.type,payload:{path:r.payload,flags:{confirmed:!0}}}))},selectTab(e,r){const t=e.tabs.find(({path:s})=>s===r.payload);if(!t||e.activeTab===r.payload)return;const a=e.tabs.reduce((s,i)=>(i==null?void 0:i.weight)>((s==null?void 0:s.weight)||0)?i:s,null);t.weight=a?(a.weight||0)+1:1,e.activeTab=r.payload},openTabUnselected(e,r){const t=r.payload;let a=e.tabs.find(({path:i})=>t.path===i);a||(e.tabs.push(t),a=e.tabs[e.tabs.length-1]);const s=e.tabs.reduce((i,c)=>(c==null?void 0:c.weight)>((i==null?void 0:i.weight)||0)?c:i,null);a.weight=s?(s.weight||0)+1:1,a.extra={...a.extra,...t.extra}},selectTabByReference(e,r){const t=[b.FileFolderType.DEBUGGER],{isNew:a,...s}=r.payload;let i=s,c=e.tabs.find(({path:l})=>i.path===l);if(i.history||(i.history={stack:[],active:-1,locked:!1}),(t.includes(i.type)||c!=null&&c.flags.confirmed)&&(i={...i,flags:{...i.flags,confirmed:!0}}),!c){const l=e.tabs.findIndex(({flags:{confirmed:d}})=>d===!1);l!==-1&&!t.includes(i.type)&&!a?e.activeTab===e.tabs[l].path?(e.tabs[l]=i,c=e.tabs[l]):(e.tabs.push(i),c=e.tabs[e.tabs.length-1],e.tabs.splice(l,1)):(e.tabs.push(i),c=e.tabs[e.tabs.length-1])}if(e.activeTab!==i.path){const l=e.tabs.reduce((d,p)=>(p==null?void 0:p.weight)>((d==null?void 0:d.weight)||0)?p:d,null);e.activeTab=i.path,c.weight=((l==null?void 0:l.weight)||0)+1}c.extra={...c.extra,...i.extra},c.flags={...c.flags||{},...i.flags||{}}},setContent(e,r){const{path:t,content:a,contentPath:s}=r.payload;e.tabs=e.tabs.map(i=>{if(i.path!==t)return i;let c=!1,l=i.flags.confirmed;if(typeof a=="string")c=i.initialContent!==a,l=!l&&c?!0:l;else{const d=JSON.stringify(We.get(i.initialContent,s||"",i.initialContent)),p=JSON.stringify(We.get(a,s||"",a));c=d!==p,l=!l&&c?!0:l}return a&&typeof a=="object"&&(s?We.set(i.content,s,a):i.content=a),typeof a=="string"&&(i.content=a),{...i,flags:{...i.flags,touched:c,confirmed:l}}})},setTabFlags(e,r){const{path:t,flags:a}=r.payload;e.tabs=e.tabs.map(s=>s.path===t?{...s,flags:{...s.flags,...a}}:s)},setTabsFlags(e,r){const{tabs:t,flags:a}=r.payload;e.tabs=e.tabs.map(s=>t.includes(s.path)?{...s,flags:{...s.flags,...a}}:s)},setTabExtra(e,r){const{path:t,extra:a,flags:s}=r.payload;e.tabs=e.tabs.map(i=>i.path===t?{...i,extra:{...i.extra,...a},flags:s?{...i.flags,...s}:i.flags}:i)},addWebFormStyles(e,r){const{path:t,styles:a=[]}=r.payload,s=e.tabs.find(i=>i.path===t);if(s){const i=s.content.metadata.styles.map(({name:l})=>l),c=a.filter(({name:l})=>!i.includes(l));s.content.metadata.styles=[...s.content.metadata.styles,...c].map(({scope:l,...d})=>({...d}))}},changeTabEditor(e,r){return e.tabs=e.tabs.map(t=>t.path===r.payload.path?r.payload:t),e},setHistoryContent(e,r){const t=r.payload;e.tabs=e.tabs.map(a=>{var s;return a.path!==t?a:(a.history&&(a.history.stack=[...(s=a.history)==null?void 0:s.stack.slice(0,a.history.active+1),a.content],a.history.active=a.history.stack.length-1),{...a})})},unlockHistory(e,r){const t=r.payload;e.tabs=e.tabs.map(a=>a.path!==t?a:(a.history&&(a.history.locked=!1),{...a}))},undo(e){e.tabs=e.tabs.map(r=>r.path!==e.activeTab?r:(r.history&&r.history.active>0&&(r.history.locked=!0,r.history.active--,r.content=r.history.stack[r.history.active]),{...r}))},redo(e){e.tabs=e.tabs.map(r=>r.path!==e.activeTab?r:(r.history&&r.history.active<r.history.stack.length-1&&(r.history.locked=!0,r.history.active++,r.content=r.history.stack[r.history.active]),{...r}))}},extraReducers:e=>{e.addCase(ac,(r,t)=>{if(t.payload.settingsKey==="studio.enablePreview"&&t.payload.value===!1){const a=r.tabs.find(({flags:{confirmed:s}})=>s===!1);a&&ka.caseReducers.setTabFlags(r,{type:"",payload:{path:a.path,flags:{confirmed:!0}}})}}),e.addCase(Kg.fulfilled,(r,t)=>{if(!t.payload)return;const{content:a,line:s,path:i}=t.payload,c=r.tabs.find(l=>l.path===i);if(c&&typeof c.content=="string"){const l=c.content.trim().split(`
100
100
  `);l.splice(s,0,a),c.content=l.join(`
101
- `)}}),e.addCase(Yn.pending,(n,t)=>{const{tab:a}=t.meta.arg;switch(a.type){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(Yn.fulfilled,(n,t)=>{if(!t.payload)return;const a=n.tabs.find(({path:s})=>{var i;return s===((i=t.payload)==null?void 0:i.path)});if(a){switch(a.content=t.payload.content,a.date=t.payload.date,a.initialContent=t.payload.initialContent,a.flags.touched=!1,a.flags.confirmed=!0,a.flags.old=!1,a.type){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}t.payload.errors.length>0&&b.toastSubject.next({kind:"error",message:t.payload.errors})}}),e.addCase(Yn.rejected,(n,t)=>{b.toastSubject.next({kind:"danger",message:"Cannot save file"})}),e.addCase(Kg.fulfilled,(n,t)=>{const a=[...t.payload.files];n.tabs=n.tabs.map(s=>{if([b.FileFolderType.CLASS,b.FileFolderType.METHOD].includes(s.type)){const i=a.find(c=>c.name===s.name&&c.type===s.type);if(i){const c=new Date(s.date),l=new Date(i.date);if(c.getTime()!==l.getTime())return{...s,flags:{...s.flags,old:!0}}}}return s})}),e.addCase(lc.pending,(n,t)=>{n.tabs=n.tabs.map(a=>a.path===t.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(lc.fulfilled,(n,t)=>{const a=t.payload;if(a){const s=t.meta.arg;n.tabs=n.tabs.map(i=>{if(i.name===s.name&&i.type===s.type){const c=i.extra||{};return i.type===b.FileFolderType.METHOD?(c.attributes=b.parseAttributes(a.content),a.content=b.addAttributesToContent(a.content,{})):i.type===b.FileFolderType.SETTINGS&&(a.content={}),{...i,initialContent:a.content,content:a.content,date:a.date,flags:{enabled:i.flags.enabled,confirmed:i.flags.confirmed},extra:c}}return i})}}),e.addCase(qc.fulfilled,(n,t)=>{if(!t.payload)return;const{line:a,offset:s}=t.meta.arg,i=n.tabs.find(({path:c})=>{var l;return c===((l=t.payload)==null?void 0:l.path)});i&&(i.extra={...i.extra,initialLineInfo:{line:a,offset:s,lastModification:Date.now()}})}),e.addCase(Vg.fulfilled,(n,t)=>{if(!t.payload)return;const{selection:a}=t.meta.arg,s=n.tabs.find(({path:i})=>{var c;return i===((c=t.payload)==null?void 0:c.path)});s&&(s.extra={...s.extra,initialSelectionInfo:{selection:a,lastModification:Date.now()}})}),e.addCase(qn.fulfilled,(n,t)=>{t.payload.new!==t.payload.old&&(n.tabs=[...n.tabs].map(a=>a.path===t.payload.old.path?{...a,path:t.payload.new.path,name:t.payload.new.name}:a),n.activeTab===t.payload.old.path&&(n.activeTab=t.payload.new.path))}),e.addCase(uc.pending,(n,t)=>{const a=t.meta.arg,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_DELETE,payload:{filePath:s}});break}}),e.addCase(uc.fulfilled,(n,t)=>{const{deleted:a,node:s}=t.payload;if(!a)return;const i=`${s.path}${s.ext?`.${s.ext}`:""}`;switch(s.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_DELETE,payload:{filePath:i}});break}if(n.tabs=n.tabs.filter(c=>c.path!==i),n.recent=n.recent.filter(({path:c})=>i!==c),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(cc.pending,(n,t)=>{const a=t.meta.arg,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_DELETE,payload:{filePath:s}});break}}),e.addCase(cc.fulfilled,(n,t)=>{const{node:a}=t.payload,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_DELETE,payload:{filePath:s}});break}}),e.addCase(Da.fulfilled,(n,t)=>{const{draggedNode:a,newLocation:s}=t.meta.arg;if(n.tabs.find(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`))return n.tabs=n.tabs.map(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...i,path:`${s.path}/${a.name}.${a.ext}`}:i),n.recent=n.recent.map(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...i,path:`${s.path}/${a.name}.${a.ext}`}:i),n.activeTab=`${s.path}/${a.name}.${a.ext}`,n}),e.addCase(ms.fulfilled,(n,t)=>{const a=n.tabs.find(s=>s.path===t.payload.path);a&&(a.flags.touched=!1,a.flags.confirmed=!0,a.date=t.payload.date,a.content=t.payload.content,a.initialContent=t.payload.content)}),e.addCase(Jg.fulfilled,(n,t)=>{var i;if(!((i=t.payload)!=null&&i.path))return;const a=n.tabs.find(b.by("path",t.payload.path));if(!a)return;a.content=a.content+`
101
+ `)}}),e.addCase(zn.pending,(r,t)=>{const{tab:a}=t.meta.arg;switch(a.type){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.WILL_SAVE,payload:{filePath:a.path}});break}}),e.addCase(zn.fulfilled,(r,t)=>{if(!t.payload)return;const a=r.tabs.find(({path:s})=>{var i;return s===((i=t.payload)==null?void 0:i.path)});if(a){switch(a.content=t.payload.content,a.date=t.payload.date,a.initialContent=t.payload.initialContent,a.flags.touched=!1,a.flags.confirmed=!0,a.flags.old=!1,a.type){case b.FileFolderType.CLASS:case b.FileFolderType.METHOD:b.lspSubject.next({action:b.LspActions.DID_SAVE,payload:{filePath:a.path,content:a.content}});break}t.payload.errors.length>0&&b.toastSubject.next({kind:"error",message:t.payload.errors})}}),e.addCase(zn.rejected,(r,t)=>{b.toastSubject.next({kind:"danger",message:"Cannot save file"})}),e.addCase(Xg.fulfilled,(r,t)=>{const a=[...t.payload.files];r.tabs=r.tabs.map(s=>{if([b.FileFolderType.CLASS,b.FileFolderType.METHOD].includes(s.type)){const i=a.find(c=>c.name===s.name&&c.type===s.type);if(i){const c=new Date(s.date),l=new Date(i.date);if(c.getTime()!==l.getTime())return{...s,flags:{...s.flags,old:!0}}}}return s})}),e.addCase(lc.pending,(r,t)=>{r.tabs=r.tabs.map(a=>a.path===t.meta.arg.path?{...a,flags:{...a.flags,loading:!0}}:a)}),e.addCase(lc.fulfilled,(r,t)=>{const a=t.payload;if(a){const s=t.meta.arg;r.tabs=r.tabs.map(i=>{if(i.name===s.name&&i.type===s.type){const c=i.extra||{};return i.type===b.FileFolderType.METHOD?(c.attributes=b.parseAttributes(a.content),a.content=b.addAttributesToContent(a.content,{})):i.type===b.FileFolderType.SETTINGS&&(a.content={}),{...i,initialContent:a.content,content:a.content,date:a.date,flags:{enabled:i.flags.enabled,confirmed:i.flags.confirmed},extra:c}}return i})}}),e.addCase(qc.fulfilled,(r,t)=>{if(!t.payload)return;const{line:a,offset:s}=t.meta.arg,i=r.tabs.find(({path:c})=>{var l;return c===((l=t.payload)==null?void 0:l.path)});i&&(i.extra={...i.extra,initialLineInfo:{line:a,offset:s,lastModification:Date.now()}})}),e.addCase(Jg.fulfilled,(r,t)=>{if(!t.payload)return;const{selection:a}=t.meta.arg,s=r.tabs.find(({path:i})=>{var c;return i===((c=t.payload)==null?void 0:c.path)});s&&(s.extra={...s.extra,initialSelectionInfo:{selection:a,lastModification:Date.now()}})}),e.addCase(Yn.fulfilled,(r,t)=>{t.payload.new!==t.payload.old&&(r.tabs=[...r.tabs].map(a=>a.path===t.payload.old.path?{...a,path:t.payload.new.path,name:t.payload.new.name}:a),r.activeTab===t.payload.old.path&&(r.activeTab=t.payload.new.path))}),e.addCase(uc.pending,(r,t)=>{const a=t.meta.arg,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_DELETE,payload:{filePath:s}});break}}),e.addCase(uc.fulfilled,(r,t)=>{const{deleted:a,node:s}=t.payload;if(!a)return;const i=`${s.path}${s.ext?`.${s.ext}`:""}`;switch(s.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_DELETE,payload:{filePath:i}});break}if(r.tabs=r.tabs.filter(c=>c.path!==i),r.recent=r.recent.filter(({path:c})=>i!==c),r.tabs.length){r.activeTab=r.tabs[r.tabs.length-1].path;return}r.activeTab=""}),e.addCase(cc.pending,(r,t)=>{const a=t.meta.arg,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.WILL_DELETE,payload:{filePath:s}});break}}),e.addCase(cc.fulfilled,(r,t)=>{const{node:a}=t.payload,s=`${a.path}${a.ext?`.${a.ext}`:""}`;switch(a.ext){case"4dm":case"4qs":b.lspSubject.next({action:b.LspActions.DID_DELETE,payload:{filePath:s}});break}}),e.addCase(Da.fulfilled,(r,t)=>{const{draggedNode:a,newLocation:s}=t.meta.arg;if(r.tabs.find(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`))return r.tabs=r.tabs.map(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...i,path:`${s.path}/${a.name}.${a.ext}`}:i),r.recent=r.recent.map(i=>i.path===`${a.path}${a.ext?`.${a.ext}`:""}`?{...i,path:`${s.path}/${a.name}.${a.ext}`}:i),r.activeTab=`${s.path}/${a.name}.${a.ext}`,r}),e.addCase(ys.fulfilled,(r,t)=>{const a=r.tabs.find(s=>s.path===t.payload.path);a&&(a.flags.touched=!1,a.flags.confirmed=!0,a.date=t.payload.date,a.content=t.payload.content,a.initialContent=t.payload.content)}),e.addCase(Zg.fulfilled,(r,t)=>{var i;if(!((i=t.payload)!=null&&i.path))return;const a=r.tabs.find(b.by("path",t.payload.path));if(!a)return;a.content=a.content+`
102
102
  exposed Function ${t.meta.arg.name}()
103
103
  `,a.flags={...a.flags,touched:!0,confirmed:!0};const s=a.content.split(`
104
- `);a.extra={...a.extra,editor:b.EDITOR.Code,initialLineInfo:{line:s.length-1,lastModification:Date.now()}}}),e.addCase(Yc.fulfilled,(n,t)=>{var i,c;if(!((i=t.payload)!=null&&i.path)||(c=t.payload)!=null&&c.namespace)return;const a=t.payload.path,s=n.tabs.find(b.by("path",a));!s||!s.content||!s.content.metadata||(Object.assign(s.content.metadata,{datasources:t.payload.datasources}),s.flags.touched=!0,s.flags.confirmed=!0)}),e.addCase(zc.fulfilled,(n,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace||n.tabs.forEach(i=>{i.path===s.path&&Object.assign(i.content,{metadata:{...i.content.metadata,datasources:a}})})}),e.addCase(ev.fulfilled,(n,t)=>{const{staleThreadIds:a}=t.payload;if(a.length===0)return;const s=a.map(i=>`Debugger/${i}`);if(n.tabs=n.tabs.filter(i=>!s.includes(i.path)),n.recent=n.recent.filter(({path:i})=>!s.includes(i)),n.tabs.length){n.activeTab=n.tabs[n.tabs.length-1].path;return}n.activeTab=""}),e.addCase(Gc.pending,n=>Mu(n,!1)),e.addMatcher(dr(ac),(n,t)=>{["project"].includes(t.payload.path)&&Mu(n,!0)}),e.addMatcher(dr(ks),(n,t)=>{Mu(n,!1)}),e.addMatcher(dr(_v,Pt),(n,t)=>{const{payload:a}=t;let s;typeof a=="string"?s=n.tabs.find(({path:i})=>a===i):s=a,s&&(n.recent=[s,...n.recent.filter(({path:i})=>![s.path,"settings"].includes(i))])}),e.addMatcher(dr(kg,Ng),(n,t)=>{n.tabs=n.tabs.map(a=>a.path===b.ROLES_TAB_PATH?{...a,flags:{...a.flags,confirmed:!0,touched:!0}}:a)}),e.addMatcher(dr(Hc),(n,t)=>{n.tabs=n.tabs.map(a=>a.path===b.ROLES_TAB_PATH?{...a,flags:{...a.flags,touched:!1}}:a)}),e.addMatcher(dr(Xc.fulfilled,Zc.fulfilled,Ia.fulfilled,zn.fulfilled),(n,t)=>{var s,i,c;const a=n.tabs.find(b.by("path",((s=t.payload)==null?void 0:s.path)||t.meta.arg.path));!a||(i=t.payload)!=null&&i.namespace||(a.flags.touched=!0,a.flags.confirmed=!0,Object.assign(a.content,{metadata:{...a.content.metadata,datasources:(c=t.payload)==null?void 0:c.list}}))}),e.addMatcher(dr(Ia.fulfilled,zn.fulfilled),(n,t)=>{var l;const a=n.tabs.find(b.by("path",((l=t.payload)==null?void 0:l.path)||t.meta.arg.path));if(!a)return;const{panel:s}=a.view,i=b.getDatasourceId({id:t.meta.arg.id,namespace:t.meta.arg.namespace});if(s.type==="datasource"&&s.current===i)switch(t.type){case Ia.fulfilled.type:Object.assign(a.view.panel,{type:"component",current:lR});break;case zn.fulfilled.type:const d=b.getDatasourceId({id:t.meta.arg.new_name,namespace:t.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",current:d});break}})}}),{setTabs:aI,closeTab:Qc,setContent:hv,setTabFlags:gv,setTabsFlags:oI,setTabExtra:sI,closeAllTabs:vv,addDataSource:iI,closeRightTabs:mv,closeOthers:yv,closeLeftTabs:bv,closeSavedTabs:uI,setDataSources:cI,removeDataSource:lI,confirmTab:fI,selectTab:_v,selectTabByReference:Pt,openTabUnselected:Ev,addWebFormStyles:dI,changeTabEditor:pI,openSettingsTab:hI,setPanelState:gI,addWebformState:vI,editWebformState:mI,removeWebformState:yI}=ka.actions,Sv=ka.reducer,bI=Xg.reducer,wn=Q("catalog/fetchCatalog",async(e,{rejectWithValue:n})=>{var t;try{const a=await b.getCatalog(),s=new Map,i=new Map;return(t=a==null?void 0:a.dataClasses)==null||t.forEach(({methods:c=[],...l})=>{if(l.uuid||Object.assign(l,{uuid:b.generateUUID()}),l.attributes){const p=["storage","relatedEntity"];l.attributes=l.attributes.map(h=>(p.includes(h.kind)&&!h.uuid&&Object.assign(h,{uuid:b.generateUUID()}),h))}const d={...l,methods:c};i.set(l.className,d),s.set(l.collectionName,d)}),{__BASEID:a.__BASEID,__UNIQID:a.__UNIQID,dataClassByCollectionName:Object.fromEntries(s.entries()),methods:a.methods||[],dataClasses:Object.fromEntries(i.entries())}}catch{return n("Error while loading the catalog")}}),_I=nr({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(wn.pending,()=>({state:"loading"})).addCase(wn.fulfilled,(n,{payload:t})=>({state:"loaded",model:t})).addCase(wn.rejected,(n,t)=>({state:"error",error:t.payload||"Error while loading the catalog"}))}}),EI=_I.reducer,SI=Pg.reducer,Zo=Q("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:n})=>{try{return await b.getSharedDatasources()}catch{return n("Error while loading the shared datasources")}}),wv=Q("shared_datasources/addSharedSource",async(e,{rejectWithValue:n,getState:t})=>{try{const a=JSON.parse(JSON.stringify(t().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 b.setSharedSources(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),Tv=Q("shared_datasources/editSharedSource",async(e,{rejectWithValue:n,getState:t})=>{try{const a=t().sharedDatasources;if(!e.namespace)return n("Namespace is required");if(a.sources[e.namespace])a.sources[e.namespace]=a.sources[e.namespace].map(s=>s.id===e.id?{...e,id:s.id}:s);else return n("Namespace not found");return await b.setSharedSources(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),Cv=Q("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:n,getState:t})=>{try{const a={...t().sharedDatasources};if(a.sources[e.namespace]){const s=a.sources[e.namespace].filter(i=>i.id!==e.id);if(s.length===0){const{[e.namespace]:i,...c}=a.sources;a.sources=c}else a.sources={...a.sources,[e.namespace]:s}}return await b.setSharedSources(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),el=Q("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:n,getState:t})=>{try{const a={...t().sharedDatasources};for(const s of e){if(!s.namespace)return n("Namespace is required");if(a.sources[s.namespace])a.sources[s.namespace]=a.sources[s.namespace].map(i=>i.id===s.id?s:i);else return n("Namespace not found")}return await b.setSharedSources(a.sources),a.sources}catch{return n("Error while saving the shared datasources")}}),wI=Q("shared_datasources/setDatasourceEvents",async({tabPath:e,name:n,namespace:t,events:a},{getState:s,dispatch:i})=>{var E,T,x;const{root:{tabs:c},sharedDatasources:l}=s(),d=((x=(T=(E=c.find(({path:D})=>D===e))==null?void 0:E.content)==null?void 0:T.metadata)==null?void 0:x.datasources)||[],p={local:!1,shared:!1},h=(D,P)=>D.id===n&&(!t&&!D.namespace||D.namespace===t)?(P==null||P(),{...D,events:a}):D,y=d.map(D=>h(D,()=>{p.local=!0})),_=He.flatten(He.values(l.sources)).map(D=>h(D,()=>{p.shared=!0}));p.local&&i(hv({path:e,content:y,contentPath:"metadata.datasources"})),p.shared&&i(el(_))}),xv=nr({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,n){e.sources[n.payload.name]=[]}},extraReducers(e){e.addCase(Zo.pending,n=>({state:"loading",sources:{}})).addCase(Zo.fulfilled,(n,t)=>({state:"loaded",sources:t.payload})).addCase(Zo.rejected,(n,t)=>({state:"error",sources:{},error:t.payload||"Error while loading the shared datasources"})).addCase(el.fulfilled,(n,t)=>({state:"loaded",sources:t.payload})).addCase(zc.fulfilled,(n,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace&&Object.assign(n.sources,{[s.namespace]:a})}).addCase(wv.fulfilled,(n,t)=>({...n,sources:t.payload})).addCase(Cv.fulfilled,(n,t)=>({...n,sources:t.payload})).addCase(Tv.fulfilled,(n,t)=>({...n,sources:t.payload})).addCase(Yc.fulfilled,(n,t)=>{if(!t.payload)return n;const{datasources:a,namespace:s}=t.payload;s&&n.sources[s]&&Object.assign(n.sources[s],{[s]:a})}).addMatcher(dr(Xc.fulfilled,Ia.fulfilled,Zc.fulfilled,zn.fulfilled),(n,t)=>{if(!t.payload)return;const{namespace:a,list:s}=t.payload;a&&Object.assign(n.sources,{[a]:s})})}}),{addEmptyNamespace:TI}=xv.actions,CI=xv.reducer,xI=Wg.reducer,Qo=Q("shared_css/fetchSharedCSS",async(e,{rejectWithValue:n})=>{try{const{classes:t}=await b.getSharedCSS();return t}catch{return n("Error while loading the shared CSS")}}),RI=b.queue();async function OI(e){const n={verb:b.DesignerRequestVerb.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:t,...a})=>({...a}))}};await RI(()=>b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify(n),headers:new Headers({"Content-Type":"application/json"})}))}const Rv=nr({name:"shared-css",initialState:()=>{const{sharedCSS:e}=Kn();return e||{state:"loading",styles:[]}},reducers:{updateSharedCss:(e,n)=>(e.styles=n.payload.classes,OI(n.payload.classes),e),initSharedCss:(e,n)=>(e.styles=n.payload.classes,e)},extraReducers(e){e.addCase(Qo.pending,n=>({...n,state:"loading"})).addCase(Qo.fulfilled,(n,{payload:t})=>({state:"loaded",styles:t})).addCase(Qo.rejected,(n,t)=>({...n,state:"error",error:t.payload||"Error while loading the shared css"}))}}),{updateSharedCss:AI,initSharedCss:PI}=Rv.actions,DI=Rv.reducer,II={},FI=nr({name:"tabs",initialState:II,reducers:{}}),$I=e=>G(ta,n=>{var t,a;return(a=(t=n.find(s=>s.path===e))==null?void 0:t.view)==null?void 0:a.panel});FI.reducer;const Ov=Vp({root:Sv,explorer:xI,debugger:bI,settings:$P,catalog:EI,roles:PP,sharedDatasources:CI,webforms:XD,modals:SI,sharedCSS:DI,model:qD});let Ta;const Av=()=>(Ta||(Ta=Mw({reducer:Ov}),Ta.subscribe(VT(()=>{const{root:{activeTab:e,tabs:n,recent:t},roles:a,debugger:s,webforms:i,sharedCSS:c,settings:{session:l}}=Ta.getState();hh({...l}),ph({tabs:n,activeTab:e,recent:t,roles:a,debugger:s,webforms:i,sharedCSS:c})},1e3))),Ta);var fc={exports:{}},Un={};/** @license React v17.0.2
104
+ `);a.extra={...a.extra,editor:b.EDITOR.Code,initialLineInfo:{line:s.length-1,lastModification:Date.now()}}}),e.addCase(Yc.fulfilled,(r,t)=>{var i,c;if(!((i=t.payload)!=null&&i.path)||(c=t.payload)!=null&&c.namespace)return;const a=t.payload.path,s=r.tabs.find(b.by("path",a));!s||!s.content||!s.content.metadata||(Object.assign(s.content.metadata,{datasources:t.payload.datasources}),s.flags.touched=!0,s.flags.confirmed=!0)}),e.addCase(zc.fulfilled,(r,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace||r.tabs.forEach(i=>{i.path===s.path&&Object.assign(i.content,{metadata:{...i.content.metadata,datasources:a}})})}),e.addCase(rv.fulfilled,(r,t)=>{const{staleThreadIds:a}=t.payload;if(a.length===0)return;const s=a.map(i=>`Debugger/${i}`);if(r.tabs=r.tabs.filter(i=>!s.includes(i.path)),r.recent=r.recent.filter(({path:i})=>!s.includes(i)),r.tabs.length){r.activeTab=r.tabs[r.tabs.length-1].path;return}r.activeTab=""}),e.addCase(Gc.pending,r=>Mu(r,!1)),e.addMatcher(dr(ac),(r,t)=>{["project"].includes(t.payload.path)&&Mu(r,!0)}),e.addMatcher(dr(ks),(r,t)=>{Mu(r,!1)}),e.addMatcher(dr(Ev,Pt),(r,t)=>{const{payload:a}=t;let s;typeof a=="string"?s=r.tabs.find(({path:i})=>a===i):s=a,s&&(r.recent=[s,...r.recent.filter(({path:i})=>![s.path,"settings"].includes(i))])}),e.addMatcher(dr(Bg,jg),(r,t)=>{r.tabs=r.tabs.map(a=>a.path===b.ROLES_TAB_PATH?{...a,flags:{...a.flags,confirmed:!0,touched:!0}}:a)}),e.addMatcher(dr(Hc),(r,t)=>{r.tabs=r.tabs.map(a=>a.path===b.ROLES_TAB_PATH?{...a,flags:{...a.flags,touched:!1}}:a)}),e.addMatcher(dr(Xc.fulfilled,Zc.fulfilled,Ia.fulfilled,Vn.fulfilled),(r,t)=>{var s,i,c;const a=r.tabs.find(b.by("path",((s=t.payload)==null?void 0:s.path)||t.meta.arg.path));!a||(i=t.payload)!=null&&i.namespace||(a.flags.touched=!0,a.flags.confirmed=!0,Object.assign(a.content,{metadata:{...a.content.metadata,datasources:(c=t.payload)==null?void 0:c.list}}))}),e.addMatcher(dr(Ia.fulfilled,Vn.fulfilled),(r,t)=>{var l;const a=r.tabs.find(b.by("path",((l=t.payload)==null?void 0:l.path)||t.meta.arg.path));if(!a)return;const{panel:s}=a.view,i=b.getDatasourceId({id:t.meta.arg.id,namespace:t.meta.arg.namespace});if(s.type==="datasource"&&s.current===i)switch(t.type){case Ia.fulfilled.type:Object.assign(a.view.panel,{type:"component",current:pR});break;case Vn.fulfilled.type:const d=b.getDatasourceId({id:t.meta.arg.new_name,namespace:t.meta.arg.namespace});Object.assign(a.view.panel,{type:"datasource",current:d});break}})}}),{setTabs:lI,closeTab:Qc,setContent:el,setTabFlags:vv,setTabsFlags:fI,setTabExtra:dI,closeAllTabs:yv,addDataSource:pI,closeRightTabs:mv,closeOthers:bv,closeLeftTabs:_v,closeSavedTabs:hI,setDataSources:gI,removeDataSource:vI,confirmTab:yI,selectTab:Ev,selectTabByReference:Pt,openTabUnselected:Sv,addWebFormStyles:mI,changeTabEditor:bI,openSettingsTab:_I,setPanelState:EI,addWebformState:SI,editWebformState:wI,removeWebformState:TI,setHistoryContent:wv,unlockHistory:Tv,undo:CI,redo:xI}=ka.actions,Cv=ka.reducer,RI=Qg.reducer,wn=Q("catalog/fetchCatalog",async(e,{rejectWithValue:r})=>{var t;try{const a=await b.getCatalog(),s=new Map,i=new Map;return(t=a==null?void 0:a.dataClasses)==null||t.forEach(({methods:c=[],...l})=>{if(l.uuid||Object.assign(l,{uuid:b.generateUUID()}),l.attributes){const p=["storage","relatedEntity"];l.attributes=l.attributes.map(h=>(p.includes(h.kind)&&!h.uuid&&Object.assign(h,{uuid:b.generateUUID()}),h))}const d={...l,methods:c};i.set(l.className,d),s.set(l.collectionName,d)}),{__BASEID:a.__BASEID,__UNIQID:a.__UNIQID,dataClassByCollectionName:Object.fromEntries(s.entries()),methods:a.methods||[],dataClasses:Object.fromEntries(i.entries())}}catch{return r("Error while loading the catalog")}}),OI=nr({name:"catalog",initialState:{state:"loading"},reducers:{},extraReducers(e){e.addCase(wn.pending,()=>({state:"loading"})).addCase(wn.fulfilled,(r,{payload:t})=>({state:"loaded",model:t})).addCase(wn.rejected,(r,t)=>({state:"error",error:t.payload||"Error while loading the catalog"}))}}),AI=OI.reducer,PI=Ig.reducer,Zo=Q("shared_datasources/fetchSharedSources",async(e,{rejectWithValue:r})=>{try{return await b.getSharedDatasources()}catch{return r("Error while loading the shared datasources")}}),xv=Q("shared_datasources/addSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a=JSON.parse(JSON.stringify(t().sharedDatasources));if(e.namespace)a.sources[e.namespace]?a.sources[e.namespace].push(e):a.sources[e.namespace]=[e];else return r("Namespace is required");return await b.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),Rv=Q("shared_datasources/editSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a=t().sharedDatasources;if(!e.namespace)return r("Namespace is required");if(a.sources[e.namespace])a.sources[e.namespace]=a.sources[e.namespace].map(s=>s.id===e.id?{...e,id:s.id}:s);else return r("Namespace not found");return await b.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),Ov=Q("shared_datasources/deleteSharedSource",async(e,{rejectWithValue:r,getState:t})=>{try{const a={...t().sharedDatasources};if(a.sources[e.namespace]){const s=a.sources[e.namespace].filter(i=>i.id!==e.id);if(s.length===0){const{[e.namespace]:i,...c}=a.sources;a.sources=c}else a.sources={...a.sources,[e.namespace]:s}}return await b.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),tl=Q("shared_datasources/updateSharedDatasources",async(e,{rejectWithValue:r,getState:t})=>{try{const a={...t().sharedDatasources};for(const s of e){if(!s.namespace)return r("Namespace is required");if(a.sources[s.namespace])a.sources[s.namespace]=a.sources[s.namespace].map(i=>i.id===s.id?s:i);else return r("Namespace not found")}return await b.setSharedSources(a.sources),a.sources}catch{return r("Error while saving the shared datasources")}}),DI=Q("shared_datasources/setDatasourceEvents",async({tabPath:e,name:r,namespace:t,events:a},{getState:s,dispatch:i})=>{var E,T,x;const{root:{tabs:c},sharedDatasources:l}=s(),d=((x=(T=(E=c.find(({path:D})=>D===e))==null?void 0:E.content)==null?void 0:T.metadata)==null?void 0:x.datasources)||[],p={local:!1,shared:!1},h=(D,P)=>D.id===r&&(!t&&!D.namespace||D.namespace===t)?(P==null||P(),{...D,events:a}):D,m=d.map(D=>h(D,()=>{p.local=!0})),_=We.flatten(We.values(l.sources)).map(D=>h(D,()=>{p.shared=!0}));p.local&&i(el({path:e,content:m,contentPath:"metadata.datasources"})),p.shared&&i(tl(_))}),Av=nr({name:"shared-datasources",initialState:{},reducers:{addEmptyNamespace(e,r){e.sources[r.payload.name]=[]}},extraReducers(e){e.addCase(Zo.pending,r=>({state:"loading",sources:{}})).addCase(Zo.fulfilled,(r,t)=>({state:"loaded",sources:t.payload})).addCase(Zo.rejected,(r,t)=>({state:"error",sources:{},error:t.payload||"Error while loading the shared datasources"})).addCase(tl.fulfilled,(r,t)=>({state:"loaded",sources:t.payload})).addCase(zc.fulfilled,(r,t)=>{const{payload:a,meta:{arg:s}}=t;s.namespace&&Object.assign(r.sources,{[s.namespace]:a})}).addCase(xv.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(Ov.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(Rv.fulfilled,(r,t)=>({...r,sources:t.payload})).addCase(Yc.fulfilled,(r,t)=>{if(!t.payload)return r;const{datasources:a,namespace:s}=t.payload;s&&r.sources[s]&&Object.assign(r.sources[s],{[s]:a})}).addMatcher(dr(Xc.fulfilled,Ia.fulfilled,Zc.fulfilled,Vn.fulfilled),(r,t)=>{if(!t.payload)return;const{namespace:a,list:s}=t.payload;a&&Object.assign(r.sources,{[a]:s})})}}),{addEmptyNamespace:II}=Av.actions,FI=Av.reducer,$I=Hg.reducer,Qo=Q("shared_css/fetchSharedCSS",async(e,{rejectWithValue:r})=>{try{const{classes:t}=await b.getSharedCSS();return t}catch{return r("Error while loading the shared CSS")}}),MI=b.queue();async function LI(e){const r={verb:b.DesignerRequestVerb.SET_FILE_CONTENT,asText:!1,name:"shared_css.json",path:"",root:"shared",content:{classes:e.map(({scope:t,...a})=>({...a}))}};await MI(()=>b.http(b.API_PREFIX,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}))}const Pv=nr({name:"shared-css",initialState:()=>{const{sharedCSS:e}=Jn();return e||{state:"loading",styles:[]}},reducers:{updateSharedCss:(e,r)=>(e.styles=r.payload.classes,LI(r.payload.classes),e),initSharedCss:(e,r)=>(e.styles=r.payload.classes,e)},extraReducers(e){e.addCase(Qo.pending,r=>({...r,state:"loading"})).addCase(Qo.fulfilled,(r,{payload:t})=>({state:"loaded",styles:t})).addCase(Qo.rejected,(r,t)=>({...r,state:"error",error:t.payload||"Error while loading the shared css"}))}}),{updateSharedCss:NI,initSharedCss:kI}=Pv.actions,jI=Pv.reducer,BI={},WI=nr({name:"tabs",initialState:BI,reducers:{}}),UI=e=>H(ra,r=>{var t,a;return(a=(t=r.find(s=>s.path===e))==null?void 0:t.view)==null?void 0:a.panel});WI.reducer;const Dv=Kp({root:Cv,explorer:$I,debugger:RI,settings:kP,catalog:AI,roles:$P,sharedDatasources:FI,webforms:nI,modals:PI,sharedCSS:jI,model:XD});let Ta;const Iv=()=>(Ta||(Ta=kw({reducer:Dv}),Ta.subscribe(XT(()=>{const{root:{activeTab:e,tabs:r,recent:t},roles:a,debugger:s,webforms:i,sharedCSS:c,settings:{session:l}}=Ta.getState();gh({...l}),hh({tabs:r,activeTab:e,recent:t,roles:a,debugger:s,webforms:i,sharedCSS:c})},1e3))),Ta);var fc={exports:{}},Hn={};/** @license React v17.0.2
105
105
  * react-jsx-runtime.production.min.js
106
106
  *
107
107
  * Copyright (c) Facebook, Inc. and its affiliates.
108
108
  *
109
109
  * This source code is licensed under the MIT license found in the
110
110
  * LICENSE file in the root directory of this source tree.
111
- */var Wp;function MI(){if(Wp)return Un;Wp=1,Rc();var e=pt,n=60103;if(Un.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;n=t("react.element"),Un.Fragment=t("react.fragment")}var a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function c(l,d,p){var h,y={},_=null,E=null;p!==void 0&&(_=""+p),d.key!==void 0&&(_=""+d.key),d.ref!==void 0&&(E=d.ref);for(h in d)s.call(d,h)&&!i.hasOwnProperty(h)&&(y[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)y[h]===void 0&&(y[h]=d[h]);return{$$typeof:n,type:l,key:_,ref:E,props:y,_owner:a.current}}return Un.jsx=c,Un.jsxs=c,Un}var Lu={};/** @license React v17.0.2
111
+ */var Up;function HI(){if(Up)return Hn;Up=1,Rc();var e=pt,r=60103;if(Hn.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var t=Symbol.for;r=t("react.element"),Hn.Fragment=t("react.fragment")}var a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,i={key:!0,ref:!0,__self:!0,__source:!0};function c(l,d,p){var h,m={},_=null,E=null;p!==void 0&&(_=""+p),d.key!==void 0&&(_=""+d.key),d.ref!==void 0&&(E=d.ref);for(h in d)s.call(d,h)&&!i.hasOwnProperty(h)&&(m[h]=d[h]);if(l&&l.defaultProps)for(h in d=l.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:r,type:l,key:_,ref:E,props:m,_owner:a.current}}return Hn.jsx=c,Hn.jsxs=c,Hn}var Lu={};/** @license React v17.0.2
112
112
  * react-jsx-runtime.development.js
113
113
  *
114
114
  * Copyright (c) Facebook, Inc. and its affiliates.
115
115
  *
116
116
  * This source code is licensed under the MIT license found in the
117
117
  * LICENSE file in the root directory of this source tree.
118
- */var Up;function LI(){return Up||(Up=1,function(e){process.env.NODE_ENV!=="production"&&function(){var n=pt,t=Rc(),a=60103,s=60106;e.Fragment=60107;var i=60108,c=60114,l=60109,d=60110,p=60112,h=60113,y=60120,_=60115,E=60116,T=60121,x=60122,D=60117,P=60129,j=60131;if(typeof Symbol=="function"&&Symbol.for){var M=Symbol.for;a=M("react.element"),s=M("react.portal"),e.Fragment=M("react.fragment"),i=M("react.strict_mode"),c=M("react.profiler"),l=M("react.provider"),d=M("react.context"),p=M("react.forward_ref"),h=M("react.suspense"),y=M("react.suspense_list"),_=M("react.memo"),E=M("react.lazy"),T=M("react.block"),x=M("react.server.block"),D=M("react.fundamental"),M("react.scope"),M("react.opaque.id"),P=M("react.debug_trace_mode"),M("react.offscreen"),j=M("react.legacy_hidden")}var k=typeof Symbol=="function"&&Symbol.iterator,O="@@iterator";function z(w){if(w===null||typeof w!="object")return null;var U=k&&w[k]||w[O];return typeof U=="function"?U:null}var H=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(w){{for(var U=arguments.length,J=new Array(U>1?U-1:0),ie=1;ie<U;ie++)J[ie-1]=arguments[ie];te("error",w,J)}}function te(w,U,J){{var ie=H.ReactDebugCurrentFrame,Le=ie.getStackAddendum();Le!==""&&(U+="%s",J=J.concat([Le]));var Ne=J.map(function(Ce){return""+Ce});Ne.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Ne)}}var We=!1;function Te(w){return!!(typeof w=="string"||typeof w=="function"||w===e.Fragment||w===c||w===P||w===i||w===h||w===y||w===j||We||typeof w=="object"&&w!==null&&(w.$$typeof===E||w.$$typeof===_||w.$$typeof===l||w.$$typeof===d||w.$$typeof===p||w.$$typeof===D||w.$$typeof===T||w[0]===x))}function st(w,U,J){var ie=U.displayName||U.name||"";return w.displayName||(ie!==""?J+"("+ie+")":J)}function X(w){return w.displayName||"Context"}function Pe(w){if(w==null)return null;if(typeof w.tag=="number"&&Y("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case e.Fragment:return"Fragment";case s:return"Portal";case c:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case y:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case d:var U=w;return X(U)+".Consumer";case l:var J=w;return X(J._context)+".Provider";case p:return st(w,w.render,"ForwardRef");case _:return Pe(w.type);case T:return Pe(w._render);case E:{var ie=w,Le=ie._payload,Ne=ie._init;try{return Pe(Ne(Le))}catch{return null}}}return null}var it=0,Qe,Ge,rt,qt,W,q,de;function le(){}le.__reactDisabledLog=!0;function se(){{if(it===0){Qe=console.log,Ge=console.info,rt=console.warn,qt=console.error,W=console.group,q=console.groupCollapsed,de=console.groupEnd;var w={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}it++}}function fe(){{if(it--,it===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},w,{value:Qe}),info:t({},w,{value:Ge}),warn:t({},w,{value:rt}),error:t({},w,{value:qt}),group:t({},w,{value:W}),groupCollapsed:t({},w,{value:q}),groupEnd:t({},w,{value:de})})}it<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=H.ReactCurrentDispatcher,ce;function ue(w,U,J){{if(ce===void 0)try{throw Error()}catch(Le){var ie=Le.stack.trim().match(/\n( *(at )?)/);ce=ie&&ie[1]||""}return`
118
+ */var Hp;function GI(){return Hp||(Hp=1,function(e){process.env.NODE_ENV!=="production"&&function(){var r=pt,t=Rc(),a=60103,s=60106;e.Fragment=60107;var i=60108,c=60114,l=60109,d=60110,p=60112,h=60113,m=60120,_=60115,E=60116,T=60121,x=60122,D=60117,P=60129,j=60131;if(typeof Symbol=="function"&&Symbol.for){var M=Symbol.for;a=M("react.element"),s=M("react.portal"),e.Fragment=M("react.fragment"),i=M("react.strict_mode"),c=M("react.profiler"),l=M("react.provider"),d=M("react.context"),p=M("react.forward_ref"),h=M("react.suspense"),m=M("react.suspense_list"),_=M("react.memo"),E=M("react.lazy"),T=M("react.block"),x=M("react.server.block"),D=M("react.fundamental"),M("react.scope"),M("react.opaque.id"),P=M("react.debug_trace_mode"),M("react.offscreen"),j=M("react.legacy_hidden")}var k=typeof Symbol=="function"&&Symbol.iterator,O="@@iterator";function z(w){if(w===null||typeof w!="object")return null;var U=k&&w[k]||w[O];return typeof U=="function"?U:null}var G=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(w){{for(var U=arguments.length,J=new Array(U>1?U-1:0),ie=1;ie<U;ie++)J[ie-1]=arguments[ie];te("error",w,J)}}function te(w,U,J){{var ie=G.ReactDebugCurrentFrame,Le=ie.getStackAddendum();Le!==""&&(U+="%s",J=J.concat([Le]));var Ne=J.map(function(Ce){return""+Ce});Ne.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Ne)}}var Ue=!1;function Te(w){return!!(typeof w=="string"||typeof w=="function"||w===e.Fragment||w===c||w===P||w===i||w===h||w===m||w===j||Ue||typeof w=="object"&&w!==null&&(w.$$typeof===E||w.$$typeof===_||w.$$typeof===l||w.$$typeof===d||w.$$typeof===p||w.$$typeof===D||w.$$typeof===T||w[0]===x))}function st(w,U,J){var ie=U.displayName||U.name||"";return w.displayName||(ie!==""?J+"("+ie+")":J)}function X(w){return w.displayName||"Context"}function Pe(w){if(w==null)return null;if(typeof w.tag=="number"&&Y("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case e.Fragment:return"Fragment";case s:return"Portal";case c:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case m:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case d:var U=w;return X(U)+".Consumer";case l:var J=w;return X(J._context)+".Provider";case p:return st(w,w.render,"ForwardRef");case _:return Pe(w.type);case T:return Pe(w._render);case E:{var ie=w,Le=ie._payload,Ne=ie._init;try{return Pe(Ne(Le))}catch{return null}}}return null}var it=0,Qe,Ge,rt,qt,W,q,de;function le(){}le.__reactDisabledLog=!0;function se(){{if(it===0){Qe=console.log,Ge=console.info,rt=console.warn,qt=console.error,W=console.group,q=console.groupCollapsed,de=console.groupEnd;var w={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}it++}}function fe(){{if(it--,it===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:t({},w,{value:Qe}),info:t({},w,{value:Ge}),warn:t({},w,{value:rt}),error:t({},w,{value:qt}),group:t({},w,{value:W}),groupCollapsed:t({},w,{value:q}),groupEnd:t({},w,{value:de})})}it<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=G.ReactCurrentDispatcher,ce;function ue(w,U,J){{if(ce===void 0)try{throw Error()}catch(Le){var ie=Le.stack.trim().match(/\n( *(at )?)/);ce=ie&&ie[1]||""}return`
119
119
  `+ce+w}}var he=!1,ge;{var K=typeof WeakMap=="function"?WeakMap:Map;ge=new K}function F(w,U){if(!w||he)return"";{var J=ge.get(w);if(J!==void 0)return J}var ie;he=!0;var Le=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ne;Ne=ne.current,ne.current=null,se();try{if(U){var Ce=function(){throw Error()};if(Object.defineProperty(Ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ce,[])}catch(sr){ie=sr}Reflect.construct(w,[],Ce)}else{try{Ce.call()}catch(sr){ie=sr}w.call(Ce.prototype)}}else{try{throw Error()}catch(sr){ie=sr}w()}}catch(sr){if(sr&&ie&&typeof sr.stack=="string"){for(var Ee=sr.stack.split(`
120
120
  `),ht=ie.stack.split(`
121
121
  `),Xe=Ee.length-1,et=ht.length-1;Xe>=1&&et>=0&&Ee[Xe]!==ht[et];)et--;for(;Xe>=1&&et>=0;Xe--,et--)if(Ee[Xe]!==ht[et]){if(Xe!==1||et!==1)do if(Xe--,et--,et<0||Ee[Xe]!==ht[et]){var zt=`
122
- `+Ee[Xe].replace(" at new "," at ");return typeof w=="function"&&ge.set(w,zt),zt}while(Xe>=1&&et>=0);break}}}finally{he=!1,ne.current=Ne,fe(),Error.prepareStackTrace=Le}var Ur=w?w.displayName||w.name:"",Xa=Ur?ue(Ur):"";return typeof w=="function"&&ge.set(w,Xa),Xa}function ze(w,U,J){return F(w,!1)}function qe(w){var U=w.prototype;return!!(U&&U.isReactComponent)}function yt(w,U,J){if(w==null)return"";if(typeof w=="function")return F(w,qe(w));if(typeof w=="string")return ue(w);switch(w){case h:return ue("Suspense");case y:return ue("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case p:return ze(w.render);case _:return yt(w.type,U,J);case T:return ze(w._render);case E:{var ie=w,Le=ie._payload,Ne=ie._init;try{return yt(Ne(Le),U,J)}catch{}}}return""}var Ha={},Yt=H.ReactDebugCurrentFrame;function nn(w){if(w){var U=w._owner,J=yt(w.type,w._source,U?U.type:null);Yt.setExtraStackFrame(J)}else Yt.setExtraStackFrame(null)}function Ws(w,U,J,ie,Le){{var Ne=Function.call.bind(Object.prototype.hasOwnProperty);for(var Ce in w)if(Ne(w,Ce)){var Ee=void 0;try{if(typeof w[Ce]!="function"){var ht=Error((ie||"React class")+": "+J+" type `"+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[Ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ht.name="Invariant Violation",ht}Ee=w[Ce](U,Ce,ie,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xe){Ee=Xe}Ee&&!(Ee instanceof Error)&&(nn(Le),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ie||"React class",J,Ce,typeof Ee),nn(null)),Ee instanceof Error&&!(Ee.message in Ha)&&(Ha[Ee.message]=!0,nn(Le),Y("Failed %s type: %s",J,Ee.message),nn(null))}}}var or=H.ReactCurrentOwner,xt=Object.prototype.hasOwnProperty,an={key:!0,ref:!0,__self:!0,__source:!0},on,Ga,Sr;Sr={};function Us(w){if(xt.call(w,"ref")){var U=Object.getOwnPropertyDescriptor(w,"ref").get;if(U&&U.isReactWarning)return!1}return w.ref!==void 0}function sn(w){if(xt.call(w,"key")){var U=Object.getOwnPropertyDescriptor(w,"key").get;if(U&&U.isReactWarning)return!1}return w.key!==void 0}function Wr(w,U){if(typeof w.ref=="string"&&or.current&&U&&or.current.stateNode!==U){var J=Pe(or.current.type);Sr[J]||(Y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Pe(or.current.type),w.ref),Sr[J]=!0)}}function na(w,U){{var J=function(){on||(on=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};J.isReactWarning=!0,Object.defineProperty(w,"key",{get:J,configurable:!0})}}function aa(w,U){{var J=function(){Ga||(Ga=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};J.isReactWarning=!0,Object.defineProperty(w,"ref",{get:J,configurable:!0})}}var oa=function(w,U,J,ie,Le,Ne,Ce){var Ee={$$typeof:a,type:w,key:U,ref:J,props:Ce,_owner:Ne};return Ee._store={},Object.defineProperty(Ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(Ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Le}),Object.freeze&&(Object.freeze(Ee.props),Object.freeze(Ee)),Ee};function sa(w,U,J,ie,Le){{var Ne,Ce={},Ee=null,ht=null;J!==void 0&&(Ee=""+J),sn(U)&&(Ee=""+U.key),Us(U)&&(ht=U.ref,Wr(U,Le));for(Ne in U)xt.call(U,Ne)&&!an.hasOwnProperty(Ne)&&(Ce[Ne]=U[Ne]);if(w&&w.defaultProps){var Xe=w.defaultProps;for(Ne in Xe)Ce[Ne]===void 0&&(Ce[Ne]=Xe[Ne])}if(Ee||ht){var et=typeof w=="function"?w.displayName||w.name||"Unknown":w;Ee&&na(Ce,et),ht&&aa(Ce,et)}return oa(w,Ee,ht,Le,ie,or.current,Ce)}}var un=H.ReactCurrentOwner,Cn=H.ReactDebugCurrentFrame;function gr(w){if(w){var U=w._owner,J=yt(w.type,w._source,U?U.type:null);Cn.setExtraStackFrame(J)}else Cn.setExtraStackFrame(null)}var cn;cn=!1;function ln(w){return typeof w=="object"&&w!==null&&w.$$typeof===a}function qa(){{if(un.current){var w=Pe(un.current.type);if(w)return`
122
+ `+Ee[Xe].replace(" at new "," at ");return typeof w=="function"&&ge.set(w,zt),zt}while(Xe>=1&&et>=0);break}}}finally{he=!1,ne.current=Ne,fe(),Error.prepareStackTrace=Le}var Ur=w?w.displayName||w.name:"",Xa=Ur?ue(Ur):"";return typeof w=="function"&&ge.set(w,Xa),Xa}function ze(w,U,J){return F(w,!1)}function qe(w){var U=w.prototype;return!!(U&&U.isReactComponent)}function mt(w,U,J){if(w==null)return"";if(typeof w=="function")return F(w,qe(w));if(typeof w=="string")return ue(w);switch(w){case h:return ue("Suspense");case m:return ue("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case p:return ze(w.render);case _:return mt(w.type,U,J);case T:return ze(w._render);case E:{var ie=w,Le=ie._payload,Ne=ie._init;try{return mt(Ne(Le),U,J)}catch{}}}return""}var Ha={},Yt=G.ReactDebugCurrentFrame;function nn(w){if(w){var U=w._owner,J=mt(w.type,w._source,U?U.type:null);Yt.setExtraStackFrame(J)}else Yt.setExtraStackFrame(null)}function Ws(w,U,J,ie,Le){{var Ne=Function.call.bind(Object.prototype.hasOwnProperty);for(var Ce in w)if(Ne(w,Ce)){var Ee=void 0;try{if(typeof w[Ce]!="function"){var ht=Error((ie||"React class")+": "+J+" type `"+Ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[Ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ht.name="Invariant Violation",ht}Ee=w[Ce](U,Ce,ie,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xe){Ee=Xe}Ee&&!(Ee instanceof Error)&&(nn(Le),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ie||"React class",J,Ce,typeof Ee),nn(null)),Ee instanceof Error&&!(Ee.message in Ha)&&(Ha[Ee.message]=!0,nn(Le),Y("Failed %s type: %s",J,Ee.message),nn(null))}}}var or=G.ReactCurrentOwner,xt=Object.prototype.hasOwnProperty,an={key:!0,ref:!0,__self:!0,__source:!0},on,Ga,Sr;Sr={};function Us(w){if(xt.call(w,"ref")){var U=Object.getOwnPropertyDescriptor(w,"ref").get;if(U&&U.isReactWarning)return!1}return w.ref!==void 0}function sn(w){if(xt.call(w,"key")){var U=Object.getOwnPropertyDescriptor(w,"key").get;if(U&&U.isReactWarning)return!1}return w.key!==void 0}function Wr(w,U){if(typeof w.ref=="string"&&or.current&&U&&or.current.stateNode!==U){var J=Pe(or.current.type);Sr[J]||(Y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Pe(or.current.type),w.ref),Sr[J]=!0)}}function na(w,U){{var J=function(){on||(on=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};J.isReactWarning=!0,Object.defineProperty(w,"key",{get:J,configurable:!0})}}function aa(w,U){{var J=function(){Ga||(Ga=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};J.isReactWarning=!0,Object.defineProperty(w,"ref",{get:J,configurable:!0})}}var oa=function(w,U,J,ie,Le,Ne,Ce){var Ee={$$typeof:a,type:w,key:U,ref:J,props:Ce,_owner:Ne};return Ee._store={},Object.defineProperty(Ee._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ee,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ie}),Object.defineProperty(Ee,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Le}),Object.freeze&&(Object.freeze(Ee.props),Object.freeze(Ee)),Ee};function sa(w,U,J,ie,Le){{var Ne,Ce={},Ee=null,ht=null;J!==void 0&&(Ee=""+J),sn(U)&&(Ee=""+U.key),Us(U)&&(ht=U.ref,Wr(U,Le));for(Ne in U)xt.call(U,Ne)&&!an.hasOwnProperty(Ne)&&(Ce[Ne]=U[Ne]);if(w&&w.defaultProps){var Xe=w.defaultProps;for(Ne in Xe)Ce[Ne]===void 0&&(Ce[Ne]=Xe[Ne])}if(Ee||ht){var et=typeof w=="function"?w.displayName||w.name||"Unknown":w;Ee&&na(Ce,et),ht&&aa(Ce,et)}return oa(w,Ee,ht,Le,ie,or.current,Ce)}}var un=G.ReactCurrentOwner,xn=G.ReactDebugCurrentFrame;function gr(w){if(w){var U=w._owner,J=mt(w.type,w._source,U?U.type:null);xn.setExtraStackFrame(J)}else xn.setExtraStackFrame(null)}var cn;cn=!1;function ln(w){return typeof w=="object"&&w!==null&&w.$$typeof===a}function qa(){{if(un.current){var w=Pe(un.current.type);if(w)return`
123
123
 
124
124
  Check the render method of \``+w+"`."}return""}}function Hs(w){{if(w!==void 0){var U=w.fileName.replace(/^.*[\\\/]/,""),J=w.lineNumber;return`
125
125
 
126
126
  Check your code at `+U+":"+J+"."}return""}}var Ya={};function za(w){{var U=qa();if(!U){var J=typeof w=="string"?w:w.displayName||w.name;J&&(U=`
127
127
 
128
- Check the top-level render call using <`+J+">.")}return U}}function ia(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var J=za(U);if(Ya[J])return;Ya[J]=!0;var ie="";w&&w._owner&&w._owner!==un.current&&(ie=" It was passed a child from "+Pe(w._owner.type)+"."),gr(w),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ie),gr(null)}}function Va(w,U){{if(typeof w!="object")return;if(Array.isArray(w))for(var J=0;J<w.length;J++){var ie=w[J];ln(ie)&&ia(ie,U)}else if(ln(w))w._store&&(w._store.validated=!0);else if(w){var Le=z(w);if(typeof Le=="function"&&Le!==w.entries)for(var Ne=Le.call(w),Ce;!(Ce=Ne.next()).done;)ln(Ce.value)&&ia(Ce.value,U)}}}function Gs(w){{var U=w.type;if(U==null||typeof U=="string")return;var J;if(typeof U=="function")J=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===p||U.$$typeof===_))J=U.propTypes;else return;if(J){var ie=Pe(U);Ws(J,w.props,"prop",ie,w)}else if(U.PropTypes!==void 0&&!cn){cn=!0;var Le=Pe(U);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Le||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qs(w){{for(var U=Object.keys(w.props),J=0;J<U.length;J++){var ie=U[J];if(ie!=="children"&&ie!=="key"){gr(w),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),gr(null);break}}w.ref!==null&&(gr(w),Y("Invalid attribute `ref` supplied to `React.Fragment`."),gr(null))}}function Ka(w,U,J,ie,Le,Ne){{var Ce=Te(w);if(!Ce){var Ee="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(Ee+=" 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 ht=Hs(Le);ht?Ee+=ht:Ee+=qa();var Xe;w===null?Xe="null":Array.isArray(w)?Xe="array":w!==void 0&&w.$$typeof===a?(Xe="<"+(Pe(w.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Xe=typeof w,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xe,Ee)}var et=sa(w,U,J,Le,Ne);if(et==null)return et;if(Ce){var zt=U.children;if(zt!==void 0)if(ie)if(Array.isArray(zt)){for(var Ur=0;Ur<zt.length;Ur++)Va(zt[Ur],w);Object.freeze&&Object.freeze(zt)}else Y("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 Va(zt,w)}return w===e.Fragment?qs(et):Gs(et),et}}function Ja(w,U,J){return Ka(w,U,J,!0)}function Ys(w,U,J){return Ka(w,U,J,!1)}var zs=Ys,Vs=Ja;e.jsx=zs,e.jsxs=Vs}()}(Lu)),Lu}process.env.NODE_ENV==="production"?fc.exports=MI():fc.exports=LI();var NI=fc.exports;const kI=({children:e,store:n})=>NI.jsx(Zh,{store:n,children:e});exports.CATALOG_REFRESH_DELAY=Ss;exports.DEFAULT_CACHE=wc;exports.EAttributeKind=Bs;exports.EAttributeTypes=rv;exports.EDebuggerErrorReason=ch;exports.EDebuggerErrorType=ss;exports.EDebuggerState=Ir;exports.EDisplayMode=Nc;exports.EPermissionType=Ae;exports.ETooltipBehavior=Mc;exports.EUnsavedPopOverChoice=Lc;exports.ExpressionIndex=uh;exports.FLAGS_INIT_STATE=sv;exports.FLAGS_KEYS=Na;exports.ROOT_WEBFORM_STATE=$c;exports.ReduxProvider=kI;exports.THEME_CLASSES=hg;exports.WT_FLAGS_KEYS=ov;exports.actionsToPrivs=Cg;exports.addBreakpointDecoration=nD;exports.addComponent=uv;exports.addCraftedComponent=eI;exports.addDataSource=iI;exports.addDatasource=Xc;exports.addEmptyNamespace=TI;exports.addExpression=lD;exports.addIn=cP;exports.addNewFile=Ug;exports.addPermission=gP;exports.addSession=mD;exports.addSharedSource=wv;exports.addWebFormStyles=dI;exports.addWebformState=vI;exports.allowed=iP;exports.attributeKinds=PD;exports.attributeScopes=$D;exports.attributeTypes=ID;exports.castToFileFolder=WP;exports.changeTabEditor=pI;exports.children=gs;exports.clearAllBreakpoints=uD;exports.clearBreakpoints=sD;exports.clearBreakpointsExcept=iD;exports.closeAllTabs=vv;exports.closeLeftTabs=bv;exports.closeModal=xP;exports.closeOthers=yv;exports.closeRightTabs=mv;exports.closeSavedTabs=uI;exports.closeTab=Qc;exports.confirmTab=fI;exports.create=Tg;exports.createModal=Dg;exports.createModelFiles=ic;exports.createNewFile=Gn;exports.createNewFileAndOpen=YP;exports.createNewNode=Jo;exports.createRole=wP;exports.createWithResource=fP;exports.dataclassScopes=FD;exports.deleteDatasource=Ia;exports.deleteFile=uc;exports.deleteFolder=zP;exports.deleteSharedSource=Cv;exports.deserializeModel=vh;exports.duplicateNode=Xo;exports.editComponent=cv;exports.editCraftedComponent=tI;exports.editDataSource=zc;exports.editDatasource=Zc;exports.editModal=RP;exports.editRole=SP;exports.editSharedSource=Tv;exports.editWebformState=mI;exports.editors=Nh;exports.executeMethod=VP;exports.expandFolder=NP;exports.extensions=kh;exports.fetchAppSettings=jg;exports.fetchCatalog=wn;exports.fetchChanges=Kg;exports.fetchCraftedComponents=pv;exports.fetchFiles=KP;exports.fetchFolderContent=_r;exports.fetchFolderContentWithoutExpanding=Aa;exports.fetchModel=Kc;exports.fetchRoles=vs;exports.fetchRolesChanges=Mg;exports.fetchSettings=Gc;exports.fetchSharedCss=Qo;exports.fetchSharedDatasources=Zo;exports.fetchTemplate=QD;exports.fetchTemplates=ZD;exports.findNodeByPath=lt;exports.findOne=Sn;exports.findSession=ot;exports.findSessionByPath=cg;exports.getCachedState=Kn;exports.getCashedPrefrences=gh;exports.getDebuggerTabName=Th;exports.getDebuggerTabPath=Cc;exports.getDefaultContent=Hg;exports.getDefaultName=ND;exports.getDictByName=Rg;exports.getEditors=pr;exports.getExtension=Bh;exports.getFilePath=Yg;exports.getFileType=qg;exports.getFilenameFromType=Gg;exports.getGraphData=hP;exports.getInheritedResources=Ag;exports.getModalTitle=ws;exports.getNodeRelativePath=jh;exports.getPrivilegeById=Br;exports.getPromotions=bP;exports.getResourceFromType=Bc;exports.getStore=Av;exports.indexTypes=MD;exports.initSharedCss=PI;exports.injectContentAtLine=zg;exports.inspect=zD;exports.isJSON=mh;exports.isRelatedAttr=kD;exports.isRelatedEntitiesAttr=av;exports.isRelatedEntityAttr=nv;exports.isRenameDatasource=nI;exports.isRolesOutdated=Wc;exports.isValidPrimaryKey=AD;exports.modelSubject=zh;exports.openAddFileInput=kP;exports.openFile=Pa;exports.openFileAtLine=qc;exports.openFileAtSelection=Vg;exports.openModal=ar;exports.openModel=CD;exports.openRoles=rD;exports.openSettingsTab=hI;exports.openTabUnselected=Ev;exports.parents=Ms;exports.populateShallow=pP;exports.primaryKeyAttributes=DD;exports.refactorWebform=yh;exports.refreshFile=jP;exports.reloadTab=lc;exports.relocateNode=Da;exports.remove=uP;exports.removeAllExpressions=pD;exports.removeBreakpointDecoration=aD;exports.removeComponent=lv;exports.removeCraftedComponent=rI;exports.removeDataSource=lI;exports.removeDebuggerSessionsNotIn=ev;exports.removeExpression=dD;exports.removeFile=sc;exports.removeFileNode=cc;exports.removeFrom=lP;exports.removeModal=Ig;exports.removePermission=vP;exports.removeRole=EP;exports.removeSession=bD;exports.removeSessionByIndex=_D;exports.removeWebformState=yI;exports.rename=dP;exports.renameDataSource=Yc;exports.renameDatasource=zn;exports.renameExpression=fD;exports.renameFile=qn;exports.resetResources=mP;exports.rootReducer=Sv;exports.sanitize=Ls;exports.sanitizePermissions=xg;exports.sanitizePrivileges=Sg;exports.saveAll=JP;exports.saveExpressions=vD;exports.saveModel=ms;exports.savePrefrences=hh;exports.saveRole=TP;exports.saveRoles=nc;exports.saveState=ph;exports.saveTab=Yn;exports.selectActiveLine=DO;exports.selectActiveTab=GO;exports.selectAllDatasourcesByPath=wO;exports.selectAppState=sg;exports.selectBreakpoints=xO;exports.selectCSSClassesByPath=_A;exports.selectCallChainVariables=BO;exports.selectCatalog=Ac;exports.selectCatalogMethods=mO;exports.selectCatalogState=gO;exports.selectClassBreakpoints=OO;exports.selectClassOffset=UO;exports.selectClasses=nA;exports.selectClassesFolder=pg;exports.selectComponents=vg;exports.selectComponentsByPath=EO;exports.selectContentByPath=lg;exports.selectCraftedComponent=xA;exports.selectCurrentFrameByThreadId=NO;exports.selectCurrentTab=YO;exports.selectDataclasses=ag;exports.selectDatasource=SO;exports.selectDatasourcesByPath=ig;exports.selectDatasourcesTheme=OA;exports.selectDebuggerChannels=kO;exports.selectDebuggerData=Tn;exports.selectDebuggerMeta=TO;exports.selectDebuggerSessions=Dt;exports.selectDebuggerSessionsCount=CO;exports.selectDebuggers=QO;exports.selectDraftBreakpoints=RO;exports.selectDraftClassBreakpoints=AO;exports.selectExceptions=HO;exports.selectExplorer=eA;exports.selectExpressions=IO;exports.selectExpressionsVariables=WO;exports.selectFlagsByPath=SA;exports.selectForceLogin=fA;exports.selectGuestPrivilege=uA;exports.selectHasTabs=KO;exports.selectHighlightedLines=PO;exports.selectInspectedCSSClass=wA;exports.selectInspectedDatasource=TA;exports.selectInspector=Ds;exports.selectInspectorStateByType=RA;exports.selectIsLoaded=AA;exports.selectMethods=tA;exports.selectMethodsFolder=dg;exports.selectModals=aA;exports.selectMonacoZoom=yA;exports.selectPanelByPath=$I;exports.selectPartialSessionSettings=pA;exports.selectPreferences=gA;exports.selectPreviewedWebformsPaths=VO;exports.selectPrivileges=iA;exports.selectProjectSettings=hA;exports.selectQodly=mA;exports.selectRecentFiles=qO;exports.selectRemoteDebuggerMode=vA;exports.selectRoles=sA;exports.selectRolesAndPrivileges=oA;exports.selectRolesDate=dA;exports.selectRolesFlags=cA;exports.selectRoot=jr;exports.selectSelectedTab=lA;exports.selectServerSettings=Ic;exports.selectSessionSettings=Dc;exports.selectSharedCSS=EA;exports.selectSharedDatasources=ug;exports.selectSourceByPath=$O;exports.selectSourceByThreadId=LO;exports.selectStackFrames=jO;exports.selectStoppedFromDebugSession=FO;exports.selectStylesByPath=bA;exports.selectTab=_v;exports.selectTabByPath=ra;exports.selectTabByReference=Pt;exports.selectTabExtraByPath=JO;exports.selectTabMaxWeight=zO;exports.selectTabs=ta;exports.selectTemplates=mg;exports.selectTemplatesData=CA;exports.selectThreadIdByPath=MO;exports.selectTouchedTabs=Pc;exports.selectTouchedTabsLength=ZO;exports.selectVirtualDataClasses=vO;exports.selectWebForms=rA;exports.selectWebFormsFolder=fg;exports.selectWebformNodes=XO;exports.selectWebformStatesByPath=PA;exports.selectWebformStylesByPath=Fc;exports.selectWebforms=Wa;exports.serializeModel=LD;exports.setActiveLine=cD;exports.setBreakpointsDecoration=oD;exports.setCallChainVariables=ED;exports.setContent=hv;exports.setDataSources=cI;exports.setDatasourceEvents=wI;exports.setDatasourcesTheme=KD;exports.setDebuggerMeta=TD;exports.setExpression=hD;exports.setExpressionVariables=SD;exports.setFolderChildren=BP;exports.setModelFlag=OD;exports.setPanelState=gI;exports.setRolesContent=Uc;exports.setSelectedGroup=VD;exports.setSessions=Zg;exports.setSetting=ac;exports.setSettings=ks;exports.setSettingsAsText=FP;exports.setSourceContent=wD;exports.setTabExtra=sI;exports.setTabFlags=gv;exports.setTabs=aI;exports.setTabsFlags=oI;exports.setTemplateData=dv;exports.setTemplatesData=fv;exports.setWebformsFlag=JD;exports.sort=wg;exports.stateReducer=Ov;exports.stateSlice=ka;exports.toAPI=Ns;exports.toState=_P;exports.toggleExpandFolder=LP;exports.toggleForceLogin=AP;exports.toggleInspector=YD;exports.togglePermission=yP;exports.togglePrivilegePermission=Og;exports.toggleTab=OP;exports.tryCloseAllTabs=ZP;exports.tryCloseLeftTabs=eD;exports.tryCloseOtherTabs=XP;exports.tryCloseRightTabs=QP;exports.tryCloseTab=Vc;exports.tryEditMethod=UP;exports.tryInjectMethod=Jg;exports.tryRenameDataclass=xD;exports.uniquePush=rr;exports.updateExpressionAt=gD;exports.updatePrivileges=Ng;exports.updateRoles=kg;exports.updateRolesAndPrivileges=Hc;exports.updateSession=yD;exports.updateSharedCss=AI;exports.updateSharedDatasources=el;exports.uploadFile=qP;exports.uploadFileAndGetResponse=GP;exports.useAppDispatch=hO;exports.useAppSelector=kr;exports.useAttribute=UD;exports.useCollections=BD;exports.useDataclass=WD;exports.useDataclasses=jD;exports.useMethod=_O;exports.useMethods=yO;exports.useModelFlags=GD;exports.useModelProperties=HD;exports.wipeDebuggerSessions=Qg;
128
+ Check the top-level render call using <`+J+">.")}return U}}function ia(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var J=za(U);if(Ya[J])return;Ya[J]=!0;var ie="";w&&w._owner&&w._owner!==un.current&&(ie=" It was passed a child from "+Pe(w._owner.type)+"."),gr(w),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,ie),gr(null)}}function Va(w,U){{if(typeof w!="object")return;if(Array.isArray(w))for(var J=0;J<w.length;J++){var ie=w[J];ln(ie)&&ia(ie,U)}else if(ln(w))w._store&&(w._store.validated=!0);else if(w){var Le=z(w);if(typeof Le=="function"&&Le!==w.entries)for(var Ne=Le.call(w),Ce;!(Ce=Ne.next()).done;)ln(Ce.value)&&ia(Ce.value,U)}}}function Gs(w){{var U=w.type;if(U==null||typeof U=="string")return;var J;if(typeof U=="function")J=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===p||U.$$typeof===_))J=U.propTypes;else return;if(J){var ie=Pe(U);Ws(J,w.props,"prop",ie,w)}else if(U.PropTypes!==void 0&&!cn){cn=!0;var Le=Pe(U);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Le||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qs(w){{for(var U=Object.keys(w.props),J=0;J<U.length;J++){var ie=U[J];if(ie!=="children"&&ie!=="key"){gr(w),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ie),gr(null);break}}w.ref!==null&&(gr(w),Y("Invalid attribute `ref` supplied to `React.Fragment`."),gr(null))}}function Ka(w,U,J,ie,Le,Ne){{var Ce=Te(w);if(!Ce){var Ee="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(Ee+=" 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 ht=Hs(Le);ht?Ee+=ht:Ee+=qa();var Xe;w===null?Xe="null":Array.isArray(w)?Xe="array":w!==void 0&&w.$$typeof===a?(Xe="<"+(Pe(w.type)||"Unknown")+" />",Ee=" Did you accidentally export a JSX literal instead of a component?"):Xe=typeof w,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xe,Ee)}var et=sa(w,U,J,Le,Ne);if(et==null)return et;if(Ce){var zt=U.children;if(zt!==void 0)if(ie)if(Array.isArray(zt)){for(var Ur=0;Ur<zt.length;Ur++)Va(zt[Ur],w);Object.freeze&&Object.freeze(zt)}else Y("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 Va(zt,w)}return w===e.Fragment?qs(et):Gs(et),et}}function Ja(w,U,J){return Ka(w,U,J,!0)}function Ys(w,U,J){return Ka(w,U,J,!1)}var zs=Ys,Vs=Ja;e.jsx=zs,e.jsxs=Vs}()}(Lu)),Lu}process.env.NODE_ENV==="production"?fc.exports=HI():fc.exports=GI();var qI=fc.exports;const YI=({children:e,store:r})=>qI.jsx(Qh,{store:r,children:e});exports.CATALOG_REFRESH_DELAY=Ss;exports.DEFAULT_CACHE=wc;exports.EAttributeKind=Bs;exports.EAttributeTypes=av;exports.EDebuggerErrorReason=lh;exports.EDebuggerErrorType=ss;exports.EDebuggerState=Ir;exports.EDisplayMode=Nc;exports.EPermissionType=Ae;exports.ETooltipBehavior=Mc;exports.EUnsavedPopOverChoice=Lc;exports.ExpressionIndex=ch;exports.FLAGS_INIT_STATE=uv;exports.FLAGS_KEYS=Na;exports.ROOT_WEBFORM_STATE=$c;exports.ReduxProvider=YI;exports.THEME_CLASSES=vg;exports.WT_FLAGS_KEYS=iv;exports.actionsToPrivs=Rg;exports.addBreakpointDecoration=cD;exports.addComponent=lv;exports.addCraftedComponent=sI;exports.addDataSource=pI;exports.addDatasource=Xc;exports.addEmptyNamespace=II;exports.addExpression=vD;exports.addIn=pP;exports.addNewFile=Gg;exports.addPermission=bP;exports.addSession=wD;exports.addSharedSource=xv;exports.addWebFormStyles=mI;exports.addWebformState=SI;exports.allowed=fP;exports.attributeKinds=LD;exports.attributeScopes=BD;exports.attributeTypes=kD;exports.castToFileFolder=qP;exports.changeTabEditor=bI;exports.children=gs;exports.clearAllBreakpoints=hD;exports.clearBreakpoints=dD;exports.clearBreakpointsExcept=pD;exports.closeAllTabs=yv;exports.closeLeftTabs=_v;exports.closeModal=PP;exports.closeOthers=bv;exports.closeRightTabs=mv;exports.closeSavedTabs=hI;exports.closeTab=Qc;exports.confirmTab=yI;exports.create=xg;exports.createModal=Fg;exports.createModelFiles=ic;exports.createNewFile=qn;exports.createNewFileAndOpen=JP;exports.createNewNode=Jo;exports.createRole=RP;exports.createWithResource=gP;exports.dataclassScopes=jD;exports.deleteDatasource=Ia;exports.deleteFile=uc;exports.deleteFolder=XP;exports.deleteSharedSource=Ov;exports.deserializeModel=yh;exports.duplicateNode=Xo;exports.editComponent=fv;exports.editCraftedComponent=iI;exports.editDataSource=zc;exports.editDatasource=Zc;exports.editModal=DP;exports.editRole=xP;exports.editSharedSource=Rv;exports.editWebformState=wI;exports.editors=kh;exports.executeMethod=ZP;exports.expandFolder=WP;exports.extensions=jh;exports.fetchAppSettings=Wg;exports.fetchCatalog=wn;exports.fetchChanges=Xg;exports.fetchCraftedComponents=gv;exports.fetchFiles=QP;exports.fetchFolderContent=_r;exports.fetchFolderContentWithoutExpanding=Aa;exports.fetchModel=Kc;exports.fetchRoles=vs;exports.fetchRolesChanges=Ng;exports.fetchSettings=Gc;exports.fetchSharedCss=Qo;exports.fetchSharedDatasources=Zo;exports.fetchTemplate=oI;exports.fetchTemplates=aI;exports.findNodeByPath=lt;exports.findOne=Sn;exports.findSession=ot;exports.findSessionByPath=lg;exports.getCachedState=Jn;exports.getCashedPrefrences=vh;exports.getDebuggerTabName=Ch;exports.getDebuggerTabPath=Cc;exports.getDefaultContent=qg;exports.getDefaultName=HD;exports.getDictByName=Ag;exports.getEditors=pr;exports.getExtension=Wh;exports.getFilePath=Vg;exports.getFileType=zg;exports.getFilenameFromType=Yg;exports.getGraphData=mP;exports.getInheritedResources=Dg;exports.getModalTitle=ws;exports.getNodeRelativePath=Bh;exports.getPrivilegeById=Br;exports.getPromotions=wP;exports.getResourceFromType=Bc;exports.getStore=Iv;exports.indexTypes=WD;exports.initSharedCss=kI;exports.injectContentAtLine=Kg;exports.inspect=QD;exports.isJSON=mh;exports.isRelatedAttr=GD;exports.isRelatedEntitiesAttr=sv;exports.isRelatedEntityAttr=ov;exports.isRenameDatasource=cI;exports.isRolesOutdated=Wc;exports.isValidPrimaryKey=MD;exports.modelSubject=Vh;exports.openAddFileInput=UP;exports.openFile=Pa;exports.openFileAtLine=qc;exports.openFileAtSelection=Jg;exports.openModal=ar;exports.openModel=DD;exports.openRoles=uD;exports.openSettingsTab=_I;exports.openTabUnselected=Sv;exports.parents=Ms;exports.populateShallow=yP;exports.primaryKeyAttributes=ND;exports.redo=xI;exports.refactorWebform=bh;exports.refreshFile=HP;exports.reloadTab=lc;exports.relocateNode=Da;exports.remove=dP;exports.removeAllExpressions=bD;exports.removeBreakpointDecoration=lD;exports.removeComponent=dv;exports.removeCraftedComponent=uI;exports.removeDataSource=vI;exports.removeDebuggerSessionsNotIn=rv;exports.removeExpression=mD;exports.removeFile=sc;exports.removeFileNode=cc;exports.removeFrom=hP;exports.removeModal=$g;exports.removePermission=_P;exports.removeRole=CP;exports.removeSession=CD;exports.removeSessionByIndex=xD;exports.removeWebformState=TI;exports.rename=vP;exports.renameDataSource=Yc;exports.renameDatasource=Vn;exports.renameExpression=yD;exports.renameFile=Yn;exports.resetResources=EP;exports.rootReducer=Cv;exports.sanitize=Ls;exports.sanitizePermissions=Og;exports.sanitizePrivileges=Tg;exports.saveAll=eD;exports.saveExpressions=SD;exports.saveModel=ys;exports.savePrefrences=gh;exports.saveRole=OP;exports.saveRoles=nc;exports.saveState=hh;exports.saveTab=zn;exports.selectActiveLine=$O;exports.selectActiveTab=zO;exports.selectActiveTabHistoryActions=xA;exports.selectAllDatasourcesByPath=xO;exports.selectAppState=ig;exports.selectBreakpoints=AO;exports.selectCSSClassesByPath=SA;exports.selectCallChainVariables=HO;exports.selectCatalog=Ac;exports.selectCatalogMethods=_O;exports.selectCatalogState=mO;exports.selectClassBreakpoints=DO;exports.selectClassOffset=qO;exports.selectClasses=oA;exports.selectClassesFolder=gg;exports.selectComponents=mg;exports.selectComponentsByPath=TO;exports.selectContentByPath=dg;exports.selectCraftedComponent=PA;exports.selectCurrentFrameByThreadId=BO;exports.selectCurrentTab=fg;exports.selectDataclasses=og;exports.selectDatasource=CO;exports.selectDatasourcesByPath=ug;exports.selectDatasourcesTheme=IA;exports.selectDebuggerChannels=WO;exports.selectDebuggerData=Tn;exports.selectDebuggerMeta=RO;exports.selectDebuggerSessions=Dt;exports.selectDebuggerSessionsCount=OO;exports.selectDebuggers=tA;exports.selectDraftBreakpoints=PO;exports.selectDraftClassBreakpoints=IO;exports.selectExceptions=YO;exports.selectExplorer=rA;exports.selectExpressions=MO;exports.selectExpressionsVariables=GO;exports.selectFlagsByPath=TA;exports.selectForceLogin=pA;exports.selectGuestPrivilege=lA;exports.selectHasTabs=XO;exports.selectHighlightedLines=FO;exports.selectHistoryByPath=CA;exports.selectInspectedCSSClass=RA;exports.selectInspectedDatasource=OA;exports.selectInspector=Ds;exports.selectInspectorStateByType=DA;exports.selectIsLoaded=FA;exports.selectMethods=nA;exports.selectMethodsFolder=hg;exports.selectModals=sA;exports.selectMonacoZoom=_A;exports.selectPanelByPath=UI;exports.selectPartialSessionSettings=gA;exports.selectPreferences=yA;exports.selectPreviewedWebformsPaths=JO;exports.selectPrivileges=cA;exports.selectProjectSettings=vA;exports.selectQodly=bA;exports.selectRecentFiles=VO;exports.selectRemoteDebuggerMode=mA;exports.selectRoles=uA;exports.selectRolesAndPrivileges=iA;exports.selectRolesDate=hA;exports.selectRolesFlags=fA;exports.selectRoot=jr;exports.selectSelectedTab=dA;exports.selectServerSettings=Ic;exports.selectSessionSettings=Dc;exports.selectSharedCSS=wA;exports.selectSharedDatasources=cg;exports.selectSourceByPath=NO;exports.selectSourceByThreadId=jO;exports.selectStackFrames=UO;exports.selectStoppedFromDebugSession=LO;exports.selectStylesByPath=EA;exports.selectTab=Ev;exports.selectTabByPath=Cn;exports.selectTabByReference=Pt;exports.selectTabExtraByPath=ZO;exports.selectTabMaxWeight=KO;exports.selectTabs=ra;exports.selectTemplates=bg;exports.selectTemplatesData=AA;exports.selectThreadIdByPath=kO;exports.selectTouchedTabs=Pc;exports.selectTouchedTabsLength=eA;exports.selectVirtualDataClasses=bO;exports.selectWebForms=aA;exports.selectWebFormsFolder=pg;exports.selectWebformNodes=QO;exports.selectWebformStatesByPath=$A;exports.selectWebformStylesByPath=Fc;exports.selectWebforms=Wa;exports.serializeModel=UD;exports.setActiveLine=gD;exports.setBreakpointsDecoration=fD;exports.setCallChainVariables=RD;exports.setContent=el;exports.setDataSources=gI;exports.setDatasourceEvents=DI;exports.setDatasourcesTheme=tI;exports.setDebuggerMeta=PD;exports.setExpression=_D;exports.setExpressionVariables=OD;exports.setFolderChildren=GP;exports.setHistoryContent=wv;exports.setModelFlag=$D;exports.setPanelState=EI;exports.setRolesContent=Uc;exports.setSelectedGroup=eI;exports.setSessions=ev;exports.setSetting=ac;exports.setSettings=ks;exports.setSettingsAsText=NP;exports.setSourceContent=AD;exports.setTabContent=iD;exports.setTabExtra=dI;exports.setTabFlags=vv;exports.setTabs=lI;exports.setTabsFlags=fI;exports.setTemplateData=hv;exports.setTemplatesData=pv;exports.setWebformsFlag=rI;exports.sort=Cg;exports.stateReducer=Dv;exports.stateSlice=ka;exports.toAPI=Ns;exports.toState=TP;exports.toggleExpandFolder=BP;exports.toggleForceLogin=FP;exports.toggleInspector=ZD;exports.togglePermission=SP;exports.togglePrivilegePermission=Pg;exports.toggleTab=IP;exports.tryCloseAllTabs=rD;exports.tryCloseLeftTabs=aD;exports.tryCloseOtherTabs=tD;exports.tryCloseRightTabs=nD;exports.tryCloseTab=Vc;exports.tryEditMethod=YP;exports.tryInjectMethod=Zg;exports.tryRenameDataclass=ID;exports.undo=CI;exports.uniquePush=rr;exports.unlockHistory=Tv;exports.updateExpressionAt=ED;exports.updatePrivileges=jg;exports.updateRoles=Bg;exports.updateRolesAndPrivileges=Hc;exports.updateSession=TD;exports.updateSharedCss=NI;exports.updateSharedDatasources=tl;exports.uploadFile=KP;exports.uploadFileAndGetResponse=VP;exports.useAppDispatch=yO;exports.useAppSelector=kr;exports.useAttribute=VD;exports.useCollections=YD;exports.useDataclass=zD;exports.useDataclasses=qD;exports.useMethod=wO;exports.useMethods=EO;exports.useModelFlags=JD;exports.useModelProperties=KD;exports.wipeDebuggerSessions=tv;
129
129
  //# sourceMappingURL=index.cjs.js.map