@luigi-project/core-modular 0.0.7-dev.20260590104 → 0.0.7-dev.20260610120

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/luigi.js CHANGED
@@ -1,41 +1,81 @@
1
- class Dv{constructor(n){this.$subscribers=new Set,this.$value=n}set(n){this.$value=n,this.$subscribers.forEach(r=>{r(n)})}update(n){this.set(n(this.$value))}subscribe(n){return this.$subscribers.add(n),n(this.$value),()=>{this.$subscribers.delete(n)}}}function oc(i){return i.$value}function is(i){return new Dv(i)}var Ji=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qr={exports:{}};var Mv=Qr.exports,kl;function Fv(){return kl||(kl=1,(function(i,n){(function(){var r,a="4.18.1",o=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",f="Invalid `variable` option passed into `_.template`",p="Invalid `imports` option passed into `_.template`",m="__lodash_hash_undefined__",E=500,y="__lodash_placeholder__",C=1,b=2,R=4,x=1,U=2,H=1,re=2,we=4,ge=8,qe=16,Le=32,Ze=64,Re=128,Ae=256,Se=512,Pe=30,D="...",Zt=800,wt=16,$e=1,yn=2,N=3,ot=1/0,oe=9007199254740991,ke=17976931348623157e292,jt=NaN,Nt=4294967295,Yc=Nt-1,Jc=Nt>>>1,Xc=[["ary",Re],["bind",H],["bindKey",re],["curry",ge],["curryRight",qe],["flip",Se],["partial",Le],["partialRight",Ze],["rearg",Ae]],Gn="[object Arguments]",si="[object Array]",Zc="[object AsyncFunction]",yr="[object Boolean]",Tr="[object Date]",jc="[object DOMException]",ai="[object Error]",oi="[object Function]",so="[object GeneratorFunction]",St="[object Map]",br="[object Number]",eh="[object Null]",Ht="[object Object]",ao="[object Promise]",th="[object Proxy]",Rr="[object RegExp]",Et="[object Set]",Ar="[object String]",ui="[object Symbol]",nh="[object Undefined]",Pr="[object WeakMap]",rh="[object WeakSet]",Ir="[object ArrayBuffer]",Qn="[object DataView]",hs="[object Float32Array]",fs="[object Float64Array]",ds="[object Int8Array]",gs="[object Int16Array]",ps="[object Int32Array]",ms="[object Uint8Array]",_s="[object Uint8ClampedArray]",vs="[object Uint16Array]",ws="[object Uint32Array]",ih=/\b__p \+= '';/g,sh=/\b(__p \+=) '' \+/g,ah=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39);/g,uo=/[&<>"']/g,oh=RegExp(oo.source),uh=RegExp(uo.source),lh=/<%-([\s\S]+?)%>/g,ch=/<%([\s\S]+?)%>/g,lo=/<%=([\s\S]+?)%>/g,hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fh=/^\w*$/,dh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ss=/[\\^$.*+?()[\]{}|]/g,gh=RegExp(Ss.source),Es=/^\s+/,ph=/\s/,mh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_h=/\{\n\/\* \[wrapped with (.+)\] \*/,vh=/,? & /,wh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,co=/[()=,{}\[\]\/\s]/,Sh=/\\(\\)?/g,Eh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ho=/\w*$/,Ch=/^[-+]0x[0-9a-f]+$/i,yh=/^0b[01]+$/i,Th=/^\[object .+?Constructor\]$/,bh=/^0o[0-7]+$/i,Rh=/^(?:0|[1-9]\d*)$/,Ah=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,li=/($^)/,Ph=/['\n\r\u2028\u2029\\]/g,ci="\\ud800-\\udfff",Ih="\\u0300-\\u036f",xh="\\ufe20-\\ufe2f",Lh="\\u20d0-\\u20ff",fo=Ih+xh+Lh,go="\\u2700-\\u27bf",po="a-z\\xdf-\\xf6\\xf8-\\xff",Nh="\\xac\\xb1\\xd7\\xf7",Uh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oh="\\u2000-\\u206f",$h=" \\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",mo="A-Z\\xc0-\\xd6\\xd8-\\xde",_o="\\ufe0e\\ufe0f",vo=Nh+Uh+Oh+$h,Cs="['’]",Dh="["+ci+"]",wo="["+vo+"]",hi="["+fo+"]",So="\\d+",Mh="["+go+"]",Eo="["+po+"]",Co="[^"+ci+vo+So+go+po+mo+"]",ys="\\ud83c[\\udffb-\\udfff]",Fh="(?:"+hi+"|"+ys+")",yo="[^"+ci+"]",Ts="(?:\\ud83c[\\udde6-\\uddff]){2}",bs="[\\ud800-\\udbff][\\udc00-\\udfff]",qn="["+mo+"]",To="\\u200d",bo="(?:"+Eo+"|"+Co+")",kh="(?:"+qn+"|"+Co+")",Ro="(?:"+Cs+"(?:d|ll|m|re|s|t|ve))?",Ao="(?:"+Cs+"(?:D|LL|M|RE|S|T|VE))?",Po=Fh+"?",Io="["+_o+"]?",Hh="(?:"+To+"(?:"+[yo,Ts,bs].join("|")+")"+Io+Po+")*",Wh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xo=Io+Po+Hh,Bh="(?:"+[Mh,Ts,bs].join("|")+")"+xo,Gh="(?:"+[yo+hi+"?",hi,Ts,bs,Dh].join("|")+")",Qh=RegExp(Cs,"g"),qh=RegExp(hi,"g"),Rs=RegExp(ys+"(?="+ys+")|"+Gh+xo,"g"),zh=RegExp([qn+"?"+Eo+"+"+Ro+"(?="+[wo,qn,"$"].join("|")+")",kh+"+"+Ao+"(?="+[wo,qn+bo,"$"].join("|")+")",qn+"?"+bo+"+"+Ro,qn+"+"+Ao,Vh,Wh,So,Bh].join("|"),"g"),Kh=RegExp("["+To+ci+fo+_o+"]"),Yh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jh=["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"],Xh=-1,he={};he[hs]=he[fs]=he[ds]=he[gs]=he[ps]=he[ms]=he[_s]=he[vs]=he[ws]=!0,he[Gn]=he[si]=he[Ir]=he[yr]=he[Qn]=he[Tr]=he[ai]=he[oi]=he[St]=he[br]=he[Ht]=he[Rr]=he[Et]=he[Ar]=he[Pr]=!1;var ce={};ce[Gn]=ce[si]=ce[Ir]=ce[Qn]=ce[yr]=ce[Tr]=ce[hs]=ce[fs]=ce[ds]=ce[gs]=ce[ps]=ce[St]=ce[br]=ce[Ht]=ce[Rr]=ce[Et]=ce[Ar]=ce[ui]=ce[ms]=ce[_s]=ce[vs]=ce[ws]=!0,ce[ai]=ce[oi]=ce[Pr]=!1;var Zh={À:"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"},jh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ef={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},tf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nf=parseFloat,rf=parseInt,Lo=typeof Ji=="object"&&Ji&&Ji.Object===Object&&Ji,sf=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Lo||sf||Function("return this")(),As=n&&!n.nodeType&&n,Tn=As&&!0&&i&&!i.nodeType&&i,No=Tn&&Tn.exports===As,Ps=No&&Lo.process,ut=(function(){try{var w=Tn&&Tn.require&&Tn.require("util").types;return w||Ps&&Ps.binding&&Ps.binding("util")}catch{}})(),Uo=ut&&ut.isArrayBuffer,Oo=ut&&ut.isDate,$o=ut&&ut.isMap,Do=ut&&ut.isRegExp,Mo=ut&&ut.isSet,Fo=ut&&ut.isTypedArray;function je(w,A,T){switch(T.length){case 0:return w.call(A);case 1:return w.call(A,T[0]);case 2:return w.call(A,T[0],T[1]);case 3:return w.call(A,T[0],T[1],T[2])}return w.apply(A,T)}function af(w,A,T,k){for(var z=-1,ie=w==null?0:w.length;++z<ie;){var Ce=w[z];A(k,Ce,T(Ce),w)}return k}function et(w,A){for(var T=-1,k=w==null?0:w.length;++T<k&&A(w[T],T,w)!==!1;);return w}function of(w,A){for(var T=w==null?0:w.length;T--&&A(w[T],T,w)!==!1;);return w}function ko(w,A){for(var T=-1,k=w==null?0:w.length;++T<k;)if(!A(w[T],T,w))return!1;return!0}function en(w,A){for(var T=-1,k=w==null?0:w.length,z=0,ie=[];++T<k;){var Ce=w[T];A(Ce,T,w)&&(ie[z++]=Ce)}return ie}function fi(w,A){var T=w==null?0:w.length;return!!T&&zn(w,A,0)>-1}function Is(w,A,T){for(var k=-1,z=w==null?0:w.length;++k<z;)if(T(A,w[k]))return!0;return!1}function fe(w,A){for(var T=-1,k=w==null?0:w.length,z=Array(k);++T<k;)z[T]=A(w[T],T,w);return z}function tn(w,A){for(var T=-1,k=A.length,z=w.length;++T<k;)w[z+T]=A[T];return w}function xs(w,A,T,k){var z=-1,ie=w==null?0:w.length;for(k&&ie&&(T=w[++z]);++z<ie;)T=A(T,w[z],z,w);return T}function uf(w,A,T,k){var z=w==null?0:w.length;for(k&&z&&(T=w[--z]);z--;)T=A(T,w[z],z,w);return T}function Ls(w,A){for(var T=-1,k=w==null?0:w.length;++T<k;)if(A(w[T],T,w))return!0;return!1}var lf=Ns("length");function cf(w){return w.split("")}function hf(w){return w.match(wh)||[]}function Ho(w,A,T){var k;return T(w,function(z,ie,Ce){if(A(z,ie,Ce))return k=ie,!1}),k}function di(w,A,T,k){for(var z=w.length,ie=T+(k?1:-1);k?ie--:++ie<z;)if(A(w[ie],ie,w))return ie;return-1}function zn(w,A,T){return A===A?yf(w,A,T):di(w,Wo,T)}function ff(w,A,T,k){for(var z=T-1,ie=w.length;++z<ie;)if(k(w[z],A))return z;return-1}function Wo(w){return w!==w}function Vo(w,A){var T=w==null?0:w.length;return T?Os(w,A)/T:jt}function Ns(w){return function(A){return A==null?r:A[w]}}function Us(w){return function(A){return w==null?r:w[A]}}function Bo(w,A,T,k,z){return z(w,function(ie,Ce,le){T=k?(k=!1,ie):A(T,ie,Ce,le)}),T}function df(w,A){var T=w.length;for(w.sort(A);T--;)w[T]=w[T].value;return w}function Os(w,A){for(var T,k=-1,z=w.length;++k<z;){var ie=A(w[k]);ie!==r&&(T=T===r?ie:T+ie)}return T}function $s(w,A){for(var T=-1,k=Array(w);++T<w;)k[T]=A(T);return k}function gf(w,A){return fe(A,function(T){return[T,w[T]]})}function Go(w){return w&&w.slice(0,Ko(w)+1).replace(Es,"")}function tt(w){return function(A){return w(A)}}function Ds(w,A){return fe(A,function(T){return w[T]})}function xr(w,A){return w.has(A)}function Qo(w,A){for(var T=-1,k=w.length;++T<k&&zn(A,w[T],0)>-1;);return T}function qo(w,A){for(var T=w.length;T--&&zn(A,w[T],0)>-1;);return T}function pf(w,A){for(var T=w.length,k=0;T--;)w[T]===A&&++k;return k}var mf=Us(Zh),_f=Us(jh);function vf(w){return"\\"+tf[w]}function wf(w,A){return w==null?r:w[A]}function Kn(w){return Kh.test(w)}function Sf(w){return Yh.test(w)}function Ef(w){for(var A,T=[];!(A=w.next()).done;)T.push(A.value);return T}function Ms(w){var A=-1,T=Array(w.size);return w.forEach(function(k,z){T[++A]=[z,k]}),T}function zo(w,A){return function(T){return w(A(T))}}function nn(w,A){for(var T=-1,k=w.length,z=0,ie=[];++T<k;){var Ce=w[T];(Ce===A||Ce===y)&&(w[T]=y,ie[z++]=T)}return ie}function gi(w){var A=-1,T=Array(w.size);return w.forEach(function(k){T[++A]=k}),T}function Cf(w){var A=-1,T=Array(w.size);return w.forEach(function(k){T[++A]=[k,k]}),T}function yf(w,A,T){for(var k=T-1,z=w.length;++k<z;)if(w[k]===A)return k;return-1}function Tf(w,A,T){for(var k=T+1;k--;)if(w[k]===A)return k;return k}function Yn(w){return Kn(w)?Rf(w):lf(w)}function Ct(w){return Kn(w)?Af(w):cf(w)}function Ko(w){for(var A=w.length;A--&&ph.test(w.charAt(A)););return A}var bf=Us(ef);function Rf(w){for(var A=Rs.lastIndex=0;Rs.test(w);)++A;return A}function Af(w){return w.match(Rs)||[]}function Pf(w){return w.match(zh)||[]}var If=(function w(A){A=A==null?Ne:Jn.defaults(Ne.Object(),A,Jn.pick(Ne,Jh));var T=A.Array,k=A.Date,z=A.Error,ie=A.Function,Ce=A.Math,le=A.Object,Fs=A.RegExp,xf=A.String,lt=A.TypeError,pi=T.prototype,Lf=ie.prototype,Xn=le.prototype,mi=A["__core-js_shared__"],_i=Lf.toString,se=Xn.hasOwnProperty,Nf=0,Yo=(function(){var e=/[^.]+$/.exec(mi&&mi.keys&&mi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),vi=Xn.toString,Uf=_i.call(le),Of=Ne._,$f=Fs("^"+_i.call(se).replace(Ss,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wi=No?A.Buffer:r,rn=A.Symbol,Si=A.Uint8Array,Jo=wi?wi.allocUnsafe:r,Ei=zo(le.getPrototypeOf,le),Xo=le.create,Zo=Xn.propertyIsEnumerable,Ci=pi.splice,jo=rn?rn.isConcatSpreadable:r,Lr=rn?rn.iterator:r,bn=rn?rn.toStringTag:r,yi=(function(){try{var e=xn(le,"defineProperty");return e({},"",{}),e}catch{}})(),Df=A.clearTimeout!==Ne.clearTimeout&&A.clearTimeout,Mf=k&&k.now!==Ne.Date.now&&k.now,Ff=A.setTimeout!==Ne.setTimeout&&A.setTimeout,Ti=Ce.ceil,bi=Ce.floor,ks=le.getOwnPropertySymbols,kf=wi?wi.isBuffer:r,eu=A.isFinite,Hf=pi.join,Wf=zo(le.keys,le),ye=Ce.max,De=Ce.min,Vf=k.now,Bf=A.parseInt,tu=Ce.random,Gf=pi.reverse,Hs=xn(A,"DataView"),Nr=xn(A,"Map"),Ws=xn(A,"Promise"),Zn=xn(A,"Set"),Ur=xn(A,"WeakMap"),Or=xn(le,"create"),Ri=Ur&&new Ur,jn={},Qf=Ln(Hs),qf=Ln(Nr),zf=Ln(Ws),Kf=Ln(Zn),Yf=Ln(Ur),Ai=rn?rn.prototype:r,$r=Ai?Ai.valueOf:r,nu=Ai?Ai.toString:r;function d(e){if(pe(e)&&!Y(e)&&!(e instanceof te)){if(e instanceof ct)return e;if(se.call(e,"__wrapped__"))return rl(e)}return new ct(e)}var er=(function(){function e(){}return function(t){if(!de(t))return{};if(Xo)return Xo(t);e.prototype=t;var s=new e;return e.prototype=r,s}})();function Pi(){}function ct(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}d.templateSettings={escape:lh,evaluate:ch,interpolate:lo,variable:"",imports:{_:d}},d.prototype=Pi.prototype,d.prototype.constructor=d,ct.prototype=er(Pi.prototype),ct.prototype.constructor=ct;function te(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nt,this.__views__=[]}function Jf(){var e=new te(this.__wrapped__);return e.__actions__=ze(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ze(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ze(this.__views__),e}function Xf(){if(this.__filtered__){var e=new te(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Zf(){var e=this.__wrapped__.value(),t=this.__dir__,s=Y(e),u=t<0,h=s?e.length:0,g=cg(0,h,this.__views__),_=g.start,v=g.end,S=v-_,P=u?v:_-1,I=this.__iteratees__,L=I.length,M=0,W=De(S,this.__takeCount__);if(!s||!u&&h==S&&W==S)return Ru(e,this.__actions__);var Q=[];e:for(;S--&&M<W;){P+=t;for(var X=-1,V=e[P];++X<L;){var j=I[X],ne=j.iteratee,it=j.type,Ve=ne(V);if(it==yn)V=Ve;else if(!Ve){if(it==$e)continue e;break e}}Q[M++]=V}return Q}te.prototype=er(Pi.prototype),te.prototype.constructor=te;function Rn(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function jf(){this.__data__=Or?Or(null):{},this.size=0}function ed(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function td(e){var t=this.__data__;if(Or){var s=t[e];return s===m?r:s}return se.call(t,e)?t[e]:r}function nd(e){var t=this.__data__;return Or?t[e]!==r:se.call(t,e)}function rd(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Or&&t===r?m:t,this}Rn.prototype.clear=jf,Rn.prototype.delete=ed,Rn.prototype.get=td,Rn.prototype.has=nd,Rn.prototype.set=rd;function Wt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function id(){this.__data__=[],this.size=0}function sd(e){var t=this.__data__,s=Ii(t,e);if(s<0)return!1;var u=t.length-1;return s==u?t.pop():Ci.call(t,s,1),--this.size,!0}function ad(e){var t=this.__data__,s=Ii(t,e);return s<0?r:t[s][1]}function od(e){return Ii(this.__data__,e)>-1}function ud(e,t){var s=this.__data__,u=Ii(s,e);return u<0?(++this.size,s.push([e,t])):s[u][1]=t,this}Wt.prototype.clear=id,Wt.prototype.delete=sd,Wt.prototype.get=ad,Wt.prototype.has=od,Wt.prototype.set=ud;function Vt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t<s;){var u=e[t];this.set(u[0],u[1])}}function ld(){this.size=0,this.__data__={hash:new Rn,map:new(Nr||Wt),string:new Rn}}function cd(e){var t=Wi(this,e).delete(e);return this.size-=t?1:0,t}function hd(e){return Wi(this,e).get(e)}function fd(e){return Wi(this,e).has(e)}function dd(e,t){var s=Wi(this,e),u=s.size;return s.set(e,t),this.size+=s.size==u?0:1,this}Vt.prototype.clear=ld,Vt.prototype.delete=cd,Vt.prototype.get=hd,Vt.prototype.has=fd,Vt.prototype.set=dd;function An(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Vt;++t<s;)this.add(e[t])}function gd(e){return this.__data__.set(e,m),this}function pd(e){return this.__data__.has(e)}An.prototype.add=An.prototype.push=gd,An.prototype.has=pd;function yt(e){var t=this.__data__=new Wt(e);this.size=t.size}function md(){this.__data__=new Wt,this.size=0}function _d(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function vd(e){return this.__data__.get(e)}function wd(e){return this.__data__.has(e)}function Sd(e,t){var s=this.__data__;if(s instanceof Wt){var u=s.__data__;if(!Nr||u.length<o-1)return u.push([e,t]),this.size=++s.size,this;s=this.__data__=new Vt(u)}return s.set(e,t),this.size=s.size,this}yt.prototype.clear=md,yt.prototype.delete=_d,yt.prototype.get=vd,yt.prototype.has=wd,yt.prototype.set=Sd;function ru(e,t){var s=Y(e),u=!s&&Nn(e),h=!s&&!u&&ln(e),g=!s&&!u&&!h&&ir(e),_=s||u||h||g,v=_?$s(e.length,xf):[],S=v.length;for(var P in e)(t||se.call(e,P))&&!(_&&(P=="length"||h&&(P=="offset"||P=="parent")||g&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||Qt(P,S)))&&v.push(P);return v}function iu(e){var t=e.length;return t?e[Zs(0,t-1)]:r}function Ed(e,t){return Vi(ze(e),Pn(t,0,e.length))}function Cd(e){return Vi(ze(e))}function Vs(e,t,s){(s!==r&&!bt(e[t],s)||s===r&&!(t in e))&&Ut(e,t,s)}function Dr(e,t,s){var u=e[t];(!(se.call(e,t)&&bt(u,s))||s===r&&!(t in e))&&Ut(e,t,s)}function Ii(e,t){for(var s=e.length;s--;)if(bt(e[s][0],t))return s;return-1}function yd(e,t,s,u){return sn(e,function(h,g,_){t(u,h,s(h),_)}),u}function su(e,t){return e&&$t(t,Ie(t),e)}function Td(e,t){return e&&$t(t,Ye(t),e)}function Ut(e,t,s){t=="__proto__"&&yi?yi(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function Bs(e,t){for(var s=-1,u=t.length,h=T(u),g=e==null;++s<u;)h[s]=g?r:Ta(e,t[s]);return h}function Pn(e,t,s){return e===e&&(s!==r&&(e=e<=s?e:s),t!==r&&(e=e>=t?e:t)),e}function ht(e,t,s,u,h,g){var _,v=t&C,S=t&b,P=t&R;if(s&&(_=h?s(e,u,h,g):s(e)),_!==r)return _;if(!de(e))return e;var I=Y(e);if(I){if(_=fg(e),!v)return ze(e,_)}else{var L=Me(e),M=L==oi||L==so;if(ln(e))return Iu(e,v);if(L==Ht||L==Gn||M&&!h){if(_=S||M?{}:Ku(e),!v)return S?tg(e,Td(_,e)):eg(e,su(_,e))}else{if(!ce[L])return h?e:{};_=dg(e,L,v)}}g||(g=new yt);var W=g.get(e);if(W)return W;g.set(e,_),yl(e)?e.forEach(function(V){_.add(ht(V,t,s,V,e,g))}):El(e)&&e.forEach(function(V,j){_.set(j,ht(V,t,s,j,e,g))});var Q=P?S?la:ua:S?Ye:Ie,X=I?r:Q(e);return et(X||e,function(V,j){X&&(j=V,V=e[j]),Dr(_,j,ht(V,t,s,j,e,g))}),_}function bd(e){var t=Ie(e);return function(s){return au(s,e,t)}}function au(e,t,s){var u=s.length;if(e==null)return!u;for(e=le(e);u--;){var h=s[u],g=t[h],_=e[h];if(_===r&&!(h in e)||!g(_))return!1}return!0}function ou(e,t,s){if(typeof e!="function")throw new lt(l);return Br(function(){e.apply(r,s)},t)}function Mr(e,t,s,u){var h=-1,g=fi,_=!0,v=e.length,S=[],P=t.length;if(!v)return S;s&&(t=fe(t,tt(s))),u?(g=Is,_=!1):t.length>=o&&(g=xr,_=!1,t=new An(t));e:for(;++h<v;){var I=e[h],L=s==null?I:s(I);if(I=u||I!==0?I:0,_&&L===L){for(var M=P;M--;)if(t[M]===L)continue e;S.push(I)}else g(t,L,u)||S.push(I)}return S}var sn=Ou(Ot),uu=Ou(Qs,!0);function Rd(e,t){var s=!0;return sn(e,function(u,h,g){return s=!!t(u,h,g),s}),s}function xi(e,t,s){for(var u=-1,h=e.length;++u<h;){var g=e[u],_=t(g);if(_!=null&&(v===r?_===_&&!rt(_):s(_,v)))var v=_,S=g}return S}function Ad(e,t,s,u){var h=e.length;for(s=J(s),s<0&&(s=-s>h?0:h+s),u=u===r||u>h?h:J(u),u<0&&(u+=h),u=s>u?0:bl(u);s<u;)e[s++]=t;return e}function lu(e,t){var s=[];return sn(e,function(u,h,g){t(u,h,g)&&s.push(u)}),s}function Ue(e,t,s,u,h){var g=-1,_=e.length;for(s||(s=pg),h||(h=[]);++g<_;){var v=e[g];t>0&&s(v)?t>1?Ue(v,t-1,s,u,h):tn(h,v):u||(h[h.length]=v)}return h}var Gs=$u(),cu=$u(!0);function Ot(e,t){return e&&Gs(e,t,Ie)}function Qs(e,t){return e&&cu(e,t,Ie)}function Li(e,t){return en(t,function(s){return qt(e[s])})}function In(e,t){t=on(t,e);for(var s=0,u=t.length;e!=null&&s<u;)e=e[Tt(t[s++])];return s&&s==u?e:r}function hu(e,t,s){var u=t(e);return Y(e)?u:tn(u,s(e))}function He(e){return e==null?e===r?nh:eh:bn&&bn in le(e)?lg(e):Cg(e)}function qs(e,t){return e>t}function Pd(e,t){return e!=null&&se.call(e,t)}function Id(e,t){return e!=null&&t in le(e)}function xd(e,t,s){return e>=De(t,s)&&e<ye(t,s)}function zs(e,t,s){for(var u=s?Is:fi,h=e[0].length,g=e.length,_=g,v=T(g),S=1/0,P=[];_--;){var I=e[_];_&&t&&(I=fe(I,tt(t))),S=De(I.length,S),v[_]=!s&&(t||h>=120&&I.length>=120)?new An(_&&I):r}I=e[0];var L=-1,M=v[0];e:for(;++L<h&&P.length<S;){var W=I[L],Q=t?t(W):W;if(W=s||W!==0?W:0,!(M?xr(M,Q):u(P,Q,s))){for(_=g;--_;){var X=v[_];if(!(X?xr(X,Q):u(e[_],Q,s)))continue e}M&&M.push(Q),P.push(W)}}return P}function Ld(e,t,s,u){return Ot(e,function(h,g,_){t(u,s(h),g,_)}),u}function Fr(e,t,s){t=on(t,e),e=Zu(e,t);var u=e==null?e:e[Tt(dt(t))];return u==null?r:je(u,e,s)}function fu(e){return pe(e)&&He(e)==Gn}function Nd(e){return pe(e)&&He(e)==Ir}function Ud(e){return pe(e)&&He(e)==Tr}function kr(e,t,s,u,h){return e===t?!0:e==null||t==null||!pe(e)&&!pe(t)?e!==e&&t!==t:Od(e,t,s,u,kr,h)}function Od(e,t,s,u,h,g){var _=Y(e),v=Y(t),S=_?si:Me(e),P=v?si:Me(t);S=S==Gn?Ht:S,P=P==Gn?Ht:P;var I=S==Ht,L=P==Ht,M=S==P;if(M&&ln(e)){if(!ln(t))return!1;_=!0,I=!1}if(M&&!I)return g||(g=new yt),_||ir(e)?Qu(e,t,s,u,h,g):og(e,t,S,s,u,h,g);if(!(s&x)){var W=I&&se.call(e,"__wrapped__"),Q=L&&se.call(t,"__wrapped__");if(W||Q){var X=W?e.value():e,V=Q?t.value():t;return g||(g=new yt),h(X,V,s,u,g)}}return M?(g||(g=new yt),ug(e,t,s,u,h,g)):!1}function $d(e){return pe(e)&&Me(e)==St}function Ks(e,t,s,u){var h=s.length,g=h,_=!u;if(e==null)return!g;for(e=le(e);h--;){var v=s[h];if(_&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++h<g;){v=s[h];var S=v[0],P=e[S],I=v[1];if(_&&v[2]){if(P===r&&!(S in e))return!1}else{var L=new yt;if(u)var M=u(P,I,S,e,t,L);if(!(M===r?kr(I,P,x|U,u,L):M))return!1}}return!0}function du(e){if(!de(e)||_g(e))return!1;var t=qt(e)?$f:Th;return t.test(Ln(e))}function Dd(e){return pe(e)&&He(e)==Rr}function Md(e){return pe(e)&&Me(e)==Et}function Fd(e){return pe(e)&&Ki(e.length)&&!!he[He(e)]}function gu(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?Y(e)?_u(e[0],e[1]):mu(e):Ml(e)}function Ys(e){if(!Vr(e))return Wf(e);var t=[];for(var s in le(e))se.call(e,s)&&s!="constructor"&&t.push(s);return t}function kd(e){if(!de(e))return Eg(e);var t=Vr(e),s=[];for(var u in e)u=="constructor"&&(t||!se.call(e,u))||s.push(u);return s}function Js(e,t){return e<t}function pu(e,t){var s=-1,u=Ke(e)?T(e.length):[];return sn(e,function(h,g,_){u[++s]=t(h,g,_)}),u}function mu(e){var t=ha(e);return t.length==1&&t[0][2]?Ju(t[0][0],t[0][1]):function(s){return s===e||Ks(s,e,t)}}function _u(e,t){return da(e)&&Yu(t)?Ju(Tt(e),t):function(s){var u=Ta(s,e);return u===r&&u===t?ba(s,e):kr(t,u,x|U)}}function Ni(e,t,s,u,h){e!==t&&Gs(t,function(g,_){if(h||(h=new yt),de(g))Hd(e,t,_,s,Ni,u,h);else{var v=u?u(pa(e,_),g,_+"",e,t,h):r;v===r&&(v=g),Vs(e,_,v)}},Ye)}function Hd(e,t,s,u,h,g,_){var v=pa(e,s),S=pa(t,s),P=_.get(S);if(P){Vs(e,s,P);return}var I=g?g(v,S,s+"",e,t,_):r,L=I===r;if(L){var M=Y(S),W=!M&&ln(S),Q=!M&&!W&&ir(S);I=S,M||W||Q?Y(v)?I=v:_e(v)?I=ze(v):W?(L=!1,I=Iu(S,!0)):Q?(L=!1,I=xu(S,!0)):I=[]:Gr(S)||Nn(S)?(I=v,Nn(v)?I=Rl(v):(!de(v)||qt(v))&&(I=Ku(S))):L=!1}L&&(_.set(S,I),h(I,S,u,g,_),_.delete(S)),Vs(e,s,I)}function vu(e,t){var s=e.length;if(s)return t+=t<0?s:0,Qt(t,s)?e[t]:r}function wu(e,t,s){t.length?t=fe(t,function(g){return Y(g)?function(_){return In(_,g.length===1?g[0]:g)}:g}):t=[Je];var u=-1;t=fe(t,tt(B()));var h=pu(e,function(g,_,v){var S=fe(t,function(P){return P(g)});return{criteria:S,index:++u,value:g}});return df(h,function(g,_){return jd(g,_,s)})}function Wd(e,t){return Su(e,t,function(s,u){return ba(e,u)})}function Su(e,t,s){for(var u=-1,h=t.length,g={};++u<h;){var _=t[u],v=In(e,_);s(v,_)&&Hr(g,on(_,e),v)}return g}function Vd(e){return function(t){return In(t,e)}}function Xs(e,t,s,u){var h=u?ff:zn,g=-1,_=t.length,v=e;for(e===t&&(t=ze(t)),s&&(v=fe(e,tt(s)));++g<_;)for(var S=0,P=t[g],I=s?s(P):P;(S=h(v,I,S,u))>-1;)v!==e&&Ci.call(v,S,1),Ci.call(e,S,1);return e}function Eu(e,t){for(var s=e?t.length:0,u=s-1;s--;){var h=t[s];if(s==u||h!==g){var g=h;Qt(h)?Ci.call(e,h,1):ta(e,h)}}return e}function Zs(e,t){return e+bi(tu()*(t-e+1))}function Bd(e,t,s,u){for(var h=-1,g=ye(Ti((t-e)/(s||1)),0),_=T(g);g--;)_[u?g:++h]=e,e+=s;return _}function js(e,t){var s="";if(!e||t<1||t>oe)return s;do t%2&&(s+=e),t=bi(t/2),t&&(e+=e);while(t);return s}function Z(e,t){return ma(Xu(e,t,Je),e+"")}function Gd(e){return iu(sr(e))}function Qd(e,t){var s=sr(e);return Vi(s,Pn(t,0,s.length))}function Hr(e,t,s,u){if(!de(e))return e;t=on(t,e);for(var h=-1,g=t.length,_=g-1,v=e;v!=null&&++h<g;){var S=Tt(t[h]),P=s;if(S==="__proto__"||S==="constructor"||S==="prototype")return e;if(h!=_){var I=v[S];P=u?u(I,S,v):r,P===r&&(P=de(I)?I:Qt(t[h+1])?[]:{})}Dr(v,S,P),v=v[S]}return e}var Cu=Ri?function(e,t){return Ri.set(e,t),e}:Je,qd=yi?function(e,t){return yi(e,"toString",{configurable:!0,enumerable:!1,value:Aa(t),writable:!0})}:Je;function zd(e){return Vi(sr(e))}function ft(e,t,s){var u=-1,h=e.length;t<0&&(t=-t>h?0:h+t),s=s>h?h:s,s<0&&(s+=h),h=t>s?0:s-t>>>0,t>>>=0;for(var g=T(h);++u<h;)g[u]=e[u+t];return g}function Kd(e,t){var s;return sn(e,function(u,h,g){return s=t(u,h,g),!s}),!!s}function Ui(e,t,s){var u=0,h=e==null?u:e.length;if(typeof t=="number"&&t===t&&h<=Jc){for(;u<h;){var g=u+h>>>1,_=e[g];_!==null&&!rt(_)&&(s?_<=t:_<t)?u=g+1:h=g}return h}return ea(e,t,Je,s)}function ea(e,t,s,u){var h=0,g=e==null?0:e.length;if(g===0)return 0;t=s(t);for(var _=t!==t,v=t===null,S=rt(t),P=t===r;h<g;){var I=bi((h+g)/2),L=s(e[I]),M=L!==r,W=L===null,Q=L===L,X=rt(L);if(_)var V=u||Q;else P?V=Q&&(u||M):v?V=Q&&M&&(u||!W):S?V=Q&&M&&!W&&(u||!X):W||X?V=!1:V=u?L<=t:L<t;V?h=I+1:g=I}return De(g,Yc)}function yu(e,t){for(var s=-1,u=e.length,h=0,g=[];++s<u;){var _=e[s],v=t?t(_):_;if(!s||!bt(v,S)){var S=v;g[h++]=_===0?0:_}}return g}function Tu(e){return typeof e=="number"?e:rt(e)?jt:+e}function nt(e){if(typeof e=="string")return e;if(Y(e))return fe(e,nt)+"";if(rt(e))return nu?nu.call(e):"";var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function an(e,t,s){var u=-1,h=fi,g=e.length,_=!0,v=[],S=v;if(s)_=!1,h=Is;else if(g>=o){var P=t?null:sg(e);if(P)return gi(P);_=!1,h=xr,S=new An}else S=t?[]:v;e:for(;++u<g;){var I=e[u],L=t?t(I):I;if(I=s||I!==0?I:0,_&&L===L){for(var M=S.length;M--;)if(S[M]===L)continue e;t&&S.push(L),v.push(I)}else h(S,L,s)||(S!==v&&S.push(L),v.push(I))}return v}function ta(e,t){t=on(t,e);var s=-1,u=t.length;if(!u)return!0;for(;++s<u;){var h=Tt(t[s]);if(h==="__proto__"&&!se.call(e,"__proto__")||(h==="constructor"||h==="prototype")&&s<u-1)return!1}var g=Zu(e,t);return g==null||delete g[Tt(dt(t))]}function bu(e,t,s,u){return Hr(e,t,s(In(e,t)),u)}function Oi(e,t,s,u){for(var h=e.length,g=u?h:-1;(u?g--:++g<h)&&t(e[g],g,e););return s?ft(e,u?0:g,u?g+1:h):ft(e,u?g+1:0,u?h:g)}function Ru(e,t){var s=e;return s instanceof te&&(s=s.value()),xs(t,function(u,h){return h.func.apply(h.thisArg,tn([u],h.args))},s)}function na(e,t,s){var u=e.length;if(u<2)return u?an(e[0]):[];for(var h=-1,g=T(u);++h<u;)for(var _=e[h],v=-1;++v<u;)v!=h&&(g[h]=Mr(g[h]||_,e[v],t,s));return an(Ue(g,1),t,s)}function Au(e,t,s){for(var u=-1,h=e.length,g=t.length,_={};++u<h;){var v=u<g?t[u]:r;s(_,e[u],v)}return _}function ra(e){return _e(e)?e:[]}function ia(e){return typeof e=="function"?e:Je}function on(e,t){return Y(e)?e:da(e,t)?[e]:nl(ae(e))}var Yd=Z;function un(e,t,s){var u=e.length;return s=s===r?u:s,!t&&s>=u?e:ft(e,t,s)}var Pu=Df||function(e){return Ne.clearTimeout(e)};function Iu(e,t){if(t)return e.slice();var s=e.length,u=Jo?Jo(s):new e.constructor(s);return e.copy(u),u}function sa(e){var t=new e.constructor(e.byteLength);return new Si(t).set(new Si(e)),t}function Jd(e,t){var s=t?sa(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Xd(e){var t=new e.constructor(e.source,ho.exec(e));return t.lastIndex=e.lastIndex,t}function Zd(e){return $r?le($r.call(e)):{}}function xu(e,t){var s=t?sa(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Lu(e,t){if(e!==t){var s=e!==r,u=e===null,h=e===e,g=rt(e),_=t!==r,v=t===null,S=t===t,P=rt(t);if(!v&&!P&&!g&&e>t||g&&_&&S&&!v&&!P||u&&_&&S||!s&&S||!h)return 1;if(!u&&!g&&!P&&e<t||P&&s&&h&&!u&&!g||v&&s&&h||!_&&h||!S)return-1}return 0}function jd(e,t,s){for(var u=-1,h=e.criteria,g=t.criteria,_=h.length,v=s.length;++u<_;){var S=Lu(h[u],g[u]);if(S){if(u>=v)return S;var P=s[u];return S*(P=="desc"?-1:1)}}return e.index-t.index}function Nu(e,t,s,u){for(var h=-1,g=e.length,_=s.length,v=-1,S=t.length,P=ye(g-_,0),I=T(S+P),L=!u;++v<S;)I[v]=t[v];for(;++h<_;)(L||h<g)&&(I[s[h]]=e[h]);for(;P--;)I[v++]=e[h++];return I}function Uu(e,t,s,u){for(var h=-1,g=e.length,_=-1,v=s.length,S=-1,P=t.length,I=ye(g-v,0),L=T(I+P),M=!u;++h<I;)L[h]=e[h];for(var W=h;++S<P;)L[W+S]=t[S];for(;++_<v;)(M||h<g)&&(L[W+s[_]]=e[h++]);return L}function ze(e,t){var s=-1,u=e.length;for(t||(t=T(u));++s<u;)t[s]=e[s];return t}function $t(e,t,s,u){var h=!s;s||(s={});for(var g=-1,_=t.length;++g<_;){var v=t[g],S=u?u(s[v],e[v],v,s,e):r;S===r&&(S=e[v]),h?Ut(s,v,S):Dr(s,v,S)}return s}function eg(e,t){return $t(e,fa(e),t)}function tg(e,t){return $t(e,qu(e),t)}function $i(e,t){return function(s,u){var h=Y(s)?af:yd,g=t?t():{};return h(s,e,B(u,2),g)}}function tr(e){return Z(function(t,s){var u=-1,h=s.length,g=h>1?s[h-1]:r,_=h>2?s[2]:r;for(g=e.length>3&&typeof g=="function"?(h--,g):r,_&&We(s[0],s[1],_)&&(g=h<3?r:g,h=1),t=le(t);++u<h;){var v=s[u];v&&e(t,v,u,g)}return t})}function Ou(e,t){return function(s,u){if(s==null)return s;if(!Ke(s))return e(s,u);for(var h=s.length,g=t?h:-1,_=le(s);(t?g--:++g<h)&&u(_[g],g,_)!==!1;);return s}}function $u(e){return function(t,s,u){for(var h=-1,g=le(t),_=u(t),v=_.length;v--;){var S=_[e?v:++h];if(s(g[S],S,g)===!1)break}return t}}function ng(e,t,s){var u=t&H,h=Wr(e);function g(){var _=this&&this!==Ne&&this instanceof g?h:e;return _.apply(u?s:this,arguments)}return g}function Du(e){return function(t){t=ae(t);var s=Kn(t)?Ct(t):r,u=s?s[0]:t.charAt(0),h=s?un(s,1).join(""):t.slice(1);return u[e]()+h}}function nr(e){return function(t){return xs($l(Ol(t).replace(Qh,"")),e,"")}}function Wr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var s=er(e.prototype),u=e.apply(s,t);return de(u)?u:s}}function rg(e,t,s){var u=Wr(e);function h(){for(var g=arguments.length,_=T(g),v=g,S=rr(h);v--;)_[v]=arguments[v];var P=g<3&&_[0]!==S&&_[g-1]!==S?[]:nn(_,S);if(g-=P.length,g<s)return Wu(e,t,Di,h.placeholder,r,_,P,r,r,s-g);var I=this&&this!==Ne&&this instanceof h?u:e;return je(I,this,_)}return h}function Mu(e){return function(t,s,u){var h=le(t);if(!Ke(t)){var g=B(s,3);t=Ie(t),s=function(v){return g(h[v],v,h)}}var _=e(t,s,u);return _>-1?h[g?t[_]:_]:r}}function Fu(e){return Gt(function(t){var s=t.length,u=s,h=ct.prototype.thru;for(e&&t.reverse();u--;){var g=t[u];if(typeof g!="function")throw new lt(l);if(h&&!_&&Hi(g)=="wrapper")var _=new ct([],!0)}for(u=_?u:s;++u<s;){g=t[u];var v=Hi(g),S=v=="wrapper"?ca(g):r;S&&ga(S[0])&&S[1]==(Re|ge|Le|Ae)&&!S[4].length&&S[9]==1?_=_[Hi(S[0])].apply(_,S[3]):_=g.length==1&&ga(g)?_[v]():_.thru(g)}return function(){var P=arguments,I=P[0];if(_&&P.length==1&&Y(I))return _.plant(I).value();for(var L=0,M=s?t[L].apply(this,P):I;++L<s;)M=t[L].call(this,M);return M}})}function Di(e,t,s,u,h,g,_,v,S,P){var I=t&Re,L=t&H,M=t&re,W=t&(ge|qe),Q=t&Se,X=M?r:Wr(e);function V(){for(var j=arguments.length,ne=T(j),it=j;it--;)ne[it]=arguments[it];if(W)var Ve=rr(V),st=pf(ne,Ve);if(u&&(ne=Nu(ne,u,h,W)),g&&(ne=Uu(ne,g,_,W)),j-=st,W&&j<P){var ve=nn(ne,Ve);return Wu(e,t,Di,V.placeholder,s,ne,ve,v,S,P-j)}var Rt=L?s:this,Kt=M?Rt[e]:e;return j=ne.length,v?ne=yg(ne,v):Q&&j>1&&ne.reverse(),I&&S<j&&(ne.length=S),this&&this!==Ne&&this instanceof V&&(Kt=X||Wr(Kt)),Kt.apply(Rt,ne)}return V}function ku(e,t){return function(s,u){return Ld(s,e,t(u),{})}}function Mi(e,t){return function(s,u){var h;if(s===r&&u===r)return t;if(s!==r&&(h=s),u!==r){if(h===r)return u;typeof s=="string"||typeof u=="string"?(s=nt(s),u=nt(u)):(s=Tu(s),u=Tu(u)),h=e(s,u)}return h}}function aa(e){return Gt(function(t){return t=fe(t,tt(B())),Z(function(s){var u=this;return e(t,function(h){return je(h,u,s)})})})}function Fi(e,t){t=t===r?" ":nt(t);var s=t.length;if(s<2)return s?js(t,e):t;var u=js(t,Ti(e/Yn(t)));return Kn(t)?un(Ct(u),0,e).join(""):u.slice(0,e)}function ig(e,t,s,u){var h=t&H,g=Wr(e);function _(){for(var v=-1,S=arguments.length,P=-1,I=u.length,L=T(I+S),M=this&&this!==Ne&&this instanceof _?g:e;++P<I;)L[P]=u[P];for(;S--;)L[P++]=arguments[++v];return je(M,h?s:this,L)}return _}function Hu(e){return function(t,s,u){return u&&typeof u!="number"&&We(t,s,u)&&(s=u=r),t=zt(t),s===r?(s=t,t=0):s=zt(s),u=u===r?t<s?1:-1:zt(u),Bd(t,s,u,e)}}function ki(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=gt(t),s=gt(s)),e(t,s)}}function Wu(e,t,s,u,h,g,_,v,S,P){var I=t&ge,L=I?_:r,M=I?r:_,W=I?g:r,Q=I?r:g;t|=I?Le:Ze,t&=~(I?Ze:Le),t&we||(t&=-4);var X=[e,t,h,W,L,Q,M,v,S,P],V=s.apply(r,X);return ga(e)&&ju(V,X),V.placeholder=u,el(V,e,t)}function oa(e){var t=Ce[e];return function(s,u){if(s=gt(s),u=u==null?0:De(J(u),292),u&&eu(s)){var h=(ae(s)+"e").split("e"),g=t(h[0]+"e"+(+h[1]+u));return h=(ae(g)+"e").split("e"),+(h[0]+"e"+(+h[1]-u))}return t(s)}}var sg=Zn&&1/gi(new Zn([,-0]))[1]==ot?function(e){return new Zn(e)}:xa;function Vu(e){return function(t){var s=Me(t);return s==St?Ms(t):s==Et?Cf(t):gf(t,e(t))}}function Bt(e,t,s,u,h,g,_,v){var S=t&re;if(!S&&typeof e!="function")throw new lt(l);var P=u?u.length:0;if(P||(t&=-97,u=h=r),_=_===r?_:ye(J(_),0),v=v===r?v:J(v),P-=h?h.length:0,t&Ze){var I=u,L=h;u=h=r}var M=S?r:ca(e),W=[e,t,s,u,h,I,L,g,_,v];if(M&&Sg(W,M),e=W[0],t=W[1],s=W[2],u=W[3],h=W[4],v=W[9]=W[9]===r?S?0:e.length:ye(W[9]-P,0),!v&&t&(ge|qe)&&(t&=-25),!t||t==H)var Q=ng(e,t,s);else t==ge||t==qe?Q=rg(e,t,v):(t==Le||t==(H|Le))&&!h.length?Q=ig(e,t,s,u):Q=Di.apply(r,W);var X=M?Cu:ju;return el(X(Q,W),e,t)}function Bu(e,t,s,u){return e===r||bt(e,Xn[s])&&!se.call(u,s)?t:e}function Gu(e,t,s,u,h,g){return de(e)&&de(t)&&(g.set(t,e),Ni(e,t,r,Gu,g),g.delete(t)),e}function ag(e){return Gr(e)?r:e}function Qu(e,t,s,u,h,g){var _=s&x,v=e.length,S=t.length;if(v!=S&&!(_&&S>v))return!1;var P=g.get(e),I=g.get(t);if(P&&I)return P==t&&I==e;var L=-1,M=!0,W=s&U?new An:r;for(g.set(e,t),g.set(t,e);++L<v;){var Q=e[L],X=t[L];if(u)var V=_?u(X,Q,L,t,e,g):u(Q,X,L,e,t,g);if(V!==r){if(V)continue;M=!1;break}if(W){if(!Ls(t,function(j,ne){if(!xr(W,ne)&&(Q===j||h(Q,j,s,u,g)))return W.push(ne)})){M=!1;break}}else if(!(Q===X||h(Q,X,s,u,g))){M=!1;break}}return g.delete(e),g.delete(t),M}function og(e,t,s,u,h,g,_){switch(s){case Qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ir:return!(e.byteLength!=t.byteLength||!g(new Si(e),new Si(t)));case yr:case Tr:case br:return bt(+e,+t);case ai:return e.name==t.name&&e.message==t.message;case Rr:case Ar:return e==t+"";case St:var v=Ms;case Et:var S=u&x;if(v||(v=gi),e.size!=t.size&&!S)return!1;var P=_.get(e);if(P)return P==t;u|=U,_.set(e,t);var I=Qu(v(e),v(t),u,h,g,_);return _.delete(e),I;case ui:if($r)return $r.call(e)==$r.call(t)}return!1}function ug(e,t,s,u,h,g){var _=s&x,v=ua(e),S=v.length,P=ua(t),I=P.length;if(S!=I&&!_)return!1;for(var L=S;L--;){var M=v[L];if(!(_?M in t:se.call(t,M)))return!1}var W=g.get(e),Q=g.get(t);if(W&&Q)return W==t&&Q==e;var X=!0;g.set(e,t),g.set(t,e);for(var V=_;++L<S;){M=v[L];var j=e[M],ne=t[M];if(u)var it=_?u(ne,j,M,t,e,g):u(j,ne,M,e,t,g);if(!(it===r?j===ne||h(j,ne,s,u,g):it)){X=!1;break}V||(V=M=="constructor")}if(X&&!V){var Ve=e.constructor,st=t.constructor;Ve!=st&&"constructor"in e&&"constructor"in t&&!(typeof Ve=="function"&&Ve instanceof Ve&&typeof st=="function"&&st instanceof st)&&(X=!1)}return g.delete(e),g.delete(t),X}function Gt(e){return ma(Xu(e,r,al),e+"")}function ua(e){return hu(e,Ie,fa)}function la(e){return hu(e,Ye,qu)}var ca=Ri?function(e){return Ri.get(e)}:xa;function Hi(e){for(var t=e.name+"",s=jn[t],u=se.call(jn,t)?s.length:0;u--;){var h=s[u],g=h.func;if(g==null||g==e)return h.name}return t}function rr(e){var t=se.call(d,"placeholder")?d:e;return t.placeholder}function B(){var e=d.iteratee||Pa;return e=e===Pa?gu:e,arguments.length?e(arguments[0],arguments[1]):e}function Wi(e,t){var s=e.__data__;return mg(t)?s[typeof t=="string"?"string":"hash"]:s.map}function ha(e){for(var t=Ie(e),s=t.length;s--;){var u=t[s],h=e[u];t[s]=[u,h,Yu(h)]}return t}function xn(e,t){var s=wf(e,t);return du(s)?s:r}function lg(e){var t=se.call(e,bn),s=e[bn];try{e[bn]=r;var u=!0}catch{}var h=vi.call(e);return u&&(t?e[bn]=s:delete e[bn]),h}var fa=ks?function(e){return e==null?[]:(e=le(e),en(ks(e),function(t){return Zo.call(e,t)}))}:La,qu=ks?function(e){for(var t=[];e;)tn(t,fa(e)),e=Ei(e);return t}:La,Me=He;(Hs&&Me(new Hs(new ArrayBuffer(1)))!=Qn||Nr&&Me(new Nr)!=St||Ws&&Me(Ws.resolve())!=ao||Zn&&Me(new Zn)!=Et||Ur&&Me(new Ur)!=Pr)&&(Me=function(e){var t=He(e),s=t==Ht?e.constructor:r,u=s?Ln(s):"";if(u)switch(u){case Qf:return Qn;case qf:return St;case zf:return ao;case Kf:return Et;case Yf:return Pr}return t});function cg(e,t,s){for(var u=-1,h=s.length;++u<h;){var g=s[u],_=g.size;switch(g.type){case"drop":e+=_;break;case"dropRight":t-=_;break;case"take":t=De(t,e+_);break;case"takeRight":e=ye(e,t-_);break}}return{start:e,end:t}}function hg(e){var t=e.match(_h);return t?t[1].split(vh):[]}function zu(e,t,s){t=on(t,e);for(var u=-1,h=t.length,g=!1;++u<h;){var _=Tt(t[u]);if(!(g=e!=null&&s(e,_)))break;e=e[_]}return g||++u!=h?g:(h=e==null?0:e.length,!!h&&Ki(h)&&Qt(_,h)&&(Y(e)||Nn(e)))}function fg(e){var t=e.length,s=new e.constructor(t);return t&&typeof e[0]=="string"&&se.call(e,"index")&&(s.index=e.index,s.input=e.input),s}function Ku(e){return typeof e.constructor=="function"&&!Vr(e)?er(Ei(e)):{}}function dg(e,t,s){var u=e.constructor;switch(t){case Ir:return sa(e);case yr:case Tr:return new u(+e);case Qn:return Jd(e,s);case hs:case fs:case ds:case gs:case ps:case ms:case _s:case vs:case ws:return xu(e,s);case St:return new u;case br:case Ar:return new u(e);case Rr:return Xd(e);case Et:return new u;case ui:return Zd(e)}}function gg(e,t){var s=t.length;if(!s)return e;var u=s-1;return t[u]=(s>1?"& ":"")+t[u],t=t.join(s>2?", ":" "),e.replace(mh,`{
2
- /* [wrapped with `+t+`] */
3
- `)}function pg(e){return Y(e)||Nn(e)||!!(jo&&e&&e[jo])}function Qt(e,t){var s=typeof e;return t=t??oe,!!t&&(s=="number"||s!="symbol"&&Rh.test(e))&&e>-1&&e%1==0&&e<t}function We(e,t,s){if(!de(s))return!1;var u=typeof t;return(u=="number"?Ke(s)&&Qt(t,s.length):u=="string"&&t in s)?bt(s[t],e):!1}function da(e,t){if(Y(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||rt(e)?!0:fh.test(e)||!hh.test(e)||t!=null&&e in le(t)}function mg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ga(e){var t=Hi(e),s=d[t];if(typeof s!="function"||!(t in te.prototype))return!1;if(e===s)return!0;var u=ca(s);return!!u&&e===u[0]}function _g(e){return!!Yo&&Yo in e}var vg=mi?qt:Na;function Vr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Xn;return e===s}function Yu(e){return e===e&&!de(e)}function Ju(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in le(s))}}function wg(e){var t=qi(e,function(u){return s.size===E&&s.clear(),u}),s=t.cache;return t}function Sg(e,t){var s=e[1],u=t[1],h=s|u,g=h<(H|re|Re),_=u==Re&&s==ge||u==Re&&s==Ae&&e[7].length<=t[8]||u==(Re|Ae)&&t[7].length<=t[8]&&s==ge;if(!(g||_))return e;u&H&&(e[2]=t[2],h|=s&H?0:we);var v=t[3];if(v){var S=e[3];e[3]=S?Nu(S,v,t[4]):v,e[4]=S?nn(e[3],y):t[4]}return v=t[5],v&&(S=e[5],e[5]=S?Uu(S,v,t[6]):v,e[6]=S?nn(e[5],y):t[6]),v=t[7],v&&(e[7]=v),u&Re&&(e[8]=e[8]==null?t[8]:De(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=h,e}function Eg(e){var t=[];if(e!=null)for(var s in le(e))t.push(s);return t}function Cg(e){return vi.call(e)}function Xu(e,t,s){return t=ye(t===r?e.length-1:t,0),function(){for(var u=arguments,h=-1,g=ye(u.length-t,0),_=T(g);++h<g;)_[h]=u[t+h];h=-1;for(var v=T(t+1);++h<t;)v[h]=u[h];return v[t]=s(_),je(e,this,v)}}function Zu(e,t){return t.length<2?e:In(e,ft(t,0,-1))}function yg(e,t){for(var s=e.length,u=De(t.length,s),h=ze(e);u--;){var g=t[u];e[u]=Qt(g,s)?h[g]:r}return e}function pa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var ju=tl(Cu),Br=Ff||function(e,t){return Ne.setTimeout(e,t)},ma=tl(qd);function el(e,t,s){var u=t+"";return ma(e,gg(u,Tg(hg(u),s)))}function tl(e){var t=0,s=0;return function(){var u=Vf(),h=wt-(u-s);if(s=u,h>0){if(++t>=Zt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Vi(e,t){var s=-1,u=e.length,h=u-1;for(t=t===r?u:t;++s<t;){var g=Zs(s,h),_=e[g];e[g]=e[s],e[s]=_}return e.length=t,e}var nl=wg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dh,function(s,u,h,g){t.push(h?g.replace(Sh,"$1"):u||s)}),t});function Tt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function Ln(e){if(e!=null){try{return _i.call(e)}catch{}try{return e+""}catch{}}return""}function Tg(e,t){return et(Xc,function(s){var u="_."+s[0];t&s[1]&&!fi(e,u)&&e.push(u)}),e.sort()}function rl(e){if(e instanceof te)return e.clone();var t=new ct(e.__wrapped__,e.__chain__);return t.__actions__=ze(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function bg(e,t,s){(s?We(e,t,s):t===r)?t=1:t=ye(J(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var h=0,g=0,_=T(Ti(u/t));h<u;)_[g++]=ft(e,h,h+=t);return _}function Rg(e){for(var t=-1,s=e==null?0:e.length,u=0,h=[];++t<s;){var g=e[t];g&&(h[u++]=g)}return h}function Ag(){var e=arguments.length;if(!e)return[];for(var t=T(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return tn(Y(s)?ze(s):[s],Ue(t,1))}var Pg=Z(function(e,t){return _e(e)?Mr(e,Ue(t,1,_e,!0)):[]}),Ig=Z(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?Mr(e,Ue(t,1,_e,!0),B(s,2)):[]}),xg=Z(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?Mr(e,Ue(t,1,_e,!0),r,s):[]});function Lg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),ft(e,t<0?0:t,u)):[]}function Ng(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),t=u-t,ft(e,0,t<0?0:t)):[]}function Ug(e,t){return e&&e.length?Oi(e,B(t,3),!0,!0):[]}function Og(e,t){return e&&e.length?Oi(e,B(t,3),!0):[]}function $g(e,t,s,u){var h=e==null?0:e.length;return h?(s&&typeof s!="number"&&We(e,t,s)&&(s=0,u=h),Ad(e,t,s,u)):[]}function il(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=ye(u+h,0)),di(e,B(t,3),h)}function sl(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u-1;return s!==r&&(h=J(s),h=s<0?ye(u+h,0):De(h,u-1)),di(e,B(t,3),h,!0)}function al(e){var t=e==null?0:e.length;return t?Ue(e,1):[]}function Dg(e){var t=e==null?0:e.length;return t?Ue(e,ot):[]}function Mg(e,t){var s=e==null?0:e.length;return s?(t=t===r?1:J(t),Ue(e,t)):[]}function Fg(e){for(var t=-1,s=e==null?0:e.length,u={};++t<s;){var h=e[t];Ut(u,h[0],h[1])}return u}function ol(e){return e&&e.length?e[0]:r}function kg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:J(s);return h<0&&(h=ye(u+h,0)),zn(e,t,h)}function Hg(e){var t=e==null?0:e.length;return t?ft(e,0,-1):[]}var Wg=Z(function(e){var t=fe(e,ra);return t.length&&t[0]===e[0]?zs(t):[]}),Vg=Z(function(e){var t=dt(e),s=fe(e,ra);return t===dt(s)?t=r:s.pop(),s.length&&s[0]===e[0]?zs(s,B(t,2)):[]}),Bg=Z(function(e){var t=dt(e),s=fe(e,ra);return t=typeof t=="function"?t:r,t&&s.pop(),s.length&&s[0]===e[0]?zs(s,r,t):[]});function Gg(e,t){return e==null?"":Hf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Qg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u;return s!==r&&(h=J(s),h=h<0?ye(u+h,0):De(h,u-1)),t===t?Tf(e,t,h):di(e,Wo,h,!0)}function qg(e,t){return e&&e.length?vu(e,J(t)):r}var zg=Z(ul);function ul(e,t){return e&&e.length&&t&&t.length?Xs(e,t):e}function Kg(e,t,s){return e&&e.length&&t&&t.length?Xs(e,t,B(s,2)):e}function Yg(e,t,s){return e&&e.length&&t&&t.length?Xs(e,t,r,s):e}var Jg=Gt(function(e,t){var s=e==null?0:e.length,u=Bs(e,t);return Eu(e,fe(t,function(h){return Qt(h,s)?+h:h}).sort(Lu)),u});function Xg(e,t){var s=[];if(!(e&&e.length))return s;var u=-1,h=[],g=e.length;for(t=B(t,3);++u<g;){var _=e[u];t(_,u,e)&&(s.push(_),h.push(u))}return Eu(e,h),s}function _a(e){return e==null?e:Gf.call(e)}function Zg(e,t,s){var u=e==null?0:e.length;return u?(s&&typeof s!="number"&&We(e,t,s)?(t=0,s=u):(t=t==null?0:J(t),s=s===r?u:J(s)),ft(e,t,s)):[]}function jg(e,t){return Ui(e,t)}function ep(e,t,s){return ea(e,t,B(s,2))}function tp(e,t){var s=e==null?0:e.length;if(s){var u=Ui(e,t);if(u<s&&bt(e[u],t))return u}return-1}function np(e,t){return Ui(e,t,!0)}function rp(e,t,s){return ea(e,t,B(s,2),!0)}function ip(e,t){var s=e==null?0:e.length;if(s){var u=Ui(e,t,!0)-1;if(bt(e[u],t))return u}return-1}function sp(e){return e&&e.length?yu(e):[]}function ap(e,t){return e&&e.length?yu(e,B(t,2)):[]}function op(e){var t=e==null?0:e.length;return t?ft(e,1,t):[]}function up(e,t,s){return e&&e.length?(t=s||t===r?1:J(t),ft(e,0,t<0?0:t)):[]}function lp(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:J(t),t=u-t,ft(e,t<0?0:t,u)):[]}function cp(e,t){return e&&e.length?Oi(e,B(t,3),!1,!0):[]}function hp(e,t){return e&&e.length?Oi(e,B(t,3)):[]}var fp=Z(function(e){return an(Ue(e,1,_e,!0))}),dp=Z(function(e){var t=dt(e);return _e(t)&&(t=r),an(Ue(e,1,_e,!0),B(t,2))}),gp=Z(function(e){var t=dt(e);return t=typeof t=="function"?t:r,an(Ue(e,1,_e,!0),r,t)});function pp(e){return e&&e.length?an(e):[]}function mp(e,t){return e&&e.length?an(e,B(t,2)):[]}function _p(e,t){return t=typeof t=="function"?t:r,e&&e.length?an(e,r,t):[]}function va(e){if(!(e&&e.length))return[];var t=0;return e=en(e,function(s){if(_e(s))return t=ye(s.length,t),!0}),$s(t,function(s){return fe(e,Ns(s))})}function ll(e,t){if(!(e&&e.length))return[];var s=va(e);return t==null?s:fe(s,function(u){return je(t,r,u)})}var vp=Z(function(e,t){return _e(e)?Mr(e,t):[]}),wp=Z(function(e){return na(en(e,_e))}),Sp=Z(function(e){var t=dt(e);return _e(t)&&(t=r),na(en(e,_e),B(t,2))}),Ep=Z(function(e){var t=dt(e);return t=typeof t=="function"?t:r,na(en(e,_e),r,t)}),Cp=Z(va);function yp(e,t){return Au(e||[],t||[],Dr)}function Tp(e,t){return Au(e||[],t||[],Hr)}var bp=Z(function(e){var t=e.length,s=t>1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,ll(e,s)});function cl(e){var t=d(e);return t.__chain__=!0,t}function Rp(e,t){return t(e),e}function Bi(e,t){return t(e)}var Ap=Gt(function(e){var t=e.length,s=t?e[0]:0,u=this.__wrapped__,h=function(g){return Bs(g,e)};return t>1||this.__actions__.length||!(u instanceof te)||!Qt(s)?this.thru(h):(u=u.slice(s,+s+(t?1:0)),u.__actions__.push({func:Bi,args:[h],thisArg:r}),new ct(u,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function Pp(){return cl(this)}function Ip(){return new ct(this.value(),this.__chain__)}function xp(){this.__values__===r&&(this.__values__=Tl(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Lp(){return this}function Np(e){for(var t,s=this;s instanceof Pi;){var u=rl(s);u.__index__=0,u.__values__=r,t?h.__wrapped__=u:t=u;var h=u;s=s.__wrapped__}return h.__wrapped__=e,t}function Up(){var e=this.__wrapped__;if(e instanceof te){var t=e;return this.__actions__.length&&(t=new te(this)),t=t.reverse(),t.__actions__.push({func:Bi,args:[_a],thisArg:r}),new ct(t,this.__chain__)}return this.thru(_a)}function Op(){return Ru(this.__wrapped__,this.__actions__)}var $p=$i(function(e,t,s){se.call(e,s)?++e[s]:Ut(e,s,1)});function Dp(e,t,s){var u=Y(e)?ko:Rd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}function Mp(e,t){var s=Y(e)?en:lu;return s(e,B(t,3))}var Fp=Mu(il),kp=Mu(sl);function Hp(e,t){return Ue(Gi(e,t),1)}function Wp(e,t){return Ue(Gi(e,t),ot)}function Vp(e,t,s){return s=s===r?1:J(s),Ue(Gi(e,t),s)}function hl(e,t){var s=Y(e)?et:sn;return s(e,B(t,3))}function fl(e,t){var s=Y(e)?of:uu;return s(e,B(t,3))}var Bp=$i(function(e,t,s){se.call(e,s)?e[s].push(t):Ut(e,s,[t])});function Gp(e,t,s,u){e=Ke(e)?e:sr(e),s=s&&!u?J(s):0;var h=e.length;return s<0&&(s=ye(h+s,0)),Yi(e)?s<=h&&e.indexOf(t,s)>-1:!!h&&zn(e,t,s)>-1}var Qp=Z(function(e,t,s){var u=-1,h=typeof t=="function",g=Ke(e)?T(e.length):[];return sn(e,function(_){g[++u]=h?je(t,_,s):Fr(_,t,s)}),g}),qp=$i(function(e,t,s){Ut(e,s,t)});function Gi(e,t){var s=Y(e)?fe:pu;return s(e,B(t,3))}function zp(e,t,s,u){return e==null?[]:(Y(t)||(t=t==null?[]:[t]),s=u?r:s,Y(s)||(s=s==null?[]:[s]),wu(e,t,s))}var Kp=$i(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Yp(e,t,s){var u=Y(e)?xs:Bo,h=arguments.length<3;return u(e,B(t,4),s,h,sn)}function Jp(e,t,s){var u=Y(e)?uf:Bo,h=arguments.length<3;return u(e,B(t,4),s,h,uu)}function Xp(e,t){var s=Y(e)?en:lu;return s(e,zi(B(t,3)))}function Zp(e){var t=Y(e)?iu:Gd;return t(e)}function jp(e,t,s){(s?We(e,t,s):t===r)?t=1:t=J(t);var u=Y(e)?Ed:Qd;return u(e,t)}function em(e){var t=Y(e)?Cd:zd;return t(e)}function tm(e){if(e==null)return 0;if(Ke(e))return Yi(e)?Yn(e):e.length;var t=Me(e);return t==St||t==Et?e.size:Ys(e).length}function nm(e,t,s){var u=Y(e)?Ls:Kd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}var rm=Z(function(e,t){if(e==null)return[];var s=t.length;return s>1&&We(e,t[0],t[1])?t=[]:s>2&&We(t[0],t[1],t[2])&&(t=[t[0]]),wu(e,Ue(t,1),[])}),Qi=Mf||function(){return Ne.Date.now()};function im(e,t){if(typeof t!="function")throw new lt(l);return e=J(e),function(){if(--e<1)return t.apply(this,arguments)}}function dl(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Bt(e,Re,r,r,r,r,t)}function gl(e,t){var s;if(typeof t!="function")throw new lt(l);return e=J(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var wa=Z(function(e,t,s){var u=H;if(s.length){var h=nn(s,rr(wa));u|=Le}return Bt(e,u,t,s,h)}),pl=Z(function(e,t,s){var u=H|re;if(s.length){var h=nn(s,rr(pl));u|=Le}return Bt(t,u,e,s,h)});function ml(e,t,s){t=s?r:t;var u=Bt(e,ge,r,r,r,r,r,t);return u.placeholder=ml.placeholder,u}function _l(e,t,s){t=s?r:t;var u=Bt(e,qe,r,r,r,r,r,t);return u.placeholder=_l.placeholder,u}function vl(e,t,s){var u,h,g,_,v,S,P=0,I=!1,L=!1,M=!0;if(typeof e!="function")throw new lt(l);t=gt(t)||0,de(s)&&(I=!!s.leading,L="maxWait"in s,g=L?ye(gt(s.maxWait)||0,t):g,M="trailing"in s?!!s.trailing:M);function W(ve){var Rt=u,Kt=h;return u=h=r,P=ve,_=e.apply(Kt,Rt),_}function Q(ve){return P=ve,v=Br(j,t),I?W(ve):_}function X(ve){var Rt=ve-S,Kt=ve-P,Fl=t-Rt;return L?De(Fl,g-Kt):Fl}function V(ve){var Rt=ve-S,Kt=ve-P;return S===r||Rt>=t||Rt<0||L&&Kt>=g}function j(){var ve=Qi();if(V(ve))return ne(ve);v=Br(j,X(ve))}function ne(ve){return v=r,M&&u?W(ve):(u=h=r,_)}function it(){v!==r&&Pu(v),P=0,u=S=h=v=r}function Ve(){return v===r?_:ne(Qi())}function st(){var ve=Qi(),Rt=V(ve);if(u=arguments,h=this,S=ve,Rt){if(v===r)return Q(S);if(L)return Pu(v),v=Br(j,t),W(S)}return v===r&&(v=Br(j,t)),_}return st.cancel=it,st.flush=Ve,st}var sm=Z(function(e,t){return ou(e,1,t)}),am=Z(function(e,t,s){return ou(e,gt(t)||0,s)});function om(e){return Bt(e,Se)}function qi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new lt(l);var s=function(){var u=arguments,h=t?t.apply(this,u):u[0],g=s.cache;if(g.has(h))return g.get(h);var _=e.apply(this,u);return s.cache=g.set(h,_)||g,_};return s.cache=new(qi.Cache||Vt),s}qi.Cache=Vt;function zi(e){if(typeof e!="function")throw new lt(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function um(e){return gl(2,e)}var lm=Yd(function(e,t){t=t.length==1&&Y(t[0])?fe(t[0],tt(B())):fe(Ue(t,1),tt(B()));var s=t.length;return Z(function(u){for(var h=-1,g=De(u.length,s);++h<g;)u[h]=t[h].call(this,u[h]);return je(e,this,u)})}),Sa=Z(function(e,t){var s=nn(t,rr(Sa));return Bt(e,Le,r,t,s)}),wl=Z(function(e,t){var s=nn(t,rr(wl));return Bt(e,Ze,r,t,s)}),cm=Gt(function(e,t){return Bt(e,Ae,r,r,r,t)});function hm(e,t){if(typeof e!="function")throw new lt(l);return t=t===r?t:J(t),Z(e,t)}function fm(e,t){if(typeof e!="function")throw new lt(l);return t=t==null?0:ye(J(t),0),Z(function(s){var u=s[t],h=un(s,0,t);return u&&tn(h,u),je(e,this,h)})}function dm(e,t,s){var u=!0,h=!0;if(typeof e!="function")throw new lt(l);return de(s)&&(u="leading"in s?!!s.leading:u,h="trailing"in s?!!s.trailing:h),vl(e,t,{leading:u,maxWait:t,trailing:h})}function gm(e){return dl(e,1)}function pm(e,t){return Sa(ia(t),e)}function mm(){if(!arguments.length)return[];var e=arguments[0];return Y(e)?e:[e]}function _m(e){return ht(e,R)}function vm(e,t){return t=typeof t=="function"?t:r,ht(e,R,t)}function wm(e){return ht(e,C|R)}function Sm(e,t){return t=typeof t=="function"?t:r,ht(e,C|R,t)}function Em(e,t){return t==null||au(e,t,Ie(t))}function bt(e,t){return e===t||e!==e&&t!==t}var Cm=ki(qs),ym=ki(function(e,t){return e>=t}),Nn=fu((function(){return arguments})())?fu:function(e){return pe(e)&&se.call(e,"callee")&&!Zo.call(e,"callee")},Y=T.isArray,Tm=Uo?tt(Uo):Nd;function Ke(e){return e!=null&&Ki(e.length)&&!qt(e)}function _e(e){return pe(e)&&Ke(e)}function bm(e){return e===!0||e===!1||pe(e)&&He(e)==yr}var ln=kf||Na,Rm=Oo?tt(Oo):Ud;function Am(e){return pe(e)&&e.nodeType===1&&!Gr(e)}function Pm(e){if(e==null)return!0;if(Ke(e)&&(Y(e)||typeof e=="string"||typeof e.splice=="function"||ln(e)||ir(e)||Nn(e)))return!e.length;var t=Me(e);if(t==St||t==Et)return!e.size;if(Vr(e))return!Ys(e).length;for(var s in e)if(se.call(e,s))return!1;return!0}function Im(e,t){return kr(e,t)}function xm(e,t,s){s=typeof s=="function"?s:r;var u=s?s(e,t):r;return u===r?kr(e,t,r,s):!!u}function Ea(e){if(!pe(e))return!1;var t=He(e);return t==ai||t==jc||typeof e.message=="string"&&typeof e.name=="string"&&!Gr(e)}function Lm(e){return typeof e=="number"&&eu(e)}function qt(e){if(!de(e))return!1;var t=He(e);return t==oi||t==so||t==Zc||t==th}function Sl(e){return typeof e=="number"&&e==J(e)}function Ki(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=oe}function de(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function pe(e){return e!=null&&typeof e=="object"}var El=$o?tt($o):$d;function Nm(e,t){return e===t||Ks(e,t,ha(t))}function Um(e,t,s){return s=typeof s=="function"?s:r,Ks(e,t,ha(t),s)}function Om(e){return Cl(e)&&e!=+e}function $m(e){if(vg(e))throw new z(c);return du(e)}function Dm(e){return e===null}function Mm(e){return e==null}function Cl(e){return typeof e=="number"||pe(e)&&He(e)==br}function Gr(e){if(!pe(e)||He(e)!=Ht)return!1;var t=Ei(e);if(t===null)return!0;var s=se.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&_i.call(s)==Uf}var Ca=Do?tt(Do):Dd;function Fm(e){return Sl(e)&&e>=-oe&&e<=oe}var yl=Mo?tt(Mo):Md;function Yi(e){return typeof e=="string"||!Y(e)&&pe(e)&&He(e)==Ar}function rt(e){return typeof e=="symbol"||pe(e)&&He(e)==ui}var ir=Fo?tt(Fo):Fd;function km(e){return e===r}function Hm(e){return pe(e)&&Me(e)==Pr}function Wm(e){return pe(e)&&He(e)==rh}var Vm=ki(Js),Bm=ki(function(e,t){return e<=t});function Tl(e){if(!e)return[];if(Ke(e))return Yi(e)?Ct(e):ze(e);if(Lr&&e[Lr])return Ef(e[Lr]());var t=Me(e),s=t==St?Ms:t==Et?gi:sr;return s(e)}function zt(e){if(!e)return e===0?e:0;if(e=gt(e),e===ot||e===-ot){var t=e<0?-1:1;return t*ke}return e===e?e:0}function J(e){var t=zt(e),s=t%1;return t===t?s?t-s:t:0}function bl(e){return e?Pn(J(e),0,Nt):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return jt;if(de(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=de(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Go(e);var s=yh.test(e);return s||bh.test(e)?rf(e.slice(2),s?2:8):Ch.test(e)?jt:+e}function Rl(e){return $t(e,Ye(e))}function Gm(e){return e?Pn(J(e),-oe,oe):e===0?e:0}function ae(e){return e==null?"":nt(e)}var Qm=tr(function(e,t){if(Vr(t)||Ke(t)){$t(t,Ie(t),e);return}for(var s in t)se.call(t,s)&&Dr(e,s,t[s])}),Al=tr(function(e,t){$t(t,Ye(t),e)}),Pl=tr(function(e,t,s,u){$t(t,Ye(t),e,u)}),ya=tr(function(e,t,s,u){$t(t,Ie(t),e,u)}),qm=Gt(Bs);function zm(e,t){var s=er(e);return t==null?s:su(s,t)}var Km=Z(function(e,t){e=le(e);var s=-1,u=t.length,h=u>2?t[2]:r;for(h&&We(t[0],t[1],h)&&(u=1);++s<u;)for(var g=t[s],_=Ye(g),v=-1,S=_.length;++v<S;){var P=_[v],I=e[P];(I===r||bt(I,Xn[P])&&!se.call(e,P))&&(e[P]=g[P])}return e}),Ym=Z(function(e){return e.push(r,Gu),je(Il,r,e)});function Jm(e,t){return Ho(e,B(t,3),Ot)}function Xm(e,t){return Ho(e,B(t,3),Qs)}function Zm(e,t){return e==null?e:Gs(e,B(t,3),Ye)}function jm(e,t){return e==null?e:cu(e,B(t,3),Ye)}function e_(e,t){return e&&Ot(e,B(t,3))}function t_(e,t){return e&&Qs(e,B(t,3))}function n_(e){return e==null?[]:Li(e,Ie(e))}function r_(e){return e==null?[]:Li(e,Ye(e))}function Ta(e,t,s){var u=e==null?r:In(e,t);return u===r?s:u}function i_(e,t){return e!=null&&zu(e,t,Pd)}function ba(e,t){return e!=null&&zu(e,t,Id)}var s_=ku(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=vi.call(t)),e[t]=s},Aa(Je)),a_=ku(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=vi.call(t)),se.call(e,t)?e[t].push(s):e[t]=[s]},B),o_=Z(Fr);function Ie(e){return Ke(e)?ru(e):Ys(e)}function Ye(e){return Ke(e)?ru(e,!0):kd(e)}function u_(e,t){var s={};return t=B(t,3),Ot(e,function(u,h,g){Ut(s,t(u,h,g),u)}),s}function l_(e,t){var s={};return t=B(t,3),Ot(e,function(u,h,g){Ut(s,h,t(u,h,g))}),s}var c_=tr(function(e,t,s){Ni(e,t,s)}),Il=tr(function(e,t,s,u){Ni(e,t,s,u)}),h_=Gt(function(e,t){var s={};if(e==null)return s;var u=!1;t=fe(t,function(g){return g=on(g,e),u||(u=g.length>1),g}),$t(e,la(e),s),u&&(s=ht(s,C|b|R,ag));for(var h=t.length;h--;)ta(s,t[h]);return s});function f_(e,t){return xl(e,zi(B(t)))}var d_=Gt(function(e,t){return e==null?{}:Wd(e,t)});function xl(e,t){if(e==null)return{};var s=fe(la(e),function(u){return[u]});return t=B(t),Su(e,s,function(u,h){return t(u,h[0])})}function g_(e,t,s){t=on(t,e);var u=-1,h=t.length;for(h||(h=1,e=r);++u<h;){var g=e==null?r:e[Tt(t[u])];g===r&&(u=h,g=s),e=qt(g)?g.call(e):g}return e}function p_(e,t,s){return e==null?e:Hr(e,t,s)}function m_(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:Hr(e,t,s,u)}var Ll=Vu(Ie),Nl=Vu(Ye);function __(e,t,s){var u=Y(e),h=u||ln(e)||ir(e);if(t=B(t,4),s==null){var g=e&&e.constructor;h?s=u?new g:[]:de(e)?s=qt(g)?er(Ei(e)):{}:s={}}return(h?et:Ot)(e,function(_,v,S){return t(s,_,v,S)}),s}function v_(e,t){return e==null?!0:ta(e,t)}function w_(e,t,s){return e==null?e:bu(e,t,ia(s))}function S_(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:bu(e,t,ia(s),u)}function sr(e){return e==null?[]:Ds(e,Ie(e))}function E_(e){return e==null?[]:Ds(e,Ye(e))}function C_(e,t,s){return s===r&&(s=t,t=r),s!==r&&(s=gt(s),s=s===s?s:0),t!==r&&(t=gt(t),t=t===t?t:0),Pn(gt(e),t,s)}function y_(e,t,s){return t=zt(t),s===r?(s=t,t=0):s=zt(s),e=gt(e),xd(e,t,s)}function T_(e,t,s){if(s&&typeof s!="boolean"&&We(e,t,s)&&(t=s=r),s===r&&(typeof t=="boolean"?(s=t,t=r):typeof e=="boolean"&&(s=e,e=r)),e===r&&t===r?(e=0,t=1):(e=zt(e),t===r?(t=e,e=0):t=zt(t)),e>t){var u=e;e=t,t=u}if(s||e%1||t%1){var h=tu();return De(e+h*(t-e+nf("1e-"+((h+"").length-1))),t)}return Zs(e,t)}var b_=nr(function(e,t,s){return t=t.toLowerCase(),e+(s?Ul(t):t)});function Ul(e){return Ra(ae(e).toLowerCase())}function Ol(e){return e=ae(e),e&&e.replace(Ah,mf).replace(qh,"")}function R_(e,t,s){e=ae(e),t=nt(t);var u=e.length;s=s===r?u:Pn(J(s),0,u);var h=s;return s-=t.length,s>=0&&e.slice(s,h)==t}function A_(e){return e=ae(e),e&&uh.test(e)?e.replace(uo,_f):e}function P_(e){return e=ae(e),e&&gh.test(e)?e.replace(Ss,"\\$&"):e}var I_=nr(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),x_=nr(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),L_=Du("toLowerCase");function N_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;if(!t||u>=t)return e;var h=(t-u)/2;return Fi(bi(h),s)+e+Fi(Ti(h),s)}function U_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;return t&&u<t?e+Fi(t-u,s):e}function O_(e,t,s){e=ae(e),t=J(t);var u=t?Yn(e):0;return t&&u<t?Fi(t-u,s)+e:e}function $_(e,t,s){return s||t==null?t=0:t&&(t=+t),Bf(ae(e).replace(Es,""),t||0)}function D_(e,t,s){return(s?We(e,t,s):t===r)?t=1:t=J(t),js(ae(e),t)}function M_(){var e=arguments,t=ae(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var F_=nr(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function k_(e,t,s){return s&&typeof s!="number"&&We(e,t,s)&&(t=s=r),s=s===r?Nt:s>>>0,s?(e=ae(e),e&&(typeof t=="string"||t!=null&&!Ca(t))&&(t=nt(t),!t&&Kn(e))?un(Ct(e),0,s):e.split(t,s)):[]}var H_=nr(function(e,t,s){return e+(s?" ":"")+Ra(t)});function W_(e,t,s){return e=ae(e),s=s==null?0:Pn(J(s),0,e.length),t=nt(t),e.slice(s,s+t.length)==t}function V_(e,t,s){var u=d.templateSettings;s&&We(e,t,s)&&(t=r),e=ae(e),t=ya({},t,u,Bu);var h=ya({},t.imports,u.imports,Bu),g=Ie(h),_=Ds(h,g);et(g,function(V){if(co.test(V))throw new z(p)});var v,S,P=0,I=t.interpolate||li,L="__p += '",M=Fs((t.escape||li).source+"|"+I.source+"|"+(I===lo?Eh:li).source+"|"+(t.evaluate||li).source+"|$","g"),W="//# sourceURL="+(se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xh+"]")+`
4
- `;e.replace(M,function(V,j,ne,it,Ve,st){return ne||(ne=it),L+=e.slice(P,st).replace(Ph,vf),j&&(v=!0,L+=`' +
5
- __e(`+j+`) +
6
- '`),Ve&&(S=!0,L+=`';
7
- `+Ve+`;
8
- __p += '`),ne&&(L+=`' +
9
- ((__t = (`+ne+`)) == null ? '' : __t) +
10
- '`),P=st+V.length,V}),L+=`';
11
- `;var Q=se.call(t,"variable")&&t.variable;if(!Q)L=`with (obj) {
12
- `+L+`
1
+ class tE{constructor(t){this.$subscribers=new Set,this.$value=t}set(t){this.$value=t,this.$subscribers.forEach(n=>{n(t)})}update(t){this.set(t(this.$value))}subscribe(t){return this.$subscribers.add(t),t(this.$value),()=>{this.$subscribers.delete(t)}}}function Vh(r){return r.$value}function Ma(r){return new tE(r)}var Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ss={exports:{}};var nE=ss.exports,sh;function rE(){return sh||(sh=1,(function(r,t){(function(){var n,s="4.18.1",o=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",f="Invalid `variable` option passed into `_.template`",h="Invalid `imports` option passed into `_.template`",g="__lodash_hash_undefined__",_=500,m="__lodash_placeholder__",w=1,E=2,T=4,R=1,P=2,D=1,H=2,Z=4,de=8,_e=16,pe=32,oe=64,me=128,Re=256,ae=512,lt=30,ut="...",Kt=800,V=16,Bn=1,_r=2,mt=3,Je=1/0,wt=9007199254740991,jr=17976931348623157e292,N=NaN,Ae=4294967295,ne=Ae-1,qe=Ae>>>1,hn=[["ary",me],["bind",D],["bindKey",H],["curry",de],["curryRight",_e],["flip",ae],["partial",pe],["partialRight",oe],["rearg",Re]],xt="[object Arguments]",St="[object Array]",mr="[object AsyncFunction]",bn="[object Boolean]",wr="[object Date]",Lt="[object DOMException]",Sr="[object Error]",Rn="[object Function]",bu="[object GeneratorFunction]",jt="[object Map]",Fi="[object Number]",Sg="[object Null]",An="[object Object]",Ru="[object Promise]",yg="[object Proxy]",Hi="[object RegExp]",Yt="[object Set]",Wi="[object String]",Ns="[object Symbol]",Eg="[object Undefined]",Vi="[object WeakMap]",Cg="[object WeakSet]",Bi="[object ArrayBuffer]",Yr="[object DataView]",Ja="[object Float32Array]",Xa="[object Float64Array]",Za="[object Int8Array]",eo="[object Int16Array]",to="[object Int32Array]",no="[object Uint8Array]",ro="[object Uint8ClampedArray]",io="[object Uint16Array]",so="[object Uint32Array]",Tg=/\b__p \+= '';/g,bg=/\b(__p \+=) '' \+/g,Rg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Au=/&(?:amp|lt|gt|quot|#39);/g,Pu=/[&<>"']/g,Ag=RegExp(Au.source),Pg=RegExp(Pu.source),Ig=/<%-([\s\S]+?)%>/g,xg=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Lg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ng=/^\w*$/,Og=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ao=/[\\^$.*+?()[\]{}|]/g,Ug=RegExp(ao.source),oo=/^\s+/,Dg=/\s/,Mg=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$g=/\{\n\/\* \[wrapped with (.+)\] \*/,kg=/,? & /,Fg=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,xu=/[()=,{}\[\]\/\s]/,Hg=/\\(\\)?/g,Wg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lu=/\w*$/,Vg=/^[-+]0x[0-9a-f]+$/i,Bg=/^0b[01]+$/i,Gg=/^\[object .+?Constructor\]$/,Qg=/^0o[0-7]+$/i,qg=/^(?:0|[1-9]\d*)$/,zg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Os=/($^)/,Kg=/['\n\r\u2028\u2029\\]/g,Us="\\ud800-\\udfff",jg="\\u0300-\\u036f",Yg="\\ufe20-\\ufe2f",Jg="\\u20d0-\\u20ff",Nu=jg+Yg+Jg,Ou="\\u2700-\\u27bf",Uu="a-z\\xdf-\\xf6\\xf8-\\xff",Xg="\\xac\\xb1\\xd7\\xf7",Zg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ep="\\u2000-\\u206f",tp=" \\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",Du="A-Z\\xc0-\\xd6\\xd8-\\xde",Mu="\\ufe0e\\ufe0f",$u=Xg+Zg+ep+tp,lo="['’]",np="["+Us+"]",ku="["+$u+"]",Ds="["+Nu+"]",Fu="\\d+",rp="["+Ou+"]",Hu="["+Uu+"]",Wu="[^"+Us+$u+Fu+Ou+Uu+Du+"]",uo="\\ud83c[\\udffb-\\udfff]",ip="(?:"+Ds+"|"+uo+")",Vu="[^"+Us+"]",co="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",Jr="["+Du+"]",Bu="\\u200d",Gu="(?:"+Hu+"|"+Wu+")",sp="(?:"+Jr+"|"+Wu+")",Qu="(?:"+lo+"(?:d|ll|m|re|s|t|ve))?",qu="(?:"+lo+"(?:D|LL|M|RE|S|T|VE))?",zu=ip+"?",Ku="["+Mu+"]?",ap="(?:"+Bu+"(?:"+[Vu,co,fo].join("|")+")"+Ku+zu+")*",op="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ju=Ku+zu+ap,up="(?:"+[rp,co,fo].join("|")+")"+ju,cp="(?:"+[Vu+Ds+"?",Ds,co,fo,np].join("|")+")",fp=RegExp(lo,"g"),hp=RegExp(Ds,"g"),ho=RegExp(uo+"(?="+uo+")|"+cp+ju,"g"),dp=RegExp([Jr+"?"+Hu+"+"+Qu+"(?="+[ku,Jr,"$"].join("|")+")",sp+"+"+qu+"(?="+[ku,Jr+Gu,"$"].join("|")+")",Jr+"?"+Gu+"+"+Qu,Jr+"+"+qu,lp,op,Fu,up].join("|"),"g"),gp=RegExp("["+Bu+Us+Nu+Mu+"]"),pp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vp=["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"],_p=-1,Pe={};Pe[Ja]=Pe[Xa]=Pe[Za]=Pe[eo]=Pe[to]=Pe[no]=Pe[ro]=Pe[io]=Pe[so]=!0,Pe[xt]=Pe[St]=Pe[Bi]=Pe[bn]=Pe[Yr]=Pe[wr]=Pe[Sr]=Pe[Rn]=Pe[jt]=Pe[Fi]=Pe[An]=Pe[Hi]=Pe[Yt]=Pe[Wi]=Pe[Vi]=!1;var be={};be[xt]=be[St]=be[Bi]=be[Yr]=be[bn]=be[wr]=be[Ja]=be[Xa]=be[Za]=be[eo]=be[to]=be[jt]=be[Fi]=be[An]=be[Hi]=be[Yt]=be[Wi]=be[Ns]=be[no]=be[ro]=be[io]=be[so]=!0,be[Sr]=be[Rn]=be[Vi]=!1;var mp={À:"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"},wp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Sp={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ep=parseFloat,Cp=parseInt,Yu=typeof Sa=="object"&&Sa&&Sa.Object===Object&&Sa,Tp=typeof self=="object"&&self&&self.Object===Object&&self,ze=Yu||Tp||Function("return this")(),go=t&&!t.nodeType&&t,yr=go&&!0&&r&&!r.nodeType&&r,Ju=yr&&yr.exports===go,po=Ju&&Yu.process,Nt=(function(){try{var C=yr&&yr.require&&yr.require("util").types;return C||po&&po.binding&&po.binding("util")}catch{}})(),Xu=Nt&&Nt.isArrayBuffer,Zu=Nt&&Nt.isDate,ec=Nt&&Nt.isMap,tc=Nt&&Nt.isRegExp,nc=Nt&&Nt.isSet,rc=Nt&&Nt.isTypedArray;function yt(C,I,A){switch(A.length){case 0:return C.call(I);case 1:return C.call(I,A[0]);case 2:return C.call(I,A[0],A[1]);case 3:return C.call(I,A[0],A[1],A[2])}return C.apply(I,A)}function bp(C,I,A,W){for(var Y=-1,ve=C==null?0:C.length;++Y<ve;){var We=C[Y];I(W,We,A(We),C)}return W}function Et(C,I){for(var A=-1,W=C==null?0:C.length;++A<W&&I(C[A],A,C)!==!1;);return C}function Rp(C,I){for(var A=C==null?0:C.length;A--&&I(C[A],A,C)!==!1;);return C}function ic(C,I){for(var A=-1,W=C==null?0:C.length;++A<W;)if(!I(C[A],A,C))return!1;return!0}function Gn(C,I){for(var A=-1,W=C==null?0:C.length,Y=0,ve=[];++A<W;){var We=C[A];I(We,A,C)&&(ve[Y++]=We)}return ve}function Ms(C,I){var A=C==null?0:C.length;return!!A&&Xr(C,I,0)>-1}function vo(C,I,A){for(var W=-1,Y=C==null?0:C.length;++W<Y;)if(A(I,C[W]))return!0;return!1}function xe(C,I){for(var A=-1,W=C==null?0:C.length,Y=Array(W);++A<W;)Y[A]=I(C[A],A,C);return Y}function Qn(C,I){for(var A=-1,W=I.length,Y=C.length;++A<W;)C[Y+A]=I[A];return C}function _o(C,I,A,W){var Y=-1,ve=C==null?0:C.length;for(W&&ve&&(A=C[++Y]);++Y<ve;)A=I(A,C[Y],Y,C);return A}function Ap(C,I,A,W){var Y=C==null?0:C.length;for(W&&Y&&(A=C[--Y]);Y--;)A=I(A,C[Y],Y,C);return A}function mo(C,I){for(var A=-1,W=C==null?0:C.length;++A<W;)if(I(C[A],A,C))return!0;return!1}var Pp=wo("length");function Ip(C){return C.split("")}function xp(C){return C.match(Fg)||[]}function sc(C,I,A){var W;return A(C,function(Y,ve,We){if(I(Y,ve,We))return W=ve,!1}),W}function $s(C,I,A,W){for(var Y=C.length,ve=A+(W?1:-1);W?ve--:++ve<Y;)if(I(C[ve],ve,C))return ve;return-1}function Xr(C,I,A){return I===I?Vp(C,I,A):$s(C,ac,A)}function Lp(C,I,A,W){for(var Y=A-1,ve=C.length;++Y<ve;)if(W(C[Y],I))return Y;return-1}function ac(C){return C!==C}function oc(C,I){var A=C==null?0:C.length;return A?yo(C,I)/A:N}function wo(C){return function(I){return I==null?n:I[C]}}function So(C){return function(I){return C==null?n:C[I]}}function lc(C,I,A,W,Y){return Y(C,function(ve,We,Ce){A=W?(W=!1,ve):I(A,ve,We,Ce)}),A}function Np(C,I){var A=C.length;for(C.sort(I);A--;)C[A]=C[A].value;return C}function yo(C,I){for(var A,W=-1,Y=C.length;++W<Y;){var ve=I(C[W]);ve!==n&&(A=A===n?ve:A+ve)}return A}function Eo(C,I){for(var A=-1,W=Array(C);++A<C;)W[A]=I(A);return W}function Op(C,I){return xe(I,function(A){return[A,C[A]]})}function uc(C){return C&&C.slice(0,dc(C)+1).replace(oo,"")}function Ct(C){return function(I){return C(I)}}function Co(C,I){return xe(I,function(A){return C[A]})}function Gi(C,I){return C.has(I)}function cc(C,I){for(var A=-1,W=C.length;++A<W&&Xr(I,C[A],0)>-1;);return A}function fc(C,I){for(var A=C.length;A--&&Xr(I,C[A],0)>-1;);return A}function Up(C,I){for(var A=C.length,W=0;A--;)C[A]===I&&++W;return W}var Dp=So(mp),Mp=So(wp);function $p(C){return"\\"+yp[C]}function kp(C,I){return C==null?n:C[I]}function Zr(C){return gp.test(C)}function Fp(C){return pp.test(C)}function Hp(C){for(var I,A=[];!(I=C.next()).done;)A.push(I.value);return A}function To(C){var I=-1,A=Array(C.size);return C.forEach(function(W,Y){A[++I]=[Y,W]}),A}function hc(C,I){return function(A){return C(I(A))}}function qn(C,I){for(var A=-1,W=C.length,Y=0,ve=[];++A<W;){var We=C[A];(We===I||We===m)&&(C[A]=m,ve[Y++]=A)}return ve}function ks(C){var I=-1,A=Array(C.size);return C.forEach(function(W){A[++I]=W}),A}function Wp(C){var I=-1,A=Array(C.size);return C.forEach(function(W){A[++I]=[W,W]}),A}function Vp(C,I,A){for(var W=A-1,Y=C.length;++W<Y;)if(C[W]===I)return W;return-1}function Bp(C,I,A){for(var W=A+1;W--;)if(C[W]===I)return W;return W}function ei(C){return Zr(C)?Qp(C):Pp(C)}function Jt(C){return Zr(C)?qp(C):Ip(C)}function dc(C){for(var I=C.length;I--&&Dg.test(C.charAt(I)););return I}var Gp=So(Sp);function Qp(C){for(var I=ho.lastIndex=0;ho.test(C);)++I;return I}function qp(C){return C.match(ho)||[]}function zp(C){return C.match(dp)||[]}var Kp=(function C(I){I=I==null?ze:ti.defaults(ze.Object(),I,ti.pick(ze,vp));var A=I.Array,W=I.Date,Y=I.Error,ve=I.Function,We=I.Math,Ce=I.Object,bo=I.RegExp,jp=I.String,Ot=I.TypeError,Fs=A.prototype,Yp=ve.prototype,ni=Ce.prototype,Hs=I["__core-js_shared__"],Ws=Yp.toString,we=ni.hasOwnProperty,Jp=0,gc=(function(){var e=/[^.]+$/.exec(Hs&&Hs.keys&&Hs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),Vs=ni.toString,Xp=Ws.call(Ce),Zp=ze._,ev=bo("^"+Ws.call(we).replace(ao,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bs=Ju?I.Buffer:n,zn=I.Symbol,Gs=I.Uint8Array,pc=Bs?Bs.allocUnsafe:n,Qs=hc(Ce.getPrototypeOf,Ce),vc=Ce.create,_c=ni.propertyIsEnumerable,qs=Fs.splice,mc=zn?zn.isConcatSpreadable:n,Qi=zn?zn.iterator:n,Er=zn?zn.toStringTag:n,zs=(function(){try{var e=Ar(Ce,"defineProperty");return e({},"",{}),e}catch{}})(),tv=I.clearTimeout!==ze.clearTimeout&&I.clearTimeout,nv=W&&W.now!==ze.Date.now&&W.now,rv=I.setTimeout!==ze.setTimeout&&I.setTimeout,Ks=We.ceil,js=We.floor,Ro=Ce.getOwnPropertySymbols,iv=Bs?Bs.isBuffer:n,wc=I.isFinite,sv=Fs.join,av=hc(Ce.keys,Ce),Ve=We.max,Xe=We.min,ov=W.now,lv=I.parseInt,Sc=We.random,uv=Fs.reverse,Ao=Ar(I,"DataView"),qi=Ar(I,"Map"),Po=Ar(I,"Promise"),ri=Ar(I,"Set"),zi=Ar(I,"WeakMap"),Ki=Ar(Ce,"create"),Ys=zi&&new zi,ii={},cv=Pr(Ao),fv=Pr(qi),hv=Pr(Po),dv=Pr(ri),gv=Pr(zi),Js=zn?zn.prototype:n,ji=Js?Js.valueOf:n,yc=Js?Js.toString:n;function p(e){if(De(e)&&!J(e)&&!(e instanceof ce)){if(e instanceof Ut)return e;if(we.call(e,"__wrapped__"))return Cf(e)}return new Ut(e)}var si=(function(){function e(){}return function(i){if(!Ne(i))return{};if(vc)return vc(i);e.prototype=i;var a=new e;return e.prototype=n,a}})();function Xs(){}function Ut(e,i){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=n}p.templateSettings={escape:Ig,evaluate:xg,interpolate:Iu,variable:"",imports:{_:p}},p.prototype=Xs.prototype,p.prototype.constructor=p,Ut.prototype=si(Xs.prototype),Ut.prototype.constructor=Ut;function ce(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ae,this.__views__=[]}function pv(){var e=new ce(this.__wrapped__);return e.__actions__=ct(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ct(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ct(this.__views__),e}function vv(){if(this.__filtered__){var e=new ce(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function _v(){var e=this.__wrapped__.value(),i=this.__dir__,a=J(e),c=i<0,d=a?e.length:0,v=I_(0,d,this.__views__),S=v.start,y=v.end,b=y-S,x=c?y:S-1,L=this.__iteratees__,O=L.length,k=0,B=Xe(b,this.__takeCount__);if(!a||!c&&d==b&&B==b)return Qc(e,this.__actions__);var K=[];e:for(;b--&&k<B;){x+=i;for(var ie=-1,Q=e[x];++ie<O;){var le=L[ie],he=le.iteratee,Rt=le.type,st=he(Q);if(Rt==_r)Q=st;else if(!st){if(Rt==Bn)continue e;break e}}K[k++]=Q}return K}ce.prototype=si(Xs.prototype),ce.prototype.constructor=ce;function Cr(e){var i=-1,a=e==null?0:e.length;for(this.clear();++i<a;){var c=e[i];this.set(c[0],c[1])}}function mv(){this.__data__=Ki?Ki(null):{},this.size=0}function wv(e){var i=this.has(e)&&delete this.__data__[e];return this.size-=i?1:0,i}function Sv(e){var i=this.__data__;if(Ki){var a=i[e];return a===g?n:a}return we.call(i,e)?i[e]:n}function yv(e){var i=this.__data__;return Ki?i[e]!==n:we.call(i,e)}function Ev(e,i){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Ki&&i===n?g:i,this}Cr.prototype.clear=mv,Cr.prototype.delete=wv,Cr.prototype.get=Sv,Cr.prototype.has=yv,Cr.prototype.set=Ev;function Pn(e){var i=-1,a=e==null?0:e.length;for(this.clear();++i<a;){var c=e[i];this.set(c[0],c[1])}}function Cv(){this.__data__=[],this.size=0}function Tv(e){var i=this.__data__,a=Zs(i,e);if(a<0)return!1;var c=i.length-1;return a==c?i.pop():qs.call(i,a,1),--this.size,!0}function bv(e){var i=this.__data__,a=Zs(i,e);return a<0?n:i[a][1]}function Rv(e){return Zs(this.__data__,e)>-1}function Av(e,i){var a=this.__data__,c=Zs(a,e);return c<0?(++this.size,a.push([e,i])):a[c][1]=i,this}Pn.prototype.clear=Cv,Pn.prototype.delete=Tv,Pn.prototype.get=bv,Pn.prototype.has=Rv,Pn.prototype.set=Av;function In(e){var i=-1,a=e==null?0:e.length;for(this.clear();++i<a;){var c=e[i];this.set(c[0],c[1])}}function Pv(){this.size=0,this.__data__={hash:new Cr,map:new(qi||Pn),string:new Cr}}function Iv(e){var i=fa(this,e).delete(e);return this.size-=i?1:0,i}function xv(e){return fa(this,e).get(e)}function Lv(e){return fa(this,e).has(e)}function Nv(e,i){var a=fa(this,e),c=a.size;return a.set(e,i),this.size+=a.size==c?0:1,this}In.prototype.clear=Pv,In.prototype.delete=Iv,In.prototype.get=xv,In.prototype.has=Lv,In.prototype.set=Nv;function Tr(e){var i=-1,a=e==null?0:e.length;for(this.__data__=new In;++i<a;)this.add(e[i])}function Ov(e){return this.__data__.set(e,g),this}function Uv(e){return this.__data__.has(e)}Tr.prototype.add=Tr.prototype.push=Ov,Tr.prototype.has=Uv;function Xt(e){var i=this.__data__=new Pn(e);this.size=i.size}function Dv(){this.__data__=new Pn,this.size=0}function Mv(e){var i=this.__data__,a=i.delete(e);return this.size=i.size,a}function $v(e){return this.__data__.get(e)}function kv(e){return this.__data__.has(e)}function Fv(e,i){var a=this.__data__;if(a instanceof Pn){var c=a.__data__;if(!qi||c.length<o-1)return c.push([e,i]),this.size=++a.size,this;a=this.__data__=new In(c)}return a.set(e,i),this.size=a.size,this}Xt.prototype.clear=Dv,Xt.prototype.delete=Mv,Xt.prototype.get=$v,Xt.prototype.has=kv,Xt.prototype.set=Fv;function Ec(e,i){var a=J(e),c=!a&&Ir(e),d=!a&&!c&&Xn(e),v=!a&&!c&&!d&&ui(e),S=a||c||d||v,y=S?Eo(e.length,jp):[],b=y.length;for(var x in e)(i||we.call(e,x))&&!(S&&(x=="length"||d&&(x=="offset"||x=="parent")||v&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||Nn(x,b)))&&y.push(x);return y}function Cc(e){var i=e.length;return i?e[Fo(0,i-1)]:n}function Hv(e,i){return ha(ct(e),br(i,0,e.length))}function Wv(e){return ha(ct(e))}function Io(e,i,a){(a!==n&&!en(e[i],a)||a===n&&!(i in e))&&dn(e,i,a)}function Yi(e,i,a){var c=e[i];(!(we.call(e,i)&&en(c,a))||a===n&&!(i in e))&&dn(e,i,a)}function Zs(e,i){for(var a=e.length;a--;)if(en(e[a][0],i))return a;return-1}function Vv(e,i,a,c){return Kn(e,function(d,v,S){i(c,d,a(d),S)}),c}function Tc(e,i){return e&&pn(i,Be(i),e)}function Bv(e,i){return e&&pn(i,ht(i),e)}function dn(e,i,a){i=="__proto__"&&zs?zs(e,i,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[i]=a}function xo(e,i){for(var a=-1,c=i.length,d=A(c),v=e==null;++a<c;)d[a]=v?n:fl(e,i[a]);return d}function br(e,i,a){return e===e&&(a!==n&&(e=e<=a?e:a),i!==n&&(e=e>=i?e:i)),e}function Dt(e,i,a,c,d,v){var S,y=i&w,b=i&E,x=i&T;if(a&&(S=d?a(e,c,d,v):a(e)),S!==n)return S;if(!Ne(e))return e;var L=J(e);if(L){if(S=L_(e),!y)return ct(e,S)}else{var O=Ze(e),k=O==Rn||O==bu;if(Xn(e))return Kc(e,y);if(O==An||O==xt||k&&!d){if(S=b||k?{}:gf(e),!y)return b?S_(e,Bv(S,e)):w_(e,Tc(S,e))}else{if(!be[O])return d?e:{};S=N_(e,O,y)}}v||(v=new Xt);var B=v.get(e);if(B)return B;v.set(e,S),Bf(e)?e.forEach(function(Q){S.add(Dt(Q,i,a,Q,e,v))}):Wf(e)&&e.forEach(function(Q,le){S.set(le,Dt(Q,i,a,le,e,v))});var K=x?b?Yo:jo:b?ht:Be,ie=L?n:K(e);return Et(ie||e,function(Q,le){ie&&(le=Q,Q=e[le]),Yi(S,le,Dt(Q,i,a,le,e,v))}),S}function Gv(e){var i=Be(e);return function(a){return bc(a,e,i)}}function bc(e,i,a){var c=a.length;if(e==null)return!c;for(e=Ce(e);c--;){var d=a[c],v=i[d],S=e[d];if(S===n&&!(d in e)||!v(S))return!1}return!0}function Rc(e,i,a){if(typeof e!="function")throw new Ot(u);return rs(function(){e.apply(n,a)},i)}function Ji(e,i,a,c){var d=-1,v=Ms,S=!0,y=e.length,b=[],x=i.length;if(!y)return b;a&&(i=xe(i,Ct(a))),c?(v=vo,S=!1):i.length>=o&&(v=Gi,S=!1,i=new Tr(i));e:for(;++d<y;){var L=e[d],O=a==null?L:a(L);if(L=c||L!==0?L:0,S&&O===O){for(var k=x;k--;)if(i[k]===O)continue e;b.push(L)}else v(i,O,c)||b.push(L)}return b}var Kn=Zc(gn),Ac=Zc(No,!0);function Qv(e,i){var a=!0;return Kn(e,function(c,d,v){return a=!!i(c,d,v),a}),a}function ea(e,i,a){for(var c=-1,d=e.length;++c<d;){var v=e[c],S=i(v);if(S!=null&&(y===n?S===S&&!bt(S):a(S,y)))var y=S,b=v}return b}function qv(e,i,a,c){var d=e.length;for(a=re(a),a<0&&(a=-a>d?0:d+a),c=c===n||c>d?d:re(c),c<0&&(c+=d),c=a>c?0:Qf(c);a<c;)e[a++]=i;return e}function Pc(e,i){var a=[];return Kn(e,function(c,d,v){i(c,d,v)&&a.push(c)}),a}function Ke(e,i,a,c,d){var v=-1,S=e.length;for(a||(a=U_),d||(d=[]);++v<S;){var y=e[v];i>0&&a(y)?i>1?Ke(y,i-1,a,c,d):Qn(d,y):c||(d[d.length]=y)}return d}var Lo=ef(),Ic=ef(!0);function gn(e,i){return e&&Lo(e,i,Be)}function No(e,i){return e&&Ic(e,i,Be)}function ta(e,i){return Gn(i,function(a){return On(e[a])})}function Rr(e,i){i=Yn(i,e);for(var a=0,c=i.length;e!=null&&a<c;)e=e[Zt(i[a++])];return a&&a==c?e:n}function xc(e,i,a){var c=i(e);return J(e)?c:Qn(c,a(e))}function rt(e){return e==null?e===n?Eg:Sg:Er&&Er in Ce(e)?P_(e):W_(e)}function Oo(e,i){return e>i}function zv(e,i){return e!=null&&we.call(e,i)}function Kv(e,i){return e!=null&&i in Ce(e)}function jv(e,i,a){return e>=Xe(i,a)&&e<Ve(i,a)}function Uo(e,i,a){for(var c=a?vo:Ms,d=e[0].length,v=e.length,S=v,y=A(v),b=1/0,x=[];S--;){var L=e[S];S&&i&&(L=xe(L,Ct(i))),b=Xe(L.length,b),y[S]=!a&&(i||d>=120&&L.length>=120)?new Tr(S&&L):n}L=e[0];var O=-1,k=y[0];e:for(;++O<d&&x.length<b;){var B=L[O],K=i?i(B):B;if(B=a||B!==0?B:0,!(k?Gi(k,K):c(x,K,a))){for(S=v;--S;){var ie=y[S];if(!(ie?Gi(ie,K):c(e[S],K,a)))continue e}k&&k.push(K),x.push(B)}}return x}function Yv(e,i,a,c){return gn(e,function(d,v,S){i(c,a(d),v,S)}),c}function Xi(e,i,a){i=Yn(i,e),e=mf(e,i);var c=e==null?e:e[Zt($t(i))];return c==null?n:yt(c,e,a)}function Lc(e){return De(e)&&rt(e)==xt}function Jv(e){return De(e)&&rt(e)==Bi}function Xv(e){return De(e)&&rt(e)==wr}function Zi(e,i,a,c,d){return e===i?!0:e==null||i==null||!De(e)&&!De(i)?e!==e&&i!==i:Zv(e,i,a,c,Zi,d)}function Zv(e,i,a,c,d,v){var S=J(e),y=J(i),b=S?St:Ze(e),x=y?St:Ze(i);b=b==xt?An:b,x=x==xt?An:x;var L=b==An,O=x==An,k=b==x;if(k&&Xn(e)){if(!Xn(i))return!1;S=!0,L=!1}if(k&&!L)return v||(v=new Xt),S||ui(e)?ff(e,i,a,c,d,v):R_(e,i,b,a,c,d,v);if(!(a&R)){var B=L&&we.call(e,"__wrapped__"),K=O&&we.call(i,"__wrapped__");if(B||K){var ie=B?e.value():e,Q=K?i.value():i;return v||(v=new Xt),d(ie,Q,a,c,v)}}return k?(v||(v=new Xt),A_(e,i,a,c,d,v)):!1}function e_(e){return De(e)&&Ze(e)==jt}function Do(e,i,a,c){var d=a.length,v=d,S=!c;if(e==null)return!v;for(e=Ce(e);d--;){var y=a[d];if(S&&y[2]?y[1]!==e[y[0]]:!(y[0]in e))return!1}for(;++d<v;){y=a[d];var b=y[0],x=e[b],L=y[1];if(S&&y[2]){if(x===n&&!(b in e))return!1}else{var O=new Xt;if(c)var k=c(x,L,b,e,i,O);if(!(k===n?Zi(L,x,R|P,c,O):k))return!1}}return!0}function Nc(e){if(!Ne(e)||M_(e))return!1;var i=On(e)?ev:Gg;return i.test(Pr(e))}function t_(e){return De(e)&&rt(e)==Hi}function n_(e){return De(e)&&Ze(e)==Yt}function r_(e){return De(e)&&ma(e.length)&&!!Pe[rt(e)]}function Oc(e){return typeof e=="function"?e:e==null?dt:typeof e=="object"?J(e)?Mc(e[0],e[1]):Dc(e):rh(e)}function Mo(e){if(!ns(e))return av(e);var i=[];for(var a in Ce(e))we.call(e,a)&&a!="constructor"&&i.push(a);return i}function i_(e){if(!Ne(e))return H_(e);var i=ns(e),a=[];for(var c in e)c=="constructor"&&(i||!we.call(e,c))||a.push(c);return a}function $o(e,i){return e<i}function Uc(e,i){var a=-1,c=ft(e)?A(e.length):[];return Kn(e,function(d,v,S){c[++a]=i(d,v,S)}),c}function Dc(e){var i=Xo(e);return i.length==1&&i[0][2]?vf(i[0][0],i[0][1]):function(a){return a===e||Do(a,e,i)}}function Mc(e,i){return el(e)&&pf(i)?vf(Zt(e),i):function(a){var c=fl(a,e);return c===n&&c===i?hl(a,e):Zi(i,c,R|P)}}function na(e,i,a,c,d){e!==i&&Lo(i,function(v,S){if(d||(d=new Xt),Ne(v))s_(e,i,S,a,na,c,d);else{var y=c?c(nl(e,S),v,S+"",e,i,d):n;y===n&&(y=v),Io(e,S,y)}},ht)}function s_(e,i,a,c,d,v,S){var y=nl(e,a),b=nl(i,a),x=S.get(b);if(x){Io(e,a,x);return}var L=v?v(y,b,a+"",e,i,S):n,O=L===n;if(O){var k=J(b),B=!k&&Xn(b),K=!k&&!B&&ui(b);L=b,k||B||K?J(y)?L=y:Me(y)?L=ct(y):B?(O=!1,L=Kc(b,!0)):K?(O=!1,L=jc(b,!0)):L=[]:is(b)||Ir(b)?(L=y,Ir(y)?L=qf(y):(!Ne(y)||On(y))&&(L=gf(b))):O=!1}O&&(S.set(b,L),d(L,b,c,v,S),S.delete(b)),Io(e,a,L)}function $c(e,i){var a=e.length;if(a)return i+=i<0?a:0,Nn(i,a)?e[i]:n}function kc(e,i,a){i.length?i=xe(i,function(v){return J(v)?function(S){return Rr(S,v.length===1?v[0]:v)}:v}):i=[dt];var c=-1;i=xe(i,Ct(z()));var d=Uc(e,function(v,S,y){var b=xe(i,function(x){return x(v)});return{criteria:b,index:++c,value:v}});return Np(d,function(v,S){return m_(v,S,a)})}function a_(e,i){return Fc(e,i,function(a,c){return hl(e,c)})}function Fc(e,i,a){for(var c=-1,d=i.length,v={};++c<d;){var S=i[c],y=Rr(e,S);a(y,S)&&es(v,Yn(S,e),y)}return v}function o_(e){return function(i){return Rr(i,e)}}function ko(e,i,a,c){var d=c?Lp:Xr,v=-1,S=i.length,y=e;for(e===i&&(i=ct(i)),a&&(y=xe(e,Ct(a)));++v<S;)for(var b=0,x=i[v],L=a?a(x):x;(b=d(y,L,b,c))>-1;)y!==e&&qs.call(y,b,1),qs.call(e,b,1);return e}function Hc(e,i){for(var a=e?i.length:0,c=a-1;a--;){var d=i[a];if(a==c||d!==v){var v=d;Nn(d)?qs.call(e,d,1):Vo(e,d)}}return e}function Fo(e,i){return e+js(Sc()*(i-e+1))}function l_(e,i,a,c){for(var d=-1,v=Ve(Ks((i-e)/(a||1)),0),S=A(v);v--;)S[c?v:++d]=e,e+=a;return S}function Ho(e,i){var a="";if(!e||i<1||i>wt)return a;do i%2&&(a+=e),i=js(i/2),i&&(e+=e);while(i);return a}function se(e,i){return rl(_f(e,i,dt),e+"")}function u_(e){return Cc(ci(e))}function c_(e,i){var a=ci(e);return ha(a,br(i,0,a.length))}function es(e,i,a,c){if(!Ne(e))return e;i=Yn(i,e);for(var d=-1,v=i.length,S=v-1,y=e;y!=null&&++d<v;){var b=Zt(i[d]),x=a;if(b==="__proto__"||b==="constructor"||b==="prototype")return e;if(d!=S){var L=y[b];x=c?c(L,b,y):n,x===n&&(x=Ne(L)?L:Nn(i[d+1])?[]:{})}Yi(y,b,x),y=y[b]}return e}var Wc=Ys?function(e,i){return Ys.set(e,i),e}:dt,f_=zs?function(e,i){return zs(e,"toString",{configurable:!0,enumerable:!1,value:gl(i),writable:!0})}:dt;function h_(e){return ha(ci(e))}function Mt(e,i,a){var c=-1,d=e.length;i<0&&(i=-i>d?0:d+i),a=a>d?d:a,a<0&&(a+=d),d=i>a?0:a-i>>>0,i>>>=0;for(var v=A(d);++c<d;)v[c]=e[c+i];return v}function d_(e,i){var a;return Kn(e,function(c,d,v){return a=i(c,d,v),!a}),!!a}function ra(e,i,a){var c=0,d=e==null?c:e.length;if(typeof i=="number"&&i===i&&d<=qe){for(;c<d;){var v=c+d>>>1,S=e[v];S!==null&&!bt(S)&&(a?S<=i:S<i)?c=v+1:d=v}return d}return Wo(e,i,dt,a)}function Wo(e,i,a,c){var d=0,v=e==null?0:e.length;if(v===0)return 0;i=a(i);for(var S=i!==i,y=i===null,b=bt(i),x=i===n;d<v;){var L=js((d+v)/2),O=a(e[L]),k=O!==n,B=O===null,K=O===O,ie=bt(O);if(S)var Q=c||K;else x?Q=K&&(c||k):y?Q=K&&k&&(c||!B):b?Q=K&&k&&!B&&(c||!ie):B||ie?Q=!1:Q=c?O<=i:O<i;Q?d=L+1:v=L}return Xe(v,ne)}function Vc(e,i){for(var a=-1,c=e.length,d=0,v=[];++a<c;){var S=e[a],y=i?i(S):S;if(!a||!en(y,b)){var b=y;v[d++]=S===0?0:S}}return v}function Bc(e){return typeof e=="number"?e:bt(e)?N:+e}function Tt(e){if(typeof e=="string")return e;if(J(e))return xe(e,Tt)+"";if(bt(e))return yc?yc.call(e):"";var i=e+"";return i=="0"&&1/e==-Je?"-0":i}function jn(e,i,a){var c=-1,d=Ms,v=e.length,S=!0,y=[],b=y;if(a)S=!1,d=vo;else if(v>=o){var x=i?null:T_(e);if(x)return ks(x);S=!1,d=Gi,b=new Tr}else b=i?[]:y;e:for(;++c<v;){var L=e[c],O=i?i(L):L;if(L=a||L!==0?L:0,S&&O===O){for(var k=b.length;k--;)if(b[k]===O)continue e;i&&b.push(O),y.push(L)}else d(b,O,a)||(b!==y&&b.push(O),y.push(L))}return y}function Vo(e,i){i=Yn(i,e);var a=-1,c=i.length;if(!c)return!0;for(;++a<c;){var d=Zt(i[a]);if(d==="__proto__"&&!we.call(e,"__proto__")||(d==="constructor"||d==="prototype")&&a<c-1)return!1}var v=mf(e,i);return v==null||delete v[Zt($t(i))]}function Gc(e,i,a,c){return es(e,i,a(Rr(e,i)),c)}function ia(e,i,a,c){for(var d=e.length,v=c?d:-1;(c?v--:++v<d)&&i(e[v],v,e););return a?Mt(e,c?0:v,c?v+1:d):Mt(e,c?v+1:0,c?d:v)}function Qc(e,i){var a=e;return a instanceof ce&&(a=a.value()),_o(i,function(c,d){return d.func.apply(d.thisArg,Qn([c],d.args))},a)}function Bo(e,i,a){var c=e.length;if(c<2)return c?jn(e[0]):[];for(var d=-1,v=A(c);++d<c;)for(var S=e[d],y=-1;++y<c;)y!=d&&(v[d]=Ji(v[d]||S,e[y],i,a));return jn(Ke(v,1),i,a)}function qc(e,i,a){for(var c=-1,d=e.length,v=i.length,S={};++c<d;){var y=c<v?i[c]:n;a(S,e[c],y)}return S}function Go(e){return Me(e)?e:[]}function Qo(e){return typeof e=="function"?e:dt}function Yn(e,i){return J(e)?e:el(e,i)?[e]:Ef(Se(e))}var g_=se;function Jn(e,i,a){var c=e.length;return a=a===n?c:a,!i&&a>=c?e:Mt(e,i,a)}var zc=tv||function(e){return ze.clearTimeout(e)};function Kc(e,i){if(i)return e.slice();var a=e.length,c=pc?pc(a):new e.constructor(a);return e.copy(c),c}function qo(e){var i=new e.constructor(e.byteLength);return new Gs(i).set(new Gs(e)),i}function p_(e,i){var a=i?qo(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}function v_(e){var i=new e.constructor(e.source,Lu.exec(e));return i.lastIndex=e.lastIndex,i}function __(e){return ji?Ce(ji.call(e)):{}}function jc(e,i){var a=i?qo(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}function Yc(e,i){if(e!==i){var a=e!==n,c=e===null,d=e===e,v=bt(e),S=i!==n,y=i===null,b=i===i,x=bt(i);if(!y&&!x&&!v&&e>i||v&&S&&b&&!y&&!x||c&&S&&b||!a&&b||!d)return 1;if(!c&&!v&&!x&&e<i||x&&a&&d&&!c&&!v||y&&a&&d||!S&&d||!b)return-1}return 0}function m_(e,i,a){for(var c=-1,d=e.criteria,v=i.criteria,S=d.length,y=a.length;++c<S;){var b=Yc(d[c],v[c]);if(b){if(c>=y)return b;var x=a[c];return b*(x=="desc"?-1:1)}}return e.index-i.index}function Jc(e,i,a,c){for(var d=-1,v=e.length,S=a.length,y=-1,b=i.length,x=Ve(v-S,0),L=A(b+x),O=!c;++y<b;)L[y]=i[y];for(;++d<S;)(O||d<v)&&(L[a[d]]=e[d]);for(;x--;)L[y++]=e[d++];return L}function Xc(e,i,a,c){for(var d=-1,v=e.length,S=-1,y=a.length,b=-1,x=i.length,L=Ve(v-y,0),O=A(L+x),k=!c;++d<L;)O[d]=e[d];for(var B=d;++b<x;)O[B+b]=i[b];for(;++S<y;)(k||d<v)&&(O[B+a[S]]=e[d++]);return O}function ct(e,i){var a=-1,c=e.length;for(i||(i=A(c));++a<c;)i[a]=e[a];return i}function pn(e,i,a,c){var d=!a;a||(a={});for(var v=-1,S=i.length;++v<S;){var y=i[v],b=c?c(a[y],e[y],y,a,e):n;b===n&&(b=e[y]),d?dn(a,y,b):Yi(a,y,b)}return a}function w_(e,i){return pn(e,Zo(e),i)}function S_(e,i){return pn(e,hf(e),i)}function sa(e,i){return function(a,c){var d=J(a)?bp:Vv,v=i?i():{};return d(a,e,z(c,2),v)}}function ai(e){return se(function(i,a){var c=-1,d=a.length,v=d>1?a[d-1]:n,S=d>2?a[2]:n;for(v=e.length>3&&typeof v=="function"?(d--,v):n,S&&it(a[0],a[1],S)&&(v=d<3?n:v,d=1),i=Ce(i);++c<d;){var y=a[c];y&&e(i,y,c,v)}return i})}function Zc(e,i){return function(a,c){if(a==null)return a;if(!ft(a))return e(a,c);for(var d=a.length,v=i?d:-1,S=Ce(a);(i?v--:++v<d)&&c(S[v],v,S)!==!1;);return a}}function ef(e){return function(i,a,c){for(var d=-1,v=Ce(i),S=c(i),y=S.length;y--;){var b=S[e?y:++d];if(a(v[b],b,v)===!1)break}return i}}function y_(e,i,a){var c=i&D,d=ts(e);function v(){var S=this&&this!==ze&&this instanceof v?d:e;return S.apply(c?a:this,arguments)}return v}function tf(e){return function(i){i=Se(i);var a=Zr(i)?Jt(i):n,c=a?a[0]:i.charAt(0),d=a?Jn(a,1).join(""):i.slice(1);return c[e]()+d}}function oi(e){return function(i){return _o(th(eh(i).replace(fp,"")),e,"")}}function ts(e){return function(){var i=arguments;switch(i.length){case 0:return new e;case 1:return new e(i[0]);case 2:return new e(i[0],i[1]);case 3:return new e(i[0],i[1],i[2]);case 4:return new e(i[0],i[1],i[2],i[3]);case 5:return new e(i[0],i[1],i[2],i[3],i[4]);case 6:return new e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new e(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var a=si(e.prototype),c=e.apply(a,i);return Ne(c)?c:a}}function E_(e,i,a){var c=ts(e);function d(){for(var v=arguments.length,S=A(v),y=v,b=li(d);y--;)S[y]=arguments[y];var x=v<3&&S[0]!==b&&S[v-1]!==b?[]:qn(S,b);if(v-=x.length,v<a)return of(e,i,aa,d.placeholder,n,S,x,n,n,a-v);var L=this&&this!==ze&&this instanceof d?c:e;return yt(L,this,S)}return d}function nf(e){return function(i,a,c){var d=Ce(i);if(!ft(i)){var v=z(a,3);i=Be(i),a=function(y){return v(d[y],y,d)}}var S=e(i,a,c);return S>-1?d[v?i[S]:S]:n}}function rf(e){return Ln(function(i){var a=i.length,c=a,d=Ut.prototype.thru;for(e&&i.reverse();c--;){var v=i[c];if(typeof v!="function")throw new Ot(u);if(d&&!S&&ca(v)=="wrapper")var S=new Ut([],!0)}for(c=S?c:a;++c<a;){v=i[c];var y=ca(v),b=y=="wrapper"?Jo(v):n;b&&tl(b[0])&&b[1]==(me|de|pe|Re)&&!b[4].length&&b[9]==1?S=S[ca(b[0])].apply(S,b[3]):S=v.length==1&&tl(v)?S[y]():S.thru(v)}return function(){var x=arguments,L=x[0];if(S&&x.length==1&&J(L))return S.plant(L).value();for(var O=0,k=a?i[O].apply(this,x):L;++O<a;)k=i[O].call(this,k);return k}})}function aa(e,i,a,c,d,v,S,y,b,x){var L=i&me,O=i&D,k=i&H,B=i&(de|_e),K=i&ae,ie=k?n:ts(e);function Q(){for(var le=arguments.length,he=A(le),Rt=le;Rt--;)he[Rt]=arguments[Rt];if(B)var st=li(Q),At=Up(he,st);if(c&&(he=Jc(he,c,d,B)),v&&(he=Xc(he,v,S,B)),le-=At,B&&le<x){var $e=qn(he,st);return of(e,i,aa,Q.placeholder,a,he,$e,y,b,x-le)}var tn=O?a:this,Dn=k?tn[e]:e;return le=he.length,y?he=V_(he,y):K&&le>1&&he.reverse(),L&&b<le&&(he.length=b),this&&this!==ze&&this instanceof Q&&(Dn=ie||ts(Dn)),Dn.apply(tn,he)}return Q}function sf(e,i){return function(a,c){return Yv(a,e,i(c),{})}}function oa(e,i){return function(a,c){var d;if(a===n&&c===n)return i;if(a!==n&&(d=a),c!==n){if(d===n)return c;typeof a=="string"||typeof c=="string"?(a=Tt(a),c=Tt(c)):(a=Bc(a),c=Bc(c)),d=e(a,c)}return d}}function zo(e){return Ln(function(i){return i=xe(i,Ct(z())),se(function(a){var c=this;return e(i,function(d){return yt(d,c,a)})})})}function la(e,i){i=i===n?" ":Tt(i);var a=i.length;if(a<2)return a?Ho(i,e):i;var c=Ho(i,Ks(e/ei(i)));return Zr(i)?Jn(Jt(c),0,e).join(""):c.slice(0,e)}function C_(e,i,a,c){var d=i&D,v=ts(e);function S(){for(var y=-1,b=arguments.length,x=-1,L=c.length,O=A(L+b),k=this&&this!==ze&&this instanceof S?v:e;++x<L;)O[x]=c[x];for(;b--;)O[x++]=arguments[++y];return yt(k,d?a:this,O)}return S}function af(e){return function(i,a,c){return c&&typeof c!="number"&&it(i,a,c)&&(a=c=n),i=Un(i),a===n?(a=i,i=0):a=Un(a),c=c===n?i<a?1:-1:Un(c),l_(i,a,c,e)}}function ua(e){return function(i,a){return typeof i=="string"&&typeof a=="string"||(i=kt(i),a=kt(a)),e(i,a)}}function of(e,i,a,c,d,v,S,y,b,x){var L=i&de,O=L?S:n,k=L?n:S,B=L?v:n,K=L?n:v;i|=L?pe:oe,i&=~(L?oe:pe),i&Z||(i&=-4);var ie=[e,i,d,B,O,K,k,y,b,x],Q=a.apply(n,ie);return tl(e)&&wf(Q,ie),Q.placeholder=c,Sf(Q,e,i)}function Ko(e){var i=We[e];return function(a,c){if(a=kt(a),c=c==null?0:Xe(re(c),292),c&&wc(a)){var d=(Se(a)+"e").split("e"),v=i(d[0]+"e"+(+d[1]+c));return d=(Se(v)+"e").split("e"),+(d[0]+"e"+(+d[1]-c))}return i(a)}}var T_=ri&&1/ks(new ri([,-0]))[1]==Je?function(e){return new ri(e)}:_l;function lf(e){return function(i){var a=Ze(i);return a==jt?To(i):a==Yt?Wp(i):Op(i,e(i))}}function xn(e,i,a,c,d,v,S,y){var b=i&H;if(!b&&typeof e!="function")throw new Ot(u);var x=c?c.length:0;if(x||(i&=-97,c=d=n),S=S===n?S:Ve(re(S),0),y=y===n?y:re(y),x-=d?d.length:0,i&oe){var L=c,O=d;c=d=n}var k=b?n:Jo(e),B=[e,i,a,c,d,L,O,v,S,y];if(k&&F_(B,k),e=B[0],i=B[1],a=B[2],c=B[3],d=B[4],y=B[9]=B[9]===n?b?0:e.length:Ve(B[9]-x,0),!y&&i&(de|_e)&&(i&=-25),!i||i==D)var K=y_(e,i,a);else i==de||i==_e?K=E_(e,i,y):(i==pe||i==(D|pe))&&!d.length?K=C_(e,i,a,c):K=aa.apply(n,B);var ie=k?Wc:wf;return Sf(ie(K,B),e,i)}function uf(e,i,a,c){return e===n||en(e,ni[a])&&!we.call(c,a)?i:e}function cf(e,i,a,c,d,v){return Ne(e)&&Ne(i)&&(v.set(i,e),na(e,i,n,cf,v),v.delete(i)),e}function b_(e){return is(e)?n:e}function ff(e,i,a,c,d,v){var S=a&R,y=e.length,b=i.length;if(y!=b&&!(S&&b>y))return!1;var x=v.get(e),L=v.get(i);if(x&&L)return x==i&&L==e;var O=-1,k=!0,B=a&P?new Tr:n;for(v.set(e,i),v.set(i,e);++O<y;){var K=e[O],ie=i[O];if(c)var Q=S?c(ie,K,O,i,e,v):c(K,ie,O,e,i,v);if(Q!==n){if(Q)continue;k=!1;break}if(B){if(!mo(i,function(le,he){if(!Gi(B,he)&&(K===le||d(K,le,a,c,v)))return B.push(he)})){k=!1;break}}else if(!(K===ie||d(K,ie,a,c,v))){k=!1;break}}return v.delete(e),v.delete(i),k}function R_(e,i,a,c,d,v,S){switch(a){case Yr:if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case Bi:return!(e.byteLength!=i.byteLength||!v(new Gs(e),new Gs(i)));case bn:case wr:case Fi:return en(+e,+i);case Sr:return e.name==i.name&&e.message==i.message;case Hi:case Wi:return e==i+"";case jt:var y=To;case Yt:var b=c&R;if(y||(y=ks),e.size!=i.size&&!b)return!1;var x=S.get(e);if(x)return x==i;c|=P,S.set(e,i);var L=ff(y(e),y(i),c,d,v,S);return S.delete(e),L;case Ns:if(ji)return ji.call(e)==ji.call(i)}return!1}function A_(e,i,a,c,d,v){var S=a&R,y=jo(e),b=y.length,x=jo(i),L=x.length;if(b!=L&&!S)return!1;for(var O=b;O--;){var k=y[O];if(!(S?k in i:we.call(i,k)))return!1}var B=v.get(e),K=v.get(i);if(B&&K)return B==i&&K==e;var ie=!0;v.set(e,i),v.set(i,e);for(var Q=S;++O<b;){k=y[O];var le=e[k],he=i[k];if(c)var Rt=S?c(he,le,k,i,e,v):c(le,he,k,e,i,v);if(!(Rt===n?le===he||d(le,he,a,c,v):Rt)){ie=!1;break}Q||(Q=k=="constructor")}if(ie&&!Q){var st=e.constructor,At=i.constructor;st!=At&&"constructor"in e&&"constructor"in i&&!(typeof st=="function"&&st instanceof st&&typeof At=="function"&&At instanceof At)&&(ie=!1)}return v.delete(e),v.delete(i),ie}function Ln(e){return rl(_f(e,n,Rf),e+"")}function jo(e){return xc(e,Be,Zo)}function Yo(e){return xc(e,ht,hf)}var Jo=Ys?function(e){return Ys.get(e)}:_l;function ca(e){for(var i=e.name+"",a=ii[i],c=we.call(ii,i)?a.length:0;c--;){var d=a[c],v=d.func;if(v==null||v==e)return d.name}return i}function li(e){var i=we.call(p,"placeholder")?p:e;return i.placeholder}function z(){var e=p.iteratee||pl;return e=e===pl?Oc:e,arguments.length?e(arguments[0],arguments[1]):e}function fa(e,i){var a=e.__data__;return D_(i)?a[typeof i=="string"?"string":"hash"]:a.map}function Xo(e){for(var i=Be(e),a=i.length;a--;){var c=i[a],d=e[c];i[a]=[c,d,pf(d)]}return i}function Ar(e,i){var a=kp(e,i);return Nc(a)?a:n}function P_(e){var i=we.call(e,Er),a=e[Er];try{e[Er]=n;var c=!0}catch{}var d=Vs.call(e);return c&&(i?e[Er]=a:delete e[Er]),d}var Zo=Ro?function(e){return e==null?[]:(e=Ce(e),Gn(Ro(e),function(i){return _c.call(e,i)}))}:ml,hf=Ro?function(e){for(var i=[];e;)Qn(i,Zo(e)),e=Qs(e);return i}:ml,Ze=rt;(Ao&&Ze(new Ao(new ArrayBuffer(1)))!=Yr||qi&&Ze(new qi)!=jt||Po&&Ze(Po.resolve())!=Ru||ri&&Ze(new ri)!=Yt||zi&&Ze(new zi)!=Vi)&&(Ze=function(e){var i=rt(e),a=i==An?e.constructor:n,c=a?Pr(a):"";if(c)switch(c){case cv:return Yr;case fv:return jt;case hv:return Ru;case dv:return Yt;case gv:return Vi}return i});function I_(e,i,a){for(var c=-1,d=a.length;++c<d;){var v=a[c],S=v.size;switch(v.type){case"drop":e+=S;break;case"dropRight":i-=S;break;case"take":i=Xe(i,e+S);break;case"takeRight":e=Ve(e,i-S);break}}return{start:e,end:i}}function x_(e){var i=e.match($g);return i?i[1].split(kg):[]}function df(e,i,a){i=Yn(i,e);for(var c=-1,d=i.length,v=!1;++c<d;){var S=Zt(i[c]);if(!(v=e!=null&&a(e,S)))break;e=e[S]}return v||++c!=d?v:(d=e==null?0:e.length,!!d&&ma(d)&&Nn(S,d)&&(J(e)||Ir(e)))}function L_(e){var i=e.length,a=new e.constructor(i);return i&&typeof e[0]=="string"&&we.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function gf(e){return typeof e.constructor=="function"&&!ns(e)?si(Qs(e)):{}}function N_(e,i,a){var c=e.constructor;switch(i){case Bi:return qo(e);case bn:case wr:return new c(+e);case Yr:return p_(e,a);case Ja:case Xa:case Za:case eo:case to:case no:case ro:case io:case so:return jc(e,a);case jt:return new c;case Fi:case Wi:return new c(e);case Hi:return v_(e);case Yt:return new c;case Ns:return __(e)}}function O_(e,i){var a=i.length;if(!a)return e;var c=a-1;return i[c]=(a>1?"& ":"")+i[c],i=i.join(a>2?", ":" "),e.replace(Mg,`{
2
+ /* [wrapped with `+i+`] */
3
+ `)}function U_(e){return J(e)||Ir(e)||!!(mc&&e&&e[mc])}function Nn(e,i){var a=typeof e;return i=i??wt,!!i&&(a=="number"||a!="symbol"&&qg.test(e))&&e>-1&&e%1==0&&e<i}function it(e,i,a){if(!Ne(a))return!1;var c=typeof i;return(c=="number"?ft(a)&&Nn(i,a.length):c=="string"&&i in a)?en(a[i],e):!1}function el(e,i){if(J(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||bt(e)?!0:Ng.test(e)||!Lg.test(e)||i!=null&&e in Ce(i)}function D_(e){var i=typeof e;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?e!=="__proto__":e===null}function tl(e){var i=ca(e),a=p[i];if(typeof a!="function"||!(i in ce.prototype))return!1;if(e===a)return!0;var c=Jo(a);return!!c&&e===c[0]}function M_(e){return!!gc&&gc in e}var $_=Hs?On:wl;function ns(e){var i=e&&e.constructor,a=typeof i=="function"&&i.prototype||ni;return e===a}function pf(e){return e===e&&!Ne(e)}function vf(e,i){return function(a){return a==null?!1:a[e]===i&&(i!==n||e in Ce(a))}}function k_(e){var i=va(e,function(c){return a.size===_&&a.clear(),c}),a=i.cache;return i}function F_(e,i){var a=e[1],c=i[1],d=a|c,v=d<(D|H|me),S=c==me&&a==de||c==me&&a==Re&&e[7].length<=i[8]||c==(me|Re)&&i[7].length<=i[8]&&a==de;if(!(v||S))return e;c&D&&(e[2]=i[2],d|=a&D?0:Z);var y=i[3];if(y){var b=e[3];e[3]=b?Jc(b,y,i[4]):y,e[4]=b?qn(e[3],m):i[4]}return y=i[5],y&&(b=e[5],e[5]=b?Xc(b,y,i[6]):y,e[6]=b?qn(e[5],m):i[6]),y=i[7],y&&(e[7]=y),c&me&&(e[8]=e[8]==null?i[8]:Xe(e[8],i[8])),e[9]==null&&(e[9]=i[9]),e[0]=i[0],e[1]=d,e}function H_(e){var i=[];if(e!=null)for(var a in Ce(e))i.push(a);return i}function W_(e){return Vs.call(e)}function _f(e,i,a){return i=Ve(i===n?e.length-1:i,0),function(){for(var c=arguments,d=-1,v=Ve(c.length-i,0),S=A(v);++d<v;)S[d]=c[i+d];d=-1;for(var y=A(i+1);++d<i;)y[d]=c[d];return y[i]=a(S),yt(e,this,y)}}function mf(e,i){return i.length<2?e:Rr(e,Mt(i,0,-1))}function V_(e,i){for(var a=e.length,c=Xe(i.length,a),d=ct(e);c--;){var v=i[c];e[c]=Nn(v,a)?d[v]:n}return e}function nl(e,i){if(!(i==="constructor"&&typeof e[i]=="function")&&i!="__proto__")return e[i]}var wf=yf(Wc),rs=rv||function(e,i){return ze.setTimeout(e,i)},rl=yf(f_);function Sf(e,i,a){var c=i+"";return rl(e,O_(c,B_(x_(c),a)))}function yf(e){var i=0,a=0;return function(){var c=ov(),d=V-(c-a);if(a=c,d>0){if(++i>=Kt)return arguments[0]}else i=0;return e.apply(n,arguments)}}function ha(e,i){var a=-1,c=e.length,d=c-1;for(i=i===n?c:i;++a<i;){var v=Fo(a,d),S=e[v];e[v]=e[a],e[a]=S}return e.length=i,e}var Ef=k_(function(e){var i=[];return e.charCodeAt(0)===46&&i.push(""),e.replace(Og,function(a,c,d,v){i.push(d?v.replace(Hg,"$1"):c||a)}),i});function Zt(e){if(typeof e=="string"||bt(e))return e;var i=e+"";return i=="0"&&1/e==-Je?"-0":i}function Pr(e){if(e!=null){try{return Ws.call(e)}catch{}try{return e+""}catch{}}return""}function B_(e,i){return Et(hn,function(a){var c="_."+a[0];i&a[1]&&!Ms(e,c)&&e.push(c)}),e.sort()}function Cf(e){if(e instanceof ce)return e.clone();var i=new Ut(e.__wrapped__,e.__chain__);return i.__actions__=ct(e.__actions__),i.__index__=e.__index__,i.__values__=e.__values__,i}function G_(e,i,a){(a?it(e,i,a):i===n)?i=1:i=Ve(re(i),0);var c=e==null?0:e.length;if(!c||i<1)return[];for(var d=0,v=0,S=A(Ks(c/i));d<c;)S[v++]=Mt(e,d,d+=i);return S}function Q_(e){for(var i=-1,a=e==null?0:e.length,c=0,d=[];++i<a;){var v=e[i];v&&(d[c++]=v)}return d}function q_(){var e=arguments.length;if(!e)return[];for(var i=A(e-1),a=arguments[0],c=e;c--;)i[c-1]=arguments[c];return Qn(J(a)?ct(a):[a],Ke(i,1))}var z_=se(function(e,i){return Me(e)?Ji(e,Ke(i,1,Me,!0)):[]}),K_=se(function(e,i){var a=$t(i);return Me(a)&&(a=n),Me(e)?Ji(e,Ke(i,1,Me,!0),z(a,2)):[]}),j_=se(function(e,i){var a=$t(i);return Me(a)&&(a=n),Me(e)?Ji(e,Ke(i,1,Me,!0),n,a):[]});function Y_(e,i,a){var c=e==null?0:e.length;return c?(i=a||i===n?1:re(i),Mt(e,i<0?0:i,c)):[]}function J_(e,i,a){var c=e==null?0:e.length;return c?(i=a||i===n?1:re(i),i=c-i,Mt(e,0,i<0?0:i)):[]}function X_(e,i){return e&&e.length?ia(e,z(i,3),!0,!0):[]}function Z_(e,i){return e&&e.length?ia(e,z(i,3),!0):[]}function em(e,i,a,c){var d=e==null?0:e.length;return d?(a&&typeof a!="number"&&it(e,i,a)&&(a=0,c=d),qv(e,i,a,c)):[]}function Tf(e,i,a){var c=e==null?0:e.length;if(!c)return-1;var d=a==null?0:re(a);return d<0&&(d=Ve(c+d,0)),$s(e,z(i,3),d)}function bf(e,i,a){var c=e==null?0:e.length;if(!c)return-1;var d=c-1;return a!==n&&(d=re(a),d=a<0?Ve(c+d,0):Xe(d,c-1)),$s(e,z(i,3),d,!0)}function Rf(e){var i=e==null?0:e.length;return i?Ke(e,1):[]}function tm(e){var i=e==null?0:e.length;return i?Ke(e,Je):[]}function nm(e,i){var a=e==null?0:e.length;return a?(i=i===n?1:re(i),Ke(e,i)):[]}function rm(e){for(var i=-1,a=e==null?0:e.length,c={};++i<a;){var d=e[i];dn(c,d[0],d[1])}return c}function Af(e){return e&&e.length?e[0]:n}function im(e,i,a){var c=e==null?0:e.length;if(!c)return-1;var d=a==null?0:re(a);return d<0&&(d=Ve(c+d,0)),Xr(e,i,d)}function sm(e){var i=e==null?0:e.length;return i?Mt(e,0,-1):[]}var am=se(function(e){var i=xe(e,Go);return i.length&&i[0]===e[0]?Uo(i):[]}),om=se(function(e){var i=$t(e),a=xe(e,Go);return i===$t(a)?i=n:a.pop(),a.length&&a[0]===e[0]?Uo(a,z(i,2)):[]}),lm=se(function(e){var i=$t(e),a=xe(e,Go);return i=typeof i=="function"?i:n,i&&a.pop(),a.length&&a[0]===e[0]?Uo(a,n,i):[]});function um(e,i){return e==null?"":sv.call(e,i)}function $t(e){var i=e==null?0:e.length;return i?e[i-1]:n}function cm(e,i,a){var c=e==null?0:e.length;if(!c)return-1;var d=c;return a!==n&&(d=re(a),d=d<0?Ve(c+d,0):Xe(d,c-1)),i===i?Bp(e,i,d):$s(e,ac,d,!0)}function fm(e,i){return e&&e.length?$c(e,re(i)):n}var hm=se(Pf);function Pf(e,i){return e&&e.length&&i&&i.length?ko(e,i):e}function dm(e,i,a){return e&&e.length&&i&&i.length?ko(e,i,z(a,2)):e}function gm(e,i,a){return e&&e.length&&i&&i.length?ko(e,i,n,a):e}var pm=Ln(function(e,i){var a=e==null?0:e.length,c=xo(e,i);return Hc(e,xe(i,function(d){return Nn(d,a)?+d:d}).sort(Yc)),c});function vm(e,i){var a=[];if(!(e&&e.length))return a;var c=-1,d=[],v=e.length;for(i=z(i,3);++c<v;){var S=e[c];i(S,c,e)&&(a.push(S),d.push(c))}return Hc(e,d),a}function il(e){return e==null?e:uv.call(e)}function _m(e,i,a){var c=e==null?0:e.length;return c?(a&&typeof a!="number"&&it(e,i,a)?(i=0,a=c):(i=i==null?0:re(i),a=a===n?c:re(a)),Mt(e,i,a)):[]}function mm(e,i){return ra(e,i)}function wm(e,i,a){return Wo(e,i,z(a,2))}function Sm(e,i){var a=e==null?0:e.length;if(a){var c=ra(e,i);if(c<a&&en(e[c],i))return c}return-1}function ym(e,i){return ra(e,i,!0)}function Em(e,i,a){return Wo(e,i,z(a,2),!0)}function Cm(e,i){var a=e==null?0:e.length;if(a){var c=ra(e,i,!0)-1;if(en(e[c],i))return c}return-1}function Tm(e){return e&&e.length?Vc(e):[]}function bm(e,i){return e&&e.length?Vc(e,z(i,2)):[]}function Rm(e){var i=e==null?0:e.length;return i?Mt(e,1,i):[]}function Am(e,i,a){return e&&e.length?(i=a||i===n?1:re(i),Mt(e,0,i<0?0:i)):[]}function Pm(e,i,a){var c=e==null?0:e.length;return c?(i=a||i===n?1:re(i),i=c-i,Mt(e,i<0?0:i,c)):[]}function Im(e,i){return e&&e.length?ia(e,z(i,3),!1,!0):[]}function xm(e,i){return e&&e.length?ia(e,z(i,3)):[]}var Lm=se(function(e){return jn(Ke(e,1,Me,!0))}),Nm=se(function(e){var i=$t(e);return Me(i)&&(i=n),jn(Ke(e,1,Me,!0),z(i,2))}),Om=se(function(e){var i=$t(e);return i=typeof i=="function"?i:n,jn(Ke(e,1,Me,!0),n,i)});function Um(e){return e&&e.length?jn(e):[]}function Dm(e,i){return e&&e.length?jn(e,z(i,2)):[]}function Mm(e,i){return i=typeof i=="function"?i:n,e&&e.length?jn(e,n,i):[]}function sl(e){if(!(e&&e.length))return[];var i=0;return e=Gn(e,function(a){if(Me(a))return i=Ve(a.length,i),!0}),Eo(i,function(a){return xe(e,wo(a))})}function If(e,i){if(!(e&&e.length))return[];var a=sl(e);return i==null?a:xe(a,function(c){return yt(i,n,c)})}var $m=se(function(e,i){return Me(e)?Ji(e,i):[]}),km=se(function(e){return Bo(Gn(e,Me))}),Fm=se(function(e){var i=$t(e);return Me(i)&&(i=n),Bo(Gn(e,Me),z(i,2))}),Hm=se(function(e){var i=$t(e);return i=typeof i=="function"?i:n,Bo(Gn(e,Me),n,i)}),Wm=se(sl);function Vm(e,i){return qc(e||[],i||[],Yi)}function Bm(e,i){return qc(e||[],i||[],es)}var Gm=se(function(e){var i=e.length,a=i>1?e[i-1]:n;return a=typeof a=="function"?(e.pop(),a):n,If(e,a)});function xf(e){var i=p(e);return i.__chain__=!0,i}function Qm(e,i){return i(e),e}function da(e,i){return i(e)}var qm=Ln(function(e){var i=e.length,a=i?e[0]:0,c=this.__wrapped__,d=function(v){return xo(v,e)};return i>1||this.__actions__.length||!(c instanceof ce)||!Nn(a)?this.thru(d):(c=c.slice(a,+a+(i?1:0)),c.__actions__.push({func:da,args:[d],thisArg:n}),new Ut(c,this.__chain__).thru(function(v){return i&&!v.length&&v.push(n),v}))});function zm(){return xf(this)}function Km(){return new Ut(this.value(),this.__chain__)}function jm(){this.__values__===n&&(this.__values__=Gf(this.value()));var e=this.__index__>=this.__values__.length,i=e?n:this.__values__[this.__index__++];return{done:e,value:i}}function Ym(){return this}function Jm(e){for(var i,a=this;a instanceof Xs;){var c=Cf(a);c.__index__=0,c.__values__=n,i?d.__wrapped__=c:i=c;var d=c;a=a.__wrapped__}return d.__wrapped__=e,i}function Xm(){var e=this.__wrapped__;if(e instanceof ce){var i=e;return this.__actions__.length&&(i=new ce(this)),i=i.reverse(),i.__actions__.push({func:da,args:[il],thisArg:n}),new Ut(i,this.__chain__)}return this.thru(il)}function Zm(){return Qc(this.__wrapped__,this.__actions__)}var ew=sa(function(e,i,a){we.call(e,a)?++e[a]:dn(e,a,1)});function tw(e,i,a){var c=J(e)?ic:Qv;return a&&it(e,i,a)&&(i=n),c(e,z(i,3))}function nw(e,i){var a=J(e)?Gn:Pc;return a(e,z(i,3))}var rw=nf(Tf),iw=nf(bf);function sw(e,i){return Ke(ga(e,i),1)}function aw(e,i){return Ke(ga(e,i),Je)}function ow(e,i,a){return a=a===n?1:re(a),Ke(ga(e,i),a)}function Lf(e,i){var a=J(e)?Et:Kn;return a(e,z(i,3))}function Nf(e,i){var a=J(e)?Rp:Ac;return a(e,z(i,3))}var lw=sa(function(e,i,a){we.call(e,a)?e[a].push(i):dn(e,a,[i])});function uw(e,i,a,c){e=ft(e)?e:ci(e),a=a&&!c?re(a):0;var d=e.length;return a<0&&(a=Ve(d+a,0)),wa(e)?a<=d&&e.indexOf(i,a)>-1:!!d&&Xr(e,i,a)>-1}var cw=se(function(e,i,a){var c=-1,d=typeof i=="function",v=ft(e)?A(e.length):[];return Kn(e,function(S){v[++c]=d?yt(i,S,a):Xi(S,i,a)}),v}),fw=sa(function(e,i,a){dn(e,a,i)});function ga(e,i){var a=J(e)?xe:Uc;return a(e,z(i,3))}function hw(e,i,a,c){return e==null?[]:(J(i)||(i=i==null?[]:[i]),a=c?n:a,J(a)||(a=a==null?[]:[a]),kc(e,i,a))}var dw=sa(function(e,i,a){e[a?0:1].push(i)},function(){return[[],[]]});function gw(e,i,a){var c=J(e)?_o:lc,d=arguments.length<3;return c(e,z(i,4),a,d,Kn)}function pw(e,i,a){var c=J(e)?Ap:lc,d=arguments.length<3;return c(e,z(i,4),a,d,Ac)}function vw(e,i){var a=J(e)?Gn:Pc;return a(e,_a(z(i,3)))}function _w(e){var i=J(e)?Cc:u_;return i(e)}function mw(e,i,a){(a?it(e,i,a):i===n)?i=1:i=re(i);var c=J(e)?Hv:c_;return c(e,i)}function ww(e){var i=J(e)?Wv:h_;return i(e)}function Sw(e){if(e==null)return 0;if(ft(e))return wa(e)?ei(e):e.length;var i=Ze(e);return i==jt||i==Yt?e.size:Mo(e).length}function yw(e,i,a){var c=J(e)?mo:d_;return a&&it(e,i,a)&&(i=n),c(e,z(i,3))}var Ew=se(function(e,i){if(e==null)return[];var a=i.length;return a>1&&it(e,i[0],i[1])?i=[]:a>2&&it(i[0],i[1],i[2])&&(i=[i[0]]),kc(e,Ke(i,1),[])}),pa=nv||function(){return ze.Date.now()};function Cw(e,i){if(typeof i!="function")throw new Ot(u);return e=re(e),function(){if(--e<1)return i.apply(this,arguments)}}function Of(e,i,a){return i=a?n:i,i=e&&i==null?e.length:i,xn(e,me,n,n,n,n,i)}function Uf(e,i){var a;if(typeof i!="function")throw new Ot(u);return e=re(e),function(){return--e>0&&(a=i.apply(this,arguments)),e<=1&&(i=n),a}}var al=se(function(e,i,a){var c=D;if(a.length){var d=qn(a,li(al));c|=pe}return xn(e,c,i,a,d)}),Df=se(function(e,i,a){var c=D|H;if(a.length){var d=qn(a,li(Df));c|=pe}return xn(i,c,e,a,d)});function Mf(e,i,a){i=a?n:i;var c=xn(e,de,n,n,n,n,n,i);return c.placeholder=Mf.placeholder,c}function $f(e,i,a){i=a?n:i;var c=xn(e,_e,n,n,n,n,n,i);return c.placeholder=$f.placeholder,c}function kf(e,i,a){var c,d,v,S,y,b,x=0,L=!1,O=!1,k=!0;if(typeof e!="function")throw new Ot(u);i=kt(i)||0,Ne(a)&&(L=!!a.leading,O="maxWait"in a,v=O?Ve(kt(a.maxWait)||0,i):v,k="trailing"in a?!!a.trailing:k);function B($e){var tn=c,Dn=d;return c=d=n,x=$e,S=e.apply(Dn,tn),S}function K($e){return x=$e,y=rs(le,i),L?B($e):S}function ie($e){var tn=$e-b,Dn=$e-x,ih=i-tn;return O?Xe(ih,v-Dn):ih}function Q($e){var tn=$e-b,Dn=$e-x;return b===n||tn>=i||tn<0||O&&Dn>=v}function le(){var $e=pa();if(Q($e))return he($e);y=rs(le,ie($e))}function he($e){return y=n,k&&c?B($e):(c=d=n,S)}function Rt(){y!==n&&zc(y),x=0,c=b=d=y=n}function st(){return y===n?S:he(pa())}function At(){var $e=pa(),tn=Q($e);if(c=arguments,d=this,b=$e,tn){if(y===n)return K(b);if(O)return zc(y),y=rs(le,i),B(b)}return y===n&&(y=rs(le,i)),S}return At.cancel=Rt,At.flush=st,At}var Tw=se(function(e,i){return Rc(e,1,i)}),bw=se(function(e,i,a){return Rc(e,kt(i)||0,a)});function Rw(e){return xn(e,ae)}function va(e,i){if(typeof e!="function"||i!=null&&typeof i!="function")throw new Ot(u);var a=function(){var c=arguments,d=i?i.apply(this,c):c[0],v=a.cache;if(v.has(d))return v.get(d);var S=e.apply(this,c);return a.cache=v.set(d,S)||v,S};return a.cache=new(va.Cache||In),a}va.Cache=In;function _a(e){if(typeof e!="function")throw new Ot(u);return function(){var i=arguments;switch(i.length){case 0:return!e.call(this);case 1:return!e.call(this,i[0]);case 2:return!e.call(this,i[0],i[1]);case 3:return!e.call(this,i[0],i[1],i[2])}return!e.apply(this,i)}}function Aw(e){return Uf(2,e)}var Pw=g_(function(e,i){i=i.length==1&&J(i[0])?xe(i[0],Ct(z())):xe(Ke(i,1),Ct(z()));var a=i.length;return se(function(c){for(var d=-1,v=Xe(c.length,a);++d<v;)c[d]=i[d].call(this,c[d]);return yt(e,this,c)})}),ol=se(function(e,i){var a=qn(i,li(ol));return xn(e,pe,n,i,a)}),Ff=se(function(e,i){var a=qn(i,li(Ff));return xn(e,oe,n,i,a)}),Iw=Ln(function(e,i){return xn(e,Re,n,n,n,i)});function xw(e,i){if(typeof e!="function")throw new Ot(u);return i=i===n?i:re(i),se(e,i)}function Lw(e,i){if(typeof e!="function")throw new Ot(u);return i=i==null?0:Ve(re(i),0),se(function(a){var c=a[i],d=Jn(a,0,i);return c&&Qn(d,c),yt(e,this,d)})}function Nw(e,i,a){var c=!0,d=!0;if(typeof e!="function")throw new Ot(u);return Ne(a)&&(c="leading"in a?!!a.leading:c,d="trailing"in a?!!a.trailing:d),kf(e,i,{leading:c,maxWait:i,trailing:d})}function Ow(e){return Of(e,1)}function Uw(e,i){return ol(Qo(i),e)}function Dw(){if(!arguments.length)return[];var e=arguments[0];return J(e)?e:[e]}function Mw(e){return Dt(e,T)}function $w(e,i){return i=typeof i=="function"?i:n,Dt(e,T,i)}function kw(e){return Dt(e,w|T)}function Fw(e,i){return i=typeof i=="function"?i:n,Dt(e,w|T,i)}function Hw(e,i){return i==null||bc(e,i,Be(i))}function en(e,i){return e===i||e!==e&&i!==i}var Ww=ua(Oo),Vw=ua(function(e,i){return e>=i}),Ir=Lc((function(){return arguments})())?Lc:function(e){return De(e)&&we.call(e,"callee")&&!_c.call(e,"callee")},J=A.isArray,Bw=Xu?Ct(Xu):Jv;function ft(e){return e!=null&&ma(e.length)&&!On(e)}function Me(e){return De(e)&&ft(e)}function Gw(e){return e===!0||e===!1||De(e)&&rt(e)==bn}var Xn=iv||wl,Qw=Zu?Ct(Zu):Xv;function qw(e){return De(e)&&e.nodeType===1&&!is(e)}function zw(e){if(e==null)return!0;if(ft(e)&&(J(e)||typeof e=="string"||typeof e.splice=="function"||Xn(e)||ui(e)||Ir(e)))return!e.length;var i=Ze(e);if(i==jt||i==Yt)return!e.size;if(ns(e))return!Mo(e).length;for(var a in e)if(we.call(e,a))return!1;return!0}function Kw(e,i){return Zi(e,i)}function jw(e,i,a){a=typeof a=="function"?a:n;var c=a?a(e,i):n;return c===n?Zi(e,i,n,a):!!c}function ll(e){if(!De(e))return!1;var i=rt(e);return i==Sr||i==Lt||typeof e.message=="string"&&typeof e.name=="string"&&!is(e)}function Yw(e){return typeof e=="number"&&wc(e)}function On(e){if(!Ne(e))return!1;var i=rt(e);return i==Rn||i==bu||i==mr||i==yg}function Hf(e){return typeof e=="number"&&e==re(e)}function ma(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wt}function Ne(e){var i=typeof e;return e!=null&&(i=="object"||i=="function")}function De(e){return e!=null&&typeof e=="object"}var Wf=ec?Ct(ec):e_;function Jw(e,i){return e===i||Do(e,i,Xo(i))}function Xw(e,i,a){return a=typeof a=="function"?a:n,Do(e,i,Xo(i),a)}function Zw(e){return Vf(e)&&e!=+e}function eS(e){if($_(e))throw new Y(l);return Nc(e)}function tS(e){return e===null}function nS(e){return e==null}function Vf(e){return typeof e=="number"||De(e)&&rt(e)==Fi}function is(e){if(!De(e)||rt(e)!=An)return!1;var i=Qs(e);if(i===null)return!0;var a=we.call(i,"constructor")&&i.constructor;return typeof a=="function"&&a instanceof a&&Ws.call(a)==Xp}var ul=tc?Ct(tc):t_;function rS(e){return Hf(e)&&e>=-wt&&e<=wt}var Bf=nc?Ct(nc):n_;function wa(e){return typeof e=="string"||!J(e)&&De(e)&&rt(e)==Wi}function bt(e){return typeof e=="symbol"||De(e)&&rt(e)==Ns}var ui=rc?Ct(rc):r_;function iS(e){return e===n}function sS(e){return De(e)&&Ze(e)==Vi}function aS(e){return De(e)&&rt(e)==Cg}var oS=ua($o),lS=ua(function(e,i){return e<=i});function Gf(e){if(!e)return[];if(ft(e))return wa(e)?Jt(e):ct(e);if(Qi&&e[Qi])return Hp(e[Qi]());var i=Ze(e),a=i==jt?To:i==Yt?ks:ci;return a(e)}function Un(e){if(!e)return e===0?e:0;if(e=kt(e),e===Je||e===-Je){var i=e<0?-1:1;return i*jr}return e===e?e:0}function re(e){var i=Un(e),a=i%1;return i===i?a?i-a:i:0}function Qf(e){return e?br(re(e),0,Ae):0}function kt(e){if(typeof e=="number")return e;if(bt(e))return N;if(Ne(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=Ne(i)?i+"":i}if(typeof e!="string")return e===0?e:+e;e=uc(e);var a=Bg.test(e);return a||Qg.test(e)?Cp(e.slice(2),a?2:8):Vg.test(e)?N:+e}function qf(e){return pn(e,ht(e))}function uS(e){return e?br(re(e),-wt,wt):e===0?e:0}function Se(e){return e==null?"":Tt(e)}var cS=ai(function(e,i){if(ns(i)||ft(i)){pn(i,Be(i),e);return}for(var a in i)we.call(i,a)&&Yi(e,a,i[a])}),zf=ai(function(e,i){pn(i,ht(i),e)}),Kf=ai(function(e,i,a,c){pn(i,ht(i),e,c)}),cl=ai(function(e,i,a,c){pn(i,Be(i),e,c)}),fS=Ln(xo);function hS(e,i){var a=si(e);return i==null?a:Tc(a,i)}var dS=se(function(e,i){e=Ce(e);var a=-1,c=i.length,d=c>2?i[2]:n;for(d&&it(i[0],i[1],d)&&(c=1);++a<c;)for(var v=i[a],S=ht(v),y=-1,b=S.length;++y<b;){var x=S[y],L=e[x];(L===n||en(L,ni[x])&&!we.call(e,x))&&(e[x]=v[x])}return e}),gS=se(function(e){return e.push(n,cf),yt(jf,n,e)});function pS(e,i){return sc(e,z(i,3),gn)}function vS(e,i){return sc(e,z(i,3),No)}function _S(e,i){return e==null?e:Lo(e,z(i,3),ht)}function mS(e,i){return e==null?e:Ic(e,z(i,3),ht)}function wS(e,i){return e&&gn(e,z(i,3))}function SS(e,i){return e&&No(e,z(i,3))}function yS(e){return e==null?[]:ta(e,Be(e))}function ES(e){return e==null?[]:ta(e,ht(e))}function fl(e,i,a){var c=e==null?n:Rr(e,i);return c===n?a:c}function CS(e,i){return e!=null&&df(e,i,zv)}function hl(e,i){return e!=null&&df(e,i,Kv)}var TS=sf(function(e,i,a){i!=null&&typeof i.toString!="function"&&(i=Vs.call(i)),e[i]=a},gl(dt)),bS=sf(function(e,i,a){i!=null&&typeof i.toString!="function"&&(i=Vs.call(i)),we.call(e,i)?e[i].push(a):e[i]=[a]},z),RS=se(Xi);function Be(e){return ft(e)?Ec(e):Mo(e)}function ht(e){return ft(e)?Ec(e,!0):i_(e)}function AS(e,i){var a={};return i=z(i,3),gn(e,function(c,d,v){dn(a,i(c,d,v),c)}),a}function PS(e,i){var a={};return i=z(i,3),gn(e,function(c,d,v){dn(a,d,i(c,d,v))}),a}var IS=ai(function(e,i,a){na(e,i,a)}),jf=ai(function(e,i,a,c){na(e,i,a,c)}),xS=Ln(function(e,i){var a={};if(e==null)return a;var c=!1;i=xe(i,function(v){return v=Yn(v,e),c||(c=v.length>1),v}),pn(e,Yo(e),a),c&&(a=Dt(a,w|E|T,b_));for(var d=i.length;d--;)Vo(a,i[d]);return a});function LS(e,i){return Yf(e,_a(z(i)))}var NS=Ln(function(e,i){return e==null?{}:a_(e,i)});function Yf(e,i){if(e==null)return{};var a=xe(Yo(e),function(c){return[c]});return i=z(i),Fc(e,a,function(c,d){return i(c,d[0])})}function OS(e,i,a){i=Yn(i,e);var c=-1,d=i.length;for(d||(d=1,e=n);++c<d;){var v=e==null?n:e[Zt(i[c])];v===n&&(c=d,v=a),e=On(v)?v.call(e):v}return e}function US(e,i,a){return e==null?e:es(e,i,a)}function DS(e,i,a,c){return c=typeof c=="function"?c:n,e==null?e:es(e,i,a,c)}var Jf=lf(Be),Xf=lf(ht);function MS(e,i,a){var c=J(e),d=c||Xn(e)||ui(e);if(i=z(i,4),a==null){var v=e&&e.constructor;d?a=c?new v:[]:Ne(e)?a=On(v)?si(Qs(e)):{}:a={}}return(d?Et:gn)(e,function(S,y,b){return i(a,S,y,b)}),a}function $S(e,i){return e==null?!0:Vo(e,i)}function kS(e,i,a){return e==null?e:Gc(e,i,Qo(a))}function FS(e,i,a,c){return c=typeof c=="function"?c:n,e==null?e:Gc(e,i,Qo(a),c)}function ci(e){return e==null?[]:Co(e,Be(e))}function HS(e){return e==null?[]:Co(e,ht(e))}function WS(e,i,a){return a===n&&(a=i,i=n),a!==n&&(a=kt(a),a=a===a?a:0),i!==n&&(i=kt(i),i=i===i?i:0),br(kt(e),i,a)}function VS(e,i,a){return i=Un(i),a===n?(a=i,i=0):a=Un(a),e=kt(e),jv(e,i,a)}function BS(e,i,a){if(a&&typeof a!="boolean"&&it(e,i,a)&&(i=a=n),a===n&&(typeof i=="boolean"?(a=i,i=n):typeof e=="boolean"&&(a=e,e=n)),e===n&&i===n?(e=0,i=1):(e=Un(e),i===n?(i=e,e=0):i=Un(i)),e>i){var c=e;e=i,i=c}if(a||e%1||i%1){var d=Sc();return Xe(e+d*(i-e+Ep("1e-"+((d+"").length-1))),i)}return Fo(e,i)}var GS=oi(function(e,i,a){return i=i.toLowerCase(),e+(a?Zf(i):i)});function Zf(e){return dl(Se(e).toLowerCase())}function eh(e){return e=Se(e),e&&e.replace(zg,Dp).replace(hp,"")}function QS(e,i,a){e=Se(e),i=Tt(i);var c=e.length;a=a===n?c:br(re(a),0,c);var d=a;return a-=i.length,a>=0&&e.slice(a,d)==i}function qS(e){return e=Se(e),e&&Pg.test(e)?e.replace(Pu,Mp):e}function zS(e){return e=Se(e),e&&Ug.test(e)?e.replace(ao,"\\$&"):e}var KS=oi(function(e,i,a){return e+(a?"-":"")+i.toLowerCase()}),jS=oi(function(e,i,a){return e+(a?" ":"")+i.toLowerCase()}),YS=tf("toLowerCase");function JS(e,i,a){e=Se(e),i=re(i);var c=i?ei(e):0;if(!i||c>=i)return e;var d=(i-c)/2;return la(js(d),a)+e+la(Ks(d),a)}function XS(e,i,a){e=Se(e),i=re(i);var c=i?ei(e):0;return i&&c<i?e+la(i-c,a):e}function ZS(e,i,a){e=Se(e),i=re(i);var c=i?ei(e):0;return i&&c<i?la(i-c,a)+e:e}function ey(e,i,a){return a||i==null?i=0:i&&(i=+i),lv(Se(e).replace(oo,""),i||0)}function ty(e,i,a){return(a?it(e,i,a):i===n)?i=1:i=re(i),Ho(Se(e),i)}function ny(){var e=arguments,i=Se(e[0]);return e.length<3?i:i.replace(e[1],e[2])}var ry=oi(function(e,i,a){return e+(a?"_":"")+i.toLowerCase()});function iy(e,i,a){return a&&typeof a!="number"&&it(e,i,a)&&(i=a=n),a=a===n?Ae:a>>>0,a?(e=Se(e),e&&(typeof i=="string"||i!=null&&!ul(i))&&(i=Tt(i),!i&&Zr(e))?Jn(Jt(e),0,a):e.split(i,a)):[]}var sy=oi(function(e,i,a){return e+(a?" ":"")+dl(i)});function ay(e,i,a){return e=Se(e),a=a==null?0:br(re(a),0,e.length),i=Tt(i),e.slice(a,a+i.length)==i}function oy(e,i,a){var c=p.templateSettings;a&&it(e,i,a)&&(i=n),e=Se(e),i=cl({},i,c,uf);var d=cl({},i.imports,c.imports,uf),v=Be(d),S=Co(d,v);Et(v,function(Q){if(xu.test(Q))throw new Y(h)});var y,b,x=0,L=i.interpolate||Os,O="__p += '",k=bo((i.escape||Os).source+"|"+L.source+"|"+(L===Iu?Wg:Os).source+"|"+(i.evaluate||Os).source+"|$","g"),B="//# sourceURL="+(we.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_p+"]")+`
4
+ `;e.replace(k,function(Q,le,he,Rt,st,At){return he||(he=Rt),O+=e.slice(x,At).replace(Kg,$p),le&&(y=!0,O+=`' +
5
+ __e(`+le+`) +
6
+ '`),st&&(b=!0,O+=`';
7
+ `+st+`;
8
+ __p += '`),he&&(O+=`' +
9
+ ((__t = (`+he+`)) == null ? '' : __t) +
10
+ '`),x=At+Q.length,Q}),O+=`';
11
+ `;var K=we.call(i,"variable")&&i.variable;if(!K)O=`with (obj) {
12
+ `+O+`
13
13
  }
14
- `;else if(co.test(Q))throw new z(f);L=(S?L.replace(ih,""):L).replace(sh,"$1").replace(ah,"$1;"),L="function("+(Q||"obj")+`) {
15
- `+(Q?"":`obj || (obj = {});
16
- `)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
14
+ `;else if(xu.test(K))throw new Y(f);O=(b?O.replace(Tg,""):O).replace(bg,"$1").replace(Rg,"$1;"),O="function("+(K||"obj")+`) {
15
+ `+(K?"":`obj || (obj = {});
16
+ `)+"var __t, __p = ''"+(y?", __e = _.escape":"")+(b?`, __j = Array.prototype.join;
17
17
  function print() { __p += __j.call(arguments, '') }
18
18
  `:`;
19
- `)+L+`return __p
20
- }`;var X=Dl(function(){return ie(g,W+"return "+L).apply(r,_)});if(X.source=L,Ea(X))throw X;return X}function B_(e){return ae(e).toLowerCase()}function G_(e){return ae(e).toUpperCase()}function Q_(e,t,s){if(e=ae(e),e&&(s||t===r))return Go(e);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Ct(t),g=Qo(u,h),_=qo(u,h)+1;return un(u,g,_).join("")}function q_(e,t,s){if(e=ae(e),e&&(s||t===r))return e.slice(0,Ko(e)+1);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=qo(u,Ct(t))+1;return un(u,0,h).join("")}function z_(e,t,s){if(e=ae(e),e&&(s||t===r))return e.replace(Es,"");if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Qo(u,Ct(t));return un(u,h).join("")}function K_(e,t){var s=Pe,u=D;if(de(t)){var h="separator"in t?t.separator:h;s="length"in t?J(t.length):s,u="omission"in t?nt(t.omission):u}e=ae(e);var g=e.length;if(Kn(e)){var _=Ct(e);g=_.length}if(s>=g)return e;var v=s-Yn(u);if(v<1)return u;var S=_?un(_,0,v).join(""):e.slice(0,v);if(h===r)return S+u;if(_&&(v+=S.length-v),Ca(h)){if(e.slice(v).search(h)){var P,I=S;for(h.global||(h=Fs(h.source,ae(ho.exec(h))+"g")),h.lastIndex=0;P=h.exec(I);)var L=P.index;S=S.slice(0,L===r?v:L)}}else if(e.indexOf(nt(h),v)!=v){var M=S.lastIndexOf(h);M>-1&&(S=S.slice(0,M))}return S+u}function Y_(e){return e=ae(e),e&&oh.test(e)?e.replace(oo,bf):e}var J_=nr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ra=Du("toUpperCase");function $l(e,t,s){return e=ae(e),t=s?r:t,t===r?Sf(e)?Pf(e):hf(e):e.match(t)||[]}var Dl=Z(function(e,t){try{return je(e,r,t)}catch(s){return Ea(s)?s:new z(s)}}),X_=Gt(function(e,t){return et(t,function(s){s=Tt(s),Ut(e,s,wa(e[s],e))}),e});function Z_(e){var t=e==null?0:e.length,s=B();return e=t?fe(e,function(u){if(typeof u[1]!="function")throw new lt(l);return[s(u[0]),u[1]]}):[],Z(function(u){for(var h=-1;++h<t;){var g=e[h];if(je(g[0],this,u))return je(g[1],this,u)}})}function j_(e){return bd(ht(e,C))}function Aa(e){return function(){return e}}function ev(e,t){return e==null||e!==e?t:e}var tv=Fu(),nv=Fu(!0);function Je(e){return e}function Pa(e){return gu(typeof e=="function"?e:ht(e,C))}function rv(e){return mu(ht(e,C))}function iv(e,t){return _u(e,ht(t,C))}var sv=Z(function(e,t){return function(s){return Fr(s,e,t)}}),av=Z(function(e,t){return function(s){return Fr(e,s,t)}});function Ia(e,t,s){var u=Ie(t),h=Li(t,u);s==null&&!(de(t)&&(h.length||!u.length))&&(s=t,t=e,e=this,h=Li(t,Ie(t)));var g=!(de(s)&&"chain"in s)||!!s.chain,_=qt(e);return et(h,function(v){var S=t[v];e[v]=S,_&&(e.prototype[v]=function(){var P=this.__chain__;if(g||P){var I=e(this.__wrapped__),L=I.__actions__=ze(this.__actions__);return L.push({func:S,args:arguments,thisArg:e}),I.__chain__=P,I}return S.apply(e,tn([this.value()],arguments))})}),e}function ov(){return Ne._===this&&(Ne._=Of),this}function xa(){}function uv(e){return e=J(e),Z(function(t){return vu(t,e)})}var lv=aa(fe),cv=aa(ko),hv=aa(Ls);function Ml(e){return da(e)?Ns(Tt(e)):Vd(e)}function fv(e){return function(t){return e==null?r:In(e,t)}}var dv=Hu(),gv=Hu(!0);function La(){return[]}function Na(){return!1}function pv(){return{}}function mv(){return""}function _v(){return!0}function vv(e,t){if(e=J(e),e<1||e>oe)return[];var s=Nt,u=De(e,Nt);t=B(t),e-=Nt;for(var h=$s(u,t);++s<e;)t(s);return h}function wv(e){return Y(e)?fe(e,Tt):rt(e)?[e]:ze(nl(ae(e)))}function Sv(e){var t=++Nf;return ae(e)+t}var Ev=Mi(function(e,t){return e+t},0),Cv=oa("ceil"),yv=Mi(function(e,t){return e/t},1),Tv=oa("floor");function bv(e){return e&&e.length?xi(e,Je,qs):r}function Rv(e,t){return e&&e.length?xi(e,B(t,2),qs):r}function Av(e){return Vo(e,Je)}function Pv(e,t){return Vo(e,B(t,2))}function Iv(e){return e&&e.length?xi(e,Je,Js):r}function xv(e,t){return e&&e.length?xi(e,B(t,2),Js):r}var Lv=Mi(function(e,t){return e*t},1),Nv=oa("round"),Uv=Mi(function(e,t){return e-t},0);function Ov(e){return e&&e.length?Os(e,Je):0}function $v(e,t){return e&&e.length?Os(e,B(t,2)):0}return d.after=im,d.ary=dl,d.assign=Qm,d.assignIn=Al,d.assignInWith=Pl,d.assignWith=ya,d.at=qm,d.before=gl,d.bind=wa,d.bindAll=X_,d.bindKey=pl,d.castArray=mm,d.chain=cl,d.chunk=bg,d.compact=Rg,d.concat=Ag,d.cond=Z_,d.conforms=j_,d.constant=Aa,d.countBy=$p,d.create=zm,d.curry=ml,d.curryRight=_l,d.debounce=vl,d.defaults=Km,d.defaultsDeep=Ym,d.defer=sm,d.delay=am,d.difference=Pg,d.differenceBy=Ig,d.differenceWith=xg,d.drop=Lg,d.dropRight=Ng,d.dropRightWhile=Ug,d.dropWhile=Og,d.fill=$g,d.filter=Mp,d.flatMap=Hp,d.flatMapDeep=Wp,d.flatMapDepth=Vp,d.flatten=al,d.flattenDeep=Dg,d.flattenDepth=Mg,d.flip=om,d.flow=tv,d.flowRight=nv,d.fromPairs=Fg,d.functions=n_,d.functionsIn=r_,d.groupBy=Bp,d.initial=Hg,d.intersection=Wg,d.intersectionBy=Vg,d.intersectionWith=Bg,d.invert=s_,d.invertBy=a_,d.invokeMap=Qp,d.iteratee=Pa,d.keyBy=qp,d.keys=Ie,d.keysIn=Ye,d.map=Gi,d.mapKeys=u_,d.mapValues=l_,d.matches=rv,d.matchesProperty=iv,d.memoize=qi,d.merge=c_,d.mergeWith=Il,d.method=sv,d.methodOf=av,d.mixin=Ia,d.negate=zi,d.nthArg=uv,d.omit=h_,d.omitBy=f_,d.once=um,d.orderBy=zp,d.over=lv,d.overArgs=lm,d.overEvery=cv,d.overSome=hv,d.partial=Sa,d.partialRight=wl,d.partition=Kp,d.pick=d_,d.pickBy=xl,d.property=Ml,d.propertyOf=fv,d.pull=zg,d.pullAll=ul,d.pullAllBy=Kg,d.pullAllWith=Yg,d.pullAt=Jg,d.range=dv,d.rangeRight=gv,d.rearg=cm,d.reject=Xp,d.remove=Xg,d.rest=hm,d.reverse=_a,d.sampleSize=jp,d.set=p_,d.setWith=m_,d.shuffle=em,d.slice=Zg,d.sortBy=rm,d.sortedUniq=sp,d.sortedUniqBy=ap,d.split=k_,d.spread=fm,d.tail=op,d.take=up,d.takeRight=lp,d.takeRightWhile=cp,d.takeWhile=hp,d.tap=Rp,d.throttle=dm,d.thru=Bi,d.toArray=Tl,d.toPairs=Ll,d.toPairsIn=Nl,d.toPath=wv,d.toPlainObject=Rl,d.transform=__,d.unary=gm,d.union=fp,d.unionBy=dp,d.unionWith=gp,d.uniq=pp,d.uniqBy=mp,d.uniqWith=_p,d.unset=v_,d.unzip=va,d.unzipWith=ll,d.update=w_,d.updateWith=S_,d.values=sr,d.valuesIn=E_,d.without=vp,d.words=$l,d.wrap=pm,d.xor=wp,d.xorBy=Sp,d.xorWith=Ep,d.zip=Cp,d.zipObject=yp,d.zipObjectDeep=Tp,d.zipWith=bp,d.entries=Ll,d.entriesIn=Nl,d.extend=Al,d.extendWith=Pl,Ia(d,d),d.add=Ev,d.attempt=Dl,d.camelCase=b_,d.capitalize=Ul,d.ceil=Cv,d.clamp=C_,d.clone=_m,d.cloneDeep=wm,d.cloneDeepWith=Sm,d.cloneWith=vm,d.conformsTo=Em,d.deburr=Ol,d.defaultTo=ev,d.divide=yv,d.endsWith=R_,d.eq=bt,d.escape=A_,d.escapeRegExp=P_,d.every=Dp,d.find=Fp,d.findIndex=il,d.findKey=Jm,d.findLast=kp,d.findLastIndex=sl,d.findLastKey=Xm,d.floor=Tv,d.forEach=hl,d.forEachRight=fl,d.forIn=Zm,d.forInRight=jm,d.forOwn=e_,d.forOwnRight=t_,d.get=Ta,d.gt=Cm,d.gte=ym,d.has=i_,d.hasIn=ba,d.head=ol,d.identity=Je,d.includes=Gp,d.indexOf=kg,d.inRange=y_,d.invoke=o_,d.isArguments=Nn,d.isArray=Y,d.isArrayBuffer=Tm,d.isArrayLike=Ke,d.isArrayLikeObject=_e,d.isBoolean=bm,d.isBuffer=ln,d.isDate=Rm,d.isElement=Am,d.isEmpty=Pm,d.isEqual=Im,d.isEqualWith=xm,d.isError=Ea,d.isFinite=Lm,d.isFunction=qt,d.isInteger=Sl,d.isLength=Ki,d.isMap=El,d.isMatch=Nm,d.isMatchWith=Um,d.isNaN=Om,d.isNative=$m,d.isNil=Mm,d.isNull=Dm,d.isNumber=Cl,d.isObject=de,d.isObjectLike=pe,d.isPlainObject=Gr,d.isRegExp=Ca,d.isSafeInteger=Fm,d.isSet=yl,d.isString=Yi,d.isSymbol=rt,d.isTypedArray=ir,d.isUndefined=km,d.isWeakMap=Hm,d.isWeakSet=Wm,d.join=Gg,d.kebabCase=I_,d.last=dt,d.lastIndexOf=Qg,d.lowerCase=x_,d.lowerFirst=L_,d.lt=Vm,d.lte=Bm,d.max=bv,d.maxBy=Rv,d.mean=Av,d.meanBy=Pv,d.min=Iv,d.minBy=xv,d.stubArray=La,d.stubFalse=Na,d.stubObject=pv,d.stubString=mv,d.stubTrue=_v,d.multiply=Lv,d.nth=qg,d.noConflict=ov,d.noop=xa,d.now=Qi,d.pad=N_,d.padEnd=U_,d.padStart=O_,d.parseInt=$_,d.random=T_,d.reduce=Yp,d.reduceRight=Jp,d.repeat=D_,d.replace=M_,d.result=g_,d.round=Nv,d.runInContext=w,d.sample=Zp,d.size=tm,d.snakeCase=F_,d.some=nm,d.sortedIndex=jg,d.sortedIndexBy=ep,d.sortedIndexOf=tp,d.sortedLastIndex=np,d.sortedLastIndexBy=rp,d.sortedLastIndexOf=ip,d.startCase=H_,d.startsWith=W_,d.subtract=Uv,d.sum=Ov,d.sumBy=$v,d.template=V_,d.times=vv,d.toFinite=zt,d.toInteger=J,d.toLength=bl,d.toLower=B_,d.toNumber=gt,d.toSafeInteger=Gm,d.toString=ae,d.toUpper=G_,d.trim=Q_,d.trimEnd=q_,d.trimStart=z_,d.truncate=K_,d.unescape=Y_,d.uniqueId=Sv,d.upperCase=J_,d.upperFirst=Ra,d.each=hl,d.eachRight=fl,d.first=ol,Ia(d,(function(){var e={};return Ot(d,function(t,s){se.call(d.prototype,s)||(e[s]=t)}),e})(),{chain:!1}),d.VERSION=a,et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),et(["drop","take"],function(e,t){te.prototype[e]=function(s){s=s===r?1:ye(J(s),0);var u=this.__filtered__&&!t?new te(this):this.clone();return u.__filtered__?u.__takeCount__=De(s,u.__takeCount__):u.__views__.push({size:De(s,Nt),type:e+(u.__dir__<0?"Right":"")}),u},te.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),et(["filter","map","takeWhile"],function(e,t){var s=t+1,u=s==$e||s==N;te.prototype[e]=function(h){var g=this.clone();return g.__iteratees__.push({iteratee:B(h,3),type:s}),g.__filtered__=g.__filtered__||u,g}}),et(["head","last"],function(e,t){var s="take"+(t?"Right":"");te.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");te.prototype[e]=function(){return this.__filtered__?new te(this):this[s](1)}}),te.prototype.compact=function(){return this.filter(Je)},te.prototype.find=function(e){return this.filter(e).head()},te.prototype.findLast=function(e){return this.reverse().find(e)},te.prototype.invokeMap=Z(function(e,t){return typeof e=="function"?new te(this):this.map(function(s){return Fr(s,e,t)})}),te.prototype.reject=function(e){return this.filter(zi(B(e)))},te.prototype.slice=function(e,t){e=J(e);var s=this;return s.__filtered__&&(e>0||t<0)?new te(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=J(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},te.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},te.prototype.toArray=function(){return this.take(Nt)},Ot(te.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),h=d[u?"take"+(t=="last"?"Right":""):t],g=u||/^find/.test(t);h&&(d.prototype[t]=function(){var _=this.__wrapped__,v=u?[1]:arguments,S=_ instanceof te,P=v[0],I=S||Y(_),L=function(j){var ne=h.apply(d,tn([j],v));return u&&M?ne[0]:ne};I&&s&&typeof P=="function"&&P.length!=1&&(S=I=!1);var M=this.__chain__,W=!!this.__actions__.length,Q=g&&!M,X=S&&!W;if(!g&&I){_=X?_:new te(this);var V=e.apply(_,v);return V.__actions__.push({func:Bi,args:[L],thisArg:r}),new ct(V,M)}return Q&&X?e.apply(this,v):(V=this.thru(L),Q?u?V.value()[0]:V.value():V)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var t=pi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var h=arguments;if(u&&!this.__chain__){var g=this.value();return t.apply(Y(g)?g:[],h)}return this[s](function(_){return t.apply(Y(_)?_:[],h)})}}),Ot(te.prototype,function(e,t){var s=d[t];if(s){var u=s.name+"";se.call(jn,u)||(jn[u]=[]),jn[u].push({name:t,func:s})}}),jn[Di(r,re).name]=[{name:"wrapper",func:r}],te.prototype.clone=Jf,te.prototype.reverse=Xf,te.prototype.value=Zf,d.prototype.at=Ap,d.prototype.chain=Pp,d.prototype.commit=Ip,d.prototype.next=xp,d.prototype.plant=Np,d.prototype.reverse=Up,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Op,d.prototype.first=d.prototype.head,Lr&&(d.prototype[Lr]=Lp),d}),Jn=If();Tn?((Tn.exports=Jn)._=Jn,As._=Jn):Ne._=Jn}).call(Mv)})(Qr,Qr.exports)),Qr.exports}var Fa=Fv();const F={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:i=>i&&F.isFunction(i.then),isFunction:i=>i&&{}.toString.call(i)==="[object Function]",isAsyncFunction:i=>i&&{}.toString.call(i)==="[object AsyncFunction]",isString:i=>typeof i=="string"||i instanceof String,isObject:i=>!!(i&&typeof i=="object"&&!Array.isArray(i)),hasHash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHash:i=>{for(;F.hasHash(i);)i=i.substring(1,i.length);return i},getTrimmedUrl:i=>{const n=i.length>0?F.getPathWithoutHash(i):i;return F.trimTrailingSlash(n.split("?")[0])},addLeadingSlash:i=>(i.startsWith("/")?"":"/")+i,trimLeadingSlash:i=>F.isString(i)?i.replace(/^\/+/g,""):"",trimTrailingSlash:i=>F.isString(i)?i.replace(/\/+$/,""):"",isElementVisible:i=>i?window.getComputedStyle(i).getPropertyValue("display")!=="none":!1,getNodeList:(i,n=!1)=>{const r=[];return i&&Array.from(document.querySelectorAll(i)).forEach(o=>{n?F.isElementVisible(o)&&r.push(o):r.push(o)}),r},prependOrigin:i=>{if(!i||i.startsWith("http"))return i;const n=i.startsWith("/");return i.length?window.location.origin+(n?"":"/")+i:window.location.origin},getConfigValueFromObject:(i,n)=>{let r=0,a=i;const o=n.split(".");for(;a&&r<o.length;)a=a[o[r++]];return a},getConfigBooleanValue:(i,n)=>{const r=F.getConfigValueFromObject(i,n);return r===!0||r==="true"},getUrlParameter:i=>new URLSearchParams(window.location.search).get(i),removeProperties(i,n){const r={};if(!(n instanceof Array)||!n.length)return console.error("[ERROR] removeProperties requires second parameter: array of keys to remove from object."),i;for(const a in i)if(i.hasOwnProperty(a)){const o=n.filter(l=>a.includes(l)).length===0,c=n.filter(l=>l.endsWith("*")).map(l=>l.slice(0,-1)).filter(l=>a.startsWith(l)).length===0;o&&c&&(r[a]=i[a])}return r},replaceVars(i,n,r,a=!0){let o=i;return n&&(a?o=Fa.replace(o,/{([\s\S]+?)}/g,c=>{let l=c.slice(1,-1).trim();return l.indexOf(r)===0&&(l=l.substring(r.length)),Fa.get(n,l,c)}):Object.entries(n).forEach(c=>{o=o.replace(new RegExp(this.escapeRegExp(r+c[0]),"g"),encodeURIComponent(c[1]))})),a&&(o=o.replace(new RegExp("\\{"+this.escapeRegExp(r)+"[^\\}]+\\}","g"),"")),o},escapeRegExp(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},hasHashOrSlash:i=>!!(i&&i.search(/^[#\/].*$/)===0),getPathWithoutHashOrSlash:i=>{for(;F.hasHashOrSlash(i);)i=i.substring(1,i.length);return i}},Mn={wrapAsPromise:i=>new Promise(n=>{n(i)}),applyFunctionPromisified:(i,n)=>(i=i.apply(void 0,n),F.isPromise(i)?i:Mn.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,n,...r)=>{const a=F.getConfigValueFromObject(i,n);return F.isFunction(a)?Mn.applyFunctionPromisified(a,r):Mn.wrapAsPromise(a)}};class kv{setErrorMessage(n){this.getLuigi().getEngine()?._connector?.showFatalError(n)}getLuigi(){return window.Luigi}getConfigValue(n){return this.getLuigi().getConfigValue(n)}getConfigValueAsync(n){return this.getLuigi().getConfigValueAsync(n)}async executeConfigFnAsync(n,r=!1,...a){const o=this.getConfigValue(n);if(F.isFunction(o))try{return await Mn.applyFunctionPromisified(o,a)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const Ge=new kv;class Hv{constructor(){this._internalStorage={},this._defaultStorage="localStorage",this._authKey="luigi.auth",this._newlyAuthorizedKey="luigi.newlyAuthorized",this._invalidStorageMsg="Configuration Error: Invalid auth.storage value defined. Must be one of localStorage, sessionStorage or none."}reset(){this._storageType=void 0}getStorageKey(){return this._authKey}getStorageType(){return this._storageType||(this._storageType=Ge.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(n){this._setStore(this.getStorageKey(),n)}removeAuthData(){this._setStore(this.getStorageKey(),void 0)}isNewlyAuthorized(){return!!this._getStore(this._newlyAuthorizedKey)}setNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,!0)}removeNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,void 0)}_getWebStorage(n){return window[n]}_setStore(n,r){switch(this.getStorageType()){case"localStorage":case"sessionStorage":r!==void 0?this._getWebStorage(this.getStorageType()).setItem(n,JSON.stringify(r)):this._getWebStorage(this.getStorageType()).removeItem(n);break;case"none":this._internalStorage[n]=r;break;default:console.error(this._invalidStorageMsg)}}_getStore(n){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(n));case"none":return this._internalStorage[n];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const At=new Hv;class Wv{isAuthorizationEnabled(){return!!Ge.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&$n.startAuthorization()}logout(){this.isAuthorizationEnabled()&&$n.logout()}async handleAuthEvent(n,r,a,o){const c=await Ge.executeConfigFnAsync("auth.events."+n,!1,r,a),l=c===void 0||!!c;if(l&&o){window.location.href=o;return}return l}get store(){return Ge.getLuigi()?.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>At.getStorageKey(),getStorageType:()=>At.getStorageType(),getAuthData:()=>At.getAuthData(),setAuthData:n=>{At.setAuthData(n),$n.broadcastAuthData(n)},removeAuthData:()=>At.removeAuthData(),setNewlyAuthorized:()=>{At.setNewlyAuthorized(),$n.resetExpirationChecks()}}}}const lr=new Wv;class Vv{getStoredAuthData(){return At.getAuthData()}isLoggedIn(){const n=this.getStoredAuthData();return!!(n&&n.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const n=F.getUrlParameter("error"),r=F.getUrlParameter("errorDescription");if(n)return{error:n,errorDescription:r}}async handleUrlAuthErrors(n,r,a){return r?await lr.handleAuthEvent("onAuthError",n,{error:r,errorDescription:a},n.logoutUrl+"?post_logout_redirect_uri="+n.post_logout_redirect_uri+"&error="+encodeURIComponent(r)+"&errorDescription="+encodeURIComponent(a||"")):!0}}const dn=new Vv;function gn(){}function uc(i){return i()}function Hl(){return Object.create(null)}function ss(i){i.forEach(uc)}function lc(i){return typeof i=="function"}function cc(i,n){return i!=i?n==n:i!==n||i&&typeof i=="object"||typeof i=="function"}let Xi,Xr;function Wl(i,n){return i===n||(Xi||(Xi=document.createElement("a")),Xi.href=n,i===Xi.href)}function Bv(i,n,r){const a=(function(o){if(!o)return document;const c=o.getRootNode?o.getRootNode():o.ownerDocument;return c&&c.host?c:o.ownerDocument})(i);if(!a.getElementById(n)){const o=mr("style");o.id=n,o.textContent=r,(function(c,l){(function(f,p){f.appendChild(p)})(c.head||c,l),l.sheet})(a,o)}}function Fn(i,n,r){i.insertBefore(n,r||null)}function pn(i){i.parentNode&&i.parentNode.removeChild(i)}function mr(i){return document.createElement(i)}function hc(i){return document.createTextNode(i)}function mt(i,n,r){r==null?i.removeAttribute(n):i.getAttribute(n)!==r&&i.setAttribute(n,r)}function zr(i){Xr=i}function fc(){if(!Xr)throw new Error("Function called outside component initialization");return Xr}function dc(i){fc().$$.on_mount.push(i)}const or=[],Zr=[];let gr=[];const Vl=[],Gv=Promise.resolve();let ka=!1;function Ha(i){gr.push(i)}const Ua=new Set;let ar=0;function K(){if(ar!==0)return;const i=Xr;do{try{for(;ar<or.length;){const n=or[ar];ar++,zr(n),Qv(n.$$)}}catch(n){throw or.length=0,ar=0,n}for(zr(null),or.length=0,ar=0;Zr.length;)Zr.pop()();for(let n=0;n<gr.length;n+=1){const r=gr[n];Ua.has(r)||(Ua.add(r),r())}gr.length=0}while(or.length);for(;Vl.length;)Vl.pop()();ka=!1,Ua.clear(),zr(i)}function Qv(i){if(i.fragment!==null){i.update(),ss(i.before_update);const n=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,n),i.after_update.forEach(Ha)}}const qv=new Set;function zv(i,n){const r=i.$$;r.fragment!==null&&((function(a){const o=[],c=[];gr.forEach((l=>a.indexOf(l)===-1?o.push(l):c.push(l))),c.forEach((l=>l())),gr=o})(r.after_update),ss(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Kv(i,n){i.$$.dirty[0]===-1&&(or.push(i),ka||(ka=!0,Gv.then(K)),i.$$.dirty.fill(0)),i.$$.dirty[n/31|0]|=1<<n%31}function gc(i,n,r,a,o,c,l=null,f=[-1]){const p=Xr;zr(i);const m=i.$$={fragment:null,ctx:[],props:c,update:gn,not_equal:o,bound:Hl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(p?p.$$.context:[])),callbacks:Hl(),dirty:f,skip_bound:!1,root:n.target||p.$$.root};l&&l(m.root);let E=!1;if(m.ctx=r?r(i,n.props||{},((b,R,...x)=>{const U=x.length?x[0]:R;return m.ctx&&o(m.ctx[b],m.ctx[b]=U)&&(!m.skip_bound&&m.bound[b]&&m.bound[b](U),E&&Kv(i,b)),R})):[],m.update(),E=!0,ss(m.before_update),m.fragment=!!a&&a(m.ctx),n.target){if(n.hydrate){const b=(function(R){return Array.from(R.childNodes)})(n.target);m.fragment&&m.fragment.l(b),b.forEach(pn)}else m.fragment&&m.fragment.c();n.intro&&(y=i.$$.fragment)&&y.i&&(qv.delete(y),y.i(C)),(function(b,R,x){const{fragment:U,after_update:H}=b.$$;U&&U.m(R,x),Ha((()=>{const re=b.$$.on_mount.map(uc).filter(lc);b.$$.on_destroy?b.$$.on_destroy.push(...re):ss(re),b.$$.on_mount=[]})),H.forEach(Ha)})(i,n.target,n.anchor),K()}var y,C;zr(p)}let pc;function es(i,n,r,a){const o=r[i]?.type;if(n=o==="Boolean"&&typeof n!="boolean"?n!=null:n,!a||!r[i])return n;if(a==="toAttribute")switch(o){case"Object":case"Array":return n==null?null:JSON.stringify(n);case"Boolean":return n?"":null;case"Number":return n??null;default:return n}else switch(o){case"Object":case"Array":return n&&JSON.parse(n);case"Boolean":default:return n;case"Number":return n!=null?+n:n}}function mc(i,n,r,a,o,c){let l=class extends pc{constructor(){super(i,r,o),this.$$p_d=n}static get observedAttributes(){return Object.keys(n).map((f=>(n[f].attribute||f).toLowerCase()))}};return Object.keys(n).forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(p){p=es(f,p,n),this.$$d[f]=p,this.$$c?.$set({[f]:p})}})})),a.forEach((f=>{Object.defineProperty(l.prototype,f,{get(){return this.$$c?.[f]}})})),c&&(l=c(l)),i.element=l,l}typeof HTMLElement=="function"&&(pc=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(i,n,r){super(),this.$$ctor=i,this.$$s=n,r&&this.attachShadow({mode:"open"})}addEventListener(i,n,r){if(this.$$l[i]=this.$$l[i]||[],this.$$l[i].push(n),this.$$c){const a=this.$$c.$on(i,n);this.$$l_u.set(n,a)}super.addEventListener(i,n,r)}removeEventListener(i,n,r){if(super.removeEventListener(i,n,r),this.$$c){const a=this.$$l_u.get(n);a&&(a(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let n=function(c){return()=>{let l;return{c:function(){l=mr("slot"),c!=="default"&&mt(l,"name",c)},m:function(f,p){Fn(f,l,p)},d:function(f){f&&pn(l)}}}};var i=n;if(await Promise.resolve(),!this.$$cn||this.$$c)return;const r={},a=(function(c){const l={};return c.childNodes.forEach((f=>{l[f.slot||"default"]=!0})),l})(this);for(const c of this.$$s)c in a&&(r[c]=[n(c)]);for(const c of this.attributes){const l=this.$$g_p(c.name);l in this.$$d||(this.$$d[l]=es(l,c.value,this.$$p_d,"toProp"))}for(const c in this.$$p_d)c in this.$$d||this[c]===void 0||(this.$$d[c]=this[c],delete this[c]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const c in this.$$p_d)if(this.$$d[c]=this.$$c.$$.ctx[this.$$c.$$.props[c]],this.$$p_d[c].reflect){const l=es(c,this.$$d[c],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[c].attribute||c):this.setAttribute(this.$$p_d[c].attribute||c,l)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const c in this.$$l)for(const l of this.$$l[c]){const f=this.$$c.$on(c,l);this.$$l_u.set(l,f)}this.$$l={}}}attributeChangedCallback(i,n,r){this.$$r||(i=this.$$g_p(i),this.$$d[i]=es(i,r,this.$$p_d,"toProp"),this.$$c?.$set({[i]:this.$$d[i]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(i){return Object.keys(this.$$p_d).find((n=>this.$$p_d[n].attribute===i||!this.$$p_d[n].attribute&&n.toLowerCase()===i))||i}});class _c{$$=void 0;$$set=void 0;$destroy(){zv(this,1),this.$destroy=gn}$on(n,r){if(!lc(r))return gn;const a=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return a.push(r),()=>{const o=a.indexOf(r);o!==-1&&a.splice(o,1)}}$set(n){var r;this.$$set&&(r=n,Object.keys(r).length!==0)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}var ee;typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4"),(function(i){i.CUSTOM_MESSAGE="custom",i.GET_CONTEXT="luigi.get-context",i.SEND_CONTEXT_HANDSHAKE="luigi.init",i.CONTEXT_RECEIVED="luigi.init.ok",i.NAVIGATION_REQUEST="luigi.navigation.open",i.ALERT_REQUEST="luigi.ux.alert.show",i.ALERT_CLOSED="luigi.ux.alert.hide",i.INITIALIZED="luigi.init.ok",i.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",i.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",i.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",i.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",i.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",i.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",i.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",i.LOCAL_STORAGE_SET_REQUEST="storage",i.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",i.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",i.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",i.BACK_NAVIGATION_REQUEST="luigi.navigation.back",i.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",i.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",i.SEND_CONTEXT_OBJECT="luigi.navigate",i.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",i.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",i.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",i.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",i.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",i.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",i.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",i.AUTH_SET_TOKEN="luigi.auth.tokenIssued",i.ADD_BACKDROP_REQUEST="luigi.add-backdrop",i.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",i.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",i.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(ee||(ee={}));class Yv extends Event{constructor(n,r,a,o){super(n),this.detail=r,this.payload=a||r||{},this.callbackFn=o}callback(n){this.callbackFn&&this.callbackFn(n)}}const $={ADD_BACKDROP_REQUEST:"add-backdrop-request",ADD_NODE_PARAMS_REQUEST:"add-node-params-request",ADD_SEARCH_PARAMS_REQUEST:"add-search-params-request",ALERT_CLOSED:"close-alert-request",ALERT_REQUEST:"show-alert-request",BACK_NAVIGATION_REQUEST:"navigate-back-request",CHECK_PATH_EXISTS_REQUEST:"check-path-exists-request",CLOSE_CURRENT_MODAL_REQUEST:"close-current-modal-request",CLOSE_USER_SETTINGS_REQUEST:"close-user-settings-request",COLLAPSE_LEFT_NAV_REQUEST:"collapse-leftnav-request",CUSTOM_MESSAGE:"custom-message",GET_CONTEXT_REQUEST:"get-context-request",GET_CURRENT_ROUTE_REQUEST:"get-current-route-request",GO_BACK_REQUEST:"go-back-request",HAS_BACK_REQUEST:"has-back-request",HIDE_LOADING_INDICATOR_REQUEST:"hide-loading-indicator-request",INITIALIZED:"initialized",LOCAL_STORAGE_SET_REQUEST:"set-storage-request",NAVIGATION_COMPLETED_REPORT:"report-navigation-completed-request",NAVIGATION_REQUEST:"navigation-request",OPEN_USER_SETTINGS_REQUEST:"open-user-settings-request",PATH_EXISTS_REQUEST:"path-exists-request",REMOVE_BACKDROP_REQUEST:"remove-backdrop-request",RUNTIME_ERROR_HANDLING_REQUEST:"runtime-error-handling-request",SET_ANCHOR_LINK_REQUEST:"set-anchor-request",SET_CURRENT_LOCALE_REQUEST:"set-current-locale-request",SET_DIRTY_STATUS_REQUEST:"set-dirty-status-request",SET_DOCUMENT_TITLE_REQUEST:"set-document-title-request",SET_THIRD_PARTY_COOKIES_REQUEST:"set-third-party-cookies-request",SET_VIEW_GROUP_DATA_REQUEST:"set-viewgroup-data-request",SHOW_CONFIRMATION_MODAL_REQUEST:"show-confirmation-modal-request",SHOW_LOADING_INDICATOR_REQUEST:"show-loading-indicator-request",UPDATE_MODAL_PATH_DATA_REQUEST:"update-modal-path-data-request",UPDATE_MODAL_SETTINGS_REQUEST:"update-modal-settings-request",UPDATE_TOP_NAVIGATION_REQUEST:"update-top-navigation-request"};class Ka{isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}sendCustomMessageToIframe(n,r,a){const o=a||"custom";if(n?.iframe?.contentWindow){const c=new URL(n.iframe.src);o==="custom"?n.iframe.contentWindow.postMessage({msg:o,data:r},c.origin):n.iframe.contentWindow.postMessage({msg:o,...r},c.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(n,r,a,o,c){this.dispatch(n,r,a,c,o)}dispatch(n,r,a,o,c){const l=new Yv(n,a,c,o);r.dispatchEvent(l)}getTargetContainer(n){let r;return globalThis.__luigi_container_manager.container.forEach((a=>{a.iframeHandle?.iframe&&a.iframeHandle.iframe.contentWindow===n.source&&(r=a)})),r}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:n=>{const r=this.getTargetContainer(n),a=r?.iframeHandle?.iframe?.contentWindow;if(a&&a===n.source)switch(n.data.msg){case ee.CUSTOM_MESSAGE:{const o=n.data.data,c=o.id;delete o.id,this.dispatch($.CUSTOM_MESSAGE,r,{id:c,_metaData:{},data:o})}break;case ee.GET_CONTEXT:a.postMessage({msg:ee.SEND_CONTEXT_HANDSHAKE,context:r.context||{},internal:{thirdPartyCookieCheck:{disabled:r.skipCookieCheck==="true"},currentTheme:r.theme,currentLocale:r.locale,activeFeatureToggleList:r.activeFeatureToggleList||[],cssVariables:r.cssVariables||{},anchor:r.anchor||"",userSettings:r.userSettings||null,drawer:r.drawer||!1,modal:r.modal||!1,viewStackSize:r.viewStackSize||0,isNavigateBack:r.isNavigateBack||!1},authData:r.authData||{},nodeParams:r.nodeParams||{},searchParams:r.searchParams||{},pathParams:r.pathParams||{}},n.origin);break;case ee.NAVIGATION_REQUEST:this.dispatch($.NAVIGATION_REQUEST,r,n.data.params,(o=>{a.postMessage({msg:ee.CLOSE_MODAL_ANSWER,data:o},n.origin)}));break;case ee.ALERT_REQUEST:this.dispatchWithPayload($.ALERT_REQUEST,r,n,n.data?.data?.settings,(o=>{r.notifyAlertClosed(n.data?.data?.settings?.id,o)}));break;case ee.INITIALIZED:this.dispatch($.INITIALIZED,r,n.data?.params||{});break;case ee.ADD_SEARCH_PARAMS_REQUEST:this.dispatch($.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case ee.ADD_NODE_PARAMS_REQUEST:this.dispatch($.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case ee.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload($.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,n.data.data?.settings,(o=>{r.notifyConfirmationModalClosed(o)}));break;case ee.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch($.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case ee.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch($.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case ee.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload($.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case ee.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload($.LOCAL_STORAGE_SET_REQUEST,r,n,n.data.data?.params);break;case ee.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case ee.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload($.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case ee.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch($.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case ee.BACK_NAVIGATION_REQUEST:{let o=n.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(c){console.warn(c)}this.dispatch($.GO_BACK_REQUEST,r,o),this.dispatch($.BACK_NAVIGATION_REQUEST,r,n)}break;case ee.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload($.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:ee.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:n.data?.data?.id,route:o}},n.origin)}));break;case ee.NAVIGATION_COMPLETED_REPORT:this.dispatch($.NAVIGATION_COMPLETED_REPORT,r,n);break;case ee.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload($.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case ee.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload($.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case ee.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload($.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:ee.SEND_PATH_EXISTS_ANSWER,data:{correlationId:n.data?.data?.id,pathExists:o}},n.origin)}));break;case ee.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload($.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case ee.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch($.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case ee.ADD_BACKDROP_REQUEST:this.dispatch($.ADD_BACKDROP_REQUEST,r,n);break;case ee.REMOVE_BACKDROP_REQUEST:this.dispatch($.REMOVE_BACKDROP_REQUEST,r,n);break;case ee.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch($.CLOSE_CURRENT_MODAL_REQUEST,r,n)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(n){this.getContainerManager().container.push(n)}}const fn=new Ka,ur=new class{constructor(){this.updateContext=(i,n,r,a,o,c)=>{if(r){const l=n||{};fn.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:o||{},searchParams:c||{},internal:l,withoutSync:!0},ee.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,n,r,a)=>{if(a){const o=r||{};fn.sendCustomMessageToIframe(a,{context:n,internal:o,withoutSync:!1,viewUrl:i},ee.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,n)=>{i&&n?fn.sendCustomMessageToIframe(i,{authData:n},ee.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(i,n,r,a,o)=>{if(r&&n._luigi_mfe_webcomponent)fn.dispatch(i,n._luigi_mfe_webcomponent,o);else{const c={...o};c.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),c.id=i,fn.sendCustomMessageToIframe(a,c)}},this.notifyConfirmationModalClosed=(i,n)=>{const r={data:{confirmed:i}};fn.sendCustomMessageToIframe(n,r,ee.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,n,r){const a=n?{id:i,dismissKey:n}:{id:i};fn.sendCustomMessageToIframe(r,a,ee.ALERT_CLOSED)}},Bl=i=>{if(!i)return;const n=i;return n.forEach(((r,a)=>{n[a]=r+(r.indexOf(";")!=-1?"":";"),n[a]=i[a].replaceAll('"',"'")})),n.join(" ")};class _r{constructor(n){n?(this.rendererObject=n,this.config=n.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(n){return document.createElement("div")}attachCompoundItem(n,r){n.appendChild(r)}}class Jv extends _r{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=vc({use:n.use.extends,config:n.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(n){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(n,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(n):super.createCompoundItemContainer(n)}attachCompoundItem(n,r){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(n,r,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(n,r):super.attachCompoundItem(n,r)}}class Xv extends _r{createCompoundContainer(){const n="__lui_compound_"+new Date().getTime(),r=document.createElement("div");r.classList.add(n);let a="";return this.config.layouts&&this.config.layouts.forEach((o=>{if(o.minWidth||o.maxWidth){let c="@media only screen ";o.minWidth!=null&&(c+=`and (min-width: ${o.minWidth}px) `),o.maxWidth!=null&&(c+=`and (max-width: ${o.maxWidth}px) `),c+=`{
21
- .${n} {
19
+ `)+O+`return __p
20
+ }`;var ie=nh(function(){return ve(v,B+"return "+O).apply(n,S)});if(ie.source=O,ll(ie))throw ie;return ie}function ly(e){return Se(e).toLowerCase()}function uy(e){return Se(e).toUpperCase()}function cy(e,i,a){if(e=Se(e),e&&(a||i===n))return uc(e);if(!e||!(i=Tt(i)))return e;var c=Jt(e),d=Jt(i),v=cc(c,d),S=fc(c,d)+1;return Jn(c,v,S).join("")}function fy(e,i,a){if(e=Se(e),e&&(a||i===n))return e.slice(0,dc(e)+1);if(!e||!(i=Tt(i)))return e;var c=Jt(e),d=fc(c,Jt(i))+1;return Jn(c,0,d).join("")}function hy(e,i,a){if(e=Se(e),e&&(a||i===n))return e.replace(oo,"");if(!e||!(i=Tt(i)))return e;var c=Jt(e),d=cc(c,Jt(i));return Jn(c,d).join("")}function dy(e,i){var a=lt,c=ut;if(Ne(i)){var d="separator"in i?i.separator:d;a="length"in i?re(i.length):a,c="omission"in i?Tt(i.omission):c}e=Se(e);var v=e.length;if(Zr(e)){var S=Jt(e);v=S.length}if(a>=v)return e;var y=a-ei(c);if(y<1)return c;var b=S?Jn(S,0,y).join(""):e.slice(0,y);if(d===n)return b+c;if(S&&(y+=b.length-y),ul(d)){if(e.slice(y).search(d)){var x,L=b;for(d.global||(d=bo(d.source,Se(Lu.exec(d))+"g")),d.lastIndex=0;x=d.exec(L);)var O=x.index;b=b.slice(0,O===n?y:O)}}else if(e.indexOf(Tt(d),y)!=y){var k=b.lastIndexOf(d);k>-1&&(b=b.slice(0,k))}return b+c}function gy(e){return e=Se(e),e&&Ag.test(e)?e.replace(Au,Gp):e}var py=oi(function(e,i,a){return e+(a?" ":"")+i.toUpperCase()}),dl=tf("toUpperCase");function th(e,i,a){return e=Se(e),i=a?n:i,i===n?Fp(e)?zp(e):xp(e):e.match(i)||[]}var nh=se(function(e,i){try{return yt(e,n,i)}catch(a){return ll(a)?a:new Y(a)}}),vy=Ln(function(e,i){return Et(i,function(a){a=Zt(a),dn(e,a,al(e[a],e))}),e});function _y(e){var i=e==null?0:e.length,a=z();return e=i?xe(e,function(c){if(typeof c[1]!="function")throw new Ot(u);return[a(c[0]),c[1]]}):[],se(function(c){for(var d=-1;++d<i;){var v=e[d];if(yt(v[0],this,c))return yt(v[1],this,c)}})}function my(e){return Gv(Dt(e,w))}function gl(e){return function(){return e}}function wy(e,i){return e==null||e!==e?i:e}var Sy=rf(),yy=rf(!0);function dt(e){return e}function pl(e){return Oc(typeof e=="function"?e:Dt(e,w))}function Ey(e){return Dc(Dt(e,w))}function Cy(e,i){return Mc(e,Dt(i,w))}var Ty=se(function(e,i){return function(a){return Xi(a,e,i)}}),by=se(function(e,i){return function(a){return Xi(e,a,i)}});function vl(e,i,a){var c=Be(i),d=ta(i,c);a==null&&!(Ne(i)&&(d.length||!c.length))&&(a=i,i=e,e=this,d=ta(i,Be(i)));var v=!(Ne(a)&&"chain"in a)||!!a.chain,S=On(e);return Et(d,function(y){var b=i[y];e[y]=b,S&&(e.prototype[y]=function(){var x=this.__chain__;if(v||x){var L=e(this.__wrapped__),O=L.__actions__=ct(this.__actions__);return O.push({func:b,args:arguments,thisArg:e}),L.__chain__=x,L}return b.apply(e,Qn([this.value()],arguments))})}),e}function Ry(){return ze._===this&&(ze._=Zp),this}function _l(){}function Ay(e){return e=re(e),se(function(i){return $c(i,e)})}var Py=zo(xe),Iy=zo(ic),xy=zo(mo);function rh(e){return el(e)?wo(Zt(e)):o_(e)}function Ly(e){return function(i){return e==null?n:Rr(e,i)}}var Ny=af(),Oy=af(!0);function ml(){return[]}function wl(){return!1}function Uy(){return{}}function Dy(){return""}function My(){return!0}function $y(e,i){if(e=re(e),e<1||e>wt)return[];var a=Ae,c=Xe(e,Ae);i=z(i),e-=Ae;for(var d=Eo(c,i);++a<e;)i(a);return d}function ky(e){return J(e)?xe(e,Zt):bt(e)?[e]:ct(Ef(Se(e)))}function Fy(e){var i=++Jp;return Se(e)+i}var Hy=oa(function(e,i){return e+i},0),Wy=Ko("ceil"),Vy=oa(function(e,i){return e/i},1),By=Ko("floor");function Gy(e){return e&&e.length?ea(e,dt,Oo):n}function Qy(e,i){return e&&e.length?ea(e,z(i,2),Oo):n}function qy(e){return oc(e,dt)}function zy(e,i){return oc(e,z(i,2))}function Ky(e){return e&&e.length?ea(e,dt,$o):n}function jy(e,i){return e&&e.length?ea(e,z(i,2),$o):n}var Yy=oa(function(e,i){return e*i},1),Jy=Ko("round"),Xy=oa(function(e,i){return e-i},0);function Zy(e){return e&&e.length?yo(e,dt):0}function eE(e,i){return e&&e.length?yo(e,z(i,2)):0}return p.after=Cw,p.ary=Of,p.assign=cS,p.assignIn=zf,p.assignInWith=Kf,p.assignWith=cl,p.at=fS,p.before=Uf,p.bind=al,p.bindAll=vy,p.bindKey=Df,p.castArray=Dw,p.chain=xf,p.chunk=G_,p.compact=Q_,p.concat=q_,p.cond=_y,p.conforms=my,p.constant=gl,p.countBy=ew,p.create=hS,p.curry=Mf,p.curryRight=$f,p.debounce=kf,p.defaults=dS,p.defaultsDeep=gS,p.defer=Tw,p.delay=bw,p.difference=z_,p.differenceBy=K_,p.differenceWith=j_,p.drop=Y_,p.dropRight=J_,p.dropRightWhile=X_,p.dropWhile=Z_,p.fill=em,p.filter=nw,p.flatMap=sw,p.flatMapDeep=aw,p.flatMapDepth=ow,p.flatten=Rf,p.flattenDeep=tm,p.flattenDepth=nm,p.flip=Rw,p.flow=Sy,p.flowRight=yy,p.fromPairs=rm,p.functions=yS,p.functionsIn=ES,p.groupBy=lw,p.initial=sm,p.intersection=am,p.intersectionBy=om,p.intersectionWith=lm,p.invert=TS,p.invertBy=bS,p.invokeMap=cw,p.iteratee=pl,p.keyBy=fw,p.keys=Be,p.keysIn=ht,p.map=ga,p.mapKeys=AS,p.mapValues=PS,p.matches=Ey,p.matchesProperty=Cy,p.memoize=va,p.merge=IS,p.mergeWith=jf,p.method=Ty,p.methodOf=by,p.mixin=vl,p.negate=_a,p.nthArg=Ay,p.omit=xS,p.omitBy=LS,p.once=Aw,p.orderBy=hw,p.over=Py,p.overArgs=Pw,p.overEvery=Iy,p.overSome=xy,p.partial=ol,p.partialRight=Ff,p.partition=dw,p.pick=NS,p.pickBy=Yf,p.property=rh,p.propertyOf=Ly,p.pull=hm,p.pullAll=Pf,p.pullAllBy=dm,p.pullAllWith=gm,p.pullAt=pm,p.range=Ny,p.rangeRight=Oy,p.rearg=Iw,p.reject=vw,p.remove=vm,p.rest=xw,p.reverse=il,p.sampleSize=mw,p.set=US,p.setWith=DS,p.shuffle=ww,p.slice=_m,p.sortBy=Ew,p.sortedUniq=Tm,p.sortedUniqBy=bm,p.split=iy,p.spread=Lw,p.tail=Rm,p.take=Am,p.takeRight=Pm,p.takeRightWhile=Im,p.takeWhile=xm,p.tap=Qm,p.throttle=Nw,p.thru=da,p.toArray=Gf,p.toPairs=Jf,p.toPairsIn=Xf,p.toPath=ky,p.toPlainObject=qf,p.transform=MS,p.unary=Ow,p.union=Lm,p.unionBy=Nm,p.unionWith=Om,p.uniq=Um,p.uniqBy=Dm,p.uniqWith=Mm,p.unset=$S,p.unzip=sl,p.unzipWith=If,p.update=kS,p.updateWith=FS,p.values=ci,p.valuesIn=HS,p.without=$m,p.words=th,p.wrap=Uw,p.xor=km,p.xorBy=Fm,p.xorWith=Hm,p.zip=Wm,p.zipObject=Vm,p.zipObjectDeep=Bm,p.zipWith=Gm,p.entries=Jf,p.entriesIn=Xf,p.extend=zf,p.extendWith=Kf,vl(p,p),p.add=Hy,p.attempt=nh,p.camelCase=GS,p.capitalize=Zf,p.ceil=Wy,p.clamp=WS,p.clone=Mw,p.cloneDeep=kw,p.cloneDeepWith=Fw,p.cloneWith=$w,p.conformsTo=Hw,p.deburr=eh,p.defaultTo=wy,p.divide=Vy,p.endsWith=QS,p.eq=en,p.escape=qS,p.escapeRegExp=zS,p.every=tw,p.find=rw,p.findIndex=Tf,p.findKey=pS,p.findLast=iw,p.findLastIndex=bf,p.findLastKey=vS,p.floor=By,p.forEach=Lf,p.forEachRight=Nf,p.forIn=_S,p.forInRight=mS,p.forOwn=wS,p.forOwnRight=SS,p.get=fl,p.gt=Ww,p.gte=Vw,p.has=CS,p.hasIn=hl,p.head=Af,p.identity=dt,p.includes=uw,p.indexOf=im,p.inRange=VS,p.invoke=RS,p.isArguments=Ir,p.isArray=J,p.isArrayBuffer=Bw,p.isArrayLike=ft,p.isArrayLikeObject=Me,p.isBoolean=Gw,p.isBuffer=Xn,p.isDate=Qw,p.isElement=qw,p.isEmpty=zw,p.isEqual=Kw,p.isEqualWith=jw,p.isError=ll,p.isFinite=Yw,p.isFunction=On,p.isInteger=Hf,p.isLength=ma,p.isMap=Wf,p.isMatch=Jw,p.isMatchWith=Xw,p.isNaN=Zw,p.isNative=eS,p.isNil=nS,p.isNull=tS,p.isNumber=Vf,p.isObject=Ne,p.isObjectLike=De,p.isPlainObject=is,p.isRegExp=ul,p.isSafeInteger=rS,p.isSet=Bf,p.isString=wa,p.isSymbol=bt,p.isTypedArray=ui,p.isUndefined=iS,p.isWeakMap=sS,p.isWeakSet=aS,p.join=um,p.kebabCase=KS,p.last=$t,p.lastIndexOf=cm,p.lowerCase=jS,p.lowerFirst=YS,p.lt=oS,p.lte=lS,p.max=Gy,p.maxBy=Qy,p.mean=qy,p.meanBy=zy,p.min=Ky,p.minBy=jy,p.stubArray=ml,p.stubFalse=wl,p.stubObject=Uy,p.stubString=Dy,p.stubTrue=My,p.multiply=Yy,p.nth=fm,p.noConflict=Ry,p.noop=_l,p.now=pa,p.pad=JS,p.padEnd=XS,p.padStart=ZS,p.parseInt=ey,p.random=BS,p.reduce=gw,p.reduceRight=pw,p.repeat=ty,p.replace=ny,p.result=OS,p.round=Jy,p.runInContext=C,p.sample=_w,p.size=Sw,p.snakeCase=ry,p.some=yw,p.sortedIndex=mm,p.sortedIndexBy=wm,p.sortedIndexOf=Sm,p.sortedLastIndex=ym,p.sortedLastIndexBy=Em,p.sortedLastIndexOf=Cm,p.startCase=sy,p.startsWith=ay,p.subtract=Xy,p.sum=Zy,p.sumBy=eE,p.template=oy,p.times=$y,p.toFinite=Un,p.toInteger=re,p.toLength=Qf,p.toLower=ly,p.toNumber=kt,p.toSafeInteger=uS,p.toString=Se,p.toUpper=uy,p.trim=cy,p.trimEnd=fy,p.trimStart=hy,p.truncate=dy,p.unescape=gy,p.uniqueId=Fy,p.upperCase=py,p.upperFirst=dl,p.each=Lf,p.eachRight=Nf,p.first=Af,vl(p,(function(){var e={};return gn(p,function(i,a){we.call(p.prototype,a)||(e[a]=i)}),e})(),{chain:!1}),p.VERSION=s,Et(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){p[e].placeholder=p}),Et(["drop","take"],function(e,i){ce.prototype[e]=function(a){a=a===n?1:Ve(re(a),0);var c=this.__filtered__&&!i?new ce(this):this.clone();return c.__filtered__?c.__takeCount__=Xe(a,c.__takeCount__):c.__views__.push({size:Xe(a,Ae),type:e+(c.__dir__<0?"Right":"")}),c},ce.prototype[e+"Right"]=function(a){return this.reverse()[e](a).reverse()}}),Et(["filter","map","takeWhile"],function(e,i){var a=i+1,c=a==Bn||a==mt;ce.prototype[e]=function(d){var v=this.clone();return v.__iteratees__.push({iteratee:z(d,3),type:a}),v.__filtered__=v.__filtered__||c,v}}),Et(["head","last"],function(e,i){var a="take"+(i?"Right":"");ce.prototype[e]=function(){return this[a](1).value()[0]}}),Et(["initial","tail"],function(e,i){var a="drop"+(i?"":"Right");ce.prototype[e]=function(){return this.__filtered__?new ce(this):this[a](1)}}),ce.prototype.compact=function(){return this.filter(dt)},ce.prototype.find=function(e){return this.filter(e).head()},ce.prototype.findLast=function(e){return this.reverse().find(e)},ce.prototype.invokeMap=se(function(e,i){return typeof e=="function"?new ce(this):this.map(function(a){return Xi(a,e,i)})}),ce.prototype.reject=function(e){return this.filter(_a(z(e)))},ce.prototype.slice=function(e,i){e=re(e);var a=this;return a.__filtered__&&(e>0||i<0)?new ce(a):(e<0?a=a.takeRight(-e):e&&(a=a.drop(e)),i!==n&&(i=re(i),a=i<0?a.dropRight(-i):a.take(i-e)),a)},ce.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ce.prototype.toArray=function(){return this.take(Ae)},gn(ce.prototype,function(e,i){var a=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),d=p[c?"take"+(i=="last"?"Right":""):i],v=c||/^find/.test(i);d&&(p.prototype[i]=function(){var S=this.__wrapped__,y=c?[1]:arguments,b=S instanceof ce,x=y[0],L=b||J(S),O=function(le){var he=d.apply(p,Qn([le],y));return c&&k?he[0]:he};L&&a&&typeof x=="function"&&x.length!=1&&(b=L=!1);var k=this.__chain__,B=!!this.__actions__.length,K=v&&!k,ie=b&&!B;if(!v&&L){S=ie?S:new ce(this);var Q=e.apply(S,y);return Q.__actions__.push({func:da,args:[O],thisArg:n}),new Ut(Q,k)}return K&&ie?e.apply(this,y):(Q=this.thru(O),K?c?Q.value()[0]:Q.value():Q)})}),Et(["pop","push","shift","sort","splice","unshift"],function(e){var i=Fs[e],a=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);p.prototype[e]=function(){var d=arguments;if(c&&!this.__chain__){var v=this.value();return i.apply(J(v)?v:[],d)}return this[a](function(S){return i.apply(J(S)?S:[],d)})}}),gn(ce.prototype,function(e,i){var a=p[i];if(a){var c=a.name+"";we.call(ii,c)||(ii[c]=[]),ii[c].push({name:i,func:a})}}),ii[aa(n,H).name]=[{name:"wrapper",func:n}],ce.prototype.clone=pv,ce.prototype.reverse=vv,ce.prototype.value=_v,p.prototype.at=qm,p.prototype.chain=zm,p.prototype.commit=Km,p.prototype.next=jm,p.prototype.plant=Jm,p.prototype.reverse=Xm,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Zm,p.prototype.first=p.prototype.head,Qi&&(p.prototype[Qi]=Ym),p}),ti=Kp();yr?((yr.exports=ti)._=ti,go._=ti):ze._=ti}).call(nE)})(ss,ss.exports)),ss.exports}var Ol=rE();const M={getRandomId:()=>window.crypto.getRandomValues(new Uint32Array(1))[0],isPromise:r=>r&&M.isFunction(r.then),isFunction:r=>r&&{}.toString.call(r)==="[object Function]",isAsyncFunction:r=>r&&{}.toString.call(r)==="[object AsyncFunction]",isString:r=>typeof r=="string"||r instanceof String,isObject:r=>!!(r&&typeof r=="object"&&!Array.isArray(r)),hasHash:r=>!!(r&&r.search(/^[#\/].*$/)===0),getPathWithoutHash:r=>{for(;M.hasHash(r);)r=r.substring(1,r.length);return r},getTrimmedUrl:r=>{const t=r.length>0?M.getPathWithoutHash(r):r;return M.trimTrailingSlash(t.split("?")[0])},addLeadingSlash:r=>(r.startsWith("/")?"":"/")+r,trimLeadingSlash:r=>M.isString(r)?r.replace(/^\/+/g,""):"",trimTrailingSlash:r=>M.isString(r)?r.replace(/\/+$/,""):"",isElementVisible:r=>r?window.getComputedStyle(r).getPropertyValue("display")!=="none":!1,getNodeList:(r,t=!1)=>{const n=[];return r&&Array.from(document.querySelectorAll(r)).forEach(o=>{t?M.isElementVisible(o)&&n.push(o):n.push(o)}),n},prependOrigin:r=>{if(!r||r.startsWith("http"))return r;const t=r.startsWith("/");return r.length?window.location.origin+(t?"":"/")+r:window.location.origin},getConfigValueFromObject:(r,t)=>{let n=0,s=r;const o=t.split(".");for(;s&&n<o.length;)s=s[o[n++]];return s},getConfigBooleanValue:(r,t)=>{const n=M.getConfigValueFromObject(r,t);return n===!0||n==="true"},getUrlParameter:r=>new URLSearchParams(window.location.search).get(r),removeProperties(r,t){const n={};if(!(t instanceof Array)||!t.length)return console.error("[ERROR] removeProperties requires second parameter: array of keys to remove from object."),r;for(const s in r)if(r.hasOwnProperty(s)){const o=t.filter(u=>s.includes(u)).length===0,l=t.filter(u=>u.endsWith("*")).map(u=>u.slice(0,-1)).filter(u=>s.startsWith(u)).length===0;o&&l&&(n[s]=r[s])}return n},replaceVars(r,t,n,s=!0,o=!1){let l=r;if(t)if(s)l=Ol.replace(l,/{([\s\S]+?)}/g,u=>{let f=u.slice(1,-1).trim();return f.indexOf(n)===0&&(f=f.substring(n.length)),Ol.get(t,f,u)});else{const u=o?" ":"";l=l.replace(/\//g,u+"/")+u,Array.from(Object.entries(t)).sort((f,h)=>h[0].length-f[0].length).forEach(f=>{l=l.replace(new RegExp(this.escapeRegExp(n+f[0]+u),"g"),encodeURIComponent(f[1]))}),l=l.replace(new RegExp(this.escapeRegExp(u),"g"),"")}return s&&(l=l.replace(new RegExp("\\{"+this.escapeRegExp(n)+"[^\\}]+\\}","g"),"")),l},escapeRegExp(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},hasHashOrSlash:r=>!!(r&&r.search(/^[#\/].*$/)===0),getPathWithoutHashOrSlash:r=>{for(;M.hasHashOrSlash(r);)r=r.substring(1,r.length);return r}},Mr={wrapAsPromise:r=>new Promise(t=>{t(r)}),applyFunctionPromisified:(r,t)=>(r=r.apply(void 0,t),M.isPromise(r)?r:Mr.wrapAsPromise(r)),getConfigValueFromObjectAsync:(r,t,...n)=>{const s=M.getConfigValueFromObject(r,t);return M.isFunction(s)?Mr.applyFunctionPromisified(s,n):Mr.wrapAsPromise(s)}};class iE{setErrorMessage(t){this.getLuigi().getEngine()?._connector?.showFatalError(t)}getLuigi(){return window.Luigi}getConfigValue(t){return this.getLuigi().getConfigValue(t)}getConfigValueAsync(t){return this.getLuigi().getConfigValueAsync(t)}async executeConfigFnAsync(t,n=!1,...s){const o=this.getConfigValue(t);if(M.isFunction(o))try{return await Mr.applyFunctionPromisified(o,s)}catch(l){if(n)return Promise.reject(l)}return Promise.resolve(void 0)}}const at=new iE;class sE{constructor(){this._internalStorage={},this._defaultStorage="localStorage",this._authKey="luigi.auth",this._newlyAuthorizedKey="luigi.newlyAuthorized",this._invalidStorageMsg="Configuration Error: Invalid auth.storage value defined. Must be one of localStorage, sessionStorage or none."}reset(){this._storageType=void 0}getStorageKey(){return this._authKey}getStorageType(){return this._storageType||(this._storageType=at.getConfigValue("auth.storage")||this._defaultStorage),this._storageType}getAuthData(){return this._getStore(this.getStorageKey())}setAuthData(t){this._setStore(this.getStorageKey(),t)}removeAuthData(){this._setStore(this.getStorageKey(),void 0)}isNewlyAuthorized(){return!!this._getStore(this._newlyAuthorizedKey)}setNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,!0)}removeNewlyAuthorized(){this._setStore(this._newlyAuthorizedKey,void 0)}_getWebStorage(t){return window[t]}_setStore(t,n){switch(this.getStorageType()){case"localStorage":case"sessionStorage":n!==void 0?this._getWebStorage(this.getStorageType()).setItem(t,JSON.stringify(n)):this._getWebStorage(this.getStorageType()).removeItem(t);break;case"none":this._internalStorage[t]=n;break;default:console.error(this._invalidStorageMsg)}}_getStore(t){try{switch(this.getStorageType()){case"localStorage":case"sessionStorage":return JSON.parse(this._getWebStorage(this.getStorageType()).getItem(t));case"none":return this._internalStorage[t];default:console.error(this._invalidStorageMsg)}}catch{console.warn("Error parsing authorization data. Auto-logout might not work!")}}}const nn=new sE;class aE{isAuthorizationEnabled(){return!!at.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&sr.startAuthorization()}logout(){this.isAuthorizationEnabled()&&sr.logout()}async handleAuthEvent(t,n,s,o){const l=await at.executeConfigFnAsync("auth.events."+t,!1,n,s),u=l===void 0||!!l;if(u&&o){window.location.href=o;return}return u}get store(){return at.getLuigi()?.initialized||console.warn("Luigi Core is not initialized yet. Consider moving your code to the luigiAfterInit lifecycle hook. Documentation: https://docs.luigi-project.io/docs/lifecycle-hooks"),{getStorageKey:()=>nn.getStorageKey(),getStorageType:()=>nn.getStorageType(),getAuthData:()=>nn.getAuthData(),setAuthData:t=>{nn.setAuthData(t),sr.broadcastAuthData(t)},removeAuthData:()=>nn.removeAuthData(),setNewlyAuthorized:()=>{nn.setNewlyAuthorized(),sr.resetExpirationChecks()}}}}const pi=new aE;class oE{getStoredAuthData(){return nn.getAuthData()}isLoggedIn(){const t=this.getStoredAuthData();return!!(t&&t.accessTokenExpirationDate>Number(new Date))}parseUrlAuthErrors(){const t=M.getUrlParameter("error"),n=M.getUrlParameter("errorDescription");if(t)return{error:t,errorDescription:n}}async handleUrlAuthErrors(t,n,s){return n?await pi.handleAuthEvent("onAuthError",t,{error:n,errorDescription:s},t.logoutUrl+"?post_logout_redirect_uri="+t.post_logout_redirect_uri+"&error="+encodeURIComponent(n)+"&errorDescription="+encodeURIComponent(s||"")):!0}}const rr=new oE;typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");let $i=!1;$i=!0;const Ai={},Ge=Symbol(),lE=Symbol("filename"),Bh="http://www.w3.org/1999/xhtml",uE="production";var F=!uE.toLowerCase().startsWith("prod"),cE=Array.isArray,fE=Array.prototype.indexOf,Br=Array.prototype.includes,hE=Array.from,$a=Object.keys,un=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,Gh=Object.getOwnPropertyDescriptors,dE=Object.prototype,gE=Array.prototype,Xl=Object.getPrototypeOf,ah=Object.isExtensible;const pE=()=>{};function vE(r){return r()}function Ul(r){for(var t=0;t<r.length;t++)r[t]()}function Qh(){var r,t;return{promise:new Promise((n,s)=>{r=n,t=s}),resolve:r,reject:t}}const bs=16,Rs=32,Zl=64,Bt=512,He=1024,ot=2048,En=4096,Gr=8192,Pi=16384,vr=32768,Dl=1<<25,vs=65536,eu=1<<17,qh=1<<19,ka=65536,_s=1<<21,_E=1<<22,ar=1<<23,mn=Symbol("$state"),zh=Symbol("legacy props"),mE=Symbol(""),Kh=Symbol("proxy path"),jh=Symbol("attributes"),Ml=Symbol("class"),wE=Symbol("style"),SE=Symbol("text"),yE=Symbol("hmr anchor"),za=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},EE=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Yh(r){if(F){const t=new Error(`lifecycle_outside_component
21
+ \`${r}(...)\` can only be used during component initialisation
22
+ https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var lr="font-weight: bold",ur="font-weight: normal";function Ka(r){F?console.warn(`%c[svelte] hydration_mismatch
23
+ %cHydration failed because the initial UI does not match what was rendered on the server
24
+ https://svelte.dev/e/hydration_mismatch`,lr,ur):console.warn("https://svelte.dev/e/hydration_mismatch")}function Sl(r){F?console.warn(`%c[svelte] state_proxy_equality_mismatch
25
+ %cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${r}\` will produce unexpected results
26
+ https://svelte.dev/e/state_proxy_equality_mismatch`,lr,ur):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}let Ee,Ue=!1;function vi(r){Ue=r}function wn(r){if(r===null)throw Ka(),Ai;return Ee=r}function tu(){return wn(Wn(Ee))}function Jh(r=!0){for(var t=0,n=Ee;;){if(n.nodeType===8){var s=n.data;if(s==="]"){if(t===0)return n;t-=1}else(s==="["||s==="[!"||s[0]==="["&&!isNaN(Number(s.slice(1))))&&(t+=1)}var o=Wn(n);r&&n.remove(),n=o}}function Xh(r){return r===this.v}function Zh(r){return t=r,n=this.v,!(t!=t?n==n:t!==n||t!==null&&typeof t=="object"||typeof t=="function");var t,n}function vn(r,t){return r.label=t,ed(r.v,t),r}function ed(r,t){return r?.[Kh]?.(t),r}function td(r){const t=new Error,n=(function(){const s=Error.stackTraceLimit;Error.stackTraceLimit=1/0;const o=new Error().stack;if(Error.stackTraceLimit=s,!o)return[];const l=o.split(`
27
+ `),u=[];for(let f=0;f<l.length;f++){const h=l[f],g=h.replaceAll("\\","/");if(h.trim()!=="Error"){if(h.includes("validate_each_keys"))return[];g.includes("svelte/src/internal")||g.includes("node_modules/.vite")||u.push(h)}}return u})();return n.length===0?null:(n.unshift(`
28
+ `),un(t,"stack",{value:n.join(`
29
+ `)}),un(t,"name",{value:r}),t)}function CE(r,t){if(!F)throw new Error("invariant(...) was not guarded by if (DEV)");r||(function(n){if(F){const s=new Error(`invariant_violation
30
+ An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${n}"
31
+ https://svelte.dev/e/invariant_violation`);throw s.name="Svelte error",s}throw new Error("https://svelte.dev/e/invariant_violation")})(t)}let Te=null;function Ii(r){Te=r}let ms=null;function Fa(r){ms=r}let As=null;function oh(r){As=r}function nu(r,t=!1,n){Te={p:Te,i:!1,c:null,e:null,s:r,x:null,r:te,l:$i&&!t?{s:null,u:null,$:[]}:null},F&&(Te.function=n,As=n)}function ru(r){var t=Te,n=t.e;if(n!==null)for(var s of(t.e=null,n))Ed(s);return r!==void 0&&(t.x=r),t.i=!0,Te=t.p,F&&(As=Te?.function??null),r??{}}function Ps(){return!$i||Te!==null&&Te.l===null}let Or=[];function nd(){var r=Or;Or=[],Ul(r)}function _i(r){if(Or.length===0&&!ls){var t=Or;queueMicrotask(()=>{t===Or&&nd()})}Or.push(r)}function TE(){for(;Or.length>0;)nd()}const $l=new WeakMap;function rd(r){var t=te;if(t===null)return ge.f|=ar,r;if(F&&r instanceof Error&&!$l.has(r)&&$l.set(r,(function(n,s){const o=Fn(n,"message");if(!(o&&!o.configurable)){for(var l=cu?" ":" ",u=`
32
+ ${l}in ${s.fn?.name||"<unknown>"}`,f=s.ctx;f!==null;)u+=`
33
+ ${l}in ${f.function?.[lE].split("/").pop()}`,f=f.p;return{message:n.message+`
34
+ ${u}
35
+ `,stack:n.stack?.split(`
36
+ `).filter(h=>!h.includes("svelte/src/internal")).join(`
37
+ `)}}})(r,t)),(t.f&vr)===0&&!(4&t.f))throw F&&!t.parent&&r instanceof Error&&id(r),r;ir(r,t)}function ir(r,t){for(;t!==null;){if(128&t.f){if((t.f&vr)===0)throw r;try{return void t.b.error(r)}catch(n){r=n}}t=t.parent}throw F&&r instanceof Error&&id(r),r}function id(r){const t=$l.get(r);t&&(un(r,"message",{value:t.message}),un(r,"stack",{value:t.stack}))}const bE=-7169;function Oe(r,t){r.f=r.f&bE|t}function iu(r){(r.f&Bt)!==0||r.deps===null?Oe(r,He):Oe(r,En)}function sd(r){if(r!==null)for(const t of r)2&t.f&&(t.f&ka)!==0&&(t.f^=ka,sd(t.deps))}function ad(r,t,n){(r.f&ot)!==0?t.add(r):(r.f&En)!==0&&n.add(r),sd(r.deps),Oe(r,He)}let ya=!1,yl=null,fi=null,fe=null,kl=null,rn=null,El=null,ls=!1,Cl=!1,mi=null,xa=null;var lh=0,Tl=new Set;let RE=1;class Hn{id=RE++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#l=new Set;#i=new Set;#o=new Set;#s=0;#r=new Map;#h=null;#a=[];#g=[];#d=new Set;#c=new Set;#f=new Map;#u=new Set;is_fork=!1;#_=!1;#E(){if(this.is_fork)return!0;for(const s of this.#r.keys()){for(var t=s,n=!1;t.parent!==null;){if(this.#f.has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#u.delete(t)}unskip_effect(t,n=s=>this.schedule(s)){var s=this.#f.get(t);if(s){for(var o of(this.#f.delete(t),s.d))Oe(o,ot),n(o);for(o of s.m)Oe(o,En),n(o)}this.#u.add(t)}#v(){if(this.#e=!0,lh++>1e3&&(this.#S(),(function(){if(F){var h=new Map;for(const _ of fe.current.keys())for(const[m,w]of _.updated??[]){var g=h.get(m);g||(g={error:w.error,count:0},h.set(m,g)),g.count+=w.count}for(const _ of h.values())_.error&&console.error(_.error)}try{(function(){if(F){const _=new Error(`effect_update_depth_exceeded
38
+ Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
39
+ https://svelte.dev/e/effect_update_depth_exceeded`);throw _.name="Svelte error",_}throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")})()}catch(_){F&&un(_,"stack",{value:""}),ir(_,El)}})()),F)for(const h of this.current.keys())Tl.add(h);if(!this.#E()){for(const h of this.#d)this.#c.delete(h),Oe(h,ot),this.schedule(h);for(const h of this.#c)Oe(h,En),this.schedule(h)}const t=this.#a;this.#a=[],this.apply();var n=mi=[],s=[],o=xa=[];for(const h of t)try{this.#C(h,n,s)}catch(g){throw ud(h),g}if(fe=null,o.length>0){var l=Hn.ensure();for(const h of o)l.schedule(h)}if(mi=null,xa=null,this.#E()){this.#p(s),this.#p(n);for(const[h,g]of this.#f)ld(h,g);return void(o.length>0&&fe.#v())}const u=this.#y();if(u)u.#m(this);else{this.#d.clear(),this.#c.clear();for(const h of this.#l)h(this);this.#l.clear(),kl=this,uh(s),uh(n),kl=null,this.#h?.resolve();var f=fe;if(this.linked&&this.#s===0&&this.#S(),this.#a.length>0){f===null&&(f=this,this.#w());const h=f;h.#a.push(...this.#a.filter(g=>!h.#a.includes(g)))}f!==null&&f.#v()}}#C(t,n,s){t.f^=He;for(var o=t.first;o!==null;){var l=o.f,u=!!(96&l);if(!(u&&(l&He)!==0||(l&Gr)!==0||this.#f.has(o))&&o.fn!==null){u?o.f^=He:4&l?n.push(o):ki(o)&&((l&bs)!==0&&this.#c.add(o),Qr(o));var f=o.first;if(f!==null){o=f;continue}}for(;o!==null;){var h=o.next;if(h!==null){o=h;break}o=o.parent}}}#y(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[n,[,s]]of this.current)if(t.current.has(n)&&!s)return t}t=t.#n}return null}#m(t){for(const[s,o]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,o);for(const[s,o]of t.async_deriveds){const l=this.async_deriveds.get(s);l&&o.promise.then(l.resolve)}const n=s=>{var o=s.reactions;if(o!==null)for(const f of o){var l=f.f;if(2&l)n(f);else{var u=f;4194320&l&&!this.async_deriveds.has(u)&&(this.#c.delete(u),Oe(u,ot),this.schedule(u))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),t.#S(),fe=this,this.#v()}#p(t){for(var n=0;n<t.length;n+=1)ad(t[n],this.#d,this.#c)}capture(t,n,s=!1){t.v===Ge||this.previous.has(t)||this.previous.set(t,t.v),(t.f&ar)===0&&(this.current.set(t,[n,s]),rn?.set(t,n)),this.is_fork||(t.v=n)}activate(){fe=this}deactivate(){fe=null,rn=null}flush(){try{F&&Tl.clear(),Cl=!0,fe=this,this.#v()}finally{if(lh=0,El=null,mi=null,xa=null,Cl=!1,fe=null,rn=null,$r.clear(),F)for(const t of Tl)t.updated=null}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#o.clear(),this.#S()}register_created_effect(t){this.#g.push(t)}#T(){this.#S();for(let _=yl;_!==null;_=_.#t){var t=_.id<this.id,n=[];for(const[m,[w,E]]of this.current){if(_.current.has(m)){var s=_.current.get(m)[0];if(!t||w===s)continue;_.current.set(m,[w,E])}n.push(m)}if(t)for(const[m,w]of this.async_deriveds){const E=_.async_deriveds.get(m);E&&w.promise.then(E.resolve)}if(_.#e){var o=[..._.current.keys()].filter(m=>!this.current.has(m));if(o.length===0)t&&_.discard();else if(n.length>0){if(F&&CE(_.#a.length===0,"Batch has scheduled roots"),t)for(const m of this.#u)_.unskip_effect(m,w=>{4194320&w.f?_.schedule(w):_.#p([w])});_.activate();var l=new Set,u=new Map;for(var f of n)od(f,o,l,u);u=new Map;var h=[..._.current.keys()].filter(m=>!this.current.has(m)||this.current.get(m)[0]!==m.v);if(h.length>0)for(const m of this.#g)155648&m.f||!su(m,h,u)||(4194320&m.f?(Oe(m,ot),_.schedule(m)):_.#d.add(m));if(_.#a.length>0){for(var g of(_.apply(),_.#a))_.#C(g,[],[]);_.#a=[]}_.deactivate()}}}}increment(t,n){if(this.#s+=1,t){let s=this.#r.get(n)??0;this.#r.set(n,s+1)}}decrement(t,n){if(this.#s-=1,t){let s=this.#r.get(n)??0;s===1?this.#r.delete(n):this.#r.set(n,s-1)}this.#_||(this.#_=!0,_i(()=>{this.#_=!1,this.linked&&this.flush()}))}transfer_effects(t,n){for(const s of t)this.#d.add(s);for(const s of n)this.#c.add(s);t.clear(),n.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#i.add(t)}on_fork_commit(t){this.#o.add(t)}run_fork_commit_callbacks(){for(const t of this.#o)t(this);this.#o.clear()}settled(){return(this.#h??=Qh()).promise}static ensure(){if(fe===null){const t=fe=new Hn;t.#w(),Cl||ls||_i(()=>{t.#e||t.flush()})}return fe}apply(){rn=null}schedule(t){if(El=t,t.b?.is_pending&&16777228&t.f&&(t.f&vr)===0)t.b.defer_effect(t);else{for(var n=t;n.parent!==null;){var s=(n=n.parent).f;if(!(mi===null||n!==te||ge!==null&&2&ge.f))return;if(96&s){if((s&He)===0)return;n.f^=He}}this.#a.push(n)}}#w(){fi===null?yl=fi=this:(fi.#t=this,this.#n=fi),fi=this}#S(){var t=this.#n,n=this.#t;t===null?yl=n:t.#t=n,n===null?fi=t:n.#n=t,this.linked=!1}}function X(r){var t=ls;ls=!0;try{var n;for(r&&(fe===null||fe.is_fork||fe.flush(),n=r());;){if(TE(),fe===null)return n;fe.flush()}}finally{ls=t}}let Mn=null;function uh(r){var t=r.length;if(t!==0){for(var n=0;n<t;){var s=r[n++];if(!(24576&s.f)&&ki(s)&&(Mn=new Set,Qr(s),s.deps===null&&s.first===null&&s.nodes===null&&s.teardown===null&&s.ac===null&&Rd(s),Mn?.size>0)){$r.clear();for(const o of Mn){if(24576&o.f)continue;const l=[o];let u=o.parent;for(;u!==null;)Mn.has(u)&&(Mn.delete(u),l.push(u)),u=u.parent;for(let f=l.length-1;f>=0;f--){const h=l[f];24576&h.f||Qr(h)}}Mn.clear()}}Mn=null}}function od(r,t,n,s){if(!n.has(r)&&(n.add(r),r.reactions!==null))for(const o of r.reactions){const l=o.f;2&l?od(o,t,n,s):4194320&l&&(l&ot)===0&&su(o,t,s)&&(Oe(o,ot),au(o))}}function su(r,t,n){const s=n.get(r);if(s!==void 0)return s;if(r.deps!==null)for(const o of r.deps){if(Br.call(t,o))return!0;if(2&o.f&&su(o,t,n))return n.set(o,!0),!0}return n.set(r,!1),!1}function au(r){fe.schedule(r)}function ld(r,t){if((r.f&Rs)===0||(r.f&He)===0){(r.f&ot)!==0?t.d.push(r):(r.f&En)!==0&&t.m.push(r),Oe(r,He);for(var n=r.first;n!==null;)ld(n,t),n=n.next}}function ud(r){Oe(r,He);for(var t=r.first;t!==null;)ud(t),t=t.next}class AE{parent;is_pending=!1;transform_error;#e;#n=Ue?Ee:null;#t;#l;#i;#o=null;#s=null;#r=null;#h=null;#a=0;#g=0;#d=!1;#c=new Set;#f=new Set;#u=null;#_=(function(t){let n,s=0,o=ws(0);return F&&vn(o,"createSubscriber version"),()=>{hu()&&(q(o),Ss(()=>(s===0&&(n=kn(()=>t(()=>us(o)))),s+=1,()=>{_i(()=>{s-=1,s===0&&(n?.(),n=void 0,us(o))})})))}})(()=>(this.#u=ws(this.#a),F&&vn(this.#u,"$effect.pending()"),()=>{this.#u=null}));constructor(t,n,s,o){this.#e=t,this.#t=n,this.#l=l=>{var u=te;u.b=this,u.f|=128,s(l)},this.parent=te.b,this.transform_error=o??this.parent?.transform_error??(l=>l),this.#i=Td(()=>{if(Ue){const l=this.#n;tu();const u=l.data==="[!";if(l.data.startsWith("[?")){const f=JSON.parse(l.data.slice(2));this.#v(f)}else u?this.#C():this.#E()}else this.#y()},589824),Ue&&(this.#e=Ee)}#E(){try{this.#o=tr(()=>this.#l(this.#e))}catch(t){this.error(t)}}#v(t){const n=this.#t.failed;n&&(this.#r=tr(()=>{n(this.#e,()=>t,()=>()=>{})}))}#C(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#s=tr(()=>t(this.#e)),_i(()=>{var n=this.#h=document.createDocumentFragment(),s=kr();n.append(s),this.#o=this.#p(()=>tr(()=>this.#l(s))),this.#g===0&&(this.#e.before(n),this.#h=null,cs(this.#s,()=>{this.#s=null}),this.#m(fe))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#g=0,this.#a=0,this.#o=tr(()=>{this.#l(this.#e)}),this.#g>0){var t=this.#h=document.createDocumentFragment();Id(this.#o,t);const n=this.#t.pending;this.#s=tr(()=>n(this.#e))}else this.#m(fe)}catch(n){this.error(n)}}#m(t){this.is_pending=!1,t.transfer_effects(this.#c,this.#f)}defer_effect(t){ad(t,this.#c,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=te,s=ge,o=Te;It(this.#i),zt(this.#i),Ii(this.#i.ctx);try{return Hn.ensure(),t()}catch(l){return rd(l),null}finally{It(n),zt(s),Ii(o)}}#T(t,n){this.has_pending_snippet()?(this.#g+=t,this.#g===0&&(this.#m(n),this.#s&&cs(this.#s,()=>{this.#s=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))):this.parent&&this.parent.#T(t,n)}update_pending_count(t,n){this.#T(t,n),this.#a+=t,this.#u&&!this.#d&&(this.#d=!0,_i(()=>{this.#d=!1,this.#u&&Ha(this.#u,this.#a)}))}get_effect_pending(){return this.#_(),q(this.#u)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;fe?.is_fork?(this.#o&&fe.skip_effect(this.#o),this.#s&&fe.skip_effect(this.#s),this.#r&&fe.skip_effect(this.#r),fe.on_fork_commit(()=>{this.#w(t)})):this.#w(t)}#w(t){this.#o&&(_t(this.#o),this.#o=null),this.#s&&(_t(this.#s),this.#s=null),this.#r&&(_t(this.#r),this.#r=null),Ue&&(wn(this.#n),(function(h=1){if(Ue){for(var g=h,_=Ee;g--;)_=Wn(_);Ee=_}})(),wn(Jh()));var n=this.#t.onerror;let s=this.#t.failed;var o=!1,l=!1;const u=()=>{o?F?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",lr,ur):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(o=!0,l&&(function(){if(F){const h=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw h.name="Svelte error",h}throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")})(),this.#r!==null&&cs(this.#r,()=>{this.#r=null}),this.#p(()=>{this.#y()}))},f=h=>{try{l=!0,n?.(h,u),l=!1}catch(g){ir(g,this.#i&&this.#i.parent)}s&&(this.#r=this.#p(()=>{try{return tr(()=>{var g=te;g.b=this,g.f|=128,s(this.#e,()=>h,()=>u)})}catch(g){return ir(g,this.#i.parent),null}}))};_i(()=>{var h;try{h=this.transform_error(t)}catch(g){return void ir(g,this.#i&&this.#i.parent)}h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(f,g=>ir(g,this.#i&&this.#i.parent)):f(h)})}}function PE(r,t,n,s){const o=Ps()?ou:fd;var l=r.filter(w=>!w.settled);if(n.length!==0||l.length!==0){var u=te,f=(function(){var w=te,E=ge,T=Te,R=fe;if(F)var P=ms;return function(D=!0){It(w),zt(E),Ii(T),D&&(w.f&Pi)===0&&(R?.activate(),R?.apply()),F&&(cd(null),Fa(P))}})(),h=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(w=>w.promise)):null,g=ch();n.length!==0?h?h.then(()=>{f(),m(),Ea()}):m():h.then(()=>_(t.map(o))).finally(g)}else s(t.map(o));function _(w){if((u.f&Pi)===0){f();try{s(w)}catch(E){ir(E,u)}Ea()}}function m(){Promise.all(n.map(w=>(function(E,T,R){let P=te;P===null&&(function(){if(F){const _e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw _e.name="Svelte error",_e}throw new Error("https://svelte.dev/e/async_derived_orphan")})();var D=void 0,H=ws(Ge);F&&(H.label=E.toString());var Z=!ge,de=new Set;return(function(_e){fn(4718592,_e)})(()=>{var _e=te;F&&(Wt={effect:_e,effect_deps:new Set,warned:!1});var pe=Qh();D=pe.promise;try{Promise.resolve(E()).then(pe.resolve,ae=>{ae!==za&&pe.reject(ae)}).finally(Ea)}catch(ae){pe.reject(ae),Ea()}if(F){if(Wt){if(_e.deps!==null)for(let ae=0;ae<gt;ae+=1)Wt.effect_deps.add(_e.deps[ae]);if(je!==null)for(let ae=0;ae<je.length;ae+=1)Wt.effect_deps.add(je[ae])}Wt=null}var oe=fe;if(Z){if((_e.f&vr)!==0)var me=ch();if(P.b.is_rendered())oe.async_deriveds.get(_e)?.reject(Ca);else for(const ae of de.values())ae.reject(Ca);de.add(pe),oe.async_deriveds.set(_e,pe)}const Re=(ae,lt=void 0)=>{F&&(Wt=null),me?.(),de.delete(pe),lt!==Ca&&(oe.activate(),lt?(H.f|=ar,Ha(H,lt)):((H.f&ar)!==0&&(H.f^=ar),Ha(H,ae)),oe.deactivate())};pe.promise.then(Re,ae=>Re(null,ae||"unknown"))}),yd(()=>{for(const _e of de)_e.reject(Ca)}),F&&(H.f|=_E),new Promise(_e=>{function pe(oe){function me(){oe===D?_e(H):pe(D)}oe.then(me,me)}pe(D)})})(w))).then(w=>_([...t.map(o),...w])).catch(w=>ir(w,u)).finally(g)}}function Ea(r=!0){It(null),zt(null),Ii(null),r&&fe?.deactivate(),F&&(cd(null),Fa(null))}function ch(){var r=te,t=r.b,n=fe,s=t.is_rendered();return t.update_pending_count(1,n),n.increment(s,r),()=>{t.update_pending_count(-1,n),n.decrement(s,r)}}let Wt=null;function cd(r){Wt=r}const IE=new Set;function ou(r){return te!==null&&(te.f|=qh),{ctx:Te,deps:null,effects:null,equals:Xh,f:2050,fn:r,reactions:null,rv:0,v:Ge,wv:0,parent:te,ac:null}}const Ca=Symbol("obsolete");function fd(r){const t=ou(r);return t.equals=Zh,t}function fh(r){var t=r.effects;if(t!==null){r.effects=null;for(var n=0;n<t.length;n+=1)_t(t[n])}}let bl=[];function lu(r){var t,n=te,s=r.parent;if(!Vn&&s!==null&&24576&s.f)return F?console.warn(`%c[svelte] derived_inert
40
+ %cReading a derived belonging to a now-destroyed effect may result in stale values
41
+ https://svelte.dev/e/derived_inert`,lr,ur):console.warn("https://svelte.dev/e/derived_inert"),r.v;if(It(s),F){let o=xi;hh(new Set);try{Br.call(bl,r)&&(function(){if(F){const l=new Error(`derived_references_self
42
+ A derived value cannot reference itself recursively
43
+ https://svelte.dev/e/derived_references_self`);throw l.name="Svelte error",l}throw new Error("https://svelte.dev/e/derived_references_self")})(),bl.push(r),r.f&=-65537,fh(r),t=Wl(r)}finally{It(n),hh(o),bl.pop()}}else try{r.f&=-65537,fh(r),t=Wl(r)}finally{It(n)}return t}function hd(r){var t=lu(r);r.equals(t)||(r.wv=Ld(),fe?.is_fork&&r.deps!==null||(fe!==null?(fe.capture(r,t,!0),kl?.capture(r,t,!0)):r.v=t,r.deps!==null))?Vn||(rn!==null?(hu()||fe?.is_fork)&&rn.set(r,t):iu(r)):Oe(r,He)}function dd(r){if(r.effects!==null)for(const t of r.effects)t.teardown&&Qr(t)}let xi=new Set;const $r=new Map;function hh(r){xi=r}let uu=!1;function ws(r,t){var n={f:0,v:r,reactions:null,equals:Xh,rv:0,wv:0};return n}function Zn(r,t){const n=ws(r);var s;return s=n,ge!==null&&(Gt===null?Gt=[s]:Gt.push(s)),n}function wi(r,t=!1,n=!0){const s=ws(r);return t||(s.equals=Zh),$i&&n&&Te!==null&&Te.l!==null&&(Te.l.s??=[]).push(s),s}function as(r,t){return vt(r,kn(()=>q(r))),t}function vt(r,t,n=!1){ge===null||Vt&&(ge.f&eu)===0||!Ps()||!(4325394&ge.f)||Gt!==null&&Br.call(Gt,r)||(function(){if(F){const o=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw o.name="Svelte error",o}throw new Error("https://svelte.dev/e/state_unsafe_mutation")})();let s=n?Si(t):t;return F&&ed(s,r.label),Ha(r,s,xa)}function Ha(r,t,n=null){if(!r.equals(t)){$r.set(r,Vn?t:r.v);var s=Hn.ensure();if(s.capture(r,t),F){if(te!==null){r.updated??=new Map;const o=(r.updated.get("")?.count??0)+1;if(r.updated.set("",{error:null,count:o}),o>5){const l=td("updated at");if(l!==null){let u=r.updated.get(l.stack);u||(u={error:l,count:0},r.updated.set(l.stack,u)),u.count++}}}te!==null&&(r.set_during_effect=!0)}if(2&r.f){const o=r;(r.f&ot)!==0&&lu(o),rn===null&&iu(o)}r.wv=Ld(),pd(r,ot,n),!Ps()||te===null||(te.f&He)===0||96&te.f||(Ft===null?(function(o){Ft=o})([r]):Ft.push(r)),!s.is_fork&&xi.size>0&&!uu&&gd()}return t}function gd(){uu=!1;for(const r of xi){let t;(r.f&He)!==0&&Oe(r,En);try{t=ki(r)}catch{t=!0}t&&Qr(r)}xi.clear()}function us(r){vt(r,r.v+1)}function pd(r,t,n){var s=r.reactions;if(s!==null)for(var o=Ps(),l=s.length,u=0;u<l;u++){var f=s[u],h=f.f;if(o||f!==te){var g=(h&ot)===0;if(g&&Oe(f,t),(h&eu)!==0)xi.add(f);else if(2&h){var _=f;rn?.delete(_),(h&ka)===0&&(h&Bt&&(te===null||(te.f&_s)===0)&&(f.f|=ka),pd(_,En,n))}else if(g){var m=f;(h&bs)!==0&&Mn!==null&&Mn.add(m),n!==null?n.push(m):au(m)}}}}const xE=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Si(r){if(typeof r!="object"||r===null||mn in r)return r;const t=Xl(r);if(t!==dE&&t!==gE)return r;var n=new Map,s=cE(r),o=Zn(0),l=Fr,u=_=>{if(Fr===l)return _();var m=ge,w=Fr;zt(null),_h(l);var E=_();return zt(m),_h(w),E};s&&(n.set("length",Zn(r.length)),F&&(r=new Proxy(r,{get(_,m,w){var E=Reflect.get(_,m,w);return LE.has(m)?function(...T){uu=!0;var R=E.apply(this,T);return gd(),R}:E}})));var f="";let h=!1;function g(_){if(!h){h=!0,vn(o,`${f=_} version`);for(const[m,w]of n)vn(w,xr(f,m));h=!1}}return new Proxy(r,{defineProperty(_,m,w){"value"in w&&w.configurable!==!1&&w.enumerable!==!1&&w.writable!==!1||(function(){if(F){const T=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw T.name="Svelte error",T}throw new Error("https://svelte.dev/e/state_descriptors_fixed")})();var E=n.get(m);return E===void 0?u(()=>{var T=Zn(w.value);return n.set(m,T),F&&typeof m=="string"&&vn(T,xr(f,m)),T}):vt(E,w.value,!0),!0},deleteProperty(_,m){var w=n.get(m);if(w===void 0){if(m in _){const E=u(()=>Zn(Ge));n.set(m,E),us(o),F&&vn(E,xr(f,m))}}else vt(w,Ge),us(o);return!0},get(_,m,w){if(m===mn)return r;if(F&&m===Kh)return g;var E=n.get(m),T=m in _;if(E!==void 0||T&&!Fn(_,m)?.writable||(E=u(()=>{var P=Zn(Si(T?_[m]:Ge));return F&&vn(P,xr(f,m)),P}),n.set(m,E)),E!==void 0){var R=q(E);return R===Ge?void 0:R}return Reflect.get(_,m,w)},getOwnPropertyDescriptor(_,m){var w=Reflect.getOwnPropertyDescriptor(_,m);if(w&&"value"in w){var E=n.get(m);E&&(w.value=q(E))}else if(w===void 0){var T=n.get(m),R=T?.v;if(T!==void 0&&R!==Ge)return{enumerable:!0,configurable:!0,value:R,writable:!0}}return w},has(_,m){if(m===mn)return!0;var w=n.get(m),E=w!==void 0&&w.v!==Ge||Reflect.has(_,m);return(w!==void 0||te!==null&&(!E||Fn(_,m)?.writable))&&(w===void 0&&(w=u(()=>{var T=Zn(E?Si(_[m]):Ge);return F&&vn(T,xr(f,m)),T}),n.set(m,w)),q(w)===Ge)?!1:E},set(_,m,w,E){var T=n.get(m),R=m in _;if(s&&m==="length")for(var P=w;P<T.v;P+=1){var D=n.get(P+"");D!==void 0?vt(D,Ge):P in _&&(D=u(()=>Zn(Ge)),n.set(P+"",D),F&&vn(D,xr(f,P)))}T===void 0?R&&!Fn(_,m)?.writable||(T=u(()=>Zn(void 0)),F&&vn(T,xr(f,m)),vt(T,Si(w)),n.set(m,T)):(R=T.v!==Ge,vt(T,u(()=>Si(w))));var H=Reflect.getOwnPropertyDescriptor(_,m);if(H?.set&&H.set.call(E,w),!R){if(s&&typeof m=="string"){var Z=n.get("length"),de=Number(m);Number.isInteger(de)&&de>=Z.v&&vt(Z,de+1)}us(o)}return!0},ownKeys(_){q(o);var m=Reflect.ownKeys(_).filter(T=>{var R=n.get(T);return R===void 0||R.v!==Ge});for(var[w,E]of n)E.v===Ge||w in _||m.push(w);return m},setPrototypeOf(){(function(){if(F){const _=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw _.name="Svelte error",_}throw new Error("https://svelte.dev/e/state_prototype_fixed")})()}})}function xr(r,t){return typeof t=="symbol"?`${r}[Symbol(${t.description??""})]`:xE.test(t)?`${r}.${t}`:/^\d+$/.test(t)?`${r}[${t}]`:`${r}['${t}']`}function Rl(r){try{if(r!==null&&typeof r=="object"&&mn in r)return r[mn]}catch{}return r}const LE=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);var dh,cu,vd,_d;function Fl(){if(dh===void 0){dh=window,cu=/Firefox/.test(navigator.userAgent);var r=Element.prototype,t=Node.prototype,n=Text.prototype;vd=Fn(t,"firstChild").get,_d=Fn(t,"nextSibling").get,ah(r)&&(r[Ml]=void 0,r[jh]=null,r[wE]=void 0,r.__e=void 0),ah(n)&&(n[SE]=void 0),F&&(r.__svelte_meta=null,(function(){const s=Array.prototype,o=Array.__svelte_cleanup;o&&o();const{indexOf:l,lastIndexOf:u,includes:f}=s;s.indexOf=function(h,g){const _=l.call(this,h,g);if(_===-1){for(let m=g??0;m<this.length;m+=1)if(Rl(this[m])===h){Sl("array.indexOf(...)");break}}return _},s.lastIndexOf=function(h,g){const _=u.call(this,h,g??this.length-1);if(_===-1){for(let m=0;m<=(g??this.length-1);m+=1)if(Rl(this[m])===h){Sl("array.lastIndexOf(...)");break}}return _},s.includes=function(h,g){const _=f.call(this,h,g);if(!_){for(let m=0;m<this.length;m+=1)if(Rl(this[m])===h){Sl("array.includes(...)");break}}return _},Array.__svelte_cleanup=()=>{s.indexOf=l,s.lastIndexOf=u,s.includes=f}})())}}function kr(r=""){return document.createTextNode(r)}function Li(r){return vd.call(r)}function Wn(r){return _d.call(r)}function gh(r,t=!1){if(!Ue){var n=Li(r);return n instanceof Comment&&n.data===""?Wn(n):n}if(t){if(Ee?.nodeType!==3){var s=kr();return Ee?.before(s),wn(s),s}md(Ee)}return Ee}function fu(r,t,n){return document.createElementNS(Bh,r,void 0)}function md(r){if(r.nodeValue.length<65536)return;let t=r.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),r.nodeValue+=t.nodeValue,t=r.nextSibling}function wd(r){var t=ge,n=te;zt(null),It(null);try{return r()}finally{zt(t),It(n)}}function Sd(r){te===null&&(ge===null&&(function(t){if(F){const n=new Error(`effect_orphan
44
+ \`${t}\` can only be used inside an effect (e.g. during component initialisation)
45
+ https://svelte.dev/e/effect_orphan`);throw n.name="Svelte error",n}throw new Error("https://svelte.dev/e/effect_orphan")})(r),(function(){if(F){const t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}throw new Error("https://svelte.dev/e/effect_in_unowned_derived")})()),Vn&&(function(t){if(F){const n=new Error(`effect_in_teardown
46
+ \`${t}\` cannot be used inside an effect cleanup function
47
+ https://svelte.dev/e/effect_in_teardown`);throw n.name="Svelte error",n}throw new Error("https://svelte.dev/e/effect_in_teardown")})(r)}function fn(r,t){var n=te;if(F)for(;n!==null&&(n.f&eu)!==0;)n=n.parent;n!==null&&(n.f&Gr)!==0&&(r|=Gr);var s={ctx:Te,deps:null,nodes:null,f:r|ot|Bt,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F&&(s.component_function=As),fe?.register_created_effect(s);var o=s;if(4&r)mi!==null?mi.push(s):Hn.ensure().schedule(s);else if(t!==null){try{Qr(s)}catch(u){throw _t(s),u}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&qh)===0&&(o=o.first,(r&bs)!==0&&(r&vs)!==0&&o!==null&&(o.f|=vs))}if(o!==null&&(o.parent=n,n!==null&&(function(u,f){var h=f.last;h===null?f.last=f.first=u:(h.next=u,u.prev=h,f.last=u)})(o,n),ge!==null&&2&ge.f&&(r&Zl)===0)){var l=ge;(l.effects??=[]).push(o)}return s}function hu(){return ge!==null&&!Vt}function yd(r){const t=fn(8,null);return Oe(t,He),t.teardown=r,t}function Hl(r){Sd("$effect"),F&&un(r,"name",{value:"$effect"});var t=te.f;if(!(!ge&&(t&Rs)!==0&&(t&vr)===0))return Ed(r);var n=Te;(n.e??=[]).push(r)}function Ed(r){return fn(1048580,r)}function Cd(r){return fn(4,r)}function Ss(r,t=0){return fn(8|t,r)}function ph(r,t=[],n=[],s=[]){PE(s,t,n,o=>{fn(8,()=>r(...o.map(q)))})}function Td(r,t=0){var n=fn(bs|t,r);return F&&(n.dev_stack=ms),n}function tr(r){return fn(524320,r)}function bd(r){var t=r.teardown;if(t!==null){const n=Vn,s=ge;vh(!0),zt(null);try{t.call(null)}finally{vh(n),zt(s)}}}function du(r,t=!1){var n=r.first;for(r.first=r.last=null;n!==null;){const o=n.ac;o!==null&&wd(()=>{o.abort(za)});var s=n.next;(n.f&Zl)!==0?n.parent=null:_t(n,t),n=s}}function _t(r,t=!0){var n=!1;(t||262144&r.f)&&r.nodes!==null&&r.nodes.end!==null&&((function(l,u){for(;l!==null;){var f=l===u?null:Wn(l);l.remove(),l=f}})(r.nodes.start,r.nodes.end),n=!0),Oe(r,Dl),du(r,t&&!n),ys(r,0);var s=r.nodes&&r.nodes.t;if(s!==null)for(const l of s)l.stop();bd(r),r.f^=Dl,r.f|=Pi;var o=r.parent;o!==null&&o.first!==null&&Rd(r),F&&(r.component_function=null),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=r.b=null}function Rd(r){var t=r.parent,n=r.prev,s=r.next;n!==null&&(n.next=s),s!==null&&(s.prev=n),t!==null&&(t.first===r&&(t.first=s),t.last===r&&(t.last=n))}function cs(r,t,n=!0){var s=[];Ad(r,s,!0);var o=()=>{n&&_t(r),t&&t()},l=s.length;if(l>0){var u=()=>--l||o();for(var f of s)f.out(u)}else o()}function Ad(r,t,n){if((r.f&Gr)===0){r.f^=Gr;var s=r.nodes&&r.nodes.t;if(s!==null)for(const u of s)(u.is_global||n)&&t.push(u);for(var o=r.first;o!==null;){var l=o.next;(o.f&Zl)===0&&Ad(o,t,((o.f&vs)!==0||(o.f&Rs)!==0&&(r.f&bs)!==0)&&n),o=l}}}function NE(r){Pd(r,!0)}function Pd(r,t){if((r.f&Gr)!==0){r.f^=Gr,(r.f&He)===0&&(Oe(r,ot),Hn.ensure().schedule(r));for(var n=r.first;n!==null;){var s=n.next;Pd(n,((n.f&vs)!==0||(n.f&Rs)!==0)&&t),n=s}var o=r.nodes&&r.nodes.t;if(o!==null)for(const l of o)(l.is_global||t)&&l.in()}}function Id(r,t){if(r.nodes)for(var n=r.nodes.start,s=r.nodes.end;n!==null;){var o=n===s?null:Wn(n);t.append(n),n=o}}let La=!1,Vn=!1;function vh(r){Vn=r}let ge=null,Vt=!1;function zt(r){ge=r}let te=null;function It(r){te=r}let Gt=null,je=null,gt=0,Ft=null,xd=1,Ur=0,Fr=Ur;function _h(r){Fr=r}function Ld(){return++xd}function ki(r){var t=r.f;if((t&ot)!==0)return!0;if(2&t&&(r.f&=-65537),(t&En)!==0){for(var n=r.deps,s=n.length,o=0;o<s;o++){var l=n[o];if(ki(l)&&hd(l),l.wv>r.wv)return!0}(t&Bt)!==0&&rn===null&&Oe(r,He)}return!1}function Nd(r,t,n=!0){var s=r.reactions;if(s!==null&&(Gt===null||!Br.call(Gt,r)))for(var o=0;o<s.length;o++){var l=s[o];2&l.f?Nd(l,t,!1):t===l&&(n?Oe(l,ot):(l.f&He)!==0&&Oe(l,En),au(l))}}function Wl(r){var t=je,n=gt,s=Ft,o=ge,l=Gt,u=Te,f=Vt,h=Fr,g=r.f;je=null,gt=0,Ft=null,ge=96&g?null:r,Gt=null,Ii(r.ctx),Vt=!1,Fr=++Ur,r.ac!==null&&(wd(()=>{r.ac.abort(za)}),r.ac=null);try{r.f|=_s;var _=(0,r.fn)();r.f|=vr;var m=r.deps,w=fe?.is_fork;if(je!==null){var E;if(w||ys(r,gt),m!==null&&gt>0)for(m.length=gt+je.length,E=0;E<je.length;E++)m[gt+E]=je[E];else r.deps=m=je;if(hu()&&(r.f&Bt)!==0)for(E=gt;E<m.length;E++)(m[E].reactions??=[]).push(r)}else!w&&m!==null&&gt<m.length&&(ys(r,gt),m.length=gt);if(Ps()&&Ft!==null&&!Vt&&m!==null&&!(6146&r.f))for(E=0;E<Ft.length;E++)Nd(Ft[E],r);if(o!==null&&o!==r){if(Ur++,o.deps!==null)for(let T=0;T<n;T+=1)o.deps[T].rv=Ur;if(t!==null)for(const T of t)T.rv=Ur;Ft!==null&&(s===null?s=Ft:s.push(...Ft))}return(r.f&ar)!==0&&(r.f^=ar),_}catch(T){return rd(T)}finally{r.f^=_s,je=t,gt=n,Ft=s,ge=o,Gt=l,Ii(u),Vt=f,Fr=h}}function OE(r,t){let n=t.reactions;if(n!==null){var s=fE.call(n,r);if(s!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[s]=n[o],n.pop())}}if(n===null&&2&t.f&&(je===null||!Br.call(je,t))){var l=t;(l.f&Bt)!==0&&(l.f^=Bt,l.f&=-65537),l.v!==Ge&&iu(l),(function(u){if(u.effects!==null)for(const f of u.effects)(f.teardown||f.ac)&&(f.teardown?.(),f.ac?.abort(za),f.teardown=pE,f.ac=null,ys(f,0),du(f))})(l),ys(l,0)}}function ys(r,t){var n=r.deps;if(n!==null)for(var s=t;s<n.length;s++)OE(r,n[s])}function Qr(r){var t=r.f;if((t&Pi)===0){Oe(r,He);var n=te,s=La;if(te=r,La=!0,F){var o=As;oh(r.component_function);var l=ms;Fa(r.dev_stack??ms)}try{16777232&t?(function(f){for(var h=f.first;h!==null;){var g=h.next;(h.f&Rs)===0&&_t(h),h=g}})(r):du(r),bd(r);var u=Wl(r);r.teardown=typeof u=="function"?u:null,r.wv=xd}finally{La=s,te=n,F&&(oh(o),Fa(l))}}}function q(r){var t,n=!!(2&r.f);if(ge!==null&&!Vt&&!(te!==null&&(te.f&Pi)!==0||Gt!==null&&Br.call(Gt,r))){var s=ge.deps;if((ge.f&_s)!==0)r.rv<Ur&&(r.rv=Ur,je===null&&s!==null&&s[gt]===r?gt++:je===null?je=[r]:je.push(r));else{(ge.deps??=[]).push(r);var o=r.reactions;o===null?r.reactions=[ge]:Br.call(o,ge)||o.push(ge)}}if(F){if(!Vt&&Wt&&!Wt.warned&&(Wt.effect.f&_s)===0&&!Wt.effect_deps.has(r)){Wt.warned=!0,t=r.label,F?console.warn(`%c[svelte] await_reactivity_loss
48
+ %cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\`
49
+ https://svelte.dev/e/await_reactivity_loss`,lr,ur):console.warn("https://svelte.dev/e/await_reactivity_loss");var l=td("traced at");l&&console.warn(l)}IE.delete(r)}if(Vn&&$r.has(r))return $r.get(r);if(n){var u=r;if(Vn){var f=u.v;return((u.f&He)===0&&u.reactions!==null||Ud(u))&&(f=lu(u)),$r.set(u,f),f}var h=(u.f&Bt)===0&&!Vt&&ge!==null&&(La||(ge.f&Bt)!==0),g=(u.f&vr)===0;ki(u)&&(h&&(u.f|=Bt),hd(u)),h&&!g&&(dd(u),Od(u))}if(rn?.has(r))return rn.get(r);if((r.f&ar)!==0)throw r.v;return r.v}function Od(r){if(r.f|=Bt,r.deps!==null)for(const t of r.deps)(t.reactions??=[]).push(r),2&t.f&&(t.f&Bt)===0&&(dd(t),Od(t))}function Ud(r){if(r.v===Ge)return!0;if(r.deps===null)return!1;for(const t of r.deps)if($r.has(t)||2&t.f&&Ud(t))return!0;return!1}function kn(r){var t=Vt;try{return Vt=!0,r()}finally{Vt=t}}function di(r){if(typeof r=="object"&&r&&!(r instanceof EventTarget)){if(mn in r)Vl(r);else if(!Array.isArray(r))for(let t in r){const n=r[t];typeof n=="object"&&n&&mn in n&&Vl(n)}}}function Vl(r,t=new Set){if(!(typeof r!="object"||r===null||r instanceof EventTarget||t.has(r))){t.add(r),r instanceof Date&&r.getTime();for(let s in r)try{Vl(r[s],t)}catch{}const n=Xl(r);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const s=Gh(n);for(let o in s){const l=s[o].get;if(l)try{l.call(r)}catch{}}}}}const Ta=Symbol("events"),UE=new Set,mh=new Set;let wh=null;function Sh(r){var t=this,n=t.ownerDocument,s=r.type,o=r.composedPath?.()||[],l=o[0]||r.target;wh=r;var u=0,f=wh===r&&r[Ta];if(f){var h=o.indexOf(f);if(h!==-1&&(t===document||t===window))return void(r[Ta]=t);var g=o.indexOf(t);if(g===-1)return;h<=g&&(u=h)}if((l=o[u]||r.target)!==t){un(r,"currentTarget",{configurable:!0,get:()=>l||n});var _=ge,m=te;zt(null),It(null);try{for(var w,E=[];l!==null;){var T=l.assignedSlot||l.parentNode||l.host||null;try{var R=l[Ta]?.[s];R==null||l.disabled&&r.target!==l||R.call(l,r)}catch(P){w?E.push(P):w=P}if(r.cancelBubble||T===t||T===null)break;l=T}if(w){for(let P of E)queueMicrotask(()=>{throw P});throw w}}finally{r[Ta]=t,delete r.currentTarget,zt(_),It(m)}}}const DE=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:r=>r});function ME(r){var t=fu("template");return t.innerHTML=(function(n){return DE?.createHTML(n)??n})(r.replaceAll("<!>","<!---->")),t.content}function bi(r,t){var n=te;n.nodes===null&&(n.nodes={start:r,end:t,a:null,t:null})}function gu(r,t){var n,s=!!(1&t),o=!!(2&t),l=!r.startsWith("<!>");return()=>{if(Ue)return bi(Ee,null),Ee;n===void 0&&(n=ME(l?r:"<!>"+r),s||(n=Li(n)));var u=o||cu?document.importNode(n,!0):n.cloneNode(!0);return s?bi(Li(u),u.lastChild):bi(u,u),u}}function fs(r,t){if(Ue){var n=te;return(n.f&vr)!==0&&n.nodes.end!==null||(n.nodes.end=Ee),void tu()}r!==null&&r.before(t)}const $E=["touchstart","touchmove"];function kE(r){return $E.includes(r)}function Dd(r,t){return Md(r,t)}function FE(r,t){Fl(),t.intro=t.intro??!1;const n=t.target,s=Ue,o=Ee;try{for(var l=Li(n);l&&(l.nodeType!==8||l.data!=="[");)l=Wn(l);if(!l)throw Ai;vi(!0),wn(l);const u=Md(r,{...t,anchor:l});return vi(!1),u}catch(u){if(u instanceof Error&&u.message.split(`
50
+ `).some(f=>f.startsWith("https://svelte.dev/e/")))throw u;return u!==Ai&&console.warn("Failed to hydrate: ",u),t.recover===!1&&(function(){if(F){const f=new Error(`hydration_failed
51
+ Failed to hydrate the application
52
+ https://svelte.dev/e/hydration_failed`);throw f.name="Svelte error",f}throw new Error("https://svelte.dev/e/hydration_failed")})(),Fl(),n.textContent="",vi(!1),Dd(r,t)}finally{vi(s),wn(o)}}const ba=new Map;function Md(r,{target:t,anchor:n,props:s={},events:o,context:l,intro:u=!0,transformError:f}){Fl();var h=void 0,g=(function(_){Hn.ensure();const m=fn(524352,_);return(w={})=>new Promise(E=>{w.outro?cs(m,()=>{_t(m),E(void 0)}):(_t(m),E(void 0))})})(()=>{var _=n??t.appendChild(kr());(function(E,T,R,P){new AE(E,T,R,P)})(_,{pending:()=>{}},E=>{if(nu({}),l&&(Te.c=l),o&&(s.$$events=o),Ue&&bi(E,null),h=r(E,s)||{},Ue&&(te.nodes.end=Ee,Ee===null||Ee.nodeType!==8||Ee.data!=="]"))throw Ka(),Ai;ru()},f);var m=new Set,w=E=>{for(var T=0;T<E.length;T++){var R=E[T];if(!m.has(R)){m.add(R);var P=kE(R);for(const Z of[t,document]){var D=ba.get(Z);D===void 0&&(D=new Map,ba.set(Z,D));var H=D.get(R);H===void 0?(Z.addEventListener(R,Sh,{passive:P}),D.set(R,1)):D.set(R,H+1)}}}};return w(hE(UE)),mh.add(w),()=>{for(var E of m)for(const P of[t,document]){var T=ba.get(P),R=T.get(E);--R==0?(P.removeEventListener(E,Sh),T.delete(E),T.size===0&&ba.delete(P)):T.set(E,R)}mh.delete(w),_!==n&&_.parentNode?.removeChild(_)}});return Bl.set(h,g),h}let Bl=new WeakMap;function HE(r,t){const n=Bl.get(r);return n?(Bl.delete(r),n(t)):(F&&(mn in r?F?console.warn(`%c[svelte] state_proxy_unmount
53
+ %cTried to unmount a state proxy, rather than a component
54
+ https://svelte.dev/e/state_proxy_unmount`,lr,ur):console.warn("https://svelte.dev/e/state_proxy_unmount"):F?console.warn(`%c[svelte] lifecycle_double_unmount
55
+ %cTried to unmount a component that was not mounted
56
+ https://svelte.dev/e/lifecycle_double_unmount`,lr,ur):console.warn("https://svelte.dev/e/lifecycle_double_unmount")),Promise.resolve())}class WE{anchor;#e=new Map;#n=new Map;#t=new Map;#l=new Set;#i=!0;constructor(t,n=!0){this.anchor=t,this.#i=n}#o=t=>{if(this.#e.has(t)){var n=this.#e.get(t),s=this.#n.get(n);if(s)NE(s),this.#l.delete(n);else{var o=this.#t.get(n);o&&(this.#n.set(n,o.effect),this.#t.delete(n),F&&(o.fragment.lastChild[yE]=this.anchor),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),s=o.effect)}for(const[l,u]of this.#e){if(this.#e.delete(l),l===t)break;const f=this.#t.get(u);f&&(_t(f.effect),this.#t.delete(u))}for(const[l,u]of this.#n){if(l===n||this.#l.has(l))continue;const f=()=>{if(Array.from(this.#e.values()).includes(l)){var h=document.createDocumentFragment();Id(u,h),h.append(kr()),this.#t.set(l,{effect:u,fragment:h})}else _t(u);this.#l.delete(l),this.#n.delete(l)};this.#i||!s?(this.#l.add(l),cs(u,f,!1)):f()}}};#s=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[s,o]of this.#t)n.includes(s)||(_t(o.effect),this.#t.delete(s))};ensure(t,n){var s=fe;!n||this.#n.has(t)||this.#t.has(t)||this.#n.set(t,tr(()=>n(this.anchor))),this.#e.set(s,t),Ue&&(this.anchor=Ee),this.#o(s)}}if(F){let r=function(t){if(!(t in globalThis)){let n;Object.defineProperty(globalThis,t,{configurable:!0,get:()=>{if(n!==void 0)return n;(function(s){if(F){const o=new Error(`rune_outside_svelte
57
+ The \`${s}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
58
+ https://svelte.dev/e/rune_outside_svelte`);throw o.name="Svelte error",o}throw new Error("https://svelte.dev/e/rune_outside_svelte")})(t)},set:s=>{n=s}})}};r("$state"),r("$effect"),r("$derived"),r("$inspect"),r("$props"),r("$bindable")}function Gl(r){var t,n;Te===null&&Yh("onMount"),$i&&Te.l!==null?(t=Te,n=t.l,n.u??={a:[],b:[],m:[]}).m.push(r):Hl(()=>{const s=kn(r);if(typeof s=="function")return s})}var yh=new Map;function Eh(r,t,n=!1){var s;Ue&&(s=Ee,tu());var o=new WE(r);function l(u,f){if(Ue){var h=(function(_){if(!_||_.nodeType!==8)throw Ka(),Ai;return _.data})(s);if(u!==parseInt(h.substring(1))){var g=Jh();return wn(g),o.anchor=g,vi(!1),o.ensure(u,f),void vi(!0)}}o.ensure(u,f)}Td(()=>{var u=!1;t((f,h=0)=>{u=!0,l(h,f)}),u||l(-1,null)},n?vs:0)}function VE(r,t){Cd(()=>{var n=r.getRootNode(),s=n.host?n:n.head??n.ownerDocument.head;if(!s.querySelector("#"+t.hash)){const o=fu("style");o.id=t.hash,o.textContent=t.code,s.appendChild(o),F&&(function(l,u){var f=yh.get(l);f||(f=new Set,yh.set(l,f)),f.add(u)})(t.hash,o)}})}function $d(r){var t,n,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(t=0;t<o;t++)r[t]&&(n=$d(r[t]))&&(s&&(s+=" "),s+=n)}else for(n in r)r[n]&&(s&&(s+=" "),s+=n);return s}function BE(r){return typeof r=="object"?(function(){for(var t,n,s=0,o="",l=arguments.length;s<l;s++)(t=arguments[s])&&(n=$d(t))&&(o&&(o+=" "),o+=n);return o})(r):r??""}function GE(r,t,n,s,o,l){var u=r[Ml];if(Ue||u!==n||u===void 0){var f=(function(h,g,_){var m=h==null?"":""+h;return m===""?null:m})(n);Ue&&f===r.getAttribute("class")||(f==null?r.removeAttribute("class"):r.className=f),r[Ml]=n}return l}const QE=Symbol("is custom element"),qE=Symbol("is html"),zE=EE?"link":"LINK";function Ra(r,t,n,s){var o=(function(l){return l[jh]??={[QE]:l.nodeName.includes("-"),[qE]:l.namespaceURI===Bh}})(r);Ue&&(o[t]=r.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&r.nodeName===zE)?(function(l,u,f){F&&(u==="srcset"&&(function(h,g){var _=Th(h.srcset),m=Th(g);return m.length===_.length&&m.every(([w,E],T)=>E===_[T][1]&&(Al(_[T][0],w)||Al(w,_[T][0])))})(l,f)||Al(l.getAttribute(u)??"",f)||(function(h,g,_){F?console.warn(`%c[svelte] hydration_attribute_changed
59
+ %cThe \`${h}\` attribute on \`${g}\` changed its value between server and client renders. The client value, \`${_}\`, will be ignored in favour of the server value
60
+ https://svelte.dev/e/hydration_attribute_changed`,lr,ur):console.warn("https://svelte.dev/e/hydration_attribute_changed")})(u,l.outerHTML.replace(l.innerHTML,l.innerHTML&&"..."),String(f)))})(r,t,n??""):o[t]!==(o[t]=n)&&(t==="loading"&&(r[mE]=n),n==null?r.removeAttribute(t):typeof n!="string"&&(function(l){var u,f=l.getAttribute("is")||l.nodeName,h=Ch.get(f);if(h)return h;Ch.set(f,h=[]);for(var g=l,_=Element.prototype;_!==g;){for(var m in u=Gh(g))u[m].set&&m!=="innerHTML"&&m!=="textContent"&&m!=="innerText"&&h.push(m);g=Xl(g)}return h})(r).includes(t)?r[t]=n:r.setAttribute(t,n))}var Ch=new Map;function Al(r,t){return r===t||new URL(r,document.baseURI).href===new URL(t,document.baseURI).href}function Th(r){return r.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function kd(r,t,n){var s=Fn(r,t);s&&s.set&&(r[t]=n,yd(()=>{r[t]=null}))}function Pl(r,t){return r===t||r?.[mn]===t}function Ql(r={},t,n,s){var o=Te.r,l=te;return Cd(()=>{var u,f;return Ss(()=>{u=f,f=[],kn(()=>{Pl(n(...f),r)||(t(r,...f),u&&Pl(n(...u),r)&&t(null,...u))})}),()=>{let h=l;for(;h!==o&&h.parent!==null&&h.parent.f&Dl;)h=h.parent;const g=h.teardown;h.teardown=()=>{f&&Pl(n(...f),r)&&t(null,...f),g?.()}}}),r}function Fd(r=!1){const t=Te,n=t.l.u;if(!n)return;let s=()=>di(t.s);if(r){let l=0,u={};const f=ou(()=>{let h=!1;const g=t.s;for(const _ in g)g[_]!==u[_]&&(u[_]=g[_],h=!0);return h&&l++,l});s=()=>q(f)}var o;n.b.length&&(o=()=>{bh(t,s),Ul(n.b)},Sd("$effect.pre"),F&&un(o,"name",{value:"$effect.pre"}),fn(1048584,o)),Hl(()=>{const l=kn(()=>n.m.map(vE));return()=>{for(const u of l)typeof u=="function"&&u()}}),n.a.length&&Hl(()=>{bh(t,s),Ul(n.a)})}function bh(r,t){if(r.l.s)for(const n of r.l.s)q(n);t()}function ee(r,t,n,s){var o=!$i||!1,l=!0,u=s,f=!0,h=()=>(f&&(f=!1,u=s),u);let g;{var _=mn in r||zh in r;g=Fn(r,t)?.set??(_&&t in r?H=>r[t]=H:void 0)}var m,w,E=!1;if([m,E]=(function(H){var Z=ya;try{return ya=!1,[H(),ya]}finally{ya=Z}})(()=>r[t]),w=o?()=>{var H=r[t];return H===void 0?h():(f=!0,H)}:()=>{var H=r[t];return H!==void 0&&(u=void 0),H===void 0?u:H},g){var T=r.$$legacy;return function(H,Z){return arguments.length>0?(o&&Z&&!T&&!E||g(Z?w():H),H):w()}}var R=!1,P=fd(()=>(R=!1,w()));F&&(P.label=t),q(P);var D=te;return function(H,Z){if(arguments.length>0){const de=Z?q(P):o&&l?Si(H):H;return vt(P,de),R=!0,u!==void 0&&(u=de),H}return Vn&&R||(D.f&Pi)!==0?P.v:q(P)}}class KE{#e;#n;constructor(t){var n=new Map,s=(l,u)=>{var f=wi(u,!1,!1);return n.set(l,f),f};const o=new Proxy({...t.props||{},$$events:{}},{get:(l,u)=>q(n.get(u)??s(u,Reflect.get(l,u))),has:(l,u)=>u===zh||(q(n.get(u)??s(u,Reflect.get(l,u))),Reflect.has(l,u)),set:(l,u,f)=>(vt(n.get(u)??s(u,f),f),Reflect.set(l,u,f))});this.#n=(t.hydrate?FE:Dd)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),t?.props?.$$host&&t.sync!==!1||X(),this.#e=o.$$events;for(const l of Object.keys(this.#n))l!=="$set"&&l!=="$destroy"&&l!=="$on"&&un(this,l,{get(){return this.#n[l]},set(u){this.#n[l]=u},enumerable:!0});this.#n.$set=l=>{Object.assign(o,l)},this.#n.$destroy=()=>{HE(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const s=(...o)=>n.call(this,...o);return this.#e[t].push(s),()=>{this.#e[t]=this.#e[t].filter(o=>o!==s)}}$destroy(){this.#n.$destroy()}}let Hd;function Na(r,t,n,s){const o=n[r]?.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[r])return t;if(s==="toAttribute")switch(o){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":default:return t;case"Number":return t!=null?+t:t}}function Wd(r,t,n,s,o,l){let u=class extends Hd{constructor(){super(r,n,o),this.$$p_d=t}static get observedAttributes(){return $a(t).map(f=>(t[f].attribute||f).toLowerCase())}};return $a(t).forEach(f=>{un(u.prototype,f,{get(){return this.$$c&&f in this.$$c?this.$$c[f]:this.$$d[f]},set(h){h=Na(f,h,t),this.$$d[f]=h;var g=this.$$c;if(g){var _=Fn(g,f)?.get;_?g[f]=h:g.$set({[f]:h})}}})}),s.forEach(f=>{un(u.prototype,f,{get(){return this.$$c?.[f]}})}),l&&(u=l(u)),r.element=u,u}var ue;typeof HTMLElement=="function"&&(Hd=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(r,t,n){super(),this.$$ctor=r,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(r,t,n){if(this.$$l[r]=this.$$l[r]||[],this.$$l[r].push(t),this.$$c){const s=this.$$c.$on(r,t);this.$$l_u.set(t,s)}super.addEventListener(r,t,n)}removeEventListener(r,t,n){if(super.removeEventListener(r,t,n),this.$$c){const s=this.$$l_u.get(t);s&&(s(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return l=>{const u=fu("slot");o!=="default"&&(u.name=o),fs(l,u)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=(function(o){const l={};return o.childNodes.forEach(u=>{l[u.slot||"default"]=!0}),l})(this);for(const o of this.$$s)o in s&&(o!=="default"||this.$$d.children?n[o]=t(o):(this.$$d.children=t(o),n.default=!0));for(const o of this.attributes){const l=this.$$g_p(o.name);l in this.$$d||(this.$$d[l]=Na(l,o.value,this.$$p_d,"toProp"))}for(const o in this.$$p_d)o in this.$$d||this[o]===void 0||(this.$$d[o]=this[o],delete this[o]);this.$$c=(r={component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:n,$$host:this}},new KE(r)),this.$$me=(function(o){Hn.ensure();const l=fn(524352,o);return()=>{_t(l)}})(()=>{Ss(()=>{this.$$r=!0;for(const o of $a(this.$$c)){if(!this.$$p_d[o]?.reflect)continue;this.$$d[o]=this.$$c[o];const l=Na(o,this.$$d[o],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,l)}this.$$r=!1})});for(const o in this.$$l)for(const l of this.$$l[o]){const u=this.$$c.$on(o,l);this.$$l_u.set(l,u)}this.$$l={}}var r}attributeChangedCallback(r,t,n){this.$$r||(r=this.$$g_p(r),this.$$d[r]=Na(r,n,this.$$p_d,"toProp"),this.$$c?.$set({[r]:this.$$d[r]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(r){return $a(this.$$p_d).find(t=>this.$$p_d[t].attribute===r||!this.$$p_d[t].attribute&&t.toLowerCase()===r)||r}}),(function(r){r.CUSTOM_MESSAGE="custom",r.GET_CONTEXT="luigi.get-context",r.SEND_CONTEXT_HANDSHAKE="luigi.init",r.CONTEXT_RECEIVED="luigi.init.ok",r.NAVIGATION_REQUEST="luigi.navigation.open",r.ALERT_REQUEST="luigi.ux.alert.show",r.ALERT_CLOSED="luigi.ux.alert.hide",r.INITIALIZED="luigi.init.ok",r.ADD_SEARCH_PARAMS_REQUEST="luigi.addSearchParams",r.ADD_NODE_PARAMS_REQUEST="luigi.addNodeParams",r.SHOW_CONFIRMATION_MODAL_REQUEST="luigi.ux.confirmationModal.show",r.CONFIRMATION_MODAL_CLOSED="luigi.ux.confirmationModal.hide",r.SHOW_LOADING_INDICATOR_REQUEST="luigi.show-loading-indicator",r.HIDE_LOADING_INDICATOR_REQUEST="luigi.hide-loading-indicator",r.SET_CURRENT_LOCALE_REQUEST="luigi.ux.set-current-locale",r.LOCAL_STORAGE_SET_REQUEST="storage",r.RUNTIME_ERROR_HANDLING_REQUEST="luigi-runtime-error-handling",r.SET_ANCHOR_LINK_REQUEST="luigi.setAnchor",r.SET_THIRD_PARTY_COOKIES_REQUEST="luigi.third-party-cookie",r.BACK_NAVIGATION_REQUEST="luigi.navigation.back",r.GET_CURRENT_ROUTE_REQUEST="luigi.navigation.currentRoute",r.SEND_CURRENT_ROUTE_ANSWER="luigi.navigation.currentRoute.answer",r.SEND_CONTEXT_OBJECT="luigi.navigate",r.NAVIGATION_COMPLETED_REPORT="luigi.navigate.ok",r.CLOSE_MODAL_ANSWER="luigi.navigation.modal.close",r.UPDATE_MODAL_PATH_DATA_REQUEST="luigi.navigation.updateModalDataPath",r.UPDATE_MODAL_SETTINGS="luigi.navigation.updateModalSettings",r.CHECK_PATH_EXISTS_REQUEST="luigi.navigation.pathExists",r.SEND_PATH_EXISTS_ANSWER="luigi.navigation.pathExists.answer",r.SET_DIRTY_STATUS_REQUEST="luigi.set-page-dirty",r.AUTH_SET_TOKEN="luigi.auth.tokenIssued",r.ADD_BACKDROP_REQUEST="luigi.add-backdrop",r.REMOVE_BACKDROP_REQUEST="luigi.remove-backdrop",r.SET_VIEW_GROUP_DATA_REQUEST="luigi.setVGData",r.CLOSE_CURRENT_MODAL_REQUEST="luigi.close-modal"})(ue||(ue={}));class jE extends Event{constructor(t,n,s,o){super(t),this.detail=n,this.payload=s||n||{},this.callbackFn=o}callback(t){this.callbackFn&&this.callbackFn(t)}}const $={ADD_BACKDROP_REQUEST:"add-backdrop-request",ADD_NODE_PARAMS_REQUEST:"add-node-params-request",ADD_SEARCH_PARAMS_REQUEST:"add-search-params-request",ALERT_CLOSED:"close-alert-request",ALERT_REQUEST:"show-alert-request",BACK_NAVIGATION_REQUEST:"navigate-back-request",CHECK_PATH_EXISTS_REQUEST:"check-path-exists-request",CLOSE_CURRENT_MODAL_REQUEST:"close-current-modal-request",CLOSE_USER_SETTINGS_REQUEST:"close-user-settings-request",COLLAPSE_LEFT_NAV_REQUEST:"collapse-leftnav-request",CUSTOM_MESSAGE:"custom-message",GET_CONTEXT_REQUEST:"get-context-request",GET_CURRENT_ROUTE_REQUEST:"get-current-route-request",GO_BACK_REQUEST:"go-back-request",HAS_BACK_REQUEST:"has-back-request",HIDE_LOADING_INDICATOR_REQUEST:"hide-loading-indicator-request",INITIALIZED:"initialized",LOCAL_STORAGE_SET_REQUEST:"set-storage-request",NAVIGATION_COMPLETED_REPORT:"report-navigation-completed-request",NAVIGATION_REQUEST:"navigation-request",OPEN_USER_SETTINGS_REQUEST:"open-user-settings-request",PATH_EXISTS_REQUEST:"path-exists-request",REMOVE_BACKDROP_REQUEST:"remove-backdrop-request",RUNTIME_ERROR_HANDLING_REQUEST:"runtime-error-handling-request",SET_ANCHOR_LINK_REQUEST:"set-anchor-request",SET_CURRENT_LOCALE_REQUEST:"set-current-locale-request",SET_DIRTY_STATUS_REQUEST:"set-dirty-status-request",SET_DOCUMENT_TITLE_REQUEST:"set-document-title-request",SET_THIRD_PARTY_COOKIES_REQUEST:"set-third-party-cookies-request",SET_VIEW_GROUP_DATA_REQUEST:"set-viewgroup-data-request",SHOW_CONFIRMATION_MODAL_REQUEST:"show-confirmation-modal-request",SHOW_LOADING_INDICATOR_REQUEST:"show-loading-indicator-request",UPDATE_MODAL_PATH_DATA_REQUEST:"update-modal-path-data-request",UPDATE_MODAL_SETTINGS_REQUEST:"update-modal-settings-request",UPDATE_TOP_NAVIGATION_REQUEST:"update-top-navigation-request"};class pu{isVisible(t){return getComputedStyle(t).display!=="none"&&!(!t.offsetWidth&&!t.offsetHeight)}sendCustomMessageToIframe(t,n,s){const o=s||"custom";if(t?.iframe?.contentWindow){const l=new URL(t.iframe.src);o==="custom"?t.iframe.contentWindow.postMessage({msg:o,data:n},l.origin):t.iframe.contentWindow.postMessage({msg:o,...n},l.origin)}else console.error("Message target could not be resolved")}dispatchWithPayload(t,n,s,o,l){this.dispatch(t,n,s,l,o)}dispatch(t,n,s,o,l){const u=new jE(t,s,l,o);n.dispatchEvent(u)}getTargetContainer(t){let n;return globalThis.__luigi_container_manager.container.forEach(s=>{s.iframeHandle?.iframe&&s.iframeHandle.iframe.contentWindow===t.source&&(n=s)}),n}getContainerManager(){return globalThis.__luigi_container_manager||(globalThis.__luigi_container_manager={container:[],messageListener:t=>{const n=this.getTargetContainer(t),s=n?.iframeHandle?.iframe?.contentWindow;if(s&&s===t.source)switch(t.data.msg){case ue.CUSTOM_MESSAGE:{const o=t.data.data,l=o.id;delete o.id,this.dispatch($.CUSTOM_MESSAGE,n,{id:l,_metaData:{},data:o})}break;case ue.GET_CONTEXT:s.postMessage({msg:ue.SEND_CONTEXT_HANDSHAKE,context:n.context||{},internal:{thirdPartyCookieCheck:{disabled:n.skipCookieCheck==="true"},currentTheme:n.theme,currentLocale:n.locale,activeFeatureToggleList:n.activeFeatureToggleList||[],cssVariables:n.cssVariables||{},anchor:n.anchor||"",userSettings:n.userSettings||null,drawer:n.drawer||!1,modal:n.modal||!1,viewStackSize:n.viewStackSize||0,isNavigateBack:n.isNavigateBack||!1},authData:n.authData||{},nodeParams:n.nodeParams||{},searchParams:n.searchParams||{},pathParams:n.pathParams||{}},t.origin);break;case ue.NAVIGATION_REQUEST:this.dispatch($.NAVIGATION_REQUEST,n,t.data.params,o=>{s.postMessage({msg:ue.CLOSE_MODAL_ANSWER,data:o},t.origin)});break;case ue.ALERT_REQUEST:this.dispatchWithPayload($.ALERT_REQUEST,n,t,t.data?.data?.settings,o=>{n.notifyAlertClosed(t.data?.data?.settings?.id,o)});break;case ue.INITIALIZED:this.dispatch($.INITIALIZED,n,t.data?.params||{});break;case ue.ADD_SEARCH_PARAMS_REQUEST:this.dispatch($.ADD_SEARCH_PARAMS_REQUEST,n,{data:t.data.data,keepBrowserHistory:t.data.keepBrowserHistory});break;case ue.ADD_NODE_PARAMS_REQUEST:this.dispatch($.ADD_NODE_PARAMS_REQUEST,n,{data:t.data.data,keepBrowserHistory:t.data.keepBrowserHistory});break;case ue.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload($.SHOW_CONFIRMATION_MODAL_REQUEST,n,t.data.data,t.data.data?.settings,o=>{n.notifyConfirmationModalClosed(o)});break;case ue.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch($.SHOW_LOADING_INDICATOR_REQUEST,n,t);break;case ue.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch($.HIDE_LOADING_INDICATOR_REQUEST,n,t);break;case ue.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload($.SET_CURRENT_LOCALE_REQUEST,n,t,t.data.data);break;case ue.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload($.LOCAL_STORAGE_SET_REQUEST,n,t,t.data.data?.params);break;case ue.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,n,t);break;case ue.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload($.SET_ANCHOR_LINK_REQUEST,n,t,t.data.anchor);break;case ue.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch($.SET_THIRD_PARTY_COOKIES_REQUEST,n,t);break;case ue.BACK_NAVIGATION_REQUEST:{let o=t.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(l){console.warn(l)}this.dispatch($.GO_BACK_REQUEST,n,o),this.dispatch($.BACK_NAVIGATION_REQUEST,n,t)}break;case ue.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload($.GET_CURRENT_ROUTE_REQUEST,n,t,t.data.data,o=>{s.postMessage({msg:ue.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:t.data?.data?.id,route:o}},t.origin)});break;case ue.NAVIGATION_COMPLETED_REPORT:this.dispatch($.NAVIGATION_COMPLETED_REPORT,n,t);break;case ue.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload($.UPDATE_MODAL_PATH_DATA_REQUEST,n,t,t.data.params);break;case ue.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload($.UPDATE_MODAL_SETTINGS_REQUEST,n,t,{addHistoryEntry:t.data.addHistoryEntry,updatedModalSettings:t.data.updatedModalSettings});break;case ue.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload($.CHECK_PATH_EXISTS_REQUEST,n,t,t.data.data,o=>{s.postMessage({msg:ue.SEND_PATH_EXISTS_ANSWER,data:{correlationId:t.data?.data?.id,pathExists:o}},t.origin)});break;case ue.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload($.SET_DIRTY_STATUS_REQUEST,n,t,{dirty:t.data.dirty});break;case ue.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch($.SET_VIEW_GROUP_DATA_REQUEST,n,t.data.data);break;case ue.ADD_BACKDROP_REQUEST:this.dispatch($.ADD_BACKDROP_REQUEST,n,t);break;case ue.REMOVE_BACKDROP_REQUEST:this.dispatch($.REMOVE_BACKDROP_REQUEST,n,t);break;case ue.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch($.CLOSE_CURRENT_MODAL_REQUEST,n,t)}}},window.addEventListener("message",globalThis.__luigi_container_manager.messageListener)),globalThis.__luigi_container_manager}registerContainer(t){this.getContainerManager().container.push(t)}}const nr=new pu,gi=new class{constructor(){this.updateContext=(r,t,n,s,o,l)=>{if(n){const u=t||{};nr.sendCustomMessageToIframe(n,{context:r,nodeParams:s||{},pathParams:o||{},searchParams:l||{},internal:u,withoutSync:u.withoutSync??!0},ue.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(r,t,n,s)=>{if(s){const o=n||{};nr.sendCustomMessageToIframe(s,{context:t,internal:o,withoutSync:!1,viewUrl:r},ue.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(r,t)=>{r&&t?nr.sendCustomMessageToIframe(r,{authData:t},ue.AUTH_SET_TOKEN):console.warn("Attempting to update auth data on inexisting iframe or authData")},this.sendCustomMessage=(r,t,n,s,o)=>{if(n&&t._luigi_mfe_webcomponent)nr.dispatch(r,t._luigi_mfe_webcomponent,o);else{const l={...o};l.id&&console.warn('Property "id" is reserved and can not be used in custom message data'),l.id=r,nr.sendCustomMessageToIframe(s,l)}},this.notifyConfirmationModalClosed=(r,t)=>{const n={data:{confirmed:r}};nr.sendCustomMessageToIframe(t,n,ue.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(r,t,n){const s=t?{id:r,dismissKey:t}:{id:r};nr.sendCustomMessageToIframe(n,s,ue.ALERT_CLOSED)}},Rh=r=>{if(!r)return;const t=r;return t.forEach((n,s)=>{t[s]=n+(n.indexOf(";")!=-1?"":";"),t[s]=r[s].replaceAll('"',"'")}),t.join(" ")};class Ni{constructor(t){t?(this.rendererObject=t,this.config=t.config||{}):this.config={}}createCompoundContainer(){return document.createElement("div")}createCompoundItemContainer(t){return document.createElement("div")}attachCompoundItem(t,n){t.appendChild(n)}}class YE extends Ni{constructor(t){super(t||{use:{}}),t&&t.use&&t.use.extends&&(this.superRenderer=Vd({use:t.use.extends,config:t.config}))}createCompoundContainer(){return this.rendererObject.use.createCompoundContainer?this.rendererObject.use.createCompoundContainer(this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundContainer():super.createCompoundContainer()}createCompoundItemContainer(t){return this.rendererObject.use.createCompoundItemContainer?this.rendererObject.use.createCompoundItemContainer(t,this.config,this.superRenderer):this.superRenderer?this.superRenderer.createCompoundItemContainer(t):super.createCompoundItemContainer(t)}attachCompoundItem(t,n){this.rendererObject.use.attachCompoundItem?this.rendererObject.use.attachCompoundItem(t,n,this.superRenderer):this.superRenderer?this.superRenderer.attachCompoundItem(t,n):super.attachCompoundItem(t,n)}}class JE extends Ni{createCompoundContainer(){const t="__lui_compound_"+new Date().getTime(),n=document.createElement("div");n.classList.add(t);let s="";return this.config.layouts&&this.config.layouts.forEach(o=>{if(o.minWidth||o.maxWidth){let l="@media only screen ";o.minWidth!=null&&(l+=`and (min-width: ${o.minWidth}px) `),o.maxWidth!=null&&(l+=`and (max-width: ${o.maxWidth}px) `),l+=`{
61
+ .${t} {
22
62
  grid-template-columns: ${o.columns||"auto"};
23
63
  grid-template-rows: ${o.rows||"auto"};
24
64
  grid-gap: ${o.gap||"0"};
25
65
  }
26
66
  }
27
- `,a+=c}})),r.innerHTML=`
67
+ `,s+=l}}),n.innerHTML=`
28
68
  <style scoped>
29
- .${n} {
69
+ .${t} {
30
70
  display: grid;
31
71
  grid-template-columns: ${this.config.columns||"auto"};
32
72
  grid-template-rows: ${this.config.rows||"auto"};
33
73
  grid-gap: ${this.config.gap||"0"};
34
74
  min-height: ${this.config.minHeight||"auto"};
35
75
  }
36
- ${a}
76
+ ${s}
37
77
  </style>
38
- `,r}createCompoundItemContainer(n){const r=n||{},a=document.createElement("div");return a.setAttribute("style",`grid-row: ${r.row||"auto"}; grid-column: ${r.column||"auto"}`),a.classList.add("lui-compoundItemCnt"),a}}const vc=i=>{const n=i.use;return n?n==="grid"?new Xv(i):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new Jv(i):new _r(i):new _r(i)},Gl=(i,n,r,a)=>{n?.eventListeners&&n.eventListeners.forEach((o=>{const c=o.source+"."+o.name,l=i[c],f={wcElementId:r,wcElement:a,action:o.action,converter:o.dataConverter};l?l.push(f):i[c]=[f]}))};function Ql(i){return String(i).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&#39;","'").replaceAll("&sol;","/")}class wc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new Ka}dynamicImport(n){return Object.freeze(import(n))}processViewUrl(n,r){return n}attachWC(n,r,a,o,c,l,f){if(a&&a.contains(r)){const p=document.createElement(n);l&&p.setAttribute("nodeId",l),p.setAttribute("lui_web_component","true"),this.initWC(p,n,a,c,o,l,f),a.replaceChild(p,r),a._luigi_node&&(a._luigi_mfe_webcomponent=p),a.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(n,r,a){this.containerService.dispatch(n,this.thisComponent,r,a)}createClientAPI(n,r,a,o,c){return{linkManager:()=>{let l=null,f=!1,p=!1,m=!1,E={};const y={navigate:(C,b={})=>{const R={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:m,nodeParams:E,...b};this.dispatchLuigiEvent($.NAVIGATION_REQUEST,{link:C,...R})},navigateToIntent:(C,b={})=>{let R="#?intent=";if(R+=C,b&&Object.keys(b)?.length){const x=Object.entries(b);if(x.length>0){R+="?";for(const[U,H]of x)R+=U+"="+H+"&";R=R.slice(0,-1)}}y.navigate(R)},fromClosestContext:()=>(f=!0,y),fromContext:C=>(l=C,y),fromVirtualTreeRoot:()=>(p=!0,y),fromParent:()=>(m=!0,y),getCurrentRoute:()=>{const C={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:m,nodeParams:E};return new Promise(((b,R)=>{this.containerService.dispatch($.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...C},(x=>{x?b(x):R("No current route received.")}))}))},withParams:C=>(E=C,y),updateModalPathInternalNavigation:(C,b={},R=!1)=>{if(!C)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const x={fromClosestContext:f,fromContext:l,fromParent:m,fromVirtualTreeRoot:p,nodeParams:E};this.dispatchLuigiEvent($.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(x,{history:R,link:C,modal:b}))},updateTopNavigation:()=>{this.dispatchLuigiEvent($.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:C=>{const b={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:m,nodeParams:E};return new Promise(((R,x)=>{this.containerService.dispatch($.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...b,link:C},(U=>{U?R(!0):x(!1)})),this.containerService.dispatch($.PATH_EXISTS_REQUEST,this.thisComponent,{...b,link:C},(U=>{U?R(!0):x(!1)}))}))},openAsDrawer:(C,b={})=>{y.navigate(C,{drawer:b})},openAsModal:(C,b={})=>{y.navigate(C,{modal:b})},openAsSplitView:(C,b={})=>{y.navigate(C,{splitView:b})},goBack:C=>{this.dispatchLuigiEvent($.GO_BACK_REQUEST,C)},hasBack:()=>!1,updateModalSettings:(C={},b=!1)=>{this.dispatchLuigiEvent($.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:C,addHistoryEntry:b})}};return y},uxManager:()=>({showAlert:l=>(l.id=this.alertIndex++,new Promise((f=>{this.alertResolvers[l.id]=f,this.dispatchLuigiEvent($.ALERT_REQUEST,l,(p=>{this.resolveAlert(l.id,p)}))}))),showConfirmationModal:l=>new Promise(((f,p)=>{this.modalResolver={resolve:f,reject:p},this.containerService.dispatch($.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,l,(m=>{m?f():p()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent($.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent($.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent($.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:l=>{this.dispatchLuigiEvent($.SET_DOCUMENT_TITLE_REQUEST,l)},setDirtyStatus:l=>{this.dispatchLuigiEvent($.SET_DIRTY_STATUS_REQUEST,{dirty:l})},setCurrentLocale:l=>{l&&this.dispatchLuigiEvent($.SET_CURRENT_LOCALE_REQUEST,{currentLocale:l})},removeBackdrop:()=>{this.dispatchLuigiEvent($.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent($.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent($.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent($.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:l=>{n&&n.eventBus&&n.eventBus.onPublishEvent(l,r,a);const f={id:l.type,_metaData:{nodeId:r,wc_id:a,src:o},data:l.detail};this.dispatchLuigiEvent($.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent($.INITIALIZED,{})},addNodeParams:(l,f)=>{c||this.dispatchLuigiEvent($.ADD_NODE_PARAMS_REQUEST,{params:l,data:l,keepBrowserHistory:f})},getNodeParams:l=>{return c?{}:l?(f=this.thisComponent.nodeParams,Object.entries(f).reduce(((p,m)=>(p[Ql(m[0])]=Ql(m[1]),p)),{})):this.thisComponent.nodeParams||{};var f},setAnchor:l=>{c||this.dispatchLuigiEvent($.SET_ANCHOR_LINK_REQUEST,l)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(l={},f=!0)=>{this.dispatchLuigiEvent($.ADD_SEARCH_PARAMS_REQUEST,{data:l,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:l=>{this.dispatchLuigiEvent($.SET_VIEW_GROUP_DATA_REQUEST,l)}}}initWC(n,r,a,o,c,l,f){const p=this.createClientAPI(a,l,r,n,f);if(n.__postProcess){const m=new URL(document.baseURI).origin===new URL(o,document.baseURI).origin?new URL("./",new URL(o,document.baseURI)):new URL("./",o);n.__postProcess(c,p,m.origin+m.pathname)}else n.context=c,n.LuigiClient=p}generateWCId(n){let r="";const a=new URL(n,encodeURI(location.href)).href;for(let o=0;o<a.length;o++)r+=a.charCodeAt(o).toString(16);return"luigi-wc-"+r}registerWCFromUrl(n,r){const a=this.processViewUrl(n);return new Promise(((o,c)=>{this.checkWCUrl(a)?this.dynamicImport(a).then((l=>{try{if(!window.customElements.get(r)){let f=l.default;if(!HTMLElement.isPrototypeOf(f)){const p=Object.keys(l);for(let m=0;m<p.length&&(f=l[p[m]],!HTMLElement.isPrototypeOf(f));m++);}window.customElements.define(r,f)}o(1)}catch(f){c(f)}})).catch((l=>{c(l)})):c(`Error: View URL '${a}' not allowed to be included`)}))}includeSelfRegisteredWCFromUrl(n,r,a){if(this.checkWCUrl(r)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(c,l)=>{window.customElements.define(this.generateWCId(c),l)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(c,l)=>{this.containerService.getContainerManager()._registerWebcomponent(c,l)}));const o=document.createElement("script");o.setAttribute("src",r),n.webcomponent.type==="module"&&o.setAttribute("type","module"),o.setAttribute("defer","true"),o.addEventListener("load",(()=>{a()})),document.body.appendChild(o)}else console.warn(`View URL '${r}' not allowed to be included`)}checkWCUrl(n){return!0}renderWebComponent(n,r,a,o,c,l){const f=this.processViewUrl(n,{context:a}),p=o?.webcomponent?.tagName||this.generateWCId(f),m=document.createElement("div");r.appendChild(m),r._luigi_node=o,window.customElements.get(p)?this.attachWC(p,m,r,a,f,c,l):window.luigiWCFn?window.luigiWCFn(f,p,m,(()=>{this.attachWC(p,m,r,a,f,c,l)})):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,(()=>{this.attachWC(p,m,r,a,f,c,l)})):this.registerWCFromUrl(f,p).then((()=>{this.attachWC(p,m,r,a,f,c,l)})).catch((E=>{console.warn("ERROR =>",E),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,E)}))}createCompoundContainerAsync(n,r,a){return new Promise(((o,c)=>{if(n.viewUrl)try{const l=a?.webcomponent?.tagName||this.generateWCId(n.viewUrl);a?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(a,n.viewUrl,(()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,n.viewUrl,r,"_root"),o(f)})):this.registerWCFromUrl(n.viewUrl,l).then((()=>{const f=document.createElement(l);f.setAttribute("lui_web_component","true"),this.initWC(f,l,f,n.viewUrl,r,"_root"),o(f)})).catch((f=>{console.warn("Error: ",f),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,f)}))}catch(l){c(l)}else o(n.createCompoundContainer())}))}renderWebComponentCompound(n,r,a){let o;return n.webcomponent&&n.viewUrl?(o=new _r,o.viewUrl=this.processViewUrl(n.viewUrl,{context:a}),o.createCompoundItemContainer=c=>{const l=document.createElement("div");return c?.slot&&l.setAttribute("slot",c.slot),l}):n.compound?.renderer&&(o=vc(n.compound.renderer)),o=o||new _r,new Promise((c=>{this.createCompoundContainerAsync(o,a,n).then((l=>{r._luigi_mfe_webcomponent=l,r._luigi_node=n;const f={};l.eventBus={listeners:f,onPublishEvent:(p,m,E)=>{const y=f[m+"."+p.type]||[];y.push(...f["*."+p.type]||[]),y.forEach((C=>{const b=C.wcElement||l.querySelector("[nodeId="+C.wcElementId+"]");b?b.dispatchEvent(new CustomEvent(C.action,{detail:C.converter?C.converter(p.detail):p.detail})):console.debug("Could not find event target",C)}))}},n.compound?.children?.forEach(((p,m)=>{const E={...a,...p.context},y=o.createCompoundItemContainer(p.layoutConfig);y.eventBus=l.eventBus,o.attachCompoundItem(l,y);const C=p.id||"gen_"+m;this.renderWebComponent(p.viewUrl,y,E,p,C,!0),Gl(f,p,C)})),r.appendChild(l),Gl(f,n.compound,"_root",l),c(l)})).catch((l=>{console.warn("Error: ",l),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,l)}))}))}resolveAlert(n,r){this.alertResolvers[n]?(this.alertResolvers[n](r===void 0||r),this.alertResolvers[n]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(n){this.modalResolver?(n?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const Kr=new class{isFunction(i){return i&&{}.toString.call(i)==="[object Function]"}isObject(i){return!(!i||typeof i!="object"||Array.isArray(i))}checkWebcomponentValue(i){return typeof i=="string"?JSON.parse(i):typeof i=="boolean"||typeof i=="object"?i:void console.warn("Webcomponent value has a wrong type.")}resolveContext(i){return i?typeof i=="string"?JSON.parse(i):i:{}}};function ql(i){let n,r=(!i[4]||i[4]==="false")&&zl(i);return{c(){r&&r.c(),n=hc("")},m(a,o){r&&r.m(a,o),Fn(a,n,o)},p(a,o){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,o):(r=zl(a),r.c(),r.m(n.parentNode,n))},d(a){a&&pn(n),r&&r.d(a)}}}function zl(i){let n,r,a,o,c,l;return{c(){n=mr("style"),n.textContent=`main.lui-isolated,
78
+ `,n}createCompoundItemContainer(t){const n=t||{},s=document.createElement("div");return s.setAttribute("style",`grid-row: ${n.row||"auto"}; grid-column: ${n.column||"auto"}`),s.classList.add("lui-compoundItemCnt"),s}}const Vd=r=>{const t=r.use;return t?t==="grid"?new JE(r):t.createCompoundContainer||t.createCompoundItemContainer||t.attachCompoundItem?new YE(r):new Ni(r):new Ni(r)},Ah=(r,t,n,s)=>{t?.eventListeners&&t.eventListeners.forEach(o=>{const l=o.source+"."+o.name,u=r[l],f={wcElementId:n,wcElement:s,action:o.action,converter:o.dataConverter};u?u.push(f):r[l]=[f]})};function Ph(r){return String(r).replaceAll("&lt;","<").replaceAll("&gt;",">").replaceAll("&quot;",'"').replaceAll("&#39;","'").replaceAll("&sol;","/")}class Bd{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new pu}dynamicImport(t){return Object.freeze(import(t))}processViewUrl(t,n){return t}attachWC(t,n,s,o,l,u,f){if(s&&s.contains(n)){const h=document.createElement(t);u&&h.setAttribute("nodeId",u),h.setAttribute("lui_web_component","true"),this.initWC(h,t,s,l,o,u,f),s.replaceChild(h,n),s._luigi_node&&(s._luigi_mfe_webcomponent=h),s.dispatchEvent(new Event("wc_ready"))}}dispatchLuigiEvent(t,n,s){this.containerService.dispatch(t,this.thisComponent,n,s)}createClientAPI(t,n,s,o,l){return{linkManager:()=>{let u=null,f=!1,h=!1,g=!1,_={};const m={navigate:(w,E={},T)=>{const R={fromContext:u,fromClosestContext:f,fromVirtualTreeRoot:h,fromParent:g,nodeParams:_,...E};this.dispatchLuigiEvent($.NAVIGATION_REQUEST,{link:w,...R},T)},navigateToIntent:(w,E={})=>{let T="#?intent=";if(T+=w,E&&Object.keys(E)?.length){const R=Object.entries(E);if(R.length>0){T+="?";for(const[P,D]of R)T+=P+"="+D+"&";T=T.slice(0,-1)}}m.navigate(T)},fromClosestContext:()=>(f=!0,m),fromContext:w=>(u=w,m),fromVirtualTreeRoot:()=>(h=!0,m),fromParent:()=>(g=!0,m),getCurrentRoute:()=>{const w={fromContext:u,fromClosestContext:f,fromVirtualTreeRoot:h,fromParent:g,nodeParams:_};return new Promise((E,T)=>{this.containerService.dispatch($.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...w},R=>{R?E(R):T("No current route received.")})})},withParams:w=>(_=w,m),updateModalPathInternalNavigation:(w,E={},T=!1)=>{if(!w)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const R={fromClosestContext:f,fromContext:u,fromParent:g,fromVirtualTreeRoot:h,nodeParams:_};this.dispatchLuigiEvent($.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(R,{history:T,link:w,modal:E}))},updateTopNavigation:()=>{this.dispatchLuigiEvent($.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:w=>{const E={fromContext:u,fromClosestContext:f,fromVirtualTreeRoot:h,fromParent:g,nodeParams:_};return new Promise((T,R)=>{this.containerService.dispatch($.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...E,link:w},P=>{P?T(!0):R(!1)}),this.containerService.dispatch($.PATH_EXISTS_REQUEST,this.thisComponent,{...E,link:w},P=>{P?T(!0):R(!1)})})},openAsDrawer:(w,E={})=>{m.navigate(w,{drawer:E})},openAsModal:(w,E={},T)=>new Promise(R=>{m.navigate(w,{modal:E},P=>{R({goBackValue:P}),T&&typeof T=="function"&&T(P)})}),openAsSplitView:(w,E={})=>{m.navigate(w,{splitView:E})},goBack:w=>{this.dispatchLuigiEvent($.GO_BACK_REQUEST,w)},hasBack:()=>!1,updateModalSettings:(w={},E=!1)=>{this.dispatchLuigiEvent($.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:w,addHistoryEntry:E})}};return m},uxManager:()=>({showAlert:u=>(u.id=this.alertIndex++,new Promise(f=>{this.alertResolvers[u.id]=f,this.dispatchLuigiEvent($.ALERT_REQUEST,u,h=>{this.resolveAlert(u.id,h)})})),showConfirmationModal:u=>new Promise((f,h)=>{this.modalResolver={resolve:f,reject:h},this.containerService.dispatch($.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,u,g=>{g?f():h()})}),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent($.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent($.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent($.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:u=>{this.dispatchLuigiEvent($.SET_DOCUMENT_TITLE_REQUEST,u)},setDirtyStatus:u=>{this.dispatchLuigiEvent($.SET_DIRTY_STATUS_REQUEST,{dirty:u})},setCurrentLocale:u=>{u&&this.dispatchLuigiEvent($.SET_CURRENT_LOCALE_REQUEST,{currentLocale:u})},removeBackdrop:()=>{this.dispatchLuigiEvent($.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent($.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent($.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent($.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent($.CLOSE_CURRENT_MODAL_REQUEST,{})}}),getCurrentLocale:()=>this.thisComponent.locale,getActiveFeatureToggles:()=>this.thisComponent.activeFeatureToggleList||[],publishEvent:u=>{t&&t.eventBus&&t.eventBus.onPublishEvent(u,n,s);const f={id:u.type,_metaData:{nodeId:n,wc_id:s,src:o},data:u.detail};this.dispatchLuigiEvent($.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent($.INITIALIZED,{})},addNodeParams:(u,f)=>{l||this.dispatchLuigiEvent($.ADD_NODE_PARAMS_REQUEST,{params:u,data:u,keepBrowserHistory:f})},getNodeParams:u=>{return l?{}:u?(f=this.thisComponent.nodeParams,Object.entries(f).reduce((h,g)=>(h[Ph(g[0])]=Ph(g[1]),h),{})):this.thisComponent.nodeParams||{};var f},setAnchor:u=>{l||this.dispatchLuigiEvent($.SET_ANCHOR_LINK_REQUEST,u)},getAnchor:()=>this.thisComponent.anchor||"",getCoreSearchParams:()=>this.thisComponent.searchParams||{},getPathParams:()=>this.thisComponent.pathParams||{},getClientPermissions:()=>this.thisComponent.clientPermissions||{},addCoreSearchParams:(u={},f=!0)=>{this.dispatchLuigiEvent($.ADD_SEARCH_PARAMS_REQUEST,{data:u,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:u=>{this.dispatchLuigiEvent($.SET_VIEW_GROUP_DATA_REQUEST,u)}}}initWC(t,n,s,o,l,u,f){const h=this.createClientAPI(s,u,n,t,f);if(t.__postProcess){const g=new URL(document.baseURI).origin===new URL(o,document.baseURI).origin?new URL("./",new URL(o,document.baseURI)):new URL("./",o);t.__postProcess(l,h,g.origin+g.pathname)}else t.context=l,t.LuigiClient=h}generateWCId(t){let n="";const s=new URL(t,encodeURI(location.href)).href;for(let o=0;o<s.length;o++)n+=s.charCodeAt(o).toString(16);return"luigi-wc-"+n}registerWCFromUrl(t,n){const s=this.processViewUrl(t);return new Promise((o,l)=>{this.checkWCUrl(s)?this.dynamicImport(s).then(u=>{try{if(!window.customElements.get(n)){let f=u.default;if(!HTMLElement.isPrototypeOf(f)){const h=Object.keys(u);for(let g=0;g<h.length&&(f=u[h[g]],!HTMLElement.isPrototypeOf(f));g++);}window.customElements.define(n,f)}o(1)}catch(f){l(f)}}).catch(u=>{l(u)}):l(`Error: View URL '${s}' not allowed to be included`)})}includeSelfRegisteredWCFromUrl(t,n,s){if(this.checkWCUrl(n)){this.containerService.getContainerManager()._registerWebcomponent||(this.containerService.getContainerManager()._registerWebcomponent=(l,u)=>{window.customElements.define(this.generateWCId(l),u)}),window.Luigi||(window.Luigi={},window.Luigi._registerWebcomponent||(window.Luigi._registerWebcomponent=(l,u)=>{this.containerService.getContainerManager()._registerWebcomponent(l,u)}));const o=document.createElement("script");o.setAttribute("src",n),t.webcomponent.type==="module"&&o.setAttribute("type","module"),o.setAttribute("defer","true"),o.addEventListener("load",()=>{s()}),document.body.appendChild(o)}else console.warn(`View URL '${n}' not allowed to be included`)}checkWCUrl(t){return!0}renderWebComponent(t,n,s,o,l,u){const f=this.processViewUrl(t,{context:s}),h=o?.webcomponent?.tagName||this.generateWCId(f),g=document.createElement("div");n.appendChild(g),n._luigi_node=o,window.customElements.get(h)?this.attachWC(h,g,n,s,f,l,u):window.luigiWCFn?window.luigiWCFn(f,h,g,()=>{this.attachWC(h,g,n,s,f,l,u)}):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,()=>{this.attachWC(h,g,n,s,f,l,u)}):this.registerWCFromUrl(f,h).then(()=>{this.attachWC(h,g,n,s,f,l,u)}).catch(_=>{console.warn("ERROR =>",_),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,_)})}createCompoundContainerAsync(t,n,s){return new Promise((o,l)=>{if(t.viewUrl)try{const u=s?.webcomponent?.tagName||this.generateWCId(t.viewUrl);s?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(s,t.viewUrl,()=>{const f=document.createElement(u);f.setAttribute("lui_web_component","true"),this.initWC(f,u,f,t.viewUrl,n,"_root"),o(f)}):this.registerWCFromUrl(t.viewUrl,u).then(()=>{const f=document.createElement(u);f.setAttribute("lui_web_component","true"),this.initWC(f,u,f,t.viewUrl,n,"_root"),o(f)}).catch(f=>{console.warn("Error: ",f),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,f)})}catch(u){l(u)}else o(t.createCompoundContainer())})}renderWebComponentCompound(t,n,s){let o;return t.webcomponent&&t.viewUrl?(o=new Ni,o.viewUrl=this.processViewUrl(t.viewUrl,{context:s}),o.createCompoundItemContainer=l=>{const u=document.createElement("div");return l?.slot&&u.setAttribute("slot",l.slot),u}):t.compound?.renderer&&(o=Vd(t.compound.renderer)),o=o||new Ni,new Promise(l=>{this.createCompoundContainerAsync(o,s,t).then(u=>{n._luigi_mfe_webcomponent=u,n._luigi_node=t;const f={};u.eventBus={listeners:f,onPublishEvent:(h,g,_)=>{const m=f[g+"."+h.type]||[];m.push(...f["*."+h.type]||[]),m.forEach(w=>{const E=w.wcElement||u.querySelector("[nodeId="+w.wcElementId+"]");E?E.dispatchEvent(new CustomEvent(w.action,{detail:w.converter?w.converter(h.detail):h.detail})):console.debug("Could not find event target",w)})}},t.compound?.children?.forEach((h,g)=>{const _={...s,...h.context},m=o.createCompoundItemContainer(h.layoutConfig);m.eventBus=u.eventBus,o.attachCompoundItem(u,m);const w=h.id||"gen_"+g;this.renderWebComponent(h.viewUrl,m,_,h,w,!0),Ah(f,h,w)}),n.appendChild(u),Ah(f,t.compound,"_root",u),l(u)}).catch(u=>{console.warn("Error: ",u),this.containerService.dispatch($.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,u)})})}resolveAlert(t,n){this.alertResolvers[t]?(this.alertResolvers[t](n===void 0||n),this.alertResolvers[t]=void 0):console.log("Promise is not in the list.")}notifyConfirmationModalClosed(t){this.modalResolver?(t?this.modalResolver.resolve():this.modalResolver.reject(),this.modalResolver=void 0):console.log("Modal promise is not listed.")}}const hs=new class{isFunction(r){return r&&{}.toString.call(r)==="[object Function]"}isObject(r){return!(!r||typeof r!="object"||Array.isArray(r))}checkWebcomponentValue(r){return typeof r=="string"?JSON.parse(r):typeof r=="boolean"||typeof r=="object"?r:void console.warn("Webcomponent value has a wrong type.")}resolveContext(r){return r?typeof r=="string"?JSON.parse(r):r:{}}};var XE=gu(`<style>main.lui-isolated,
39
79
  .lui-isolated iframe {
40
80
  width: 100%;
41
81
  height: 100%;
@@ -44,12 +84,12 @@ function print() { __p += __j.call(arguments, '') }
44
84
 
45
85
  main.lui-isolated {
46
86
  line-height: 0;
47
- }`,r=hc(" "),a=mr("iframe"),Wl(a.src,o=i[3])||mt(a,"src",o),mt(a,"title",i[1]),mt(a,"allow",c=Bl(i[0])),mt(a,"sandbox",l=i[2]?i[2].join(" "):void 0)},m(f,p){Fn(f,n,p),Fn(f,r,p),Fn(f,a,p),i[28](a)},p(f,p){8&p[0]&&!Wl(a.src,o=f[3])&&mt(a,"src",o),2&p[0]&&mt(a,"title",f[1]),1&p[0]&&c!==(c=Bl(f[0]))&&mt(a,"allow",c),4&p[0]&&l!==(l=f[2]?f[2].join(" "):void 0)&&mt(a,"sandbox",l)},d(f){f&&(pn(n),pn(r),pn(a)),i[28](null)}}}function Zv(i){let n,r,a=i[5]&&ql(i);return{c(){n=mr("main"),a&&a.c(),mt(n,"class",r=i[4]?void 0:"lui-isolated")},m(o,c){Fn(o,n,c),a&&a.m(n,null),i[29](n)},p(o,c){o[5]?a?a.p(o,c):(a=ql(o),a.c(),a.m(n,null)):a&&(a.d(1),a=null),16&c[0]&&r!==(r=o[4]?void 0:"lui-isolated")&&mt(n,"class",r)},i:gn,o:gn,d(o){o&&pn(n),a&&a.d(),i[29](null)}}}function jv(i,n,r){let{activeFeatureToggleList:a}=n,{allowRules:o}=n,{anchor:c}=n,{authData:l}=n,{clientPermissions:f}=n,{context:p}=n,{deferInit:m}=n,{dirtyStatus:E}=n,{documentTitle:y}=n,{hasBack:C}=n,{label:b}=n,{locale:R}=n,{noShadow:x}=n,{nodeParams:U}=n,{pathParams:H}=n,{sandboxRules:re}=n,{searchParams:we}=n,{skipCookieCheck:ge}=n,{skipInitCheck:qe}=n,{theme:Le}=n,{userSettings:Ze}=n,{viewurl:Re}=n,{webcomponent:Ae}=n;const Se={};let Pe,D,Zt=!1;const wt=new wc,$e=N=>{if(!Zt){N.sendCustomMessage=(oe,ke)=>{ur.sendCustomMessage(oe,N.getNoShadow()?N:Pe,!!Ae,Se,ke)},N.updateContext=(oe,ke)=>{if(r(8,p=oe),Ae)(N.getNoShadow()?N:Pe)._luigi_mfe_webcomponent.context=oe;else{const jt={...ke||{},activeFeatureToggleList:N.activeFeatureToggleList||[],currentLocale:N.locale,currentTheme:N.theme,userSettings:N.userSettings||null,cssVariables:N.cssVariables||{},anchor:N.anchor||"",drawer:N.drawer||!1,modal:N.modal||!1,viewStackSize:N.viewStackSize||0,isNavigateBack:N.isNavigateBack||!1};ur.updateContext(oe,jt,Se,U,H,we)}},N.closeAlert=(oe,ke)=>{N.notifyAlertClosed(oe,ke)},N.notifyAlertClosed=(oe,ke)=>{N.isConnected&&(Ae?wt.resolveAlert(oe,ke):ur.notifyAlertClosed(oe,ke,Se))},N.notifyConfirmationModalClosed=oe=>{N.isConnected&&(Ae?wt.notifyConfirmationModalClosed(!!oe):ur.notifyConfirmationModalClosed(!!oe,Se))},fn.registerContainer(N),wt.thisComponent=N;const ot=Kr.resolveContext(p);if(N.updateViewUrl=(oe,ke)=>{oe?.length&&ur.updateViewUrl(oe,Kr.resolveContext(p),ke,Se)},Ae&&Ae!="false"){N.getNoShadow()?N.innerHTML="":(r(7,Pe.innerHTML="",Pe),N.attachShadow({mode:"open"}).append(Pe));const oe=Kr.checkWebcomponentValue(Ae);wt.renderWebComponent(Re,N.getNoShadow()?N:Pe,ot,typeof oe=="object"?{webcomponent:oe}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(Pe));qe?(N.initialized=!0,setTimeout((()=>{wt.dispatchLuigiEvent($.INITIALIZED,{})}))):Ae&&(N.getNoShadow()?N:Pe).addEventListener("wc_ready",(()=>{(N.getNoShadow()?N:Pe)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,wt.dispatchLuigiEvent($.INITIALIZED,{}))})),r(5,Zt=!0),N.containerInitialized=!0}};var yn;return dc((async()=>{r(27,D=Pe.parentNode),r(27,D.iframeHandle=Se,D),r(27,D.init=()=>{$e(D)},D),!m&&Re&&$e(D)})),yn=async()=>{},fc().$$.on_destroy.push(yn),i.$$set=N=>{"activeFeatureToggleList"in N&&r(9,a=N.activeFeatureToggleList),"allowRules"in N&&r(0,o=N.allowRules),"anchor"in N&&r(10,c=N.anchor),"authData"in N&&r(11,l=N.authData),"clientPermissions"in N&&r(12,f=N.clientPermissions),"context"in N&&r(8,p=N.context),"deferInit"in N&&r(13,m=N.deferInit),"dirtyStatus"in N&&r(14,E=N.dirtyStatus),"documentTitle"in N&&r(15,y=N.documentTitle),"hasBack"in N&&r(16,C=N.hasBack),"label"in N&&r(1,b=N.label),"locale"in N&&r(17,R=N.locale),"noShadow"in N&&r(18,x=N.noShadow),"nodeParams"in N&&r(19,U=N.nodeParams),"pathParams"in N&&r(20,H=N.pathParams),"sandboxRules"in N&&r(2,re=N.sandboxRules),"searchParams"in N&&r(21,we=N.searchParams),"skipCookieCheck"in N&&r(22,ge=N.skipCookieCheck),"skipInitCheck"in N&&r(23,qe=N.skipInitCheck),"theme"in N&&r(24,Le=N.theme),"userSettings"in N&&r(25,Ze=N.userSettings),"viewurl"in N&&r(3,Re=N.viewurl),"webcomponent"in N&&r(4,Ae=N.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Zt&&Re&&!m&&D&&$e(D)},[o,b,re,Re,Ae,Zt,Se,Pe,p,a,c,l,f,m,E,y,C,R,x,U,H,we,ge,qe,Le,Ze,()=>a&&o&&c&&l&&f&&E&&y&&C&&R&&x&&U&&H&&re&&we&&ge&&qe&&Le&&Ze,D,function(N){Zr[N?"unshift":"push"]((()=>{Se.iframe=N,r(6,Se)}))},function(N){Zr[N?"unshift":"push"]((()=>{Pe=N,r(7,Pe)}))}]}class Sc extends _c{constructor(n){super(),gc(this,n,jv,Zv,cc,{activeFeatureToggleList:9,allowRules:0,anchor:10,authData:11,clientPermissions:12,context:8,deferInit:13,dirtyStatus:14,documentTitle:15,hasBack:16,label:1,locale:17,noShadow:18,nodeParams:19,pathParams:20,sandboxRules:2,searchParams:21,skipCookieCheck:22,skipInitCheck:23,theme:24,userSettings:25,viewurl:3,webcomponent:4,unwarn:26},null,[-1,-1])}get activeFeatureToggleList(){return this.$$.ctx[9]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),K()}get allowRules(){return this.$$.ctx[0]}set allowRules(n){this.$$set({allowRules:n}),K()}get anchor(){return this.$$.ctx[10]}set anchor(n){this.$$set({anchor:n}),K()}get authData(){return this.$$.ctx[11]}set authData(n){this.$$set({authData:n}),K()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(n){this.$$set({clientPermissions:n}),K()}get context(){return this.$$.ctx[8]}set context(n){this.$$set({context:n}),K()}get deferInit(){return this.$$.ctx[13]}set deferInit(n){this.$$set({deferInit:n}),K()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),K()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(n){this.$$set({documentTitle:n}),K()}get hasBack(){return this.$$.ctx[16]}set hasBack(n){this.$$set({hasBack:n}),K()}get label(){return this.$$.ctx[1]}set label(n){this.$$set({label:n}),K()}get locale(){return this.$$.ctx[17]}set locale(n){this.$$set({locale:n}),K()}get noShadow(){return this.$$.ctx[18]}set noShadow(n){this.$$set({noShadow:n}),K()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(n){this.$$set({nodeParams:n}),K()}get pathParams(){return this.$$.ctx[20]}set pathParams(n){this.$$set({pathParams:n}),K()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(n){this.$$set({sandboxRules:n}),K()}get searchParams(){return this.$$.ctx[21]}set searchParams(n){this.$$set({searchParams:n}),K()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(n){this.$$set({skipCookieCheck:n}),K()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),K()}get theme(){return this.$$.ctx[24]}set theme(n){this.$$set({theme:n}),K()}get userSettings(){return this.$$.ctx[25]}set userSettings(n){this.$$set({userSettings:n}),K()}get viewurl(){return this.$$.ctx[3]}set viewurl(n){this.$$set({viewurl:n}),K()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(n){this.$$set({webcomponent:n}),K()}get unwarn(){return this.$$.ctx[26]}}function ew(i){Bv(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function tw(i){let n;return{c(){n=mr("main"),mt(n,"class","svelte-1buc46y")},m(r,a){Fn(r,n,a),i[21](n)},p:gn,i:gn,o:gn,d(r){r&&pn(n),i[21](null)}}}function nw(i,n,r){let a,o,{activeFeatureToggleList:c}=n,{anchor:l}=n,{clientPermissions:f}=n,{compoundConfig:p}=n,{context:m}=n,{deferInit:E}=n,{dirtyStatus:y}=n,{documentTitle:C}=n,{hasBack:b}=n,{locale:R}=n,{noShadow:x}=n,{nodeParams:U}=n,{pathParams:H}=n,{searchParams:re}=n,{skipInitCheck:we}=n,{theme:ge}=n,{userSettings:qe}=n,{viewurl:Le}=n,{webcomponent:Ze}=n,Re=!1;const Ae=new Ka,Se=new wc,Pe=D=>{if(!p||Re)return;D.updateContext=($e,yn)=>{const N=D.getNoShadow()?D:a;N._luigi_mfe_webcomponent.context=$e,r(1,m=$e);const ot=N._luigi_mfe_webcomponent;ot&&ot.querySelectorAll("[lui_web_component]")?.forEach((ke=>{const jt=ke.context||{};ke.context=Object.assign(jt,$e)}))};const Zt=Kr.resolveContext(m);r(2,E=!1),D.notifyAlertClosed=($e,yn)=>{D.isConnected&&Se.resolveAlert($e,yn)},D.notifyConfirmationModalClosed=$e=>{D.isConnected&&Se.notifyConfirmationModalClosed(!!$e)};const wt={compound:p,viewUrl:Le,webcomponent:Kr.checkWebcomponentValue(Ze)||!0};D.getNoShadow()?D.innerHTML="":(r(0,a.innerHTML="",a),D.attachShadow({mode:"open"}).append(a)),Se.renderWebComponentCompound(wt,D.getNoShadow()?D:a,Zt).then(($e=>{o=$e,we||!wt.viewUrl?(D.initialized=!0,setTimeout((()=>{Se.dispatchLuigiEvent($.INITIALIZED,{})}))):o.LuigiClient&&!o.deferLuigiClientWCInit&&(D.initialized=!0,Se.dispatchLuigiEvent($.INITIALIZED,{}))})),Re=!0,D.containerInitialized=!0};return dc((async()=>{const D=a.getRootNode()===document?a.parentNode:a.getRootNode().host;D.init=()=>{Pe(D)},E||Pe(D),Ae.registerContainer(D),Se.thisComponent=D})),i.$$set=D=>{"activeFeatureToggleList"in D&&r(3,c=D.activeFeatureToggleList),"anchor"in D&&r(4,l=D.anchor),"clientPermissions"in D&&r(5,f=D.clientPermissions),"compoundConfig"in D&&r(6,p=D.compoundConfig),"context"in D&&r(1,m=D.context),"deferInit"in D&&r(2,E=D.deferInit),"dirtyStatus"in D&&r(7,y=D.dirtyStatus),"documentTitle"in D&&r(8,C=D.documentTitle),"hasBack"in D&&r(9,b=D.hasBack),"locale"in D&&r(10,R=D.locale),"noShadow"in D&&r(11,x=D.noShadow),"nodeParams"in D&&r(12,U=D.nodeParams),"pathParams"in D&&r(13,H=D.pathParams),"searchParams"in D&&r(14,re=D.searchParams),"skipInitCheck"in D&&r(15,we=D.skipInitCheck),"theme"in D&&r(16,ge=D.theme),"userSettings"in D&&r(17,qe=D.userSettings),"viewurl"in D&&r(18,Le=D.viewurl),"webcomponent"in D&&r(19,Ze=D.webcomponent)},[a,m,E,c,l,f,p,y,C,b,R,x,U,H,re,we,ge,qe,Le,Ze,()=>c&&l&&f&&y&&C&&b&&R&&x&&U&&H&&re&&we&&ge&&qe,function(D){Zr[D?"unshift":"push"]((()=>{a=D,r(0,a)}))}]}mc(Sc,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},allowRules:{type:"Array",reflect:!1,attribute:"allow-rules"},anchor:{type:"String",reflect:!1,attribute:"anchor"},authData:{type:"Object",reflect:!1,attribute:"auth-data"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},label:{type:"String",reflect:!1,attribute:"label"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow"},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},sandboxRules:{type:"Array",reflect:!1,attribute:"sandbox-rules"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipCookieCheck:{type:"String",reflect:!1,attribute:"skip-cookie-check"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{sendCustomMessage=n("sendCustomMessage");updateContext=n("updateContext");updateViewUrl=n("updateViewUrl");closeAlert=n("closeAlert");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.error("Error in super.attributeChangedCallback",c)}this.containerInitialized&&(r==="context"&&this.updateContext(JSON.parse(o)),r==="auth-data"&&ur.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class Kl extends _c{constructor(n){super(),gc(this,n,nw,tw,cc,{activeFeatureToggleList:3,anchor:4,clientPermissions:5,compoundConfig:6,context:1,deferInit:2,dirtyStatus:7,documentTitle:8,hasBack:9,locale:10,noShadow:11,nodeParams:12,pathParams:13,searchParams:14,skipInitCheck:15,theme:16,userSettings:17,viewurl:18,webcomponent:19,unwarn:20},ew)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),K()}get anchor(){return this.$$.ctx[4]}set anchor(n){this.$$set({anchor:n}),K()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(n){this.$$set({clientPermissions:n}),K()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(n){this.$$set({compoundConfig:n}),K()}get context(){return this.$$.ctx[1]}set context(n){this.$$set({context:n}),K()}get deferInit(){return this.$$.ctx[2]}set deferInit(n){this.$$set({deferInit:n}),K()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),K()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(n){this.$$set({documentTitle:n}),K()}get hasBack(){return this.$$.ctx[9]}set hasBack(n){this.$$set({hasBack:n}),K()}get locale(){return this.$$.ctx[10]}set locale(n){this.$$set({locale:n}),K()}get noShadow(){return this.$$.ctx[11]}set noShadow(n){this.$$set({noShadow:n}),K()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(n){this.$$set({nodeParams:n}),K()}get pathParams(){return this.$$.ctx[13]}set pathParams(n){this.$$set({pathParams:n}),K()}get searchParams(){return this.$$.ctx[14]}set searchParams(n){this.$$set({searchParams:n}),K()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),K()}get theme(){return this.$$.ctx[16]}set theme(n){this.$$set({theme:n}),K()}get userSettings(){return this.$$.ctx[17]}set userSettings(n){this.$$set({userSettings:n}),K()}get viewurl(){return this.$$.ctx[18]}set viewurl(n){this.$$set({viewurl:n}),K()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(n){this.$$set({webcomponent:n}),K()}get unwarn(){return this.$$.ctx[20]}}mc(Kl,{activeFeatureToggleList:{type:"Array",reflect:!1,attribute:"active-feature-toggle-list"},anchor:{type:"String",reflect:!1,attribute:"anchor"},clientPermissions:{type:"Object",reflect:!1,attribute:"client-permissions"},compoundConfig:{type:"Object",reflect:!1,attribute:"compound-config"},context:{type:"String",reflect:!1,attribute:"context"},deferInit:{type:"Boolean",attribute:"defer-init"},dirtyStatus:{type:"Boolean",reflect:!1,attribute:"dirty-status"},documentTitle:{type:"String",reflect:!1,attribute:"document-title"},hasBack:{type:"Boolean",reflect:!1,attribute:"has-back"},locale:{type:"String",reflect:!1,attribute:"locale"},noShadow:{type:"Boolean",attribute:"no-shadow",reflect:!1},nodeParams:{type:"Object",reflect:!1,attribute:"node-params"},pathParams:{type:"Object",reflect:!1,attribute:"path-params"},searchParams:{type:"Object",reflect:!1,attribute:"search-params"},skipInitCheck:{type:"Boolean",reflect:!1,attribute:"skip-init-check"},theme:{type:"String",reflect:!1,attribute:"theme"},userSettings:{type:"Object",reflect:!1,attribute:"user-settings"},viewurl:{type:"String",reflect:!1,attribute:"viewurl"},webcomponent:{type:"String",reflect:!1,attribute:"webcomponent"}},[],["unwarn"],!1,(i=>{let n=r=>()=>console.warn(r+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends i{updateContext=n("updateContext");notifyAlertClosed=n("notifyAlertClosed");notifyConfirmationModalClosed=n("notifyConfirmationModalClosed");attributeChangedCallback(r,a,o){try{super.attributeChangedCallback(r,a,o)}catch(c){console.warn("Error in attributeChangedCallback",c)}this.containerInitialized&&r==="context"&&this.updateContext(JSON.parse(o))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}})),customElements.get("luigi-container")||customElements.define("luigi-container",Sc.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Kl.element);const as={sanitizeHtml(i=""){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(i=""){return i.replace(/&lt;br\/&gt;/g,"<br>").replace(/&lt;br \/&gt;/g,"<br>").replace(/&lt;br&gt;/g,"<br>").replace(/&lt;br &gt;/g,"<br>")},restoreSanitizedElements(i=""){let n=i;const r=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let a=0;a<r.length;a++){const o=new RegExp(`&lt;${r[a]}/&gt;`,"g"),c=new RegExp(`&lt;${r[a]} /&gt;`,"g"),l=new RegExp(`&lt;${r[a]}&gt;`,"g"),f=new RegExp(`&lt;${r[a]} &gt;`,"g"),p=new RegExp(`&lt;/${r[a]}[/]&gt;`,"g"),m=new RegExp(`&lt;/${r[a]} [/]&gt;`,"g"),E=new RegExp(`&lt;[/]${r[a]}&gt;`,"g"),y=new RegExp(`&lt;[/]${r[a]} &gt;`,"g");n=n.replace(o,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(f,`<${r[a]}>`).replace(p,`</${r[a]}>`).replace(m,`</${r[a]}>`).replace(E,`</${r[a]}>`).replace(y,`</${r[a]}>`)}return n},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&sol;")},escapeKeyForRegexp(i=""){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(i="",n,r){const o={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(i)),links:[]};return n?Object.entries(n).reduce((c,[l,f])=>{const p=`_luigi_alert_${r}_link_${this.sanitizeParam(l)}`,m=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),E=`<a id="${p}">${m}</a>`,y=this.escapeKeyForRegexp(l),C=new RegExp(`({${y}})`,"g");return{sanitizedText:c.sanitizedText.replace(C,E),links:c.links.concat({elemId:p,url:f.url?encodeURI(this.sanitizeHtml(f.url)):void 0,dismissKey:f.dismissKey?encodeURI(this.sanitizeHtml(f.dismissKey)):void 0})}},o):o}},O={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(i,n,r){let a=n;const[o,c]=a.split("?"),l=new URLSearchParams(c);return this.modifySearchParams(i,l,r),a=o,l.toString()!==""&&(a+=`?${l.toString()}`),a},modifySearchParams(i,n,r){for(const[a,o]of Object.entries(i)){const c=r?`${r}${a}`:a;n.set(c,o),o===void 0&&n.delete(c)}},filterNodeParams(i,n){const r=Object.create(null),a=this.getContentViewParamPrefix(n);return i&&Object.entries(i).forEach(o=>{if(o[0].startsWith(a)){const c=o[0].substr(a.length);r[c]=o[1]}}),this.sanitizeParamsMap(r)},mapPathToNode(i,n){if(!i||!n)return;const r=F.trimLeadingSlash(i).split("/"),a=O.buildRoute(n,`/${n.pathSegment}`),o=F.trimLeadingSlash(a).split("/");if(r.length<o.length)return;let c="";for(let l=0;l<o.length;l++){if(r[l]!==o[l]&&o[l].indexOf(":")!==0)return;c+="/"+r[l]}return c},async getNodeLabel(i,n){if(i.label&&!i._virtualTree)return n.i18n().getTranslation(i.label)||i.label;if(i.pathSegment&&i.pathSegment.indexOf(":")===0){const r=n.getConfig().routing?.useHashRouting,a=O.mapPathToNode(O.getCurrentPath(r)?.path,i)||"",o=await n.navigation().navService.extractDataFromPath(a);return O.getDynamicNodeValue(i,o.pathData.pathParams)||""}return i.pathSegment?i.pathSegment:""},getContentViewParamPrefix(i){let n=i?.getConfigValue("routing.nodeParamPrefix");return n===!1?n="":n||(n=this.defaultContentViewParamPrefix),n},sanitizeParamsMap(i){return Object.entries(i).reduce((n,r)=>(n[as.sanitizeParam(r[0])]=as.sanitizeParam(r[1]),n),{})},prepareSearchParamsForClient(i,n){const r={};return i&&i.clientPermissions&&i.clientPermissions.urlParameters&&Object.keys(i.clientPermissions.urlParameters).forEach(a=>{a in n.routing().getSearchParams()&&i.clientPermissions?.urlParameters&&i.clientPermissions.urlParameters[a]?.read===!0&&(r[a]=n.routing().getSearchParams()[a])}),r},getCurrentPath(i){if(i){const n=Ee.normalizePath(location.hash),[r,a]=n.split("?");return{path:r,query:a}}else return{path:Ee.normalizePath(location.pathname),query:location.search}},getModalPathFromPath(i){return this.getQueryParam(this.getModalViewParamName(i),i)},getQueryParam(i,n){return this.getQueryParams(n)[i]},getQueryParams(i){return i.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return O.getLocation().search?O.parseParams(O.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=O.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?O.parseParams(O.getLocation().hash.slice(i+1)):{}},getModalViewParamName(i){let n=i.getConfigValue("routing.modalPathParam");return n||(n=this.defaultModalViewParamName),n},parseParams(i){const n=new URLSearchParams(i),r=new Map;for(const[a,o]of n.entries())r.set(a,o);return Object.fromEntries(r)},getModalParamsFromPath(i){const n=this.getQueryParam(`${this.getModalViewParamName(i)}Params`,i);return n&&JSON.parse(n)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(i,n){const r=new URLSearchParams(i);return r.delete(n),r.delete(`${n}Params`),r.toString()},handleHistoryState(i,n){return i&&i.modalHistoryLength?i.modalHistoryLength+=1:i={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:n},i},encodeParams(i){const n=[];for(const r in i)n.push(encodeURIComponent(r)+"="+encodeURIComponent(i[r]));return n.join("&")},getLastNodeObject(i){return(i.nodesInPath?[...i.nodesInPath].pop():{})||{}},checkWCUrl(i,n){if(i.indexOf("://")>0||i.trim().indexOf("//")===0){if(new URL(i).host===window.location.host)return!0;const a=n.getConfigValue("navigation.validWebcomponentUrls");if(a?.length>0)for(const o of a)try{if(new RegExp(o).test(i))return!0}catch(c){console.error(c)}return!1}return!0},setFeatureToggles(i,n,r){const a=this.sanitizeParamsMap(this.parseParams(n.split("?")[1]));let o;if(a[i]&&(o=a[i]),!o)return;const c=o.split(",");c.length>0&&c[0]!==""&&c.forEach(l=>r?.setFeatureToggle(l,!0))},substituteDynamicParamsInObject(i,n,r=":",a=!1){return Object.entries(i).map(([o,c])=>{const l=a?Object.keys(n).find(f=>c&&c.indexOf(r+f)>=0):Object.keys(n).find(f=>c===r+f);return[o,l?a?c.replace(r+l,n[l]):n[l]:c]}).reduce((o,[c,l])=>Object.assign(o,{[c]:l}),{})},isDynamicNode(i){return typeof i.pathSegment=="string"&&i.pathSegment.length>0&&i.pathSegment[0]===":"},getDynamicNodeValue(i,n){return this.isDynamicNode(i)&&i.pathSegment?n[i.pathSegment.substring(1)]:void 0},isExistingRoute(i,n){const r=i?.split("/")||[],a=n?.nodesInPath||[],o=(l,f)=>{let p=null;if(l?.children?.length){const m=l.children.filter(E=>E.pathSegment===f);m?.length&&(p=m[0])}return p};let c=[];if(r.length>1&&a.length===1){let l;r.forEach((f,p)=>{const m=p===0?a[0]:l;l=o(m,f),l?.pathSegment&&c.push(l.pathSegment)})}else c=a.filter(l=>l.pathSegment).map(l=>l.pathSegment||"");return!i||r.length===c.length},async pathExists(i,n){const r=F.getTrimmedUrl(i),a=await n.navigation().navService.getPathData(i),o=O.isExistingRoute(r,a);return a?o:!1},showRouteNotFoundAlert(i,n=!1,r){const a={text:r.i18n().getTranslation(n?"luigi.notExactTargetNode":"luigi.requestedRouteNotFound",{route:i}),type:"error",ttl:1};r.ux().showAlert(a)},getPageNotFoundRedirectResult(i,n=!1,r){const a=r.getConfigValue("routing.pageNotFoundHandler");if(typeof a=="function"){const o=a(i,n);if(o&&(o.redirectTo||o.ignoreLuigiErrorHandling))return{path:o.redirectTo,keepURL:o.keepURL,ignoreLuigiErrorHandling:o.ignoreLuigiErrorHandling}}return{}},async handlePageNotFoundAndRetrieveRedirectPath(i,n,r){if(n)return i;const a=r.getConfigValue("routing.pageNotFoundHandler"),o=this.getPageNotFoundRedirectResult(i,a,r)?.path;if(o!==void 0)return o;this.showRouteNotFoundAlert(i,!1,r),console.warn(`Could not find the requested route: ${i}`)},async getDefaultChildNode(i,n){if(!i)return"";const r=i.nodesInPath&&i.nodesInPath[i.nodesInPath.length-1],a=i.context,o=n?await n(r,a):await Mn.getConfigValueFromObjectAsync(r,"children",a),c=o.find(l=>l.pathSegment===r.defaultChildNode);if(r.defaultChildNode&&c)return r.defaultChildNode;if(o&&o.length){if(i?.nodesInPath?.length===1){const p=o.find(m=>m.pathSegment);return p&&p.pathSegment||console.error("At least one navigation node in the root hierarchy must have a pathSegment.")}const f=o.find(p=>p.pathSegment&&(p.viewUrl||p.compound||p.externalLink&&p.externalLink.url));if(f)return f.pathSegment}return""},getNodePath(i,n){return!i||n?i?this.buildRoute(i,i.pathSegment?"/"+i.pathSegment:"",n):"":`${i.parent?this.getNodePath(i.parent):""}/${i.pathSegment}`},buildRoute(i,n,r){return i.parent?this.buildRoute(i.parent,`/${i.parent.pathSegment}${n}`,r):n+(r?"?"+r:"")},substituteViewUrl(i,n,r){if(!i.viewUrl)return"";let a=i.viewUrl;return i.virtualTree&&(a=a.replace("{virtualTreePath}","")),a=F.replaceVars(a,n,":",!1),a},getSubPath(i,n){return F.replaceVars(O.getNodePath(i),n,":",!1)},concatenatePath(i,n){let r=F.getPathWithoutHashOrSlash(i);return r?(n&&(r.endsWith("/")&&(r=r.substring(0,r.length-1)),n.startsWith("/")||(r+="/"),r+=n),r):n}},Ee={normalizePath:i=>{if(!i||i.length<=0)return i;let n=i;return n.startsWith("#")&&(n=n.substring(1)),n.startsWith("/")&&(n=n.substring(1)),n},segmentMatches:(i,n,r)=>!!(i===n||n.startsWith(":")&&r&&r[n.substr(1)]===i),checkMatch:(i,n,r)=>{let a=!0;return F.trimTrailingSlash(F.trimLeadingSlash(i)).split("/").forEach((o,c)=>{a&&(c+1>=n.length||!n[c+1]?.pathSegment||!Ee.segmentMatches(o,n[c+1]?.pathSegment??"",r??{}))&&(a=!1)}),a},checkVisibleForFeatureToggles:(i,n)=>{if(i?.visibleForFeatureToggles){const r=n?.getActiveFeatureToggleList()||[];for(const a of i.visibleForFeatureToggles)if(a.startsWith("!")){if(r.includes(a.slice(1)))return!1}else if(!r.includes(a))return!1}return!0},generateTooltipText:(i,n,r)=>{let a=i?.tooltipText;switch(a===void 0&&(a=r.getConfigValue("navigation.defaults.tooltipText")),a){case void 0:return n;case!1:return"";default:return r.i18n().getTranslation(a)}},isNodeAccessPermitted:(i,n,r,a)=>{if(a.auth().isAuthorizationEnabled()){const l=dn.isLoggedIn(),f=i.anonymousAccess;if(l&&f==="exclusive"||!l&&f!=="exclusive"&&f!==!0)return!1}const o=a.featureToggles();if(!Ee.checkVisibleForFeatureToggles(i,o))return!1;const c=a.getConfigValue("navigation.nodeAccessibilityResolver");return typeof c!="function"?!0:c(i,n,r)},applyContext:(i,n,r)=>{if(n)for(let a in n)i[a]=n[a];return r&&i.parentNavigationContexts&&i.parentNavigationContexts.unshift(r),i},updateHeaderTitle:(i,n)=>{const r=i?.items;if(r&&n){let a="";return[...r].sort((o,c)=>(c.link||"").localeCompare(o.link||"")).some(o=>{let c=!1;if(c=Ee.checkMatch(o.link||"",n.nodesInPath??[]),!c&&o.selectionConditions&&o.selectionConditions.route&&(c=Ee.checkMatch(o.selectionConditions.route,n.nodesInPath??[]),c&&(o.selectionConditions.contextCriteria||[]).forEach(l=>{c=c&&n?.selectedNode?.context?.[l.key]===l.value})),c)return a=o.title||"",!0}),a}},buildPath(i,n){return i.map(a=>{const o=a.pathSegment;if(o?.startsWith(":")){const c=o.slice(1),l=n?.pathParams?.[c];if(l!=null)return encodeURIComponent(String(l))}return o}).join("/")},mergeContext(...i){return Object.assign({},...i)},prepareForTests(...i){let n="";return i.forEach(r=>{r&&(n+=(n?"_":"")+encodeURIComponent(r.toLowerCase().split(" ").join("")))}),n},findVirtualTreeRootNode(i){if(i.virtualTree)return i;if(i.parent)return Ee.findVirtualTreeRootNode(i.parent)},validatePathAndGetRedirect:async(i,n)=>{const r=await O.pathExists(i,n);return await O.handlePageNotFoundAndRetrieveRedirectPath(i,r,n)||void 0},async fetchNodeTitleData(i,n){return new Promise((r,a)=>{if(!i.titleResolver){a(new Error("No title resolver defined at node"));return}const o={...i.titleResolver};delete o._cache;const c=this.substituteVars(o,n),l=JSON.stringify(c);if(i.titleResolver._cache&&i.titleResolver._cache.key===l){r(i.titleResolver._cache.value);return}const f=c.request;this._fetch(f.url,{method:f.method,headers:f.headers,body:JSON.stringify(f.body)}).then(p=>{p.json().then(m=>{try{const E=this.processTitleData(m,c);i.titleResolver._cache={key:l,value:E},r(E)}catch(E){a(E)}})}).catch(p=>{a(p)})})},getPropertyChainValue(i,n,r){return!n||!i?r:Fa.get(i,n,r)},substituteVars(i,n){const a=JSON.stringify(i).replace(/\$\{[a-zA-Z0-9$_.]+\}/g,o=>{const c=o.substr(2,o.length-3);return this.getPropertyChainValue(n,c)||o});return JSON.parse(a)},_fetch(i,n){return fetch(i,n)},processTitleData(i,n){let r=this.getPropertyChainValue(i,n.titlePropertyChain);return r&&(r=r.trim()),r&&n.titleDecorator&&(r=n.titleDecorator.replace("%s",r)),{label:r||n.fallbackTitle,icon:this.getPropertyChainValue(i,n.iconPropertyChain,n.fallbackIcon)}}};class vn{constructor(){this.dataManagement=new Map}setChildren(n,r){this.dataManagement.set(n,r),this.navPath=""}getChildren(n){return n?this.dataManagement.get(n):{}}hasChildren(n){const r=this.getChildren(n);return!!(r&&Object.prototype.hasOwnProperty.call(r,"children"))}setRootNode(n){this.dataManagement.set("_luigiRootNode",{node:n})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(n){if(this.hasChildren(n)){const r=this.getChildren(n).children;for(let a=0;a<r.length;a++)this.deleteNodesRecursively(r[a])}this.dataManagement.delete(n)}}const Oa={logout:{label:"Sign Out",icon:"log"}};class rw{constructor(){this.services=new Map}register(n,r,a=!0){this.services.set(n,{factory:r,singleton:a})}get(n){const r=this.services.get(n);if(!r)throw new Error(`Service '${n}' is not registered.`);return r.singleton?(r.instance||(r.instance=r.factory()),r.instance):r.factory()}}const q=new rw;class xt{constructor(n){this.luigi=n,this.luigi=n,this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(n,r){if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const a=new Set;a.add(r),this.unsavedChanges={dirtySet:a}}this.unsavedChanges.persistUrl=window.location.href,n?this.unsavedChanges.dirtySet?.add(r):this.unsavedChanges.dirtySet?.delete(r)}clearDirtyState(n){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(n?this.unsavedChanges.dirtySet.delete(n):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}getUnsavedChangesModalPromise(n){if(!this.shouldShowUnsavedChangesModal(n))return Promise.resolve();const r=this.luigi.getConfigValue("settings.unsavedChangesHandler");if(r)return r().then(()=>this.clearDirtyState(n));const a={header:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.header"),body:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.body"),buttonDismiss:this.luigi.i18n().getTranslation("luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation("luigi.button.confirm")};return new Promise((o,c)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(a,{confirm:()=>{this.clearDirtyState(n),o()},dismiss:()=>{c()}})})}shouldShowUnsavedChangesModal(n){return n?this.unsavedChanges.dirtySet?.has(n)??!1:this.readDirtyStatus()}}class wn{constructor(n){this.luigi=n,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const n=[...this._modalStack];for(const{onInternalClose:r}of n)try{typeof r=="function"&&r()}catch(a){console.warn("onInternalClose threw an error",a)}this.clearModalStack()}registerModal(n){n&&this._modalStack.push(n)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(n){if(this._modalStack.length>0){const r=this._modalStack[0];r.modalsettings={...r.modalsettings,...n}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){G.modalContainer.pop(),this._modalStack.pop()}async closeModalsWithDirtyCheck(){const n=q.get(xt);for(const r of G.modalContainer)if(n.shouldShowUnsavedChangesModal(r))try{await n.getUnsavedChangesModalPromise(r)}catch{return!1}return await this.closeModals(),!0}}class Sn{constructor(n){this.luigi=n,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=q.get(wn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=q.get(vn)),this.nodeDataManagementService}async getPathData(n){const r=this.luigi.getConfig();let a=n.split("/");a?.length>0&&a[0]===""&&(a=a.slice(1));let c=r.navigation?.globalContext||{},l;if(this.getNodeDataManagementService().hasRootNode())l=this.getNodeDataManagementService().getRootNode().node;else{const y=await this.luigi.getConfigValueAsync("navigation.nodes");typeof y=="object"&&!Array.isArray(y)?(l=y,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:y},l.children=await this.getChildren(l,c),l.children=this.prepareRootNodes(l.children||[],c),this.getNodeDataManagementService().setRootNode(l)}const f={...c||{},...l.context||{}},p={},m={context:f,selectedNodeChildren:l.children,nodesInPath:[l],rootNodes:l.children,pathParams:p,matchedPath:""};if(l.viewUrl&&a.length===0)m.selectedNode=l;else for(const y of a)if(m.selectedNodeChildren){const C=this.findMatchingNode(y,m.selectedNodeChildren||[]);if(!C){console.warn("No matching node found for segment:",y);break}const b=C.context||{},R=Ee.mergeContext(c,b);let x=R;if(C.pathSegment?.startsWith(":")&&(p[C.pathSegment.replace(":","")]=as.sanitizeParam(y),x=O.substituteDynamicParamsInObject(R,p)),c=x,C.context=x,m.selectedNode=C,m.selectedNode&&m.nodesInPath?.push(m.selectedNode),C.virtualTree||C._virtualTree){const U=this.buildVirtualTree(C,y,p);U&&U.length>0&&(C.children=U)}m.selectedNodeChildren=await this.getChildren(C,c)}const E=m.nodesInPath?.filter(y=>y.pathSegment).map(y=>y.pathSegment)||[];return m.matchedPath=a.filter((y,C)=>E[C]&&E[C].startsWith(":")||E[C]===y).join("/")||"",m}findMatchingNode(n,r){let a;const o=r.filter(l=>!!l.pathSegment).length,c=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":")).length;if(o>1&&(c===1&&(console.warn(`Invalid node setup detected.
87
+ }</style> <iframe></iframe>`,1),ZE=gu("<main><!></main>");function Gd(r,t){nu(t,!1);let n=ee(t,"activeFeatureToggleList"),s=ee(t,"allowRules"),o=ee(t,"anchor"),l=ee(t,"authData"),u=ee(t,"clientPermissions"),f=ee(t,"context"),h=ee(t,"deferInit"),g=ee(t,"dirtyStatus"),_=ee(t,"documentTitle"),m=ee(t,"hasBack"),w=ee(t,"label"),E=ee(t,"locale"),T=ee(t,"noShadow"),R=ee(t,"nodeParams"),P=ee(t,"pathParams"),D=ee(t,"sandboxRules"),H=ee(t,"searchParams"),Z=ee(t,"skipCookieCheck"),de=ee(t,"skipInitCheck"),_e=ee(t,"theme"),pe=ee(t,"userSettings"),oe=ee(t,"viewurl"),me=ee(t,"webcomponent");const Re=wi({});let ae=wi(),lt=wi(!1),ut=wi();const Kt=new Bd,V=()=>n()&&s()&&o()&&l()&&u()&&g()&&_()&&m()&&E()&&T()&&R()&&P()&&D()&&H()&&Z()&&de()&&_e()&&pe(),Bn=N=>{if(!q(lt)){N.sendCustomMessage=(ne,qe)=>{gi.sendCustomMessage(ne,N.getNoShadow()?N:q(ae),!!me(),q(Re),qe)},N.updateContext=(ne,qe)=>{if(f(ne),me())(N.getNoShadow()?N:q(ae))._luigi_mfe_webcomponent.context=ne;else{const hn={...qe||{},activeFeatureToggleList:N.activeFeatureToggleList||[],currentLocale:N.locale,currentTheme:N.theme,userSettings:N.userSettings||null,cssVariables:N.cssVariables||{},anchor:N.anchor||"",drawer:N.drawer||!1,modal:N.modal||!1,viewStackSize:N.viewStackSize||0,isNavigateBack:N.isNavigateBack||!1};gi.updateContext(ne,hn,q(Re),R(),P(),H())}},N.closeAlert=(ne,qe)=>{N.notifyAlertClosed(ne,qe)},N.notifyAlertClosed=(ne,qe)=>{N.isConnected&&(me()?Kt.resolveAlert(ne,qe):gi.notifyAlertClosed(ne,qe,q(Re)))},N.notifyConfirmationModalClosed=ne=>{N.isConnected&&(me()?Kt.notifyConfirmationModalClosed(!!ne):gi.notifyConfirmationModalClosed(!!ne,q(Re)))},nr.registerContainer(N),Kt.thisComponent=N;const Ae=hs.resolveContext(f());if(N.updateViewUrl=(ne,qe)=>{ne?.length&&gi.updateViewUrl(ne,hs.resolveContext(f()),qe,q(Re))},me()&&me()!="false"){N.getNoShadow()?N.innerHTML="":(as(ae,q(ae).innerHTML=""),N.attachShadow({mode:"open"}).append(q(ae)));const ne=hs.checkWebcomponentValue(me());Kt.renderWebComponent(oe(),N.getNoShadow()?N:q(ae),Ae,typeof ne=="object"?{webcomponent:ne}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(q(ae)));de()?(N.initialized=!0,setTimeout(()=>{Kt.dispatchLuigiEvent($.INITIALIZED,{})})):me()&&(N.getNoShadow()?N:q(ae)).addEventListener("wc_ready",()=>{(N.getNoShadow()?N:q(ae))._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,Kt.dispatchLuigiEvent($.INITIALIZED,{}))}),vt(lt,!0),N.containerInitialized=!0}};var _r;Gl(async()=>{vt(ut,q(ae).parentNode),as(ut,q(ut).iframeHandle=q(Re)),as(ut,q(ut).init=()=>{Bn(q(ut))}),!h()&&oe()&&Bn(q(ut))}),_r=async()=>{},Te===null&&Yh("onDestroy"),Gl(()=>()=>kn(_r)),(function(N,Ae){var ne={effect:null,ran:!1,deps:N};Te.l.$.push(ne),ne.effect=Ss(()=>{if(N(),!ne.ran){ne.ran=!0;var qe=te;try{It(qe.parent),kn(Ae)}finally{It(qe)}}})})(()=>(q(lt),di(oe()),di(h()),q(ut)),()=>{!q(lt)&&oe()&&!h()&&q(ut)&&Bn(q(ut))}),(function(){var N=Te;Ss(()=>{for(var Ae of N.l.$){Ae.deps();var ne=Ae.effect;(ne.f&He)!==0&&ne.deps!==null&&Oe(ne,En),ki(ne)&&Qr(ne),Ae.ran=!1}})})();var mt={unwarn:V,get activeFeatureToggleList(){return n()},set activeFeatureToggleList(N){n(N),X()},get allowRules(){return s()},set allowRules(N){s(N),X()},get anchor(){return o()},set anchor(N){o(N),X()},get authData(){return l()},set authData(N){l(N),X()},get clientPermissions(){return u()},set clientPermissions(N){u(N),X()},get context(){return f()},set context(N){f(N),X()},get deferInit(){return h()},set deferInit(N){h(N),X()},get dirtyStatus(){return g()},set dirtyStatus(N){g(N),X()},get documentTitle(){return _()},set documentTitle(N){_(N),X()},get hasBack(){return m()},set hasBack(N){m(N),X()},get label(){return w()},set label(N){w(N),X()},get locale(){return E()},set locale(N){E(N),X()},get noShadow(){return T()},set noShadow(N){T(N),X()},get nodeParams(){return R()},set nodeParams(N){R(N),X()},get pathParams(){return P()},set pathParams(N){P(N),X()},get sandboxRules(){return D()},set sandboxRules(N){D(N),X()},get searchParams(){return H()},set searchParams(N){H(N),X()},get skipCookieCheck(){return Z()},set skipCookieCheck(N){Z(N),X()},get skipInitCheck(){return de()},set skipInitCheck(N){de(N),X()},get theme(){return _e()},set theme(N){_e(N),X()},get userSettings(){return pe()},set userSettings(N){pe(N),X()},get viewurl(){return oe()},set viewurl(N){oe(N),X()},get webcomponent(){return me()},set webcomponent(N){me(N),X()}};Fd();var Je=ZE(),wt=(function(N,Ae){if(!Ue)return Li(N);var ne=Li(Ee);return ne===null&&(ne=Ee.appendChild(kr())),wn(ne),ne})(Je),jr=N=>{var Ae=(function(){if(Ue)return bi(Ee,null),Ee;var hn=document.createDocumentFragment(),xt=document.createComment(""),St=kr();return hn.append(xt,St),bi(xt,St),hn})(),ne=gh(Ae),qe=hn=>{var xt=XE(),St=(function(mr,bn=1,wr=!1){let Lt=Ue?Ee:mr;for(var Sr;bn--;)Sr=Lt,Lt=Wn(Lt);if(!Ue)return Lt;if(wr){if(Lt?.nodeType!==3){var Rn=kr();return Lt===null?Sr?.after(Rn):Lt.before(Rn),wn(Rn),Rn}md(Lt)}return wn(Lt),Lt})(gh(xt),2);Ql(St,mr=>as(Re,q(Re).iframe=mr),()=>q(Re)?.iframe),ph((mr,bn)=>{Ra(St,"src",oe()),Ra(St,"title",w()),Ra(St,"allow",mr),Ra(St,"sandbox",bn)},[()=>(di(Rh),di(s()),kn(()=>Rh(s()))),()=>(di(D()),kn(()=>D()?D().join(" "):void 0))]),fs(hn,xt)};Eh(ne,hn=>{me()&&me()!=="false"||hn(qe)}),fs(N,Ae)};return Eh(wt,N=>{q(lt)&&N(jr)}),(function(N){if(Ue){if(Wn(Ee)!==null)throw Ka(),Ai;Ee=N}})(Je),Ql(Je,N=>vt(ae,N),()=>q(ae)),ph(()=>GE(Je,1,BE(me()?void 0:"lui-isolated"))),fs(r,Je),kd(t,"unwarn",V),ru(mt)}Wd(Gd,{activeFeatureToggleList:{attribute:"active-feature-toggle-list",type:"Array"},allowRules:{attribute:"allow-rules",type:"Array"},anchor:{attribute:"anchor",type:"String"},authData:{attribute:"auth-data",type:"Object"},clientPermissions:{attribute:"client-permissions",type:"Object"},context:{attribute:"context",type:"String"},deferInit:{attribute:"defer-init",type:"Boolean"},dirtyStatus:{attribute:"dirty-status",type:"Boolean"},documentTitle:{attribute:"document-title",type:"String"},hasBack:{attribute:"has-back",type:"Boolean"},label:{attribute:"label",type:"String"},locale:{attribute:"locale",type:"String"},noShadow:{attribute:"no-shadow",type:"Boolean"},nodeParams:{attribute:"node-params",type:"Object"},pathParams:{attribute:"path-params",type:"Object"},sandboxRules:{attribute:"sandbox-rules",type:"Array"},searchParams:{attribute:"search-params",type:"Object"},skipCookieCheck:{attribute:"skip-cookie-check",type:"String"},skipInitCheck:{attribute:"skip-init-check",type:"Boolean"},theme:{attribute:"theme",type:"String"},userSettings:{attribute:"user-settings",type:"Object"},viewurl:{attribute:"viewurl",type:"String"},webcomponent:{attribute:"webcomponent",type:"String"}},[],["unwarn"],void 0,r=>{let t=n=>()=>console.warn(n+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends r{sendCustomMessage=t("sendCustomMessage");updateContext=t("updateContext");updateViewUrl=t("updateViewUrl");closeAlert=t("closeAlert");notifyAlertClosed=t("notifyAlertClosed");notifyConfirmationModalClosed=t("notifyConfirmationModalClosed");attributeChangedCallback(n,s,o){try{super.attributeChangedCallback(n,s,o)}catch(l){console.error("Error in super.attributeChangedCallback",l)}this.containerInitialized&&(n==="context"&&this.updateContext(JSON.parse(o)),n==="auth-data"&&gi.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}});var eC=gu('<main class="svelte-1yfh4yd"></main>');const tC={hash:"svelte-1yfh4yd",code:"main.svelte-1yfh4yd {width:100%;height:100%;border:none;}"};function Ih(r,t){nu(t,!1),VE(r,tC);let n,s=ee(t,"activeFeatureToggleList"),o=ee(t,"anchor"),l=ee(t,"clientPermissions"),u=ee(t,"compoundConfig"),f=ee(t,"context"),h=ee(t,"deferInit"),g=ee(t,"dirtyStatus"),_=ee(t,"documentTitle"),m=ee(t,"hasBack"),w=ee(t,"locale"),E=ee(t,"noShadow"),T=ee(t,"nodeParams"),R=ee(t,"pathParams"),P=ee(t,"searchParams"),D=ee(t,"skipInitCheck"),H=ee(t,"theme"),Z=ee(t,"userSettings"),de=ee(t,"viewurl"),_e=ee(t,"webcomponent"),pe=!1,oe=wi();const me=new pu,Re=new Bd,ae=()=>s()&&o()&&l()&&g()&&_()&&m()&&w()&&E()&&T()&&R()&&P()&&D()&&H()&&Z(),lt=V=>{if(!u()||pe)return;V.updateContext=(mt,Je)=>{const wt=V.getNoShadow()?V:q(oe);wt._luigi_mfe_webcomponent.context=mt,f(mt);const jr=wt._luigi_mfe_webcomponent;jr&&jr.querySelectorAll("[lui_web_component]")?.forEach(Ae=>{const ne=Ae.context||{};Ae.context=Object.assign(ne,mt)})};const Bn=hs.resolveContext(f());h(!1),V.notifyAlertClosed=(mt,Je)=>{V.isConnected&&Re.resolveAlert(mt,Je)},V.notifyConfirmationModalClosed=mt=>{V.isConnected&&Re.notifyConfirmationModalClosed(!!mt)};const _r={compound:u(),viewUrl:de(),webcomponent:hs.checkWebcomponentValue(_e())||!0};V.getNoShadow()?V.innerHTML="":(as(oe,q(oe).innerHTML=""),V.attachShadow({mode:"open"}).append(q(oe))),Re.renderWebComponentCompound(_r,V.getNoShadow()?V:q(oe),Bn).then(mt=>{n=mt,D()||!_r.viewUrl?(V.initialized=!0,setTimeout(()=>{Re.dispatchLuigiEvent($.INITIALIZED,{})})):n.LuigiClient&&!n.deferLuigiClientWCInit&&(V.initialized=!0,Re.dispatchLuigiEvent($.INITIALIZED,{}))}),pe=!0,V.containerInitialized=!0};Gl(async()=>{const V=q(oe).getRootNode()===document?q(oe).parentNode:q(oe).getRootNode().host;V.init=()=>{lt(V)},h()||lt(V),me.registerContainer(V),Re.thisComponent=V});var ut={unwarn:ae,get activeFeatureToggleList(){return s()},set activeFeatureToggleList(V){s(V),X()},get anchor(){return o()},set anchor(V){o(V),X()},get clientPermissions(){return l()},set clientPermissions(V){l(V),X()},get compoundConfig(){return u()},set compoundConfig(V){u(V),X()},get context(){return f()},set context(V){f(V),X()},get deferInit(){return h()},set deferInit(V){h(V),X()},get dirtyStatus(){return g()},set dirtyStatus(V){g(V),X()},get documentTitle(){return _()},set documentTitle(V){_(V),X()},get hasBack(){return m()},set hasBack(V){m(V),X()},get locale(){return w()},set locale(V){w(V),X()},get noShadow(){return E()},set noShadow(V){E(V),X()},get nodeParams(){return T()},set nodeParams(V){T(V),X()},get pathParams(){return R()},set pathParams(V){R(V),X()},get searchParams(){return P()},set searchParams(V){P(V),X()},get skipInitCheck(){return D()},set skipInitCheck(V){D(V),X()},get theme(){return H()},set theme(V){H(V),X()},get userSettings(){return Z()},set userSettings(V){Z(V),X()},get viewurl(){return de()},set viewurl(V){de(V),X()},get webcomponent(){return _e()},set webcomponent(V){_e(V),X()}};Fd();var Kt=eC();return Ql(Kt,V=>vt(oe,V),()=>q(oe)),fs(r,Kt),kd(t,"unwarn",ae),ru(ut)}Wd(Ih,{activeFeatureToggleList:{attribute:"active-feature-toggle-list",type:"Array"},anchor:{attribute:"anchor",type:"String"},clientPermissions:{attribute:"client-permissions",type:"Object"},compoundConfig:{attribute:"compound-config",type:"Object"},context:{attribute:"context",type:"String"},deferInit:{attribute:"defer-init",type:"Boolean"},dirtyStatus:{attribute:"dirty-status",type:"Boolean"},documentTitle:{attribute:"document-title",type:"String"},hasBack:{attribute:"has-back",type:"Boolean"},locale:{attribute:"locale",type:"String"},noShadow:{attribute:"no-shadow",type:"Boolean"},nodeParams:{attribute:"node-params",type:"Object"},pathParams:{attribute:"path-params",type:"Object"},searchParams:{attribute:"search-params",type:"Object"},skipInitCheck:{attribute:"skip-init-check",type:"Boolean"},theme:{attribute:"theme",type:"String"},userSettings:{attribute:"user-settings",type:"Object"},viewurl:{attribute:"viewurl",type:"String"},webcomponent:{attribute:"webcomponent",type:"String"}},[],["unwarn"],void 0,r=>{let t=n=>()=>console.warn(n+" can't be called on luigi-container before its micro frontend is attached to the DOM.");return class extends r{updateContext=t("updateContext");notifyAlertClosed=t("notifyAlertClosed");notifyConfirmationModalClosed=t("notifyConfirmationModalClosed");attributeChangedCallback(n,s,o){try{super.attributeChangedCallback(n,s,o)}catch(l){console.warn("Error in attributeChangedCallback",l)}this.containerInitialized&&n==="context"&&this.updateContext(JSON.parse(o))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}),customElements.get("luigi-container")||customElements.define("luigi-container",Gd.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",Ih.element);const Wa={sanitizeHtml(r=""){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(r=""){return r.replace(/&lt;br\/&gt;/g,"<br>").replace(/&lt;br \/&gt;/g,"<br>").replace(/&lt;br&gt;/g,"<br>").replace(/&lt;br &gt;/g,"<br>")},restoreSanitizedElements(r=""){let t=r;const n=["i","b","br","mark","strong","em","small","del","ins","sub","sup"];for(let s=0;s<n.length;s++){const o=new RegExp(`&lt;${n[s]}/&gt;`,"g"),l=new RegExp(`&lt;${n[s]} /&gt;`,"g"),u=new RegExp(`&lt;${n[s]}&gt;`,"g"),f=new RegExp(`&lt;${n[s]} &gt;`,"g"),h=new RegExp(`&lt;/${n[s]}[/]&gt;`,"g"),g=new RegExp(`&lt;/${n[s]} [/]&gt;`,"g"),_=new RegExp(`&lt;[/]${n[s]}&gt;`,"g"),m=new RegExp(`&lt;[/]${n[s]} &gt;`,"g");t=t.replace(o,`<${n[s]}>`).replace(l,`<${n[s]}>`).replace(u,`<${n[s]}>`).replace(f,`<${n[s]}>`).replace(h,`</${n[s]}>`).replace(g,`</${n[s]}>`).replace(_,`</${n[s]}>`).replace(m,`</${n[s]}>`)}return t},sanatizeHtmlExceptTextFormatting(r=""){return this.restoreSanitizedElements(this.sanitizeHtml(r))},sanitizeParam(r=""){return String(r).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&sol;")},escapeKeyForRegexp(r=""){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},processTextAndLinks(r="",t,n){const o={sanitizedText:this.restoreSanitizedBrs(this.sanitizeHtml(r)),links:[]};return t?Object.entries(t).reduce((l,[u,f])=>{const h=`_luigi_alert_${n}_link_${this.sanitizeParam(u)}`,g=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),_=`<a id="${h}">${g}</a>`,m=this.escapeKeyForRegexp(u),w=new RegExp(`({${m}})`,"g");return{sanitizedText:l.sanitizedText.replace(w,_),links:l.links.concat({elemId:h,url:f.url?encodeURI(this.sanitizeHtml(f.url)):void 0,dismissKey:f.dismissKey?encodeURI(this.sanitizeHtml(f.dismissKey)):void 0})}},o):o}},U={defaultContentViewParamPrefix:"~",defaultQueryParamSeparator:"?",defaultModalViewParamName:"modal",addParamsOnHashRouting(r,t,n){let s=t;const[o,l]=s.split("?"),u=new URLSearchParams(l);return this.modifySearchParams(r,u,n),s=o,u.toString()!==""&&(s+=`?${u.toString()}`),s},modifySearchParams(r,t,n){for(const[s,o]of Object.entries(r)){const l=n?`${n}${s}`:s;t.set(l,o),o===void 0&&t.delete(l)}},filterNodeParams(r,t){const n=Object.create(null),s=this.getContentViewParamPrefix(t);return r&&Object.entries(r).forEach(o=>{if(o[0].startsWith(s)){const l=o[0].substr(s.length);n[l]=o[1]}}),this.sanitizeParamsMap(n)},mapPathToNode(r,t){if(!r||!t)return;const n=M.trimLeadingSlash(r).split("/"),s=U.buildRoute(t,`/${t.pathSegment}`),o=M.trimLeadingSlash(s).split("/");if(n.length<o.length)return;let l="";for(let u=0;u<o.length;u++){if(n[u]!==o[u]&&o[u].indexOf(":")!==0)return;l+="/"+n[u]}return l},async getNodeLabel(r,t){if(r.label&&!r._virtualTree)return t.i18n().getTranslation(r.label)||r.label;if(r.pathSegment&&r.pathSegment.indexOf(":")===0){const n=t.getConfig().routing?.useHashRouting,s=U.mapPathToNode(U.getCurrentPath(t,n)?.path,r)||"",o=await t.navigation().navService.extractDataFromPath(s);return U.getDynamicNodeValue(r,o.pathData.pathParams)||""}return r.pathSegment?r.pathSegment:""},getContentViewParamPrefix(r){let t=r?.getConfigValue("routing.nodeParamPrefix");return t===!1?t="":t||(t=this.defaultContentViewParamPrefix),t},sanitizeParamsMap(r){return Object.entries(r).reduce((t,n)=>(t[Wa.sanitizeParam(n[0])]=Wa.sanitizeParam(n[1]),t),{})},prepareSearchParamsForClient(r,t){const n={};return r&&r.clientPermissions&&r.clientPermissions.urlParameters&&Object.keys(r.clientPermissions.urlParameters).forEach(s=>{s in t.routing().getSearchParams()&&r.clientPermissions?.urlParameters&&r.clientPermissions.urlParameters[s]?.read===!0&&(n[s]=t.routing().getSearchParams()[s])}),n},hasIntent(r){return!!r&&r.toLowerCase().includes("#?intent=")},getIntentObject(r){const t=r.split("?intent=")[1];if(t){const n=t.split("?"),s=n[0].split("-"),o=Object.fromEntries(new URLSearchParams(n[1]).entries());return{semanticObject:s[0],action:s[1],params:o}}},getIntentPath(r,t){const n=t.getConfigValue("navigation.intentMapping");if(n&&n.length>0){const s=r.replace(/\?intent=/i,"?intent="),o=this.getIntentObject(s);if(o){let l=n.find(f=>f.semanticObject===o.semanticObject&&f.action===o.action);if(!l)return!1;if(l.externalLink)return{...l.externalLink,external:!0};l=l.pathSegment;const u=Object.entries(o.params);if(u&&u.length>0){l=this.resolveDynamicIntentPath(l,o.params);let f=t.getConfigValue("routing.nodeParamPrefix");f=f||"~",l=l.concat(`?${f}`),u.forEach(([h,g],_)=>{l+=`${_>0?"&"+f:""}${h}=${g}`})}return l}else console.warn("Could not parse given intent link.")}else console.warn("No intent mappings are defined in Luigi configuration.");return!1},resolveDynamicIntentPath(r,t){if(!t)return r;let n=r;for(const[s,o]of Object.entries(t)){const l=new RegExp("/:"+s+"(/|$)","g");n=n.replace(l,`/${o}/`)}return n=n.replace(/\/$/,""),n},getCurrentPath(r,t,n){if(n&&/\?intent=/i.test(location.hash)){const s=location.hash.replace("#/#","").replace("#",""),o=U.getIntentPath(s,r);if(o){if(typeof o=="string")return r?.getConfigValue("routing.replaceIntentRoute")&&history.replaceState(window.state,"",o),{path:o,query:location.search};if(M.isObject(o))return U.handleExternalIntentPath(o),{path:t?location.hash:location.pathname,query:""}}}if(t){const s=ke.normalizePath(location.hash),[o,l]=s.split("?");return{path:o.replace("#",""),query:l}}else return{path:ke.normalizePath(location.pathname),query:location.search}},handleExternalIntentPath(r){if(r.external&&r.url){const t=r.openInNewTab?"_blank":"_self";window.open(r.url,t,"noopener,noreferrer")?.focus()}},getModalPathFromPath(r){return this.getQueryParam(this.getModalViewParamName(r),r)},getQueryParam(r,t){return this.getQueryParams(t)[r]},getQueryParams(r){return r.getConfigValue("routing.useHashRouting")?this.getLocationHashQueryParams():this.getLocationSearchQueryParams()},getLocationSearchQueryParams(){return U.getLocation().search?U.parseParams(U.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const r=U.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return r!==-1?U.parseParams(U.getLocation().hash.slice(r+1)):{}},getModalViewParamName(r){let t=r.getConfigValue("routing.modalPathParam");return t||(t=this.defaultModalViewParamName),t},parseParams(r){const t=new URLSearchParams(r),n=new Map;for(const[s,o]of t.entries())n.set(s,o);return Object.fromEntries(n)},getModalParamsFromPath(r){const t=this.getQueryParam(`${this.getModalViewParamName(r)}Params`,r);return t&&JSON.parse(t)},getHashQueryParamSeparator(){return this.defaultQueryParamSeparator},getURLWithoutModalData(r,t){const n=new URLSearchParams(r);return n.delete(t),n.delete(`${t}Params`),n.toString()},handleHistoryState(r,t){return r&&r.modalHistoryLength?r.modalHistoryLength+=1:r={modalHistoryLength:1,historygap:history.length,pathBeforeHistory:t},r},encodeParams(r){const t=[];for(const n in r)t.push(encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return t.join("&")},getLastNodeObject(r){return(r.nodesInPath?[...r.nodesInPath].pop():{})||{}},checkWCUrl(r,t){if(r.indexOf("://")>0||r.trim().indexOf("//")===0){if(new URL(r).host===window.location.host)return!0;const s=t.getConfigValue("navigation.validWebcomponentUrls");if(s?.length>0)for(const o of s)try{if(new RegExp(o).test(r))return!0}catch(l){console.error(l)}return!1}return!0},setFeatureToggles(r,t,n){const s=this.sanitizeParamsMap(this.parseParams(t.split("?")[1]));let o;if(s[r]&&(o=s[r]),!o)return;const l=o.split(",");l.length>0&&l[0]!==""&&l.forEach(u=>n?.setFeatureToggle(u,!0))},substituteDynamicParamsInObject(r,t,n=":",s=!1){return Object.entries(r).map(([o,l])=>{const u=s?Object.keys(t).find(f=>l&&l.indexOf(n+f)>=0):Object.keys(t).find(f=>l===n+f);return[o,u?s?l.replace(n+u,t[u]):t[u]:l]}).reduce((o,[l,u])=>Object.assign(o,{[l]:u}),{})},isDynamicNode(r){return typeof r.pathSegment=="string"&&r.pathSegment.length>0&&r.pathSegment[0]===":"},getDynamicNodeValue(r,t){return this.isDynamicNode(r)&&r.pathSegment?t[r.pathSegment.substring(1)]:void 0},isExistingRoute(r,t){const n=r?.split("/")||[],s=t?.nodesInPath||[],o=(u,f)=>{let h=null;if(u?.children?.length){const g=u.children.filter(_=>_.pathSegment===f);g?.length&&(h=g[0])}return h};let l=[];if(n.length>1&&s.length===1){let u;n.forEach((f,h)=>{const g=h===0?s[0]:u;u=o(g,f),u?.pathSegment&&l.push(u.pathSegment)})}else l=s.filter(u=>u.pathSegment).map(u=>u.pathSegment||"");return!r||n.length===l.length},async pathExists(r,t){const n=M.getTrimmedUrl(r),s=await t.navigation().navService.getPathData(r),o=U.isExistingRoute(n,s);return s?o:!1},showRouteNotFoundAlert(r,t=!1,n){const s={text:n.i18n().getTranslation(t?"luigi.notExactTargetNode":"luigi.requestedRouteNotFound",{route:r}),type:"error",ttl:1};n.ux().showAlert(s)},getPageNotFoundRedirectResult(r,t=!1,n){const s=n.getConfigValue("routing.pageNotFoundHandler");if(typeof s=="function"){const o=s(r,t);if(o&&(o.redirectTo||o.ignoreLuigiErrorHandling))return{path:o.redirectTo,keepURL:o.keepURL,ignoreLuigiErrorHandling:o.ignoreLuigiErrorHandling}}return{}},async handlePageNotFoundAndRetrieveRedirectPath(r,t,n){if(t)return r;const s=n.getConfigValue("routing.pageNotFoundHandler"),o=this.getPageNotFoundRedirectResult(r,s,n)?.path;if(o!==void 0)return o;this.showRouteNotFoundAlert(r,!1,n),console.warn(`Could not find the requested route: ${r}`)},async getDefaultChildNode(r,t){if(!r)return"";const n=r.nodesInPath&&r.nodesInPath[r.nodesInPath.length-1],s=r.context,o=t?await t(n,s):await Mr.getConfigValueFromObjectAsync(n,"children",s),l=o.find(u=>u.pathSegment===n.defaultChildNode);if(n.defaultChildNode&&l)return n.defaultChildNode;if(o&&o.length){if(r?.nodesInPath?.length===1){const h=o.find(g=>g.pathSegment);return h&&h.pathSegment||console.error("At least one navigation node in the root hierarchy must have a pathSegment.")}const f=o.find(h=>h.pathSegment&&(h.viewUrl||h.compound||h.externalLink&&h.externalLink.url));if(f)return f.pathSegment}return""},getNodePath(r,t){return!r||t?r?this.buildRoute(r,r.pathSegment?"/"+r.pathSegment:"",t):"":`${r.parent?this.getNodePath(r.parent):""}/${r.pathSegment}`},buildRoute(r,t,n){return r.parent?this.buildRoute(r.parent,`/${r.parent.pathSegment}${t}`,n):t+(n?"?"+n:"")},substituteViewUrl(r,t,n,s){if(!r.viewUrl)return"";let o=r.viewUrl;const l="context.",u="nodeParams.",f="routing.queryParams";if(r.virtualTree&&(o=o.replace("{virtualTreePath}","")),o=M.replaceVars(o,t,":",!1),r.context&&(o=M.replaceVars(o,r.context,l)),o=M.replaceVars(o,n,u),o=this.getI18nViewUrl(o,s),o&&o.includes(f)){const h=o.split("?")[1];if(h){const g=h.split("=")[0],_=s.routing().getSearchParams();_[g]?o=o.replace(`{${f}.${g}}`,_[g]):o=o.replace(`?${g}={${f}.${g}}`,"")}}return o},getI18nViewUrl(r,t){const n="{i18n.currentLocale}",s=t.i18n().getCurrentLocale();return r&&r.includes(n)?r.replace(n,s):r},getSubPath(r,t){return M.replaceVars(U.getNodePath(r),t,":",!1)},concatenatePath(r,t){let n=M.getPathWithoutHashOrSlash(r);return n?(t&&(n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")||(n+="/"),n+=t),n):t},getRouteLink(r,t,n){const s=n||"";if(r.externalLink&&r.externalLink.url)return r.externalLink.url;if(r.link)return s+r.link;const o=U.buildRoute(r,`/${r.pathSegment}`);return s+M.replaceVars(o,t,":",!1,!0)},calculateNodeHref(r,t,n){const o=n.getConfigValue("routing.useHashRouting")?"#":"",l=U.getRouteLink(r,t,o);return U.getI18nViewUrl(l,n)||l},getNodeHref(r,t,n){if(M.getConfigBooleanValue(n.getConfig(),"navigation.addNavHrefs"))return U.calculateNodeHref(r,t,n)}},ke={normalizePath:r=>{if(!r||r.length<=0)return r;let t=r;return t.startsWith("#")&&(t=t.substring(1)),t.startsWith("/")&&(t=t.substring(1)),t},segmentMatches:(r,t,n)=>!!(r===t||t.startsWith(":")&&n&&n[t.substr(1)]===r),checkMatch:(r,t,n)=>{let s=!0;return M.trimTrailingSlash(M.trimLeadingSlash(r)).split("/").forEach((o,l)=>{s&&(l+1>=t.length||!t[l+1]?.pathSegment||!ke.segmentMatches(o,t[l+1]?.pathSegment??"",n??{}))&&(s=!1)}),s},checkVisibleForFeatureToggles:(r,t)=>{if(r?.visibleForFeatureToggles){const n=t?.getActiveFeatureToggleList()||[];for(const s of r.visibleForFeatureToggles)if(s.startsWith("!")){if(n.includes(s.slice(1)))return!1}else if(!n.includes(s))return!1}return!0},generateTooltipText:(r,t,n)=>{let s=r?.tooltipText;switch(s===void 0&&(s=n.getConfigValue("navigation.defaults.tooltipText")),s){case void 0:return t;case!1:return"";default:return n.i18n().getTranslation(s)}},isNodeAccessPermitted:(r,t,n,s)=>{if(s.auth().isAuthorizationEnabled()){const u=rr.isLoggedIn(),f=r.anonymousAccess;if(u&&f==="exclusive"||!u&&f!=="exclusive"&&f!==!0)return!1}const o=s.featureToggles();if(!ke.checkVisibleForFeatureToggles(r,o))return!1;const l=s.getConfigValue("navigation.nodeAccessibilityResolver");return typeof l!="function"?!0:l(r,t,n)},updateHeaderTitle:(r,t)=>{const n=r?.items;if(n&&t){let s="";return[...n].sort((o,l)=>(l.link||"").localeCompare(o.link||"")).some(o=>{let l=!1;if(l=ke.checkMatch(o.link||"",t.nodesInPath??[]),!l&&o.selectionConditions&&o.selectionConditions.route&&(l=ke.checkMatch(o.selectionConditions.route,t.nodesInPath??[]),l&&(o.selectionConditions.contextCriteria||[]).forEach(u=>{l=l&&t?.selectedNode?.context?.[u.key]===u.value})),l)return s=o.title||"",!0}),s}},buildPath(r,t){return r.map(s=>{const o=s.pathSegment;if(o?.startsWith(":")){const l=o.slice(1),u=t?.pathParams?.[l];if(u!=null)return encodeURIComponent(String(u))}return o}).join("/")},mergeContext(r,t,n){const s=[...r.parentNavigationContexts||[]];return n&&s.unshift(n),{...r,...t||{},parentNavigationContexts:s}},prepareForTests(...r){let t="";return r.forEach(n=>{n&&(t+=(t?"_":"")+encodeURIComponent(n.toLowerCase().split(" ").join("")))}),t},findVirtualTreeRootNode(r){if(r.virtualTree)return r;if(r.parent)return ke.findVirtualTreeRootNode(r.parent)},validatePathAndGetRedirect:async(r,t)=>{const n=await U.pathExists(r,t);return await U.handlePageNotFoundAndRetrieveRedirectPath(r,n,t)||void 0},async fetchNodeTitleData(r,t){return new Promise((n,s)=>{if(!r.titleResolver){s(new Error("No title resolver defined at node"));return}const o={...r.titleResolver};delete o._cache;const l=this.substituteVars(o,t),u=JSON.stringify(l);if(r.titleResolver._cache&&r.titleResolver._cache.key===u){n(r.titleResolver._cache.value);return}const f=l.request;this._fetch(f.url,{method:f.method,headers:f.headers,body:JSON.stringify(f.body)}).then(h=>{h.json().then(g=>{try{const _=this.processTitleData(g,l);r.titleResolver._cache={key:u,value:_},n(_)}catch(_){s(_)}})}).catch(h=>{s(h)})})},getPropertyChainValue(r,t,n){return!t||!r?n:Ol.get(r,t,n)},substituteVars(r,t){const s=JSON.stringify(r).replace(/\$\{[a-zA-Z0-9$_.]+\}/g,o=>{const l=o.substr(2,o.length-3);return this.getPropertyChainValue(t,l)||o});return JSON.parse(s)},_fetch(r,t){return fetch(r,t)},processTitleData(r,t){let n=this.getPropertyChainValue(r,t.titlePropertyChain);return n&&(n=n.trim()),n&&t.titleDecorator&&(n=t.titleDecorator.replace("%s",n)),{label:n||t.fallbackTitle,icon:this.getPropertyChainValue(r,t.iconPropertyChain,t.fallbackIcon)}}};class cr{constructor(){this.dataManagement=new Map}setChildren(t,n){this.dataManagement.set(t,n),this.navPath=""}getChildren(t){return t?this.dataManagement.get(t):{}}hasChildren(t){const n=this.getChildren(t);return!!(n&&Object.prototype.hasOwnProperty.call(n,"children"))}setRootNode(t){this.dataManagement.set("_luigiRootNode",{node:t})}getRootNode(){return this.dataManagement.get("_luigiRootNode")}hasRootNode(){return!!this.getRootNode()}deleteCache(){this.dataManagement.clear()}deleteNodesRecursively(t){if(this.hasChildren(t)){const n=this.getChildren(t).children;for(let s=0;s<n.length;s++)this.deleteNodesRecursively(n[s])}this.dataManagement.delete(t)}}const Aa={logout:{label:"Sign Out",icon:"log"},userSettingsProfileMenuEntry:{label:"Settings",icon:"settings"}};class nC{constructor(){this.services=new Map}register(t,n,s=!0){this.services.set(t,{factory:n,singleton:s})}get(t){const n=this.services.get(t);if(!n)throw new Error(`Service '${t}' is not registered.`);return n.singleton?(n.instance||(n.instance=n.factory()),n.instance):n.factory()}}const j=new nC;class ln{constructor(t){this.luigi=t,this.luigi=t,this.unsavedChanges={isDirty:!1,persistUrl:null}}updateDirtyStatus(t,n){if(!this.unsavedChanges.dirtySet||!(this.unsavedChanges.dirtySet instanceof Set)){const s=new Set;s.add(n),this.unsavedChanges={dirtySet:s}}this.unsavedChanges.persistUrl=window.location.href,t?this.unsavedChanges.dirtySet?.add(n):this.unsavedChanges.dirtySet?.delete(n)}clearDirtyState(t){this.unsavedChanges&&this.unsavedChanges.dirtySet&&(t?this.unsavedChanges.dirtySet.delete(t):this.unsavedChanges.dirtySet.clear())}readDirtyStatus(){return this.unsavedChanges.dirtySet?this.unsavedChanges.dirtySet.size>0:!!this.unsavedChanges.isDirty}getUnsavedChangesModalPromise(t){if(!this.shouldShowUnsavedChangesModal(t))return Promise.resolve();const n=this.luigi.getConfigValue("settings.unsavedChangesHandler");if(n)return n().then(()=>this.clearDirtyState(t));const s={header:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.header"),body:this.luigi.i18n().getTranslation("luigi.unsavedChangesAlert.body"),buttonDismiss:this.luigi.i18n().getTranslation("luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation("luigi.button.confirm")};return new Promise((o,l)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(s,{confirm:()=>{this.clearDirtyState(t),o()},dismiss:()=>{l()}})})}shouldShowUnsavedChangesModal(t){return t?this.unsavedChanges.dirtySet?.has(t)??!1:this.readDirtyStatus()}}class fr{constructor(t){this.luigi=t,this._modalStack=[],this.modalSettings={}}async closeModals(){if(this._modalStack.length===0)return;const t=[...this._modalStack];for(const{onInternalClose:n}of t)try{typeof n=="function"&&n()}catch(s){console.warn("onInternalClose threw an error",s)}this.clearModalStack()}registerModal(t){t&&this._modalStack.push(t)}getModalSettings(){return this._modalStack.length>0?this._modalStack[0].modalsettings||{}:{}}getModalStackLength(){return this._modalStack.length}updateFirstModalSettings(t){if(this._modalStack.length>0){const n=this._modalStack[0];n.modalsettings={...n.modalsettings,...t}}}clearModalStack(){this._modalStack=[]}removeLastModalFromStack(){G.modalContainer.pop(),this._modalStack.pop()}async closeModalsWithDirtyCheck(){const t=j.get(ln);for(const n of G.modalContainer)if(t.shouldShowUnsavedChangesModal(n))try{await t.getUnsavedChangesModalPromise(n)}catch{return!1}return await this.closeModals(),!0}}class hr{constructor(t){this.luigi=t,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=j.get(fr)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=j.get(cr)),this.nodeDataManagementService}async getPathData(t){const n=this.luigi.getConfig();let s=t.split("/");s?.length>0&&s[0]===""&&(s=s.slice(1));let l=n.navigation?.globalContext||{},u;if(this.getNodeDataManagementService().hasRootNode())u=this.getNodeDataManagementService().getRootNode().node;else{const m=await this.luigi.getConfigValueAsync("navigation.nodes");typeof m=="object"&&!Array.isArray(m)?(u=m,u.pathSegment&&(u.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):u={children:m},u.children=await this.getChildren(u,l),u.children=this.prepareRootNodes(u.children||[],l),this.getNodeDataManagementService().setRootNode(u)}const f={parentNavigationContexts:[],...l||{},...u.context||{}},h={},g={context:f,selectedNodeChildren:u.children,nodesInPath:[u],rootNodes:u.children,pathParams:h,matchedPath:""};if(u.viewUrl&&s.length===0)g.selectedNode=u;else for(const m of s)if(g.selectedNodeChildren){const w=this.findMatchingNode(m,g.selectedNodeChildren||[]);if(!w){console.warn("No matching node found for segment:",m);break}"_rawContext"in w||(w._rawContext=w.context);const E=w._rawContext??{},T=ke.mergeContext(l,E,w.navigationContext);let R=T;if(w.pathSegment?.startsWith(":")&&(h[w.pathSegment.replace(":","")]=Wa.sanitizeParam(m),R=U.substituteDynamicParamsInObject(T,h)),l=R,w.context=R,g.selectedNode=w,g.selectedNode&&g.nodesInPath?.push(g.selectedNode),w.virtualTree||w._virtualTree){const P=this.buildVirtualTree(w,m,h);P&&P.length>0&&(w.children=P)}g.selectedNodeChildren=await this.getChildren(w,l)}const _=g.nodesInPath?.filter(m=>m.pathSegment).map(m=>m.pathSegment)||[];return g.matchedPath=s.filter((m,w)=>_[w]&&_[w].startsWith(":")||_[w]===m).join("/")||"",g}findMatchingNode(t,n){let s;const o=n.filter(u=>!!u.pathSegment).length,l=n.filter(u=>u.pathSegment&&u.pathSegment.startsWith(":")).length;if(o>1&&(l===1&&(console.warn(`Invalid node setup detected.
48
88
  Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
49
89
  Remove the static node from the configuration to resolve this warning.
50
- Affected pathSegment:`,n,"Children:",r),r=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":"))),c>1)){console.error(`Invalid node setup detected.
90
+ Affected pathSegment:`,t,"Children:",n),n=n.filter(u=>u.pathSegment&&u.pathSegment.startsWith(":"))),l>1)){console.error(`Invalid node setup detected.
51
91
  Multiple dynamic nodes are not allowed on the same level. Stopped navigation.
52
- Invalid Children:`,r);return}return r.some(l=>{if(l.pathSegment===n||l.pathSegment&&l.pathSegment.startsWith(":"))return a=l,!0}),a}buildNavItems(n,r,a){const o={},c=[];return n?.forEach(l=>{if(Ee.isNodeAccessPermitted(l,this.getParentNode(a.selectedNode,a),a?.selectedNode?.context||{},this.luigi))if(l.category){const f=l.category.id||l.category.label||l.category,p=this.luigi.i18n().getTranslation(l.category.label||l.category.id||l.category);let m=o[f];m||(m={category:{altText:l.category.altText||"",icon:l.category.icon,id:f,label:p,nodes:[],tooltip:this.resolveTooltipText(l.category,p)}},o[f]=m,c.push(m)),m.category?.nodes?.push({node:l,selected:l===r,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,altText:l.altText,icon:l.icon})}else c.push({altText:l.altText,icon:l.icon,label:l.label?this.luigi.i18n().getTranslation(l.label):void 0,tooltip:l.label?this.resolveTooltipText(l,l.label):void 0,node:l,selected:l===r})}),c}async getCurrentNode(n){const r=await this.getPathData(n);let a=r.selectedNode;if(!a&&r.nodesInPath?.length===1&&(a=r.nodesInPath[0]),!(!a||!Ee.isNodeAccessPermitted(a,this.getParentNode(r.selectedNode,r),r?.selectedNode?.context||{},this.luigi)))return a}async getPathParams(n){return(await this.getPathData(n)).pathParams}getTruncatedChildren(n){let r=!1,a=!1,o=[];return n.slice().reverse().forEach(c=>{(!r||c.tabNav)&&(c.tabNav===!1&&(a=!0),c.keepSelectedForChildren===!1?r=!0:(c.keepSelectedForChildren||c.tabNav&&!a)&&(r=!0,o=[])),o.push(c)}),o.reverse()}applyNavGroups(n){const r={},a=[],c=[];return n.forEach(l=>{if(l.node)c.push(l);else if(l.category){const f=l.category.id;f&&f.indexOf("::")>0?a.push(l):(l.category.isGroup,r[f]=l,c.push(l))}}),a.forEach(l=>{const f=l.category?.id.split("::")[0]||"",p=r[f];p&&p.category&&(p.category.isGroup||(p.category.isGroup=!0),p.category.nodes||(p.category.nodes=[]),p.category.nodes.push(l))}),c.filter(l=>{if(l.category?.isGroup&&l.category?.nodes&&l.category?.nodes.length>0){for(let f=0;f<l.category?.nodes.length;f++){const p=l.category?.nodes[f];if(p.node&&!p.node.hideFromNav&&p.node.label||p.category?.nodes&&p.category.nodes.filter(m=>!m.node?.hideFromNav&&m.node?.label).length>0)return!0}return!1}return!0})}async getLeftNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{items:[],basePath:"",selectedNode:{},navClick:void 0};let o=[];const c=[];let l="";a.nodesInPath?.forEach(b=>{b.children&&(b.tabNav||(l+="/"+(b.pathSegment||"")),c.push(b))});const f=this.getTruncatedChildren(a.nodesInPath??[]);let p=[...f].pop(),m=a.selectedNode;(p?.keepSelectedForChildren||p?.tabNav)&&(m=p,f.pop(),p=[...f].pop());let E,y=m;m?a.rootNodes.includes(m)?(E=m,y=void 0):m.tabNav||m.keepSelectedForChildren?E=p:E=[...c].pop():(E=[...c].pop(),y=void 0);let C=await this.getChildren(E,E?.context||{})||[];return o=this.buildNavItems(C,y,a),o=this.applyNavGroups(o),{selectedNode:m||{},items:o,basePath:l.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:b=>b.node?this.navItemClick(b.node,a):Promise.resolve()}}async navItemClick(n,r){await q.get(xt).getUnsavedChangesModalPromise();let o=O.getNodePath(n),c=r?.pathParams;if(o=F.replaceVars(o,c||{},":",!1),!o&&o!==""){console.error("Navigation error: could not build path for the node. Check if pathSegment is defined for all nodes in the path and if there are no duplicate pathSegments on the same level.");return}return this.luigi.navigation().navigate(o)}async getTopNavData(n,r){const a=this.luigi.getConfig(),o=r??await this.getPathData(n),c=a.navigation?.profile?.items?.length?JSON.parse(JSON.stringify(a.navigation.profile.items)):[],l=a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),f=Ee.updateHeaderTitle(l,o);c?.length&&c.map(b=>({...b,label:this.luigi.i18n().getTranslation(b.label||"")}));const p=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||Oa.logout.label,m=b=>{if(b.openNodeInModal&&!b.externalLink?.url)this.luigi.navigation().openAsModal(b.link||"",b.openNodeInModal===!0?{}:b.openNodeInModal);else if(b.link)this.luigi.navigation().navigate(b.link);else if(b.externalLink?.url)if(b.externalLink.sameWindow)window.location.href=b.externalLink.url;else{const R=window.open(b.externalLink.url,"_blank","noopener noreferrer");R&&(R.opener=null,R.focus())}},E={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&dn.isLoggedIn(),items:c,itemClick:m,logout:{altText:this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.altText)||Oa.logout.label,label:p,icon:a.navigation?.profile?.logout?.icon||Oa.logout.icon,testId:a.navigation?.profile?.logout?.testId||Ee.prepareForTests(p),doLogout:()=>{$n.logout()}},onUserInfoUpdate:b=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(R=>{R?b(R):$n.getUserInfoStore().subscribe(x=>{b(x)})})}},y=o.selectedNode,C=y&&o.rootNodes.includes(y)?y:void 0;return{appTitle:f||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,C,o),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?E:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:b=>b.node?this.navItemClick(b.node,o):Promise.resolve()}}getParentNode(n,r){if(n&&n===r.nodesInPath?.[r.nodesInPath.length-1])return r.nodesInPath[r.nodesInPath.length-2]}getAppSwitcherData(n,r){const a=n,o=a?.showMainAppEntry;if(a&&a.items&&o){const c={title:this.luigi.i18n().getTranslation(r.title||""),subTitle:r.subTitle,link:"/"};if(a.items?.map(l=>({...l,title:this.luigi.i18n().getTranslation(l.title||"")})),a.items.some(l=>l.link===c.link))return a;a.items.unshift(c)}return a}async getTabNavData(n,r){const a=r??await this.getPathData(n);if(n===""&&a?.nodesInPath?.[0].viewUrl)return{};const o=a?.selectedNode;let c;if(!o)return{};if(!o.tabNav&&(c=this.getParentNode(o,a),c&&!c.tabNav))return{};let l="";a.nodesInPath?.forEach(m=>{m.children&&(l+="/"+(m.pathSegment||""))});const f=c?this.getTruncatedChildren(c.children??[]):this.getTruncatedChildren(o.children??[]),p=this.buildNavItems(f,o,a);return{selectedNode:o,items:p,basePath:l.replace(/\/\/+/g,"/"),navClick:m=>m.node?this.navItemClick(m.node,a):Promise.resolve()}}async getBreadcrumbData(n,r,a){const o=this.luigi.getConfigValue("navigation.breadcrumbs"),c=r??await this.getPathData(n),l=c?.nodesInPath||[],f=[];let p=!!o,m="";if(!o||n===""&&l?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(l.forEach(x=>{x.children&&(m+="/"+(x.pathSegment||"")),x.showBreadcrumbs===!1?p=!1:x.showBreadcrumbs===!0&&(p=!0)}),!p)return{clearBeforeRender:!0};const E=this.luigi.getConfigValue("routing.useHashRouting"),y=O.getCurrentPath(E),C=o.omitRoot?2:1;for(let x=C;x<l.length;x++){const U=l[x],H=O.mapPathToNode(y.path,U);if(H&&this.previousBreadcrumbs[H])f.push(this.previousBreadcrumbs[H]);else if(U.label||U.pathSegment||U.titleResolver)if(U.titleResolver)f.push({label:U.titleResolver.prerenderFallback&&U.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation(U.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:U,route:H,pending:!0});else{const re=await O.getNodeLabel(U,this.luigi);re&&f.push({label:re,node:U,route:H})}}const b=f.some(x=>x.pending),R=x=>({basePath:m.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:x,renderer:o.renderer,selectedNode:c?.selectedNode||{}});if(b&&a)return this.resolveBreadcrumbTitles(l,C,y,E,o,R,a),R(f);if(y.path===O.getCurrentPath(E).path){const x={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map(U=>{U.route&&(x[U.route]=U)}),this.previousBreadcrumbs=x}return R(f)}async resolveBreadcrumbTitles(n,r,a,o,c,l,f){const p=[];for(let m=r;m<n.length;m++){const E=n[m],y=O.mapPathToNode(a.path,E);if(E.titleResolver)try{const b=await this.extractDataFromPath(y||""),R=O.substituteDynamicParamsInObject(Object.assign({},b.pathData.context,E.context),b.pathData.pathParams||{}),x=await Ee.fetchNodeTitleData(E,R);p.push({label:x.label,node:E,route:y});continue}catch{}const C=await O.getNodeLabel(E,this.luigi);C&&p.push({label:C,node:E,route:y})}if(a.path===O.getCurrentPath(o).path){const m={};p.length>1?p[p.length-1].last=!0:c.autoHide&&(p.length=0),p.map(E=>{E.route&&(m[E.route]=E)}),this.previousBreadcrumbs=m}f(l(p))}onNodeChange(n,r){const a=this.luigi.getConfigValue("navigation.nodeChangeHook");F.isFunction(a)?a(n,r):a!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(n){const r=await this.getPathData(n);return{nodeObject:O.getLastNodeObject(r),pathData:r}}async shouldPreventNavigation(n){return!!(n?.onNodeActivation&&(F.isFunction(n.onNodeActivation)||F.isAsyncFunction(n.onNodeActivation))&&await n.onNodeActivation(n)===!1)}async shouldPreventNavigationForPath(n){const{nodeObject:r}=await this.extractDataFromPath(n);return!!await this.shouldPreventNavigation(r)}async openViewInNewTab(n){if(await this.shouldPreventNavigationForPath(n))return;this.luigi.getConfigValue("routing.useHashRouting")&&(n="#"+n);let a;try{if(a=new URL(n,window.location.origin),a.origin!==window.location.origin)return}catch{return}window.open(a.toString(),"_blank","noopener,noreferrer")}resolveTooltipText(n,r){return Ee.generateTooltipText(n,r,this.luigi)}prepareRootNodes(n,r){const a=n;return a.length&&a.forEach(o=>{o.isRootNode=!0}),a}getAccessibleNodes(n,r,a){return r?r.filter(o=>Ee.isNodeAccessPermitted(o,n,a,this.luigi)):[]}async handleNavigationRequest(n,r){const{path:a,preserveView:o,drawerSettings:c,modalSettings:l,newTab:f,withoutSync:p,preventContextUpdate:m,preventHistoryEntry:E,options:y}=n;if(!!!(c||l)){const U=q.get(xt);try{await U.getUnsavedChangesModalPromise()}catch{return}}const R=(await this.buildPath(a,y||{})).replace(/\/\/+/g,"/"),x=E?"replaceState":"pushState";if(c||l)if(c)this.luigi.navigation().openAsDrawer(R,c,r);else{if(!l.keepPrevious&&!await this.getModalService().closeModalsWithDirtyCheck())return;this.luigi.navigation().openAsModal(R,l,r)}else{const U={detail:{preventContextUpdate:!!m,preventHistoryEntry:!!E,withoutSync:!!p}},H=q.get(xt);if(G.drawerContainer&&H.shouldShowUnsavedChangesModal(G.drawerContainer))try{await H.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}if(!await q.get(wn).closeModalsWithDirtyCheck())return;if(f){await this.openViewInNewTab(R);return}const we=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":x;if(this.luigi.getConfig().routing?.useHashRouting)if(!p&&we!=="replaceState")location.hash=R;else{const ge=new CustomEvent("hashchange",U);window.history[we]({path:"/#"+R},"","/#"+R),window.dispatchEvent(ge)}else{const ge=new CustomEvent("popstate",U);window.history[we]({path:R},"",R),window.dispatchEvent(ge)}}}async getChildren(n,r={}){const a=q.get(vn);if(!n)return[];let o=[];if(a.hasChildren(n)){let l=a.getChildren(n);l&&(o=l.children)}else try{o=await Mn.getConfigValueFromObjectAsync(n,"children",r||n.context),o==null&&(o=[]),o=o.map(l=>this.getExpandStructuralPathSegment(l)).map(l=>this.bindChildToParent(l,n))||[]}catch(l){console.error("Could not lazy-load children for node",l)}let c=this.getAccessibleNodes(n,o,r);return a.setChildren(n,{children:o,filteredChildren:c}),c}getExpandStructuralPathSegment(n){if(n&&n.pathSegment&&n.pathSegment.indexOf("/")!==-1){const r=n.pathSegment.split("/"),a={...n},o=(c,l)=>{const f=c.shift();let p={};return c.length?(p.pathSegment=f,l.hideFromNav&&(p.hideFromNav=l.hideFromNav),p.children=[o(c,l)]):(p=a,p.pathSegment=f),p};return o(r,n)}return n}bindChildToParent(n,r){return r&&r.pathSegment&&(n.parent=r),n}buildVirtualTree(n,r,a){const o=n.virtualTree,c=n._virtualTree,l=n._virtualViewUrl||n.viewUrl;if((o||c)&&r){let f=typeof n._virtualPathIndex=="number"?n._virtualPathIndex:void 0;o&&(f=void 0,n.keepSelectedForChildren=!0);const p=50;if(typeof f=="number"&&f>p)return;const m=(f??0)+1;if(m>p)return;const E=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],y=F.removeProperties(n,E);Object.assign(y,{pathSegment:":virtualSegment_"+m,label:":virtualSegment_"+m,viewUrl:F.trimTrailingSlash(this.buildVirtualViewUrl(l||"",a,m)),_virtualTree:!0,_virtualPathIndex:m,_virtualViewUrl:l});const C=Array.isArray(n.children)&&n.children.length>0?n.children[0]._virtualTree:!1;return n.children&&!C&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
92
+ Invalid Children:`,n);return}return n.some(u=>{if(u.pathSegment===t||u.pathSegment&&u.pathSegment.startsWith(":"))return s=u,!0}),s}buildNavItems(t,n,s){const o={},l=[];return t?.forEach(u=>{if(ke.isNodeAccessPermitted(u,this.getParentNode(s.selectedNode,s),s?.selectedNode?.context||{},this.luigi))if(u.category){const f=u.category.id||u.category.label||u.category,h=this.luigi.i18n().getTranslation(u.category.label||u.category.id||u.category);let g=o[f];g||(g={category:{altText:u.category.altText||"",icon:u.category.icon,id:f,label:h,nodes:[],tooltip:this.resolveTooltipText(u.category,h)}},o[f]=g,l.push(g)),g.category?.nodes?.push({node:u,selected:u===n,label:u.label?this.luigi.i18n().getTranslation(u.label):void 0,tooltip:u.label?this.resolveTooltipText(u,u.label):void 0,altText:u.altText,icon:u.icon,href:U.getNodeHref(u,s.pathParams,this.luigi)})}else l.push({altText:u.altText,icon:u.icon,label:u.label?this.luigi.i18n().getTranslation(u.label):void 0,tooltip:u.label?this.resolveTooltipText(u,u.label):void 0,node:u,selected:u===n,href:U.getNodeHref(u,s.pathParams,this.luigi)})}),l}async getCurrentNode(t){const n=await this.getPathData(t);let s=n.selectedNode;if(!s&&n.nodesInPath?.length===1&&(s=n.nodesInPath[0]),!(!s||!ke.isNodeAccessPermitted(s,this.getParentNode(n.selectedNode,n),n?.selectedNode?.context||{},this.luigi)))return s}async getPathParams(t){return(await this.getPathData(t)).pathParams}getTruncatedChildren(t){let n=!1,s=!1,o=[];return t.slice().reverse().forEach(l=>{(!n||l.tabNav)&&(l.tabNav===!1&&(s=!0),l.keepSelectedForChildren===!1?n=!0:(l.keepSelectedForChildren||l.tabNav&&!s)&&(n=!0,o=[])),o.push(l)}),o.reverse()}applyNavGroups(t){const n={},s=[],l=[];return t.forEach(u=>{if(u.node)l.push(u);else if(u.category){const f=u.category.id;f&&f.indexOf("::")>0?s.push(u):(u.category.isGroup,n[f]=u,l.push(u))}}),s.forEach(u=>{const f=u.category?.id.split("::")[0]||"",h=n[f];h&&h.category&&(h.category.isGroup||(h.category.isGroup=!0),h.category.nodes||(h.category.nodes=[]),h.category.nodes.push(u))}),l.filter(u=>{if(u.category?.isGroup&&u.category?.nodes&&u.category?.nodes.length>0){for(let f=0;f<u.category?.nodes.length;f++){const h=u.category?.nodes[f];if(h.node&&!h.node.hideFromNav&&h.node.label||h.category?.nodes&&h.category.nodes.filter(g=>!g.node?.hideFromNav&&g.node?.label).length>0)return!0}return!1}return!0})}async getLeftNavData(t,n){const s=n??await this.getPathData(t);if(t===""&&s?.nodesInPath?.[0].viewUrl)return{items:[],basePath:"",selectedNode:{},navClick:void 0};let o=[];const l=[];let u="";s.nodesInPath?.forEach(E=>{E.children&&(E.tabNav||(u+="/"+(E.pathSegment||"")),l.push(E))});const f=this.getTruncatedChildren(s.nodesInPath??[]);let h=[...f].pop(),g=s.selectedNode;(h?.keepSelectedForChildren||h?.tabNav)&&(g=h,f.pop(),h=[...f].pop());let _,m=g;g?s.rootNodes.includes(g)?(_=g,m=void 0):g.tabNav||g.keepSelectedForChildren?_=h:_=[...l].pop():(_=[...l].pop(),m=void 0);let w=await this.getChildren(_,_?.context||{})||[];return o=this.buildNavItems(w,m,s),o=this.applyNavGroups(o),{selectedNode:g||{},items:o,basePath:u.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:E=>E.node?this.navItemClick(E.node,s):Promise.resolve()}}async navItemClick(t,n){await j.get(ln).getUnsavedChangesModalPromise();let o=U.getNodePath(t),l=n?.pathParams;if(o=M.replaceVars(o,l||{},":",!1),!o&&o!==""){console.error("Navigation error: could not build path for the node. Check if pathSegment is defined for all nodes in the path and if there are no duplicate pathSegments on the same level.");return}return this.luigi.navigation().navigate(o)}async getTopNavData(t,n){const s=this.luigi.getConfig(),o=n??await this.getPathData(t),l=s.navigation?.profile?.items?.length?JSON.parse(JSON.stringify(s.navigation.profile.items)):[],u=s.navigation?.appSwitcher&&this.getAppSwitcherData(s.navigation?.appSwitcher,s.settings?.header),f=ke.updateHeaderTitle(u,o);l?.length&&l.map(R=>({...R,label:this.luigi.i18n().getTranslation(R.label||"")}));const h=this.luigi.i18n().getTranslation(s.navigation?.profile?.logout?.label)||Aa.logout.label,g=R=>{if(R.openNodeInModal&&!R.externalLink?.url)this.luigi.navigation().openAsModal(R.link||"",R.openNodeInModal===!0?{}:R.openNodeInModal);else if(R.link)this.luigi.navigation().navigate(R.link);else if(R.externalLink?.url)if(R.externalLink.sameWindow)window.location.href=R.externalLink.url;else{const P=window.open(R.externalLink.url,"_blank","noopener noreferrer");P&&(P.opener=null,P.focus())}},_=s.userSettings;let m={};_&&(m={...Aa.userSettingsProfileMenuEntry,...s.userSettings?.userSettingsProfileMenuEntry});const w={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&rr.isLoggedIn(),items:l,itemClick:g,logout:{altText:this.luigi.i18n().getTranslation(s.navigation?.profile?.logout?.altText)||Aa.logout.label,label:h,icon:s.navigation?.profile?.logout?.icon||Aa.logout.icon,testId:s.navigation?.profile?.logout?.testId||ke.prepareForTests(h),doLogout:()=>{sr.logout()}},settings:m,onUserInfoUpdate:R=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(P=>{P?R(P):sr.getUserInfoStore().subscribe(D=>{R(D)})})}},E=o.selectedNode,T=E&&o.rootNodes.includes(E)?E:void 0;return{appTitle:f||s.settings?.header?.title,logo:s.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,T,o),productSwitcher:s.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||s.navigation?.profile?w:void 0,appSwitcher:s.navigation?.appSwitcher&&this.getAppSwitcherData(s.navigation?.appSwitcher,s.settings?.header),navClick:R=>R.node?this.navItemClick(R.node,o):Promise.resolve()}}getParentNode(t,n){if(t&&t===n.nodesInPath?.[n.nodesInPath.length-1])return n.nodesInPath[n.nodesInPath.length-2]}getAppSwitcherData(t,n){const s=t,o=s?.showMainAppEntry;if(s&&s.items&&o){const l={title:this.luigi.i18n().getTranslation(n.title||""),subTitle:n.subTitle,link:"/"};if(s.items?.map(u=>({...u,title:this.luigi.i18n().getTranslation(u.title||"")})),s.items.some(u=>u.link===l.link))return s;s.items.unshift(l)}return s}async getTabNavData(t,n){const s=n??await this.getPathData(t);if(t===""&&s?.nodesInPath?.[0].viewUrl)return{};const o=s?.selectedNode;let l;if(!o)return{};if(!o.tabNav&&(l=this.getParentNode(o,s),l&&!l.tabNav))return{};let u="";s.nodesInPath?.forEach(g=>{g.children&&(u+="/"+(g.pathSegment||""))});const f=l?this.getTruncatedChildren(l.children??[]):this.getTruncatedChildren(o.children??[]),h=this.buildNavItems(f,o,s);return{selectedNode:o,items:h,basePath:u.replace(/\/\/+/g,"/"),navClick:g=>g.node?this.navItemClick(g.node,s):Promise.resolve()}}async getBreadcrumbData(t,n,s){const o=this.luigi.getConfigValue("navigation.breadcrumbs"),l=n??await this.getPathData(t),u=l?.nodesInPath||[],f=[];let h=!!o,g="";if(!o||t===""&&u?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(u.forEach(R=>{R.children&&(g+="/"+(R.pathSegment||"")),R.showBreadcrumbs===!1?h=!1:R.showBreadcrumbs===!0&&(h=!0)}),!h)return{clearBeforeRender:!0};const _=this.luigi.getConfigValue("routing.useHashRouting"),m=U.getCurrentPath(this.luigi,_),w=o.omitRoot?2:1;for(let R=w;R<u.length;R++){const P=u[R],D=U.mapPathToNode(m.path,P);if(D&&this.previousBreadcrumbs[D])f.push(this.previousBreadcrumbs[D]);else if(P.label||P.pathSegment||P.titleResolver)if(P.titleResolver)f.push({label:P.titleResolver.prerenderFallback&&P.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation(P.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:P,route:D,pending:!0});else{const H=await U.getNodeLabel(P,this.luigi);H&&f.push({label:H,node:P,route:D})}}const E=f.some(R=>R.pending),T=R=>({basePath:g.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:R,renderer:o.renderer,selectedNode:l?.selectedNode||{}});if(E&&s)return this.resolveBreadcrumbTitles(u,w,m,_,o,T,s),T(f);if(m.path===U.getCurrentPath(this.luigi,_).path){const R={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map(P=>{P.route&&(R[P.route]=P)}),this.previousBreadcrumbs=R}return T(f)}async resolveBreadcrumbTitles(t,n,s,o,l,u,f){const h=[];for(let g=n;g<t.length;g++){const _=t[g],m=U.mapPathToNode(s.path,_);if(_.titleResolver)try{const E=await this.extractDataFromPath(m||""),T=U.substituteDynamicParamsInObject(Object.assign({},E.pathData.context,_.context),E.pathData.pathParams||{}),R=await ke.fetchNodeTitleData(_,T);h.push({label:R.label,node:_,route:m});continue}catch{}const w=await U.getNodeLabel(_,this.luigi);w&&h.push({label:w,node:_,route:m})}if(s.path===U.getCurrentPath(this.luigi,o).path){const g={};h.length>1?h[h.length-1].last=!0:l.autoHide&&(h.length=0),h.map(_=>{_.route&&(g[_.route]=_)}),this.previousBreadcrumbs=g}f(u(h))}onNodeChange(t,n){const s=this.luigi.getConfigValue("navigation.nodeChangeHook");M.isFunction(s)?s(t,n):s!==void 0&&console.warn("nodeChangeHook is not a function!")}async extractDataFromPath(t){const n=await this.getPathData(t);return{nodeObject:U.getLastNodeObject(n),pathData:n}}async shouldPreventNavigation(t){return!!(t?.onNodeActivation&&(M.isFunction(t.onNodeActivation)||M.isAsyncFunction(t.onNodeActivation))&&await t.onNodeActivation(t)===!1)}async shouldPreventNavigationForPath(t){const{nodeObject:n}=await this.extractDataFromPath(t);return!!await this.shouldPreventNavigation(n)}async openViewInNewTab(t){if(await this.shouldPreventNavigationForPath(t))return;this.luigi.getConfigValue("routing.useHashRouting")&&(t="#"+t);let s;try{if(s=new URL(t,window.location.origin),s.origin!==window.location.origin)return}catch{return}window.open(s.toString(),"_blank","noopener,noreferrer")}resolveTooltipText(t,n){return ke.generateTooltipText(t,n,this.luigi)}prepareRootNodes(t,n){const s=t;return s.length&&s.forEach(o=>{o.isRootNode=!0}),s}getAccessibleNodes(t,n,s){return n?n.filter(o=>ke.isNodeAccessPermitted(o,t,s,this.luigi)):[]}async handleNavigationRequest(t,n){const{path:s,intent:o,preserveView:l,drawerSettings:u,modalSettings:f,newTab:h,withoutSync:g,preventContextUpdate:_,preventHistoryEntry:m,options:w}=t,E=this.luigi.getConfig().routing?.useHashRouting,T=!!(u||f);let R=await this.buildPath(s,w||{});if(!T){const Z=j.get(ln);try{await Z.getUnsavedChangesModalPromise()}catch{return}}if(o){const Z=U.getIntentPath(s.replace("#",""),this.luigi);if(!Z)return;if(typeof Z=="string")R=Z;else if(M.isObject(Z)){U.handleExternalIntentPath(Z);return}}const P=R.replace(/\/\/+/g,"/"),D=m?"replaceState":"pushState",H=U.getCurrentPath(this.luigi,E).path;if(M.trimLeadingSlash(H)!==M.trimLeadingSlash(P))if(u||f)if(u)this.luigi.navigation().openAsDrawer(P,u,n);else{if(!f.keepPrevious&&!await this.getModalService().closeModalsWithDirtyCheck())return;this.luigi.navigation().openAsModal(P,f,n)}else{const Z={detail:{preventContextUpdate:!!_,preventHistoryEntry:!!m,withoutSync:!!g}},de=j.get(ln);if(G.drawerContainer&&de.shouldShowUnsavedChangesModal(G.drawerContainer))try{await de.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}if(!await j.get(fr).closeModalsWithDirtyCheck())return;if(h){await this.openViewInNewTab(P);return}const pe=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":D;if(E)if(!g&&pe!=="replaceState")location.hash=P;else{const oe=new CustomEvent("hashchange",Z);window.history[pe]({path:"/#"+P},"","/#"+P),window.dispatchEvent(oe)}else{const oe=new CustomEvent("popstate",Z);window.history[pe]({path:P},"",P),window.dispatchEvent(oe)}}}async getChildren(t,n={}){const s=j.get(cr);if(!t)return[];let o=[];if(s.hasChildren(t)){let u=s.getChildren(t);u&&(o=u.children)}else try{o=await Mr.getConfigValueFromObjectAsync(t,"children",n||t.context),o==null&&(o=[]),o=o.map(u=>this.getExpandStructuralPathSegment(u)).map(u=>this.bindChildToParent(u,t))||[]}catch(u){console.error("Could not lazy-load children for node",u)}let l=this.getAccessibleNodes(t,o,n);return s.setChildren(t,{children:o,filteredChildren:l}),l}getExpandStructuralPathSegment(t){if(t&&t.pathSegment&&t.pathSegment.indexOf("/")!==-1){const n=t.pathSegment.split("/"),s={...t},o=(l,u)=>{const f=l.shift();let h={};return l.length?(h.pathSegment=f,u.hideFromNav&&(h.hideFromNav=u.hideFromNav),h.children=[o(l,u)]):(h=s,h.pathSegment=f),h};return o(n,t)}return t}bindChildToParent(t,n){return n&&n.pathSegment&&(t.parent=n),t}buildVirtualTree(t,n,s){const o=t.virtualTree,l=t._virtualTree,u=t._virtualViewUrl||t.viewUrl;if((o||l)&&n){let f=typeof t._virtualPathIndex=="number"?t._virtualPathIndex:void 0;o&&(f=void 0,t.keepSelectedForChildren=!0);const h=50;if(typeof f=="number"&&f>h)return;const g=(f??0)+1;if(g>h)return;const _=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],m=M.removeProperties(t,_);Object.assign(m,{pathSegment:":virtualSegment_"+g,label:":virtualSegment_"+g,viewUrl:M.trimTrailingSlash(this.buildVirtualViewUrl(u||"",s,g)),_virtualTree:!0,_virtualPathIndex:g,_virtualViewUrl:u});const w=Array.isArray(t.children)&&t.children.length>0?t.children[0]._virtualTree:!1;return t.children&&!w&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
53
93
  Children nodes are redundant and ignored when virtualTree is enabled.
54
- Please refer to documentation`),[y]}}buildVirtualViewUrl(n,r,a){let o="";for(const l in r)l.startsWith("virtualSegment")&&(o+=":"+l+"/");if(!a)return n;o+=":virtualSegment_"+a+"/";let c=n;n.includes("{virtualTreePath}")?c=n.replace("{virtualTreePath}",o):c=n+"/"+o;try{if(new URL(c,"http://dummy-base").origin===new URL(n,"http://dummy-base").origin)return c}catch(l){console.error("Error building virtual view URL -- make sure virtualTreePath is not part of origin.",l)}return n}async buildPath(n,r){const{fromVirtualTreeRoot:a,fromContext:o,fromClosestContext:c,fromParent:l,relative:f,nodeParams:p}=r,m=this.luigi.getConfigValue("routing.useHashRouting"),{path:E,query:y}=O.getCurrentPath(m),C=E+(y?"?"+y:""),b=await this.getPathData(C),R=b.nodesInPath;let x=n;if(R===void 0)return console.warn("No nodes in path found for current path:",C),x;if(a){x="";const U=[...R].map((H,re)=>H.virtualTree?re:-1).filter(H=>H!==-1).pop();R.forEach((H,re)=>{H.pathSegment&&(U===void 0||re<=U)&&(x+="/"+H.pathSegment)}),x+="/"+n}else if(o){const U=o,H=[...R].reverse().find(re=>U===re.navigationContext);x=O.concatenatePath(O.getSubPath(H,b.pathParams),n)}else if(c){const U=[...R].reverse().find(H=>H.navigationContext&&H.navigationContext.length>0);x=O.concatenatePath(O.getSubPath(U,b.pathParams),n)}else l?x=O.concatenatePath(O.getSubPath(b.selectedNode?.parent,b.pathParams),n):f&&(x=O.concatenatePath(O.getSubPath(b.selectedNode,b.pathParams),n));return p&&Object.keys(p).length>0&&(x+=x.includes("?")?"&":"?",Object.entries(p).forEach((U,H)=>{x+=encodeURIComponent(O.getContentViewParamPrefix(this.luigi)+U[0])+"="+encodeURIComponent(U[1])+(H<Object.keys(p).length-1?"&":"")})),x}}class vr{constructor(n){this.luigi=n,this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(n=3,r){const a=this.luigi.getConfigValue("navigation.preloadViewGroups"),o=this.luigi.getConfigValue("navigation.viewGroupSettings"),c=this.luigi.getEngine()._connector?.getContainerWrapper();if(a===!1||!o||!c)return;const l=Date.now();if(this.getPreloadingContainers(c).filter(E=>l-(E._luigiPreloadCreatedAt||0)<3e4).length>0){console.log("skipping view group preloading (busy)");return}const p=[...c.childNodes].filter(E=>E.tagName?.startsWith("LUIGI-")&&E.viewGroup).map(E=>E.viewGroup),m=Object.entries(o).filter(([E])=>!p.includes(E)).filter(([E,y])=>y&&y.preloadUrl);r?m.forEach(([E,y])=>{y.loadOnStartup&&this.preloadContainerOnBackground(y,E,c)}):m.filter((E,y)=>y<n).forEach(([E,y])=>{this.preloadContainerOnBackground(y,E,c)})}preloadContainerOnBackground(n,r,a){const o=document.createElement("luigi-container");o.setAttribute("lui_container","true"),o.viewurl=n.preloadUrl,o.viewGroup=r,o.style.display="none",o._luigiPreloading=!0,o._luigiPreloadCreatedAt=Date.now(),o.luigiMfId=F.getRandomId(),this.luigi.getEngine()._comm.addListeners(o,this.luigi),a.appendChild(o)}preload(n){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,!!n)},n?1:0),this.shouldPreload=!0}viewGroupLoaded(n){if(n._luigiPreloading){const r=Date.now()-(n._luigiPreloadCreatedAt||0);let a=1;r<500?a=3:r<1e3&&(a=2),this.preloadBatchSize=a,setTimeout(()=>{n._luigiPreloading=!1},this.preloadBatchSize>2?500:1e3)}}getPreloadingContainers(n){return[...n.childNodes].filter(r=>r.tagName?.startsWith("LUIGI-")&&r._luigiPreloading)}}class kn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=q.get(Sn),this.dirtyStatusService=q.get(xt)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const n=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||n).filter(a=>location.href.match(a)).length!==0}enableRouting(){this.luigi.getConfig().routing?.useHashRouting?(window.addEventListener("hashchange",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(O.getCurrentPath(!0),o,a)}),this.handleRouteChange(O.getCurrentPath(!0))):(window.addEventListener("popstate",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(O.getCurrentPath(),o,a)}),this.handleRouteChange(O.getCurrentPath()))}async handleRouteChange(n,r=!1,a=!1){const o=n.path,c=n.query,l=o+(c?"?"+c:""),f=new URLSearchParams(c),p=Object.create(null);try{if(this.dirtyStatusService?.shouldShowUnsavedChangesModal()){const x=window.location.href,U=this.dirtyStatusService.unsavedChanges.persistUrl;U&&history.pushState(window.state,"",U)}}catch{return}if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(l),await this.shouldShowModalPathInUrl(n),f.forEach((x,U)=>{p[U]=x}),this.checkInvalidateCache(this.previousPathData,o);const m=await this.getNavigationService().getPathData(o);this.previousPathData=m;const E=O.filterNodeParams(p,this.luigi),y=F.getPathWithoutHash(o);this.currentRoute={raw:window.location.href,path:o,nodeParams:E};const C=m?.selectedNode??await this.getNavigationService().getCurrentNode(o),b=C?.viewUrl||"";if(await this.handlePageNotFound(C,b,m,o,y))return;const R=this.luigi.getEngine()._connector;if(R?.renderTopNav(await this.getNavigationService().getTopNavData(o,m)),R?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,m)),R?.renderTabNav(await this.getNavigationService().getTabNavData(o,m)),R?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,m,x=>{R?.renderBreadcrumbs(x)})),C){const x={nodeParams:E||{},pathParams:m?.pathParams||{},searchParams:O.prepareSearchParamsForClient(C,this.luigi)};this.currentRoute.node=C,this.getNavigationService().onNodeChange(this.previousNode,C),this.previousNode=C,await G.updateMainContent(C,this.luigi,x,r,a)}}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(n){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(n)}async handleBookmarkableModalPath(n){const r=q.get(Sn),a=q.get(wn),o=new URLSearchParams(n?.query||""),c=O.getModalViewParamName(this.luigi),l=o.get(c);if(l){const f=o.get(`${c}Params`);try{const p=JSON.parse(f||"{}"),{nodeObject:m}=await r.extractDataFromPath(l);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(p):this.luigi.navigation().openAsModal(l,p||m.openNodeInModal)}catch(p){console.error("Error parsing modal settings from URL parameters",p)}}else return await a.closeModalsWithDirtyCheck(),void 0}appendModalDataToUrl(n,r){const a=O.getHashQueryParamSeparator(),o=O.getQueryParams(this.luigi),c=O.getModalViewParamName(this.luigi),l=o[c],f=new URL(location.href),p=this.luigi.getConfigValue("routing.useHashRouting");let m=history.state,E,y;if(p){let[C,b]=f.hash.split("?");E=C,y=O.getURLWithoutModalData(b,c),y&&(E+="?"+y)}else E=f.pathname,y=O.getURLWithoutModalData(f.search,c),y&&(E+="?"+O.getURLWithoutModalData(f.search,c));if(m=O.handleHistoryState(m,E),l!==n){if(o[c]=n,r&&Object.keys(r).length&&(o[`${c}Params`]=JSON.stringify(r)),p){const C=location.hash.indexOf(a);C!==-1&&(f.hash=f.hash.slice(0,C)),f.hash=`${f.hash}${a}${O.encodeParams(o)}`}else f.search=`?${O.encodeParams(o)}`;history.pushState(m,"",f.href)}else{const C=new URL(f);if(p){let b=C.hash.split("?")[0];C.hash=b,y&&(C.hash+="?"+y)}else C.search=y;history.replaceState({},"",C.href),history.pushState(m,"",f.href)}}removeModalDataFromUrl(n){const r=O.getQueryParams(this.luigi),a=O.getModalViewParamName(this.luigi);let o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let l={};r[a]&&(l[a]=r[a]),r[`${a}Params`]&&(l[`${a}Params`]=r[`${a}Params`]);let f=O.encodeParams(l);o.hash.includes(`?${f}`)?o.hash=o.hash.replace(`?${f}`,""):o.hash.includes(`&${f}`)&&(o.hash=o.hash.replace(`&${f}`,""))}else{let l=new URLSearchParams(o.search.slice(1));l.delete(a),l.delete(`${a}Params`);let f="";Array.from(l.keys()).forEach(p=>{f+=(f===""?"?":"&")+p+"="+l.get(p)}),o.search=f}if(history.state&&history.state.modalHistoryLength>=0&&n){history.state.modalHistoryLength;const l=history.state.pathBeforeHistory;let f=!1;if(window.addEventListener("popstate",p=>{f?(history.replaceState({},"",l),history.pushState({},"",l),history.back()):(history.pushState({},"",l),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const p=history.length-1;f=!0,history.go(-p),window.Luigi.preventLoadingModalData=!0}else{const p=history.state.modalHistoryLength;history.go(-p)}}else history.pushState({},"",o.href)}setFeatureToggle(n){const r=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),a=this.luigi.featureToggles();r&&typeof n=="string"&&O.setFeatureToggles(r,n,a)}updateModalDataInUrl(n,r,a){let o=O.getHashQueryParamSeparator();const c=O.getQueryParams(this.luigi),l=O.getModalViewParamName(this.luigi);c[l]=n,r&&Object.keys(r).length&&(c[`${l}Params`]=JSON.stringify(r));const f=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const m=location.hash.indexOf(o);m!==-1&&(f.hash=f.hash.slice(0,m)),f.hash=`${f.hash}${o}${O.encodeParams(c)}`}else f.search=`?${O.encodeParams(c)}`;a?history.pushState(window.state,"",f.href):history.replaceState(window.state,"",f.href)}checkInvalidateCache(n,r){if(!n)return;const a=q.get(vn);let o=r.split("/");if(n.nodesInPath&&n.nodesInPath.length>0){let c=n.nodesInPath.slice(1),l=!0;for(let f=0;f<c.length;f++){let p=o.length>f?o[f]:void 0,m=c[f];if(p!==m.pathSegment||!l)if(O.isDynamicNode(m)){if(!l||p!==O.getDynamicNodeValue(m,n.pathParams)){a.deleteNodesRecursively(m);break}}else l=!1}}else a.deleteCache()}async handlePageNotFound(n,r,a,o,c){const l=F.getTrimmedUrl(o),f=O.isExistingRoute(l,a);if(!r&&!n?.compound||n?.tabNav?.showAsTabHeader){const p=await O.getDefaultChildNode(a,async(m,E)=>await this.getNavigationService().getChildren(m,E));if(f){const m=F.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${m?`/${m}`:""}/${p}`,preserveView:void 0,modalSettings:void 0,newTab:!1,withoutSync:!1,preventContextUpdate:!1,preventHistoryEntry:!0}),!1}else{if(p&&a?.nodesInPath&&a.nodesInPath.length>1)return this.showPageNotFoundError(F.trimTrailingSlash(l||"")+"/"+p,c,!0),!0;const m=await O.getDefaultChildNode(a);this.showPageNotFoundError(m,c,!1)}return!0}return f?!1:(this.showPageNotFoundError(a.matchedPath,c,!0),!0)}async showPageNotFoundError(n,r,a=!1){const o=O.getPageNotFoundRedirectResult(r,a,this.luigi);if(o.ignoreLuigiErrorHandling)return;const c=o.path;if(c){if(o.keepURL){const l=this.luigi.getConfig().routing?.useHashRouting,f=O.getCurrentPath(l);f.path=c,this.handleRouteChange(f)}else this.getNavigationService().handleNavigationRequest({path:c});return}O.showRouteNotFoundAlert(r,a,this.luigi),this.getNavigationService().handleNavigationRequest({path:F.addLeadingSlash(n)})}}class wr{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(n){this.decorators=this.decorators.filter(r=>r.uid!==n.uid).concat(n)}applyDecorators(n,r){if(!n)return n;const a=new URL(F.prependOrigin(n)),o=this.decorators.filter(c=>c.type==="queryString");for(let c=0;c<o.length;c++){const l=o[c];a.searchParams.has(l.key)&&a.searchParams.delete(l.key);const f=l.valueFn();a.searchParams.append(l.key,f)}return r&&(a.search=decodeURIComponent(a.search)),a.href}}const $a=async(i,n,r)=>{const a=await n.readUserSettings(),c=i.userSettingsGroup&&typeof a=="object"&&a!==null&&i.userSettingsGroup?a[i.userSettingsGroup]:null,l=r?.nodeParams||{},f=r?.pathParams||{},p=r?.searchParams||{};if(i.webcomponent&&i.viewUrl&&!O.checkWCUrl(i.viewUrl,n))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const m=document.createElement("luigi-compound-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.compoundConfig=i.compound,m.context=i.context,m.clientPermissions=i.clientPermissions??{},m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=p,m.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),m.locale=n.i18n().getCurrentLocale(),m.theme=n.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ee.findVirtualTreeRootNode(i),n.getEngine()._comm.addListeners(m,n),m}else{const m=document.createElement("luigi-container");return m.setAttribute("lui_container","true"),m.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",m.webcomponent=i.webcomponent??!1,m.context=i.context,m.authData=dn.getStoredAuthData(),m.clientPermissions=i.clientPermissions??{},m.cssVariables=await n.theming().getCSSVariables(),m.nodeParams=l,m.pathParams=f,m.userSettingsGroup=i.userSettingsGroup,m.userSettings=c,m.searchParams=p,m.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),m.locale=n.i18n().getCurrentLocale(),m.theme=n.theming().getCurrentTheme(),m.viewGroup=i.viewGroup,m.virtualTree=i.virtualTree||i._virtualTree,m.virtualTreeRootNode=Ee.findVirtualTreeRootNode(i),Ec(m,n),Cc(m,n),n.getEngine()._comm.addListeners(m,n),m.luigiMfId=F.getRandomId(),m}},Ec=(i,n)=>{const r=n.getConfigValue("settings.customSandboxRules");if(!r?.length)return;const a=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],o=r?[...new Set([...a,...r])]:a;i.sandboxRules=o},Cc=(i,n)=>{const r=n.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,o)=>{r[o]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},G={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:i=>{G.navService=q.get(Sn),G.routingService=q.get(kn),G.luigi=i,i.getEngine()._connector?.renderMainLayout();const n=q.get(vr);n.shouldPreload=!0,n.preload(!0),n.shouldPreload=!1},update:async i=>{const n=G.routingService.getCurrentRoute();if(!n)return;const r=!i||i.length===0;if((r||i.includes("settings.header")||i.includes("settings")||i.includes("navigation")||i.includes("navigation.profile")||i.includes("navigation.contextSwitcher")||i.includes("navigation.productSwitcher"))&&G.luigi.getEngine()._connector?.renderTopNav(await G.navService.getTopNavData(n.path)),r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer")){q.get(vn).deleteCache(),G.luigi.getEngine()._connector?.renderLeftNav(await G.navService.getLeftNavData(n.path)),G.luigi.getEngine()._connector?.renderTabNav(await G.navService.getTabNavData(n.path));const a=G.luigi.getEngine()._connector;a?.renderBreadcrumbs(await G.navService.getBreadcrumbData(n.path,void 0,o=>{a?.renderBreadcrumbs(o)}))}(r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings.theming"))&&(q.get(vn).deleteCache(),n.node&&G.updateMainContent(n.node,G.luigi))},updateMainContent:async(i,n,r,a,o)=>{const c=await n.readUserSettings(),f=i.userSettingsGroup&&typeof c=="object"&&c!==null&&i.userSettingsGroup?c[i.userSettingsGroup]:null,p=n.getEngine()._connector?.getContainerWrapper();n.getEngine()._connector?.hideLoadingIndicator(p);const m=r?.nodeParams||{},E=r?.pathParams||{},y=r?.searchParams||{};if(i&&p){let C,b;if((i.virtualTree||i._virtualTree)&&(b=Ee.findVirtualTreeRootNode(i)),[...p.childNodes].forEach(R=>{if(R.tagName?.indexOf("LUIGI-")===0)if(R.viewGroup&&i.viewGroup!==R.viewGroup){R.style.display="none";const x=n.getConfigValue("navigation.viewGroupSettings")?.[R.viewGroup];x?.preloadUrl&&(R.viewurl=x.preloadUrl,R.context={},R.nodeParams={},R.pathParams={})}else R.viewGroup||R.virtualTree&&b===R.virtualTreeRootNode?C=R:R.remove()}),C&&C._luigiPreloading&&(C._luigiPreloading=!1,q.get(vr).viewGroupLoaded(C)),C)a||(C.style.display="block",C.viewurl=i.viewUrl?q.get(wr).applyDecorators(O.substituteViewUrl(i,E,n),i.decodeViewUrl??!1):"",C.nodeParams=m,C.pathParams=E,C.clientPermissions=i.clientPermissions,C.searchParams=y,C.locale=n.i18n().getCurrentLocale(),C.theme=n.theming().getCurrentTheme(),C.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),C.userSettingsGroup=i.userSettingsGroup,C.userSettings=f,Ec(C,n),Cc(C,n)),o||C.updateContext(i.context||{});else{const R=await $a(i,n,r);p?.appendChild(R);const x=n.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&x?.showLoadingIndicator(p)}}},openModal:async(i,n,r,a)=>{const o=await $a(n,i);G.modalContainer.push(o);const c=q.get(kn),l=q.get(wn),f=q.get(xt);let p=!1,m,E;const C=new Promise(x=>{m=()=>{p||(p=!0,x(),l.removeLastModalFromStack())},E=async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},o.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,E)}),b={closePromise:C,resolveFn:m,onCloseRequestHandler:E,onInternalClose:()=>{try{f.clearDirtyState(o),b.resolveFn&&b.resolveFn()}catch(x){console.warn("onInternalClose failed",x)}},modalsettings:r};l.registerModal(b),i.getEngine()._connector?.renderModal(o,r,async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}a?.(),m&&m(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>C);const R=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&R?.showLoadingIndicator(o.parentElement)},updateModalSettings:(i,n,r)=>{const a=q.get(wn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const o=q.get(kn),c=O.getModalPathFromPath(r);c&&o.updateModalDataInUrl(c,a.getModalSettings(),n),r.getEngine()._connector?.updateModalSettings(a.getModalSettings())},openDrawer:async(i,n,r,a)=>{const o=q.get(xt);if(G.drawerContainer&&o.shouldShowUnsavedChangesModal(G.drawerContainer))try{await o.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}const c=await $a(n,i);G.drawerContainer=c;const l=new Promise(p=>{const m=async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}G.drawerContainer=void 0,o.clearDirtyState(c),p()};c.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,m)});i.getEngine()._connector?.renderDrawer(c,r,async()=>{try{await o.getUnsavedChangesModalPromise(c)}catch{return}a?.(),G.drawerContainer=void 0,o.clearDirtyState(c)},()=>l);const f=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&f?.showLoadingIndicator(c.parentElement)}};class iw{constructor(){this._userInfoStore=is({}),this._loggedInStore=is(!1)}setUserInfo(n){this._userInfoStore.set(n)}setLoggedIn(n){this._loggedInStore.set(n)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const n=Ge.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=Ge.getConfigValue(`auth.${n}`),a=dn.parseUrlAuthErrors()||{};if(await dn.handleUrlAuthErrors(r,a.error,a.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(n,r),F.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(c=>(this.idpProviderInstance=c,this.checkAuth(r))).catch(c=>{const l=`Error: ${c.message||c}`;console.error(l,c.message&&c),Ge.setErrorMessage(l)}):this.checkAuth(r)}async checkAuth(n){const r=dn.getStoredAuthData();if(!r||!dn.isLoggedIn()){if(Ge.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return r&&(o=await lr.handleAuthEvent("onAuthExpired",n)),o?this.startAuthorization():void 0}this.idpProviderInstance.settings&&F.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,r).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):F.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(n).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(oc(this._userInfoStore))),F.isFunction(Ge.getConfigValue("auth.events.onAuthSuccessful"))&&At.isNewlyAuthorized()&&await lr.handleAuthEvent("onAuthSuccessful",n,r),At.removeNewlyAuthorized(),F.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),F.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(n=>{At.setNewlyAuthorized(),n&&console.error(n)})}logout(){const n=dn.getStoredAuthData(),r=async c=>{await lr.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),At.removeAuthData()},a=Ge.getConfigValue(`auth.${Ge.getConfigValue("auth.use")}.logoutFn`),o=Ge.getConfigValueAsync("navigation.profile.logout.customLogoutFn");F.isFunction(a)?a(this.idpProviderInstance.settings,n,r):F.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(n,r):o&&F.isFunction(o)?o(n,r):r(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(n){return{message:n,name:"IdpProviderException"}}async getIdpProviderInstance(n,r){const a=F.getConfigValueFromObject(r,"idpProvider");if(a){const c=await new a(r);return["login"].forEach(l=>{if(!F.isFunction(c[l]))throw this.createIdpProviderException(`${l} function does not exist in custom IDP Provider ${n}`)}),c}if(F.isFunction(Ge.getConfigValue("auth.events.onAuthConfigError")))await lr.handleAuthEvent("onAuthConfigError",{idpProviderName:n,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${n} does not exist.`)}unload(){this.idpProviderInstance&&F.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&F.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}broadcastAuthData(n){const a=Ge.getLuigi()?.getEngine()?._connector?.getContainerWrapper();if(a){for(const o of a.childNodes)o.tagName?.startsWith("LUIGI-")&&o.setAttribute("auth-data",JSON.stringify(n));G.modalContainer?.forEach(o=>o.setAttribute("auth-data",JSON.stringify(n))),G.drawerContainer&&G.drawerContainer.setAttribute("auth-data",JSON.stringify(n))}}}const $n=new iw,sw={luigi:{button:{confirm:"Yes",dismiss:"No"},confirmationModal:{body:"Are you sure you want to do this?",header:"Confirmation"},navigation:{up:"Up"},notExactTargetNode:"Could not map the exact target node for the requested route {route}.",requestedRouteNotFound:"Could not find the requested route {route}.",unsavedChangesAlert:{body:"Unsaved changes will be lost. Do you want to continue?",header:"Unsaved changes detected"}}},aw=sw;class ow{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=aw}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(n=>{this.broadcastLocaleToAllContainers(n)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(n,r){if(!r?.clientPermissions?.changeCurrentLocale){console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.');return}n&&(r&&(r.locale=n),sessionStorage.setItem(this.currentLocaleStorageKey,n),this._notifyLocaleChange(n)),this.luigi.getEngine()._connector?.setCurrentLocale(n)}addCurrentLocaleChangeListener(n){let r=null;return F.isFunction(n)?(r=F.getRandomId(),this.listeners[r]=n):console.error("Provided locale change listener is not a function."),r}removeCurrentLocaleChangeListener(n){n&&this.listeners[n]?delete this.listeners[n]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(n,r=void 0,a=void 0){if(!n)return"";if(this.translationImpl){const c=this.translationImpl.getTranslation(n,r,a);if(c!==n)return c}const o=this.findTranslation(n,this.translationTable,r);return o||n}_notifyLocaleChange(n){Object.getOwnPropertyNames(this.listeners).forEach(r=>{this.listeners[Number(r)](n)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),F.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(n){const r=F.getNodeList("luigi-container[lui_container]");r?.length&&n&&r.forEach(a=>{a.locale=n,a.updateContext({locale:n})})}findTranslation(n,r,a){const o=n.split(".");for(let c=0;c<o.length;c++){const l=o[c];if(Object.prototype.hasOwnProperty.call(r,l)&&typeof r[l]=="object")r=r[l];else return a?this.findInterpolations(r[l],a):r[l]}}findInterpolations(n,r){return typeof n!="string"||!n.trim()||Object.keys(r).forEach(a=>{n=n.replace(new RegExp("{"+as.escapeKeyForRegexp(a)+"}","gi"),r[a])}),n}}const Wa={getMicrofrontendsInDom(i){return[...this.getMainMicrofrontends(i).map(n=>({container:n.iframe,active:n.active,type:"main",id:n.id})),...this.getModalMicrofrontends().map(n=>({container:n.iframe,active:n.active,type:"modal",id:n.id})),...(()=>{const n=this.getDrawerMicrofrontends();return n.iframe?[{container:n.iframe,active:n.active,type:"drawer",id:n.id}]:[]})()]},getMainMicrofrontends(i){const n=i.getEngine()._connector?.getContainerWrapper();if(!n)return[];const r=[];for(const a of n.childNodes)if(a.tagName?.startsWith("LUIGI-"))if(a.iframeHandle?.iframe)r.push({iframe:a.iframeHandle.iframe,id:a.luigiMfId,active:F.isElementVisible(a)});else{const o=a.shadowRoot?.firstElementChild?.firstElementChild??null;o&&r.push({iframe:o,id:a.luigiMfId,active:F.isElementVisible(a)})}return r},getModalMicrofrontends(){const i=[];for(const n of G.modalContainer)if(n.iframeHandle?.iframe)i.push({iframe:n.iframeHandle.iframe,id:n.luigiMfId,active:F.isElementVisible(n)});else{const r=n.shadowRoot?.firstElementChild?.firstElementChild??null;r&&i.push({iframe:r,id:n.luigiMfId,active:F.isElementVisible(n)})}return i},getDrawerMicrofrontends(){if(!G.drawerContainer)return{};if(G.drawerContainer.iframeHandle?.iframe)return{iframe:G.drawerContainer.iframeHandle.iframe,id:G.drawerContainer.luigiMfId,active:F.isElementVisible(G.drawerContainer)};{const i=G.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(i)return{iframe:i,id:G.drawerContainer.luigiMfId,active:F.isElementVisible(G.drawerContainer)}}return{}},getAllLuigiContainerIframe(i){const n=i.getEngine()._connector?.getContainerWrapper();if(!n)return;const r=[...n.children].filter(a=>a.tagName?.indexOf("LUIGI-CONTAINER")===0&&a.iframeHandle?.iframe);for(const a of G.modalContainer)a.iframeHandle?.iframe&&r.push(a);return G.drawerContainer&&G.drawerContainer.iframeHandle?.iframe&&r.push(G.drawerContainer),r.length>0?r:void 0}};class uw{constructor(n){this.luigi=n}getShellbar(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarElement()||null}getShellbarActions(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarActions()||null}getLuigiContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getLuigiContainer()||null}getNavFooterContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getNavFooterContainer()||null}getMicrofrontends(){return Wa.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();let r=[];if(G.modalContainer)for(const a of Array.from(G.modalContainer))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);if(G.drawerContainer&&r.push(G.drawerContainer.iframeHandle.iframe),!n)return null;for(const a of Array.from(n.childNodes))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);return r}getCurrentMicrofrontendIframe(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();if(!n)return null;const r=G.modalContainer[0]?.iframeHandle?.iframe??null;let a=null,o=null;for(const c of Array.from(n.children))c.tagName?.startsWith("LUIGI-")&&F.isElementVisible(c)&&(c.iframeHandle?.iframe?a=c.iframeHandle.iframe:o=c.shadowRoot?.firstElementChild?.firstElementChild??null);return r||a||o}}const lw={luigiAfterInit:async i=>{F.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await Ge.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class cw{constructor(){this.featureToggleList=new Set}setFeatureToggle(n,r=!1){this.isValid(n)&&(n.startsWith("!")&&!r||this.isDuplicatedOrDisabled(n)||this.featureToggleList.add(n))}unsetFeatureToggle(n){if(this.isValid(n)){if(!this.featureToggleList.has(n)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(n)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(r=>!r.startsWith("!"))}isValid(n){return F.isString(n)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(n){return this.featureToggleList.has(n)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${n}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class hw{constructor(n){this.hashRouting=!1,this.options={fromContext:null,fromClosestContext:!1,fromVirtualTreeRoot:!1,fromParent:!1,nodeParams:{}},this.navigate=async(r,a,o,c,l)=>{const f=r[0]!=="/";this.options.relative=f;const p={modalSettings:o,newTab:!1,options:this.options,path:r,preserveView:a,preventContextUpdate:!1,preventHistoryEntry:!1,withoutSync:!1};return this.navService.handleNavigationRequest(p,void 0)},this.openAsModal=async(r,a,o)=>{if(!a?.keepPrevious&&!await this.modalService.closeModalsWithDirtyCheck())return;const c=r.replace(/\/\/+/g,"/");if(!await Ee.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),p=a||{};p.title||(p.title=f?.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(c,p),this.luigi.getEngine()._ui.openModal(this.luigi,f,p,o)},this.openAsDrawer=async(r,a,o)=>{const c=r.replace(/\/\/+/g,"/");if(!await Ee.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),p=a||{};if(!p.header?.title){const E=await O.getNodeLabel(f,this.luigi)||"";p.header?p.header.title=E:p.header={title:E}}p.overlap===void 0&&(p.overlap=!0),this.luigi.getEngine()._ui.openDrawer(this.luigi,f,p,o)},this.runTimeErrorHandler=async r=>{const{path:a}=O.getCurrentPath(this.luigi.getConfig().routing?.useHashRouting),o=await this.navService.getCurrentNode(a),c=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");o?.runTimeErrorHandler?.errorFn&&F.isFunction(o?.runTimeErrorHandler?.errorFn)?o.runTimeErrorHandler.errorFn(r,o):c?.errorFn&&F.isFunction(c.errorFn)&&c.errorFn(r,o)},this.pathExists=async r=>await O.pathExists(r,this.luigi),this.luigi=n,this.hashRouting=n.getConfig().routing?.useHashRouting,this.navService=q.get(Sn),this.routingService=q.get(kn),this.modalService=q.get(wn)}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromContext(n){return this.options.fromContext=n,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(n){return n&&Object.assign(this.options.nodeParams??{},n),this}}class fw{constructor(n){this.luigi=n}addSearchParams(n,r=!1){if(!F.isObject(n)){console.log("Params argument must be an object");return}const a=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?a.hash=O.addParamsOnHashRouting(n,a.hash):O.modifySearchParams(n,a.searchParams),this.handleBrowserHistory(r,a),this.luigi.configChanged()}getSearchParams(){const n={},r=["__proto__","constructor","prototype"],a=new URL(location.href);let o;if(this.luigi.getConfigValue("routing.useHashRouting")){const c=a.hash.split("?")[1];o=c?new URLSearchParams(c).entries():[]}else o=a.searchParams.entries();for(const[c,l]of o){if(r.some(f=>c===f)){console.warn(`Blocked because of potentially dangerous query param: ${c}`);continue}n[c]=l}return n}handleBrowserHistory(n,r){const a=this.sanitizeUrl(r.href);if(!a){console.warn("invalid url: "+a);return}n?window.history.pushState({},"",a):window.history.replaceState({},"",a)}sanitizeUrl(n){return new URL(location.href).origin===new URL(n).origin?n:void 0}addNodeParams(n,r){if(!F.isObject(n)){console.log("Params argument must be an object");return}const a=O.getContentViewParamPrefix(this.luigi),o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=O.addParamsOnHashRouting(n,o.hash,a):O.modifySearchParams(n,o.searchParams,a),this.handleBrowserHistory(r,o),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class dw{#e;#h="";constructor(n){this.#e=n}async getAvailableThemes(){return await this.#e.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(n){this.#h=n,this.#e.__cssVars=void 0}async getThemeObject(n){return(await this.getAvailableThemes())?.find(a=>a.id===n)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.#h)return this.#h;const n=this.#e.getConfigValue("settings.theming");return n.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",n),n.defaultTheme}isThemingAvailable(){return!!this.#e.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const n=this.#e.getConfigValue("settings.theming.variables.file");if(n)try{const r=await fetch(n);window.Luigi.__cssVars=(await r.json()).root,Object.keys(window.Luigi.__cssVars).forEach(a=>{const o=getComputedStyle(document.documentElement).getPropertyValue("--"+a);o&&(window.Luigi.__cssVars[a]=o)})}catch(r){F.isFunction(this.#e.getConfigValue("settings.theming.variables.errorHandling"))?this.#e.getConfigValue("settings.theming.variables.errorHandling")(r):console.error("CSS variables file error: ",r)}else this.#e.getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(r=>{window.Luigi.__cssVars[r]=getComputedStyle(document.documentElement).getPropertyValue("--"+r)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const n=q.get(wr);(()=>{const a=this.#e.getConfigValue("settings.theming");a&&a.nodeViewURLDecorator&&a.nodeViewURLDecorator.queryStringParameter&&n.add({type:"queryString",uid:"theming",key:a.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const o=this.getCurrentTheme(),c=a.nodeViewURLDecorator.queryStringParameter.value;return c?c(o):o}}),a&&a.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}let Yl;const xe={luigi:void 0,documentTitle:void 0,init:i=>{xe.luigi=i,xe.documentTitle=is(void 0),Yl=q.get(xt)},processAlert:(i,n,r)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");const a={openFromClient:n,close:()=>{i.id&&r.notifyAlertClosed(i.id)},link:o=>{if(i.links){const c=i.links[o];if(c&&(c.url&&xe.luigi?.navigation().navigate(c.url),c.dismissKey&&i.id))return r.notifyAlertClosed(i.id,c.dismissKey),!0}return!1}};xe.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,n)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:xe.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:xe.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:xe.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:xe.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),xe.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,n)=>{if(!xe.luigi)throw new Error("Luigi is not initialized.");Yl.updateDirtyStatus(i,n)}};class gw{processUserSettingGroups(n,r){const a=[],o=n?.userSettingGroups,c=r?.userSettings?.userSettingGroups,l=o||c;if(F.isObject(l)){for(const f in l){const p={};p[f]=l[f],a.push(p)}return a}return a}getUserSettingsIframesInDom(){const n=document.querySelector(".iframeUserSettingsCtn");return n?[...n.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(n=>{n.style.display="none"})}findActiveCustomUserSettingsIframe(n){const r=document.querySelectorAll("[userSettingsGroup]");for(let a=0;a<r.length;a++)if(r[a].contentWindow===n)return r[a];return null}}const pw=new gw;class mw{constructor(n){this.dirtyStatusService=q.get(xt),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=r=>new Promise(a=>{r.id||(r.id=F.getRandomId().toString());const o={openFromClient:!1,close:()=>{a(!0)},link:c=>{if(r.links){const l=r.links[c];if(l&&(l.url&&this.luigi?.navigation().navigate(l.url),l.dismissKey))return a(l.dismissKey),!0}return!1}};this.luigi.getEngine()._connector?.renderAlert(r,o)}),this.showConfirmationModal=r=>(r&&(r={...r,header:this.luigi.i18n().getTranslation(r.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(r.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(r.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(r.buttonConfirm||"luigi.button.confirm")}),new Promise((a,o)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(r,{confirm(){a(!0)},dismiss(){o()}})})),this.processUserSettingGroups=()=>{const r=this.luigi.getConfigValue("userSettings"),a=this.luigi.getConfigValue("settings");return pw.processUserSettingGroups(r,a)},this.openUserSettings=r=>{this.luigi.getEngine()._connector?.openUserSettings(r)},this.closeUserSettings=()=>{this.luigi.getEngine()._connector?.closeUserSettings()},this.setDocumentTitle=r=>{this.luigi.getEngine()._ux?.documentTitle?.set(r),this.luigi.getEngine()._connector?.setDocumentTitle(r)},this.getDocumentTitle=()=>oc(this.luigi.getEngine()._ux?.documentTitle)||window.document.title||"",this.hideAppLoadingIndicator=()=>{const r=document.querySelector(this.appLoadingIndicatorSelector);r&&(r.classList.add("hidden"),setTimeout(()=>{r.parentNode?.removeChild(r)},500))},this.showLoadingIndicator=r=>this.luigi.getEngine()._connector?.showLoadingIndicator(r),this.hideLoadingIndicator=r=>this.luigi.getEngine()._connector?.hideLoadingIndicator(r),this.addBackdrop=()=>this.luigi.getEngine()._connector?.addBackdrop(),this.removeBackdrop=()=>this.luigi.getEngine()._connector?.removeBackdrop(),this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=n}}class _w{filterIdFromMessageObject(n){const{id:r,...a}=n;return{id:r,messageWithoutId:a}}}const Jl=new _w;class vw{constructor(n){this.luigi=n}sendToAll(n){const r=Wa.getAllLuigiContainerIframe(this.luigi);if(!r){console.warn("No Luigi containers found to send the message to.");return}const{id:a,messageWithoutId:o}=Jl.filterIdFromMessageObject(n);if(!a){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const c of r)c.sendCustomMessage?c.sendCustomMessage(a,o):console.warn("Container does not support sending custom messages:",c)}send(n,r){const a=Wa.getAllLuigiContainerIframe(this.luigi);if(!a){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:c}=Jl.filterIdFromMessageObject(r);if(!o){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const l of a)if(l.luigiMfId===n){l.sendCustomMessage?l.sendCustomMessage(o,c):console.warn("Container does not support sending custom messages:",l);return}console.warn(`No container found with microfrontend ID: ${n}`)}}class ww{constructor(n){this.engine=n,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=r=>{this.config=r,this.setConfigCallback(this.getConfigReadyCallback()),$n.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,lw.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.customMessages=()=>(this._customMessages||(this._customMessages=new vw(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new ow(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new uw(this)),this._elements),this.navigation=()=>new hw(this),this.ux=()=>new mw(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new cw),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new fw(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new dw(this)),this._theming),this.auth=()=>lr,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return F.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return Mn.getConfigValueFromObjectAsync(this.getConfig(),n,r)}clearNavigationCache(){q.get(vn).deleteCache();const n=r=>{r&&r.forEach&&r.forEach(a=>{a.titleResolver&&a.titleResolver._cache&&(a.titleResolver._cache=void 0),a.children&&n(a.children)})};n(this.getConfig().navigation.nodes)}async readUserSettings(){const n=await this.getConfigValueAsync("userSettings"),r=n||await this.getConfigValueAsync("settings.userSettings");if(r&&F.isFunction(r.readUserSettings))return r.readUserSettings();const a=localStorage.getItem(this.USER_SETTINGS_KEY);return a&&JSON.parse(a)}async storeUserSettings(n,r){const a=await this.getConfigValueAsync("userSettings"),o=a||await this.getConfigValueAsync("settings.userSettings");if(o&&F.isFunction(o.storeUserSettings))return o.storeUserSettings(n,r);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(n)),this.configChanged()}createConfigStore(){const n=is({}),r={};let a=[];return{subscribe:o=>{a.push(n.subscribe(o))},reset:o=>{n.update(o)},subscribeToScope:(o,c)=>{let l=r[c];l||(l=new Set,r[c]=l),l.add(o)},fire:(o,c)=>{const l=r[o];l&&[...l].forEach(f=>{f(c)})},clear:()=>{a.forEach(o=>{o()}),a=[]}}}getConfigReadyCallback(){return new Promise(n=>{this.i18n()._init(),n()})}setConfigCallback(n){this.configReadyCallback=n}}const Sw=!1;var Ew=Array.isArray,Cw=Array.prototype.indexOf,Sr=Array.prototype.includes,yw=Array.from,Tw=Object.defineProperty,Yr=Object.getOwnPropertyDescriptor,bw=Object.prototype,Rw=Array.prototype,Aw=Object.getPrototypeOf,Xl=Object.isExtensible;const Pw=()=>{};function Iw(i){for(var n=0;n<i.length;n++)i[n]()}function xw(){var i,n,r=new Promise((a,o)=>{i=a,n=o});return{promise:r,resolve:i,reject:n}}const Fe=2,jr=4,yc=8,Tc=1<<24,Xt=16,En=32,Wn=64,Va=128,_t=512,Oe=1024,Qe=2048,Ft=4096,Jt=8192,mn=16384,ni=32768,Zl=1<<25,os=65536,Ba=1<<17,Lw=1<<18,ls=1<<19,Nw=1<<20,Vn=65536,Ga=1<<21,Ya=1<<22,ei=1<<23,Da=Symbol("$state"),Ja=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Uw(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ow(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function $w(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Dw(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mw(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Be=Symbol();function Fw(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function kw(i){return i===this.v}let Xa=!1,Hw=!1;function Ww(){Xa=!0}let Lt=null;function us(i){Lt=i}function Vw(i,n=!1,r){Lt={p:Lt,i:!1,c:null,e:null,s:i,x:null,r:me,l:Xa&&!n?{s:null,u:null,$:[]}:null}}function Bw(i){var n=Lt,r=n.e;if(r!==null){n.e=null;for(var a of r)iS(a)}return n.i=!0,Lt=n.p,{}}function cs(){return!Xa||Lt!==null&&Lt.l===null}let cr=[];function Gw(){var i=cr;cr=[],Iw(i)}function pr(i){if(cr.length===0){var n=cr;queueMicrotask(()=>{n===cr&&Gw()})}cr.push(i)}function bc(i){var n=me;if(n===null)return ue.f|=ei,i;if((n.f&ni)===0&&(n.f&jr)===0)throw i;hr(i,n)}function hr(i,n){for(;n!==null;){if((n.f&Va)!==0){if((n.f&ni)===0)throw i;try{n.b.error(i);return}catch(r){i=r}}n=n.parent}throw i}const Qw=-7169;function be(i,n){i.f=i.f&Qw|n}function Za(i){(i.f&_t)!==0||i.deps===null?be(i,Oe):be(i,Ft)}function Rc(i){if(i!==null)for(const n of i)(n.f&Fe)===0||(n.f&Vn)===0||(n.f^=Vn,Rc(n.deps))}function Ac(i,n,r){(i.f&Qe)!==0?n.add(i):(i.f&Ft)!==0&&r.add(i),Rc(i.deps),be(i,Oe)}const cn=new Set;let Te=null,Pt=null,Qa=null,Ma=!1,fr=null,ts=null;var jl=0;let qw=1;class Bn{id=qw++;current=new Map;previous=new Map;#e=new Set;#h=new Set;#n=new Map;#o=new Map;#r=null;#t=[];#s=[];#i=new Set;#a=new Set;#u=new Map;is_fork=!1;#c=!1;#f=new Set;#d(){return this.is_fork||this.#o.size>0}#g(){for(const a of this.#f)for(const o of a.#o.keys()){for(var n=!1,r=o;r.parent!==null;){if(this.#u.has(r)){n=!0;break}r=r.parent}if(!n)return!0}return!1}skip_effect(n){this.#u.has(n)||this.#u.set(n,{d:[],m:[]})}unskip_effect(n){var r=this.#u.get(n);if(r){this.#u.delete(n);for(var a of r.d)be(a,Qe),this.schedule(a);for(a of r.m)be(a,Ft),this.schedule(a)}}#l(){if(jl++>1e3&&(cn.delete(this),zw()),!this.#d()){for(const f of this.#i)this.#a.delete(f),be(f,Qe),this.schedule(f);for(const f of this.#a)be(f,Ft),this.schedule(f)}const n=this.#t;this.#t=[],this.apply();var r=fr=[],a=[],o=ts=[];for(const f of n)try{this.#p(f,r,a)}catch(p){throw xc(f),p}if(Te=null,o.length>0){var c=Bn.ensure();for(const f of o)c.schedule(f)}if(fr=null,ts=null,this.#d()||this.#g()){this.#m(a),this.#m(r);for(const[f,p]of this.#u)Ic(f,p)}else{this.#n.size===0&&cn.delete(this),this.#i.clear(),this.#a.clear();for(const f of this.#e)f(this);this.#e.clear(),ec(a),ec(r),this.#r?.resolve()}var l=Te;if(this.#t.length>0){const f=l??=this;f.#t.push(...this.#t.filter(p=>!f.#t.includes(p)))}l!==null&&(cn.add(l),l.#l()),cn.has(this)||this.#w()}#p(n,r,a){n.f^=Oe;for(var o=n.first;o!==null;){var c=o.f,l=(c&(En|Wn))!==0,f=l&&(c&Oe)!==0,p=f||(c&Jt)!==0||this.#u.has(o);if(!p&&o.fn!==null){l?o.f^=Oe:(c&jr)!==0?r.push(o):ii(o)&&((c&Xt)!==0&&this.#a.add(o),Cr(o));var m=o.first;if(m!==null){o=m;continue}}for(;o!==null;){var E=o.next;if(E!==null){o=E;break}o=o.parent}}}#m(n){for(var r=0;r<n.length;r+=1)Ac(n[r],this.#i,this.#a)}capture(n,r,a=!1){r!==Be&&!this.previous.has(n)&&this.previous.set(n,r),(n.f&ei)===0&&(this.current.set(n,[n.v,a]),Pt?.set(n,n.v))}activate(){Te=this}deactivate(){Te=null,Pt=null}flush(){try{Ma=!0,Te=this,this.#l()}finally{jl=0,Qa=null,fr=null,ts=null,Ma=!1,Te=null,Pt=null,_n.clear()}}discard(){for(const n of this.#h)n(this);this.#h.clear(),cn.delete(this)}register_created_effect(n){this.#s.push(n)}#w(){for(const E of cn){var n=E.id<this.id,r=[];for(const[y,[C,b]]of this.current){if(E.current.has(y)){var a=E.current.get(y)[0];if(n&&C!==a)E.current.set(y,[C,b]);else continue}r.push(y)}var o=[...E.current.keys()].filter(y=>!this.current.has(y));if(o.length===0)n&&E.discard();else if(r.length>0){E.activate();var c=new Set,l=new Map;for(var f of r)Pc(f,o,c,l);l=new Map;var p=[...E.current.keys()].filter(y=>this.current.has(y)?this.current.get(y)[0]!==y:!0);for(const y of this.#s)(y.f&(mn|Jt|Ba))===0&&ja(y,p,l)&&((y.f&(Ya|Xt))!==0?(be(y,Qe),E.schedule(y)):E.#i.add(y));if(E.#t.length>0){E.apply();for(var m of E.#t)E.#p(m,[],[]);E.#t=[]}E.deactivate()}}for(const E of cn)E.#f.has(this)&&(E.#f.delete(this),E.#f.size===0&&!E.#d()&&(E.activate(),E.#l()))}increment(n,r){let a=this.#n.get(r)??0;if(this.#n.set(r,a+1),n){let o=this.#o.get(r)??0;this.#o.set(r,o+1)}}decrement(n,r,a){let o=this.#n.get(r)??0;if(o===1?this.#n.delete(r):this.#n.set(r,o-1),n){let c=this.#o.get(r)??0;c===1?this.#o.delete(r):this.#o.set(r,c-1)}this.#c||a||(this.#c=!0,pr(()=>{this.#c=!1,this.flush()}))}transfer_effects(n,r){for(const a of n)this.#i.add(a);for(const a of r)this.#a.add(a);n.clear(),r.clear()}oncommit(n){this.#e.add(n)}ondiscard(n){this.#h.add(n)}settled(){return(this.#r??=xw()).promise}static ensure(){if(Te===null){const n=Te=new Bn;Ma||(cn.add(Te),pr(()=>{Te===n&&n.flush()}))}return Te}apply(){{Pt=null;return}}schedule(n){if(Qa=n,n.b?.is_pending&&(n.f&(jr|yc|Tc))!==0&&(n.f&ni)===0){n.b.defer_effect(n);return}for(var r=n;r.parent!==null;){r=r.parent;var a=r.f;if(fr!==null&&r===me&&(ue===null||(ue.f&Fe)===0))return;if((a&(Wn|En))!==0){if((a&Oe)===0)return;r.f^=Oe}}this.#t.push(r)}}function zw(){try{Uw()}catch(i){hr(i,Qa)}}let Yt=null;function ec(i){var n=i.length;if(n!==0){for(var r=0;r<n;){var a=i[r++];if((a.f&(mn|Jt))===0&&ii(a)&&(Yt=new Set,Cr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Wc(a),Yt?.size>0)){_n.clear();for(const o of Yt){if((o.f&(mn|Jt))!==0)continue;const c=[o];let l=o.parent;for(;l!==null;)Yt.has(l)&&(Yt.delete(l),c.push(l)),l=l.parent;for(let f=c.length-1;f>=0;f--){const p=c[f];(p.f&(mn|Jt))===0&&Cr(p)}}Yt.clear()}}Yt=null}}function Pc(i,n,r,a){if(!r.has(i)&&(r.add(i),i.reactions!==null))for(const o of i.reactions){const c=o.f;(c&Fe)!==0?Pc(o,n,r,a):(c&(Ya|Xt))!==0&&(c&Qe)===0&&ja(o,n,a)&&(be(o,Qe),eo(o))}}function ja(i,n,r){const a=r.get(i);if(a!==void 0)return a;if(i.deps!==null)for(const o of i.deps){if(Sr.call(n,o))return!0;if((o.f&Fe)!==0&&ja(o,n,r))return r.set(o,!0),!0}return r.set(i,!1),!1}function eo(i){Te.schedule(i)}function Ic(i,n){if(!((i.f&En)!==0&&(i.f&Oe)!==0)){(i.f&Qe)!==0?n.d.push(i):(i.f&Ft)!==0&&n.m.push(i),be(i,Oe);for(var r=i.first;r!==null;)Ic(r,n),r=r.next}}function xc(i){be(i,Oe);for(var n=i.first;n!==null;)xc(n),n=n.next}function Kw(i){let n=0,r=no(0),a;return()=>{ro()&&(dr(r),aS(()=>(n===0&&(a=gS(()=>i(()=>Jr(r)))),n+=1,()=>{pr(()=>{n-=1,n===0&&(a?.(),a=void 0,Jr(r))})})))}}var Yw=os|ls;function Jw(i,n,r,a){new Xw(i,n,r,a)}class Xw{parent;is_pending=!1;transform_error;#e;#h=null;#n;#o;#r;#t=null;#s=null;#i=null;#a=null;#u=0;#c=0;#f=!1;#d=new Set;#g=new Set;#l=null;#p=Kw(()=>(this.#l=no(this.#u),()=>{this.#l=null}));constructor(n,r,a,o){this.#e=n,this.#n=r,this.#o=c=>{var l=me;l.b=this,l.f|=Va,a(c)},this.parent=me.b,this.transform_error=o??this.parent?.transform_error??(c=>c),this.#r=oS(()=>{this.#S()},Yw)}#m(){try{this.#t=Un(()=>this.#o(this.#e))}catch(n){this.error(n)}}#w(n){const r=this.#n.failed;r&&(this.#i=Un(()=>{r(this.#e,()=>n,()=>()=>{})}))}#C(){const n=this.#n.pending;n&&(this.is_pending=!0,this.#s=Un(()=>n(this.#e)),pr(()=>{var r=this.#a=document.createDocumentFragment(),a=Mc();r.append(a),this.#t=this.#v(()=>Un(()=>this.#o(a))),this.#c===0&&(this.#e.before(r),this.#a=null,ns(this.#s,()=>{this.#s=null}),this.#_(Te))}))}#S(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#t=Un(()=>{this.#o(this.#e)}),this.#c>0){var n=this.#a=document.createDocumentFragment();cS(this.#t,n);const r=this.#n.pending;this.#s=Un(()=>r(this.#e))}else this.#_(Te)}catch(r){this.error(r)}}#_(n){this.is_pending=!1,n.transfer_effects(this.#d,this.#g)}defer_effect(n){Ac(n,this.#d,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#v(n){var r=me,a=ue,o=Lt;Cn(this.#r),kt(this.#r),us(this.#r.ctx);try{return Bn.ensure(),n()}catch(c){return bc(c),null}finally{Cn(r),kt(a),us(o)}}#E(n,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#E(n,r);return}this.#c+=n,this.#c===0&&(this.#_(r),this.#s&&ns(this.#s,()=>{this.#s=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(n,r){this.#E(n,r),this.#u+=n,!(!this.#l||this.#f)&&(this.#f=!0,pr(()=>{this.#f=!1,this.#l&&Oc(this.#l,this.#u)}))}get_effect_pending(){return this.#p(),dr(this.#l)}error(n){var r=this.#n.onerror;let a=this.#n.failed;if(!r&&!a)throw n;this.#t&&(Mt(this.#t),this.#t=null),this.#s&&(Mt(this.#s),this.#s=null),this.#i&&(Mt(this.#i),this.#i=null);var o=!1,c=!1;const l=()=>{if(o){Fw();return}o=!0,c&&Mw(),this.#i!==null&&ns(this.#i,()=>{this.#i=null}),this.#v(()=>{this.#S()})},f=p=>{try{c=!0,r?.(p,l),c=!1}catch(m){hr(m,this.#r&&this.#r.parent)}a&&(this.#i=this.#v(()=>{try{return Un(()=>{var m=me;m.b=this,m.f|=Va,a(this.#e,()=>p,()=>l)})}catch(m){return hr(m,this.#r.parent),null}}))};pr(()=>{var p;try{p=this.transform_error(n)}catch(m){hr(m,this.#r&&this.#r.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(f,m=>hr(m,this.#r&&this.#r.parent)):f(p)})}}function Zw(i){var n=i.effects;if(n!==null){i.effects=null;for(var r=0;r<n.length;r+=1)Mt(n[r])}}function jw(i){for(var n=i.parent;n!==null;){if((n.f&Fe)===0)return(n.f&mn)===0?n:null;n=n.parent}return null}function to(i){var n,r=me;Cn(jw(i));try{i.f&=~Vn,Zw(i),n=qc(i)}finally{Cn(r)}return n}function Lc(i){var n=i.v,r=to(i);if(!i.equals(r)&&(i.wv=Gc(),(!Te?.is_fork||i.deps===null)&&(i.v=r,Te?.capture(i,n,!0),i.deps===null))){be(i,Oe);return}Er||(Pt!==null?(ro()||Te?.is_fork)&&Pt.set(i,r):Za(i))}function eS(i){if(i.effects!==null)for(const n of i.effects)(n.teardown||n.ac)&&(n.teardown?.(),n.ac?.abort(Ja),n.teardown=Pw,n.ac=null,ti(n,0),io(n))}function Nc(i){if(i.effects!==null)for(const n of i.effects)n.teardown&&Cr(n)}let qa=new Set;const _n=new Map;let Uc=!1;function no(i,n){var r={f:0,v:i,reactions:null,equals:kw,rv:0,wv:0};return r}function hn(i,n){const r=no(i);return hS(r),r}function On(i,n,r=!1){ue!==null&&(!It||(ue.f&Ba)!==0)&&cs()&&(ue.f&(Fe|Xt|Ya|Ba))!==0&&(vt===null||!Sr.call(vt,i))&&Dw();let a=r?qr(n):n;return Oc(i,a,ts)}function Oc(i,n,r=null){if(!i.equals(n)){var a=i.v;Er?_n.set(i,n):_n.set(i,a),i.v=n;var o=Bn.ensure();if(o.capture(i,a),(i.f&Fe)!==0){const c=i;(i.f&Qe)!==0&&to(c),Pt===null&&Za(c)}i.wv=Gc(),$c(i,Qe,r),cs()&&me!==null&&(me.f&Oe)!==0&&(me.f&(En|Wn))===0&&(pt===null?fS([i]):pt.push(i)),!o.is_fork&&qa.size>0&&!Uc&&tS()}return n}function tS(){Uc=!1;for(const i of qa)(i.f&Oe)!==0&&be(i,Ft),ii(i)&&Cr(i);qa.clear()}function Jr(i){On(i,i.v+1)}function $c(i,n,r){var a=i.reactions;if(a!==null)for(var o=cs(),c=a.length,l=0;l<c;l++){var f=a[l],p=f.f;if(!(!o&&f===me)){var m=(p&Qe)===0;if(m&&be(f,n),(p&Fe)!==0){var E=f;Pt?.delete(E),(p&Vn)===0&&(p&_t&&(f.f|=Vn),$c(E,Ft,r))}else if(m){var y=f;(p&Xt)!==0&&Yt!==null&&Yt.add(y),r!==null?r.push(y):eo(y)}}}}function qr(i){if(typeof i!="object"||i===null||Da in i)return i;const n=Aw(i);if(n!==bw&&n!==Rw)return i;var r=new Map,a=Ew(i),o=hn(0),c=Hn,l=f=>{if(Hn===c)return f();var p=ue,m=Hn;kt(null),rc(c);var E=f();return kt(p),rc(m),E};return a&&r.set("length",hn(i.length)),new Proxy(i,{defineProperty(f,p,m){(!("value"in m)||m.configurable===!1||m.enumerable===!1||m.writable===!1)&&Ow();var E=r.get(p);return E===void 0?l(()=>{var y=hn(m.value);return r.set(p,y),y}):On(E,m.value,!0),!0},deleteProperty(f,p){var m=r.get(p);if(m===void 0){if(p in f){const E=l(()=>hn(Be));r.set(p,E),Jr(o)}}else On(m,Be),Jr(o);return!0},get(f,p,m){if(p===Da)return i;var E=r.get(p),y=p in f;if(E===void 0&&(!y||Yr(f,p)?.writable)&&(E=l(()=>{var b=qr(y?f[p]:Be),R=hn(b);return R}),r.set(p,E)),E!==void 0){var C=dr(E);return C===Be?void 0:C}return Reflect.get(f,p,m)},getOwnPropertyDescriptor(f,p){var m=Reflect.getOwnPropertyDescriptor(f,p);if(m&&"value"in m){var E=r.get(p);E&&(m.value=dr(E))}else if(m===void 0){var y=r.get(p),C=y?.v;if(y!==void 0&&C!==Be)return{enumerable:!0,configurable:!0,value:C,writable:!0}}return m},has(f,p){if(p===Da)return!0;var m=r.get(p),E=m!==void 0&&m.v!==Be||Reflect.has(f,p);if(m!==void 0||me!==null&&(!E||Yr(f,p)?.writable)){m===void 0&&(m=l(()=>{var C=E?qr(f[p]):Be,b=hn(C);return b}),r.set(p,m));var y=dr(m);if(y===Be)return!1}return E},set(f,p,m,E){var y=r.get(p),C=p in f;if(a&&p==="length")for(var b=m;b<y.v;b+=1){var R=r.get(b+"");R!==void 0?On(R,Be):b in f&&(R=l(()=>hn(Be)),r.set(b+"",R))}if(y===void 0)(!C||Yr(f,p)?.writable)&&(y=l(()=>hn(void 0)),On(y,qr(m)),r.set(p,y));else{C=y.v!==Be;var x=l(()=>qr(m));On(y,x)}var U=Reflect.getOwnPropertyDescriptor(f,p);if(U?.set&&U.set.call(E,m),!C){if(a&&typeof p=="string"){var H=r.get("length"),re=Number(p);Number.isInteger(re)&&re>=H.v&&On(H,re+1)}Jr(o)}return!0},ownKeys(f){dr(o);var p=Reflect.ownKeys(f).filter(y=>{var C=r.get(y);return C===void 0||C.v!==Be});for(var[m,E]of r)E.v!==Be&&!(m in f)&&p.push(m);return p},setPrototypeOf(){$w()}})}var tc,Dc;function nS(){if(tc===void 0){tc=window;var i=Element.prototype,n=Node.prototype,r=Text.prototype;Yr(n,"firstChild").get,Dc=Yr(n,"nextSibling").get,Xl(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Xl(r)&&(r.__t=void 0)}}function Mc(i=""){return document.createTextNode(i)}function Fc(i){return Dc.call(i)}function kc(i){var n=ue,r=me;kt(null),Cn(null);try{return i()}finally{kt(n),Cn(r)}}function rS(i,n){var r=n.last;r===null?n.last=n.first=i:(r.next=i,i.prev=r,n.last=i)}function ri(i,n){var r=me;r!==null&&(r.f&Jt)!==0&&(i|=Jt);var a={ctx:Lt,deps:null,nodes:null,f:i|Qe|_t,first:null,fn:n,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Te?.register_created_effect(a);var o=a;if((i&jr)!==0)fr!==null?fr.push(a):Bn.ensure().schedule(a);else if(n!==null){try{Cr(a)}catch(l){throw Mt(a),l}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&ls)===0&&(o=o.first,(i&Xt)!==0&&(i&os)!==0&&o!==null&&(o.f|=os))}if(o!==null&&(o.parent=r,r!==null&&rS(o,r),ue!==null&&(ue.f&Fe)!==0&&(i&Wn)===0)){var c=ue;(c.effects??=[]).push(o)}return a}function ro(){return ue!==null&&!It}function iS(i){return ri(jr|Nw,i)}function sS(i){Bn.ensure();const n=ri(Wn|ls,i);return(r={})=>new Promise(a=>{r.outro?ns(n,()=>{Mt(n),a(void 0)}):(Mt(n),a(void 0))})}function aS(i,n=0){return ri(yc|n,i)}function oS(i,n=0){var r=ri(Xt|n,i);return r}function Un(i){return ri(En|ls,i)}function Hc(i){var n=i.teardown;if(n!==null){const r=Er,a=ue;nc(!0),kt(null);try{n.call(null)}finally{nc(r),kt(a)}}}function io(i,n=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const o=r.ac;o!==null&&kc(()=>{o.abort(Ja)});var a=r.next;(r.f&Wn)!==0?r.parent=null:Mt(r,n),r=a}}function uS(i){for(var n=i.first;n!==null;){var r=n.next;(n.f&En)===0&&Mt(n),n=r}}function Mt(i,n=!0){var r=!1;(n||(i.f&Lw)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(lS(i.nodes.start,i.nodes.end),r=!0),be(i,Zl),io(i,n&&!r),ti(i,0);var a=i.nodes&&i.nodes.t;if(a!==null)for(const c of a)c.stop();Hc(i),i.f^=Zl,i.f|=mn;var o=i.parent;o!==null&&o.first!==null&&Wc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=i.b=null}function lS(i,n){for(;i!==null;){var r=i===n?null:Fc(i);i.remove(),i=r}}function Wc(i){var n=i.parent,r=i.prev,a=i.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),n!==null&&(n.first===i&&(n.first=a),n.last===i&&(n.last=r))}function ns(i,n,r=!0){var a=[];Vc(i,a,!0);var o=()=>{r&&Mt(i),n&&n()},c=a.length;if(c>0){var l=()=>--c||o();for(var f of a)f.out(l)}else o()}function Vc(i,n,r){if((i.f&Jt)===0){i.f^=Jt;var a=i.nodes&&i.nodes.t;if(a!==null)for(const f of a)(f.is_global||r)&&n.push(f);for(var o=i.first;o!==null;){var c=o.next,l=(o.f&os)!==0||(o.f&En)!==0&&(i.f&Xt)!==0;Vc(o,n,l?r:!1),o=c}}}function cS(i,n){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var o=r===a?null:Fc(r);n.append(r),r=o}}let rs=!1,Er=!1;function nc(i){Er=i}let ue=null,It=!1;function kt(i){ue=i}let me=null;function Cn(i){me=i}let vt=null;function hS(i){ue!==null&&(vt===null?vt=[i]:vt.push(i))}let Xe=null,at=0,pt=null;function fS(i){pt=i}let Bc=1,Dn=0,Hn=Dn;function rc(i){Hn=i}function Gc(){return++Bc}function ii(i){var n=i.f;if((n&Qe)!==0)return!0;if(n&Fe&&(i.f&=~Vn),(n&Ft)!==0){for(var r=i.deps,a=r.length,o=0;o<a;o++){var c=r[o];if(ii(c)&&Lc(c),c.wv>i.wv)return!0}(n&_t)!==0&&Pt===null&&be(i,Oe)}return!1}function Qc(i,n,r=!0){var a=i.reactions;if(a!==null&&!(vt!==null&&Sr.call(vt,i)))for(var o=0;o<a.length;o++){var c=a[o];(c.f&Fe)!==0?Qc(c,n,!1):n===c&&(r?be(c,Qe):(c.f&Oe)!==0&&be(c,Ft),eo(c))}}function qc(i){var n=Xe,r=at,a=pt,o=ue,c=vt,l=Lt,f=It,p=Hn,m=i.f;Xe=null,at=0,pt=null,ue=(m&(En|Wn))===0?i:null,vt=null,us(i.ctx),It=!1,Hn=++Dn,i.ac!==null&&(kc(()=>{i.ac.abort(Ja)}),i.ac=null);try{i.f|=Ga;var E=i.fn,y=E();i.f|=ni;var C=i.deps,b=Te?.is_fork;if(Xe!==null){var R;if(b||ti(i,at),C!==null&&at>0)for(C.length=at+Xe.length,R=0;R<Xe.length;R++)C[at+R]=Xe[R];else i.deps=C=Xe;if(ro()&&(i.f&_t)!==0)for(R=at;R<C.length;R++)(C[R].reactions??=[]).push(i)}else!b&&C!==null&&at<C.length&&(ti(i,at),C.length=at);if(cs()&&pt!==null&&!It&&C!==null&&(i.f&(Fe|Ft|Qe))===0)for(R=0;R<pt.length;R++)Qc(pt[R],i);if(o!==null&&o!==i){if(Dn++,o.deps!==null)for(let x=0;x<r;x+=1)o.deps[x].rv=Dn;if(n!==null)for(const x of n)x.rv=Dn;pt!==null&&(a===null?a=pt:a.push(...pt))}return(i.f&ei)!==0&&(i.f^=ei),y}catch(x){return bc(x)}finally{i.f^=Ga,Xe=n,at=r,pt=a,ue=o,vt=c,us(l),It=f,Hn=p}}function dS(i,n){let r=n.reactions;if(r!==null){var a=Cw.call(r,i);if(a!==-1){var o=r.length-1;o===0?r=n.reactions=null:(r[a]=r[o],r.pop())}}if(r===null&&(n.f&Fe)!==0&&(Xe===null||!Sr.call(Xe,n))){var c=n;(c.f&_t)!==0&&(c.f^=_t,c.f&=~Vn),Za(c),eS(c),ti(c,0)}}function ti(i,n){var r=i.deps;if(r!==null)for(var a=n;a<r.length;a++)dS(i,r[a])}function Cr(i){var n=i.f;if((n&mn)===0){be(i,Oe);var r=me,a=rs;me=i,rs=!0;try{(n&(Xt|Tc))!==0?uS(i):io(i),Hc(i);var o=qc(i);i.teardown=typeof o=="function"?o:null,i.wv=Bc;var c;Sw&&Hw&&(i.f&Qe)!==0&&i.deps}finally{rs=a,me=r}}}function dr(i){var n=i.f,r=(n&Fe)!==0;if(ue!==null&&!It){var a=me!==null&&(me.f&mn)!==0;if(!a&&(vt===null||!Sr.call(vt,i))){var o=ue.deps;if((ue.f&Ga)!==0)i.rv<Dn&&(i.rv=Dn,Xe===null&&o!==null&&o[at]===i?at++:Xe===null?Xe=[i]:Xe.push(i));else{(ue.deps??=[]).push(i);var c=i.reactions;c===null?i.reactions=[ue]:Sr.call(c,ue)||c.push(ue)}}}if(Er&&_n.has(i))return _n.get(i);if(r){var l=i;if(Er){var f=l.v;return((l.f&Oe)===0&&l.reactions!==null||Kc(l))&&(f=to(l)),_n.set(l,f),f}var p=(l.f&_t)===0&&!It&&ue!==null&&(rs||(ue.f&_t)!==0),m=(l.f&ni)===0;ii(l)&&(p&&(l.f|=_t),Lc(l)),p&&!m&&(Nc(l),zc(l))}if(Pt?.has(i))return Pt.get(i);if((i.f&ei)!==0)throw i.v;return i.v}function zc(i){if(i.f|=_t,i.deps!==null)for(const n of i.deps)(n.reactions??=[]).push(i),(n.f&Fe)!==0&&(n.f&_t)===0&&(Nc(n),zc(n))}function Kc(i){if(i.v===Be)return!0;if(i.deps===null)return!1;for(const n of i.deps)if(_n.has(n)||(n.f&Fe)!==0&&Kc(n))return!0;return!1}function gS(i){var n=It;try{return It=!0,i()}finally{It=n}}const pS=["touchstart","touchmove"];function mS(i){return pS.includes(i)}const Zi=Symbol("events"),_S=new Set,ic=new Set;let sc=null;function ac(i){var n=this,r=n.ownerDocument,a=i.type,o=i.composedPath?.()||[],c=o[0]||i.target;sc=i;var l=0,f=sc===i&&i[Zi];if(f){var p=o.indexOf(f);if(p!==-1&&(n===document||n===window)){i[Zi]=n;return}var m=o.indexOf(n);if(m===-1)return;p<=m&&(l=p)}if(c=o[l]||i.target,c!==n){Tw(i,"currentTarget",{configurable:!0,get(){return c||r}});var E=ue,y=me;kt(null),Cn(null);try{for(var C,b=[];c!==null;){var R=c.assignedSlot||c.parentNode||c.host||null;try{var x=c[Zi]?.[a];x!=null&&(!c.disabled||i.target===c)&&x.call(c,i)}catch(U){C?b.push(U):C=U}if(i.cancelBubble||R===n||R===null)break;c=R}if(C){for(let U of b)queueMicrotask(()=>{throw U});throw C}}finally{i[Zi]=n,delete i.currentTarget,kt(E),Cn(y)}}}function vS(i,n){return wS(i,n)}const ji=new Map;function wS(i,{target:n,anchor:r,props:a={},events:o,context:c,intro:l=!0,transformError:f}){nS();var p=void 0,m=sS(()=>{var E=r??n.appendChild(Mc());Jw(E,{pending:()=>{}},b=>{Vw({});var R=Lt;c&&(R.c=c),o&&(a.$$events=o),p=i(b,a)||{},Bw()},f);var y=new Set,C=b=>{for(var R=0;R<b.length;R++){var x=b[R];if(!y.has(x)){y.add(x);var U=mS(x);for(const we of[n,document]){var H=ji.get(we);H===void 0&&(H=new Map,ji.set(we,H));var re=H.get(x);re===void 0?(we.addEventListener(x,ac,{passive:U}),H.set(x,1)):H.set(x,re+1)}}}};return C(yw(_S)),ic.add(C),()=>{for(var b of y)for(const U of[n,document]){var R=ji.get(U),x=R.get(b);--x==0?(U.removeEventListener(b,ac),R.delete(b),R.size===0&&ji.delete(U)):R.set(b,x)}ic.delete(C),E!==r&&E.parentNode?.removeChild(E)}});return SS.set(p,m),p}let SS=new WeakMap;const ES="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ES);Ww();function CS(i){}const za={init:i=>{q.get(kn).enableRouting()},handlePageErrorHandler:(i,n,r)=>{i&&i.timeout&&setTimeout(()=>{if(i.viewUrl)n.viewUrl=i.viewUrl,r.getEngine()._ui.updateMainContent(n,r);else if(i.errorFn)i.errorFn(n);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const a=i.redirectPath||"/";r.navigation().navigate(a)}},i.timeout)},handleExternalLinkNavigation:i=>{if(i.url)if(i.sameWindow||!1)window.location.href=i.url;else{const r=window.open(i.url,"_blank","noopener noreferrer");r&&(r.opener=null,r.focus())}},async addSearchParamsFromClient(i,n,r){const a=q.get(Sn),o=O.getCurrentPath(r.getConfig().routing?.useHashRouting),l=(await a.getCurrentNode(o.path))?.clientPermissions?.urlParameters,f={...i};if(l){const p={};Object.keys(l).forEach(m=>{m in f&&l[m]?.write===!0&&(p[m]=f[m],delete f[m])});for(const m in f)console.warn(`No permission to add the search param "${m}" to the url`);Object.keys(p).length>0&&r.routing().addSearchParams(p,n)}}},Dt={luigi:{},init:i=>{Dt.luigi=i},addListeners:(i,n)=>{i.addEventListener($.INITIALIZED,r=>{xe.luigi?.ux().hideLoadingIndicator(i.parentNode);const a=q.get(vr);a.viewGroupLoaded(i),!i._luigiPreloading&&i.style.display!=="none"&&a.preload()}),i.addEventListener($.NAVIGATION_COMPLETED_REPORT,()=>{q.get(vr).preload()}),i.addEventListener($.NAVIGATION_REQUEST,r=>{const{drawer:a,link:o,preserveView:c,modal:l,newTab:f,withoutSync:p,preventContextUpdate:m,preventHistoryEntry:E,fromVirtualTreeRoot:y,fromContext:C,fromClosestContext:b,fromParent:R,relative:x,nodeParams:U}=r.detail,H={drawerSettings:a,modalSettings:l,newTab:f,path:o,preserveView:c,preventContextUpdate:m,options:{fromVirtualTreeRoot:y,fromContext:C,fromClosestContext:b,fromParent:R,relative:x,nodeParams:U},preventHistoryEntry:E,withoutSync:p};q.get(Sn).handleNavigationRequest(H,r.callbackFn)}),i.addEventListener($.RUNTIME_ERROR_HANDLING_REQUEST,r=>{n.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener($.ALERT_REQUEST,r=>{xe.processAlert(r.payload,!0,i)}),i.addEventListener($.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{xe.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener($.SET_DOCUMENT_TITLE_REQUEST,r=>{Dt.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener($.SHOW_LOADING_INDICATOR_REQUEST,r=>{Dt.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener($.HIDE_LOADING_INDICATOR_REQUEST,r=>{Dt.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener($.ADD_BACKDROP_REQUEST,r=>{Dt.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener($.REMOVE_BACKDROP_REQUEST,r=>{Dt.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener($.SET_DIRTY_STATUS_REQUEST,r=>{xe.handleDirtyStatusRequest(r.detail?.data?.dirty,i)}),i.addEventListener($.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener($.OPEN_USER_SETTINGS_REQUEST,r=>{Dt.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener($.CLOSE_USER_SETTINGS_REQUEST,r=>{Dt.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener($.ADD_SEARCH_PARAMS_REQUEST,r=>{za.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),i.addEventListener($.UPDATE_MODAL_SETTINGS_REQUEST,r=>{G.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),i.addEventListener($.SET_CURRENT_LOCALE_REQUEST,r=>{n.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale,i)})}};class yS{constructor(){this._ui=G,this._comm=Dt,this._ux=xe,this._routing=za}bootstrap(n){this._app=vS(CS,{target:document.body}),this._connector=n}init(){const n=window.Luigi;q.register(xt,()=>new xt(n)),q.register(Sn,()=>new Sn(n)),q.register(vn,()=>new vn),q.register(kn,()=>new kn(n)),q.register(wr,()=>new wr),q.register(wn,()=>new wn(n)),q.register(vr,()=>new vr(n)),n.theming()._init(),G.init(n),za.init(n),Dt.init(n),xe.init(n)}}window.Luigi=new ww(new yS);
94
+ Please refer to documentation`),[m]}}buildVirtualViewUrl(t,n,s){let o="";for(const u in n)u.startsWith("virtualSegment")&&(o+=":"+u+"/");if(!s)return t;o+=":virtualSegment_"+s+"/";let l=t;t.includes("{virtualTreePath}")?l=t.replace("{virtualTreePath}",o):l=t+"/"+o;try{if(new URL(l,"http://dummy-base").origin===new URL(t,"http://dummy-base").origin)return l}catch(u){console.error("Error building virtual view URL -- make sure virtualTreePath is not part of origin.",u)}return t}async buildPath(t,n){const{fromVirtualTreeRoot:s,fromContext:o,fromClosestContext:l,fromParent:u,relative:f,nodeParams:h}=n,g=this.luigi.getConfigValue("routing.useHashRouting"),{path:_,query:m}=U.getCurrentPath(this.luigi,g),w=_+(m?"?"+m:""),E=await this.getPathData(w),T=E.nodesInPath;let R=t;if(T===void 0)return console.warn("No nodes in path found for current path:",w),R;if(s){R="";const P=[...T].map((D,H)=>D.virtualTree?H:-1).filter(D=>D!==-1).pop();T.forEach((D,H)=>{D.pathSegment&&(P===void 0||H<=P)&&(R+="/"+D.pathSegment)}),R+="/"+t}else if(o){const P=o,D=[...T].reverse().find(H=>P===H.navigationContext);R=U.concatenatePath(U.getSubPath(D,E.pathParams),t)}else if(l){const P=[...T].reverse().find(D=>D.navigationContext&&D.navigationContext.length>0);R=U.concatenatePath(U.getSubPath(P,E.pathParams),t)}else u?R=U.concatenatePath(U.getSubPath(E.selectedNode?.parent,E.pathParams),t):f&&(R=U.concatenatePath(U.getSubPath(E.selectedNode,E.pathParams),t));return h&&Object.keys(h).length>0&&(R+=R.includes("?")?"&":"?",Object.entries(h).forEach((P,D)=>{R+=encodeURIComponent(U.getContentViewParamPrefix(this.luigi)+P[0])+"="+encodeURIComponent(P[1])+(D<Object.keys(h).length-1?"&":"")})),R}}class Oi{constructor(t){this.luigi=t,this.preloadBatchSize=1,this.shouldPreload=!1}preloadViewGroups(t=3,n){const s=this.luigi.getConfigValue("navigation.preloadViewGroups"),o=this.luigi.getConfigValue("navigation.viewGroupSettings"),l=this.luigi.getEngine()._connector?.getContainerWrapper();if(s===!1||!o||!l)return;const u=Date.now();if(this.getPreloadingContainers(l).filter(_=>u-(_._luigiPreloadCreatedAt||0)<3e4).length>0){console.log("skipping view group preloading (busy)");return}const h=[...l.childNodes].filter(_=>_.tagName?.startsWith("LUIGI-")&&_.viewGroup).map(_=>_.viewGroup),g=Object.entries(o).filter(([_])=>!h.includes(_)).filter(([_,m])=>m&&m.preloadUrl);n?g.forEach(([_,m])=>{m.loadOnStartup&&this.preloadContainerOnBackground(m,_,l)}):g.filter((_,m)=>m<t).forEach(([_,m])=>{this.preloadContainerOnBackground(m,_,l)})}preloadContainerOnBackground(t,n,s){const o=document.createElement("luigi-container");o.setAttribute("lui_container","true"),o.viewurl=t.preloadUrl,o.viewGroup=n,o.style.display="none",o._luigiPreloading=!0,o._luigiPreloadCreatedAt=Date.now(),o.luigiMfId=M.getRandomId(),this.luigi.getEngine()._comm.addListeners(o,this.luigi),s.appendChild(o)}preload(t){this.shouldPreload&&setTimeout(()=>{this.preloadViewGroups(this.preloadBatchSize,!!t)},t?1:0),this.shouldPreload=!0}viewGroupLoaded(t){if(t._luigiPreloading){const n=Date.now()-(t._luigiPreloadCreatedAt||0);let s=1;n<500?s=3:n<1e3&&(s=2),this.preloadBatchSize=s,setTimeout(()=>{t._luigiPreloading=!1},this.preloadBatchSize>2?500:1e3)}}getPreloadingContainers(t){return[...t.childNodes].filter(n=>n.tagName?.startsWith("LUIGI-")&&n._luigiPreloading)}}const ql={listeners:[],hashChangeWithoutSync:!1,addEventListener(r,t){this.listeners.push({type:r,listenerFn:t}),window.addEventListener(r,t)},removeEventListener(r,t){this.listeners=this.listeners.filter(n=>!(n.type===r&&n.listenerFn===t)),window.removeEventListener(r,t)},removeAllEventListeners(){this.listeners.forEach(r=>{window.removeEventListener(r.type,r.listenerFn)}),this.listeners=[]}};class Hr{constructor(t){this.luigi=t}getNavigationService(){return this.navigationService||(this.navigationService=j.get(hr),this.dirtyStatusService=j.get(ln)),this.navigationService}shouldSkipRoutingForUrlPatterns(){const t=[/access_token=/,/id_token=/];return(this.luigi.getConfigValue("routing.skipRoutingForUrlPatterns")||t).filter(s=>location.href.match(s)).length!==0}enableRouting(){this.luigi.getConfig().routing?.useHashRouting?(ql.addEventListener("hashchange",n=>{const s=!!n?.detail?.preventContextUpdate,o=!!n?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(this.luigi,!0,!0),o,s)}),this.handleRouteChange(U.getCurrentPath(this.luigi,!0,!0))):(ql.addEventListener("popstate",n=>{const s=!!n?.detail?.preventContextUpdate,o=!!n?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(this.luigi,!1,!0),o,s)}),this.handleRouteChange(U.getCurrentPath(this.luigi,!1,!0)))}async handleRouteChange(t,n=!1,s=!1){const o=t.path,l=t.query,u=o+(l?"?"+l:""),f=new URLSearchParams(l),h=Object.create(null);try{if(this.dirtyStatusService?.shouldShowUnsavedChangesModal()){const R=window.location.href,P=this.dirtyStatusService.unsavedChanges.persistUrl;P&&history.pushState(window.state,"",P)}}catch{return}if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(u),await this.shouldShowModalPathInUrl(t),f.forEach((R,P)=>{h[P]=R}),this.checkInvalidateCache(this.previousPathData,o);const g=await this.getNavigationService().getPathData(o),_=U.filterNodeParams(h,this.luigi),m=M.getPathWithoutHash(o)||"";this.currentRoute={raw:window.location.href,path:o,nodeParams:_};const w=g?.selectedNode??await this.getNavigationService().getCurrentNode(o),E=w?.viewUrl||"";if(w&&this.previousPathData&&await this.handleViewUrlMisconfigured(w,E,this.previousPathData,m)||await this.handlePageNotFound(w,E,g,o,m))return;const T=this.luigi.getEngine()._connector;if(T?.renderTopNav(await this.getNavigationService().getTopNavData(o,g)),T?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,g)),T?.renderTabNav(await this.getNavigationService().getTabNavData(o,g)),T?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,g,R=>{T?.renderBreadcrumbs(R)})),w){const R={nodeParams:_||{},pathParams:g?.pathParams||{},searchParams:U.prepareSearchParamsForClient(w,this.luigi)};this.currentRoute.node=w,this.getNavigationService().onNodeChange(this.previousNode,w),this.previousNode=w,await G.updateMainContent(w,this.luigi,R,n,s),this.previousPathData=g}}getCurrentRoute(){return this.currentRoute}async shouldShowModalPathInUrl(t){this.luigi.getConfigValue("routing.showModalPathInUrl")&&await this.handleBookmarkableModalPath(t)}async handleBookmarkableModalPath(t){const n=j.get(hr),s=j.get(fr),o=new URLSearchParams(t?.query||""),l=U.getModalViewParamName(this.luigi),u=o.get(l);if(u){const f=o.get(`${l}Params`);try{const h=JSON.parse(f||"{}"),{nodeObject:g}=await n.extractDataFromPath(u);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(h):this.luigi.navigation().openAsModal(u,h||g.openNodeInModal)}catch(h){console.error("Error parsing modal settings from URL parameters",h)}}else return await s.closeModalsWithDirtyCheck(),void 0}appendModalDataToUrl(t,n){const s=U.getHashQueryParamSeparator(),o=U.getQueryParams(this.luigi),l=U.getModalViewParamName(this.luigi),u=o[l],f=new URL(location.href),h=this.luigi.getConfigValue("routing.useHashRouting");let g=history.state,_,m;if(h){let[w,E]=f.hash.split("?");_=w,m=U.getURLWithoutModalData(E,l),m&&(_+="?"+m)}else _=f.pathname,m=U.getURLWithoutModalData(f.search,l),m&&(_+="?"+U.getURLWithoutModalData(f.search,l));if(g=U.handleHistoryState(g,_),u!==t){if(o[l]=t,n&&Object.keys(n).length&&(o[`${l}Params`]=JSON.stringify(n)),h){const w=location.hash.indexOf(s);w!==-1&&(f.hash=f.hash.slice(0,w)),f.hash=`${f.hash}${s}${U.encodeParams(o)}`}else f.search=`?${U.encodeParams(o)}`;history.pushState(g,"",f.href)}else{const w=new URL(f);if(h){let E=w.hash.split("?")[0];w.hash=E,m&&(w.hash+="?"+m)}else w.search=m;history.replaceState({},"",w.href),history.pushState(g,"",f.href)}}removeModalDataFromUrl(t){const n=U.getQueryParams(this.luigi),s=U.getModalViewParamName(this.luigi);let o=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){let u={};n[s]&&(u[s]=n[s]),n[`${s}Params`]&&(u[`${s}Params`]=n[`${s}Params`]);let f=U.encodeParams(u);o.hash.includes(`?${f}`)?o.hash=o.hash.replace(`?${f}`,""):o.hash.includes(`&${f}`)&&(o.hash=o.hash.replace(`&${f}`,""))}else{let u=new URLSearchParams(o.search.slice(1));u.delete(s),u.delete(`${s}Params`);let f="";Array.from(u.keys()).forEach(h=>{f+=(f===""?"?":"&")+h+"="+u.get(h)}),o.search=f}if(history.state&&history.state.modalHistoryLength>=0&&t){history.state.modalHistoryLength;const u=history.state.pathBeforeHistory;let f=!1;if(window.addEventListener("popstate",h=>{f?(history.replaceState({},"",u),history.pushState({},"",u),history.back()):(history.pushState({},"",u),history.back())},{once:!0}),history.state.historygap===history.length-history.state.modalHistoryLength)history.go(-history.state.modalHistoryLength);else if(history.state.modalHistoryLength>history.length){const h=history.length-1;f=!0,history.go(-h),window.Luigi.preventLoadingModalData=!0}else{const h=history.state.modalHistoryLength;history.go(-h)}}else history.pushState({},"",o.href)}setFeatureToggle(t){const n=this.luigi.getConfigValue("settings.featureToggles.queryStringParam"),s=this.luigi.featureToggles();n&&typeof t=="string"&&U.setFeatureToggles(n,t,s)}updateModalDataInUrl(t,n,s){let o=U.getHashQueryParamSeparator();const l=U.getQueryParams(this.luigi),u=U.getModalViewParamName(this.luigi);l[u]=t,n&&Object.keys(n).length&&(l[`${u}Params`]=JSON.stringify(n));const f=new URL(location.href);if(this.luigi.getConfigValue("routing.useHashRouting")){const g=location.hash.indexOf(o);g!==-1&&(f.hash=f.hash.slice(0,g)),f.hash=`${f.hash}${o}${U.encodeParams(l)}`}else f.search=`?${U.encodeParams(l)}`;s?history.pushState(window.state,"",f.href):history.replaceState(window.state,"",f.href)}checkInvalidateCache(t,n){if(!t)return;const s=j.get(cr);let o=n.split("/");if(t.nodesInPath&&t.nodesInPath.length>0){let l=t.nodesInPath.slice(1),u=!0;for(let f=0;f<l.length;f++){let h=o.length>f?o[f]:void 0,g=l[f];if(h!==g.pathSegment||!u)if(U.isDynamicNode(g)){if(!u||h!==U.getDynamicNodeValue(g,t.pathParams)){s.deleteNodesRecursively(g);break}}else u=!1}}else s.deleteCache()}async handlePageNotFound(t,n,s,o,l){const u=M.getTrimmedUrl(o),f=U.isExistingRoute(u,s);if(!n&&!t?.compound||t?.tabNav?.showAsTabHeader){const h=await U.getDefaultChildNode(s,async(g,_)=>await this.getNavigationService().getChildren(g,_));if(f){const g=M.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${g?`/${g}`:""}/${h}`,preserveView:void 0,modalSettings:void 0,newTab:!1,withoutSync:!1,preventContextUpdate:!1,preventHistoryEntry:!0}),!1}else{if(h&&s?.nodesInPath&&s.nodesInPath.length>1)return this.showPageNotFoundError(M.trimTrailingSlash(u||"")+"/"+h,l,!0),!0;const g=await U.getDefaultChildNode(s);this.showPageNotFoundError(g,l,!1)}return!0}return f?!1:(this.showPageNotFoundError(s.matchedPath,l,!0),!0)}async showPageNotFoundError(t,n,s=!1){const o=U.getPageNotFoundRedirectResult(n,s,this.luigi);if(o.ignoreLuigiErrorHandling)return;const l=o.path;if(l){if(o.keepURL){const u=this.luigi.getConfig().routing?.useHashRouting,f=U.getCurrentPath(this.luigi,u);f.path=l,this.handleRouteChange(f)}else this.getNavigationService().handleNavigationRequest({path:l});return}U.showRouteNotFoundAlert(n,s,this.luigi),this.getNavigationService().handleNavigationRequest({path:M.addLeadingSlash(t)})}async handleViewUrlMisconfigured(t,n,s,o){const{children:l,intendToHaveEmptyViewUrl:u,compound:f}=t,h=!!l?.length;if(!f&&n.trim()===""&&!h&&!u){if(console.warn("The intended target route can't be accessed since it has neither a viewUrl nor children. This is most likely a misconfiguration."),!(s&&(s.selectedNode?.viewUrl||s.selectedNode&&s.selectedNode.compound))){const g=await this.getNavigationService().getPathData("/"),_=await U.getDefaultChildNode(g);this.showPageNotFoundError(_,o,!1),this.getNavigationService().handleNavigationRequest({path:_})}return!0}return!1}}class Ui{constructor(){this.decorators=[]}hasDecorators(){return this.decorators.length>0}add(t){this.decorators=this.decorators.filter(n=>n.uid!==t.uid).concat(t)}applyDecorators(t,n){if(!t)return t;const s=new URL(M.prependOrigin(t)),o=this.decorators.filter(l=>l.type==="queryString");for(let l=0;l<o.length;l++){const u=o[l];s.searchParams.has(u.key)&&s.searchParams.delete(u.key);const f=u.valueFn();s.searchParams.append(u.key,f)}return n&&(s.search=decodeURIComponent(s.search)),s.href}}const Il=async(r,t,n)=>{const s=await t.readUserSettings(),l=r.userSettingsGroup&&typeof s=="object"&&s!==null&&r.userSettingsGroup?s[r.userSettingsGroup]:null,u=n?.nodeParams||{},f=n?.pathParams||{},h=n?.searchParams||{};if(r.webcomponent&&r.viewUrl&&!U.checkWCUrl(r.viewUrl,t))return console.warn(`View URL '${r.viewUrl}' not allowed to be included`),document.createElement("div");if(r.compound){const g=document.createElement("luigi-compound-container");return g.setAttribute("lui_container","true"),g.viewurl=r.viewUrl?j.get(Ui).applyDecorators(U.substituteViewUrl(r,f,u,t),r.decodeViewUrl??!1):"",g.webcomponent=r.webcomponent??!1,g.compoundConfig=r.compound,g.context=r.context,g.clientPermissions=r.clientPermissions??{},g.nodeParams=u,g.pathParams=f,g.userSettingsGroup=r.userSettingsGroup,g.userSettings=l,g.searchParams=h,g.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),g.locale=t.i18n().getCurrentLocale(),g.theme=t.theming().getCurrentTheme(),g.viewGroup=r.viewGroup,g.virtualTree=r.virtualTree||r._virtualTree,g.virtualTreeRootNode=ke.findVirtualTreeRootNode(r),t.getEngine()._comm.addListeners(g,t),g}else{const g=document.createElement("luigi-container");return g.setAttribute("lui_container","true"),g.viewurl=r.viewUrl?j.get(Ui).applyDecorators(U.substituteViewUrl(r,f,u,t),r.decodeViewUrl??!1):"",g.webcomponent=r.webcomponent??!1,g.context=r.context,g.authData=rr.getStoredAuthData(),g.clientPermissions=r.clientPermissions??{},g.cssVariables=await t.theming().getCSSVariables(),g.nodeParams=u,g.pathParams=f,g.userSettingsGroup=r.userSettingsGroup,g.userSettings=l,g.searchParams=h,g.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),g.locale=t.i18n().getCurrentLocale(),g.theme=t.theming().getCurrentTheme(),g.viewGroup=r.viewGroup,g.virtualTree=r.virtualTree||r._virtualTree,g.virtualTreeRootNode=ke.findVirtualTreeRootNode(r),Qd(g,t),qd(g,t),t.getEngine()._comm.addListeners(g,t),g.luigiMfId=M.getRandomId(),g}},Qd=(r,t)=>{const n=t.getConfigValue("settings.customSandboxRules");if(!n?.length)return;const s=["allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts"],o=n?[...new Set([...s,...n])]:s;r.sandboxRules=o},qd=(r,t)=>{const n=t.getConfigValue("settings.allowRules");n?.length&&(n.forEach((s,o)=>{n[o]=s+(s.indexOf(";")!=-1?"":";")}),r.allowRules=n)},G={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:r=>{G.navService=j.get(hr),G.routingService=j.get(Hr),G.luigi=r,r.getEngine()._connector?.renderMainLayout();const t=j.get(Oi);t.shouldPreload=!0,t.preload(!0),t.shouldPreload=!1},update:async r=>{const t=G.routingService.getCurrentRoute();if(!t)return;const n=!r||r.length===0;if((n||r.includes("settings.header")||r.includes("settings")||r.includes("navigation")||r.includes("navigation.profile")||r.includes("navigation.contextSwitcher")||r.includes("navigation.productSwitcher"))&&G.luigi.getEngine()._connector?.renderTopNav(await G.navService.getTopNavData(t.path)),n||r.includes("navigation")||r.includes("navigation.nodes")||r.includes("navigation.viewgroupdata")||r.includes("settings")||r.includes("settings.footer")){j.get(cr).deleteCache(),G.luigi.getEngine()._connector?.renderLeftNav(await G.navService.getLeftNavData(t.path)),G.luigi.getEngine()._connector?.renderTabNav(await G.navService.getTabNavData(t.path));const s=G.luigi.getEngine()._connector;s?.renderBreadcrumbs(await G.navService.getBreadcrumbData(t.path,void 0,o=>{s?.renderBreadcrumbs(o)}))}if(n||r.includes("navigation")||r.includes("navigation.nodes")||r.includes("navigation.viewgroupdata")){if(j.get(cr).deleteCache(),t.path){const o=(await G.navService.getPathData(t.path))?.selectedNode??t.node;o&&(t.node=o,G.updateMainContent(o,G.luigi))}}else r.includes("settings.theming")&&t.node&&G.updateMainContent(t.node,G.luigi)},updateMainContent:async(r,t,n,s,o)=>{const l=await t.readUserSettings(),f=r.userSettingsGroup&&typeof l=="object"&&l!==null&&r.userSettingsGroup?l[r.userSettingsGroup]:null,h=t.getEngine()._connector?.getContainerWrapper();t.getEngine()._connector?.hideLoadingIndicator(h);const g=n?.nodeParams||{},_=n?.pathParams||{},m=n?.searchParams||{};if(r&&h){let w,E;if((r.virtualTree||r._virtualTree)&&(E=ke.findVirtualTreeRootNode(r)),[...h.childNodes].forEach(T=>{if(T.tagName?.indexOf("LUIGI-")===0)if(T.viewGroup&&r.viewGroup!==T.viewGroup){T.style.display="none";const R=t.getConfigValue("navigation.viewGroupSettings")?.[T.viewGroup];R?.preloadUrl&&(T.viewurl=R.preloadUrl,T.context={},T.nodeParams={},T.pathParams={})}else T.viewGroup||T.virtualTree&&E===T.virtualTreeRootNode?w=T:T.remove()}),w&&w._luigiPreloading&&(w._luigiPreloading=!1,j.get(Oi).viewGroupLoaded(w)),w)s||(w.style.display="block",w.viewurl=r.viewUrl?j.get(Ui).applyDecorators(U.substituteViewUrl(r,_,g,t),r.decodeViewUrl??!1):"",w.nodeParams=g,w.pathParams=_,w.clientPermissions=r.clientPermissions,w.searchParams=m,w.locale=t.i18n().getCurrentLocale(),w.theme=t.theming().getCurrentTheme(),w.activeFeatureToggleList=t.featureToggles().getActiveFeatureToggleList(),w.userSettingsGroup=r.userSettingsGroup,w.userSettings=f,Qd(w,t),qd(w,t)),o||w.updateContext(r.context||{},{withoutSync:!1});else{const T=await Il(r,t,n);h?.appendChild(T);const R=t.getEngine()._connector;r.loadingIndicator?.enabled!==!1&&R?.showLoadingIndicator(h)}}},openModal:async(r,t,n,s)=>{const o=await Il(t,r);G.modalContainer.push(o);const l=j.get(Hr),u=j.get(fr),f=j.get(ln);let h=!1,g,_;const w=new Promise(R=>{g=()=>{h||(h=!0,R(),u.removeLastModalFromStack())},_=async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}g&&g(),r.getConfigValue("routing.showModalPathInUrl")&&u.getModalStackLength()===0&&l.removeModalDataFromUrl(!0)},o.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,_)}),E={closePromise:w,resolveFn:g,onCloseRequestHandler:_,onInternalClose:()=>{try{f.clearDirtyState(o),E.resolveFn&&E.resolveFn()}catch(R){console.warn("onInternalClose failed",R)}},modalsettings:n};u.registerModal(E),r.getEngine()._connector?.renderModal(o,n,async()=>{try{await f.getUnsavedChangesModalPromise(o)}catch{return}s?.(),g&&g(),r.getConfigValue("routing.showModalPathInUrl")&&u.getModalStackLength()===0&&l.removeModalDataFromUrl(!0)},()=>w);const T=r.getEngine()._connector;t.loadingIndicator?.enabled!==!1&&T?.showLoadingIndicator(o.parentElement)},updateModalSettings:(r,t,n)=>{const s=j.get(fr);if(s.getModalStackLength()===0)return;s.updateFirstModalSettings(r);const o=j.get(Hr),l=U.getModalPathFromPath(n);l&&o.updateModalDataInUrl(l,s.getModalSettings(),t),n.getEngine()._connector?.updateModalSettings(s.getModalSettings())},openDrawer:async(r,t,n,s)=>{const o=j.get(ln);if(G.drawerContainer&&o.shouldShowUnsavedChangesModal(G.drawerContainer))try{await o.getUnsavedChangesModalPromise(G.drawerContainer)}catch{return}const l=await Il(t,r);G.drawerContainer=l;const u=new Promise(h=>{const g=async()=>{try{await o.getUnsavedChangesModalPromise(l)}catch{return}G.drawerContainer=void 0,o.clearDirtyState(l),h()};l.addEventListener($.CLOSE_CURRENT_MODAL_REQUEST,g)});r.getEngine()._connector?.renderDrawer(l,n,async()=>{try{await o.getUnsavedChangesModalPromise(l)}catch{return}s?.(),G.drawerContainer=void 0,o.clearDirtyState(l)},()=>u);const f=r.getEngine()._connector;t.loadingIndicator?.enabled!==!1&&f?.showLoadingIndicator(l.parentElement)}};class rC{constructor(){this._userInfoStore=Ma({}),this._loggedInStore=Ma(!1)}setUserInfo(t){this._userInfoStore.set(t)}setLoggedIn(t){this._loggedInStore.set(t)}getUserInfoStore(){return this._userInfoStore}getLoggedInStore(){return this._loggedInStore}async init(){const t=at.getConfigValue("auth.use");if(!t)return Promise.resolve(!0);const n=at.getConfigValue(`auth.${t}`),s=rr.parseUrlAuthErrors()||{};if(await rr.handleUrlAuthErrors(n,s.error,s.errorDescription))return this.idpProviderInstance=this.getIdpProviderInstance(t,n),M.isPromise(this.idpProviderInstance)?this.idpProviderInstance.then(l=>(this.idpProviderInstance=l,this.checkAuth(n))).catch(l=>{const u=`Error: ${l.message||l}`;console.error(u,l.message&&l),at.setErrorMessage(u)}):this.checkAuth(n)}async checkAuth(t){const n=rr.getStoredAuthData();if(!n||!rr.isLoggedIn()){if(at.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return n&&(o=await pi.handleAuthEvent("onAuthExpired",t)),o?this.startAuthorization():void 0}this.idpProviderInstance.settings&&M.isFunction(this.idpProviderInstance.settings.userInfoFn)?this.idpProviderInstance.settings.userInfoFn(this.idpProviderInstance.settings,n).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):M.isFunction(this.idpProviderInstance.userInfo)?this.idpProviderInstance.userInfo(t).then(o=>{this.setUserInfo(o),this.setLoggedIn(!0)}):(this.setLoggedIn(!0),this.setUserInfo(Vh(this._userInfoStore))),M.isFunction(at.getConfigValue("auth.events.onAuthSuccessful"))&&nn.isNewlyAuthorized()&&await pi.handleAuthEvent("onAuthSuccessful",t,n),nn.removeNewlyAuthorized(),M.isFunction(this.idpProviderInstance.setTokenExpirationAction)&&this.idpProviderInstance.setTokenExpirationAction(),M.isFunction(this.idpProviderInstance.setTokenExpireSoonAction)&&this.idpProviderInstance.setTokenExpireSoonAction()}async startAuthorization(){if(this.idpProviderInstance)return this.idpProviderInstance.login().then(t=>{nn.setNewlyAuthorized(),t&&console.error(t)})}logout(){const t=rr.getStoredAuthData(),n=async l=>{await pi.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,l),nn.removeAuthData()},s=at.getConfigValue(`auth.${at.getConfigValue("auth.use")}.logoutFn`),o=at.getConfigValueAsync("navigation.profile.logout.customLogoutFn");M.isFunction(s)?s(this.idpProviderInstance.settings,t,n):M.isFunction(this.idpProviderInstance.logout)?this.idpProviderInstance.logout(t,n):o&&M.isFunction(o)?o(t,n):n(this.idpProviderInstance.settings.logoutUrl)}createIdpProviderException(t){return{message:t,name:"IdpProviderException"}}async getIdpProviderInstance(t,n){const s=M.getConfigValueFromObject(n,"idpProvider");if(s){const l=await new s(n);return["login"].forEach(u=>{if(!M.isFunction(l[u]))throw this.createIdpProviderException(`${u} function does not exist in custom IDP Provider ${t}`)}),l}if(M.isFunction(at.getConfigValue("auth.events.onAuthConfigError")))await pi.handleAuthEvent("onAuthConfigError",{idpProviderName:t,type:"IdpProviderException"});else throw this.createIdpProviderException(`IDP Provider ${t} does not exist.`)}unload(){this.idpProviderInstance&&M.isFunction(this.idpProviderInstance.unload)&&this.idpProviderInstance.unload()}resetExpirationChecks(){this.idpProviderInstance&&M.isFunction(this.idpProviderInstance.resetExpirationChecks)&&this.idpProviderInstance.resetExpirationChecks()}broadcastAuthData(t){const s=at.getLuigi()?.getEngine()?._connector?.getContainerWrapper();if(s){for(const o of s.childNodes)o.tagName?.startsWith("LUIGI-")&&o.setAttribute("auth-data",JSON.stringify(t));G.modalContainer?.forEach(o=>o.setAttribute("auth-data",JSON.stringify(t))),G.drawerContainer&&G.drawerContainer.setAttribute("auth-data",JSON.stringify(t))}}}const sr=new rC,iC={luigi:{button:{confirm:"Yes",dismiss:"No"},confirmationModal:{body:"Are you sure you want to do this?",header:"Confirmation"},navigation:{up:"Up"},notExactTargetNode:"Could not map the exact target node for the requested route {route}.",requestedRouteNotFound:"Could not find the requested route {route}.",unsavedChangesAlert:{body:"Unsaved changes will be lost. Do you want to continue?",header:"Unsaved changes detected"}}},sC=iC;class aC{constructor(t){this.luigi=t,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=sC}_init(){this._initCustomImplementation(),this.addCurrentLocaleChangeListener(t=>{this.broadcastLocaleToAllContainers(t)})}getCurrentLocale(){return sessionStorage.getItem(this.currentLocaleStorageKey)||this.defaultLocale}setCurrentLocale(t){t&&(sessionStorage.setItem(this.currentLocaleStorageKey,t),this._notifyLocaleChange(t)),this.luigi.getEngine()._connector?.setCurrentLocale(t)}addCurrentLocaleChangeListener(t){let n=null;return M.isFunction(t)?(n=M.getRandomId(),this.listeners[n]=t):console.error("Provided locale change listener is not a function."),n}removeCurrentLocaleChangeListener(t){t&&this.listeners[t]?delete this.listeners[t]:console.error("Unable to remove locale change listener - no listener registered for given ID.")}getTranslation(t,n=void 0,s=void 0){if(!t)return"";if(this.translationImpl){const l=this.translationImpl.getTranslation(t,n,s);if(l!==t)return l}const o=this.findTranslation(t,this.translationTable,n);return o||t}_notifyLocaleChange(t){Object.getOwnPropertyNames(this.listeners).forEach(n=>{this.listeners[Number(n)](t)}),this.luigi.configChanged()}_initCustomImplementation(){this.translationImpl=this.luigi.getConfigValue("settings.customTranslationImplementation"),M.isFunction(this.translationImpl)&&(this.translationImpl=this.translationImpl())}broadcastLocaleToAllContainers(t){const n=M.getNodeList("luigi-container[lui_container]");n?.length&&t&&n.forEach(s=>{s.locale=t,s.updateContext({locale:t})})}findTranslation(t,n,s){const o=t.split(".");for(let l=0;l<o.length;l++){const u=o[l];if(Object.prototype.hasOwnProperty.call(n,u)&&typeof n[u]=="object")n=n[u];else return s?this.findInterpolations(n[u],s):n[u]}}findInterpolations(t,n){return typeof t!="string"||!t.trim()||Object.keys(n).forEach(s=>{t=t.replace(new RegExp("{"+Wa.escapeKeyForRegexp(s)+"}","gi"),n[s])}),t}}const zl={getMicrofrontendsInDom(r){return[...this.getMainMicrofrontends(r).map(t=>({container:t.iframe,active:t.active,type:"main",id:t.id})),...this.getModalMicrofrontends().map(t=>({container:t.iframe,active:t.active,type:"modal",id:t.id})),...(()=>{const t=this.getDrawerMicrofrontends();return t.iframe?[{container:t.iframe,active:t.active,type:"drawer",id:t.id}]:[]})()]},getMainMicrofrontends(r){const t=r.getEngine()._connector?.getContainerWrapper();if(!t)return[];const n=[];for(const s of t.childNodes)if(s.tagName?.startsWith("LUIGI-"))if(s.iframeHandle?.iframe)n.push({iframe:s.iframeHandle.iframe,id:s.luigiMfId,active:M.isElementVisible(s)});else{const o=s.shadowRoot?.firstElementChild?.firstElementChild??null;o&&n.push({iframe:o,id:s.luigiMfId,active:M.isElementVisible(s)})}return n},getModalMicrofrontends(){const r=[];for(const t of G.modalContainer)if(t.iframeHandle?.iframe)r.push({iframe:t.iframeHandle.iframe,id:t.luigiMfId,active:M.isElementVisible(t)});else{const n=t.shadowRoot?.firstElementChild?.firstElementChild??null;n&&r.push({iframe:n,id:t.luigiMfId,active:M.isElementVisible(t)})}return r},getDrawerMicrofrontends(){if(!G.drawerContainer)return{};if(G.drawerContainer.iframeHandle?.iframe)return{iframe:G.drawerContainer.iframeHandle.iframe,id:G.drawerContainer.luigiMfId,active:M.isElementVisible(G.drawerContainer)};{const r=G.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(r)return{iframe:r,id:G.drawerContainer.luigiMfId,active:M.isElementVisible(G.drawerContainer)}}return{}},getAllLuigiContainerIframe(r){const t=r.getEngine()._connector?.getContainerWrapper();if(!t)return;const n=[...t.children].filter(s=>s.tagName?.indexOf("LUIGI-CONTAINER")===0&&s.iframeHandle?.iframe);for(const s of G.modalContainer)s.iframeHandle?.iframe&&n.push(s);return G.drawerContainer&&G.drawerContainer.iframeHandle?.iframe&&n.push(G.drawerContainer),n.length>0?n:void 0}};class oC{constructor(t){this.luigi=t}getShellbar(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarElement()||null}getShellbarActions(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getShellbarActions()||null}getLuigiContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getLuigiContainer()||null}getNavFooterContainer(){return this.luigi.getEngine()._connector?.getCoreAPISupportedElements().getNavFooterContainer()||null}getMicrofrontends(){return zl.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const t=this.luigi.getEngine()._connector?.getContainerWrapper();let n=[];if(G.modalContainer)for(const s of Array.from(G.modalContainer))s.tagName?.startsWith("LUIGI-")&&s.iframeHandle?.iframe&&n.push(s.iframeHandle.iframe);if(G.drawerContainer&&n.push(G.drawerContainer.iframeHandle.iframe),!t)return null;for(const s of Array.from(t.childNodes))s.tagName?.startsWith("LUIGI-")&&s.iframeHandle?.iframe&&n.push(s.iframeHandle.iframe);return n}getCurrentMicrofrontendIframe(){const t=this.luigi.getEngine()._connector?.getContainerWrapper();if(!t)return null;const n=G.modalContainer[0]?.iframeHandle?.iframe??null;let s=null,o=null;for(const l of Array.from(t.children))l.tagName?.startsWith("LUIGI-")&&M.isElementVisible(l)&&(l.iframeHandle?.iframe?s=l.iframeHandle.iframe:o=l.shadowRoot?.firstElementChild?.firstElementChild??null);return n||s||o}}const lC={luigiAfterInit:async r=>{M.getConfigBooleanValue(r.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{r.ux().hideAppLoadingIndicator()},0),await at.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class uC{constructor(){this.featureToggleList=new Set}setFeatureToggle(t,n=!1){this.isValid(t)&&(t.startsWith("!")&&!n||this.isDuplicatedOrDisabled(t)||this.featureToggleList.add(t))}unsetFeatureToggle(t){if(this.isValid(t)){if(!this.featureToggleList.has(t)){console.warn("Feature toggle name is not in the list.");return}this.featureToggleList.delete(t)}}getActiveFeatureToggleList(){return[...Array.from(this.featureToggleList)].filter(n=>!n.startsWith("!"))}isValid(t){return M.isString(t)?!0:(console.warn("Feature toggle name is not valid or not of type 'string'"),!1)}isDuplicatedOrDisabled(t){return this.featureToggleList.has(t)?(console.warn("Feature toggle name already exists"),!0):this.featureToggleList.has(`!${t}`)?(console.warn("Disabled feature toggle can not be activated"),!0):!1}}class cC{constructor(t){this.hashRouting=!1,this.options={fromContext:null,fromClosestContext:!1,fromVirtualTreeRoot:!1,fromParent:!1,nodeParams:{}},this.navigate=async(n,s,o,l,u)=>{const f=n[0]!=="/";this.options.relative=f;const h={modalSettings:o,newTab:!1,options:this.options,path:n,preserveView:s,preventContextUpdate:!1,preventHistoryEntry:!1,withoutSync:!1};return this.navService.handleNavigationRequest(h,void 0)},this.navigateToIntent=(n,s={})=>{let o="#?intent=";if(o+=n,s&&Object.keys(s)?.length){const l=Object.entries(s);if(l.length>0){o+="?";for(const[u,f]of l)o+=u+"="+f+"&";o=o.slice(0,-1)}}this.navigate(o)},this.openAsModal=async(n,s,o)=>{if(!s?.keepPrevious&&!await this.modalService.closeModalsWithDirtyCheck())return;const l=n.replace(/\/\/+/g,"/");if(!await ke.validatePathAndGetRedirect(l,this.luigi))return;const f=await this.navService.getCurrentNode(l),h=s||{};h.title||(h.title=f?.label),this.luigi.getConfigValue("routing.showModalPathInUrl")&&this.modalService.getModalStackLength()===0&&this.routingService.appendModalDataToUrl(l,h),this.luigi.getEngine()._ui.openModal(this.luigi,f,h,o)},this.openAsDrawer=async(n,s,o)=>{const l=n.replace(/\/\/+/g,"/");if(!await ke.validatePathAndGetRedirect(l,this.luigi))return;const f=await this.navService.getCurrentNode(l),h=s||{};if(!h.header?.title){const _=await U.getNodeLabel(f,this.luigi)||"";h.header?h.header.title=_:h.header={title:_}}h.overlap===void 0&&(h.overlap=!0),this.luigi.getEngine()._ui.openDrawer(this.luigi,f,h,o)},this.runTimeErrorHandler=async n=>{const{path:s}=U.getCurrentPath(this.luigi,this.luigi.getConfig().routing?.useHashRouting),o=await this.navService.getCurrentNode(s),l=this.luigi.getConfigValue("navigation.defaults.runTimeErrorHandler");o?.runTimeErrorHandler?.errorFn&&M.isFunction(o?.runTimeErrorHandler?.errorFn)?o.runTimeErrorHandler.errorFn(n,o):l?.errorFn&&M.isFunction(l.errorFn)&&l.errorFn(n,o)},this.pathExists=async n=>await U.pathExists(n,this.luigi),this.luigi=t,this.hashRouting=t.getConfig().routing?.useHashRouting,this.navService=j.get(hr),this.routingService=j.get(Hr),this.modalService=j.get(fr)}fromVirtualTreeRoot(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!0,this.options.fromParent=!1,this}fromContext(t){return this.options.fromContext=t,this}fromClosestContext(){return this.options.fromContext=null,this.options.fromClosestContext=!0,this.options.fromParent=!1,this}fromParent(){return this.options.fromContext=null,this.options.fromClosestContext=!1,this.options.fromVirtualTreeRoot=!1,this.options.fromParent=!0,this}withParams(t){return t&&Object.assign(this.options.nodeParams??{},t),this}}class fC{constructor(t){this.luigi=t}addSearchParams(t,n=!1){if(!M.isObject(t)){console.log("Params argument must be an object");return}const s=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?s.hash=U.addParamsOnHashRouting(t,s.hash):U.modifySearchParams(t,s.searchParams),this.handleBrowserHistory(n,s),this.luigi.configChanged()}getSearchParams(){const t={},n=["__proto__","constructor","prototype"],s=new URL(location.href);let o;if(this.luigi.getConfigValue("routing.useHashRouting")){const l=s.hash.split("?")[1];o=l?new URLSearchParams(l).entries():[]}else o=s.searchParams.entries();for(const[l,u]of o){if(n.some(f=>l===f)){console.warn(`Blocked because of potentially dangerous query param: ${l}`);continue}t[l]=u}return t}handleBrowserHistory(t,n){const s=this.sanitizeUrl(n.href);if(!s){console.warn("invalid url: "+s);return}t?window.history.pushState({},"",s):window.history.replaceState({},"",s)}sanitizeUrl(t){return new URL(location.href).origin===new URL(t).origin?t:void 0}addNodeParams(t,n){if(!M.isObject(t)){console.log("Params argument must be an object");return}const s=U.getContentViewParamPrefix(this.luigi),o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=U.addParamsOnHashRouting(t,o.hash,s):U.modifySearchParams(t,o.searchParams,s),this.handleBrowserHistory(n,o),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class hC{#e;#n="";constructor(t){this.#e=t}async getAvailableThemes(){return await this.#e.getConfigValueAsync("settings.theming.themes")}setCurrentTheme(t){this.#n=t,this.#e.__cssVars=void 0}async getThemeObject(t){return(await this.getAvailableThemes())?.find(s=>s.id===t)}getCurrentTheme(){if(!this.isThemingAvailable())return!1;if(this.#n)return this.#n;const t=this.#e.getConfigValue("settings.theming");return t.defaultTheme||console.error("[Theming] getCurrentTheme() error. No theme set and no defaultTheme found in configuration",t),t.defaultTheme}isThemingAvailable(){return!!this.#e.getConfigValue("settings.theming")}async getCSSVariables(){if(!window.Luigi.__cssVars){const t=this.#e.getConfigValue("settings.theming.variables.file");if(t)try{const n=await fetch(t);window.Luigi.__cssVars=(await n.json()).root,Object.keys(window.Luigi.__cssVars).forEach(s=>{const o=getComputedStyle(document.documentElement).getPropertyValue("--"+s);o&&(window.Luigi.__cssVars[s]=o)})}catch(n){M.isFunction(this.#e.getConfigValue("settings.theming.variables.errorHandling"))?this.#e.getConfigValue("settings.theming.variables.errorHandling")(n):console.error("CSS variables file error: ",n)}else this.#e.getConfigValue("settings.theming.variables")==="fiori"&&window.__luigiThemeVars?(window.Luigi.__cssVars={},window.__luigiThemeVars.forEach(n=>{window.Luigi.__cssVars[n]=getComputedStyle(document.documentElement).getPropertyValue("--"+n)})):window.Luigi.__cssVars={}}return window.Luigi.__cssVars}_init(){const t=j.get(Ui);(()=>{const s=this.#e.getConfigValue("settings.theming");s&&s.nodeViewURLDecorator&&s.nodeViewURLDecorator.queryStringParameter&&t.add({type:"queryString",uid:"theming",key:s.nodeViewURLDecorator.queryStringParameter.keyName,valueFn:()=>{const o=this.getCurrentTheme(),l=s.nodeViewURLDecorator.queryStringParameter.value;return l?l(o):o}}),s&&s.useFioriScrollbars===!0&&document.body.classList.add("fioriScrollbars")})()}}let xh;const Qe={luigi:void 0,documentTitle:void 0,init:r=>{Qe.luigi=r,Qe.documentTitle=Ma(void 0),xh=j.get(ln)},processAlert:(r,t,n)=>{if(!Qe.luigi)throw new Error("Luigi is not initialized.");const s={openFromClient:t,close:()=>{r.id&&n.notifyAlertClosed(r.id)},link:o=>{if(r.links){const l=r.links[o];if(l&&(l.url&&Qe.luigi?.navigation().navigate(l.url),l.dismissKey&&r.id))return n.notifyAlertClosed(r.id,l.dismissKey),!0}return!1}};Qe.luigi.getEngine()._connector?.renderAlert(r,s)},handleConfirmationModalRequest:(r,t)=>{if(!Qe.luigi)throw new Error("Luigi is not initialized.");r&&(r={...r,header:Qe.luigi.i18n().getTranslation(r.header||"luigi.confirmationModal.header"),body:Qe.luigi.i18n().getTranslation(r.body||"luigi.confirmationModal.body"),buttonDismiss:Qe.luigi.i18n().getTranslation(r.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Qe.luigi.i18n().getTranslation(r.buttonConfirm||"luigi.button.confirm")}),Qe.luigi.getEngine()._connector?.renderConfirmationModal(r,{confirm(){t.notifyConfirmationModalClosed(!0)},dismiss(){t.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(r,t)=>{if(!Qe.luigi)throw new Error("Luigi is not initialized.");xh.updateDirtyStatus(r,t)}};class dC{processUserSettingGroups(t,n){const s=[],o=t?.userSettingGroups,l=n?.userSettings?.userSettingGroups,u=o||l;if(M.isObject(u)){for(const f in u){const h={};h[f]=u[f],s.push(h)}return s}return s}getUserSettingsIframesInDom(){const t=document.querySelector(".iframeUserSettingsCtn");return t?[...t.children]:[]}hideUserSettingsIframe(){this.getUserSettingsIframesInDom().forEach(t=>{t.style.display="none"})}findActiveCustomUserSettingsIframe(t){const n=document.querySelectorAll("[userSettingsGroup]");for(let s=0;s<n.length;s++)if(n[s].contentWindow===t)return n[s];return null}}const gC=new dC;class pC{constructor(t){this.dirtyStatusService=j.get(ln),this.appLoadingIndicatorSelector="[luigi-app-loading-indicator]",this.showAlert=n=>new Promise(s=>{n.id||(n.id=M.getRandomId().toString());const o={openFromClient:!1,close:()=>{s(!0)},link:l=>{if(n.links){const u=n.links[l];if(u&&(u.url&&this.luigi?.navigation().navigate(u.url),u.dismissKey))return s(u.dismissKey),!0}return!1}};this.luigi.getEngine()._connector?.renderAlert(n,o)}),this.showConfirmationModal=n=>(n&&(n={...n,header:this.luigi.i18n().getTranslation(n.header||"luigi.confirmationModal.header"),body:this.luigi.i18n().getTranslation(n.body||"luigi.confirmationModal.body"),buttonDismiss:this.luigi.i18n().getTranslation(n.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:this.luigi.i18n().getTranslation(n.buttonConfirm||"luigi.button.confirm")}),new Promise((s,o)=>{this.luigi.getEngine()._connector?.renderConfirmationModal(n,{confirm(){s(!0)},dismiss(){o()}})})),this.processUserSettingGroups=()=>{const n=this.luigi.getConfigValue("userSettings"),s=this.luigi.getConfigValue("settings");return gC.processUserSettingGroups(n,s)},this.openUserSettings=n=>{this.luigi.getEngine()._connector?.openUserSettings(n)},this.closeUserSettings=()=>{this.luigi.getEngine()._connector?.closeUserSettings()},this.setDocumentTitle=n=>{this.luigi.getEngine()._ux?.documentTitle?.set(n),this.luigi.getEngine()._connector?.setDocumentTitle(n)},this.getDocumentTitle=()=>Vh(this.luigi.getEngine()._ux?.documentTitle)||window.document.title||"",this.hideAppLoadingIndicator=()=>{const n=document.querySelector(this.appLoadingIndicatorSelector);n&&(n.classList.add("hidden"),setTimeout(()=>{n.parentNode?.removeChild(n)},500))},this.showLoadingIndicator=n=>this.luigi.getEngine()._connector?.showLoadingIndicator(n),this.hideLoadingIndicator=n=>this.luigi.getEngine()._connector?.hideLoadingIndicator(n),this.addBackdrop=()=>this.luigi.getEngine()._connector?.addBackdrop(),this.removeBackdrop=()=>this.luigi.getEngine()._connector?.removeBackdrop(),this.getDirtyStatus=()=>this.dirtyStatusService.readDirtyStatus(),this.luigi=t}}class vC{filterIdFromMessageObject(t){const{id:n,...s}=t;return{id:n,messageWithoutId:s}}}const Lh=new vC;class _C{constructor(t){this.luigi=t}sendToAll(t){const n=zl.getAllLuigiContainerIframe(this.luigi);if(!n){console.warn("No Luigi containers found to send the message to.");return}const{id:s,messageWithoutId:o}=Lh.filterIdFromMessageObject(t);if(!s){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const l of n)l.sendCustomMessage?l.sendCustomMessage(s,o):console.warn("Container does not support sending custom messages:",l)}send(t,n){const s=zl.getAllLuigiContainerIframe(this.luigi);if(!s){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:l}=Lh.filterIdFromMessageObject(n);if(!o){console.warn('Message object must contain an "id" property to specify the message type.');return}for(const u of s)if(u.luigiMfId===t){u.sendCustomMessage?u.sendCustomMessage(o,l):console.warn("Container does not support sending custom messages:",u);return}console.warn(`No container found with microfrontend ID: ${t}`)}}class mC{constructor(t){this.engine=t,this.initialized=!1,this.configReadyCallback=function(){},this.USER_SETTINGS_KEY="luigi.preferences.userSettings",this.setConfig=n=>{this.config=n,this.setConfigCallback(this.getConfigReadyCallback()),sr.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,lC.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...n)=>{this.getEngine()._ui.update(n)},this.customMessages=()=>(this._customMessages||(this._customMessages=new _C(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new aC(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new oC(this)),this._elements),this.navigation=()=>new cC(this),this.ux=()=>new pC(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new uC),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new fC(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new hC(this)),this._theming),this.auth=()=>pi,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(t){return M.getConfigValueFromObject(this.getConfig(),t)}getConfigValueAsync(t,...n){return Mr.getConfigValueFromObjectAsync(this.getConfig(),t,n)}clearNavigationCache(){j.get(cr).deleteCache();const t=n=>{n&&n.forEach&&n.forEach(s=>{s.titleResolver&&s.titleResolver._cache&&(s.titleResolver._cache=void 0),s.children&&t(s.children)})};t(this.getConfig().navigation.nodes)}setGlobalContext(t,n){this.config&&this.config.navigation&&(this.config.navigation.globalContext=t,n||this.configChanged("navigation"))}getGlobalContext(){return this.config?.navigation?.globalContext||{}}updateContextValues(t){const n=M.getNodeList("luigi-container[lui_container]");n&&n.forEach(s=>{const l={...s.context||{},...t};s.context=l,s.updateContext&&s.updateContext(l,{withoutSync:!1})})}async readUserSettings(){const t=await this.getConfigValueAsync("userSettings"),n=t||await this.getConfigValueAsync("settings.userSettings");if(n&&M.isFunction(n.readUserSettings))return n.readUserSettings();const s=localStorage.getItem(this.USER_SETTINGS_KEY);return s&&JSON.parse(s)}async storeUserSettings(t,n){const s=await this.getConfigValueAsync("userSettings"),o=s||await this.getConfigValueAsync("settings.userSettings");if(o&&M.isFunction(o.storeUserSettings))return o.storeUserSettings(t,n);localStorage.setItem(this.USER_SETTINGS_KEY,JSON.stringify(t)),this.configChanged()}reset(){const t=this.getConfig();this.unload(),this.setConfig(t)}unload(){this.initialized=!1,window.Luigi._store.clear(),sr.unload(),ql.removeAllEventListeners(),this.getEngine()._connector?.unload(),this._i18n=void 0}createConfigStore(){const t=Ma({}),n={};let s=[];return{subscribe:o=>{s.push(t.subscribe(o))},reset:o=>{t.update(o)},subscribeToScope:(o,l)=>{let u=n[l];u||(u=new Set,n[l]=u),u.add(o)},fire:(o,l)=>{const u=n[o];u&&[...u].forEach(f=>{f(l)})},clear:()=>{s.forEach(o=>{o()}),s=[]}}}getConfigReadyCallback(){return new Promise(t=>{this.i18n()._init(),t()})}setConfigCallback(t){this.configReadyCallback=t}}const zd=!1;var wC=Array.isArray,SC=Array.prototype.indexOf,Di=Array.prototype.includes,yC=Array.from,EC=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,CC=Object.prototype,TC=Array.prototype,bC=Object.getPrototypeOf,Nh=Object.isExtensible;const RC=()=>{};function AC(r){for(var t=0;t<r.length;t++)r[t]()}function PC(){var r,t,n=new Promise((s,o)=>{r=s,t=o});return{promise:n,resolve:r,reject:t}}const nt=2,Es=4,Kd=8,jd=1<<24,sn=16,dr=32,gr=64,Kl=128,Qt=512,Ye=1024,tt=2048,Cn=4096,Sn=8192,or=16384,Is=32768,Oh=1<<25,Va=65536,Ba=1<<17,IC=1<<18,ja=1<<19,xC=1<<20,qr=65536,Ga=1<<21,gs=1<<22,Cs=1<<23,xl=Symbol("$state"),LC=Symbol("attributes"),NC=Symbol("class"),OC=Symbol("style"),UC=Symbol("text"),vu=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function DC(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function MC(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function $C(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kC(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function FC(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const et=Symbol();function HC(){console.warn("https://svelte.dev/e/derived_inert")}function WC(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function VC(r){return r===this.v}let _u=!1,BC=!1;function GC(){_u=!0}let cn=null;function Qa(r){cn=r}function QC(r,t=!1,n){cn={p:cn,i:!1,c:null,e:null,s:r,x:null,r:Le,l:_u&&!t?{s:null,u:null,$:[]}:null}}function qC(r){var t=cn,n=t.e;if(n!==null){t.e=null;for(var s of n)a0(s)}return t.i=!0,cn=t.p,{}}function Ya(){return!_u||cn!==null&&cn.l===null}let yi=[];function zC(){var r=yi;yi=[],AC(r)}function Ri(r){if(yi.length===0){var t=yi;queueMicrotask(()=>{t===yi&&zC()})}yi.push(r)}function Yd(r){var t=Le;if(t===null)return ye.f|=Cs,r;if((t.f&Is)===0&&(t.f&Es)===0)throw r;Ei(r,t)}function Ei(r,t){for(;t!==null;){if((t.f&Kl)!==0){if((t.f&Is)===0)throw r;try{t.b.error(r);return}catch(n){r=n}}t=t.parent}throw r}const KC=-7169;function Fe(r,t){r.f=r.f&KC|t}function mu(r){(r.f&Qt)!==0||r.deps===null?Fe(r,Ye):Fe(r,Cn)}function Jd(r){if(r!==null)for(const t of r)(t.f&nt)===0||(t.f&qr)===0||(t.f^=qr,Jd(t.deps))}function Xd(r,t,n){(r.f&tt)!==0?t.add(r):(r.f&Cn)!==0&&n.add(r),Jd(r.deps),Fe(r,Ye)}let Ll=null,hi=null,Ie=null,jl=null,an=null,Yl=null,Nl=!1,Ci=null,Oa=null;var Uh=0;let jC=1;class zr{id=jC++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;unblocked=new Set;#l=new Set;#i=new Set;#o=new Set;#s=0;#r=new Map;#h=null;#a=[];#g=[];#d=new Set;#c=new Set;#f=new Map;#u=new Set;is_fork=!1;#_=!1;#E(){if(this.is_fork)return!0;for(const s of this.#r.keys()){for(var t=s,n=!1;t.parent!==null;){if(this.#f.has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#u.delete(t)}unskip_effect(t,n=s=>this.schedule(s)){var s=this.#f.get(t);if(s){this.#f.delete(t);for(var o of s.d)Fe(o,tt),n(o);for(o of s.m)Fe(o,Cn),n(o)}this.#u.add(t)}#v(){if(this.#e=!0,Uh++>1e3&&(this.#S(),YC()),!this.#E()){for(const h of this.#d)this.#c.delete(h),Fe(h,tt),this.schedule(h);for(const h of this.#c)Fe(h,Cn),this.schedule(h)}const t=this.#a;this.#a=[],this.apply();var n=Ci=[],s=[],o=Oa=[];for(const h of t)try{this.#C(h,n,s)}catch(g){throw tg(h),g}if(Ie=null,o.length>0){var l=zr.ensure();for(const h of o)l.schedule(h)}if(Ci=null,Oa=null,this.#E()){this.#p(s),this.#p(n);for(const[h,g]of this.#f)eg(h,g);o.length>0&&Ie.#v();return}const u=this.#y();if(u){u.#m(this);return}this.#d.clear(),this.#c.clear();for(const h of this.#l)h(this);this.#l.clear(),jl=this,Dh(s),Dh(n),jl=null,this.#h?.resolve();var f=Ie;if(this.linked&&this.#s===0&&this.#S(),this.#a.length>0){f===null&&(f=this,this.#w());const h=f;h.#a.push(...this.#a.filter(g=>!h.#a.includes(g)))}f!==null&&f.#v()}#C(t,n,s){t.f^=Ye;for(var o=t.first;o!==null;){var l=o.f,u=(l&(dr|gr))!==0,f=u&&(l&Ye)!==0,h=f||(l&Sn)!==0||this.#f.has(o);if(!h&&o.fn!==null){u?o.f^=Ye:(l&Es)!==0?n.push(o):Ls(o)&&((l&sn)!==0&&this.#c.add(o),Mi(o));var g=o.first;if(g!==null){o=g;continue}}for(;o!==null;){var _=o.next;if(_!==null){o=_;break}o=o.parent}}}#y(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[n,[,s]]of this.current)if(t.current.has(n)&&!s)return t}t=t.#n}return null}#m(t){for(const[s,o]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,o);for(const[s,o]of t.async_deriveds){const l=this.async_deriveds.get(s);l&&o.promise.then(l.resolve)}const n=s=>{var o=s.reactions;if(o!==null)for(const f of o){var l=f.f;if((l&nt)!==0)n(f);else{var u=f;l&(gs|sn)&&!this.async_deriveds.has(u)&&(this.#c.delete(u),Fe(u,tt),this.schedule(u))}}};for(const s of this.current.keys())n(s);this.oncommit(()=>t.discard()),t.#S(),Ie=this,this.#v()}#p(t){for(var n=0;n<t.length;n+=1)Xd(t[n],this.#d,this.#c)}capture(t,n,s=!1){t.v!==et&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Cs)===0&&(this.current.set(t,[n,s]),an?.set(t,n)),this.is_fork||(t.v=n)}activate(){Ie=this}deactivate(){Ie=null,an=null}flush(){try{Nl=!0,Ie=this,this.#v()}finally{Uh=0,Yl=null,Ci=null,Oa=null,Nl=!1,Ie=null,an=null,Wr.clear()}}discard(){for(const t of this.#i)t(this);this.#i.clear(),this.#o.clear(),this.#S()}register_created_effect(t){this.#g.push(t)}#T(){this.#S();for(let _=Ll;_!==null;_=_.#t){var t=_.id<this.id,n=[];for(const[m,[w,E]]of this.current){if(_.current.has(m)){var s=_.current.get(m)[0];if(t&&w!==s)_.current.set(m,[w,E]);else continue}n.push(m)}if(t)for(const[m,w]of this.async_deriveds){const E=_.async_deriveds.get(m);E&&w.promise.then(E.resolve)}if(_.#e){var o=[..._.current.keys()].filter(m=>!this.current.has(m));if(o.length===0)t&&_.discard();else if(n.length>0){if(t)for(const m of this.#u)_.unskip_effect(m,w=>{(w.f&(sn|gs))!==0?_.schedule(w):_.#p([w])});_.activate();var l=new Set,u=new Map;for(var f of n)Zd(f,o,l,u);u=new Map;var h=[..._.current.keys()].filter(m=>this.current.has(m)?this.current.get(m)[0]!==m.v:!0);if(h.length>0)for(const m of this.#g)(m.f&(or|Sn|Ba))===0&&wu(m,h,u)&&((m.f&(gs|sn))!==0?(Fe(m,tt),_.schedule(m)):_.#d.add(m));if(_.#a.length>0){_.apply();for(var g of _.#a)_.#C(g,[],[]);_.#a=[]}_.deactivate()}}}}increment(t,n){if(this.#s+=1,t){let s=this.#r.get(n)??0;this.#r.set(n,s+1)}}decrement(t,n){if(this.#s-=1,t){let s=this.#r.get(n)??0;s===1?this.#r.delete(n):this.#r.set(n,s-1)}this.#_||(this.#_=!0,Ri(()=>{this.#_=!1,this.linked&&this.flush()}))}transfer_effects(t,n){for(const s of t)this.#d.add(s);for(const s of n)this.#c.add(s);t.clear(),n.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#i.add(t)}on_fork_commit(t){this.#o.add(t)}run_fork_commit_callbacks(){for(const t of this.#o)t(this);this.#o.clear()}settled(){return(this.#h??=PC()).promise}static ensure(){if(Ie===null){const t=Ie=new zr;t.#w(),Nl||Ri(()=>{t.#e||t.flush()})}return Ie}apply(){{an=null;return}}schedule(t){if(Yl=t,t.b?.is_pending&&(t.f&(Es|Kd|jd))!==0&&(t.f&Is)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var s=n.f;if(Ci!==null&&n===Le&&(ye===null||(ye.f&nt)===0))return;if((s&(gr|dr))!==0){if((s&Ye)===0)return;n.f^=Ye}}this.#a.push(n)}#w(){hi===null?Ll=hi=this:(hi.#t=this,this.#n=hi),hi=this}#S(){var t=this.#n,n=this.#t;t===null?Ll=n:t.#t=n,n===null?hi=t:n.#n=t,this.linked=!1}}function YC(){try{DC()}catch(r){Ei(r,Yl)}}let $n=null;function Dh(r){var t=r.length;if(t!==0){for(var n=0;n<t;){var s=r[n++];if((s.f&(or|Sn))===0&&Ls(s)&&($n=new Set,Mi(s),s.deps===null&&s.first===null&&s.nodes===null&&s.teardown===null&&s.ac===null&&hg(s),$n?.size>0)){Wr.clear();for(const o of $n){if((o.f&(or|Sn))!==0)continue;const l=[o];let u=o.parent;for(;u!==null;)$n.has(u)&&($n.delete(u),l.push(u)),u=u.parent;for(let f=l.length-1;f>=0;f--){const h=l[f];(h.f&(or|Sn))===0&&Mi(h)}}$n.clear()}}$n=null}}function Zd(r,t,n,s){if(!n.has(r)&&(n.add(r),r.reactions!==null))for(const o of r.reactions){const l=o.f;(l&nt)!==0?Zd(o,t,n,s):(l&(gs|sn))!==0&&(l&tt)===0&&wu(o,t,s)&&(Fe(o,tt),Su(o))}}function wu(r,t,n){const s=n.get(r);if(s!==void 0)return s;if(r.deps!==null)for(const o of r.deps){if(Di.call(t,o))return!0;if((o.f&nt)!==0&&wu(o,t,n))return n.set(o,!0),!0}return n.set(r,!1),!1}function Su(r){Ie.schedule(r)}function eg(r,t){if(!((r.f&dr)!==0&&(r.f&Ye)!==0)){(r.f&tt)!==0?t.d.push(r):(r.f&Cn)!==0&&t.m.push(r),Fe(r,Ye);for(var n=r.first;n!==null;)eg(n,t),n=n.next}}function tg(r){Fe(r,Ye);for(var t=r.first;t!==null;)tg(t),t=t.next}function JC(r){let t=0,n=Eu(0),s;return()=>{Cu()&&(Ti(n),l0(()=>(t===0&&(s=v0(()=>r(()=>ps(n)))),t+=1,()=>{Ri(()=>{t-=1,t===0&&(s?.(),s=void 0,ps(n))})})))}}var XC=Va|ja;function ZC(r,t,n,s){new e0(r,t,n,s)}class e0{parent;is_pending=!1;transform_error;#e;#n=null;#t;#l;#i;#o=null;#s=null;#r=null;#h=null;#a=0;#g=0;#d=!1;#c=new Set;#f=new Set;#u=null;#_=JC(()=>(this.#u=Eu(this.#a),()=>{this.#u=null}));constructor(t,n,s,o){this.#e=t,this.#t=n,this.#l=l=>{var u=Le;u.b=this,u.f|=Kl,s(l)},this.parent=Le.b,this.transform_error=o??this.parent?.transform_error??(l=>l),this.#i=u0(()=>{this.#y()},XC)}#E(){try{this.#o=Lr(()=>this.#l(this.#e))}catch(t){this.error(t)}}#v(t){const n=this.#t.failed;n&&(this.#r=Lr(()=>{n(this.#e,()=>t,()=>()=>{})}))}#C(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#s=Lr(()=>t(this.#e)),Ri(()=>{var n=this.#h=document.createDocumentFragment(),s=lg();n.append(s),this.#o=this.#p(()=>Lr(()=>this.#l(s))),this.#g===0&&(this.#e.before(n),this.#h=null,Ua(this.#s,()=>{this.#s=null}),this.#m(Ie))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#g=0,this.#a=0,this.#o=Lr(()=>{this.#l(this.#e)}),this.#g>0){var t=this.#h=document.createDocumentFragment();h0(this.#o,t);const n=this.#t.pending;this.#s=Lr(()=>n(this.#e))}else this.#m(Ie)}catch(n){this.error(n)}}#m(t){this.is_pending=!1,t.transfer_effects(this.#c,this.#f)}defer_effect(t){Xd(t,this.#c,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#p(t){var n=Le,s=ye,o=cn;pr(this.#i),Tn(this.#i),Qa(this.#i.ctx);try{return zr.ensure(),t()}catch(l){return Yd(l),null}finally{pr(n),Tn(s),Qa(o)}}#T(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#T(t,n);return}this.#g+=t,this.#g===0&&(this.#m(n),this.#s&&Ua(this.#s,()=>{this.#s=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))}update_pending_count(t,n){this.#T(t,n),this.#a+=t,!(!this.#u||this.#d)&&(this.#d=!0,Ri(()=>{this.#d=!1,this.#u&&sg(this.#u,this.#a)}))}get_effect_pending(){return this.#_(),Ti(this.#u)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;Ie?.is_fork?(this.#o&&Ie.skip_effect(this.#o),this.#s&&Ie.skip_effect(this.#s),this.#r&&Ie.skip_effect(this.#r),Ie.on_fork_commit(()=>{this.#w(t)})):this.#w(t)}#w(t){this.#o&&(yn(this.#o),this.#o=null),this.#s&&(yn(this.#s),this.#s=null),this.#r&&(yn(this.#r),this.#r=null);var n=this.#t.onerror;let s=this.#t.failed;var o=!1,l=!1;const u=()=>{if(o){WC();return}o=!0,l&&FC(),this.#r!==null&&Ua(this.#r,()=>{this.#r=null}),this.#p(()=>{this.#y()})},f=h=>{try{l=!0,n?.(h,u),l=!1}catch(g){Ei(g,this.#i&&this.#i.parent)}s&&(this.#r=this.#p(()=>{try{return Lr(()=>{var g=Le;g.b=this,g.f|=Kl,s(this.#e,()=>h,()=>u)})}catch(g){return Ei(g,this.#i.parent),null}}))};Ri(()=>{var h;try{h=this.transform_error(t)}catch(g){Ei(g,this.#i&&this.#i.parent);return}h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(f,g=>Ei(g,this.#i&&this.#i.parent)):f(h)})}}function t0(r){var t=r.effects;if(t!==null){r.effects=null;for(var n=0;n<t.length;n+=1)yn(t[n])}}function yu(r){var t,n=Le,s=r.parent;if(!Kr&&s!==null&&(s.f&(or|Sn))!==0)return HC(),r.v;pr(s);try{r.f&=~qr,t0(r),t=_g(r)}finally{pr(n)}return t}function ng(r){var t=yu(r);if(!r.equals(t)&&(r.wv=pg(),(!Ie?.is_fork||r.deps===null)&&(Ie!==null?(Ie.capture(r,t,!0),jl?.capture(r,t,!0)):r.v=t,r.deps===null))){Fe(r,Ye);return}Kr||(an!==null?(Cu()||Ie?.is_fork)&&an.set(r,t):mu(r))}function n0(r){if(r.effects!==null)for(const t of r.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(vu),t.teardown=RC,t.ac=null,Ts(t,0),Tu(t))}function rg(r){if(r.effects!==null)for(const t of r.effects)t.teardown&&Mi(t)}let qa=new Set;const Wr=new Map;let ig=!1;function Eu(r,t){var n={f:0,v:r,reactions:null,equals:VC,rv:0,wv:0};return n}function er(r,t){const n=Eu(r);return d0(n),n}function Nr(r,t,n=!1){ye!==null&&(!on||(ye.f&Ba)!==0)&&Ya()&&(ye.f&(nt|sn|gs|Ba))!==0&&(qt===null||!Di.call(qt,r))&&kC();let s=n?os(t):t;return sg(r,s,Oa)}function sg(r,t,n=null){if(!r.equals(t)){Wr.set(r,Kr?t:r.v);var s=zr.ensure();if(s.capture(r,t),(r.f&nt)!==0){const o=r;(r.f&tt)!==0&&yu(o),an===null&&mu(o)}r.wv=pg(),ag(r,tt,n),Ya()&&Le!==null&&(Le.f&Ye)!==0&&(Le.f&(dr|gr))===0&&(Ht===null?g0([r]):Ht.push(r)),!s.is_fork&&qa.size>0&&!ig&&r0()}return t}function r0(){ig=!1;for(const r of qa){(r.f&Ye)!==0&&Fe(r,Cn);let t;try{t=Ls(r)}catch{t=!0}t&&Mi(r)}qa.clear()}function ps(r){Nr(r,r.v+1)}function ag(r,t,n){var s=r.reactions;if(s!==null)for(var o=Ya(),l=s.length,u=0;u<l;u++){var f=s[u],h=f.f;if(!(!o&&f===Le)){var g=(h&tt)===0;if(g&&Fe(f,t),(h&Ba)!==0)qa.add(f);else if((h&nt)!==0){var _=f;an?.delete(_),(h&qr)===0&&(h&Qt&&(Le===null||(Le.f&Ga)===0)&&(f.f|=qr),ag(_,Cn,n))}else if(g){var m=f;(h&sn)!==0&&$n!==null&&$n.add(m),n!==null?n.push(m):Su(m)}}}}function os(r){if(typeof r!="object"||r===null||xl in r)return r;const t=bC(r);if(t!==CC&&t!==TC)return r;var n=new Map,s=wC(r),o=er(0),l=Vr,u=f=>{if(Vr===l)return f();var h=ye,g=Vr;Tn(null),kh(l);var _=f();return Tn(h),kh(g),_};return s&&n.set("length",er(r.length)),new Proxy(r,{defineProperty(f,h,g){(!("value"in g)||g.configurable===!1||g.enumerable===!1||g.writable===!1)&&MC();var _=n.get(h);return _===void 0?u(()=>{var m=er(g.value);return n.set(h,m),m}):Nr(_,g.value,!0),!0},deleteProperty(f,h){var g=n.get(h);if(g===void 0){if(h in f){const _=u(()=>er(et));n.set(h,_),ps(o)}}else Nr(g,et),ps(o);return!0},get(f,h,g){if(h===xl)return r;var _=n.get(h),m=h in f;if(_===void 0&&(!m||ds(f,h)?.writable)&&(_=u(()=>{var E=os(m?f[h]:et),T=er(E);return T}),n.set(h,_)),_!==void 0){var w=Ti(_);return w===et?void 0:w}return Reflect.get(f,h,g)},getOwnPropertyDescriptor(f,h){var g=Reflect.getOwnPropertyDescriptor(f,h);if(g&&"value"in g){var _=n.get(h);_&&(g.value=Ti(_))}else if(g===void 0){var m=n.get(h),w=m?.v;if(m!==void 0&&w!==et)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return g},has(f,h){if(h===xl)return!0;var g=n.get(h),_=g!==void 0&&g.v!==et||Reflect.has(f,h);if(g!==void 0||Le!==null&&(!_||ds(f,h)?.writable)){g===void 0&&(g=u(()=>{var w=_?os(f[h]):et,E=er(w);return E}),n.set(h,g));var m=Ti(g);if(m===et)return!1}return _},set(f,h,g,_){var m=n.get(h),w=h in f;if(s&&h==="length")for(var E=g;E<m.v;E+=1){var T=n.get(E+"");T!==void 0?Nr(T,et):E in f&&(T=u(()=>er(et)),n.set(E+"",T))}if(m===void 0)(!w||ds(f,h)?.writable)&&(m=u(()=>er(void 0)),Nr(m,os(g)),n.set(h,m));else{w=m.v!==et;var R=u(()=>os(g));Nr(m,R)}var P=Reflect.getOwnPropertyDescriptor(f,h);if(P?.set&&P.set.call(_,g),!w){if(s&&typeof h=="string"){var D=n.get("length"),H=Number(h);Number.isInteger(H)&&H>=D.v&&Nr(D,H+1)}ps(o)}return!0},ownKeys(f){Ti(o);var h=Reflect.ownKeys(f).filter(m=>{var w=n.get(m);return w===void 0||w.v!==et});for(var[g,_]of n)_.v!==et&&!(g in f)&&h.push(g);return h},setPrototypeOf(){$C()}})}var Mh,og;function i0(){if(Mh===void 0){Mh=window;var r=Element.prototype,t=Node.prototype,n=Text.prototype;ds(t,"firstChild").get,og=ds(t,"nextSibling").get,Nh(r)&&(r[NC]=void 0,r[LC]=null,r[OC]=void 0,r.__e=void 0),Nh(n)&&(n[UC]=void 0)}}function lg(r=""){return document.createTextNode(r)}function ug(r){return og.call(r)}function cg(r){var t=ye,n=Le;Tn(null),pr(null);try{return r()}finally{Tn(t),pr(n)}}function s0(r,t){var n=t.last;n===null?t.last=t.first=r:(n.next=r,r.prev=n,t.last=r)}function xs(r,t){var n=Le;n!==null&&(n.f&Sn)!==0&&(r|=Sn);var s={ctx:cn,deps:null,nodes:null,f:r|tt|Qt,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Ie?.register_created_effect(s);var o=s;if((r&Es)!==0)Ci!==null?Ci.push(s):zr.ensure().schedule(s);else if(t!==null){try{Mi(s)}catch(u){throw yn(s),u}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&ja)===0&&(o=o.first,(r&sn)!==0&&(r&Va)!==0&&o!==null&&(o.f|=Va))}if(o!==null&&(o.parent=n,n!==null&&s0(o,n),ye!==null&&(ye.f&nt)!==0&&(r&gr)===0)){var l=ye;(l.effects??=[]).push(o)}return s}function Cu(){return ye!==null&&!on}function a0(r){return xs(Es|xC,r)}function o0(r){zr.ensure();const t=xs(gr|ja,r);return(n={})=>new Promise(s=>{n.outro?Ua(t,()=>{yn(t),s(void 0)}):(yn(t),s(void 0))})}function l0(r,t=0){return xs(Kd|t,r)}function u0(r,t=0){var n=xs(sn|t,r);return n}function Lr(r){return xs(dr|ja,r)}function fg(r){var t=r.teardown;if(t!==null){const n=Kr,s=ye;$h(!0),Tn(null);try{t.call(null)}finally{$h(n),Tn(s)}}}function Tu(r,t=!1){var n=r.first;for(r.first=r.last=null;n!==null;){const o=n.ac;o!==null&&cg(()=>{o.abort(vu)});var s=n.next;(n.f&gr)!==0?n.parent=null:yn(n,t),n=s}}function c0(r){for(var t=r.first;t!==null;){var n=t.next;(t.f&dr)===0&&yn(t),t=n}}function yn(r,t=!0){var n=!1;(t||(r.f&IC)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(f0(r.nodes.start,r.nodes.end),n=!0),Fe(r,Oh),Tu(r,t&&!n),Ts(r,0);var s=r.nodes&&r.nodes.t;if(s!==null)for(const l of s)l.stop();fg(r),r.f^=Oh,r.f|=or;var o=r.parent;o!==null&&o.first!==null&&hg(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=r.b=null}function f0(r,t){for(;r!==null;){var n=r===t?null:ug(r);r.remove(),r=n}}function hg(r){var t=r.parent,n=r.prev,s=r.next;n!==null&&(n.next=s),s!==null&&(s.prev=n),t!==null&&(t.first===r&&(t.first=s),t.last===r&&(t.last=n))}function Ua(r,t,n=!0){var s=[];dg(r,s,!0);var o=()=>{n&&yn(r),t&&t()},l=s.length;if(l>0){var u=()=>--l||o();for(var f of s)f.out(u)}else o()}function dg(r,t,n){if((r.f&Sn)===0){r.f^=Sn;var s=r.nodes&&r.nodes.t;if(s!==null)for(const f of s)(f.is_global||n)&&t.push(f);for(var o=r.first;o!==null;){var l=o.next;if((o.f&gr)===0){var u=(o.f&Va)!==0||(o.f&dr)!==0&&(r.f&sn)!==0;dg(o,t,u?n:!1)}o=l}}}function h0(r,t){if(r.nodes)for(var n=r.nodes.start,s=r.nodes.end;n!==null;){var o=n===s?null:ug(n);t.append(n),n=o}}let Da=!1,Kr=!1;function $h(r){Kr=r}let ye=null,on=!1;function Tn(r){ye=r}let Le=null;function pr(r){Le=r}let qt=null;function d0(r){ye!==null&&(qt===null?qt=[r]:qt.push(r))}let pt=null,Pt=0,Ht=null;function g0(r){Ht=r}let gg=1,Dr=0,Vr=Dr;function kh(r){Vr=r}function pg(){return++gg}function Ls(r){var t=r.f;if((t&tt)!==0)return!0;if(t&nt&&(r.f&=~qr),(t&Cn)!==0){for(var n=r.deps,s=n.length,o=0;o<s;o++){var l=n[o];if(Ls(l)&&ng(l),l.wv>r.wv)return!0}(t&Qt)!==0&&an===null&&Fe(r,Ye)}return!1}function vg(r,t,n=!0){var s=r.reactions;if(s!==null&&!(qt!==null&&Di.call(qt,r)))for(var o=0;o<s.length;o++){var l=s[o];(l.f&nt)!==0?vg(l,t,!1):t===l&&(n?Fe(l,tt):(l.f&Ye)!==0&&Fe(l,Cn),Su(l))}}function _g(r){var t=pt,n=Pt,s=Ht,o=ye,l=qt,u=cn,f=on,h=Vr,g=r.f;pt=null,Pt=0,Ht=null,ye=(g&(dr|gr))===0?r:null,qt=null,Qa(r.ctx),on=!1,Vr=++Dr,r.ac!==null&&(cg(()=>{r.ac.abort(vu)}),r.ac=null);try{r.f|=Ga;var _=r.fn,m=_();r.f|=Is;var w=r.deps,E=Ie?.is_fork;if(pt!==null){var T;if(E||Ts(r,Pt),w!==null&&Pt>0)for(w.length=Pt+pt.length,T=0;T<pt.length;T++)w[Pt+T]=pt[T];else r.deps=w=pt;if(Cu()&&(r.f&Qt)!==0)for(T=Pt;T<w.length;T++)(w[T].reactions??=[]).push(r)}else!E&&w!==null&&Pt<w.length&&(Ts(r,Pt),w.length=Pt);if(Ya()&&Ht!==null&&!on&&w!==null&&(r.f&(nt|Cn|tt))===0)for(T=0;T<Ht.length;T++)vg(Ht[T],r);if(o!==null&&o!==r){if(Dr++,o.deps!==null)for(let R=0;R<n;R+=1)o.deps[R].rv=Dr;if(t!==null)for(const R of t)R.rv=Dr;Ht!==null&&(s===null?s=Ht:s.push(...Ht))}return(r.f&Cs)!==0&&(r.f^=Cs),m}catch(R){return Yd(R)}finally{r.f^=Ga,pt=t,Pt=n,Ht=s,ye=o,qt=l,Qa(u),on=f,Vr=h}}function p0(r,t){let n=t.reactions;if(n!==null){var s=SC.call(n,r);if(s!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[s]=n[o],n.pop())}}if(n===null&&(t.f&nt)!==0&&(pt===null||!Di.call(pt,t))){var l=t;(l.f&Qt)!==0&&(l.f^=Qt,l.f&=~qr),l.v!==et&&mu(l),n0(l),Ts(l,0)}}function Ts(r,t){var n=r.deps;if(n!==null)for(var s=t;s<n.length;s++)p0(r,n[s])}function Mi(r){var t=r.f;if((t&or)===0){Fe(r,Ye);var n=Le,s=Da;Le=r,Da=!0;try{(t&(sn|jd))!==0?c0(r):Tu(r),fg(r);var o=_g(r);r.teardown=typeof o=="function"?o:null,r.wv=gg;var l;zd&&BC&&(r.f&tt)!==0&&r.deps}finally{Da=s,Le=n}}}function Ti(r){var t=r.f,n=(t&nt)!==0;if(ye!==null&&!on){var s=Le!==null&&(Le.f&or)!==0;if(!s&&(qt===null||!Di.call(qt,r))){var o=ye.deps;if((ye.f&Ga)!==0)r.rv<Dr&&(r.rv=Dr,pt===null&&o!==null&&o[Pt]===r?Pt++:pt===null?pt=[r]:pt.push(r));else{(ye.deps??=[]).push(r);var l=r.reactions;l===null?r.reactions=[ye]:Di.call(l,ye)||l.push(ye)}}}if(Kr&&Wr.has(r))return Wr.get(r);if(n){var u=r;if(Kr){var f=u.v;return((u.f&Ye)===0&&u.reactions!==null||wg(u))&&(f=yu(u)),Wr.set(u,f),f}var h=(u.f&Qt)===0&&!on&&ye!==null&&(Da||(ye.f&Qt)!==0),g=(u.f&Is)===0;Ls(u)&&(h&&(u.f|=Qt),ng(u)),h&&!g&&(rg(u),mg(u))}if(an?.has(r))return an.get(r);if((r.f&Cs)!==0)throw r.v;return r.v}function mg(r){if(r.f|=Qt,r.deps!==null)for(const t of r.deps)(t.reactions??=[]).push(r),(t.f&nt)!==0&&(t.f&Qt)===0&&(rg(t),mg(t))}function wg(r){if(r.v===et)return!0;if(r.deps===null)return!1;for(const t of r.deps)if(Wr.has(t)||(t.f&nt)!==0&&wg(t))return!0;return!1}function v0(r){var t=on;try{return on=!0,r()}finally{on=t}}const _0=["touchstart","touchmove"];function m0(r){return _0.includes(r)}const Pa=Symbol("events"),w0=new Set,Fh=new Set;let Hh=null;function Wh(r){var t=this,n=t.ownerDocument,s=r.type,o=r.composedPath?.()||[],l=o[0]||r.target;Hh=r;var u=0,f=Hh===r&&r[Pa];if(f){var h=o.indexOf(f);if(h!==-1&&(t===document||t===window)){r[Pa]=t;return}var g=o.indexOf(t);if(g===-1)return;h<=g&&(u=h)}if(l=o[u]||r.target,l!==t){EC(r,"currentTarget",{configurable:!0,get(){return l||n}});var _=ye,m=Le;Tn(null),pr(null);try{for(var w,E=[];l!==null;){var T=l.assignedSlot||l.parentNode||l.host||null;try{var R=l[Pa]?.[s];R!=null&&(!l.disabled||r.target===l)&&R.call(l,r)}catch(P){w?E.push(P):w=P}if(r.cancelBubble||T===t||T===null)break;l=T}if(w){for(let P of E)queueMicrotask(()=>{throw P});throw w}}finally{r[Pa]=t,delete r.currentTarget,Tn(_),pr(m)}}}function S0(r,t){return y0(r,t)}const Ia=new Map;function y0(r,{target:t,anchor:n,props:s={},events:o,context:l,intro:u=!0,transformError:f}){i0();var h=void 0,g=o0(()=>{var _=n??t.appendChild(lg());ZC(_,{pending:()=>{}},E=>{QC({});var T=cn;l&&(T.c=l),o&&(s.$$events=o),h=r(E,s)||{},qC()},f);var m=new Set,w=E=>{for(var T=0;T<E.length;T++){var R=E[T];if(!m.has(R)){m.add(R);var P=m0(R);for(const Z of[t,document]){var D=Ia.get(Z);D===void 0&&(D=new Map,Ia.set(Z,D));var H=D.get(R);H===void 0?(Z.addEventListener(R,Wh,{passive:P}),D.set(R,1)):D.set(R,H+1)}}}};return w(yC(w0)),Fh.add(w),()=>{for(var E of m)for(const P of[t,document]){var T=Ia.get(P),R=T.get(E);--R==0?(P.removeEventListener(E,Wh),T.delete(E),T.size===0&&Ia.delete(P)):T.set(E,R)}Fh.delete(w),_!==n&&_.parentNode?.removeChild(_)}});return E0.set(h,g),h}let E0=new WeakMap;const C0="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(C0);GC();function T0(r){}const Jl={init:r=>{j.get(Hr).enableRouting()},handlePageErrorHandler:(r,t,n)=>{r&&r.timeout&&setTimeout(()=>{if(r.viewUrl)t.viewUrl=r.viewUrl,n.getEngine()._ui.updateMainContent(t,n);else if(r.errorFn)r.errorFn(t);else{console.warn("Something went wrong with a client! You will be redirected to another page.");const s=r.redirectPath||"/";n.navigation().navigate(s)}},r.timeout)},handleExternalLinkNavigation:r=>{if(r.url)if(r.sameWindow||!1)window.location.href=r.url;else{const n=window.open(r.url,"_blank","noopener noreferrer");n&&(n.opener=null,n.focus())}},async addSearchParamsFromClient(r,t,n){const s=j.get(hr),o=U.getCurrentPath(n,n.getConfig().routing?.useHashRouting),u=(await s.getCurrentNode(o.path))?.clientPermissions?.urlParameters,f={...r};if(u){const h={};Object.keys(u).forEach(g=>{g in f&&u[g]?.write===!0&&(h[g]=f[g],delete f[g])});for(const g in f)console.warn(`No permission to add the search param "${g}" to the url`);Object.keys(h).length>0&&n.routing().addSearchParams(h,t)}}};class b0{static hasLocaleChangePermission(t){return t?.clientPermissions?.changeCurrentLocale?!0:(console.error('Current locale change declined from client, as client permission "changeCurrentLocale" is not set for this view.'),!1)}}const _n={luigi:{},init:r=>{_n.luigi=r},addListeners:(r,t)=>{r.addEventListener($.INITIALIZED,n=>{Qe.luigi?.ux().hideLoadingIndicator(r.parentNode);const s=j.get(Oi);s.viewGroupLoaded(r),!r._luigiPreloading&&r.style.display!=="none"&&s.preload()}),r.addEventListener($.NAVIGATION_COMPLETED_REPORT,()=>{j.get(Oi).preload()}),r.addEventListener($.NAVIGATION_REQUEST,n=>{const{drawer:s,link:o,intent:l,preserveView:u,modal:f,newTab:h,withoutSync:g,preventContextUpdate:_,preventHistoryEntry:m,fromVirtualTreeRoot:w,fromContext:E,fromClosestContext:T,fromParent:R,relative:P,nodeParams:D}=n.detail,H={drawerSettings:s,intent:l,modalSettings:f,newTab:h,path:o,preserveView:u,preventContextUpdate:_,options:{fromVirtualTreeRoot:w,fromContext:E,fromClosestContext:T,fromParent:R,relative:P,nodeParams:D},preventHistoryEntry:m,withoutSync:g};j.get(hr).handleNavigationRequest(H,n.callbackFn)}),r.addEventListener($.RUNTIME_ERROR_HANDLING_REQUEST,n=>{t.navigation().runTimeErrorHandler(n.payload?.data?.errorObj||{})}),r.addEventListener($.ALERT_REQUEST,n=>{Qe.processAlert(n.payload,!0,r)}),r.addEventListener($.SHOW_CONFIRMATION_MODAL_REQUEST,n=>{Qe.handleConfirmationModalRequest(n.payload,r)}),r.addEventListener($.SET_DOCUMENT_TITLE_REQUEST,n=>{_n.luigi.getEngine()._connector?.setDocumentTitle(n.detail.title)}),r.addEventListener($.SHOW_LOADING_INDICATOR_REQUEST,n=>{_n.luigi.getEngine()._connector?.showLoadingIndicator(r.parentNode)}),r.addEventListener($.HIDE_LOADING_INDICATOR_REQUEST,n=>{_n.luigi.getEngine()._connector?.hideLoadingIndicator(r.parentNode)}),r.addEventListener($.ADD_BACKDROP_REQUEST,n=>{_n.luigi.getEngine()._connector?.addBackdrop()}),r.addEventListener($.REMOVE_BACKDROP_REQUEST,n=>{_n.luigi.getEngine()._connector?.removeBackdrop()}),r.addEventListener($.SET_DIRTY_STATUS_REQUEST,n=>{Qe.handleDirtyStatusRequest(n.detail?.data?.dirty,r)}),r.addEventListener($.ADD_NODE_PARAMS_REQUEST,n=>{t.routing().addNodeParams(n.payload.data,n.payload.keepBrowserHistory)}),r.addEventListener($.OPEN_USER_SETTINGS_REQUEST,n=>{_n.luigi.getEngine()._connector?.openUserSettings(n.detail)}),r.addEventListener($.CLOSE_USER_SETTINGS_REQUEST,n=>{_n.luigi.getEngine()._connector?.closeUserSettings()}),r.addEventListener($.ADD_SEARCH_PARAMS_REQUEST,n=>{Jl.addSearchParamsFromClient(n.detail.data,n.detail.keepBrowserHistory,t)}),r.addEventListener($.UPDATE_MODAL_SETTINGS_REQUEST,n=>{G.updateModalSettings(n.payload.updatedModalSettings,n.payload.addHistoryEntry,t)}),r.addEventListener($.SET_CURRENT_LOCALE_REQUEST,n=>{b0.hasLocaleChangePermission(r)&&t.i18n().setCurrentLocale(n.detail?.data?.data?.currentLocale)})}};class R0{constructor(){this._ui=G,this._comm=_n,this._ux=Qe,this._routing=Jl}bootstrap(t){this._app=S0(T0,{target:document.body}),this._connector=t}init(){const t=window.Luigi;j.register(ln,()=>new ln(t)),j.register(hr,()=>new hr(t)),j.register(cr,()=>new cr),j.register(Hr,()=>new Hr(t)),j.register(Ui,()=>new Ui),j.register(fr,()=>new fr(t)),j.register(Oi,()=>new Oi(t)),t.theming()._init(),G.init(t),Jl.init(t),_n.init(t),Qe.init(t)}}window.Luigi=new mC(new R0);
55
95
  //# sourceMappingURL=luigi.js.map