@luigi-project/core-modular 0.0.7-dev.202604300104 → 0.0.7-dev.20260510109
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 +10 -10
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/services/auth-layer.service.d.ts +1 -0
package/luigi.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
class $v{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 ac(i){return i.$value}function ns(i){return new $v(i)}var Ki=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Br={exports:{}};var Dv=Br.exports,Fl;function Mv(){return Fl||(Fl=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`",_="__lodash_hash_undefined__",C=500,T="__lodash_placeholder__",E=1,y=2,A=4,x=1,$=2,H=1,re=2,Oe=4,Ie=8,Qe=16,xe=32,Ze=64,ye=128,be=256,ve=512,Re=30,D="...",Xt=800,wt=16,$e=1,En=2,N=3,ot=1/0,oe=9007199254740991,ke=17976931348623157e292,Zt=NaN,Lt=4294967295,Kc=Lt-1,Yc=Lt>>>1,Jc=[["ary",ye],["bind",H],["bindKey",re],["curry",Ie],["curryRight",Qe],["flip",ve],["partial",xe],["partialRight",Ze],["rearg",be]],Vn="[object Arguments]",ri="[object Array]",Xc="[object AsyncFunction]",Er="[object Boolean]",Cr="[object Date]",Zc="[object DOMException]",ii="[object Error]",si="[object Function]",io="[object GeneratorFunction]",St="[object Map]",Tr="[object Number]",jc="[object Null]",kt="[object Object]",so="[object Promise]",eh="[object Proxy]",yr="[object RegExp]",Et="[object Set]",br="[object String]",ai="[object Symbol]",th="[object Undefined]",Rr="[object WeakMap]",nh="[object WeakSet]",Ar="[object ArrayBuffer]",Bn="[object DataView]",cs="[object Float32Array]",hs="[object Float64Array]",fs="[object Int8Array]",ds="[object Int16Array]",gs="[object Int32Array]",ps="[object Uint8Array]",_s="[object Uint8ClampedArray]",ms="[object Uint16Array]",vs="[object Uint32Array]",rh=/\b__p \+= '';/g,ih=/\b(__p \+=) '' \+/g,sh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ao=/&(?:amp|lt|gt|quot|#39);/g,oo=/[&<>"']/g,ah=RegExp(ao.source),oh=RegExp(oo.source),uh=/<%-([\s\S]+?)%>/g,lh=/<%([\s\S]+?)%>/g,uo=/<%=([\s\S]+?)%>/g,ch=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hh=/^\w*$/,fh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ws=/[\\^$.*+?()[\]{}|]/g,dh=RegExp(ws.source),Ss=/^\s+/,gh=/\s/,ph=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_h=/\{\n\/\* \[wrapped with (.+)\] \*/,mh=/,? & /,vh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lo=/[()=,{}\[\]\/\s]/,wh=/\\(\\)?/g,Sh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,co=/\w*$/,Eh=/^[-+]0x[0-9a-f]+$/i,Ch=/^0b[01]+$/i,Th=/^\[object .+?Constructor\]$/,yh=/^0o[0-7]+$/i,bh=/^(?:0|[1-9]\d*)$/,Rh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Ah=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",Ph="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",xh="\\u20d0-\\u20ff",ho=Ph+Ih+xh,fo="\\u2700-\\u27bf",go="a-z\\xdf-\\xf6\\xf8-\\xff",Lh="\\xac\\xb1\\xd7\\xf7",Nh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Uh="\\u2000-\\u206f",Oh=" \\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",po="A-Z\\xc0-\\xd6\\xd8-\\xde",_o="\\ufe0e\\ufe0f",mo=Lh+Nh+Uh+Oh,Es="['’]",$h="["+ui+"]",vo="["+mo+"]",li="["+ho+"]",wo="\\d+",Dh="["+fo+"]",So="["+go+"]",Eo="[^"+ui+mo+wo+fo+go+po+"]",Cs="\\ud83c[\\udffb-\\udfff]",Mh="(?:"+li+"|"+Cs+")",Co="[^"+ui+"]",Ts="(?:\\ud83c[\\udde6-\\uddff]){2}",ys="[\\ud800-\\udbff][\\udc00-\\udfff]",Gn="["+po+"]",To="\\u200d",yo="(?:"+So+"|"+Eo+")",Fh="(?:"+Gn+"|"+Eo+")",bo="(?:"+Es+"(?:d|ll|m|re|s|t|ve))?",Ro="(?:"+Es+"(?:D|LL|M|RE|S|T|VE))?",Ao=Mh+"?",Po="["+_o+"]?",kh="(?:"+To+"(?:"+[Co,Ts,ys].join("|")+")"+Po+Ao+")*",Hh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Io=Po+Ao+kh,Vh="(?:"+[Dh,Ts,ys].join("|")+")"+Io,Bh="(?:"+[Co+li+"?",li,Ts,ys,$h].join("|")+")",Gh=RegExp(Es,"g"),Qh=RegExp(li,"g"),bs=RegExp(Cs+"(?="+Cs+")|"+Bh+Io,"g"),qh=RegExp([Gn+"?"+So+"+"+bo+"(?="+[vo,Gn,"$"].join("|")+")",Fh+"+"+Ro+"(?="+[vo,Gn+yo,"$"].join("|")+")",Gn+"?"+yo+"+"+bo,Gn+"+"+Ro,Wh,Hh,wo,Vh].join("|"),"g"),zh=RegExp("["+To+ui+ho+_o+"]"),Kh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yh=["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"],Jh=-1,he={};he[cs]=he[hs]=he[fs]=he[ds]=he[gs]=he[ps]=he[_s]=he[ms]=he[vs]=!0,he[Vn]=he[ri]=he[Ar]=he[Er]=he[Bn]=he[Cr]=he[ii]=he[si]=he[St]=he[Tr]=he[kt]=he[yr]=he[Et]=he[br]=he[Rr]=!1;var ce={};ce[Vn]=ce[ri]=ce[Ar]=ce[Bn]=ce[Er]=ce[Cr]=ce[cs]=ce[hs]=ce[fs]=ce[ds]=ce[gs]=ce[St]=ce[Tr]=ce[kt]=ce[yr]=ce[Et]=ce[br]=ce[ai]=ce[ps]=ce[_s]=ce[ms]=ce[vs]=!0,ce[ii]=ce[si]=ce[Rr]=!1;var Xh={À:"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"},Zh={"&":"&","<":"<",">":">",'"':""","'":"'"},jh={"&":"&","<":"<",">":">",""":'"',"'":"'"},ef={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tf=parseFloat,nf=parseInt,xo=typeof Ki=="object"&&Ki&&Ki.Object===Object&&Ki,rf=typeof self=="object"&&self&&self.Object===Object&&self,Le=xo||rf||Function("return this")(),Rs=n&&!n.nodeType&&n,Cn=Rs&&!0&&i&&!i.nodeType&&i,Lo=Cn&&Cn.exports===Rs,As=Lo&&xo.process,ut=(function(){try{var w=Cn&&Cn.require&&Cn.require("util").types;return w||As&&As.binding&&As.binding("util")}catch{}})(),No=ut&&ut.isArrayBuffer,Uo=ut&&ut.isDate,Oo=ut&&ut.isMap,$o=ut&&ut.isRegExp,Do=ut&&ut.isSet,Mo=ut&&ut.isTypedArray;function je(w,R,b){switch(b.length){case 0:return w.call(R);case 1:return w.call(R,b[0]);case 2:return w.call(R,b[0],b[1]);case 3:return w.call(R,b[0],b[1],b[2])}return w.apply(R,b)}function sf(w,R,b,k){for(var Q=-1,ie=w==null?0:w.length;++Q<ie;){var Se=w[Q];R(k,Se,b(Se),w)}return k}function et(w,R){for(var b=-1,k=w==null?0:w.length;++b<k&&R(w[b],b,w)!==!1;);return w}function af(w,R){for(var b=w==null?0:w.length;b--&&R(w[b],b,w)!==!1;);return w}function Fo(w,R){for(var b=-1,k=w==null?0:w.length;++b<k;)if(!R(w[b],b,w))return!1;return!0}function jt(w,R){for(var b=-1,k=w==null?0:w.length,Q=0,ie=[];++b<k;){var Se=w[b];R(Se,b,w)&&(ie[Q++]=Se)}return ie}function ci(w,R){var b=w==null?0:w.length;return!!b&&Qn(w,R,0)>-1}function Ps(w,R,b){for(var k=-1,Q=w==null?0:w.length;++k<Q;)if(b(R,w[k]))return!0;return!1}function fe(w,R){for(var b=-1,k=w==null?0:w.length,Q=Array(k);++b<k;)Q[b]=R(w[b],b,w);return Q}function en(w,R){for(var b=-1,k=R.length,Q=w.length;++b<k;)w[Q+b]=R[b];return w}function Is(w,R,b,k){var Q=-1,ie=w==null?0:w.length;for(k&&ie&&(b=w[++Q]);++Q<ie;)b=R(b,w[Q],Q,w);return b}function of(w,R,b,k){var Q=w==null?0:w.length;for(k&&Q&&(b=w[--Q]);Q--;)b=R(b,w[Q],Q,w);return b}function xs(w,R){for(var b=-1,k=w==null?0:w.length;++b<k;)if(R(w[b],b,w))return!0;return!1}var uf=Ls("length");function lf(w){return w.split("")}function cf(w){return w.match(vh)||[]}function ko(w,R,b){var k;return b(w,function(Q,ie,Se){if(R(Q,ie,Se))return k=ie,!1}),k}function hi(w,R,b,k){for(var Q=w.length,ie=b+(k?1:-1);k?ie--:++ie<Q;)if(R(w[ie],ie,w))return ie;return-1}function Qn(w,R,b){return R===R?Cf(w,R,b):hi(w,Ho,b)}function hf(w,R,b,k){for(var Q=b-1,ie=w.length;++Q<ie;)if(k(w[Q],R))return Q;return-1}function Ho(w){return w!==w}function Wo(w,R){var b=w==null?0:w.length;return b?Us(w,R)/b:Zt}function Ls(w){return function(R){return R==null?r:R[w]}}function Ns(w){return function(R){return w==null?r:w[R]}}function Vo(w,R,b,k,Q){return Q(w,function(ie,Se,le){b=k?(k=!1,ie):R(b,ie,Se,le)}),b}function ff(w,R){var b=w.length;for(w.sort(R);b--;)w[b]=w[b].value;return w}function Us(w,R){for(var b,k=-1,Q=w.length;++k<Q;){var ie=R(w[k]);ie!==r&&(b=b===r?ie:b+ie)}return b}function Os(w,R){for(var b=-1,k=Array(w);++b<w;)k[b]=R(b);return k}function df(w,R){return fe(R,function(b){return[b,w[b]]})}function Bo(w){return w&&w.slice(0,zo(w)+1).replace(Ss,"")}function tt(w){return function(R){return w(R)}}function $s(w,R){return fe(R,function(b){return w[b]})}function Pr(w,R){return w.has(R)}function Go(w,R){for(var b=-1,k=w.length;++b<k&&Qn(R,w[b],0)>-1;);return b}function Qo(w,R){for(var b=w.length;b--&&Qn(R,w[b],0)>-1;);return b}function gf(w,R){for(var b=w.length,k=0;b--;)w[b]===R&&++k;return k}var pf=Ns(Xh),_f=Ns(Zh);function mf(w){return"\\"+ef[w]}function vf(w,R){return w==null?r:w[R]}function qn(w){return zh.test(w)}function wf(w){return Kh.test(w)}function Sf(w){for(var R,b=[];!(R=w.next()).done;)b.push(R.value);return b}function Ds(w){var R=-1,b=Array(w.size);return w.forEach(function(k,Q){b[++R]=[Q,k]}),b}function qo(w,R){return function(b){return w(R(b))}}function tn(w,R){for(var b=-1,k=w.length,Q=0,ie=[];++b<k;){var Se=w[b];(Se===R||Se===T)&&(w[b]=T,ie[Q++]=b)}return ie}function fi(w){var R=-1,b=Array(w.size);return w.forEach(function(k){b[++R]=k}),b}function Ef(w){var R=-1,b=Array(w.size);return w.forEach(function(k){b[++R]=[k,k]}),b}function Cf(w,R,b){for(var k=b-1,Q=w.length;++k<Q;)if(w[k]===R)return k;return-1}function Tf(w,R,b){for(var k=b+1;k--;)if(w[k]===R)return k;return k}function zn(w){return qn(w)?bf(w):uf(w)}function Ct(w){return qn(w)?Rf(w):lf(w)}function zo(w){for(var R=w.length;R--&&gh.test(w.charAt(R)););return R}var yf=Ns(jh);function bf(w){for(var R=bs.lastIndex=0;bs.test(w);)++R;return R}function Rf(w){return w.match(bs)||[]}function Af(w){return w.match(qh)||[]}var Pf=(function w(R){R=R==null?Le:Kn.defaults(Le.Object(),R,Kn.pick(Le,Yh));var b=R.Array,k=R.Date,Q=R.Error,ie=R.Function,Se=R.Math,le=R.Object,Ms=R.RegExp,If=R.String,lt=R.TypeError,di=b.prototype,xf=ie.prototype,Yn=le.prototype,gi=R["__core-js_shared__"],pi=xf.toString,se=Yn.hasOwnProperty,Lf=0,Ko=(function(){var e=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),_i=Yn.toString,Nf=pi.call(le),Uf=Le._,Of=Ms("^"+pi.call(se).replace(ws,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mi=Lo?R.Buffer:r,nn=R.Symbol,vi=R.Uint8Array,Yo=mi?mi.allocUnsafe:r,wi=qo(le.getPrototypeOf,le),Jo=le.create,Xo=Yn.propertyIsEnumerable,Si=di.splice,Zo=nn?nn.isConcatSpreadable:r,Ir=nn?nn.iterator:r,Tn=nn?nn.toStringTag:r,Ei=(function(){try{var e=Pn(le,"defineProperty");return e({},"",{}),e}catch{}})(),$f=R.clearTimeout!==Le.clearTimeout&&R.clearTimeout,Df=k&&k.now!==Le.Date.now&&k.now,Mf=R.setTimeout!==Le.setTimeout&&R.setTimeout,Ci=Se.ceil,Ti=Se.floor,Fs=le.getOwnPropertySymbols,Ff=mi?mi.isBuffer:r,jo=R.isFinite,kf=di.join,Hf=qo(le.keys,le),Ee=Se.max,De=Se.min,Wf=k.now,Vf=R.parseInt,eu=Se.random,Bf=di.reverse,ks=Pn(R,"DataView"),xr=Pn(R,"Map"),Hs=Pn(R,"Promise"),Jn=Pn(R,"Set"),Lr=Pn(R,"WeakMap"),Nr=Pn(le,"create"),yi=Lr&&new Lr,Xn={},Gf=In(ks),Qf=In(xr),qf=In(Hs),zf=In(Jn),Kf=In(Lr),bi=nn?nn.prototype:r,Ur=bi?bi.valueOf:r,tu=bi?bi.toString:r;function d(e){if(ge(e)&&!z(e)&&!(e instanceof ee)){if(e instanceof ct)return e;if(se.call(e,"__wrapped__"))return nl(e)}return new ct(e)}var Zn=(function(){function e(){}return function(t){if(!de(t))return{};if(Jo)return Jo(t);e.prototype=t;var s=new e;return e.prototype=r,s}})();function Ri(){}function ct(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}d.templateSettings={escape:uh,evaluate:lh,interpolate:uo,variable:"",imports:{_:d}},d.prototype=Ri.prototype,d.prototype.constructor=d,ct.prototype=Zn(Ri.prototype),ct.prototype.constructor=ct;function ee(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Lt,this.__views__=[]}function Yf(){var e=new ee(this.__wrapped__);return e.__actions__=qe(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=qe(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=qe(this.__views__),e}function Jf(){if(this.__filtered__){var e=new ee(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Xf(){var e=this.__wrapped__.value(),t=this.__dir__,s=z(e),u=t<0,h=s?e.length:0,g=lg(0,h,this.__views__),m=g.start,v=g.end,S=v-m,P=u?v:m-1,I=this.__iteratees__,L=I.length,M=0,W=De(S,this.__takeCount__);if(!s||!u&&h==S&&W==S)return bu(e,this.__actions__);var G=[];e:for(;S--&&M<W;){P+=t;for(var Y=-1,V=e[P];++Y<L;){var Z=I[Y],te=Z.iteratee,it=Z.type,Ve=te(V);if(it==En)V=Ve;else if(!Ve){if(it==$e)continue e;break e}}G[M++]=V}return G}ee.prototype=Zn(Ri.prototype),ee.prototype.constructor=ee;function yn(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 Zf(){this.__data__=Nr?Nr(null):{},this.size=0}function jf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ed(e){var t=this.__data__;if(Nr){var s=t[e];return s===_?r:s}return se.call(t,e)?t[e]:r}function td(e){var t=this.__data__;return Nr?t[e]!==r:se.call(t,e)}function nd(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Nr&&t===r?_:t,this}yn.prototype.clear=Zf,yn.prototype.delete=jf,yn.prototype.get=ed,yn.prototype.has=td,yn.prototype.set=nd;function Ht(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 rd(){this.__data__=[],this.size=0}function id(e){var t=this.__data__,s=Ai(t,e);if(s<0)return!1;var u=t.length-1;return s==u?t.pop():Si.call(t,s,1),--this.size,!0}function sd(e){var t=this.__data__,s=Ai(t,e);return s<0?r:t[s][1]}function ad(e){return Ai(this.__data__,e)>-1}function od(e,t){var s=this.__data__,u=Ai(s,e);return u<0?(++this.size,s.push([e,t])):s[u][1]=t,this}Ht.prototype.clear=rd,Ht.prototype.delete=id,Ht.prototype.get=sd,Ht.prototype.has=ad,Ht.prototype.set=od;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 ud(){this.size=0,this.__data__={hash:new yn,map:new(xr||Ht),string:new yn}}function ld(e){var t=ki(this,e).delete(e);return this.size-=t?1:0,t}function cd(e){return ki(this,e).get(e)}function hd(e){return ki(this,e).has(e)}function fd(e,t){var s=ki(this,e),u=s.size;return s.set(e,t),this.size+=s.size==u?0:1,this}Wt.prototype.clear=ud,Wt.prototype.delete=ld,Wt.prototype.get=cd,Wt.prototype.has=hd,Wt.prototype.set=fd;function bn(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Wt;++t<s;)this.add(e[t])}function dd(e){return this.__data__.set(e,_),this}function gd(e){return this.__data__.has(e)}bn.prototype.add=bn.prototype.push=dd,bn.prototype.has=gd;function Tt(e){var t=this.__data__=new Ht(e);this.size=t.size}function pd(){this.__data__=new Ht,this.size=0}function _d(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function md(e){return this.__data__.get(e)}function vd(e){return this.__data__.has(e)}function wd(e,t){var s=this.__data__;if(s instanceof Ht){var u=s.__data__;if(!xr||u.length<o-1)return u.push([e,t]),this.size=++s.size,this;s=this.__data__=new Wt(u)}return s.set(e,t),this.size=s.size,this}Tt.prototype.clear=pd,Tt.prototype.delete=_d,Tt.prototype.get=md,Tt.prototype.has=vd,Tt.prototype.set=wd;function nu(e,t){var s=z(e),u=!s&&xn(e),h=!s&&!u&&un(e),g=!s&&!u&&!h&&nr(e),m=s||u||h||g,v=m?Os(e.length,If):[],S=v.length;for(var P in e)(t||se.call(e,P))&&!(m&&(P=="length"||h&&(P=="offset"||P=="parent")||g&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||Gt(P,S)))&&v.push(P);return v}function ru(e){var t=e.length;return t?e[Xs(0,t-1)]:r}function Sd(e,t){return Hi(qe(e),Rn(t,0,e.length))}function Ed(e){return Hi(qe(e))}function Ws(e,t,s){(s!==r&&!bt(e[t],s)||s===r&&!(t in e))&&Nt(e,t,s)}function Or(e,t,s){var u=e[t];(!(se.call(e,t)&&bt(u,s))||s===r&&!(t in e))&&Nt(e,t,s)}function Ai(e,t){for(var s=e.length;s--;)if(bt(e[s][0],t))return s;return-1}function Cd(e,t,s,u){return rn(e,function(h,g,m){t(u,h,s(h),m)}),u}function iu(e,t){return e&&Ot(t,Ae(t),e)}function Td(e,t){return e&&Ot(t,Ke(t),e)}function Nt(e,t,s){t=="__proto__"&&Ei?Ei(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function Vs(e,t){for(var s=-1,u=t.length,h=b(u),g=e==null;++s<u;)h[s]=g?r:Ta(e,t[s]);return h}function Rn(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 m,v=t&E,S=t&y,P=t&A;if(s&&(m=h?s(e,u,h,g):s(e)),m!==r)return m;if(!de(e))return e;var I=z(e);if(I){if(m=hg(e),!v)return qe(e,m)}else{var L=Me(e),M=L==si||L==io;if(un(e))return Pu(e,v);if(L==kt||L==Vn||M&&!h){if(m=S||M?{}:zu(e),!v)return S?eg(e,Td(m,e)):jd(e,iu(m,e))}else{if(!ce[L])return h?e:{};m=fg(e,L,v)}}g||(g=new Tt);var W=g.get(e);if(W)return W;g.set(e,m),Cl(e)?e.forEach(function(V){m.add(ht(V,t,s,V,e,g))}):Sl(e)&&e.forEach(function(V,Z){m.set(Z,ht(V,t,s,Z,e,g))});var G=P?S?ua:oa:S?Ke:Ae,Y=I?r:G(e);return et(Y||e,function(V,Z){Y&&(Z=V,V=e[Z]),Or(m,Z,ht(V,t,s,Z,e,g))}),m}function yd(e){var t=Ae(e);return function(s){return su(s,e,t)}}function su(e,t,s){var u=s.length;if(e==null)return!u;for(e=le(e);u--;){var h=s[u],g=t[h],m=e[h];if(m===r&&!(h in e)||!g(m))return!1}return!0}function au(e,t,s){if(typeof e!="function")throw new lt(l);return Wr(function(){e.apply(r,s)},t)}function $r(e,t,s,u){var h=-1,g=ci,m=!0,v=e.length,S=[],P=t.length;if(!v)return S;s&&(t=fe(t,tt(s))),u?(g=Ps,m=!1):t.length>=o&&(g=Pr,m=!1,t=new bn(t));e:for(;++h<v;){var I=e[h],L=s==null?I:s(I);if(I=u||I!==0?I:0,m&&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 rn=Uu(Ut),ou=Uu(Gs,!0);function bd(e,t){var s=!0;return rn(e,function(u,h,g){return s=!!t(u,h,g),s}),s}function Pi(e,t,s){for(var u=-1,h=e.length;++u<h;){var g=e[u],m=t(g);if(m!=null&&(v===r?m===m&&!rt(m):s(m,v)))var v=m,S=g}return S}function Rd(e,t,s,u){var h=e.length;for(s=K(s),s<0&&(s=-s>h?0:h+s),u=u===r||u>h?h:K(u),u<0&&(u+=h),u=s>u?0:yl(u);s<u;)e[s++]=t;return e}function uu(e,t){var s=[];return rn(e,function(u,h,g){t(u,h,g)&&s.push(u)}),s}function Ne(e,t,s,u,h){var g=-1,m=e.length;for(s||(s=gg),h||(h=[]);++g<m;){var v=e[g];t>0&&s(v)?t>1?Ne(v,t-1,s,u,h):en(h,v):u||(h[h.length]=v)}return h}var Bs=Ou(),lu=Ou(!0);function Ut(e,t){return e&&Bs(e,t,Ae)}function Gs(e,t){return e&&lu(e,t,Ae)}function Ii(e,t){return jt(t,function(s){return Qt(e[s])})}function An(e,t){t=an(t,e);for(var s=0,u=t.length;e!=null&&s<u;)e=e[yt(t[s++])];return s&&s==u?e:r}function cu(e,t,s){var u=t(e);return z(e)?u:en(u,s(e))}function He(e){return e==null?e===r?th:jc:Tn&&Tn in le(e)?ug(e):Eg(e)}function Qs(e,t){return e>t}function Ad(e,t){return e!=null&&se.call(e,t)}function Pd(e,t){return e!=null&&t in le(e)}function Id(e,t,s){return e>=De(t,s)&&e<Ee(t,s)}function qs(e,t,s){for(var u=s?Ps:ci,h=e[0].length,g=e.length,m=g,v=b(g),S=1/0,P=[];m--;){var I=e[m];m&&t&&(I=fe(I,tt(t))),S=De(I.length,S),v[m]=!s&&(t||h>=120&&I.length>=120)?new bn(m&&I):r}I=e[0];var L=-1,M=v[0];e:for(;++L<h&&P.length<S;){var W=I[L],G=t?t(W):W;if(W=s||W!==0?W:0,!(M?Pr(M,G):u(P,G,s))){for(m=g;--m;){var Y=v[m];if(!(Y?Pr(Y,G):u(e[m],G,s)))continue e}M&&M.push(G),P.push(W)}}return P}function xd(e,t,s,u){return Ut(e,function(h,g,m){t(u,s(h),g,m)}),u}function Dr(e,t,s){t=an(t,e),e=Xu(e,t);var u=e==null?e:e[yt(dt(t))];return u==null?r:je(u,e,s)}function hu(e){return ge(e)&&He(e)==Vn}function Ld(e){return ge(e)&&He(e)==Ar}function Nd(e){return ge(e)&&He(e)==Cr}function Mr(e,t,s,u,h){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Ud(e,t,s,u,Mr,h)}function Ud(e,t,s,u,h,g){var m=z(e),v=z(t),S=m?ri:Me(e),P=v?ri:Me(t);S=S==Vn?kt:S,P=P==Vn?kt:P;var I=S==kt,L=P==kt,M=S==P;if(M&&un(e)){if(!un(t))return!1;m=!0,I=!1}if(M&&!I)return g||(g=new Tt),m||nr(e)?Gu(e,t,s,u,h,g):ag(e,t,S,s,u,h,g);if(!(s&x)){var W=I&&se.call(e,"__wrapped__"),G=L&&se.call(t,"__wrapped__");if(W||G){var Y=W?e.value():e,V=G?t.value():t;return g||(g=new Tt),h(Y,V,s,u,g)}}return M?(g||(g=new Tt),og(e,t,s,u,h,g)):!1}function Od(e){return ge(e)&&Me(e)==St}function zs(e,t,s,u){var h=s.length,g=h,m=!u;if(e==null)return!g;for(e=le(e);h--;){var v=s[h];if(m&&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(m&&v[2]){if(P===r&&!(S in e))return!1}else{var L=new Tt;if(u)var M=u(P,I,S,e,t,L);if(!(M===r?Mr(I,P,x|$,u,L):M))return!1}}return!0}function fu(e){if(!de(e)||_g(e))return!1;var t=Qt(e)?Of:Th;return t.test(In(e))}function $d(e){return ge(e)&&He(e)==yr}function Dd(e){return ge(e)&&Me(e)==Et}function Md(e){return ge(e)&&qi(e.length)&&!!he[He(e)]}function du(e){return typeof e=="function"?e:e==null?Ye:typeof e=="object"?z(e)?_u(e[0],e[1]):pu(e):Dl(e)}function Ks(e){if(!Hr(e))return Hf(e);var t=[];for(var s in le(e))se.call(e,s)&&s!="constructor"&&t.push(s);return t}function Fd(e){if(!de(e))return Sg(e);var t=Hr(e),s=[];for(var u in e)u=="constructor"&&(t||!se.call(e,u))||s.push(u);return s}function Ys(e,t){return e<t}function gu(e,t){var s=-1,u=ze(e)?b(e.length):[];return rn(e,function(h,g,m){u[++s]=t(h,g,m)}),u}function pu(e){var t=ca(e);return t.length==1&&t[0][2]?Yu(t[0][0],t[0][1]):function(s){return s===e||zs(s,e,t)}}function _u(e,t){return fa(e)&&Ku(t)?Yu(yt(e),t):function(s){var u=Ta(s,e);return u===r&&u===t?ya(s,e):Mr(t,u,x|$)}}function xi(e,t,s,u,h){e!==t&&Bs(t,function(g,m){if(h||(h=new Tt),de(g))kd(e,t,m,s,xi,u,h);else{var v=u?u(ga(e,m),g,m+"",e,t,h):r;v===r&&(v=g),Ws(e,m,v)}},Ke)}function kd(e,t,s,u,h,g,m){var v=ga(e,s),S=ga(t,s),P=m.get(S);if(P){Ws(e,s,P);return}var I=g?g(v,S,s+"",e,t,m):r,L=I===r;if(L){var M=z(S),W=!M&&un(S),G=!M&&!W&&nr(S);I=S,M||W||G?z(v)?I=v:_e(v)?I=qe(v):W?(L=!1,I=Pu(S,!0)):G?(L=!1,I=Iu(S,!0)):I=[]:Vr(S)||xn(S)?(I=v,xn(v)?I=bl(v):(!de(v)||Qt(v))&&(I=zu(S))):L=!1}L&&(m.set(S,I),h(I,S,u,g,m),m.delete(S)),Ws(e,s,I)}function mu(e,t){var s=e.length;if(s)return t+=t<0?s:0,Gt(t,s)?e[t]:r}function vu(e,t,s){t.length?t=fe(t,function(g){return z(g)?function(m){return An(m,g.length===1?g[0]:g)}:g}):t=[Ye];var u=-1;t=fe(t,tt(B()));var h=gu(e,function(g,m,v){var S=fe(t,function(P){return P(g)});return{criteria:S,index:++u,value:g}});return ff(h,function(g,m){return Zd(g,m,s)})}function Hd(e,t){return wu(e,t,function(s,u){return ya(e,u)})}function wu(e,t,s){for(var u=-1,h=t.length,g={};++u<h;){var m=t[u],v=An(e,m);s(v,m)&&Fr(g,an(m,e),v)}return g}function Wd(e){return function(t){return An(t,e)}}function Js(e,t,s,u){var h=u?hf:Qn,g=-1,m=t.length,v=e;for(e===t&&(t=qe(t)),s&&(v=fe(e,tt(s)));++g<m;)for(var S=0,P=t[g],I=s?s(P):P;(S=h(v,I,S,u))>-1;)v!==e&&Si.call(v,S,1),Si.call(e,S,1);return e}function Su(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;Gt(h)?Si.call(e,h,1):ea(e,h)}}return e}function Xs(e,t){return e+Ti(eu()*(t-e+1))}function Vd(e,t,s,u){for(var h=-1,g=Ee(Ci((t-e)/(s||1)),0),m=b(g);g--;)m[u?g:++h]=e,e+=s;return m}function Zs(e,t){var s="";if(!e||t<1||t>oe)return s;do t%2&&(s+=e),t=Ti(t/2),t&&(e+=e);while(t);return s}function J(e,t){return pa(Ju(e,t,Ye),e+"")}function Bd(e){return ru(rr(e))}function Gd(e,t){var s=rr(e);return Hi(s,Rn(t,0,s.length))}function Fr(e,t,s,u){if(!de(e))return e;t=an(t,e);for(var h=-1,g=t.length,m=g-1,v=e;v!=null&&++h<g;){var S=yt(t[h]),P=s;if(S==="__proto__"||S==="constructor"||S==="prototype")return e;if(h!=m){var I=v[S];P=u?u(I,S,v):r,P===r&&(P=de(I)?I:Gt(t[h+1])?[]:{})}Or(v,S,P),v=v[S]}return e}var Eu=yi?function(e,t){return yi.set(e,t),e}:Ye,Qd=Ei?function(e,t){return Ei(e,"toString",{configurable:!0,enumerable:!1,value:Ra(t),writable:!0})}:Ye;function qd(e){return Hi(rr(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=b(h);++u<h;)g[u]=e[u+t];return g}function zd(e,t){var s;return rn(e,function(u,h,g){return s=t(u,h,g),!s}),!!s}function Li(e,t,s){var u=0,h=e==null?u:e.length;if(typeof t=="number"&&t===t&&h<=Yc){for(;u<h;){var g=u+h>>>1,m=e[g];m!==null&&!rt(m)&&(s?m<=t:m<t)?u=g+1:h=g}return h}return js(e,t,Ye,s)}function js(e,t,s,u){var h=0,g=e==null?0:e.length;if(g===0)return 0;t=s(t);for(var m=t!==t,v=t===null,S=rt(t),P=t===r;h<g;){var I=Ti((h+g)/2),L=s(e[I]),M=L!==r,W=L===null,G=L===L,Y=rt(L);if(m)var V=u||G;else P?V=G&&(u||M):v?V=G&&M&&(u||!W):S?V=G&&M&&!W&&(u||!Y):W||Y?V=!1:V=u?L<=t:L<t;V?h=I+1:g=I}return De(g,Kc)}function Cu(e,t){for(var s=-1,u=e.length,h=0,g=[];++s<u;){var m=e[s],v=t?t(m):m;if(!s||!bt(v,S)){var S=v;g[h++]=m===0?0:m}}return g}function Tu(e){return typeof e=="number"?e:rt(e)?Zt:+e}function nt(e){if(typeof e=="string")return e;if(z(e))return fe(e,nt)+"";if(rt(e))return tu?tu.call(e):"";var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function sn(e,t,s){var u=-1,h=ci,g=e.length,m=!0,v=[],S=v;if(s)m=!1,h=Ps;else if(g>=o){var P=t?null:ig(e);if(P)return fi(P);m=!1,h=Pr,S=new bn}else S=t?[]:v;e:for(;++u<g;){var I=e[u],L=t?t(I):I;if(I=s||I!==0?I:0,m&&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 ea(e,t){t=an(t,e);var s=-1,u=t.length;if(!u)return!0;for(;++s<u;){var h=yt(t[s]);if(h==="__proto__"&&!se.call(e,"__proto__")||(h==="constructor"||h==="prototype")&&s<u-1)return!1}var g=Xu(e,t);return g==null||delete g[yt(dt(t))]}function yu(e,t,s,u){return Fr(e,t,s(An(e,t)),u)}function Ni(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 bu(e,t){var s=e;return s instanceof ee&&(s=s.value()),Is(t,function(u,h){return h.func.apply(h.thisArg,en([u],h.args))},s)}function ta(e,t,s){var u=e.length;if(u<2)return u?sn(e[0]):[];for(var h=-1,g=b(u);++h<u;)for(var m=e[h],v=-1;++v<u;)v!=h&&(g[h]=$r(g[h]||m,e[v],t,s));return sn(Ne(g,1),t,s)}function Ru(e,t,s){for(var u=-1,h=e.length,g=t.length,m={};++u<h;){var v=u<g?t[u]:r;s(m,e[u],v)}return m}function na(e){return _e(e)?e:[]}function ra(e){return typeof e=="function"?e:Ye}function an(e,t){return z(e)?e:fa(e,t)?[e]:tl(ae(e))}var Kd=J;function on(e,t,s){var u=e.length;return s=s===r?u:s,!t&&s>=u?e:ft(e,t,s)}var Au=$f||function(e){return Le.clearTimeout(e)};function Pu(e,t){if(t)return e.slice();var s=e.length,u=Yo?Yo(s):new e.constructor(s);return e.copy(u),u}function ia(e){var t=new e.constructor(e.byteLength);return new vi(t).set(new vi(e)),t}function Yd(e,t){var s=t?ia(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Jd(e){var t=new e.constructor(e.source,co.exec(e));return t.lastIndex=e.lastIndex,t}function Xd(e){return Ur?le(Ur.call(e)):{}}function Iu(e,t){var s=t?ia(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function xu(e,t){if(e!==t){var s=e!==r,u=e===null,h=e===e,g=rt(e),m=t!==r,v=t===null,S=t===t,P=rt(t);if(!v&&!P&&!g&&e>t||g&&m&&S&&!v&&!P||u&&m&&S||!s&&S||!h)return 1;if(!u&&!g&&!P&&e<t||P&&s&&h&&!u&&!g||v&&s&&h||!m&&h||!S)return-1}return 0}function Zd(e,t,s){for(var u=-1,h=e.criteria,g=t.criteria,m=h.length,v=s.length;++u<m;){var S=xu(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 Lu(e,t,s,u){for(var h=-1,g=e.length,m=s.length,v=-1,S=t.length,P=Ee(g-m,0),I=b(S+P),L=!u;++v<S;)I[v]=t[v];for(;++h<m;)(L||h<g)&&(I[s[h]]=e[h]);for(;P--;)I[v++]=e[h++];return I}function Nu(e,t,s,u){for(var h=-1,g=e.length,m=-1,v=s.length,S=-1,P=t.length,I=Ee(g-v,0),L=b(I+P),M=!u;++h<I;)L[h]=e[h];for(var W=h;++S<P;)L[W+S]=t[S];for(;++m<v;)(M||h<g)&&(L[W+s[m]]=e[h++]);return L}function qe(e,t){var s=-1,u=e.length;for(t||(t=b(u));++s<u;)t[s]=e[s];return t}function Ot(e,t,s,u){var h=!s;s||(s={});for(var g=-1,m=t.length;++g<m;){var v=t[g],S=u?u(s[v],e[v],v,s,e):r;S===r&&(S=e[v]),h?Nt(s,v,S):Or(s,v,S)}return s}function jd(e,t){return Ot(e,ha(e),t)}function eg(e,t){return Ot(e,Qu(e),t)}function Ui(e,t){return function(s,u){var h=z(s)?sf:Cd,g=t?t():{};return h(s,e,B(u,2),g)}}function jn(e){return J(function(t,s){var u=-1,h=s.length,g=h>1?s[h-1]:r,m=h>2?s[2]:r;for(g=e.length>3&&typeof g=="function"?(h--,g):r,m&&We(s[0],s[1],m)&&(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 Uu(e,t){return function(s,u){if(s==null)return s;if(!ze(s))return e(s,u);for(var h=s.length,g=t?h:-1,m=le(s);(t?g--:++g<h)&&u(m[g],g,m)!==!1;);return s}}function Ou(e){return function(t,s,u){for(var h=-1,g=le(t),m=u(t),v=m.length;v--;){var S=m[e?v:++h];if(s(g[S],S,g)===!1)break}return t}}function tg(e,t,s){var u=t&H,h=kr(e);function g(){var m=this&&this!==Le&&this instanceof g?h:e;return m.apply(u?s:this,arguments)}return g}function $u(e){return function(t){t=ae(t);var s=qn(t)?Ct(t):r,u=s?s[0]:t.charAt(0),h=s?on(s,1).join(""):t.slice(1);return u[e]()+h}}function er(e){return function(t){return Is(Ol(Ul(t).replace(Gh,"")),e,"")}}function kr(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=Zn(e.prototype),u=e.apply(s,t);return de(u)?u:s}}function ng(e,t,s){var u=kr(e);function h(){for(var g=arguments.length,m=b(g),v=g,S=tr(h);v--;)m[v]=arguments[v];var P=g<3&&m[0]!==S&&m[g-1]!==S?[]:tn(m,S);if(g-=P.length,g<s)return Hu(e,t,Oi,h.placeholder,r,m,P,r,r,s-g);var I=this&&this!==Le&&this instanceof h?u:e;return je(I,this,m)}return h}function Du(e){return function(t,s,u){var h=le(t);if(!ze(t)){var g=B(s,3);t=Ae(t),s=function(v){return g(h[v],v,h)}}var m=e(t,s,u);return m>-1?h[g?t[m]:m]:r}}function Mu(e){return Bt(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&&!m&&Fi(g)=="wrapper")var m=new ct([],!0)}for(u=m?u:s;++u<s;){g=t[u];var v=Fi(g),S=v=="wrapper"?la(g):r;S&&da(S[0])&&S[1]==(ye|Ie|xe|be)&&!S[4].length&&S[9]==1?m=m[Fi(S[0])].apply(m,S[3]):m=g.length==1&&da(g)?m[v]():m.thru(g)}return function(){var P=arguments,I=P[0];if(m&&P.length==1&&z(I))return m.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 Oi(e,t,s,u,h,g,m,v,S,P){var I=t&ye,L=t&H,M=t&re,W=t&(Ie|Qe),G=t&ve,Y=M?r:kr(e);function V(){for(var Z=arguments.length,te=b(Z),it=Z;it--;)te[it]=arguments[it];if(W)var Ve=tr(V),st=gf(te,Ve);if(u&&(te=Lu(te,u,h,W)),g&&(te=Nu(te,g,m,W)),Z-=st,W&&Z<P){var me=tn(te,Ve);return Hu(e,t,Oi,V.placeholder,s,te,me,v,S,P-Z)}var Rt=L?s:this,zt=M?Rt[e]:e;return Z=te.length,v?te=Cg(te,v):G&&Z>1&&te.reverse(),I&&S<Z&&(te.length=S),this&&this!==Le&&this instanceof V&&(zt=Y||kr(zt)),zt.apply(Rt,te)}return V}function Fu(e,t){return function(s,u){return xd(s,e,t(u),{})}}function $i(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 sa(e){return Bt(function(t){return t=fe(t,tt(B())),J(function(s){var u=this;return e(t,function(h){return je(h,u,s)})})})}function Di(e,t){t=t===r?" ":nt(t);var s=t.length;if(s<2)return s?Zs(t,e):t;var u=Zs(t,Ci(e/zn(t)));return qn(t)?on(Ct(u),0,e).join(""):u.slice(0,e)}function rg(e,t,s,u){var h=t&H,g=kr(e);function m(){for(var v=-1,S=arguments.length,P=-1,I=u.length,L=b(I+S),M=this&&this!==Le&&this instanceof m?g:e;++P<I;)L[P]=u[P];for(;S--;)L[P++]=arguments[++v];return je(M,h?s:this,L)}return m}function ku(e){return function(t,s,u){return u&&typeof u!="number"&&We(t,s,u)&&(s=u=r),t=qt(t),s===r?(s=t,t=0):s=qt(s),u=u===r?t<s?1:-1:qt(u),Vd(t,s,u,e)}}function Mi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=gt(t),s=gt(s)),e(t,s)}}function Hu(e,t,s,u,h,g,m,v,S,P){var I=t&Ie,L=I?m:r,M=I?r:m,W=I?g:r,G=I?r:g;t|=I?xe:Ze,t&=~(I?Ze:xe),t&Oe||(t&=-4);var Y=[e,t,h,W,L,G,M,v,S,P],V=s.apply(r,Y);return da(e)&&Zu(V,Y),V.placeholder=u,ju(V,e,t)}function aa(e){var t=Se[e];return function(s,u){if(s=gt(s),u=u==null?0:De(K(u),292),u&&jo(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 ig=Jn&&1/fi(new Jn([,-0]))[1]==ot?function(e){return new Jn(e)}:Ia;function Wu(e){return function(t){var s=Me(t);return s==St?Ds(t):s==Et?Ef(t):df(t,e(t))}}function Vt(e,t,s,u,h,g,m,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),m=m===r?m:Ee(K(m),0),v=v===r?v:K(v),P-=h?h.length:0,t&Ze){var I=u,L=h;u=h=r}var M=S?r:la(e),W=[e,t,s,u,h,I,L,g,m,v];if(M&&wg(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:Ee(W[9]-P,0),!v&&t&(Ie|Qe)&&(t&=-25),!t||t==H)var G=tg(e,t,s);else t==Ie||t==Qe?G=ng(e,t,v):(t==xe||t==(H|xe))&&!h.length?G=rg(e,t,s,u):G=Oi.apply(r,W);var Y=M?Eu:Zu;return ju(Y(G,W),e,t)}function Vu(e,t,s,u){return e===r||bt(e,Yn[s])&&!se.call(u,s)?t:e}function Bu(e,t,s,u,h,g){return de(e)&&de(t)&&(g.set(t,e),xi(e,t,r,Bu,g),g.delete(t)),e}function sg(e){return Vr(e)?r:e}function Gu(e,t,s,u,h,g){var m=s&x,v=e.length,S=t.length;if(v!=S&&!(m&&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&$?new bn:r;for(g.set(e,t),g.set(t,e);++L<v;){var G=e[L],Y=t[L];if(u)var V=m?u(Y,G,L,t,e,g):u(G,Y,L,e,t,g);if(V!==r){if(V)continue;M=!1;break}if(W){if(!xs(t,function(Z,te){if(!Pr(W,te)&&(G===Z||h(G,Z,s,u,g)))return W.push(te)})){M=!1;break}}else if(!(G===Y||h(G,Y,s,u,g))){M=!1;break}}return g.delete(e),g.delete(t),M}function ag(e,t,s,u,h,g,m){switch(s){case Bn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ar:return!(e.byteLength!=t.byteLength||!g(new vi(e),new vi(t)));case Er:case Cr:case Tr:return bt(+e,+t);case ii:return e.name==t.name&&e.message==t.message;case yr:case br:return e==t+"";case St:var v=Ds;case Et:var S=u&x;if(v||(v=fi),e.size!=t.size&&!S)return!1;var P=m.get(e);if(P)return P==t;u|=$,m.set(e,t);var I=Gu(v(e),v(t),u,h,g,m);return m.delete(e),I;case ai:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}function og(e,t,s,u,h,g){var m=s&x,v=oa(e),S=v.length,P=oa(t),I=P.length;if(S!=I&&!m)return!1;for(var L=S;L--;){var M=v[L];if(!(m?M in t:se.call(t,M)))return!1}var W=g.get(e),G=g.get(t);if(W&&G)return W==t&&G==e;var Y=!0;g.set(e,t),g.set(t,e);for(var V=m;++L<S;){M=v[L];var Z=e[M],te=t[M];if(u)var it=m?u(te,Z,M,t,e,g):u(Z,te,M,e,t,g);if(!(it===r?Z===te||h(Z,te,s,u,g):it)){Y=!1;break}V||(V=M=="constructor")}if(Y&&!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)&&(Y=!1)}return g.delete(e),g.delete(t),Y}function Bt(e){return pa(Ju(e,r,sl),e+"")}function oa(e){return cu(e,Ae,ha)}function ua(e){return cu(e,Ke,Qu)}var la=yi?function(e){return yi.get(e)}:Ia;function Fi(e){for(var t=e.name+"",s=Xn[t],u=se.call(Xn,t)?s.length:0;u--;){var h=s[u],g=h.func;if(g==null||g==e)return h.name}return t}function tr(e){var t=se.call(d,"placeholder")?d:e;return t.placeholder}function B(){var e=d.iteratee||Aa;return e=e===Aa?du:e,arguments.length?e(arguments[0],arguments[1]):e}function ki(e,t){var s=e.__data__;return pg(t)?s[typeof t=="string"?"string":"hash"]:s.map}function ca(e){for(var t=Ae(e),s=t.length;s--;){var u=t[s],h=e[u];t[s]=[u,h,Ku(h)]}return t}function Pn(e,t){var s=vf(e,t);return fu(s)?s:r}function ug(e){var t=se.call(e,Tn),s=e[Tn];try{e[Tn]=r;var u=!0}catch{}var h=_i.call(e);return u&&(t?e[Tn]=s:delete e[Tn]),h}var ha=Fs?function(e){return e==null?[]:(e=le(e),jt(Fs(e),function(t){return Xo.call(e,t)}))}:xa,Qu=Fs?function(e){for(var t=[];e;)en(t,ha(e)),e=wi(e);return t}:xa,Me=He;(ks&&Me(new ks(new ArrayBuffer(1)))!=Bn||xr&&Me(new xr)!=St||Hs&&Me(Hs.resolve())!=so||Jn&&Me(new Jn)!=Et||Lr&&Me(new Lr)!=Rr)&&(Me=function(e){var t=He(e),s=t==kt?e.constructor:r,u=s?In(s):"";if(u)switch(u){case Gf:return Bn;case Qf:return St;case qf:return so;case zf:return Et;case Kf:return Rr}return t});function lg(e,t,s){for(var u=-1,h=s.length;++u<h;){var g=s[u],m=g.size;switch(g.type){case"drop":e+=m;break;case"dropRight":t-=m;break;case"take":t=De(t,e+m);break;case"takeRight":e=Ee(e,t-m);break}}return{start:e,end:t}}function cg(e){var t=e.match(_h);return t?t[1].split(mh):[]}function qu(e,t,s){t=an(t,e);for(var u=-1,h=t.length,g=!1;++u<h;){var m=yt(t[u]);if(!(g=e!=null&&s(e,m)))break;e=e[m]}return g||++u!=h?g:(h=e==null?0:e.length,!!h&&qi(h)&&Gt(m,h)&&(z(e)||xn(e)))}function hg(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 zu(e){return typeof e.constructor=="function"&&!Hr(e)?Zn(wi(e)):{}}function fg(e,t,s){var u=e.constructor;switch(t){case Ar:return ia(e);case Er:case Cr:return new u(+e);case Bn:return Yd(e,s);case cs:case hs:case fs:case ds:case gs:case ps:case _s:case ms:case vs:return Iu(e,s);case St:return new u;case Tr:case br:return new u(e);case yr:return Jd(e);case Et:return new u;case ai:return Xd(e)}}function dg(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(ph,`{
|
|
1
|
+
class $v{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 ac(i){return i.$value}function ns(i){return new $v(i)}var Ki=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Br={exports:{}};var Dv=Br.exports,Fl;function Mv(){return Fl||(Fl=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`",_="__lodash_hash_undefined__",C=500,T="__lodash_placeholder__",E=1,y=2,A=4,x=1,$=2,H=1,re=2,Ue=4,Ie=8,qe=16,xe=32,Ze=64,ye=128,be=256,ve=512,Re=30,D="...",Xt=800,St=16,$e=1,Cn=2,N=3,ot=1/0,oe=9007199254740991,ke=17976931348623157e292,Zt=NaN,Lt=4294967295,Kc=Lt-1,Yc=Lt>>>1,Jc=[["ary",ye],["bind",H],["bindKey",re],["curry",Ie],["curryRight",qe],["flip",ve],["partial",xe],["partialRight",Ze],["rearg",be]],Bn="[object Arguments]",ri="[object Array]",Xc="[object AsyncFunction]",Er="[object Boolean]",Cr="[object Date]",Zc="[object DOMException]",ii="[object Error]",si="[object Function]",io="[object GeneratorFunction]",wt="[object Map]",Tr="[object Number]",jc="[object Null]",kt="[object Object]",so="[object Promise]",eh="[object Proxy]",yr="[object RegExp]",Et="[object Set]",br="[object String]",ai="[object Symbol]",th="[object Undefined]",Rr="[object WeakMap]",nh="[object WeakSet]",Ar="[object ArrayBuffer]",Gn="[object DataView]",cs="[object Float32Array]",hs="[object Float64Array]",fs="[object Int8Array]",ds="[object Int16Array]",gs="[object Int32Array]",ps="[object Uint8Array]",_s="[object Uint8ClampedArray]",ms="[object Uint16Array]",vs="[object Uint32Array]",rh=/\b__p \+= '';/g,ih=/\b(__p \+=) '' \+/g,sh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ao=/&(?:amp|lt|gt|quot|#39);/g,oo=/[&<>"']/g,ah=RegExp(ao.source),oh=RegExp(oo.source),uh=/<%-([\s\S]+?)%>/g,lh=/<%([\s\S]+?)%>/g,uo=/<%=([\s\S]+?)%>/g,ch=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hh=/^\w*$/,fh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ss=/[\\^$.*+?()[\]{}|]/g,dh=RegExp(Ss.source),ws=/^\s+/,gh=/\s/,ph=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_h=/\{\n\/\* \[wrapped with (.+)\] \*/,mh=/,? & /,vh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lo=/[()=,{}\[\]\/\s]/,Sh=/\\(\\)?/g,wh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,co=/\w*$/,Eh=/^[-+]0x[0-9a-f]+$/i,Ch=/^0b[01]+$/i,Th=/^\[object .+?Constructor\]$/,yh=/^0o[0-7]+$/i,bh=/^(?:0|[1-9]\d*)$/,Rh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Ah=/['\n\r\u2028\u2029\\]/g,ui="\\ud800-\\udfff",Ph="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",xh="\\u20d0-\\u20ff",ho=Ph+Ih+xh,fo="\\u2700-\\u27bf",go="a-z\\xdf-\\xf6\\xf8-\\xff",Lh="\\xac\\xb1\\xd7\\xf7",Nh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oh="\\u2000-\\u206f",Uh=" \\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",po="A-Z\\xc0-\\xd6\\xd8-\\xde",_o="\\ufe0e\\ufe0f",mo=Lh+Nh+Oh+Uh,Es="['’]",$h="["+ui+"]",vo="["+mo+"]",li="["+ho+"]",So="\\d+",Dh="["+fo+"]",wo="["+go+"]",Eo="[^"+ui+mo+So+fo+go+po+"]",Cs="\\ud83c[\\udffb-\\udfff]",Mh="(?:"+li+"|"+Cs+")",Co="[^"+ui+"]",Ts="(?:\\ud83c[\\udde6-\\uddff]){2}",ys="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+po+"]",To="\\u200d",yo="(?:"+wo+"|"+Eo+")",Fh="(?:"+Qn+"|"+Eo+")",bo="(?:"+Es+"(?:d|ll|m|re|s|t|ve))?",Ro="(?:"+Es+"(?:D|LL|M|RE|S|T|VE))?",Ao=Mh+"?",Po="["+_o+"]?",kh="(?:"+To+"(?:"+[Co,Ts,ys].join("|")+")"+Po+Ao+")*",Hh="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Io=Po+Ao+kh,Vh="(?:"+[Dh,Ts,ys].join("|")+")"+Io,Bh="(?:"+[Co+li+"?",li,Ts,ys,$h].join("|")+")",Gh=RegExp(Es,"g"),Qh=RegExp(li,"g"),bs=RegExp(Cs+"(?="+Cs+")|"+Bh+Io,"g"),qh=RegExp([Qn+"?"+wo+"+"+bo+"(?="+[vo,Qn,"$"].join("|")+")",Fh+"+"+Ro+"(?="+[vo,Qn+yo,"$"].join("|")+")",Qn+"?"+yo+"+"+bo,Qn+"+"+Ro,Wh,Hh,So,Vh].join("|"),"g"),zh=RegExp("["+To+ui+ho+_o+"]"),Kh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yh=["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"],Jh=-1,he={};he[cs]=he[hs]=he[fs]=he[ds]=he[gs]=he[ps]=he[_s]=he[ms]=he[vs]=!0,he[Bn]=he[ri]=he[Ar]=he[Er]=he[Gn]=he[Cr]=he[ii]=he[si]=he[wt]=he[Tr]=he[kt]=he[yr]=he[Et]=he[br]=he[Rr]=!1;var ce={};ce[Bn]=ce[ri]=ce[Ar]=ce[Gn]=ce[Er]=ce[Cr]=ce[cs]=ce[hs]=ce[fs]=ce[ds]=ce[gs]=ce[wt]=ce[Tr]=ce[kt]=ce[yr]=ce[Et]=ce[br]=ce[ai]=ce[ps]=ce[_s]=ce[ms]=ce[vs]=!0,ce[ii]=ce[si]=ce[Rr]=!1;var Xh={À:"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"},Zh={"&":"&","<":"<",">":">",'"':""","'":"'"},jh={"&":"&","<":"<",">":">",""":'"',"'":"'"},ef={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tf=parseFloat,nf=parseInt,xo=typeof Ki=="object"&&Ki&&Ki.Object===Object&&Ki,rf=typeof self=="object"&&self&&self.Object===Object&&self,Le=xo||rf||Function("return this")(),Rs=n&&!n.nodeType&&n,Tn=Rs&&!0&&i&&!i.nodeType&&i,Lo=Tn&&Tn.exports===Rs,As=Lo&&xo.process,ut=(function(){try{var S=Tn&&Tn.require&&Tn.require("util").types;return S||As&&As.binding&&As.binding("util")}catch{}})(),No=ut&&ut.isArrayBuffer,Oo=ut&&ut.isDate,Uo=ut&&ut.isMap,$o=ut&&ut.isRegExp,Do=ut&&ut.isSet,Mo=ut&&ut.isTypedArray;function je(S,R,b){switch(b.length){case 0:return S.call(R);case 1:return S.call(R,b[0]);case 2:return S.call(R,b[0],b[1]);case 3:return S.call(R,b[0],b[1],b[2])}return S.apply(R,b)}function sf(S,R,b,k){for(var Q=-1,ie=S==null?0:S.length;++Q<ie;){var we=S[Q];R(k,we,b(we),S)}return k}function et(S,R){for(var b=-1,k=S==null?0:S.length;++b<k&&R(S[b],b,S)!==!1;);return S}function af(S,R){for(var b=S==null?0:S.length;b--&&R(S[b],b,S)!==!1;);return S}function Fo(S,R){for(var b=-1,k=S==null?0:S.length;++b<k;)if(!R(S[b],b,S))return!1;return!0}function jt(S,R){for(var b=-1,k=S==null?0:S.length,Q=0,ie=[];++b<k;){var we=S[b];R(we,b,S)&&(ie[Q++]=we)}return ie}function ci(S,R){var b=S==null?0:S.length;return!!b&&qn(S,R,0)>-1}function Ps(S,R,b){for(var k=-1,Q=S==null?0:S.length;++k<Q;)if(b(R,S[k]))return!0;return!1}function fe(S,R){for(var b=-1,k=S==null?0:S.length,Q=Array(k);++b<k;)Q[b]=R(S[b],b,S);return Q}function en(S,R){for(var b=-1,k=R.length,Q=S.length;++b<k;)S[Q+b]=R[b];return S}function Is(S,R,b,k){var Q=-1,ie=S==null?0:S.length;for(k&&ie&&(b=S[++Q]);++Q<ie;)b=R(b,S[Q],Q,S);return b}function of(S,R,b,k){var Q=S==null?0:S.length;for(k&&Q&&(b=S[--Q]);Q--;)b=R(b,S[Q],Q,S);return b}function xs(S,R){for(var b=-1,k=S==null?0:S.length;++b<k;)if(R(S[b],b,S))return!0;return!1}var uf=Ls("length");function lf(S){return S.split("")}function cf(S){return S.match(vh)||[]}function ko(S,R,b){var k;return b(S,function(Q,ie,we){if(R(Q,ie,we))return k=ie,!1}),k}function hi(S,R,b,k){for(var Q=S.length,ie=b+(k?1:-1);k?ie--:++ie<Q;)if(R(S[ie],ie,S))return ie;return-1}function qn(S,R,b){return R===R?Cf(S,R,b):hi(S,Ho,b)}function hf(S,R,b,k){for(var Q=b-1,ie=S.length;++Q<ie;)if(k(S[Q],R))return Q;return-1}function Ho(S){return S!==S}function Wo(S,R){var b=S==null?0:S.length;return b?Os(S,R)/b:Zt}function Ls(S){return function(R){return R==null?r:R[S]}}function Ns(S){return function(R){return S==null?r:S[R]}}function Vo(S,R,b,k,Q){return Q(S,function(ie,we,le){b=k?(k=!1,ie):R(b,ie,we,le)}),b}function ff(S,R){var b=S.length;for(S.sort(R);b--;)S[b]=S[b].value;return S}function Os(S,R){for(var b,k=-1,Q=S.length;++k<Q;){var ie=R(S[k]);ie!==r&&(b=b===r?ie:b+ie)}return b}function Us(S,R){for(var b=-1,k=Array(S);++b<S;)k[b]=R(b);return k}function df(S,R){return fe(R,function(b){return[b,S[b]]})}function Bo(S){return S&&S.slice(0,zo(S)+1).replace(ws,"")}function tt(S){return function(R){return S(R)}}function $s(S,R){return fe(R,function(b){return S[b]})}function Pr(S,R){return S.has(R)}function Go(S,R){for(var b=-1,k=S.length;++b<k&&qn(R,S[b],0)>-1;);return b}function Qo(S,R){for(var b=S.length;b--&&qn(R,S[b],0)>-1;);return b}function gf(S,R){for(var b=S.length,k=0;b--;)S[b]===R&&++k;return k}var pf=Ns(Xh),_f=Ns(Zh);function mf(S){return"\\"+ef[S]}function vf(S,R){return S==null?r:S[R]}function zn(S){return zh.test(S)}function Sf(S){return Kh.test(S)}function wf(S){for(var R,b=[];!(R=S.next()).done;)b.push(R.value);return b}function Ds(S){var R=-1,b=Array(S.size);return S.forEach(function(k,Q){b[++R]=[Q,k]}),b}function qo(S,R){return function(b){return S(R(b))}}function tn(S,R){for(var b=-1,k=S.length,Q=0,ie=[];++b<k;){var we=S[b];(we===R||we===T)&&(S[b]=T,ie[Q++]=b)}return ie}function fi(S){var R=-1,b=Array(S.size);return S.forEach(function(k){b[++R]=k}),b}function Ef(S){var R=-1,b=Array(S.size);return S.forEach(function(k){b[++R]=[k,k]}),b}function Cf(S,R,b){for(var k=b-1,Q=S.length;++k<Q;)if(S[k]===R)return k;return-1}function Tf(S,R,b){for(var k=b+1;k--;)if(S[k]===R)return k;return k}function Kn(S){return zn(S)?bf(S):uf(S)}function Ct(S){return zn(S)?Rf(S):lf(S)}function zo(S){for(var R=S.length;R--&&gh.test(S.charAt(R)););return R}var yf=Ns(jh);function bf(S){for(var R=bs.lastIndex=0;bs.test(S);)++R;return R}function Rf(S){return S.match(bs)||[]}function Af(S){return S.match(qh)||[]}var Pf=(function S(R){R=R==null?Le:Yn.defaults(Le.Object(),R,Yn.pick(Le,Yh));var b=R.Array,k=R.Date,Q=R.Error,ie=R.Function,we=R.Math,le=R.Object,Ms=R.RegExp,If=R.String,lt=R.TypeError,di=b.prototype,xf=ie.prototype,Jn=le.prototype,gi=R["__core-js_shared__"],pi=xf.toString,se=Jn.hasOwnProperty,Lf=0,Ko=(function(){var e=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),_i=Jn.toString,Nf=pi.call(le),Of=Le._,Uf=Ms("^"+pi.call(se).replace(Ss,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mi=Lo?R.Buffer:r,nn=R.Symbol,vi=R.Uint8Array,Yo=mi?mi.allocUnsafe:r,Si=qo(le.getPrototypeOf,le),Jo=le.create,Xo=Jn.propertyIsEnumerable,wi=di.splice,Zo=nn?nn.isConcatSpreadable:r,Ir=nn?nn.iterator:r,yn=nn?nn.toStringTag:r,Ei=(function(){try{var e=In(le,"defineProperty");return e({},"",{}),e}catch{}})(),$f=R.clearTimeout!==Le.clearTimeout&&R.clearTimeout,Df=k&&k.now!==Le.Date.now&&k.now,Mf=R.setTimeout!==Le.setTimeout&&R.setTimeout,Ci=we.ceil,Ti=we.floor,Fs=le.getOwnPropertySymbols,Ff=mi?mi.isBuffer:r,jo=R.isFinite,kf=di.join,Hf=qo(le.keys,le),Ee=we.max,De=we.min,Wf=k.now,Vf=R.parseInt,eu=we.random,Bf=di.reverse,ks=In(R,"DataView"),xr=In(R,"Map"),Hs=In(R,"Promise"),Xn=In(R,"Set"),Lr=In(R,"WeakMap"),Nr=In(le,"create"),yi=Lr&&new Lr,Zn={},Gf=xn(ks),Qf=xn(xr),qf=xn(Hs),zf=xn(Xn),Kf=xn(Lr),bi=nn?nn.prototype:r,Or=bi?bi.valueOf:r,tu=bi?bi.toString:r;function d(e){if(ge(e)&&!z(e)&&!(e instanceof ee)){if(e instanceof ct)return e;if(se.call(e,"__wrapped__"))return nl(e)}return new ct(e)}var jn=(function(){function e(){}return function(t){if(!de(t))return{};if(Jo)return Jo(t);e.prototype=t;var s=new e;return e.prototype=r,s}})();function Ri(){}function ct(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}d.templateSettings={escape:uh,evaluate:lh,interpolate:uo,variable:"",imports:{_:d}},d.prototype=Ri.prototype,d.prototype.constructor=d,ct.prototype=jn(Ri.prototype),ct.prototype.constructor=ct;function ee(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Lt,this.__views__=[]}function Yf(){var e=new ee(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 Jf(){if(this.__filtered__){var e=new ee(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Xf(){var e=this.__wrapped__.value(),t=this.__dir__,s=z(e),u=t<0,h=s?e.length:0,g=lg(0,h,this.__views__),m=g.start,v=g.end,w=v-m,P=u?v:m-1,I=this.__iteratees__,L=I.length,M=0,W=De(w,this.__takeCount__);if(!s||!u&&h==w&&W==w)return bu(e,this.__actions__);var G=[];e:for(;w--&&M<W;){P+=t;for(var J=-1,V=e[P];++J<L;){var Z=I[J],te=Z.iteratee,it=Z.type,Ve=te(V);if(it==Cn)V=Ve;else if(!Ve){if(it==$e)continue e;break e}}G[M++]=V}return G}ee.prototype=jn(Ri.prototype),ee.prototype.constructor=ee;function bn(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 Zf(){this.__data__=Nr?Nr(null):{},this.size=0}function jf(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ed(e){var t=this.__data__;if(Nr){var s=t[e];return s===_?r:s}return se.call(t,e)?t[e]:r}function td(e){var t=this.__data__;return Nr?t[e]!==r:se.call(t,e)}function nd(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Nr&&t===r?_:t,this}bn.prototype.clear=Zf,bn.prototype.delete=jf,bn.prototype.get=ed,bn.prototype.has=td,bn.prototype.set=nd;function Ht(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 rd(){this.__data__=[],this.size=0}function id(e){var t=this.__data__,s=Ai(t,e);if(s<0)return!1;var u=t.length-1;return s==u?t.pop():wi.call(t,s,1),--this.size,!0}function sd(e){var t=this.__data__,s=Ai(t,e);return s<0?r:t[s][1]}function ad(e){return Ai(this.__data__,e)>-1}function od(e,t){var s=this.__data__,u=Ai(s,e);return u<0?(++this.size,s.push([e,t])):s[u][1]=t,this}Ht.prototype.clear=rd,Ht.prototype.delete=id,Ht.prototype.get=sd,Ht.prototype.has=ad,Ht.prototype.set=od;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 ud(){this.size=0,this.__data__={hash:new bn,map:new(xr||Ht),string:new bn}}function ld(e){var t=ki(this,e).delete(e);return this.size-=t?1:0,t}function cd(e){return ki(this,e).get(e)}function hd(e){return ki(this,e).has(e)}function fd(e,t){var s=ki(this,e),u=s.size;return s.set(e,t),this.size+=s.size==u?0:1,this}Wt.prototype.clear=ud,Wt.prototype.delete=ld,Wt.prototype.get=cd,Wt.prototype.has=hd,Wt.prototype.set=fd;function Rn(e){var t=-1,s=e==null?0:e.length;for(this.__data__=new Wt;++t<s;)this.add(e[t])}function dd(e){return this.__data__.set(e,_),this}function gd(e){return this.__data__.has(e)}Rn.prototype.add=Rn.prototype.push=dd,Rn.prototype.has=gd;function Tt(e){var t=this.__data__=new Ht(e);this.size=t.size}function pd(){this.__data__=new Ht,this.size=0}function _d(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s}function md(e){return this.__data__.get(e)}function vd(e){return this.__data__.has(e)}function Sd(e,t){var s=this.__data__;if(s instanceof Ht){var u=s.__data__;if(!xr||u.length<o-1)return u.push([e,t]),this.size=++s.size,this;s=this.__data__=new Wt(u)}return s.set(e,t),this.size=s.size,this}Tt.prototype.clear=pd,Tt.prototype.delete=_d,Tt.prototype.get=md,Tt.prototype.has=vd,Tt.prototype.set=Sd;function nu(e,t){var s=z(e),u=!s&&Ln(e),h=!s&&!u&&un(e),g=!s&&!u&&!h&&rr(e),m=s||u||h||g,v=m?Us(e.length,If):[],w=v.length;for(var P in e)(t||se.call(e,P))&&!(m&&(P=="length"||h&&(P=="offset"||P=="parent")||g&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||Gt(P,w)))&&v.push(P);return v}function ru(e){var t=e.length;return t?e[Xs(0,t-1)]:r}function wd(e,t){return Hi(ze(e),An(t,0,e.length))}function Ed(e){return Hi(ze(e))}function Ws(e,t,s){(s!==r&&!bt(e[t],s)||s===r&&!(t in e))&&Nt(e,t,s)}function Ur(e,t,s){var u=e[t];(!(se.call(e,t)&&bt(u,s))||s===r&&!(t in e))&&Nt(e,t,s)}function Ai(e,t){for(var s=e.length;s--;)if(bt(e[s][0],t))return s;return-1}function Cd(e,t,s,u){return rn(e,function(h,g,m){t(u,h,s(h),m)}),u}function iu(e,t){return e&&Ut(t,Ae(t),e)}function Td(e,t){return e&&Ut(t,Ye(t),e)}function Nt(e,t,s){t=="__proto__"&&Ei?Ei(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}function Vs(e,t){for(var s=-1,u=t.length,h=b(u),g=e==null;++s<u;)h[s]=g?r:Ta(e,t[s]);return h}function An(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 m,v=t&E,w=t&y,P=t&A;if(s&&(m=h?s(e,u,h,g):s(e)),m!==r)return m;if(!de(e))return e;var I=z(e);if(I){if(m=hg(e),!v)return ze(e,m)}else{var L=Me(e),M=L==si||L==io;if(un(e))return Pu(e,v);if(L==kt||L==Bn||M&&!h){if(m=w||M?{}:zu(e),!v)return w?eg(e,Td(m,e)):jd(e,iu(m,e))}else{if(!ce[L])return h?e:{};m=fg(e,L,v)}}g||(g=new Tt);var W=g.get(e);if(W)return W;g.set(e,m),Cl(e)?e.forEach(function(V){m.add(ht(V,t,s,V,e,g))}):wl(e)&&e.forEach(function(V,Z){m.set(Z,ht(V,t,s,Z,e,g))});var G=P?w?ua:oa:w?Ye:Ae,J=I?r:G(e);return et(J||e,function(V,Z){J&&(Z=V,V=e[Z]),Ur(m,Z,ht(V,t,s,Z,e,g))}),m}function yd(e){var t=Ae(e);return function(s){return su(s,e,t)}}function su(e,t,s){var u=s.length;if(e==null)return!u;for(e=le(e);u--;){var h=s[u],g=t[h],m=e[h];if(m===r&&!(h in e)||!g(m))return!1}return!0}function au(e,t,s){if(typeof e!="function")throw new lt(l);return Wr(function(){e.apply(r,s)},t)}function $r(e,t,s,u){var h=-1,g=ci,m=!0,v=e.length,w=[],P=t.length;if(!v)return w;s&&(t=fe(t,tt(s))),u?(g=Ps,m=!1):t.length>=o&&(g=Pr,m=!1,t=new Rn(t));e:for(;++h<v;){var I=e[h],L=s==null?I:s(I);if(I=u||I!==0?I:0,m&&L===L){for(var M=P;M--;)if(t[M]===L)continue e;w.push(I)}else g(t,L,u)||w.push(I)}return w}var rn=Ou(Ot),ou=Ou(Gs,!0);function bd(e,t){var s=!0;return rn(e,function(u,h,g){return s=!!t(u,h,g),s}),s}function Pi(e,t,s){for(var u=-1,h=e.length;++u<h;){var g=e[u],m=t(g);if(m!=null&&(v===r?m===m&&!rt(m):s(m,v)))var v=m,w=g}return w}function Rd(e,t,s,u){var h=e.length;for(s=Y(s),s<0&&(s=-s>h?0:h+s),u=u===r||u>h?h:Y(u),u<0&&(u+=h),u=s>u?0:yl(u);s<u;)e[s++]=t;return e}function uu(e,t){var s=[];return rn(e,function(u,h,g){t(u,h,g)&&s.push(u)}),s}function Ne(e,t,s,u,h){var g=-1,m=e.length;for(s||(s=gg),h||(h=[]);++g<m;){var v=e[g];t>0&&s(v)?t>1?Ne(v,t-1,s,u,h):en(h,v):u||(h[h.length]=v)}return h}var Bs=Uu(),lu=Uu(!0);function Ot(e,t){return e&&Bs(e,t,Ae)}function Gs(e,t){return e&&lu(e,t,Ae)}function Ii(e,t){return jt(t,function(s){return Qt(e[s])})}function Pn(e,t){t=an(t,e);for(var s=0,u=t.length;e!=null&&s<u;)e=e[yt(t[s++])];return s&&s==u?e:r}function cu(e,t,s){var u=t(e);return z(e)?u:en(u,s(e))}function He(e){return e==null?e===r?th:jc:yn&&yn in le(e)?ug(e):Eg(e)}function Qs(e,t){return e>t}function Ad(e,t){return e!=null&&se.call(e,t)}function Pd(e,t){return e!=null&&t in le(e)}function Id(e,t,s){return e>=De(t,s)&&e<Ee(t,s)}function qs(e,t,s){for(var u=s?Ps:ci,h=e[0].length,g=e.length,m=g,v=b(g),w=1/0,P=[];m--;){var I=e[m];m&&t&&(I=fe(I,tt(t))),w=De(I.length,w),v[m]=!s&&(t||h>=120&&I.length>=120)?new Rn(m&&I):r}I=e[0];var L=-1,M=v[0];e:for(;++L<h&&P.length<w;){var W=I[L],G=t?t(W):W;if(W=s||W!==0?W:0,!(M?Pr(M,G):u(P,G,s))){for(m=g;--m;){var J=v[m];if(!(J?Pr(J,G):u(e[m],G,s)))continue e}M&&M.push(G),P.push(W)}}return P}function xd(e,t,s,u){return Ot(e,function(h,g,m){t(u,s(h),g,m)}),u}function Dr(e,t,s){t=an(t,e),e=Xu(e,t);var u=e==null?e:e[yt(dt(t))];return u==null?r:je(u,e,s)}function hu(e){return ge(e)&&He(e)==Bn}function Ld(e){return ge(e)&&He(e)==Ar}function Nd(e){return ge(e)&&He(e)==Cr}function Mr(e,t,s,u,h){return e===t?!0:e==null||t==null||!ge(e)&&!ge(t)?e!==e&&t!==t:Od(e,t,s,u,Mr,h)}function Od(e,t,s,u,h,g){var m=z(e),v=z(t),w=m?ri:Me(e),P=v?ri:Me(t);w=w==Bn?kt:w,P=P==Bn?kt:P;var I=w==kt,L=P==kt,M=w==P;if(M&&un(e)){if(!un(t))return!1;m=!0,I=!1}if(M&&!I)return g||(g=new Tt),m||rr(e)?Gu(e,t,s,u,h,g):ag(e,t,w,s,u,h,g);if(!(s&x)){var W=I&&se.call(e,"__wrapped__"),G=L&&se.call(t,"__wrapped__");if(W||G){var J=W?e.value():e,V=G?t.value():t;return g||(g=new Tt),h(J,V,s,u,g)}}return M?(g||(g=new Tt),og(e,t,s,u,h,g)):!1}function Ud(e){return ge(e)&&Me(e)==wt}function zs(e,t,s,u){var h=s.length,g=h,m=!u;if(e==null)return!g;for(e=le(e);h--;){var v=s[h];if(m&&v[2]?v[1]!==e[v[0]]:!(v[0]in e))return!1}for(;++h<g;){v=s[h];var w=v[0],P=e[w],I=v[1];if(m&&v[2]){if(P===r&&!(w in e))return!1}else{var L=new Tt;if(u)var M=u(P,I,w,e,t,L);if(!(M===r?Mr(I,P,x|$,u,L):M))return!1}}return!0}function fu(e){if(!de(e)||_g(e))return!1;var t=Qt(e)?Uf:Th;return t.test(xn(e))}function $d(e){return ge(e)&&He(e)==yr}function Dd(e){return ge(e)&&Me(e)==Et}function Md(e){return ge(e)&&qi(e.length)&&!!he[He(e)]}function du(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?z(e)?_u(e[0],e[1]):pu(e):Dl(e)}function Ks(e){if(!Hr(e))return Hf(e);var t=[];for(var s in le(e))se.call(e,s)&&s!="constructor"&&t.push(s);return t}function Fd(e){if(!de(e))return wg(e);var t=Hr(e),s=[];for(var u in e)u=="constructor"&&(t||!se.call(e,u))||s.push(u);return s}function Ys(e,t){return e<t}function gu(e,t){var s=-1,u=Ke(e)?b(e.length):[];return rn(e,function(h,g,m){u[++s]=t(h,g,m)}),u}function pu(e){var t=ca(e);return t.length==1&&t[0][2]?Yu(t[0][0],t[0][1]):function(s){return s===e||zs(s,e,t)}}function _u(e,t){return fa(e)&&Ku(t)?Yu(yt(e),t):function(s){var u=Ta(s,e);return u===r&&u===t?ya(s,e):Mr(t,u,x|$)}}function xi(e,t,s,u,h){e!==t&&Bs(t,function(g,m){if(h||(h=new Tt),de(g))kd(e,t,m,s,xi,u,h);else{var v=u?u(ga(e,m),g,m+"",e,t,h):r;v===r&&(v=g),Ws(e,m,v)}},Ye)}function kd(e,t,s,u,h,g,m){var v=ga(e,s),w=ga(t,s),P=m.get(w);if(P){Ws(e,s,P);return}var I=g?g(v,w,s+"",e,t,m):r,L=I===r;if(L){var M=z(w),W=!M&&un(w),G=!M&&!W&&rr(w);I=w,M||W||G?z(v)?I=v:_e(v)?I=ze(v):W?(L=!1,I=Pu(w,!0)):G?(L=!1,I=Iu(w,!0)):I=[]:Vr(w)||Ln(w)?(I=v,Ln(v)?I=bl(v):(!de(v)||Qt(v))&&(I=zu(w))):L=!1}L&&(m.set(w,I),h(I,w,u,g,m),m.delete(w)),Ws(e,s,I)}function mu(e,t){var s=e.length;if(s)return t+=t<0?s:0,Gt(t,s)?e[t]:r}function vu(e,t,s){t.length?t=fe(t,function(g){return z(g)?function(m){return Pn(m,g.length===1?g[0]:g)}:g}):t=[Je];var u=-1;t=fe(t,tt(B()));var h=gu(e,function(g,m,v){var w=fe(t,function(P){return P(g)});return{criteria:w,index:++u,value:g}});return ff(h,function(g,m){return Zd(g,m,s)})}function Hd(e,t){return Su(e,t,function(s,u){return ya(e,u)})}function Su(e,t,s){for(var u=-1,h=t.length,g={};++u<h;){var m=t[u],v=Pn(e,m);s(v,m)&&Fr(g,an(m,e),v)}return g}function Wd(e){return function(t){return Pn(t,e)}}function Js(e,t,s,u){var h=u?hf:qn,g=-1,m=t.length,v=e;for(e===t&&(t=ze(t)),s&&(v=fe(e,tt(s)));++g<m;)for(var w=0,P=t[g],I=s?s(P):P;(w=h(v,I,w,u))>-1;)v!==e&&wi.call(v,w,1),wi.call(e,w,1);return e}function wu(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;Gt(h)?wi.call(e,h,1):ea(e,h)}}return e}function Xs(e,t){return e+Ti(eu()*(t-e+1))}function Vd(e,t,s,u){for(var h=-1,g=Ee(Ci((t-e)/(s||1)),0),m=b(g);g--;)m[u?g:++h]=e,e+=s;return m}function Zs(e,t){var s="";if(!e||t<1||t>oe)return s;do t%2&&(s+=e),t=Ti(t/2),t&&(e+=e);while(t);return s}function X(e,t){return pa(Ju(e,t,Je),e+"")}function Bd(e){return ru(ir(e))}function Gd(e,t){var s=ir(e);return Hi(s,An(t,0,s.length))}function Fr(e,t,s,u){if(!de(e))return e;t=an(t,e);for(var h=-1,g=t.length,m=g-1,v=e;v!=null&&++h<g;){var w=yt(t[h]),P=s;if(w==="__proto__"||w==="constructor"||w==="prototype")return e;if(h!=m){var I=v[w];P=u?u(I,w,v):r,P===r&&(P=de(I)?I:Gt(t[h+1])?[]:{})}Ur(v,w,P),v=v[w]}return e}var Eu=yi?function(e,t){return yi.set(e,t),e}:Je,Qd=Ei?function(e,t){return Ei(e,"toString",{configurable:!0,enumerable:!1,value:Ra(t),writable:!0})}:Je;function qd(e){return Hi(ir(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=b(h);++u<h;)g[u]=e[u+t];return g}function zd(e,t){var s;return rn(e,function(u,h,g){return s=t(u,h,g),!s}),!!s}function Li(e,t,s){var u=0,h=e==null?u:e.length;if(typeof t=="number"&&t===t&&h<=Yc){for(;u<h;){var g=u+h>>>1,m=e[g];m!==null&&!rt(m)&&(s?m<=t:m<t)?u=g+1:h=g}return h}return js(e,t,Je,s)}function js(e,t,s,u){var h=0,g=e==null?0:e.length;if(g===0)return 0;t=s(t);for(var m=t!==t,v=t===null,w=rt(t),P=t===r;h<g;){var I=Ti((h+g)/2),L=s(e[I]),M=L!==r,W=L===null,G=L===L,J=rt(L);if(m)var V=u||G;else P?V=G&&(u||M):v?V=G&&M&&(u||!W):w?V=G&&M&&!W&&(u||!J):W||J?V=!1:V=u?L<=t:L<t;V?h=I+1:g=I}return De(g,Kc)}function Cu(e,t){for(var s=-1,u=e.length,h=0,g=[];++s<u;){var m=e[s],v=t?t(m):m;if(!s||!bt(v,w)){var w=v;g[h++]=m===0?0:m}}return g}function Tu(e){return typeof e=="number"?e:rt(e)?Zt:+e}function nt(e){if(typeof e=="string")return e;if(z(e))return fe(e,nt)+"";if(rt(e))return tu?tu.call(e):"";var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function sn(e,t,s){var u=-1,h=ci,g=e.length,m=!0,v=[],w=v;if(s)m=!1,h=Ps;else if(g>=o){var P=t?null:ig(e);if(P)return fi(P);m=!1,h=Pr,w=new Rn}else w=t?[]:v;e:for(;++u<g;){var I=e[u],L=t?t(I):I;if(I=s||I!==0?I:0,m&&L===L){for(var M=w.length;M--;)if(w[M]===L)continue e;t&&w.push(L),v.push(I)}else h(w,L,s)||(w!==v&&w.push(L),v.push(I))}return v}function ea(e,t){t=an(t,e);var s=-1,u=t.length;if(!u)return!0;for(;++s<u;){var h=yt(t[s]);if(h==="__proto__"&&!se.call(e,"__proto__")||(h==="constructor"||h==="prototype")&&s<u-1)return!1}var g=Xu(e,t);return g==null||delete g[yt(dt(t))]}function yu(e,t,s,u){return Fr(e,t,s(Pn(e,t)),u)}function Ni(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 bu(e,t){var s=e;return s instanceof ee&&(s=s.value()),Is(t,function(u,h){return h.func.apply(h.thisArg,en([u],h.args))},s)}function ta(e,t,s){var u=e.length;if(u<2)return u?sn(e[0]):[];for(var h=-1,g=b(u);++h<u;)for(var m=e[h],v=-1;++v<u;)v!=h&&(g[h]=$r(g[h]||m,e[v],t,s));return sn(Ne(g,1),t,s)}function Ru(e,t,s){for(var u=-1,h=e.length,g=t.length,m={};++u<h;){var v=u<g?t[u]:r;s(m,e[u],v)}return m}function na(e){return _e(e)?e:[]}function ra(e){return typeof e=="function"?e:Je}function an(e,t){return z(e)?e:fa(e,t)?[e]:tl(ae(e))}var Kd=X;function on(e,t,s){var u=e.length;return s=s===r?u:s,!t&&s>=u?e:ft(e,t,s)}var Au=$f||function(e){return Le.clearTimeout(e)};function Pu(e,t){if(t)return e.slice();var s=e.length,u=Yo?Yo(s):new e.constructor(s);return e.copy(u),u}function ia(e){var t=new e.constructor(e.byteLength);return new vi(t).set(new vi(e)),t}function Yd(e,t){var s=t?ia(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Jd(e){var t=new e.constructor(e.source,co.exec(e));return t.lastIndex=e.lastIndex,t}function Xd(e){return Or?le(Or.call(e)):{}}function Iu(e,t){var s=t?ia(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function xu(e,t){if(e!==t){var s=e!==r,u=e===null,h=e===e,g=rt(e),m=t!==r,v=t===null,w=t===t,P=rt(t);if(!v&&!P&&!g&&e>t||g&&m&&w&&!v&&!P||u&&m&&w||!s&&w||!h)return 1;if(!u&&!g&&!P&&e<t||P&&s&&h&&!u&&!g||v&&s&&h||!m&&h||!w)return-1}return 0}function Zd(e,t,s){for(var u=-1,h=e.criteria,g=t.criteria,m=h.length,v=s.length;++u<m;){var w=xu(h[u],g[u]);if(w){if(u>=v)return w;var P=s[u];return w*(P=="desc"?-1:1)}}return e.index-t.index}function Lu(e,t,s,u){for(var h=-1,g=e.length,m=s.length,v=-1,w=t.length,P=Ee(g-m,0),I=b(w+P),L=!u;++v<w;)I[v]=t[v];for(;++h<m;)(L||h<g)&&(I[s[h]]=e[h]);for(;P--;)I[v++]=e[h++];return I}function Nu(e,t,s,u){for(var h=-1,g=e.length,m=-1,v=s.length,w=-1,P=t.length,I=Ee(g-v,0),L=b(I+P),M=!u;++h<I;)L[h]=e[h];for(var W=h;++w<P;)L[W+w]=t[w];for(;++m<v;)(M||h<g)&&(L[W+s[m]]=e[h++]);return L}function ze(e,t){var s=-1,u=e.length;for(t||(t=b(u));++s<u;)t[s]=e[s];return t}function Ut(e,t,s,u){var h=!s;s||(s={});for(var g=-1,m=t.length;++g<m;){var v=t[g],w=u?u(s[v],e[v],v,s,e):r;w===r&&(w=e[v]),h?Nt(s,v,w):Ur(s,v,w)}return s}function jd(e,t){return Ut(e,ha(e),t)}function eg(e,t){return Ut(e,Qu(e),t)}function Oi(e,t){return function(s,u){var h=z(s)?sf:Cd,g=t?t():{};return h(s,e,B(u,2),g)}}function er(e){return X(function(t,s){var u=-1,h=s.length,g=h>1?s[h-1]:r,m=h>2?s[2]:r;for(g=e.length>3&&typeof g=="function"?(h--,g):r,m&&We(s[0],s[1],m)&&(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,m=le(s);(t?g--:++g<h)&&u(m[g],g,m)!==!1;);return s}}function Uu(e){return function(t,s,u){for(var h=-1,g=le(t),m=u(t),v=m.length;v--;){var w=m[e?v:++h];if(s(g[w],w,g)===!1)break}return t}}function tg(e,t,s){var u=t&H,h=kr(e);function g(){var m=this&&this!==Le&&this instanceof g?h:e;return m.apply(u?s:this,arguments)}return g}function $u(e){return function(t){t=ae(t);var s=zn(t)?Ct(t):r,u=s?s[0]:t.charAt(0),h=s?on(s,1).join(""):t.slice(1);return u[e]()+h}}function tr(e){return function(t){return Is(Ul(Ol(t).replace(Gh,"")),e,"")}}function kr(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=jn(e.prototype),u=e.apply(s,t);return de(u)?u:s}}function ng(e,t,s){var u=kr(e);function h(){for(var g=arguments.length,m=b(g),v=g,w=nr(h);v--;)m[v]=arguments[v];var P=g<3&&m[0]!==w&&m[g-1]!==w?[]:tn(m,w);if(g-=P.length,g<s)return Hu(e,t,Ui,h.placeholder,r,m,P,r,r,s-g);var I=this&&this!==Le&&this instanceof h?u:e;return je(I,this,m)}return h}function Du(e){return function(t,s,u){var h=le(t);if(!Ke(t)){var g=B(s,3);t=Ae(t),s=function(v){return g(h[v],v,h)}}var m=e(t,s,u);return m>-1?h[g?t[m]:m]:r}}function Mu(e){return Bt(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&&!m&&Fi(g)=="wrapper")var m=new ct([],!0)}for(u=m?u:s;++u<s;){g=t[u];var v=Fi(g),w=v=="wrapper"?la(g):r;w&&da(w[0])&&w[1]==(ye|Ie|xe|be)&&!w[4].length&&w[9]==1?m=m[Fi(w[0])].apply(m,w[3]):m=g.length==1&&da(g)?m[v]():m.thru(g)}return function(){var P=arguments,I=P[0];if(m&&P.length==1&&z(I))return m.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 Ui(e,t,s,u,h,g,m,v,w,P){var I=t&ye,L=t&H,M=t&re,W=t&(Ie|qe),G=t&ve,J=M?r:kr(e);function V(){for(var Z=arguments.length,te=b(Z),it=Z;it--;)te[it]=arguments[it];if(W)var Ve=nr(V),st=gf(te,Ve);if(u&&(te=Lu(te,u,h,W)),g&&(te=Nu(te,g,m,W)),Z-=st,W&&Z<P){var me=tn(te,Ve);return Hu(e,t,Ui,V.placeholder,s,te,me,v,w,P-Z)}var Rt=L?s:this,zt=M?Rt[e]:e;return Z=te.length,v?te=Cg(te,v):G&&Z>1&&te.reverse(),I&&w<Z&&(te.length=w),this&&this!==Le&&this instanceof V&&(zt=J||kr(zt)),zt.apply(Rt,te)}return V}function Fu(e,t){return function(s,u){return xd(s,e,t(u),{})}}function $i(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 sa(e){return Bt(function(t){return t=fe(t,tt(B())),X(function(s){var u=this;return e(t,function(h){return je(h,u,s)})})})}function Di(e,t){t=t===r?" ":nt(t);var s=t.length;if(s<2)return s?Zs(t,e):t;var u=Zs(t,Ci(e/Kn(t)));return zn(t)?on(Ct(u),0,e).join(""):u.slice(0,e)}function rg(e,t,s,u){var h=t&H,g=kr(e);function m(){for(var v=-1,w=arguments.length,P=-1,I=u.length,L=b(I+w),M=this&&this!==Le&&this instanceof m?g:e;++P<I;)L[P]=u[P];for(;w--;)L[P++]=arguments[++v];return je(M,h?s:this,L)}return m}function ku(e){return function(t,s,u){return u&&typeof u!="number"&&We(t,s,u)&&(s=u=r),t=qt(t),s===r?(s=t,t=0):s=qt(s),u=u===r?t<s?1:-1:qt(u),Vd(t,s,u,e)}}function Mi(e){return function(t,s){return typeof t=="string"&&typeof s=="string"||(t=gt(t),s=gt(s)),e(t,s)}}function Hu(e,t,s,u,h,g,m,v,w,P){var I=t&Ie,L=I?m:r,M=I?r:m,W=I?g:r,G=I?r:g;t|=I?xe:Ze,t&=~(I?Ze:xe),t&Ue||(t&=-4);var J=[e,t,h,W,L,G,M,v,w,P],V=s.apply(r,J);return da(e)&&Zu(V,J),V.placeholder=u,ju(V,e,t)}function aa(e){var t=we[e];return function(s,u){if(s=gt(s),u=u==null?0:De(Y(u),292),u&&jo(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 ig=Xn&&1/fi(new Xn([,-0]))[1]==ot?function(e){return new Xn(e)}:Ia;function Wu(e){return function(t){var s=Me(t);return s==wt?Ds(t):s==Et?Ef(t):df(t,e(t))}}function Vt(e,t,s,u,h,g,m,v){var w=t&re;if(!w&&typeof e!="function")throw new lt(l);var P=u?u.length:0;if(P||(t&=-97,u=h=r),m=m===r?m:Ee(Y(m),0),v=v===r?v:Y(v),P-=h?h.length:0,t&Ze){var I=u,L=h;u=h=r}var M=w?r:la(e),W=[e,t,s,u,h,I,L,g,m,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?w?0:e.length:Ee(W[9]-P,0),!v&&t&(Ie|qe)&&(t&=-25),!t||t==H)var G=tg(e,t,s);else t==Ie||t==qe?G=ng(e,t,v):(t==xe||t==(H|xe))&&!h.length?G=rg(e,t,s,u):G=Ui.apply(r,W);var J=M?Eu:Zu;return ju(J(G,W),e,t)}function Vu(e,t,s,u){return e===r||bt(e,Jn[s])&&!se.call(u,s)?t:e}function Bu(e,t,s,u,h,g){return de(e)&&de(t)&&(g.set(t,e),xi(e,t,r,Bu,g),g.delete(t)),e}function sg(e){return Vr(e)?r:e}function Gu(e,t,s,u,h,g){var m=s&x,v=e.length,w=t.length;if(v!=w&&!(m&&w>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&$?new Rn:r;for(g.set(e,t),g.set(t,e);++L<v;){var G=e[L],J=t[L];if(u)var V=m?u(J,G,L,t,e,g):u(G,J,L,e,t,g);if(V!==r){if(V)continue;M=!1;break}if(W){if(!xs(t,function(Z,te){if(!Pr(W,te)&&(G===Z||h(G,Z,s,u,g)))return W.push(te)})){M=!1;break}}else if(!(G===J||h(G,J,s,u,g))){M=!1;break}}return g.delete(e),g.delete(t),M}function ag(e,t,s,u,h,g,m){switch(s){case Gn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ar:return!(e.byteLength!=t.byteLength||!g(new vi(e),new vi(t)));case Er:case Cr:case Tr:return bt(+e,+t);case ii:return e.name==t.name&&e.message==t.message;case yr:case br:return e==t+"";case wt:var v=Ds;case Et:var w=u&x;if(v||(v=fi),e.size!=t.size&&!w)return!1;var P=m.get(e);if(P)return P==t;u|=$,m.set(e,t);var I=Gu(v(e),v(t),u,h,g,m);return m.delete(e),I;case ai:if(Or)return Or.call(e)==Or.call(t)}return!1}function og(e,t,s,u,h,g){var m=s&x,v=oa(e),w=v.length,P=oa(t),I=P.length;if(w!=I&&!m)return!1;for(var L=w;L--;){var M=v[L];if(!(m?M in t:se.call(t,M)))return!1}var W=g.get(e),G=g.get(t);if(W&&G)return W==t&&G==e;var J=!0;g.set(e,t),g.set(t,e);for(var V=m;++L<w;){M=v[L];var Z=e[M],te=t[M];if(u)var it=m?u(te,Z,M,t,e,g):u(Z,te,M,e,t,g);if(!(it===r?Z===te||h(Z,te,s,u,g):it)){J=!1;break}V||(V=M=="constructor")}if(J&&!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)&&(J=!1)}return g.delete(e),g.delete(t),J}function Bt(e){return pa(Ju(e,r,sl),e+"")}function oa(e){return cu(e,Ae,ha)}function ua(e){return cu(e,Ye,Qu)}var la=yi?function(e){return yi.get(e)}:Ia;function Fi(e){for(var t=e.name+"",s=Zn[t],u=se.call(Zn,t)?s.length:0;u--;){var h=s[u],g=h.func;if(g==null||g==e)return h.name}return t}function nr(e){var t=se.call(d,"placeholder")?d:e;return t.placeholder}function B(){var e=d.iteratee||Aa;return e=e===Aa?du:e,arguments.length?e(arguments[0],arguments[1]):e}function ki(e,t){var s=e.__data__;return pg(t)?s[typeof t=="string"?"string":"hash"]:s.map}function ca(e){for(var t=Ae(e),s=t.length;s--;){var u=t[s],h=e[u];t[s]=[u,h,Ku(h)]}return t}function In(e,t){var s=vf(e,t);return fu(s)?s:r}function ug(e){var t=se.call(e,yn),s=e[yn];try{e[yn]=r;var u=!0}catch{}var h=_i.call(e);return u&&(t?e[yn]=s:delete e[yn]),h}var ha=Fs?function(e){return e==null?[]:(e=le(e),jt(Fs(e),function(t){return Xo.call(e,t)}))}:xa,Qu=Fs?function(e){for(var t=[];e;)en(t,ha(e)),e=Si(e);return t}:xa,Me=He;(ks&&Me(new ks(new ArrayBuffer(1)))!=Gn||xr&&Me(new xr)!=wt||Hs&&Me(Hs.resolve())!=so||Xn&&Me(new Xn)!=Et||Lr&&Me(new Lr)!=Rr)&&(Me=function(e){var t=He(e),s=t==kt?e.constructor:r,u=s?xn(s):"";if(u)switch(u){case Gf:return Gn;case Qf:return wt;case qf:return so;case zf:return Et;case Kf:return Rr}return t});function lg(e,t,s){for(var u=-1,h=s.length;++u<h;){var g=s[u],m=g.size;switch(g.type){case"drop":e+=m;break;case"dropRight":t-=m;break;case"take":t=De(t,e+m);break;case"takeRight":e=Ee(e,t-m);break}}return{start:e,end:t}}function cg(e){var t=e.match(_h);return t?t[1].split(mh):[]}function qu(e,t,s){t=an(t,e);for(var u=-1,h=t.length,g=!1;++u<h;){var m=yt(t[u]);if(!(g=e!=null&&s(e,m)))break;e=e[m]}return g||++u!=h?g:(h=e==null?0:e.length,!!h&&qi(h)&&Gt(m,h)&&(z(e)||Ln(e)))}function hg(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 zu(e){return typeof e.constructor=="function"&&!Hr(e)?jn(Si(e)):{}}function fg(e,t,s){var u=e.constructor;switch(t){case Ar:return ia(e);case Er:case Cr:return new u(+e);case Gn:return Yd(e,s);case cs:case hs:case fs:case ds:case gs:case ps:case _s:case ms:case vs:return Iu(e,s);case wt:return new u;case Tr:case br:return new u(e);case yr:return Jd(e);case Et:return new u;case ai:return Xd(e)}}function dg(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(ph,`{
|
|
2
2
|
/* [wrapped with `+t+`] */
|
|
3
|
-
`)}function gg(e){return z(e)||xn(e)||!!(Zo&&e&&e[Zo])}function Gt(e,t){var s=typeof e;return t=t??oe,!!t&&(s=="number"||s!="symbol"&&bh.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"?ze(s)&&Gt(t,s.length):u=="string"&&t in s)?bt(s[t],e):!1}function fa(e,t){if(z(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||rt(e)?!0:hh.test(e)||!ch.test(e)||t!=null&&e in le(t)}function pg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e){var t=Fi(e),s=d[t];if(typeof s!="function"||!(t in ee.prototype))return!1;if(e===s)return!0;var u=la(s);return!!u&&e===u[0]}function _g(e){return!!Ko&&Ko in e}var mg=gi?Qt:La;function Hr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Yn;return e===s}function Ku(e){return e===e&&!de(e)}function Yu(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in le(s))}}function vg(e){var t=Gi(e,function(u){return s.size===C&&s.clear(),u}),s=t.cache;return t}function wg(e,t){var s=e[1],u=t[1],h=s|u,g=h<(H|re|ye),m=u==ye&&s==Ie||u==ye&&s==be&&e[7].length<=t[8]||u==(ye|be)&&t[7].length<=t[8]&&s==Ie;if(!(g||m))return e;u&H&&(e[2]=t[2],h|=s&H?0:Oe);var v=t[3];if(v){var S=e[3];e[3]=S?Lu(S,v,t[4]):v,e[4]=S?tn(e[3],T):t[4]}return v=t[5],v&&(S=e[5],e[5]=S?Nu(S,v,t[6]):v,e[6]=S?tn(e[5],T):t[6]),v=t[7],v&&(e[7]=v),u&ye&&(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 Sg(e){var t=[];if(e!=null)for(var s in le(e))t.push(s);return t}function Eg(e){return _i.call(e)}function Ju(e,t,s){return t=Ee(t===r?e.length-1:t,0),function(){for(var u=arguments,h=-1,g=Ee(u.length-t,0),m=b(g);++h<g;)m[h]=u[t+h];h=-1;for(var v=b(t+1);++h<t;)v[h]=u[h];return v[t]=s(m),je(e,this,v)}}function Xu(e,t){return t.length<2?e:An(e,ft(t,0,-1))}function Cg(e,t){for(var s=e.length,u=De(t.length,s),h=qe(e);u--;){var g=t[u];e[u]=Gt(g,s)?h[g]:r}return e}function ga(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Zu=el(Eu),Wr=Mf||function(e,t){return Le.setTimeout(e,t)},pa=el(Qd);function ju(e,t,s){var u=t+"";return pa(e,dg(u,Tg(cg(u),s)))}function el(e){var t=0,s=0;return function(){var u=Wf(),h=wt-(u-s);if(s=u,h>0){if(++t>=Xt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Hi(e,t){var s=-1,u=e.length,h=u-1;for(t=t===r?u:t;++s<t;){var g=Xs(s,h),m=e[g];e[g]=e[s],e[s]=m}return e.length=t,e}var tl=vg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fh,function(s,u,h,g){t.push(h?g.replace(wh,"$1"):u||s)}),t});function yt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function In(e){if(e!=null){try{return pi.call(e)}catch{}try{return e+""}catch{}}return""}function Tg(e,t){return et(Jc,function(s){var u="_."+s[0];t&s[1]&&!ci(e,u)&&e.push(u)}),e.sort()}function nl(e){if(e instanceof ee)return e.clone();var t=new ct(e.__wrapped__,e.__chain__);return t.__actions__=qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function yg(e,t,s){(s?We(e,t,s):t===r)?t=1:t=Ee(K(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var h=0,g=0,m=b(Ci(u/t));h<u;)m[g++]=ft(e,h,h+=t);return m}function bg(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 Rg(){var e=arguments.length;if(!e)return[];for(var t=b(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return en(z(s)?qe(s):[s],Ne(t,1))}var Ag=J(function(e,t){return _e(e)?$r(e,Ne(t,1,_e,!0)):[]}),Pg=J(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?$r(e,Ne(t,1,_e,!0),B(s,2)):[]}),Ig=J(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?$r(e,Ne(t,1,_e,!0),r,s):[]});function xg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:K(t),ft(e,t<0?0:t,u)):[]}function Lg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:K(t),t=u-t,ft(e,0,t<0?0:t)):[]}function Ng(e,t){return e&&e.length?Ni(e,B(t,3),!0,!0):[]}function Ug(e,t){return e&&e.length?Ni(e,B(t,3),!0):[]}function Og(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),Rd(e,t,s,u)):[]}function rl(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:K(s);return h<0&&(h=Ee(u+h,0)),hi(e,B(t,3),h)}function il(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u-1;return s!==r&&(h=K(s),h=s<0?Ee(u+h,0):De(h,u-1)),hi(e,B(t,3),h,!0)}function sl(e){var t=e==null?0:e.length;return t?Ne(e,1):[]}function $g(e){var t=e==null?0:e.length;return t?Ne(e,ot):[]}function Dg(e,t){var s=e==null?0:e.length;return s?(t=t===r?1:K(t),Ne(e,t)):[]}function Mg(e){for(var t=-1,s=e==null?0:e.length,u={};++t<s;){var h=e[t];Nt(u,h[0],h[1])}return u}function al(e){return e&&e.length?e[0]:r}function Fg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:K(s);return h<0&&(h=Ee(u+h,0)),Qn(e,t,h)}function kg(e){var t=e==null?0:e.length;return t?ft(e,0,-1):[]}var Hg=J(function(e){var t=fe(e,na);return t.length&&t[0]===e[0]?qs(t):[]}),Wg=J(function(e){var t=dt(e),s=fe(e,na);return t===dt(s)?t=r:s.pop(),s.length&&s[0]===e[0]?qs(s,B(t,2)):[]}),Vg=J(function(e){var t=dt(e),s=fe(e,na);return t=typeof t=="function"?t:r,t&&s.pop(),s.length&&s[0]===e[0]?qs(s,r,t):[]});function Bg(e,t){return e==null?"":kf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Gg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u;return s!==r&&(h=K(s),h=h<0?Ee(u+h,0):De(h,u-1)),t===t?Tf(e,t,h):hi(e,Ho,h,!0)}function Qg(e,t){return e&&e.length?mu(e,K(t)):r}var qg=J(ol);function ol(e,t){return e&&e.length&&t&&t.length?Js(e,t):e}function zg(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,B(s,2)):e}function Kg(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,r,s):e}var Yg=Bt(function(e,t){var s=e==null?0:e.length,u=Vs(e,t);return Su(e,fe(t,function(h){return Gt(h,s)?+h:h}).sort(xu)),u});function Jg(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 m=e[u];t(m,u,e)&&(s.push(m),h.push(u))}return Su(e,h),s}function _a(e){return e==null?e:Bf.call(e)}function Xg(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:K(t),s=s===r?u:K(s)),ft(e,t,s)):[]}function Zg(e,t){return Li(e,t)}function jg(e,t,s){return js(e,t,B(s,2))}function ep(e,t){var s=e==null?0:e.length;if(s){var u=Li(e,t);if(u<s&&bt(e[u],t))return u}return-1}function tp(e,t){return Li(e,t,!0)}function np(e,t,s){return js(e,t,B(s,2),!0)}function rp(e,t){var s=e==null?0:e.length;if(s){var u=Li(e,t,!0)-1;if(bt(e[u],t))return u}return-1}function ip(e){return e&&e.length?Cu(e):[]}function sp(e,t){return e&&e.length?Cu(e,B(t,2)):[]}function ap(e){var t=e==null?0:e.length;return t?ft(e,1,t):[]}function op(e,t,s){return e&&e.length?(t=s||t===r?1:K(t),ft(e,0,t<0?0:t)):[]}function up(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:K(t),t=u-t,ft(e,t<0?0:t,u)):[]}function lp(e,t){return e&&e.length?Ni(e,B(t,3),!1,!0):[]}function cp(e,t){return e&&e.length?Ni(e,B(t,3)):[]}var hp=J(function(e){return sn(Ne(e,1,_e,!0))}),fp=J(function(e){var t=dt(e);return _e(t)&&(t=r),sn(Ne(e,1,_e,!0),B(t,2))}),dp=J(function(e){var t=dt(e);return t=typeof t=="function"?t:r,sn(Ne(e,1,_e,!0),r,t)});function gp(e){return e&&e.length?sn(e):[]}function pp(e,t){return e&&e.length?sn(e,B(t,2)):[]}function _p(e,t){return t=typeof t=="function"?t:r,e&&e.length?sn(e,r,t):[]}function ma(e){if(!(e&&e.length))return[];var t=0;return e=jt(e,function(s){if(_e(s))return t=Ee(s.length,t),!0}),Os(t,function(s){return fe(e,Ls(s))})}function ul(e,t){if(!(e&&e.length))return[];var s=ma(e);return t==null?s:fe(s,function(u){return je(t,r,u)})}var mp=J(function(e,t){return _e(e)?$r(e,t):[]}),vp=J(function(e){return ta(jt(e,_e))}),wp=J(function(e){var t=dt(e);return _e(t)&&(t=r),ta(jt(e,_e),B(t,2))}),Sp=J(function(e){var t=dt(e);return t=typeof t=="function"?t:r,ta(jt(e,_e),r,t)}),Ep=J(ma);function Cp(e,t){return Ru(e||[],t||[],Or)}function Tp(e,t){return Ru(e||[],t||[],Fr)}var yp=J(function(e){var t=e.length,s=t>1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,ul(e,s)});function ll(e){var t=d(e);return t.__chain__=!0,t}function bp(e,t){return t(e),e}function Wi(e,t){return t(e)}var Rp=Bt(function(e){var t=e.length,s=t?e[0]:0,u=this.__wrapped__,h=function(g){return Vs(g,e)};return t>1||this.__actions__.length||!(u instanceof ee)||!Gt(s)?this.thru(h):(u=u.slice(s,+s+(t?1:0)),u.__actions__.push({func:Wi,args:[h],thisArg:r}),new ct(u,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function Ap(){return ll(this)}function Pp(){return new ct(this.value(),this.__chain__)}function Ip(){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 xp(){return this}function Lp(e){for(var t,s=this;s instanceof Ri;){var u=nl(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 Np(){var e=this.__wrapped__;if(e instanceof ee){var t=e;return this.__actions__.length&&(t=new ee(this)),t=t.reverse(),t.__actions__.push({func:Wi,args:[_a],thisArg:r}),new ct(t,this.__chain__)}return this.thru(_a)}function Up(){return bu(this.__wrapped__,this.__actions__)}var Op=Ui(function(e,t,s){se.call(e,s)?++e[s]:Nt(e,s,1)});function $p(e,t,s){var u=z(e)?Fo:bd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}function Dp(e,t){var s=z(e)?jt:uu;return s(e,B(t,3))}var Mp=Du(rl),Fp=Du(il);function kp(e,t){return Ne(Vi(e,t),1)}function Hp(e,t){return Ne(Vi(e,t),ot)}function Wp(e,t,s){return s=s===r?1:K(s),Ne(Vi(e,t),s)}function cl(e,t){var s=z(e)?et:rn;return s(e,B(t,3))}function hl(e,t){var s=z(e)?af:ou;return s(e,B(t,3))}var Vp=Ui(function(e,t,s){se.call(e,s)?e[s].push(t):Nt(e,s,[t])});function Bp(e,t,s,u){e=ze(e)?e:rr(e),s=s&&!u?K(s):0;var h=e.length;return s<0&&(s=Ee(h+s,0)),zi(e)?s<=h&&e.indexOf(t,s)>-1:!!h&&Qn(e,t,s)>-1}var Gp=J(function(e,t,s){var u=-1,h=typeof t=="function",g=ze(e)?b(e.length):[];return rn(e,function(m){g[++u]=h?je(t,m,s):Dr(m,t,s)}),g}),Qp=Ui(function(e,t,s){Nt(e,s,t)});function Vi(e,t){var s=z(e)?fe:gu;return s(e,B(t,3))}function qp(e,t,s,u){return e==null?[]:(z(t)||(t=t==null?[]:[t]),s=u?r:s,z(s)||(s=s==null?[]:[s]),vu(e,t,s))}var zp=Ui(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Kp(e,t,s){var u=z(e)?Is:Vo,h=arguments.length<3;return u(e,B(t,4),s,h,rn)}function Yp(e,t,s){var u=z(e)?of:Vo,h=arguments.length<3;return u(e,B(t,4),s,h,ou)}function Jp(e,t){var s=z(e)?jt:uu;return s(e,Qi(B(t,3)))}function Xp(e){var t=z(e)?ru:Bd;return t(e)}function Zp(e,t,s){(s?We(e,t,s):t===r)?t=1:t=K(t);var u=z(e)?Sd:Gd;return u(e,t)}function jp(e){var t=z(e)?Ed:qd;return t(e)}function e_(e){if(e==null)return 0;if(ze(e))return zi(e)?zn(e):e.length;var t=Me(e);return t==St||t==Et?e.size:Ks(e).length}function t_(e,t,s){var u=z(e)?xs:zd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}var n_=J(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]]),vu(e,Ne(t,1),[])}),Bi=Df||function(){return Le.Date.now()};function r_(e,t){if(typeof t!="function")throw new lt(l);return e=K(e),function(){if(--e<1)return t.apply(this,arguments)}}function fl(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Vt(e,ye,r,r,r,r,t)}function dl(e,t){var s;if(typeof t!="function")throw new lt(l);return e=K(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var va=J(function(e,t,s){var u=H;if(s.length){var h=tn(s,tr(va));u|=xe}return Vt(e,u,t,s,h)}),gl=J(function(e,t,s){var u=H|re;if(s.length){var h=tn(s,tr(gl));u|=xe}return Vt(t,u,e,s,h)});function pl(e,t,s){t=s?r:t;var u=Vt(e,Ie,r,r,r,r,r,t);return u.placeholder=pl.placeholder,u}function _l(e,t,s){t=s?r:t;var u=Vt(e,Qe,r,r,r,r,r,t);return u.placeholder=_l.placeholder,u}function ml(e,t,s){var u,h,g,m,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?Ee(gt(s.maxWait)||0,t):g,M="trailing"in s?!!s.trailing:M);function W(me){var Rt=u,zt=h;return u=h=r,P=me,m=e.apply(zt,Rt),m}function G(me){return P=me,v=Wr(Z,t),I?W(me):m}function Y(me){var Rt=me-S,zt=me-P,Ml=t-Rt;return L?De(Ml,g-zt):Ml}function V(me){var Rt=me-S,zt=me-P;return S===r||Rt>=t||Rt<0||L&&zt>=g}function Z(){var me=Bi();if(V(me))return te(me);v=Wr(Z,Y(me))}function te(me){return v=r,M&&u?W(me):(u=h=r,m)}function it(){v!==r&&Au(v),P=0,u=S=h=v=r}function Ve(){return v===r?m:te(Bi())}function st(){var me=Bi(),Rt=V(me);if(u=arguments,h=this,S=me,Rt){if(v===r)return G(S);if(L)return Au(v),v=Wr(Z,t),W(S)}return v===r&&(v=Wr(Z,t)),m}return st.cancel=it,st.flush=Ve,st}var i_=J(function(e,t){return au(e,1,t)}),s_=J(function(e,t,s){return au(e,gt(t)||0,s)});function a_(e){return Vt(e,ve)}function Gi(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 m=e.apply(this,u);return s.cache=g.set(h,m)||g,m};return s.cache=new(Gi.Cache||Wt),s}Gi.Cache=Wt;function Qi(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 o_(e){return dl(2,e)}var u_=Kd(function(e,t){t=t.length==1&&z(t[0])?fe(t[0],tt(B())):fe(Ne(t,1),tt(B()));var s=t.length;return J(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)})}),wa=J(function(e,t){var s=tn(t,tr(wa));return Vt(e,xe,r,t,s)}),vl=J(function(e,t){var s=tn(t,tr(vl));return Vt(e,Ze,r,t,s)}),l_=Bt(function(e,t){return Vt(e,be,r,r,r,t)});function c_(e,t){if(typeof e!="function")throw new lt(l);return t=t===r?t:K(t),J(e,t)}function h_(e,t){if(typeof e!="function")throw new lt(l);return t=t==null?0:Ee(K(t),0),J(function(s){var u=s[t],h=on(s,0,t);return u&&en(h,u),je(e,this,h)})}function f_(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),ml(e,t,{leading:u,maxWait:t,trailing:h})}function d_(e){return fl(e,1)}function g_(e,t){return wa(ra(t),e)}function p_(){if(!arguments.length)return[];var e=arguments[0];return z(e)?e:[e]}function __(e){return ht(e,A)}function m_(e,t){return t=typeof t=="function"?t:r,ht(e,A,t)}function v_(e){return ht(e,E|A)}function w_(e,t){return t=typeof t=="function"?t:r,ht(e,E|A,t)}function S_(e,t){return t==null||su(e,t,Ae(t))}function bt(e,t){return e===t||e!==e&&t!==t}var E_=Mi(Qs),C_=Mi(function(e,t){return e>=t}),xn=hu((function(){return arguments})())?hu:function(e){return ge(e)&&se.call(e,"callee")&&!Xo.call(e,"callee")},z=b.isArray,T_=No?tt(No):Ld;function ze(e){return e!=null&&qi(e.length)&&!Qt(e)}function _e(e){return ge(e)&&ze(e)}function y_(e){return e===!0||e===!1||ge(e)&&He(e)==Er}var un=Ff||La,b_=Uo?tt(Uo):Nd;function R_(e){return ge(e)&&e.nodeType===1&&!Vr(e)}function A_(e){if(e==null)return!0;if(ze(e)&&(z(e)||typeof e=="string"||typeof e.splice=="function"||un(e)||nr(e)||xn(e)))return!e.length;var t=Me(e);if(t==St||t==Et)return!e.size;if(Hr(e))return!Ks(e).length;for(var s in e)if(se.call(e,s))return!1;return!0}function P_(e,t){return Mr(e,t)}function I_(e,t,s){s=typeof s=="function"?s:r;var u=s?s(e,t):r;return u===r?Mr(e,t,r,s):!!u}function Sa(e){if(!ge(e))return!1;var t=He(e);return t==ii||t==Zc||typeof e.message=="string"&&typeof e.name=="string"&&!Vr(e)}function x_(e){return typeof e=="number"&&jo(e)}function Qt(e){if(!de(e))return!1;var t=He(e);return t==si||t==io||t==Xc||t==eh}function wl(e){return typeof e=="number"&&e==K(e)}function qi(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 ge(e){return e!=null&&typeof e=="object"}var Sl=Oo?tt(Oo):Od;function L_(e,t){return e===t||zs(e,t,ca(t))}function N_(e,t,s){return s=typeof s=="function"?s:r,zs(e,t,ca(t),s)}function U_(e){return El(e)&&e!=+e}function O_(e){if(mg(e))throw new Q(c);return fu(e)}function $_(e){return e===null}function D_(e){return e==null}function El(e){return typeof e=="number"||ge(e)&&He(e)==Tr}function Vr(e){if(!ge(e)||He(e)!=kt)return!1;var t=wi(e);if(t===null)return!0;var s=se.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&pi.call(s)==Nf}var Ea=$o?tt($o):$d;function M_(e){return wl(e)&&e>=-oe&&e<=oe}var Cl=Do?tt(Do):Dd;function zi(e){return typeof e=="string"||!z(e)&&ge(e)&&He(e)==br}function rt(e){return typeof e=="symbol"||ge(e)&&He(e)==ai}var nr=Mo?tt(Mo):Md;function F_(e){return e===r}function k_(e){return ge(e)&&Me(e)==Rr}function H_(e){return ge(e)&&He(e)==nh}var W_=Mi(Ys),V_=Mi(function(e,t){return e<=t});function Tl(e){if(!e)return[];if(ze(e))return zi(e)?Ct(e):qe(e);if(Ir&&e[Ir])return Sf(e[Ir]());var t=Me(e),s=t==St?Ds:t==Et?fi:rr;return s(e)}function qt(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 K(e){var t=qt(e),s=t%1;return t===t?s?t-s:t:0}function yl(e){return e?Rn(K(e),0,Lt):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return Zt;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=Bo(e);var s=Ch.test(e);return s||yh.test(e)?nf(e.slice(2),s?2:8):Eh.test(e)?Zt:+e}function bl(e){return Ot(e,Ke(e))}function B_(e){return e?Rn(K(e),-oe,oe):e===0?e:0}function ae(e){return e==null?"":nt(e)}var G_=jn(function(e,t){if(Hr(t)||ze(t)){Ot(t,Ae(t),e);return}for(var s in t)se.call(t,s)&&Or(e,s,t[s])}),Rl=jn(function(e,t){Ot(t,Ke(t),e)}),Al=jn(function(e,t,s,u){Ot(t,Ke(t),e,u)}),Ca=jn(function(e,t,s,u){Ot(t,Ae(t),e,u)}),Q_=Bt(Vs);function q_(e,t){var s=Zn(e);return t==null?s:iu(s,t)}var z_=J(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],m=Ke(g),v=-1,S=m.length;++v<S;){var P=m[v],I=e[P];(I===r||bt(I,Yn[P])&&!se.call(e,P))&&(e[P]=g[P])}return e}),K_=J(function(e){return e.push(r,Bu),je(Pl,r,e)});function Y_(e,t){return ko(e,B(t,3),Ut)}function J_(e,t){return ko(e,B(t,3),Gs)}function X_(e,t){return e==null?e:Bs(e,B(t,3),Ke)}function Z_(e,t){return e==null?e:lu(e,B(t,3),Ke)}function j_(e,t){return e&&Ut(e,B(t,3))}function em(e,t){return e&&Gs(e,B(t,3))}function tm(e){return e==null?[]:Ii(e,Ae(e))}function nm(e){return e==null?[]:Ii(e,Ke(e))}function Ta(e,t,s){var u=e==null?r:An(e,t);return u===r?s:u}function rm(e,t){return e!=null&&qu(e,t,Ad)}function ya(e,t){return e!=null&&qu(e,t,Pd)}var im=Fu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),e[t]=s},Ra(Ye)),sm=Fu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),se.call(e,t)?e[t].push(s):e[t]=[s]},B),am=J(Dr);function Ae(e){return ze(e)?nu(e):Ks(e)}function Ke(e){return ze(e)?nu(e,!0):Fd(e)}function om(e,t){var s={};return t=B(t,3),Ut(e,function(u,h,g){Nt(s,t(u,h,g),u)}),s}function um(e,t){var s={};return t=B(t,3),Ut(e,function(u,h,g){Nt(s,h,t(u,h,g))}),s}var lm=jn(function(e,t,s){xi(e,t,s)}),Pl=jn(function(e,t,s,u){xi(e,t,s,u)}),cm=Bt(function(e,t){var s={};if(e==null)return s;var u=!1;t=fe(t,function(g){return g=an(g,e),u||(u=g.length>1),g}),Ot(e,ua(e),s),u&&(s=ht(s,E|y|A,sg));for(var h=t.length;h--;)ea(s,t[h]);return s});function hm(e,t){return Il(e,Qi(B(t)))}var fm=Bt(function(e,t){return e==null?{}:Hd(e,t)});function Il(e,t){if(e==null)return{};var s=fe(ua(e),function(u){return[u]});return t=B(t),wu(e,s,function(u,h){return t(u,h[0])})}function dm(e,t,s){t=an(t,e);var u=-1,h=t.length;for(h||(h=1,e=r);++u<h;){var g=e==null?r:e[yt(t[u])];g===r&&(u=h,g=s),e=Qt(g)?g.call(e):g}return e}function gm(e,t,s){return e==null?e:Fr(e,t,s)}function pm(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:Fr(e,t,s,u)}var xl=Wu(Ae),Ll=Wu(Ke);function _m(e,t,s){var u=z(e),h=u||un(e)||nr(e);if(t=B(t,4),s==null){var g=e&&e.constructor;h?s=u?new g:[]:de(e)?s=Qt(g)?Zn(wi(e)):{}:s={}}return(h?et:Ut)(e,function(m,v,S){return t(s,m,v,S)}),s}function mm(e,t){return e==null?!0:ea(e,t)}function vm(e,t,s){return e==null?e:yu(e,t,ra(s))}function wm(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:yu(e,t,ra(s),u)}function rr(e){return e==null?[]:$s(e,Ae(e))}function Sm(e){return e==null?[]:$s(e,Ke(e))}function Em(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),Rn(gt(e),t,s)}function Cm(e,t,s){return t=qt(t),s===r?(s=t,t=0):s=qt(s),e=gt(e),Id(e,t,s)}function Tm(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=qt(e),t===r?(t=e,e=0):t=qt(t)),e>t){var u=e;e=t,t=u}if(s||e%1||t%1){var h=eu();return De(e+h*(t-e+tf("1e-"+((h+"").length-1))),t)}return Xs(e,t)}var ym=er(function(e,t,s){return t=t.toLowerCase(),e+(s?Nl(t):t)});function Nl(e){return ba(ae(e).toLowerCase())}function Ul(e){return e=ae(e),e&&e.replace(Rh,pf).replace(Qh,"")}function bm(e,t,s){e=ae(e),t=nt(t);var u=e.length;s=s===r?u:Rn(K(s),0,u);var h=s;return s-=t.length,s>=0&&e.slice(s,h)==t}function Rm(e){return e=ae(e),e&&oh.test(e)?e.replace(oo,_f):e}function Am(e){return e=ae(e),e&&dh.test(e)?e.replace(ws,"\\$&"):e}var Pm=er(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),Im=er(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),xm=$u("toLowerCase");function Lm(e,t,s){e=ae(e),t=K(t);var u=t?zn(e):0;if(!t||u>=t)return e;var h=(t-u)/2;return Di(Ti(h),s)+e+Di(Ci(h),s)}function Nm(e,t,s){e=ae(e),t=K(t);var u=t?zn(e):0;return t&&u<t?e+Di(t-u,s):e}function Um(e,t,s){e=ae(e),t=K(t);var u=t?zn(e):0;return t&&u<t?Di(t-u,s)+e:e}function Om(e,t,s){return s||t==null?t=0:t&&(t=+t),Vf(ae(e).replace(Ss,""),t||0)}function $m(e,t,s){return(s?We(e,t,s):t===r)?t=1:t=K(t),Zs(ae(e),t)}function Dm(){var e=arguments,t=ae(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Mm=er(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function Fm(e,t,s){return s&&typeof s!="number"&&We(e,t,s)&&(t=s=r),s=s===r?Lt:s>>>0,s?(e=ae(e),e&&(typeof t=="string"||t!=null&&!Ea(t))&&(t=nt(t),!t&&qn(e))?on(Ct(e),0,s):e.split(t,s)):[]}var km=er(function(e,t,s){return e+(s?" ":"")+ba(t)});function Hm(e,t,s){return e=ae(e),s=s==null?0:Rn(K(s),0,e.length),t=nt(t),e.slice(s,s+t.length)==t}function Wm(e,t,s){var u=d.templateSettings;s&&We(e,t,s)&&(t=r),e=ae(e),t=Ca({},t,u,Vu);var h=Ca({},t.imports,u.imports,Vu),g=Ae(h),m=$s(h,g);et(g,function(V){if(lo.test(V))throw new Q(p)});var v,S,P=0,I=t.interpolate||oi,L="__p += '",M=Ms((t.escape||oi).source+"|"+I.source+"|"+(I===uo?Sh:oi).source+"|"+(t.evaluate||oi).source+"|$","g"),W="//# sourceURL="+(se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jh+"]")+`
|
|
3
|
+
`)}function gg(e){return z(e)||Ln(e)||!!(Zo&&e&&e[Zo])}function Gt(e,t){var s=typeof e;return t=t??oe,!!t&&(s=="number"||s!="symbol"&&bh.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)&&Gt(t,s.length):u=="string"&&t in s)?bt(s[t],e):!1}function fa(e,t){if(z(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||rt(e)?!0:hh.test(e)||!ch.test(e)||t!=null&&e in le(t)}function pg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e){var t=Fi(e),s=d[t];if(typeof s!="function"||!(t in ee.prototype))return!1;if(e===s)return!0;var u=la(s);return!!u&&e===u[0]}function _g(e){return!!Ko&&Ko in e}var mg=gi?Qt:La;function Hr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Jn;return e===s}function Ku(e){return e===e&&!de(e)}function Yu(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in le(s))}}function vg(e){var t=Gi(e,function(u){return s.size===C&&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|ye),m=u==ye&&s==Ie||u==ye&&s==be&&e[7].length<=t[8]||u==(ye|be)&&t[7].length<=t[8]&&s==Ie;if(!(g||m))return e;u&H&&(e[2]=t[2],h|=s&H?0:Ue);var v=t[3];if(v){var w=e[3];e[3]=w?Lu(w,v,t[4]):v,e[4]=w?tn(e[3],T):t[4]}return v=t[5],v&&(w=e[5],e[5]=w?Nu(w,v,t[6]):v,e[6]=w?tn(e[5],T):t[6]),v=t[7],v&&(e[7]=v),u&ye&&(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 wg(e){var t=[];if(e!=null)for(var s in le(e))t.push(s);return t}function Eg(e){return _i.call(e)}function Ju(e,t,s){return t=Ee(t===r?e.length-1:t,0),function(){for(var u=arguments,h=-1,g=Ee(u.length-t,0),m=b(g);++h<g;)m[h]=u[t+h];h=-1;for(var v=b(t+1);++h<t;)v[h]=u[h];return v[t]=s(m),je(e,this,v)}}function Xu(e,t){return t.length<2?e:Pn(e,ft(t,0,-1))}function Cg(e,t){for(var s=e.length,u=De(t.length,s),h=ze(e);u--;){var g=t[u];e[u]=Gt(g,s)?h[g]:r}return e}function ga(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Zu=el(Eu),Wr=Mf||function(e,t){return Le.setTimeout(e,t)},pa=el(Qd);function ju(e,t,s){var u=t+"";return pa(e,dg(u,Tg(cg(u),s)))}function el(e){var t=0,s=0;return function(){var u=Wf(),h=St-(u-s);if(s=u,h>0){if(++t>=Xt)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Hi(e,t){var s=-1,u=e.length,h=u-1;for(t=t===r?u:t;++s<t;){var g=Xs(s,h),m=e[g];e[g]=e[s],e[s]=m}return e.length=t,e}var tl=vg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fh,function(s,u,h,g){t.push(h?g.replace(Sh,"$1"):u||s)}),t});function yt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-ot?"-0":t}function xn(e){if(e!=null){try{return pi.call(e)}catch{}try{return e+""}catch{}}return""}function Tg(e,t){return et(Jc,function(s){var u="_."+s[0];t&s[1]&&!ci(e,u)&&e.push(u)}),e.sort()}function nl(e){if(e instanceof ee)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 yg(e,t,s){(s?We(e,t,s):t===r)?t=1:t=Ee(Y(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var h=0,g=0,m=b(Ci(u/t));h<u;)m[g++]=ft(e,h,h+=t);return m}function bg(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 Rg(){var e=arguments.length;if(!e)return[];for(var t=b(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return en(z(s)?ze(s):[s],Ne(t,1))}var Ag=X(function(e,t){return _e(e)?$r(e,Ne(t,1,_e,!0)):[]}),Pg=X(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?$r(e,Ne(t,1,_e,!0),B(s,2)):[]}),Ig=X(function(e,t){var s=dt(t);return _e(s)&&(s=r),_e(e)?$r(e,Ne(t,1,_e,!0),r,s):[]});function xg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:Y(t),ft(e,t<0?0:t,u)):[]}function Lg(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:Y(t),t=u-t,ft(e,0,t<0?0:t)):[]}function Ng(e,t){return e&&e.length?Ni(e,B(t,3),!0,!0):[]}function Og(e,t){return e&&e.length?Ni(e,B(t,3),!0):[]}function Ug(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),Rd(e,t,s,u)):[]}function rl(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:Y(s);return h<0&&(h=Ee(u+h,0)),hi(e,B(t,3),h)}function il(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u-1;return s!==r&&(h=Y(s),h=s<0?Ee(u+h,0):De(h,u-1)),hi(e,B(t,3),h,!0)}function sl(e){var t=e==null?0:e.length;return t?Ne(e,1):[]}function $g(e){var t=e==null?0:e.length;return t?Ne(e,ot):[]}function Dg(e,t){var s=e==null?0:e.length;return s?(t=t===r?1:Y(t),Ne(e,t)):[]}function Mg(e){for(var t=-1,s=e==null?0:e.length,u={};++t<s;){var h=e[t];Nt(u,h[0],h[1])}return u}function al(e){return e&&e.length?e[0]:r}function Fg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=s==null?0:Y(s);return h<0&&(h=Ee(u+h,0)),qn(e,t,h)}function kg(e){var t=e==null?0:e.length;return t?ft(e,0,-1):[]}var Hg=X(function(e){var t=fe(e,na);return t.length&&t[0]===e[0]?qs(t):[]}),Wg=X(function(e){var t=dt(e),s=fe(e,na);return t===dt(s)?t=r:s.pop(),s.length&&s[0]===e[0]?qs(s,B(t,2)):[]}),Vg=X(function(e){var t=dt(e),s=fe(e,na);return t=typeof t=="function"?t:r,t&&s.pop(),s.length&&s[0]===e[0]?qs(s,r,t):[]});function Bg(e,t){return e==null?"":kf.call(e,t)}function dt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function Gg(e,t,s){var u=e==null?0:e.length;if(!u)return-1;var h=u;return s!==r&&(h=Y(s),h=h<0?Ee(u+h,0):De(h,u-1)),t===t?Tf(e,t,h):hi(e,Ho,h,!0)}function Qg(e,t){return e&&e.length?mu(e,Y(t)):r}var qg=X(ol);function ol(e,t){return e&&e.length&&t&&t.length?Js(e,t):e}function zg(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,B(s,2)):e}function Kg(e,t,s){return e&&e.length&&t&&t.length?Js(e,t,r,s):e}var Yg=Bt(function(e,t){var s=e==null?0:e.length,u=Vs(e,t);return wu(e,fe(t,function(h){return Gt(h,s)?+h:h}).sort(xu)),u});function Jg(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 m=e[u];t(m,u,e)&&(s.push(m),h.push(u))}return wu(e,h),s}function _a(e){return e==null?e:Bf.call(e)}function Xg(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:Y(t),s=s===r?u:Y(s)),ft(e,t,s)):[]}function Zg(e,t){return Li(e,t)}function jg(e,t,s){return js(e,t,B(s,2))}function ep(e,t){var s=e==null?0:e.length;if(s){var u=Li(e,t);if(u<s&&bt(e[u],t))return u}return-1}function tp(e,t){return Li(e,t,!0)}function np(e,t,s){return js(e,t,B(s,2),!0)}function rp(e,t){var s=e==null?0:e.length;if(s){var u=Li(e,t,!0)-1;if(bt(e[u],t))return u}return-1}function ip(e){return e&&e.length?Cu(e):[]}function sp(e,t){return e&&e.length?Cu(e,B(t,2)):[]}function ap(e){var t=e==null?0:e.length;return t?ft(e,1,t):[]}function op(e,t,s){return e&&e.length?(t=s||t===r?1:Y(t),ft(e,0,t<0?0:t)):[]}function up(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:Y(t),t=u-t,ft(e,t<0?0:t,u)):[]}function lp(e,t){return e&&e.length?Ni(e,B(t,3),!1,!0):[]}function cp(e,t){return e&&e.length?Ni(e,B(t,3)):[]}var hp=X(function(e){return sn(Ne(e,1,_e,!0))}),fp=X(function(e){var t=dt(e);return _e(t)&&(t=r),sn(Ne(e,1,_e,!0),B(t,2))}),dp=X(function(e){var t=dt(e);return t=typeof t=="function"?t:r,sn(Ne(e,1,_e,!0),r,t)});function gp(e){return e&&e.length?sn(e):[]}function pp(e,t){return e&&e.length?sn(e,B(t,2)):[]}function _p(e,t){return t=typeof t=="function"?t:r,e&&e.length?sn(e,r,t):[]}function ma(e){if(!(e&&e.length))return[];var t=0;return e=jt(e,function(s){if(_e(s))return t=Ee(s.length,t),!0}),Us(t,function(s){return fe(e,Ls(s))})}function ul(e,t){if(!(e&&e.length))return[];var s=ma(e);return t==null?s:fe(s,function(u){return je(t,r,u)})}var mp=X(function(e,t){return _e(e)?$r(e,t):[]}),vp=X(function(e){return ta(jt(e,_e))}),Sp=X(function(e){var t=dt(e);return _e(t)&&(t=r),ta(jt(e,_e),B(t,2))}),wp=X(function(e){var t=dt(e);return t=typeof t=="function"?t:r,ta(jt(e,_e),r,t)}),Ep=X(ma);function Cp(e,t){return Ru(e||[],t||[],Ur)}function Tp(e,t){return Ru(e||[],t||[],Fr)}var yp=X(function(e){var t=e.length,s=t>1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,ul(e,s)});function ll(e){var t=d(e);return t.__chain__=!0,t}function bp(e,t){return t(e),e}function Wi(e,t){return t(e)}var Rp=Bt(function(e){var t=e.length,s=t?e[0]:0,u=this.__wrapped__,h=function(g){return Vs(g,e)};return t>1||this.__actions__.length||!(u instanceof ee)||!Gt(s)?this.thru(h):(u=u.slice(s,+s+(t?1:0)),u.__actions__.push({func:Wi,args:[h],thisArg:r}),new ct(u,this.__chain__).thru(function(g){return t&&!g.length&&g.push(r),g}))});function Ap(){return ll(this)}function Pp(){return new ct(this.value(),this.__chain__)}function Ip(){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 xp(){return this}function Lp(e){for(var t,s=this;s instanceof Ri;){var u=nl(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 Np(){var e=this.__wrapped__;if(e instanceof ee){var t=e;return this.__actions__.length&&(t=new ee(this)),t=t.reverse(),t.__actions__.push({func:Wi,args:[_a],thisArg:r}),new ct(t,this.__chain__)}return this.thru(_a)}function Op(){return bu(this.__wrapped__,this.__actions__)}var Up=Oi(function(e,t,s){se.call(e,s)?++e[s]:Nt(e,s,1)});function $p(e,t,s){var u=z(e)?Fo:bd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}function Dp(e,t){var s=z(e)?jt:uu;return s(e,B(t,3))}var Mp=Du(rl),Fp=Du(il);function kp(e,t){return Ne(Vi(e,t),1)}function Hp(e,t){return Ne(Vi(e,t),ot)}function Wp(e,t,s){return s=s===r?1:Y(s),Ne(Vi(e,t),s)}function cl(e,t){var s=z(e)?et:rn;return s(e,B(t,3))}function hl(e,t){var s=z(e)?af:ou;return s(e,B(t,3))}var Vp=Oi(function(e,t,s){se.call(e,s)?e[s].push(t):Nt(e,s,[t])});function Bp(e,t,s,u){e=Ke(e)?e:ir(e),s=s&&!u?Y(s):0;var h=e.length;return s<0&&(s=Ee(h+s,0)),zi(e)?s<=h&&e.indexOf(t,s)>-1:!!h&&qn(e,t,s)>-1}var Gp=X(function(e,t,s){var u=-1,h=typeof t=="function",g=Ke(e)?b(e.length):[];return rn(e,function(m){g[++u]=h?je(t,m,s):Dr(m,t,s)}),g}),Qp=Oi(function(e,t,s){Nt(e,s,t)});function Vi(e,t){var s=z(e)?fe:gu;return s(e,B(t,3))}function qp(e,t,s,u){return e==null?[]:(z(t)||(t=t==null?[]:[t]),s=u?r:s,z(s)||(s=s==null?[]:[s]),vu(e,t,s))}var zp=Oi(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Kp(e,t,s){var u=z(e)?Is:Vo,h=arguments.length<3;return u(e,B(t,4),s,h,rn)}function Yp(e,t,s){var u=z(e)?of:Vo,h=arguments.length<3;return u(e,B(t,4),s,h,ou)}function Jp(e,t){var s=z(e)?jt:uu;return s(e,Qi(B(t,3)))}function Xp(e){var t=z(e)?ru:Bd;return t(e)}function Zp(e,t,s){(s?We(e,t,s):t===r)?t=1:t=Y(t);var u=z(e)?wd:Gd;return u(e,t)}function jp(e){var t=z(e)?Ed:qd;return t(e)}function e_(e){if(e==null)return 0;if(Ke(e))return zi(e)?Kn(e):e.length;var t=Me(e);return t==wt||t==Et?e.size:Ks(e).length}function t_(e,t,s){var u=z(e)?xs:zd;return s&&We(e,t,s)&&(t=r),u(e,B(t,3))}var n_=X(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]]),vu(e,Ne(t,1),[])}),Bi=Df||function(){return Le.Date.now()};function r_(e,t){if(typeof t!="function")throw new lt(l);return e=Y(e),function(){if(--e<1)return t.apply(this,arguments)}}function fl(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Vt(e,ye,r,r,r,r,t)}function dl(e,t){var s;if(typeof t!="function")throw new lt(l);return e=Y(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var va=X(function(e,t,s){var u=H;if(s.length){var h=tn(s,nr(va));u|=xe}return Vt(e,u,t,s,h)}),gl=X(function(e,t,s){var u=H|re;if(s.length){var h=tn(s,nr(gl));u|=xe}return Vt(t,u,e,s,h)});function pl(e,t,s){t=s?r:t;var u=Vt(e,Ie,r,r,r,r,r,t);return u.placeholder=pl.placeholder,u}function _l(e,t,s){t=s?r:t;var u=Vt(e,qe,r,r,r,r,r,t);return u.placeholder=_l.placeholder,u}function ml(e,t,s){var u,h,g,m,v,w,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?Ee(gt(s.maxWait)||0,t):g,M="trailing"in s?!!s.trailing:M);function W(me){var Rt=u,zt=h;return u=h=r,P=me,m=e.apply(zt,Rt),m}function G(me){return P=me,v=Wr(Z,t),I?W(me):m}function J(me){var Rt=me-w,zt=me-P,Ml=t-Rt;return L?De(Ml,g-zt):Ml}function V(me){var Rt=me-w,zt=me-P;return w===r||Rt>=t||Rt<0||L&&zt>=g}function Z(){var me=Bi();if(V(me))return te(me);v=Wr(Z,J(me))}function te(me){return v=r,M&&u?W(me):(u=h=r,m)}function it(){v!==r&&Au(v),P=0,u=w=h=v=r}function Ve(){return v===r?m:te(Bi())}function st(){var me=Bi(),Rt=V(me);if(u=arguments,h=this,w=me,Rt){if(v===r)return G(w);if(L)return Au(v),v=Wr(Z,t),W(w)}return v===r&&(v=Wr(Z,t)),m}return st.cancel=it,st.flush=Ve,st}var i_=X(function(e,t){return au(e,1,t)}),s_=X(function(e,t,s){return au(e,gt(t)||0,s)});function a_(e){return Vt(e,ve)}function Gi(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 m=e.apply(this,u);return s.cache=g.set(h,m)||g,m};return s.cache=new(Gi.Cache||Wt),s}Gi.Cache=Wt;function Qi(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 o_(e){return dl(2,e)}var u_=Kd(function(e,t){t=t.length==1&&z(t[0])?fe(t[0],tt(B())):fe(Ne(t,1),tt(B()));var s=t.length;return X(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=X(function(e,t){var s=tn(t,nr(Sa));return Vt(e,xe,r,t,s)}),vl=X(function(e,t){var s=tn(t,nr(vl));return Vt(e,Ze,r,t,s)}),l_=Bt(function(e,t){return Vt(e,be,r,r,r,t)});function c_(e,t){if(typeof e!="function")throw new lt(l);return t=t===r?t:Y(t),X(e,t)}function h_(e,t){if(typeof e!="function")throw new lt(l);return t=t==null?0:Ee(Y(t),0),X(function(s){var u=s[t],h=on(s,0,t);return u&&en(h,u),je(e,this,h)})}function f_(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),ml(e,t,{leading:u,maxWait:t,trailing:h})}function d_(e){return fl(e,1)}function g_(e,t){return Sa(ra(t),e)}function p_(){if(!arguments.length)return[];var e=arguments[0];return z(e)?e:[e]}function __(e){return ht(e,A)}function m_(e,t){return t=typeof t=="function"?t:r,ht(e,A,t)}function v_(e){return ht(e,E|A)}function S_(e,t){return t=typeof t=="function"?t:r,ht(e,E|A,t)}function w_(e,t){return t==null||su(e,t,Ae(t))}function bt(e,t){return e===t||e!==e&&t!==t}var E_=Mi(Qs),C_=Mi(function(e,t){return e>=t}),Ln=hu((function(){return arguments})())?hu:function(e){return ge(e)&&se.call(e,"callee")&&!Xo.call(e,"callee")},z=b.isArray,T_=No?tt(No):Ld;function Ke(e){return e!=null&&qi(e.length)&&!Qt(e)}function _e(e){return ge(e)&&Ke(e)}function y_(e){return e===!0||e===!1||ge(e)&&He(e)==Er}var un=Ff||La,b_=Oo?tt(Oo):Nd;function R_(e){return ge(e)&&e.nodeType===1&&!Vr(e)}function A_(e){if(e==null)return!0;if(Ke(e)&&(z(e)||typeof e=="string"||typeof e.splice=="function"||un(e)||rr(e)||Ln(e)))return!e.length;var t=Me(e);if(t==wt||t==Et)return!e.size;if(Hr(e))return!Ks(e).length;for(var s in e)if(se.call(e,s))return!1;return!0}function P_(e,t){return Mr(e,t)}function I_(e,t,s){s=typeof s=="function"?s:r;var u=s?s(e,t):r;return u===r?Mr(e,t,r,s):!!u}function wa(e){if(!ge(e))return!1;var t=He(e);return t==ii||t==Zc||typeof e.message=="string"&&typeof e.name=="string"&&!Vr(e)}function x_(e){return typeof e=="number"&&jo(e)}function Qt(e){if(!de(e))return!1;var t=He(e);return t==si||t==io||t==Xc||t==eh}function Sl(e){return typeof e=="number"&&e==Y(e)}function qi(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 ge(e){return e!=null&&typeof e=="object"}var wl=Uo?tt(Uo):Ud;function L_(e,t){return e===t||zs(e,t,ca(t))}function N_(e,t,s){return s=typeof s=="function"?s:r,zs(e,t,ca(t),s)}function O_(e){return El(e)&&e!=+e}function U_(e){if(mg(e))throw new Q(c);return fu(e)}function $_(e){return e===null}function D_(e){return e==null}function El(e){return typeof e=="number"||ge(e)&&He(e)==Tr}function Vr(e){if(!ge(e)||He(e)!=kt)return!1;var t=Si(e);if(t===null)return!0;var s=se.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&pi.call(s)==Nf}var Ea=$o?tt($o):$d;function M_(e){return Sl(e)&&e>=-oe&&e<=oe}var Cl=Do?tt(Do):Dd;function zi(e){return typeof e=="string"||!z(e)&&ge(e)&&He(e)==br}function rt(e){return typeof e=="symbol"||ge(e)&&He(e)==ai}var rr=Mo?tt(Mo):Md;function F_(e){return e===r}function k_(e){return ge(e)&&Me(e)==Rr}function H_(e){return ge(e)&&He(e)==nh}var W_=Mi(Ys),V_=Mi(function(e,t){return e<=t});function Tl(e){if(!e)return[];if(Ke(e))return zi(e)?Ct(e):ze(e);if(Ir&&e[Ir])return wf(e[Ir]());var t=Me(e),s=t==wt?Ds:t==Et?fi:ir;return s(e)}function qt(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 Y(e){var t=qt(e),s=t%1;return t===t?s?t-s:t:0}function yl(e){return e?An(Y(e),0,Lt):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return Zt;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=Bo(e);var s=Ch.test(e);return s||yh.test(e)?nf(e.slice(2),s?2:8):Eh.test(e)?Zt:+e}function bl(e){return Ut(e,Ye(e))}function B_(e){return e?An(Y(e),-oe,oe):e===0?e:0}function ae(e){return e==null?"":nt(e)}var G_=er(function(e,t){if(Hr(t)||Ke(t)){Ut(t,Ae(t),e);return}for(var s in t)se.call(t,s)&&Ur(e,s,t[s])}),Rl=er(function(e,t){Ut(t,Ye(t),e)}),Al=er(function(e,t,s,u){Ut(t,Ye(t),e,u)}),Ca=er(function(e,t,s,u){Ut(t,Ae(t),e,u)}),Q_=Bt(Vs);function q_(e,t){var s=jn(e);return t==null?s:iu(s,t)}var z_=X(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],m=Ye(g),v=-1,w=m.length;++v<w;){var P=m[v],I=e[P];(I===r||bt(I,Jn[P])&&!se.call(e,P))&&(e[P]=g[P])}return e}),K_=X(function(e){return e.push(r,Bu),je(Pl,r,e)});function Y_(e,t){return ko(e,B(t,3),Ot)}function J_(e,t){return ko(e,B(t,3),Gs)}function X_(e,t){return e==null?e:Bs(e,B(t,3),Ye)}function Z_(e,t){return e==null?e:lu(e,B(t,3),Ye)}function j_(e,t){return e&&Ot(e,B(t,3))}function em(e,t){return e&&Gs(e,B(t,3))}function tm(e){return e==null?[]:Ii(e,Ae(e))}function nm(e){return e==null?[]:Ii(e,Ye(e))}function Ta(e,t,s){var u=e==null?r:Pn(e,t);return u===r?s:u}function rm(e,t){return e!=null&&qu(e,t,Ad)}function ya(e,t){return e!=null&&qu(e,t,Pd)}var im=Fu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),e[t]=s},Ra(Je)),sm=Fu(function(e,t,s){t!=null&&typeof t.toString!="function"&&(t=_i.call(t)),se.call(e,t)?e[t].push(s):e[t]=[s]},B),am=X(Dr);function Ae(e){return Ke(e)?nu(e):Ks(e)}function Ye(e){return Ke(e)?nu(e,!0):Fd(e)}function om(e,t){var s={};return t=B(t,3),Ot(e,function(u,h,g){Nt(s,t(u,h,g),u)}),s}function um(e,t){var s={};return t=B(t,3),Ot(e,function(u,h,g){Nt(s,h,t(u,h,g))}),s}var lm=er(function(e,t,s){xi(e,t,s)}),Pl=er(function(e,t,s,u){xi(e,t,s,u)}),cm=Bt(function(e,t){var s={};if(e==null)return s;var u=!1;t=fe(t,function(g){return g=an(g,e),u||(u=g.length>1),g}),Ut(e,ua(e),s),u&&(s=ht(s,E|y|A,sg));for(var h=t.length;h--;)ea(s,t[h]);return s});function hm(e,t){return Il(e,Qi(B(t)))}var fm=Bt(function(e,t){return e==null?{}:Hd(e,t)});function Il(e,t){if(e==null)return{};var s=fe(ua(e),function(u){return[u]});return t=B(t),Su(e,s,function(u,h){return t(u,h[0])})}function dm(e,t,s){t=an(t,e);var u=-1,h=t.length;for(h||(h=1,e=r);++u<h;){var g=e==null?r:e[yt(t[u])];g===r&&(u=h,g=s),e=Qt(g)?g.call(e):g}return e}function gm(e,t,s){return e==null?e:Fr(e,t,s)}function pm(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:Fr(e,t,s,u)}var xl=Wu(Ae),Ll=Wu(Ye);function _m(e,t,s){var u=z(e),h=u||un(e)||rr(e);if(t=B(t,4),s==null){var g=e&&e.constructor;h?s=u?new g:[]:de(e)?s=Qt(g)?jn(Si(e)):{}:s={}}return(h?et:Ot)(e,function(m,v,w){return t(s,m,v,w)}),s}function mm(e,t){return e==null?!0:ea(e,t)}function vm(e,t,s){return e==null?e:yu(e,t,ra(s))}function Sm(e,t,s,u){return u=typeof u=="function"?u:r,e==null?e:yu(e,t,ra(s),u)}function ir(e){return e==null?[]:$s(e,Ae(e))}function wm(e){return e==null?[]:$s(e,Ye(e))}function Em(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),An(gt(e),t,s)}function Cm(e,t,s){return t=qt(t),s===r?(s=t,t=0):s=qt(s),e=gt(e),Id(e,t,s)}function Tm(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=qt(e),t===r?(t=e,e=0):t=qt(t)),e>t){var u=e;e=t,t=u}if(s||e%1||t%1){var h=eu();return De(e+h*(t-e+tf("1e-"+((h+"").length-1))),t)}return Xs(e,t)}var ym=tr(function(e,t,s){return t=t.toLowerCase(),e+(s?Nl(t):t)});function Nl(e){return ba(ae(e).toLowerCase())}function Ol(e){return e=ae(e),e&&e.replace(Rh,pf).replace(Qh,"")}function bm(e,t,s){e=ae(e),t=nt(t);var u=e.length;s=s===r?u:An(Y(s),0,u);var h=s;return s-=t.length,s>=0&&e.slice(s,h)==t}function Rm(e){return e=ae(e),e&&oh.test(e)?e.replace(oo,_f):e}function Am(e){return e=ae(e),e&&dh.test(e)?e.replace(Ss,"\\$&"):e}var Pm=tr(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),Im=tr(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),xm=$u("toLowerCase");function Lm(e,t,s){e=ae(e),t=Y(t);var u=t?Kn(e):0;if(!t||u>=t)return e;var h=(t-u)/2;return Di(Ti(h),s)+e+Di(Ci(h),s)}function Nm(e,t,s){e=ae(e),t=Y(t);var u=t?Kn(e):0;return t&&u<t?e+Di(t-u,s):e}function Om(e,t,s){e=ae(e),t=Y(t);var u=t?Kn(e):0;return t&&u<t?Di(t-u,s)+e:e}function Um(e,t,s){return s||t==null?t=0:t&&(t=+t),Vf(ae(e).replace(ws,""),t||0)}function $m(e,t,s){return(s?We(e,t,s):t===r)?t=1:t=Y(t),Zs(ae(e),t)}function Dm(){var e=arguments,t=ae(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Mm=tr(function(e,t,s){return e+(s?"_":"")+t.toLowerCase()});function Fm(e,t,s){return s&&typeof s!="number"&&We(e,t,s)&&(t=s=r),s=s===r?Lt:s>>>0,s?(e=ae(e),e&&(typeof t=="string"||t!=null&&!Ea(t))&&(t=nt(t),!t&&zn(e))?on(Ct(e),0,s):e.split(t,s)):[]}var km=tr(function(e,t,s){return e+(s?" ":"")+ba(t)});function Hm(e,t,s){return e=ae(e),s=s==null?0:An(Y(s),0,e.length),t=nt(t),e.slice(s,s+t.length)==t}function Wm(e,t,s){var u=d.templateSettings;s&&We(e,t,s)&&(t=r),e=ae(e),t=Ca({},t,u,Vu);var h=Ca({},t.imports,u.imports,Vu),g=Ae(h),m=$s(h,g);et(g,function(V){if(lo.test(V))throw new Q(p)});var v,w,P=0,I=t.interpolate||oi,L="__p += '",M=Ms((t.escape||oi).source+"|"+I.source+"|"+(I===uo?wh:oi).source+"|"+(t.evaluate||oi).source+"|$","g"),W="//# sourceURL="+(se.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jh+"]")+`
|
|
4
4
|
`;e.replace(M,function(V,Z,te,it,Ve,st){return te||(te=it),L+=e.slice(P,st).replace(Ah,mf),Z&&(v=!0,L+=`' +
|
|
5
5
|
__e(`+Z+`) +
|
|
6
|
-
'`),Ve&&(
|
|
6
|
+
'`),Ve&&(w=!0,L+=`';
|
|
7
7
|
`+Ve+`;
|
|
8
8
|
__p += '`),te&&(L+=`' +
|
|
9
9
|
((__t = (`+te+`)) == null ? '' : __t) +
|
|
@@ -11,13 +11,13 @@ __p += '`),te&&(L+=`' +
|
|
|
11
11
|
`;var G=se.call(t,"variable")&&t.variable;if(!G)L=`with (obj) {
|
|
12
12
|
`+L+`
|
|
13
13
|
}
|
|
14
|
-
`;else if(lo.test(G))throw new Q(f);L=(
|
|
14
|
+
`;else if(lo.test(G))throw new Q(f);L=(w?L.replace(rh,""):L).replace(ih,"$1").replace(sh,"$1;"),L="function("+(G||"obj")+`) {
|
|
15
15
|
`+(G?"":`obj || (obj = {});
|
|
16
|
-
`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(
|
|
16
|
+
`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(w?`, __j = Array.prototype.join;
|
|
17
17
|
function print() { __p += __j.call(arguments, '') }
|
|
18
18
|
`:`;
|
|
19
19
|
`)+L+`return __p
|
|
20
|
-
}`;var Y=$l(function(){return ie(g,W+"return "+L).apply(r,m)});if(Y.source=L,Sa(Y))throw Y;return Y}function Vm(e){return ae(e).toLowerCase()}function Bm(e){return ae(e).toUpperCase()}function Gm(e,t,s){if(e=ae(e),e&&(s||t===r))return Bo(e);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Ct(t),g=Go(u,h),m=Qo(u,h)+1;return on(u,g,m).join("")}function Qm(e,t,s){if(e=ae(e),e&&(s||t===r))return e.slice(0,zo(e)+1);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Qo(u,Ct(t))+1;return on(u,0,h).join("")}function qm(e,t,s){if(e=ae(e),e&&(s||t===r))return e.replace(Ss,"");if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Go(u,Ct(t));return on(u,h).join("")}function zm(e,t){var s=Re,u=D;if(de(t)){var h="separator"in t?t.separator:h;s="length"in t?K(t.length):s,u="omission"in t?nt(t.omission):u}e=ae(e);var g=e.length;if(qn(e)){var m=Ct(e);g=m.length}if(s>=g)return e;var v=s-zn(u);if(v<1)return u;var S=m?on(m,0,v).join(""):e.slice(0,v);if(h===r)return S+u;if(m&&(v+=S.length-v),Ea(h)){if(e.slice(v).search(h)){var P,I=S;for(h.global||(h=Ms(h.source,ae(co.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 Km(e){return e=ae(e),e&&ah.test(e)?e.replace(ao,yf):e}var Ym=er(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),ba=$u("toUpperCase");function Ol(e,t,s){return e=ae(e),t=s?r:t,t===r?wf(e)?Af(e):cf(e):e.match(t)||[]}var $l=J(function(e,t){try{return je(e,r,t)}catch(s){return Sa(s)?s:new Q(s)}}),Jm=Bt(function(e,t){return et(t,function(s){s=yt(s),Nt(e,s,va(e[s],e))}),e});function Xm(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]]}):[],J(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 Zm(e){return yd(ht(e,E))}function Ra(e){return function(){return e}}function jm(e,t){return e==null||e!==e?t:e}var ev=Mu(),tv=Mu(!0);function Ye(e){return e}function Aa(e){return du(typeof e=="function"?e:ht(e,E))}function nv(e){return pu(ht(e,E))}function rv(e,t){return _u(e,ht(t,E))}var iv=J(function(e,t){return function(s){return Dr(s,e,t)}}),sv=J(function(e,t){return function(s){return Dr(e,s,t)}});function Pa(e,t,s){var u=Ae(t),h=Ii(t,u);s==null&&!(de(t)&&(h.length||!u.length))&&(s=t,t=e,e=this,h=Ii(t,Ae(t)));var g=!(de(s)&&"chain"in s)||!!s.chain,m=Qt(e);return et(h,function(v){var S=t[v];e[v]=S,m&&(e.prototype[v]=function(){var P=this.__chain__;if(g||P){var I=e(this.__wrapped__),L=I.__actions__=qe(this.__actions__);return L.push({func:S,args:arguments,thisArg:e}),I.__chain__=P,I}return S.apply(e,en([this.value()],arguments))})}),e}function av(){return Le._===this&&(Le._=Uf),this}function Ia(){}function ov(e){return e=K(e),J(function(t){return mu(t,e)})}var uv=sa(fe),lv=sa(Fo),cv=sa(xs);function Dl(e){return fa(e)?Ls(yt(e)):Wd(e)}function hv(e){return function(t){return e==null?r:An(e,t)}}var fv=ku(),dv=ku(!0);function xa(){return[]}function La(){return!1}function gv(){return{}}function pv(){return""}function _v(){return!0}function mv(e,t){if(e=K(e),e<1||e>oe)return[];var s=Lt,u=De(e,Lt);t=B(t),e-=Lt;for(var h=Os(u,t);++s<e;)t(s);return h}function vv(e){return z(e)?fe(e,yt):rt(e)?[e]:qe(tl(ae(e)))}function wv(e){var t=++Lf;return ae(e)+t}var Sv=$i(function(e,t){return e+t},0),Ev=aa("ceil"),Cv=$i(function(e,t){return e/t},1),Tv=aa("floor");function yv(e){return e&&e.length?Pi(e,Ye,Qs):r}function bv(e,t){return e&&e.length?Pi(e,B(t,2),Qs):r}function Rv(e){return Wo(e,Ye)}function Av(e,t){return Wo(e,B(t,2))}function Pv(e){return e&&e.length?Pi(e,Ye,Ys):r}function Iv(e,t){return e&&e.length?Pi(e,B(t,2),Ys):r}var xv=$i(function(e,t){return e*t},1),Lv=aa("round"),Nv=$i(function(e,t){return e-t},0);function Uv(e){return e&&e.length?Us(e,Ye):0}function Ov(e,t){return e&&e.length?Us(e,B(t,2)):0}return d.after=r_,d.ary=fl,d.assign=G_,d.assignIn=Rl,d.assignInWith=Al,d.assignWith=Ca,d.at=Q_,d.before=dl,d.bind=va,d.bindAll=Jm,d.bindKey=gl,d.castArray=p_,d.chain=ll,d.chunk=yg,d.compact=bg,d.concat=Rg,d.cond=Xm,d.conforms=Zm,d.constant=Ra,d.countBy=Op,d.create=q_,d.curry=pl,d.curryRight=_l,d.debounce=ml,d.defaults=z_,d.defaultsDeep=K_,d.defer=i_,d.delay=s_,d.difference=Ag,d.differenceBy=Pg,d.differenceWith=Ig,d.drop=xg,d.dropRight=Lg,d.dropRightWhile=Ng,d.dropWhile=Ug,d.fill=Og,d.filter=Dp,d.flatMap=kp,d.flatMapDeep=Hp,d.flatMapDepth=Wp,d.flatten=sl,d.flattenDeep=$g,d.flattenDepth=Dg,d.flip=a_,d.flow=ev,d.flowRight=tv,d.fromPairs=Mg,d.functions=tm,d.functionsIn=nm,d.groupBy=Vp,d.initial=kg,d.intersection=Hg,d.intersectionBy=Wg,d.intersectionWith=Vg,d.invert=im,d.invertBy=sm,d.invokeMap=Gp,d.iteratee=Aa,d.keyBy=Qp,d.keys=Ae,d.keysIn=Ke,d.map=Vi,d.mapKeys=om,d.mapValues=um,d.matches=nv,d.matchesProperty=rv,d.memoize=Gi,d.merge=lm,d.mergeWith=Pl,d.method=iv,d.methodOf=sv,d.mixin=Pa,d.negate=Qi,d.nthArg=ov,d.omit=cm,d.omitBy=hm,d.once=o_,d.orderBy=qp,d.over=uv,d.overArgs=u_,d.overEvery=lv,d.overSome=cv,d.partial=wa,d.partialRight=vl,d.partition=zp,d.pick=fm,d.pickBy=Il,d.property=Dl,d.propertyOf=hv,d.pull=qg,d.pullAll=ol,d.pullAllBy=zg,d.pullAllWith=Kg,d.pullAt=Yg,d.range=fv,d.rangeRight=dv,d.rearg=l_,d.reject=Jp,d.remove=Jg,d.rest=c_,d.reverse=_a,d.sampleSize=Zp,d.set=gm,d.setWith=pm,d.shuffle=jp,d.slice=Xg,d.sortBy=n_,d.sortedUniq=ip,d.sortedUniqBy=sp,d.split=Fm,d.spread=h_,d.tail=ap,d.take=op,d.takeRight=up,d.takeRightWhile=lp,d.takeWhile=cp,d.tap=bp,d.throttle=f_,d.thru=Wi,d.toArray=Tl,d.toPairs=xl,d.toPairsIn=Ll,d.toPath=vv,d.toPlainObject=bl,d.transform=_m,d.unary=d_,d.union=hp,d.unionBy=fp,d.unionWith=dp,d.uniq=gp,d.uniqBy=pp,d.uniqWith=_p,d.unset=mm,d.unzip=ma,d.unzipWith=ul,d.update=vm,d.updateWith=wm,d.values=rr,d.valuesIn=Sm,d.without=mp,d.words=Ol,d.wrap=g_,d.xor=vp,d.xorBy=wp,d.xorWith=Sp,d.zip=Ep,d.zipObject=Cp,d.zipObjectDeep=Tp,d.zipWith=yp,d.entries=xl,d.entriesIn=Ll,d.extend=Rl,d.extendWith=Al,Pa(d,d),d.add=Sv,d.attempt=$l,d.camelCase=ym,d.capitalize=Nl,d.ceil=Ev,d.clamp=Em,d.clone=__,d.cloneDeep=v_,d.cloneDeepWith=w_,d.cloneWith=m_,d.conformsTo=S_,d.deburr=Ul,d.defaultTo=jm,d.divide=Cv,d.endsWith=bm,d.eq=bt,d.escape=Rm,d.escapeRegExp=Am,d.every=$p,d.find=Mp,d.findIndex=rl,d.findKey=Y_,d.findLast=Fp,d.findLastIndex=il,d.findLastKey=J_,d.floor=Tv,d.forEach=cl,d.forEachRight=hl,d.forIn=X_,d.forInRight=Z_,d.forOwn=j_,d.forOwnRight=em,d.get=Ta,d.gt=E_,d.gte=C_,d.has=rm,d.hasIn=ya,d.head=al,d.identity=Ye,d.includes=Bp,d.indexOf=Fg,d.inRange=Cm,d.invoke=am,d.isArguments=xn,d.isArray=z,d.isArrayBuffer=T_,d.isArrayLike=ze,d.isArrayLikeObject=_e,d.isBoolean=y_,d.isBuffer=un,d.isDate=b_,d.isElement=R_,d.isEmpty=A_,d.isEqual=P_,d.isEqualWith=I_,d.isError=Sa,d.isFinite=x_,d.isFunction=Qt,d.isInteger=wl,d.isLength=qi,d.isMap=Sl,d.isMatch=L_,d.isMatchWith=N_,d.isNaN=U_,d.isNative=O_,d.isNil=D_,d.isNull=$_,d.isNumber=El,d.isObject=de,d.isObjectLike=ge,d.isPlainObject=Vr,d.isRegExp=Ea,d.isSafeInteger=M_,d.isSet=Cl,d.isString=zi,d.isSymbol=rt,d.isTypedArray=nr,d.isUndefined=F_,d.isWeakMap=k_,d.isWeakSet=H_,d.join=Bg,d.kebabCase=Pm,d.last=dt,d.lastIndexOf=Gg,d.lowerCase=Im,d.lowerFirst=xm,d.lt=W_,d.lte=V_,d.max=yv,d.maxBy=bv,d.mean=Rv,d.meanBy=Av,d.min=Pv,d.minBy=Iv,d.stubArray=xa,d.stubFalse=La,d.stubObject=gv,d.stubString=pv,d.stubTrue=_v,d.multiply=xv,d.nth=Qg,d.noConflict=av,d.noop=Ia,d.now=Bi,d.pad=Lm,d.padEnd=Nm,d.padStart=Um,d.parseInt=Om,d.random=Tm,d.reduce=Kp,d.reduceRight=Yp,d.repeat=$m,d.replace=Dm,d.result=dm,d.round=Lv,d.runInContext=w,d.sample=Xp,d.size=e_,d.snakeCase=Mm,d.some=t_,d.sortedIndex=Zg,d.sortedIndexBy=jg,d.sortedIndexOf=ep,d.sortedLastIndex=tp,d.sortedLastIndexBy=np,d.sortedLastIndexOf=rp,d.startCase=km,d.startsWith=Hm,d.subtract=Nv,d.sum=Uv,d.sumBy=Ov,d.template=Wm,d.times=mv,d.toFinite=qt,d.toInteger=K,d.toLength=yl,d.toLower=Vm,d.toNumber=gt,d.toSafeInteger=B_,d.toString=ae,d.toUpper=Bm,d.trim=Gm,d.trimEnd=Qm,d.trimStart=qm,d.truncate=zm,d.unescape=Km,d.uniqueId=wv,d.upperCase=Ym,d.upperFirst=ba,d.each=cl,d.eachRight=hl,d.first=al,Pa(d,(function(){var e={};return Ut(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){ee.prototype[e]=function(s){s=s===r?1:Ee(K(s),0);var u=this.__filtered__&&!t?new ee(this):this.clone();return u.__filtered__?u.__takeCount__=De(s,u.__takeCount__):u.__views__.push({size:De(s,Lt),type:e+(u.__dir__<0?"Right":"")}),u},ee.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;ee.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":"");ee.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");ee.prototype[e]=function(){return this.__filtered__?new ee(this):this[s](1)}}),ee.prototype.compact=function(){return this.filter(Ye)},ee.prototype.find=function(e){return this.filter(e).head()},ee.prototype.findLast=function(e){return this.reverse().find(e)},ee.prototype.invokeMap=J(function(e,t){return typeof e=="function"?new ee(this):this.map(function(s){return Dr(s,e,t)})}),ee.prototype.reject=function(e){return this.filter(Qi(B(e)))},ee.prototype.slice=function(e,t){e=K(e);var s=this;return s.__filtered__&&(e>0||t<0)?new ee(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=K(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},ee.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ee.prototype.toArray=function(){return this.take(Lt)},Ut(ee.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 m=this.__wrapped__,v=u?[1]:arguments,S=m instanceof ee,P=v[0],I=S||z(m),L=function(Z){var te=h.apply(d,en([Z],v));return u&&M?te[0]:te};I&&s&&typeof P=="function"&&P.length!=1&&(S=I=!1);var M=this.__chain__,W=!!this.__actions__.length,G=g&&!M,Y=S&&!W;if(!g&&I){m=Y?m:new ee(this);var V=e.apply(m,v);return V.__actions__.push({func:Wi,args:[L],thisArg:r}),new ct(V,M)}return G&&Y?e.apply(this,v):(V=this.thru(L),G?u?V.value()[0]:V.value():V)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var t=di[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(z(g)?g:[],h)}return this[s](function(m){return t.apply(z(m)?m:[],h)})}}),Ut(ee.prototype,function(e,t){var s=d[t];if(s){var u=s.name+"";se.call(Xn,u)||(Xn[u]=[]),Xn[u].push({name:t,func:s})}}),Xn[Oi(r,re).name]=[{name:"wrapper",func:r}],ee.prototype.clone=Yf,ee.prototype.reverse=Jf,ee.prototype.value=Xf,d.prototype.at=Rp,d.prototype.chain=Ap,d.prototype.commit=Pp,d.prototype.next=Ip,d.prototype.plant=Lp,d.prototype.reverse=Np,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Up,d.prototype.first=d.prototype.head,Ir&&(d.prototype[Ir]=xp),d}),Kn=Pf();Cn?((Cn.exports=Kn)._=Kn,Rs._=Kn):Le._=Kn}).call(Dv)})(Br,Br.exports)),Br.exports}var Ma=Mv();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=Ma.replace(o,/{([\s\S]+?)}/g,c=>{let l=c.slice(1,-1).trim();return l.indexOf(r)===0&&(l=l.substring(r.length)),Ma.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}},$n={wrapAsPromise:i=>new Promise(n=>{n(i)}),applyFunctionPromisified:(i,n)=>(i=i.apply(void 0,n),F.isPromise(i)?i:$n.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,n,...r)=>{const a=F.getConfigValueFromObject(i,n);return F.isFunction(a)?$n.applyFunctionPromisified(a,r):$n.wrapAsPromise(a)}};class Fv{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 $n.applyFunctionPromisified(o,a)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const Je=new Fv;class kv{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=Je.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 kv;class Hv{isAuthorizationEnabled(){return!!Je.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&fr.startAuthorization()}logout(){this.isAuthorizationEnabled()&&fr.logout()}async handleAuthEvent(n,r,a,o){const c=await Je.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 Je.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),removeAuthData:()=>At.removeAuthData(),setNewlyAuthorized:()=>{At.setNewlyAuthorized(),fr.resetExpirationChecks()}}}}const or=new Hv;class Wv{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 or.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 Un=new Wv;class Vv{constructor(){this._userInfoStore=ns({}),this._loggedInStore=ns(!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=Je.getConfigValue("auth.use");if(!n)return Promise.resolve(!0);const r=Je.getConfigValue(`auth.${n}`),a=Un.parseUrlAuthErrors()||{};if(await Un.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),Je.setErrorMessage(l)}):this.checkAuth(r)}async checkAuth(n){const r=Un.getStoredAuthData();if(!r||!Un.isLoggedIn()){if(Je.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return r&&(o=await or.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(ac(this._userInfoStore))),F.isFunction(Je.getConfigValue("auth.events.onAuthSuccessful"))&&At.isNewlyAuthorized()&&await or.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=Un.getStoredAuthData(),r=async c=>{await or.handleAuthEvent("onLogout",this.idpProviderInstance.settings,void 0,c),At.removeAuthData()},a=Je.getConfigValue(`auth.${Je.getConfigValue("auth.use")}.logoutFn`),o=Je.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(Je.getConfigValue("auth.events.onAuthConfigError")))await or.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()}}const fr=new Vv,Bv={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"}}},Gv=Bv,rs={sanitizeHtml(i=""){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(i=""){return i.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/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(`<${r[a]}/>`,"g"),c=new RegExp(`<${r[a]} />`,"g"),l=new RegExp(`<${r[a]}>`,"g"),f=new RegExp(`<${r[a]} >`,"g"),p=new RegExp(`</${r[a]}[/]>`,"g"),_=new RegExp(`</${r[a]} [/]>`,"g"),C=new RegExp(`<[/]${r[a]}>`,"g"),T=new RegExp(`<[/]${r[a]} >`,"g");n=n.replace(o,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(f,`<${r[a]}>`).replace(p,`</${r[a]}>`).replace(_,`</${r[a]}>`).replace(C,`</${r[a]}>`).replace(T,`</${r[a]}>`)}return n},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},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)}`,_=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),C=`<a id="${p}">${_}</a>`,T=this.escapeKeyForRegexp(l),E=new RegExp(`({${T}})`,"g");return{sanitizedText:c.sanitizedText.replace(E,C),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}};class Qv{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=Gv}_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("{"+rs.escapeKeyForRegexp(a)+"}","gi"),r[a])}),n}}function fn(){}function oc(i){return i()}function kl(){return Object.create(null)}function is(i){i.forEach(oc)}function uc(i){return typeof i=="function"}function lc(i,n){return i!=i?n==n:i!==n||i&&typeof i=="object"||typeof i=="function"}let Yi,Yr;function Hl(i,n){return i===n||(Yi||(Yi=document.createElement("a")),Yi.href=n,i===Yi.href)}function qv(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=pr("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 Dn(i,n,r){i.insertBefore(n,r||null)}function dn(i){i.parentNode&&i.parentNode.removeChild(i)}function pr(i){return document.createElement(i)}function cc(i){return document.createTextNode(i)}function _t(i,n,r){r==null?i.removeAttribute(n):i.getAttribute(n)!==r&&i.setAttribute(n,r)}function Qr(i){Yr=i}function hc(){if(!Yr)throw new Error("Function called outside component initialization");return Yr}function fc(i){hc().$$.on_mount.push(i)}const sr=[],Jr=[];let dr=[];const Wl=[],zv=Promise.resolve();let Fa=!1;function ka(i){dr.push(i)}const Na=new Set;let ir=0;function q(){if(ir!==0)return;const i=Yr;do{try{for(;ir<sr.length;){const n=sr[ir];ir++,Qr(n),Kv(n.$$)}}catch(n){throw sr.length=0,ir=0,n}for(Qr(null),sr.length=0,ir=0;Jr.length;)Jr.pop()();for(let n=0;n<dr.length;n+=1){const r=dr[n];Na.has(r)||(Na.add(r),r())}dr.length=0}while(sr.length);for(;Wl.length;)Wl.pop()();Fa=!1,Na.clear(),Qr(i)}function Kv(i){if(i.fragment!==null){i.update(),is(i.before_update);const n=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,n),i.after_update.forEach(ka)}}const Yv=new Set;function Jv(i,n){const r=i.$$;r.fragment!==null&&((function(a){const o=[],c=[];dr.forEach((l=>a.indexOf(l)===-1?o.push(l):c.push(l))),c.forEach((l=>l())),dr=o})(r.after_update),is(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function Xv(i,n){i.$$.dirty[0]===-1&&(sr.push(i),Fa||(Fa=!0,zv.then(q)),i.$$.dirty.fill(0)),i.$$.dirty[n/31|0]|=1<<n%31}function dc(i,n,r,a,o,c,l=null,f=[-1]){const p=Yr;Qr(i);const _=i.$$={fragment:null,ctx:[],props:c,update:fn,not_equal:o,bound:kl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(p?p.$$.context:[])),callbacks:kl(),dirty:f,skip_bound:!1,root:n.target||p.$$.root};l&&l(_.root);let C=!1;if(_.ctx=r?r(i,n.props||{},((y,A,...x)=>{const $=x.length?x[0]:A;return _.ctx&&o(_.ctx[y],_.ctx[y]=$)&&(!_.skip_bound&&_.bound[y]&&_.bound[y]($),C&&Xv(i,y)),A})):[],_.update(),C=!0,is(_.before_update),_.fragment=!!a&&a(_.ctx),n.target){if(n.hydrate){const y=(function(A){return Array.from(A.childNodes)})(n.target);_.fragment&&_.fragment.l(y),y.forEach(dn)}else _.fragment&&_.fragment.c();n.intro&&(T=i.$$.fragment)&&T.i&&(Yv.delete(T),T.i(E)),(function(y,A,x){const{fragment:$,after_update:H}=y.$$;$&&$.m(A,x),ka((()=>{const re=y.$$.on_mount.map(oc).filter(uc);y.$$.on_destroy?y.$$.on_destroy.push(...re):is(re),y.$$.on_mount=[]})),H.forEach(ka)})(i,n.target,n.anchor),q()}var T,E;Qr(p)}let gc;function Zi(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 pc(i,n,r,a,o,c){let l=class extends gc{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=Zi(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"&&(gc=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=pr("slot"),c!=="default"&&_t(l,"name",c)},m:function(f,p){Dn(f,l,p)},d:function(f){f&&dn(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]=Zi(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=Zi(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]=Zi(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(){Jv(this,1),this.$destroy=fn}$on(n,r){if(!uc(r))return fn;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 j;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"})(j||(j={}));class Zv 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 O={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 za{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 Zv(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 j.CUSTOM_MESSAGE:{const o=n.data.data,c=o.id;delete o.id,this.dispatch(O.CUSTOM_MESSAGE,r,{id:c,_metaData:{},data:o})}break;case j.GET_CONTEXT:a.postMessage({msg:j.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 j.NAVIGATION_REQUEST:this.dispatch(O.NAVIGATION_REQUEST,r,n.data.params,(o=>{a.postMessage({msg:j.CLOSE_MODAL_ANSWER,data:o},n.origin)}));break;case j.ALERT_REQUEST:this.dispatchWithPayload(O.ALERT_REQUEST,r,n,n.data?.data?.settings,(o=>{r.notifyAlertClosed(n.data?.data?.settings?.id,o)}));break;case j.INITIALIZED:this.dispatch(O.INITIALIZED,r,n.data?.params||{});break;case j.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(O.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case j.ADD_NODE_PARAMS_REQUEST:this.dispatch(O.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case j.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(O.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,n.data.data?.settings,(o=>{r.notifyConfirmationModalClosed(o)}));break;case j.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(O.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case j.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(O.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case j.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(O.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case j.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(O.LOCAL_STORAGE_SET_REQUEST,r,n,n.data.data?.params);break;case j.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case j.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(O.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case j.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(O.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case j.BACK_NAVIGATION_REQUEST:{let o=n.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(c){console.warn(c)}this.dispatch(O.GO_BACK_REQUEST,r,o),this.dispatch(O.BACK_NAVIGATION_REQUEST,r,n)}break;case j.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(O.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:j.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:n.data?.data?.id,route:o}},n.origin)}));break;case j.NAVIGATION_COMPLETED_REPORT:this.dispatch(O.NAVIGATION_COMPLETED_REPORT,r,n);break;case j.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(O.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case j.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(O.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case j.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(O.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:j.SEND_PATH_EXISTS_ANSWER,data:{correlationId:n.data?.data?.id,pathExists:o}},n.origin)}));break;case j.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(O.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case j.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(O.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case j.ADD_BACKDROP_REQUEST:this.dispatch(O.ADD_BACKDROP_REQUEST,r,n);break;case j.REMOVE_BACKDROP_REQUEST:this.dispatch(O.REMOVE_BACKDROP_REQUEST,r,n);break;case j.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(O.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 hn=new za,ar=new class{constructor(){this.updateContext=(i,n,r,a,o,c)=>{if(r){const l=n||{};hn.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:o||{},searchParams:c||{},internal:l,withoutSync:!0},j.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,n,r,a)=>{if(a){const o=r||{};hn.sendCustomMessageToIframe(a,{context:n,internal:o,withoutSync:!1,viewUrl:i},j.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,n)=>{i&&n?hn.sendCustomMessageToIframe(i,{authData:n},j.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)hn.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,hn.sendCustomMessageToIframe(a,c)}},this.notifyConfirmationModalClosed=(i,n)=>{const r={data:{confirmed:i}};hn.sendCustomMessageToIframe(n,r,j.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,n,r){const a=n?{id:i,dismissKey:n}:{id:i};hn.sendCustomMessageToIframe(r,a,j.ALERT_CLOSED)}},Vl=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=mc({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 ew 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+=`{
|
|
20
|
+
}`;var J=$l(function(){return ie(g,W+"return "+L).apply(r,m)});if(J.source=L,wa(J))throw J;return J}function Vm(e){return ae(e).toLowerCase()}function Bm(e){return ae(e).toUpperCase()}function Gm(e,t,s){if(e=ae(e),e&&(s||t===r))return Bo(e);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Ct(t),g=Go(u,h),m=Qo(u,h)+1;return on(u,g,m).join("")}function Qm(e,t,s){if(e=ae(e),e&&(s||t===r))return e.slice(0,zo(e)+1);if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Qo(u,Ct(t))+1;return on(u,0,h).join("")}function qm(e,t,s){if(e=ae(e),e&&(s||t===r))return e.replace(ws,"");if(!e||!(t=nt(t)))return e;var u=Ct(e),h=Go(u,Ct(t));return on(u,h).join("")}function zm(e,t){var s=Re,u=D;if(de(t)){var h="separator"in t?t.separator:h;s="length"in t?Y(t.length):s,u="omission"in t?nt(t.omission):u}e=ae(e);var g=e.length;if(zn(e)){var m=Ct(e);g=m.length}if(s>=g)return e;var v=s-Kn(u);if(v<1)return u;var w=m?on(m,0,v).join(""):e.slice(0,v);if(h===r)return w+u;if(m&&(v+=w.length-v),Ea(h)){if(e.slice(v).search(h)){var P,I=w;for(h.global||(h=Ms(h.source,ae(co.exec(h))+"g")),h.lastIndex=0;P=h.exec(I);)var L=P.index;w=w.slice(0,L===r?v:L)}}else if(e.indexOf(nt(h),v)!=v){var M=w.lastIndexOf(h);M>-1&&(w=w.slice(0,M))}return w+u}function Km(e){return e=ae(e),e&&ah.test(e)?e.replace(ao,yf):e}var Ym=tr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),ba=$u("toUpperCase");function Ul(e,t,s){return e=ae(e),t=s?r:t,t===r?Sf(e)?Af(e):cf(e):e.match(t)||[]}var $l=X(function(e,t){try{return je(e,r,t)}catch(s){return wa(s)?s:new Q(s)}}),Jm=Bt(function(e,t){return et(t,function(s){s=yt(s),Nt(e,s,va(e[s],e))}),e});function Xm(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]]}):[],X(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 Zm(e){return yd(ht(e,E))}function Ra(e){return function(){return e}}function jm(e,t){return e==null||e!==e?t:e}var ev=Mu(),tv=Mu(!0);function Je(e){return e}function Aa(e){return du(typeof e=="function"?e:ht(e,E))}function nv(e){return pu(ht(e,E))}function rv(e,t){return _u(e,ht(t,E))}var iv=X(function(e,t){return function(s){return Dr(s,e,t)}}),sv=X(function(e,t){return function(s){return Dr(e,s,t)}});function Pa(e,t,s){var u=Ae(t),h=Ii(t,u);s==null&&!(de(t)&&(h.length||!u.length))&&(s=t,t=e,e=this,h=Ii(t,Ae(t)));var g=!(de(s)&&"chain"in s)||!!s.chain,m=Qt(e);return et(h,function(v){var w=t[v];e[v]=w,m&&(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:w,args:arguments,thisArg:e}),I.__chain__=P,I}return w.apply(e,en([this.value()],arguments))})}),e}function av(){return Le._===this&&(Le._=Of),this}function Ia(){}function ov(e){return e=Y(e),X(function(t){return mu(t,e)})}var uv=sa(fe),lv=sa(Fo),cv=sa(xs);function Dl(e){return fa(e)?Ls(yt(e)):Wd(e)}function hv(e){return function(t){return e==null?r:Pn(e,t)}}var fv=ku(),dv=ku(!0);function xa(){return[]}function La(){return!1}function gv(){return{}}function pv(){return""}function _v(){return!0}function mv(e,t){if(e=Y(e),e<1||e>oe)return[];var s=Lt,u=De(e,Lt);t=B(t),e-=Lt;for(var h=Us(u,t);++s<e;)t(s);return h}function vv(e){return z(e)?fe(e,yt):rt(e)?[e]:ze(tl(ae(e)))}function Sv(e){var t=++Lf;return ae(e)+t}var wv=$i(function(e,t){return e+t},0),Ev=aa("ceil"),Cv=$i(function(e,t){return e/t},1),Tv=aa("floor");function yv(e){return e&&e.length?Pi(e,Je,Qs):r}function bv(e,t){return e&&e.length?Pi(e,B(t,2),Qs):r}function Rv(e){return Wo(e,Je)}function Av(e,t){return Wo(e,B(t,2))}function Pv(e){return e&&e.length?Pi(e,Je,Ys):r}function Iv(e,t){return e&&e.length?Pi(e,B(t,2),Ys):r}var xv=$i(function(e,t){return e*t},1),Lv=aa("round"),Nv=$i(function(e,t){return e-t},0);function Ov(e){return e&&e.length?Os(e,Je):0}function Uv(e,t){return e&&e.length?Os(e,B(t,2)):0}return d.after=r_,d.ary=fl,d.assign=G_,d.assignIn=Rl,d.assignInWith=Al,d.assignWith=Ca,d.at=Q_,d.before=dl,d.bind=va,d.bindAll=Jm,d.bindKey=gl,d.castArray=p_,d.chain=ll,d.chunk=yg,d.compact=bg,d.concat=Rg,d.cond=Xm,d.conforms=Zm,d.constant=Ra,d.countBy=Up,d.create=q_,d.curry=pl,d.curryRight=_l,d.debounce=ml,d.defaults=z_,d.defaultsDeep=K_,d.defer=i_,d.delay=s_,d.difference=Ag,d.differenceBy=Pg,d.differenceWith=Ig,d.drop=xg,d.dropRight=Lg,d.dropRightWhile=Ng,d.dropWhile=Og,d.fill=Ug,d.filter=Dp,d.flatMap=kp,d.flatMapDeep=Hp,d.flatMapDepth=Wp,d.flatten=sl,d.flattenDeep=$g,d.flattenDepth=Dg,d.flip=a_,d.flow=ev,d.flowRight=tv,d.fromPairs=Mg,d.functions=tm,d.functionsIn=nm,d.groupBy=Vp,d.initial=kg,d.intersection=Hg,d.intersectionBy=Wg,d.intersectionWith=Vg,d.invert=im,d.invertBy=sm,d.invokeMap=Gp,d.iteratee=Aa,d.keyBy=Qp,d.keys=Ae,d.keysIn=Ye,d.map=Vi,d.mapKeys=om,d.mapValues=um,d.matches=nv,d.matchesProperty=rv,d.memoize=Gi,d.merge=lm,d.mergeWith=Pl,d.method=iv,d.methodOf=sv,d.mixin=Pa,d.negate=Qi,d.nthArg=ov,d.omit=cm,d.omitBy=hm,d.once=o_,d.orderBy=qp,d.over=uv,d.overArgs=u_,d.overEvery=lv,d.overSome=cv,d.partial=Sa,d.partialRight=vl,d.partition=zp,d.pick=fm,d.pickBy=Il,d.property=Dl,d.propertyOf=hv,d.pull=qg,d.pullAll=ol,d.pullAllBy=zg,d.pullAllWith=Kg,d.pullAt=Yg,d.range=fv,d.rangeRight=dv,d.rearg=l_,d.reject=Jp,d.remove=Jg,d.rest=c_,d.reverse=_a,d.sampleSize=Zp,d.set=gm,d.setWith=pm,d.shuffle=jp,d.slice=Xg,d.sortBy=n_,d.sortedUniq=ip,d.sortedUniqBy=sp,d.split=Fm,d.spread=h_,d.tail=ap,d.take=op,d.takeRight=up,d.takeRightWhile=lp,d.takeWhile=cp,d.tap=bp,d.throttle=f_,d.thru=Wi,d.toArray=Tl,d.toPairs=xl,d.toPairsIn=Ll,d.toPath=vv,d.toPlainObject=bl,d.transform=_m,d.unary=d_,d.union=hp,d.unionBy=fp,d.unionWith=dp,d.uniq=gp,d.uniqBy=pp,d.uniqWith=_p,d.unset=mm,d.unzip=ma,d.unzipWith=ul,d.update=vm,d.updateWith=Sm,d.values=ir,d.valuesIn=wm,d.without=mp,d.words=Ul,d.wrap=g_,d.xor=vp,d.xorBy=Sp,d.xorWith=wp,d.zip=Ep,d.zipObject=Cp,d.zipObjectDeep=Tp,d.zipWith=yp,d.entries=xl,d.entriesIn=Ll,d.extend=Rl,d.extendWith=Al,Pa(d,d),d.add=wv,d.attempt=$l,d.camelCase=ym,d.capitalize=Nl,d.ceil=Ev,d.clamp=Em,d.clone=__,d.cloneDeep=v_,d.cloneDeepWith=S_,d.cloneWith=m_,d.conformsTo=w_,d.deburr=Ol,d.defaultTo=jm,d.divide=Cv,d.endsWith=bm,d.eq=bt,d.escape=Rm,d.escapeRegExp=Am,d.every=$p,d.find=Mp,d.findIndex=rl,d.findKey=Y_,d.findLast=Fp,d.findLastIndex=il,d.findLastKey=J_,d.floor=Tv,d.forEach=cl,d.forEachRight=hl,d.forIn=X_,d.forInRight=Z_,d.forOwn=j_,d.forOwnRight=em,d.get=Ta,d.gt=E_,d.gte=C_,d.has=rm,d.hasIn=ya,d.head=al,d.identity=Je,d.includes=Bp,d.indexOf=Fg,d.inRange=Cm,d.invoke=am,d.isArguments=Ln,d.isArray=z,d.isArrayBuffer=T_,d.isArrayLike=Ke,d.isArrayLikeObject=_e,d.isBoolean=y_,d.isBuffer=un,d.isDate=b_,d.isElement=R_,d.isEmpty=A_,d.isEqual=P_,d.isEqualWith=I_,d.isError=wa,d.isFinite=x_,d.isFunction=Qt,d.isInteger=Sl,d.isLength=qi,d.isMap=wl,d.isMatch=L_,d.isMatchWith=N_,d.isNaN=O_,d.isNative=U_,d.isNil=D_,d.isNull=$_,d.isNumber=El,d.isObject=de,d.isObjectLike=ge,d.isPlainObject=Vr,d.isRegExp=Ea,d.isSafeInteger=M_,d.isSet=Cl,d.isString=zi,d.isSymbol=rt,d.isTypedArray=rr,d.isUndefined=F_,d.isWeakMap=k_,d.isWeakSet=H_,d.join=Bg,d.kebabCase=Pm,d.last=dt,d.lastIndexOf=Gg,d.lowerCase=Im,d.lowerFirst=xm,d.lt=W_,d.lte=V_,d.max=yv,d.maxBy=bv,d.mean=Rv,d.meanBy=Av,d.min=Pv,d.minBy=Iv,d.stubArray=xa,d.stubFalse=La,d.stubObject=gv,d.stubString=pv,d.stubTrue=_v,d.multiply=xv,d.nth=Qg,d.noConflict=av,d.noop=Ia,d.now=Bi,d.pad=Lm,d.padEnd=Nm,d.padStart=Om,d.parseInt=Um,d.random=Tm,d.reduce=Kp,d.reduceRight=Yp,d.repeat=$m,d.replace=Dm,d.result=dm,d.round=Lv,d.runInContext=S,d.sample=Xp,d.size=e_,d.snakeCase=Mm,d.some=t_,d.sortedIndex=Zg,d.sortedIndexBy=jg,d.sortedIndexOf=ep,d.sortedLastIndex=tp,d.sortedLastIndexBy=np,d.sortedLastIndexOf=rp,d.startCase=km,d.startsWith=Hm,d.subtract=Nv,d.sum=Ov,d.sumBy=Uv,d.template=Wm,d.times=mv,d.toFinite=qt,d.toInteger=Y,d.toLength=yl,d.toLower=Vm,d.toNumber=gt,d.toSafeInteger=B_,d.toString=ae,d.toUpper=Bm,d.trim=Gm,d.trimEnd=Qm,d.trimStart=qm,d.truncate=zm,d.unescape=Km,d.uniqueId=Sv,d.upperCase=Ym,d.upperFirst=ba,d.each=cl,d.eachRight=hl,d.first=al,Pa(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){ee.prototype[e]=function(s){s=s===r?1:Ee(Y(s),0);var u=this.__filtered__&&!t?new ee(this):this.clone();return u.__filtered__?u.__takeCount__=De(s,u.__takeCount__):u.__views__.push({size:De(s,Lt),type:e+(u.__dir__<0?"Right":"")}),u},ee.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;ee.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":"");ee.prototype[e]=function(){return this[s](1).value()[0]}}),et(["initial","tail"],function(e,t){var s="drop"+(t?"":"Right");ee.prototype[e]=function(){return this.__filtered__?new ee(this):this[s](1)}}),ee.prototype.compact=function(){return this.filter(Je)},ee.prototype.find=function(e){return this.filter(e).head()},ee.prototype.findLast=function(e){return this.reverse().find(e)},ee.prototype.invokeMap=X(function(e,t){return typeof e=="function"?new ee(this):this.map(function(s){return Dr(s,e,t)})}),ee.prototype.reject=function(e){return this.filter(Qi(B(e)))},ee.prototype.slice=function(e,t){e=Y(e);var s=this;return s.__filtered__&&(e>0||t<0)?new ee(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=Y(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},ee.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ee.prototype.toArray=function(){return this.take(Lt)},Ot(ee.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 m=this.__wrapped__,v=u?[1]:arguments,w=m instanceof ee,P=v[0],I=w||z(m),L=function(Z){var te=h.apply(d,en([Z],v));return u&&M?te[0]:te};I&&s&&typeof P=="function"&&P.length!=1&&(w=I=!1);var M=this.__chain__,W=!!this.__actions__.length,G=g&&!M,J=w&&!W;if(!g&&I){m=J?m:new ee(this);var V=e.apply(m,v);return V.__actions__.push({func:Wi,args:[L],thisArg:r}),new ct(V,M)}return G&&J?e.apply(this,v):(V=this.thru(L),G?u?V.value()[0]:V.value():V)})}),et(["pop","push","shift","sort","splice","unshift"],function(e){var t=di[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(z(g)?g:[],h)}return this[s](function(m){return t.apply(z(m)?m:[],h)})}}),Ot(ee.prototype,function(e,t){var s=d[t];if(s){var u=s.name+"";se.call(Zn,u)||(Zn[u]=[]),Zn[u].push({name:t,func:s})}}),Zn[Ui(r,re).name]=[{name:"wrapper",func:r}],ee.prototype.clone=Yf,ee.prototype.reverse=Jf,ee.prototype.value=Xf,d.prototype.at=Rp,d.prototype.chain=Ap,d.prototype.commit=Pp,d.prototype.next=Ip,d.prototype.plant=Lp,d.prototype.reverse=Np,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=Op,d.prototype.first=d.prototype.head,Ir&&(d.prototype[Ir]=xp),d}),Yn=Pf();Tn?((Tn.exports=Yn)._=Yn,Rs._=Yn):Le._=Yn}).call(Dv)})(Br,Br.exports)),Br.exports}var Ma=Mv();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=Ma.replace(o,/{([\s\S]+?)}/g,c=>{let l=c.slice(1,-1).trim();return l.indexOf(r)===0&&(l=l.substring(r.length)),Ma.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}},Dn={wrapAsPromise:i=>new Promise(n=>{n(i)}),applyFunctionPromisified:(i,n)=>(i=i.apply(void 0,n),F.isPromise(i)?i:Dn.wrapAsPromise(i)),getConfigValueFromObjectAsync:(i,n,...r)=>{const a=F.getConfigValueFromObject(i,n);return F.isFunction(a)?Dn.applyFunctionPromisified(a,r):Dn.wrapAsPromise(a)}};class Fv{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 Dn.applyFunctionPromisified(o,a)}catch(c){if(r)return Promise.reject(c)}return Promise.resolve(void 0)}}const Ge=new Fv;class kv{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 kv;class Hv{isAuthorizationEnabled(){return!!Ge.getConfigValue("auth.use")}login(){this.isAuthorizationEnabled()&&Un.startAuthorization()}logout(){this.isAuthorizationEnabled()&&Un.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),Un.broadcastAuthData(n)},removeAuthData:()=>At.removeAuthData(),setNewlyAuthorized:()=>{At.setNewlyAuthorized(),Un.resetExpirationChecks()}}}}const ur=new Hv;class Wv{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 ur.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 fn=new Wv;function dn(){}function oc(i){return i()}function kl(){return Object.create(null)}function rs(i){i.forEach(oc)}function uc(i){return typeof i=="function"}function lc(i,n){return i!=i?n==n:i!==n||i&&typeof i=="object"||typeof i=="function"}let Yi,Yr;function Hl(i,n){return i===n||(Yi||(Yi=document.createElement("a")),Yi.href=n,i===Yi.href)}function Vv(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=pr("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 Mn(i,n,r){i.insertBefore(n,r||null)}function gn(i){i.parentNode&&i.parentNode.removeChild(i)}function pr(i){return document.createElement(i)}function cc(i){return document.createTextNode(i)}function _t(i,n,r){r==null?i.removeAttribute(n):i.getAttribute(n)!==r&&i.setAttribute(n,r)}function Qr(i){Yr=i}function hc(){if(!Yr)throw new Error("Function called outside component initialization");return Yr}function fc(i){hc().$$.on_mount.push(i)}const ar=[],Jr=[];let dr=[];const Wl=[],Bv=Promise.resolve();let Fa=!1;function ka(i){dr.push(i)}const Na=new Set;let sr=0;function q(){if(sr!==0)return;const i=Yr;do{try{for(;sr<ar.length;){const n=ar[sr];sr++,Qr(n),Gv(n.$$)}}catch(n){throw ar.length=0,sr=0,n}for(Qr(null),ar.length=0,sr=0;Jr.length;)Jr.pop()();for(let n=0;n<dr.length;n+=1){const r=dr[n];Na.has(r)||(Na.add(r),r())}dr.length=0}while(ar.length);for(;Wl.length;)Wl.pop()();Fa=!1,Na.clear(),Qr(i)}function Gv(i){if(i.fragment!==null){i.update(),rs(i.before_update);const n=i.dirty;i.dirty=[-1],i.fragment&&i.fragment.p(i.ctx,n),i.after_update.forEach(ka)}}const Qv=new Set;function qv(i,n){const r=i.$$;r.fragment!==null&&((function(a){const o=[],c=[];dr.forEach((l=>a.indexOf(l)===-1?o.push(l):c.push(l))),c.forEach((l=>l())),dr=o})(r.after_update),rs(r.on_destroy),r.fragment&&r.fragment.d(n),r.on_destroy=r.fragment=null,r.ctx=[])}function zv(i,n){i.$$.dirty[0]===-1&&(ar.push(i),Fa||(Fa=!0,Bv.then(q)),i.$$.dirty.fill(0)),i.$$.dirty[n/31|0]|=1<<n%31}function dc(i,n,r,a,o,c,l=null,f=[-1]){const p=Yr;Qr(i);const _=i.$$={fragment:null,ctx:[],props:c,update:dn,not_equal:o,bound:kl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(p?p.$$.context:[])),callbacks:kl(),dirty:f,skip_bound:!1,root:n.target||p.$$.root};l&&l(_.root);let C=!1;if(_.ctx=r?r(i,n.props||{},((y,A,...x)=>{const $=x.length?x[0]:A;return _.ctx&&o(_.ctx[y],_.ctx[y]=$)&&(!_.skip_bound&&_.bound[y]&&_.bound[y]($),C&&zv(i,y)),A})):[],_.update(),C=!0,rs(_.before_update),_.fragment=!!a&&a(_.ctx),n.target){if(n.hydrate){const y=(function(A){return Array.from(A.childNodes)})(n.target);_.fragment&&_.fragment.l(y),y.forEach(gn)}else _.fragment&&_.fragment.c();n.intro&&(T=i.$$.fragment)&&T.i&&(Qv.delete(T),T.i(E)),(function(y,A,x){const{fragment:$,after_update:H}=y.$$;$&&$.m(A,x),ka((()=>{const re=y.$$.on_mount.map(oc).filter(uc);y.$$.on_destroy?y.$$.on_destroy.push(...re):rs(re),y.$$.on_mount=[]})),H.forEach(ka)})(i,n.target,n.anchor),q()}var T,E;Qr(p)}let gc;function Zi(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 pc(i,n,r,a,o,c){let l=class extends gc{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=Zi(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"&&(gc=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=pr("slot"),c!=="default"&&_t(l,"name",c)},m:function(f,p){Mn(f,l,p)},d:function(f){f&&gn(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]=Zi(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=Zi(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]=Zi(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(){qv(this,1),this.$destroy=dn}$on(n,r){if(!uc(r))return dn;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 j;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"})(j||(j={}));class Kv 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 U={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 za{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 Kv(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 j.CUSTOM_MESSAGE:{const o=n.data.data,c=o.id;delete o.id,this.dispatch(U.CUSTOM_MESSAGE,r,{id:c,_metaData:{},data:o})}break;case j.GET_CONTEXT:a.postMessage({msg:j.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 j.NAVIGATION_REQUEST:this.dispatch(U.NAVIGATION_REQUEST,r,n.data.params,(o=>{a.postMessage({msg:j.CLOSE_MODAL_ANSWER,data:o},n.origin)}));break;case j.ALERT_REQUEST:this.dispatchWithPayload(U.ALERT_REQUEST,r,n,n.data?.data?.settings,(o=>{r.notifyAlertClosed(n.data?.data?.settings?.id,o)}));break;case j.INITIALIZED:this.dispatch(U.INITIALIZED,r,n.data?.params||{});break;case j.ADD_SEARCH_PARAMS_REQUEST:this.dispatch(U.ADD_SEARCH_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case j.ADD_NODE_PARAMS_REQUEST:this.dispatch(U.ADD_NODE_PARAMS_REQUEST,r,{data:n.data.data,keepBrowserHistory:n.data.keepBrowserHistory});break;case j.SHOW_CONFIRMATION_MODAL_REQUEST:this.dispatchWithPayload(U.SHOW_CONFIRMATION_MODAL_REQUEST,r,n.data.data,n.data.data?.settings,(o=>{r.notifyConfirmationModalClosed(o)}));break;case j.SHOW_LOADING_INDICATOR_REQUEST:this.dispatch(U.SHOW_LOADING_INDICATOR_REQUEST,r,n);break;case j.HIDE_LOADING_INDICATOR_REQUEST:this.dispatch(U.HIDE_LOADING_INDICATOR_REQUEST,r,n);break;case j.SET_CURRENT_LOCALE_REQUEST:this.dispatchWithPayload(U.SET_CURRENT_LOCALE_REQUEST,r,n,n.data.data);break;case j.LOCAL_STORAGE_SET_REQUEST:this.dispatchWithPayload(U.LOCAL_STORAGE_SET_REQUEST,r,n,n.data.data?.params);break;case j.RUNTIME_ERROR_HANDLING_REQUEST:this.dispatch(U.RUNTIME_ERROR_HANDLING_REQUEST,r,n);break;case j.SET_ANCHOR_LINK_REQUEST:this.dispatchWithPayload(U.SET_ANCHOR_LINK_REQUEST,r,n,n.data.anchor);break;case j.SET_THIRD_PARTY_COOKIES_REQUEST:this.dispatch(U.SET_THIRD_PARTY_COOKIES_REQUEST,r,n);break;case j.BACK_NAVIGATION_REQUEST:{let o=n.data?.goBackContext||{};if(typeof o=="string")try{o=JSON.parse(o)}catch(c){console.warn(c)}this.dispatch(U.GO_BACK_REQUEST,r,o),this.dispatch(U.BACK_NAVIGATION_REQUEST,r,n)}break;case j.GET_CURRENT_ROUTE_REQUEST:this.dispatchWithPayload(U.GET_CURRENT_ROUTE_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:j.SEND_CURRENT_ROUTE_ANSWER,data:{correlationId:n.data?.data?.id,route:o}},n.origin)}));break;case j.NAVIGATION_COMPLETED_REPORT:this.dispatch(U.NAVIGATION_COMPLETED_REPORT,r,n);break;case j.UPDATE_MODAL_PATH_DATA_REQUEST:this.dispatchWithPayload(U.UPDATE_MODAL_PATH_DATA_REQUEST,r,n,n.data.params);break;case j.UPDATE_MODAL_SETTINGS:this.dispatchWithPayload(U.UPDATE_MODAL_SETTINGS_REQUEST,r,n,{addHistoryEntry:n.data.addHistoryEntry,updatedModalSettings:n.data.updatedModalSettings});break;case j.CHECK_PATH_EXISTS_REQUEST:this.dispatchWithPayload(U.CHECK_PATH_EXISTS_REQUEST,r,n,n.data.data,(o=>{a.postMessage({msg:j.SEND_PATH_EXISTS_ANSWER,data:{correlationId:n.data?.data?.id,pathExists:o}},n.origin)}));break;case j.SET_DIRTY_STATUS_REQUEST:this.dispatchWithPayload(U.SET_DIRTY_STATUS_REQUEST,r,n,{dirty:n.data.dirty});break;case j.SET_VIEW_GROUP_DATA_REQUEST:this.dispatch(U.SET_VIEW_GROUP_DATA_REQUEST,r,n.data.data);break;case j.ADD_BACKDROP_REQUEST:this.dispatch(U.ADD_BACKDROP_REQUEST,r,n);break;case j.REMOVE_BACKDROP_REQUEST:this.dispatch(U.REMOVE_BACKDROP_REQUEST,r,n);break;case j.CLOSE_CURRENT_MODAL_REQUEST:this.dispatch(U.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 hn=new za,or=new class{constructor(){this.updateContext=(i,n,r,a,o,c)=>{if(r){const l=n||{};hn.sendCustomMessageToIframe(r,{context:i,nodeParams:a||{},pathParams:o||{},searchParams:c||{},internal:l,withoutSync:!0},j.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update context on inexisting iframe")},this.updateViewUrl=(i,n,r,a)=>{if(a){const o=r||{};hn.sendCustomMessageToIframe(a,{context:n,internal:o,withoutSync:!1,viewUrl:i},j.SEND_CONTEXT_OBJECT)}else console.warn("Attempting to update route on inexisting iframe")},this.updateAuthData=(i,n)=>{i&&n?hn.sendCustomMessageToIframe(i,{authData:n},j.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)hn.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,hn.sendCustomMessageToIframe(a,c)}},this.notifyConfirmationModalClosed=(i,n)=>{const r={data:{confirmed:i}};hn.sendCustomMessageToIframe(n,r,j.CONFIRMATION_MODAL_CLOSED)}}notifyAlertClosed(i,n,r){const a=n?{id:i,dismissKey:n}:{id:i};hn.sendCustomMessageToIframe(r,a,j.ALERT_CLOSED)}},Vl=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 Yv extends _r{constructor(n){super(n||{use:{}}),n&&n.use&&n.use.extends&&(this.superRenderer=mc({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 Jv 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
21
|
.${n} {
|
|
22
22
|
grid-template-columns: ${o.columns||"auto"};
|
|
23
23
|
grid-template-rows: ${o.rows||"auto"};
|
|
@@ -35,7 +35,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
35
35
|
}
|
|
36
36
|
${a}
|
|
37
37
|
</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 mc=i=>{const n=i.use;return n?n==="grid"?new ew(i):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new jv(i):new _r(i):new _r(i)},Bl=(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 Gl(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class vc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new za}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,_=!1,C={};const T={navigate:(E,y={})=>{const A={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C,...y};this.dispatchLuigiEvent(O.NAVIGATION_REQUEST,{link:E,...A})},navigateToIntent:(E,y={})=>{let A="#?intent=";if(A+=E,y&&Object.keys(y)?.length){const x=Object.entries(y);if(x.length>0){A+="?";for(const[$,H]of x)A+=$+"="+H+"&";A=A.slice(0,-1)}}T.navigate(A)},fromClosestContext:()=>(f=!0,T),fromContext:E=>(l=E,T),fromVirtualTreeRoot:()=>(p=!0,T),fromParent:()=>(_=!0,T),getCurrentRoute:()=>{const E={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C};return new Promise(((y,A)=>{this.containerService.dispatch(O.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...E},(x=>{x?y(x):A("No current route received.")}))}))},withParams:E=>(C=E,T),updateModalPathInternalNavigation:(E,y={},A=!1)=>{if(!E)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const x={fromClosestContext:f,fromContext:l,fromParent:_,fromVirtualTreeRoot:p,nodeParams:C};this.dispatchLuigiEvent(O.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(x,{history:A,link:E,modal:y}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(O.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:E=>{const y={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C};return new Promise(((A,x)=>{this.containerService.dispatch(O.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...y,link:E},($=>{$?A(!0):x(!1)})),this.containerService.dispatch(O.PATH_EXISTS_REQUEST,this.thisComponent,{...y,link:E},($=>{$?A(!0):x(!1)}))}))},openAsDrawer:(E,y={})=>{T.navigate(E,{drawer:y})},openAsModal:(E,y={})=>{T.navigate(E,{modal:y})},openAsSplitView:(E,y={})=>{T.navigate(E,{splitView:y})},goBack:E=>{this.dispatchLuigiEvent(O.GO_BACK_REQUEST,E)},hasBack:()=>!1,updateModalSettings:(E={},y=!1)=>{this.dispatchLuigiEvent(O.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:E,addHistoryEntry:y})}};return T},uxManager:()=>({showAlert:l=>(l.id=this.alertIndex++,new Promise((f=>{this.alertResolvers[l.id]=f,this.dispatchLuigiEvent(O.ALERT_REQUEST,l,(p=>{this.resolveAlert(l.id,p)}))}))),showConfirmationModal:l=>new Promise(((f,p)=>{this.modalResolver={resolve:f,reject:p},this.containerService.dispatch(O.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,l,(_=>{_?f():p()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(O.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(O.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(O.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:l=>{this.dispatchLuigiEvent(O.SET_DOCUMENT_TITLE_REQUEST,l)},setDirtyStatus:l=>{this.dispatchLuigiEvent(O.SET_DIRTY_STATUS_REQUEST,{dirty:l})},setCurrentLocale:l=>{l&&this.dispatchLuigiEvent(O.SET_CURRENT_LOCALE_REQUEST,{currentLocale:l})},removeBackdrop:()=>{this.dispatchLuigiEvent(O.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(O.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(O.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(O.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(O.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(O.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(O.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent(O.INITIALIZED,{})},addNodeParams:(l,f)=>{c||this.dispatchLuigiEvent(O.ADD_NODE_PARAMS_REQUEST,{params:l,data:l,keepBrowserHistory:f})},getNodeParams:l=>{return c?{}:l?(f=this.thisComponent.nodeParams,Object.entries(f).reduce(((p,_)=>(p[Gl(_[0])]=Gl(_[1]),p)),{})):this.thisComponent.nodeParams||{};var f},setAnchor:l=>{c||this.dispatchLuigiEvent(O.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(O.ADD_SEARCH_PARAMS_REQUEST,{data:l,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:l=>{this.dispatchLuigiEvent(O.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 _=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,_.origin+_.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 _=0;_<p.length&&(f=l[p[_]],!HTMLElement.isPrototypeOf(f));_++);}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),_=document.createElement("div");r.appendChild(_),r._luigi_node=o,window.customElements.get(p)?this.attachWC(p,_,r,a,f,c,l):window.luigiWCFn?window.luigiWCFn(f,p,_,(()=>{this.attachWC(p,_,r,a,f,c,l)})):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,(()=>{this.attachWC(p,_,r,a,f,c,l)})):this.registerWCFromUrl(f,p).then((()=>{this.attachWC(p,_,r,a,f,c,l)})).catch((C=>{console.warn("ERROR =>",C),this.containerService.dispatch(O.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,C)}))}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(O.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=mc(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,_,C)=>{const T=f[_+"."+p.type]||[];T.push(...f["*."+p.type]||[]),T.forEach((E=>{const y=E.wcElement||l.querySelector("[nodeId="+E.wcElementId+"]");y?y.dispatchEvent(new CustomEvent(E.action,{detail:E.converter?E.converter(p.detail):p.detail})):console.debug("Could not find event target",E)}))}},n.compound?.children?.forEach(((p,_)=>{const C={...a,...p.context},T=o.createCompoundItemContainer(p.layoutConfig);T.eventBus=l.eventBus,o.attachCompoundItem(l,T);const E=p.id||"gen_"+_;this.renderWebComponent(p.viewUrl,T,C,p,E,!0),Bl(f,p,E)})),r.appendChild(l),Bl(f,n.compound,"_root",l),c(l)})).catch((l=>{console.warn("Error: ",l),this.containerService.dispatch(O.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 qr=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")&&ql(i);return{c(){r&&r.c(),n=cc("")},m(a,o){r&&r.m(a,o),Dn(a,n,o)},p(a,o){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,o):(r=ql(a),r.c(),r.m(n.parentNode,n))},d(a){a&&dn(n),r&&r.d(a)}}}function ql(i){let n,r,a,o,c,l;return{c(){n=pr("style"),n.textContent=`main.lui-isolated,
|
|
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 mc=i=>{const n=i.use;return n?n==="grid"?new Jv(i):n.createCompoundContainer||n.createCompoundItemContainer||n.attachCompoundItem?new Yv(i):new _r(i):new _r(i)},Bl=(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 Gl(i){return String(i).replaceAll("<","<").replaceAll(">",">").replaceAll(""",'"').replaceAll("'","'").replaceAll("/","/")}class vc{constructor(){this.alertResolvers={},this.alertIndex=0,this.containerService=new za}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,_=!1,C={};const T={navigate:(E,y={})=>{const A={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C,...y};this.dispatchLuigiEvent(U.NAVIGATION_REQUEST,{link:E,...A})},navigateToIntent:(E,y={})=>{let A="#?intent=";if(A+=E,y&&Object.keys(y)?.length){const x=Object.entries(y);if(x.length>0){A+="?";for(const[$,H]of x)A+=$+"="+H+"&";A=A.slice(0,-1)}}T.navigate(A)},fromClosestContext:()=>(f=!0,T),fromContext:E=>(l=E,T),fromVirtualTreeRoot:()=>(p=!0,T),fromParent:()=>(_=!0,T),getCurrentRoute:()=>{const E={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C};return new Promise(((y,A)=>{this.containerService.dispatch(U.GET_CURRENT_ROUTE_REQUEST,this.thisComponent,{...E},(x=>{x?y(x):A("No current route received.")}))}))},withParams:E=>(C=E,T),updateModalPathInternalNavigation:(E,y={},A=!1)=>{if(!E)return void console.warn("Updating path of the modal upon internal navigation prevented. No path specified.");const x={fromClosestContext:f,fromContext:l,fromParent:_,fromVirtualTreeRoot:p,nodeParams:C};this.dispatchLuigiEvent(U.UPDATE_MODAL_PATH_DATA_REQUEST,Object.assign(x,{history:A,link:E,modal:y}))},updateTopNavigation:()=>{this.dispatchLuigiEvent(U.UPDATE_TOP_NAVIGATION_REQUEST,{})},pathExists:E=>{const y={fromContext:l,fromClosestContext:f,fromVirtualTreeRoot:p,fromParent:_,nodeParams:C};return new Promise(((A,x)=>{this.containerService.dispatch(U.CHECK_PATH_EXISTS_REQUEST,this.thisComponent,{...y,link:E},($=>{$?A(!0):x(!1)})),this.containerService.dispatch(U.PATH_EXISTS_REQUEST,this.thisComponent,{...y,link:E},($=>{$?A(!0):x(!1)}))}))},openAsDrawer:(E,y={})=>{T.navigate(E,{drawer:y})},openAsModal:(E,y={})=>{T.navigate(E,{modal:y})},openAsSplitView:(E,y={})=>{T.navigate(E,{splitView:y})},goBack:E=>{this.dispatchLuigiEvent(U.GO_BACK_REQUEST,E)},hasBack:()=>!1,updateModalSettings:(E={},y=!1)=>{this.dispatchLuigiEvent(U.UPDATE_MODAL_SETTINGS_REQUEST,{updatedModalSettings:E,addHistoryEntry:y})}};return T},uxManager:()=>({showAlert:l=>(l.id=this.alertIndex++,new Promise((f=>{this.alertResolvers[l.id]=f,this.dispatchLuigiEvent(U.ALERT_REQUEST,l,(p=>{this.resolveAlert(l.id,p)}))}))),showConfirmationModal:l=>new Promise(((f,p)=>{this.modalResolver={resolve:f,reject:p},this.containerService.dispatch(U.SHOW_CONFIRMATION_MODAL_REQUEST,this.thisComponent,l,(_=>{_?f():p()}))})),getCurrentTheme:()=>this.thisComponent.theme,closeUserSettings:()=>{this.dispatchLuigiEvent(U.CLOSE_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},openUserSettings:()=>{this.dispatchLuigiEvent(U.OPEN_USER_SETTINGS_REQUEST,this.thisComponent.userSettings)},collapseLeftSideNav:()=>{this.dispatchLuigiEvent(U.COLLAPSE_LEFT_NAV_REQUEST,{})},getDirtyStatus:()=>this.thisComponent.dirtyStatus||!1,getDocumentTitle:()=>this.thisComponent.documentTitle,setDocumentTitle:l=>{this.dispatchLuigiEvent(U.SET_DOCUMENT_TITLE_REQUEST,l)},setDirtyStatus:l=>{this.dispatchLuigiEvent(U.SET_DIRTY_STATUS_REQUEST,{dirty:l})},setCurrentLocale:l=>{l&&this.dispatchLuigiEvent(U.SET_CURRENT_LOCALE_REQUEST,{currentLocale:l})},removeBackdrop:()=>{this.dispatchLuigiEvent(U.REMOVE_BACKDROP_REQUEST,{})},addBackdrop:()=>{this.dispatchLuigiEvent(U.ADD_BACKDROP_REQUEST,{})},showLoadingIndicator:()=>{this.dispatchLuigiEvent(U.SHOW_LOADING_INDICATOR_REQUEST,{})},hideLoadingIndicator:()=>{this.dispatchLuigiEvent(U.HIDE_LOADING_INDICATOR_REQUEST,{})},hideAppLoadingIndicator:()=>{this.dispatchLuigiEvent(U.HIDE_LOADING_INDICATOR_REQUEST,{})},closeCurrentModal:()=>{this.dispatchLuigiEvent(U.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(U.CUSTOM_MESSAGE,f)},luigiClientInit:()=>{this.dispatchLuigiEvent(U.INITIALIZED,{})},addNodeParams:(l,f)=>{c||this.dispatchLuigiEvent(U.ADD_NODE_PARAMS_REQUEST,{params:l,data:l,keepBrowserHistory:f})},getNodeParams:l=>{return c?{}:l?(f=this.thisComponent.nodeParams,Object.entries(f).reduce(((p,_)=>(p[Gl(_[0])]=Gl(_[1]),p)),{})):this.thisComponent.nodeParams||{};var f},setAnchor:l=>{c||this.dispatchLuigiEvent(U.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(U.ADD_SEARCH_PARAMS_REQUEST,{data:l,keepBrowserHistory:f})},getUserSettings:()=>this.thisComponent.userSettings||{},setViewGroupData:l=>{this.dispatchLuigiEvent(U.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 _=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,_.origin+_.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 _=0;_<p.length&&(f=l[p[_]],!HTMLElement.isPrototypeOf(f));_++);}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),_=document.createElement("div");r.appendChild(_),r._luigi_node=o,window.customElements.get(p)?this.attachWC(p,_,r,a,f,c,l):window.luigiWCFn?window.luigiWCFn(f,p,_,(()=>{this.attachWC(p,_,r,a,f,c,l)})):o?.webcomponent?.selfRegistered?this.includeSelfRegisteredWCFromUrl(o,f,(()=>{this.attachWC(p,_,r,a,f,c,l)})):this.registerWCFromUrl(f,p).then((()=>{this.attachWC(p,_,r,a,f,c,l)})).catch((C=>{console.warn("ERROR =>",C),this.containerService.dispatch(U.RUNTIME_ERROR_HANDLING_REQUEST,this.thisComponent,C)}))}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(U.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=mc(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,_,C)=>{const T=f[_+"."+p.type]||[];T.push(...f["*."+p.type]||[]),T.forEach((E=>{const y=E.wcElement||l.querySelector("[nodeId="+E.wcElementId+"]");y?y.dispatchEvent(new CustomEvent(E.action,{detail:E.converter?E.converter(p.detail):p.detail})):console.debug("Could not find event target",E)}))}},n.compound?.children?.forEach(((p,_)=>{const C={...a,...p.context},T=o.createCompoundItemContainer(p.layoutConfig);T.eventBus=l.eventBus,o.attachCompoundItem(l,T);const E=p.id||"gen_"+_;this.renderWebComponent(p.viewUrl,T,C,p,E,!0),Bl(f,p,E)})),r.appendChild(l),Bl(f,n.compound,"_root",l),c(l)})).catch((l=>{console.warn("Error: ",l),this.containerService.dispatch(U.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 qr=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")&&ql(i);return{c(){r&&r.c(),n=cc("")},m(a,o){r&&r.m(a,o),Mn(a,n,o)},p(a,o){a[4]&&a[4]!=="false"?r&&(r.d(1),r=null):r?r.p(a,o):(r=ql(a),r.c(),r.m(n.parentNode,n))},d(a){a&&gn(n),r&&r.d(a)}}}function ql(i){let n,r,a,o,c,l;return{c(){n=pr("style"),n.textContent=`main.lui-isolated,
|
|
39
39
|
.lui-isolated iframe {
|
|
40
40
|
width: 100%;
|
|
41
41
|
height: 100%;
|
|
@@ -44,12 +44,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
44
44
|
|
|
45
45
|
main.lui-isolated {
|
|
46
46
|
line-height: 0;
|
|
47
|
-
}`,r=cc(" "),a=pr("iframe"),Hl(a.src,o=i[3])||_t(a,"src",o),_t(a,"title",i[1]),_t(a,"allow",c=Vl(i[0])),_t(a,"sandbox",l=i[2]?i[2].join(" "):void 0)},m(f,p){Dn(f,n,p),Dn(f,r,p),Dn(f,a,p),i[28](a)},p(f,p){8&p[0]&&!Hl(a.src,o=f[3])&&_t(a,"src",o),2&p[0]&&_t(a,"title",f[1]),1&p[0]&&c!==(c=Vl(f[0]))&&_t(a,"allow",c),4&p[0]&&l!==(l=f[2]?f[2].join(" "):void 0)&&_t(a,"sandbox",l)},d(f){f&&(dn(n),dn(r),dn(a)),i[28](null)}}}function tw(i){let n,r,a=i[5]&&Ql(i);return{c(){n=pr("main"),a&&a.c(),_t(n,"class",r=i[4]?void 0:"lui-isolated")},m(o,c){Dn(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")&&_t(n,"class",r)},i:fn,o:fn,d(o){o&&dn(n),a&&a.d(),i[29](null)}}}function nw(i,n,r){let{activeFeatureToggleList:a}=n,{allowRules:o}=n,{anchor:c}=n,{authData:l}=n,{clientPermissions:f}=n,{context:p}=n,{deferInit:_}=n,{dirtyStatus:C}=n,{documentTitle:T}=n,{hasBack:E}=n,{label:y}=n,{locale:A}=n,{noShadow:x}=n,{nodeParams:$}=n,{pathParams:H}=n,{sandboxRules:re}=n,{searchParams:Oe}=n,{skipCookieCheck:Ie}=n,{skipInitCheck:Qe}=n,{theme:xe}=n,{userSettings:Ze}=n,{viewurl:ye}=n,{webcomponent:be}=n;const ve={};let Re,D,Xt=!1;const wt=new vc,$e=N=>{if(!Xt){N.sendCustomMessage=(oe,ke)=>{ar.sendCustomMessage(oe,N.getNoShadow()?N:Re,!!be,ve,ke)},N.updateContext=(oe,ke)=>{if(r(8,p=oe),be)(N.getNoShadow()?N:Re)._luigi_mfe_webcomponent.context=oe;else{const Zt={...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};ar.updateContext(oe,Zt,ve,$,H,Oe)}},N.closeAlert=(oe,ke)=>{N.notifyAlertClosed(oe,ke)},N.notifyAlertClosed=(oe,ke)=>{N.isConnected&&(be?wt.resolveAlert(oe,ke):ar.notifyAlertClosed(oe,ke,ve))},N.notifyConfirmationModalClosed=oe=>{N.isConnected&&(be?wt.notifyConfirmationModalClosed(!!oe):ar.notifyConfirmationModalClosed(!!oe,ve))},hn.registerContainer(N),wt.thisComponent=N;const ot=qr.resolveContext(p);if(N.updateViewUrl=(oe,ke)=>{oe?.length&&ar.updateViewUrl(oe,qr.resolveContext(p),ke,ve)},be&&be!="false"){N.getNoShadow()?N.innerHTML="":(r(7,Re.innerHTML="",Re),N.attachShadow({mode:"open"}).append(Re));const oe=qr.checkWebcomponentValue(be);wt.renderWebComponent(ye,N.getNoShadow()?N:Re,ot,typeof oe=="object"?{webcomponent:oe}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(Re));Qe?(N.initialized=!0,setTimeout((()=>{wt.dispatchLuigiEvent(O.INITIALIZED,{})}))):be&&(N.getNoShadow()?N:Re).addEventListener("wc_ready",(()=>{(N.getNoShadow()?N:Re)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,wt.dispatchLuigiEvent(O.INITIALIZED,{}))})),r(5,Xt=!0),N.containerInitialized=!0}};var En;return fc((async()=>{r(27,D=Re.parentNode),r(27,D.iframeHandle=ve,D),r(27,D.init=()=>{$e(D)},D),!_&&ye&&$e(D)})),En=async()=>{},hc().$$.on_destroy.push(En),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,_=N.deferInit),"dirtyStatus"in N&&r(14,C=N.dirtyStatus),"documentTitle"in N&&r(15,T=N.documentTitle),"hasBack"in N&&r(16,E=N.hasBack),"label"in N&&r(1,y=N.label),"locale"in N&&r(17,A=N.locale),"noShadow"in N&&r(18,x=N.noShadow),"nodeParams"in N&&r(19,$=N.nodeParams),"pathParams"in N&&r(20,H=N.pathParams),"sandboxRules"in N&&r(2,re=N.sandboxRules),"searchParams"in N&&r(21,Oe=N.searchParams),"skipCookieCheck"in N&&r(22,Ie=N.skipCookieCheck),"skipInitCheck"in N&&r(23,Qe=N.skipInitCheck),"theme"in N&&r(24,xe=N.theme),"userSettings"in N&&r(25,Ze=N.userSettings),"viewurl"in N&&r(3,ye=N.viewurl),"webcomponent"in N&&r(4,be=N.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Xt&&ye&&!_&&D&&$e(D)},[o,y,re,ye,be,Xt,ve,Re,p,a,c,l,f,_,C,T,E,A,x,$,H,Oe,Ie,Qe,xe,Ze,()=>a&&o&&c&&l&&f&&C&&T&&E&&A&&x&&$&&H&&re&&Oe&&Ie&&Qe&&xe&&Ze,D,function(N){Jr[N?"unshift":"push"]((()=>{ve.iframe=N,r(6,ve)}))},function(N){Jr[N?"unshift":"push"]((()=>{Re=N,r(7,Re)}))}]}class wc extends _c{constructor(n){super(),dc(this,n,nw,tw,lc,{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}),q()}get allowRules(){return this.$$.ctx[0]}set allowRules(n){this.$$set({allowRules:n}),q()}get anchor(){return this.$$.ctx[10]}set anchor(n){this.$$set({anchor:n}),q()}get authData(){return this.$$.ctx[11]}set authData(n){this.$$set({authData:n}),q()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(n){this.$$set({clientPermissions:n}),q()}get context(){return this.$$.ctx[8]}set context(n){this.$$set({context:n}),q()}get deferInit(){return this.$$.ctx[13]}set deferInit(n){this.$$set({deferInit:n}),q()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),q()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(n){this.$$set({documentTitle:n}),q()}get hasBack(){return this.$$.ctx[16]}set hasBack(n){this.$$set({hasBack:n}),q()}get label(){return this.$$.ctx[1]}set label(n){this.$$set({label:n}),q()}get locale(){return this.$$.ctx[17]}set locale(n){this.$$set({locale:n}),q()}get noShadow(){return this.$$.ctx[18]}set noShadow(n){this.$$set({noShadow:n}),q()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(n){this.$$set({nodeParams:n}),q()}get pathParams(){return this.$$.ctx[20]}set pathParams(n){this.$$set({pathParams:n}),q()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(n){this.$$set({sandboxRules:n}),q()}get searchParams(){return this.$$.ctx[21]}set searchParams(n){this.$$set({searchParams:n}),q()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(n){this.$$set({skipCookieCheck:n}),q()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),q()}get theme(){return this.$$.ctx[24]}set theme(n){this.$$set({theme:n}),q()}get userSettings(){return this.$$.ctx[25]}set userSettings(n){this.$$set({userSettings:n}),q()}get viewurl(){return this.$$.ctx[3]}set viewurl(n){this.$$set({viewurl:n}),q()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(n){this.$$set({webcomponent:n}),q()}get unwarn(){return this.$$.ctx[26]}}function rw(i){qv(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function iw(i){let n;return{c(){n=pr("main"),_t(n,"class","svelte-1buc46y")},m(r,a){Dn(r,n,a),i[21](n)},p:fn,i:fn,o:fn,d(r){r&&dn(n),i[21](null)}}}function sw(i,n,r){let a,o,{activeFeatureToggleList:c}=n,{anchor:l}=n,{clientPermissions:f}=n,{compoundConfig:p}=n,{context:_}=n,{deferInit:C}=n,{dirtyStatus:T}=n,{documentTitle:E}=n,{hasBack:y}=n,{locale:A}=n,{noShadow:x}=n,{nodeParams:$}=n,{pathParams:H}=n,{searchParams:re}=n,{skipInitCheck:Oe}=n,{theme:Ie}=n,{userSettings:Qe}=n,{viewurl:xe}=n,{webcomponent:Ze}=n,ye=!1;const be=new za,ve=new vc,Re=D=>{if(!p||ye)return;D.updateContext=($e,En)=>{const N=D.getNoShadow()?D:a;N._luigi_mfe_webcomponent.context=$e,r(1,_=$e);const ot=N._luigi_mfe_webcomponent;ot&&ot.querySelectorAll("[lui_web_component]")?.forEach((ke=>{const Zt=ke.context||{};ke.context=Object.assign(Zt,$e)}))};const Xt=qr.resolveContext(_);r(2,C=!1),D.notifyAlertClosed=($e,En)=>{D.isConnected&&ve.resolveAlert($e,En)},D.notifyConfirmationModalClosed=$e=>{D.isConnected&&ve.notifyConfirmationModalClosed(!!$e)};const wt={compound:p,viewUrl:xe,webcomponent:qr.checkWebcomponentValue(Ze)||!0};D.getNoShadow()?D.innerHTML="":(r(0,a.innerHTML="",a),D.attachShadow({mode:"open"}).append(a)),ve.renderWebComponentCompound(wt,D.getNoShadow()?D:a,Xt).then(($e=>{o=$e,Oe||!wt.viewUrl?(D.initialized=!0,setTimeout((()=>{ve.dispatchLuigiEvent(O.INITIALIZED,{})}))):o.LuigiClient&&!o.deferLuigiClientWCInit&&(D.initialized=!0,ve.dispatchLuigiEvent(O.INITIALIZED,{}))})),ye=!0,D.containerInitialized=!0};return fc((async()=>{const D=a.getRootNode()===document?a.parentNode:a.getRootNode().host;D.init=()=>{Re(D)},C||Re(D),be.registerContainer(D),ve.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,_=D.context),"deferInit"in D&&r(2,C=D.deferInit),"dirtyStatus"in D&&r(7,T=D.dirtyStatus),"documentTitle"in D&&r(8,E=D.documentTitle),"hasBack"in D&&r(9,y=D.hasBack),"locale"in D&&r(10,A=D.locale),"noShadow"in D&&r(11,x=D.noShadow),"nodeParams"in D&&r(12,$=D.nodeParams),"pathParams"in D&&r(13,H=D.pathParams),"searchParams"in D&&r(14,re=D.searchParams),"skipInitCheck"in D&&r(15,Oe=D.skipInitCheck),"theme"in D&&r(16,Ie=D.theme),"userSettings"in D&&r(17,Qe=D.userSettings),"viewurl"in D&&r(18,xe=D.viewurl),"webcomponent"in D&&r(19,Ze=D.webcomponent)},[a,_,C,c,l,f,p,T,E,y,A,x,$,H,re,Oe,Ie,Qe,xe,Ze,()=>c&&l&&f&&T&&E&&y&&A&&x&&$&&H&&re&&Oe&&Ie&&Qe,function(D){Jr[D?"unshift":"push"]((()=>{a=D,r(0,a)}))}]}pc(wc,{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"&&ar.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class zl extends _c{constructor(n){super(),dc(this,n,sw,iw,lc,{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},rw)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),q()}get anchor(){return this.$$.ctx[4]}set anchor(n){this.$$set({anchor:n}),q()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(n){this.$$set({clientPermissions:n}),q()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(n){this.$$set({compoundConfig:n}),q()}get context(){return this.$$.ctx[1]}set context(n){this.$$set({context:n}),q()}get deferInit(){return this.$$.ctx[2]}set deferInit(n){this.$$set({deferInit:n}),q()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),q()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(n){this.$$set({documentTitle:n}),q()}get hasBack(){return this.$$.ctx[9]}set hasBack(n){this.$$set({hasBack:n}),q()}get locale(){return this.$$.ctx[10]}set locale(n){this.$$set({locale:n}),q()}get noShadow(){return this.$$.ctx[11]}set noShadow(n){this.$$set({noShadow:n}),q()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(n){this.$$set({nodeParams:n}),q()}get pathParams(){return this.$$.ctx[13]}set pathParams(n){this.$$set({pathParams:n}),q()}get searchParams(){return this.$$.ctx[14]}set searchParams(n){this.$$set({searchParams:n}),q()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),q()}get theme(){return this.$$.ctx[16]}set theme(n){this.$$set({theme:n}),q()}get userSettings(){return this.$$.ctx[17]}set userSettings(n){this.$$set({userSettings:n}),q()}get viewurl(){return this.$$.ctx[18]}set viewurl(n){this.$$set({viewurl:n}),q()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(n){this.$$set({webcomponent:n}),q()}get unwarn(){return this.$$.ctx[20]}}pc(zl,{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",wc.element),customElements.get("luigi-compound-container")||customElements.define("luigi-compound-container",zl.element);const U={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=U.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=U.mapPathToNode(U.getCurrentPath(r)?.path,i)||"",o=await n.navigation().navService.extractDataFromPath(a);return U.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[rs.sanitizeParam(r[0])]=rs.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=we.normalizePath(location.hash),[r,a]=n.split("?");return{path:r,query:a}}else return{path:we.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 U.getLocation().search?U.parseParams(U.getLocation().search.slice(1)):{}},getLocation(){return location},getLocationHashQueryParams(){const i=U.getLocation().hash.indexOf(this.defaultQueryParamSeparator);return i!==-1?U.parseParams(U.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 _=l.children.filter(C=>C.pathSegment===f);_?.length&&(p=_[0])}return p};let c=[];if(r.length>1&&a.length===1){let l;r.forEach((f,p)=>{const _=p===0?a[0]:l;l=o(_,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=U.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 $n.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(_=>_.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(U.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}},we={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||!we.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=Un.isLoggedIn(),f=i.anonymousAccess;if(l&&f==="exclusive"||!l&&f!=="exclusive"&&f!==!0)return!1}const o=a.featureToggles();if(!we.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=we.checkMatch(o.link||"",n.nodesInPath??[]),!c&&o.selectionConditions&&o.selectionConditions.route&&(c=we.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 we.findVirtualTreeRootNode(i.parent)},validatePathAndGetRedirect:async(i,n)=>{const r=await U.pathExists(i,n);return await U.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(_=>{try{const C=this.processTitleData(_,c);i.titleResolver._cache={key:l,value:C},r(C)}catch(C){a(C)}})}).catch(p=>{a(p)})})},getPropertyChainValue(i,n,r){return!n||!i?r:Ma.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 _n{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 Ua={logout:{label:"Sign Out",icon:"log"}};class aw{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 ne=new aw;class mn{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(){X.modalContainer.pop(),this._modalStack.pop()}}class vn{constructor(n){this.luigi=n,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=ne.get(mn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=ne.get(_n)),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 T=await this.luigi.getConfigValueAsync("navigation.nodes");typeof T=="object"&&!Array.isArray(T)?(l=T,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:T},l.children=await this.getChildren(l,c),l.children=this.prepareRootNodes(l.children||[],c),this.getNodeDataManagementService().setRootNode(l)}const f={...c||{},...l.context||{}},p={},_={context:f,selectedNodeChildren:l.children,nodesInPath:[l],rootNodes:l.children,pathParams:p,matchedPath:""};if(l.viewUrl&&a.length===0)_.selectedNode=l;else for(const T of a)if(_.selectedNodeChildren){const E=this.findMatchingNode(T,_.selectedNodeChildren||[]);if(!E){console.warn("No matching node found for segment:",T);break}const y=E.context||{},A=we.mergeContext(c,y);let x=A;if(E.pathSegment?.startsWith(":")&&(p[E.pathSegment.replace(":","")]=rs.sanitizeParam(T),x=U.substituteDynamicParamsInObject(A,p)),c=x,E.context=x,_.selectedNode=E,_.selectedNode&&_.nodesInPath?.push(_.selectedNode),E.virtualTree||E._virtualTree){const $=this.buildVirtualTree(E,T,p);$&&$.length>0&&(E.children=$)}_.selectedNodeChildren=await this.getChildren(E,c)}const C=_.nodesInPath?.filter(T=>T.pathSegment).map(T=>T.pathSegment)||[];return _.matchedPath=a.filter((T,E)=>C[E]&&C[E].startsWith(":")||C[E]===T).join("/")||"",_}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.
|
|
47
|
+
}`,r=cc(" "),a=pr("iframe"),Hl(a.src,o=i[3])||_t(a,"src",o),_t(a,"title",i[1]),_t(a,"allow",c=Vl(i[0])),_t(a,"sandbox",l=i[2]?i[2].join(" "):void 0)},m(f,p){Mn(f,n,p),Mn(f,r,p),Mn(f,a,p),i[28](a)},p(f,p){8&p[0]&&!Hl(a.src,o=f[3])&&_t(a,"src",o),2&p[0]&&_t(a,"title",f[1]),1&p[0]&&c!==(c=Vl(f[0]))&&_t(a,"allow",c),4&p[0]&&l!==(l=f[2]?f[2].join(" "):void 0)&&_t(a,"sandbox",l)},d(f){f&&(gn(n),gn(r),gn(a)),i[28](null)}}}function Xv(i){let n,r,a=i[5]&&Ql(i);return{c(){n=pr("main"),a&&a.c(),_t(n,"class",r=i[4]?void 0:"lui-isolated")},m(o,c){Mn(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")&&_t(n,"class",r)},i:dn,o:dn,d(o){o&&gn(n),a&&a.d(),i[29](null)}}}function Zv(i,n,r){let{activeFeatureToggleList:a}=n,{allowRules:o}=n,{anchor:c}=n,{authData:l}=n,{clientPermissions:f}=n,{context:p}=n,{deferInit:_}=n,{dirtyStatus:C}=n,{documentTitle:T}=n,{hasBack:E}=n,{label:y}=n,{locale:A}=n,{noShadow:x}=n,{nodeParams:$}=n,{pathParams:H}=n,{sandboxRules:re}=n,{searchParams:Ue}=n,{skipCookieCheck:Ie}=n,{skipInitCheck:qe}=n,{theme:xe}=n,{userSettings:Ze}=n,{viewurl:ye}=n,{webcomponent:be}=n;const ve={};let Re,D,Xt=!1;const St=new vc,$e=N=>{if(!Xt){N.sendCustomMessage=(oe,ke)=>{or.sendCustomMessage(oe,N.getNoShadow()?N:Re,!!be,ve,ke)},N.updateContext=(oe,ke)=>{if(r(8,p=oe),be)(N.getNoShadow()?N:Re)._luigi_mfe_webcomponent.context=oe;else{const Zt={...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};or.updateContext(oe,Zt,ve,$,H,Ue)}},N.closeAlert=(oe,ke)=>{N.notifyAlertClosed(oe,ke)},N.notifyAlertClosed=(oe,ke)=>{N.isConnected&&(be?St.resolveAlert(oe,ke):or.notifyAlertClosed(oe,ke,ve))},N.notifyConfirmationModalClosed=oe=>{N.isConnected&&(be?St.notifyConfirmationModalClosed(!!oe):or.notifyConfirmationModalClosed(!!oe,ve))},hn.registerContainer(N),St.thisComponent=N;const ot=qr.resolveContext(p);if(N.updateViewUrl=(oe,ke)=>{oe?.length&&or.updateViewUrl(oe,qr.resolveContext(p),ke,ve)},be&&be!="false"){N.getNoShadow()?N.innerHTML="":(r(7,Re.innerHTML="",Re),N.attachShadow({mode:"open"}).append(Re));const oe=qr.checkWebcomponentValue(be);St.renderWebComponent(ye,N.getNoShadow()?N:Re,ot,typeof oe=="object"?{webcomponent:oe}:{})}else N.getNoShadow()||(N.innerHTML="",N.attachShadow({mode:"open"}).append(Re));qe?(N.initialized=!0,setTimeout((()=>{St.dispatchLuigiEvent(U.INITIALIZED,{})}))):be&&(N.getNoShadow()?N:Re).addEventListener("wc_ready",(()=>{(N.getNoShadow()?N:Re)._luigi_mfe_webcomponent?.deferLuigiClientWCInit||(N.initialized=!0,St.dispatchLuigiEvent(U.INITIALIZED,{}))})),r(5,Xt=!0),N.containerInitialized=!0}};var Cn;return fc((async()=>{r(27,D=Re.parentNode),r(27,D.iframeHandle=ve,D),r(27,D.init=()=>{$e(D)},D),!_&&ye&&$e(D)})),Cn=async()=>{},hc().$$.on_destroy.push(Cn),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,_=N.deferInit),"dirtyStatus"in N&&r(14,C=N.dirtyStatus),"documentTitle"in N&&r(15,T=N.documentTitle),"hasBack"in N&&r(16,E=N.hasBack),"label"in N&&r(1,y=N.label),"locale"in N&&r(17,A=N.locale),"noShadow"in N&&r(18,x=N.noShadow),"nodeParams"in N&&r(19,$=N.nodeParams),"pathParams"in N&&r(20,H=N.pathParams),"sandboxRules"in N&&r(2,re=N.sandboxRules),"searchParams"in N&&r(21,Ue=N.searchParams),"skipCookieCheck"in N&&r(22,Ie=N.skipCookieCheck),"skipInitCheck"in N&&r(23,qe=N.skipInitCheck),"theme"in N&&r(24,xe=N.theme),"userSettings"in N&&r(25,Ze=N.userSettings),"viewurl"in N&&r(3,ye=N.viewurl),"webcomponent"in N&&r(4,be=N.webcomponent)},i.$$.update=()=>{134225960&i.$$.dirty[0]&&!Xt&&ye&&!_&&D&&$e(D)},[o,y,re,ye,be,Xt,ve,Re,p,a,c,l,f,_,C,T,E,A,x,$,H,Ue,Ie,qe,xe,Ze,()=>a&&o&&c&&l&&f&&C&&T&&E&&A&&x&&$&&H&&re&&Ue&&Ie&&qe&&xe&&Ze,D,function(N){Jr[N?"unshift":"push"]((()=>{ve.iframe=N,r(6,ve)}))},function(N){Jr[N?"unshift":"push"]((()=>{Re=N,r(7,Re)}))}]}class Sc extends _c{constructor(n){super(),dc(this,n,Zv,Xv,lc,{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}),q()}get allowRules(){return this.$$.ctx[0]}set allowRules(n){this.$$set({allowRules:n}),q()}get anchor(){return this.$$.ctx[10]}set anchor(n){this.$$set({anchor:n}),q()}get authData(){return this.$$.ctx[11]}set authData(n){this.$$set({authData:n}),q()}get clientPermissions(){return this.$$.ctx[12]}set clientPermissions(n){this.$$set({clientPermissions:n}),q()}get context(){return this.$$.ctx[8]}set context(n){this.$$set({context:n}),q()}get deferInit(){return this.$$.ctx[13]}set deferInit(n){this.$$set({deferInit:n}),q()}get dirtyStatus(){return this.$$.ctx[14]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),q()}get documentTitle(){return this.$$.ctx[15]}set documentTitle(n){this.$$set({documentTitle:n}),q()}get hasBack(){return this.$$.ctx[16]}set hasBack(n){this.$$set({hasBack:n}),q()}get label(){return this.$$.ctx[1]}set label(n){this.$$set({label:n}),q()}get locale(){return this.$$.ctx[17]}set locale(n){this.$$set({locale:n}),q()}get noShadow(){return this.$$.ctx[18]}set noShadow(n){this.$$set({noShadow:n}),q()}get nodeParams(){return this.$$.ctx[19]}set nodeParams(n){this.$$set({nodeParams:n}),q()}get pathParams(){return this.$$.ctx[20]}set pathParams(n){this.$$set({pathParams:n}),q()}get sandboxRules(){return this.$$.ctx[2]}set sandboxRules(n){this.$$set({sandboxRules:n}),q()}get searchParams(){return this.$$.ctx[21]}set searchParams(n){this.$$set({searchParams:n}),q()}get skipCookieCheck(){return this.$$.ctx[22]}set skipCookieCheck(n){this.$$set({skipCookieCheck:n}),q()}get skipInitCheck(){return this.$$.ctx[23]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),q()}get theme(){return this.$$.ctx[24]}set theme(n){this.$$set({theme:n}),q()}get userSettings(){return this.$$.ctx[25]}set userSettings(n){this.$$set({userSettings:n}),q()}get viewurl(){return this.$$.ctx[3]}set viewurl(n){this.$$set({viewurl:n}),q()}get webcomponent(){return this.$$.ctx[4]}set webcomponent(n){this.$$set({webcomponent:n}),q()}get unwarn(){return this.$$.ctx[26]}}function jv(i){Vv(i,"svelte-1buc46y","main.svelte-1buc46y{width:100%;height:100%;border:none}")}function eS(i){let n;return{c(){n=pr("main"),_t(n,"class","svelte-1buc46y")},m(r,a){Mn(r,n,a),i[21](n)},p:dn,i:dn,o:dn,d(r){r&&gn(n),i[21](null)}}}function tS(i,n,r){let a,o,{activeFeatureToggleList:c}=n,{anchor:l}=n,{clientPermissions:f}=n,{compoundConfig:p}=n,{context:_}=n,{deferInit:C}=n,{dirtyStatus:T}=n,{documentTitle:E}=n,{hasBack:y}=n,{locale:A}=n,{noShadow:x}=n,{nodeParams:$}=n,{pathParams:H}=n,{searchParams:re}=n,{skipInitCheck:Ue}=n,{theme:Ie}=n,{userSettings:qe}=n,{viewurl:xe}=n,{webcomponent:Ze}=n,ye=!1;const be=new za,ve=new vc,Re=D=>{if(!p||ye)return;D.updateContext=($e,Cn)=>{const N=D.getNoShadow()?D:a;N._luigi_mfe_webcomponent.context=$e,r(1,_=$e);const ot=N._luigi_mfe_webcomponent;ot&&ot.querySelectorAll("[lui_web_component]")?.forEach((ke=>{const Zt=ke.context||{};ke.context=Object.assign(Zt,$e)}))};const Xt=qr.resolveContext(_);r(2,C=!1),D.notifyAlertClosed=($e,Cn)=>{D.isConnected&&ve.resolveAlert($e,Cn)},D.notifyConfirmationModalClosed=$e=>{D.isConnected&&ve.notifyConfirmationModalClosed(!!$e)};const St={compound:p,viewUrl:xe,webcomponent:qr.checkWebcomponentValue(Ze)||!0};D.getNoShadow()?D.innerHTML="":(r(0,a.innerHTML="",a),D.attachShadow({mode:"open"}).append(a)),ve.renderWebComponentCompound(St,D.getNoShadow()?D:a,Xt).then(($e=>{o=$e,Ue||!St.viewUrl?(D.initialized=!0,setTimeout((()=>{ve.dispatchLuigiEvent(U.INITIALIZED,{})}))):o.LuigiClient&&!o.deferLuigiClientWCInit&&(D.initialized=!0,ve.dispatchLuigiEvent(U.INITIALIZED,{}))})),ye=!0,D.containerInitialized=!0};return fc((async()=>{const D=a.getRootNode()===document?a.parentNode:a.getRootNode().host;D.init=()=>{Re(D)},C||Re(D),be.registerContainer(D),ve.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,_=D.context),"deferInit"in D&&r(2,C=D.deferInit),"dirtyStatus"in D&&r(7,T=D.dirtyStatus),"documentTitle"in D&&r(8,E=D.documentTitle),"hasBack"in D&&r(9,y=D.hasBack),"locale"in D&&r(10,A=D.locale),"noShadow"in D&&r(11,x=D.noShadow),"nodeParams"in D&&r(12,$=D.nodeParams),"pathParams"in D&&r(13,H=D.pathParams),"searchParams"in D&&r(14,re=D.searchParams),"skipInitCheck"in D&&r(15,Ue=D.skipInitCheck),"theme"in D&&r(16,Ie=D.theme),"userSettings"in D&&r(17,qe=D.userSettings),"viewurl"in D&&r(18,xe=D.viewurl),"webcomponent"in D&&r(19,Ze=D.webcomponent)},[a,_,C,c,l,f,p,T,E,y,A,x,$,H,re,Ue,Ie,qe,xe,Ze,()=>c&&l&&f&&T&&E&&y&&A&&x&&$&&H&&re&&Ue&&Ie&&qe,function(D){Jr[D?"unshift":"push"]((()=>{a=D,r(0,a)}))}]}pc(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"&&or.updateAuthData(this.iframeHandle,JSON.parse(o)))}getNoShadow(){return this.hasAttribute("no-shadow")||this.noShadow}}}));class zl extends _c{constructor(n){super(),dc(this,n,tS,eS,lc,{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},jv)}get activeFeatureToggleList(){return this.$$.ctx[3]}set activeFeatureToggleList(n){this.$$set({activeFeatureToggleList:n}),q()}get anchor(){return this.$$.ctx[4]}set anchor(n){this.$$set({anchor:n}),q()}get clientPermissions(){return this.$$.ctx[5]}set clientPermissions(n){this.$$set({clientPermissions:n}),q()}get compoundConfig(){return this.$$.ctx[6]}set compoundConfig(n){this.$$set({compoundConfig:n}),q()}get context(){return this.$$.ctx[1]}set context(n){this.$$set({context:n}),q()}get deferInit(){return this.$$.ctx[2]}set deferInit(n){this.$$set({deferInit:n}),q()}get dirtyStatus(){return this.$$.ctx[7]}set dirtyStatus(n){this.$$set({dirtyStatus:n}),q()}get documentTitle(){return this.$$.ctx[8]}set documentTitle(n){this.$$set({documentTitle:n}),q()}get hasBack(){return this.$$.ctx[9]}set hasBack(n){this.$$set({hasBack:n}),q()}get locale(){return this.$$.ctx[10]}set locale(n){this.$$set({locale:n}),q()}get noShadow(){return this.$$.ctx[11]}set noShadow(n){this.$$set({noShadow:n}),q()}get nodeParams(){return this.$$.ctx[12]}set nodeParams(n){this.$$set({nodeParams:n}),q()}get pathParams(){return this.$$.ctx[13]}set pathParams(n){this.$$set({pathParams:n}),q()}get searchParams(){return this.$$.ctx[14]}set searchParams(n){this.$$set({searchParams:n}),q()}get skipInitCheck(){return this.$$.ctx[15]}set skipInitCheck(n){this.$$set({skipInitCheck:n}),q()}get theme(){return this.$$.ctx[16]}set theme(n){this.$$set({theme:n}),q()}get userSettings(){return this.$$.ctx[17]}set userSettings(n){this.$$set({userSettings:n}),q()}get viewurl(){return this.$$.ctx[18]}set viewurl(n){this.$$set({viewurl:n}),q()}get webcomponent(){return this.$$.ctx[19]}set webcomponent(n){this.$$set({webcomponent:n}),q()}get unwarn(){return this.$$.ctx[20]}}pc(zl,{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",zl.element);const is={sanitizeHtml(i=""){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/javascript:/gi,"").replace(/data:/gi,"").replace(/vbscript:/gi,"")},restoreSanitizedBrs(i=""){return i.replace(/<br\/>/g,"<br>").replace(/<br \/>/g,"<br>").replace(/<br>/g,"<br>").replace(/<br >/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(`<${r[a]}/>`,"g"),c=new RegExp(`<${r[a]} />`,"g"),l=new RegExp(`<${r[a]}>`,"g"),f=new RegExp(`<${r[a]} >`,"g"),p=new RegExp(`</${r[a]}[/]>`,"g"),_=new RegExp(`</${r[a]} [/]>`,"g"),C=new RegExp(`<[/]${r[a]}>`,"g"),T=new RegExp(`<[/]${r[a]} >`,"g");n=n.replace(o,`<${r[a]}>`).replace(c,`<${r[a]}>`).replace(l,`<${r[a]}>`).replace(f,`<${r[a]}>`).replace(p,`</${r[a]}>`).replace(_,`</${r[a]}>`).replace(C,`</${r[a]}>`).replace(T,`</${r[a]}>`)}return n},sanatizeHtmlExceptTextFormatting(i=""){return this.restoreSanitizedElements(this.sanitizeHtml(i))},sanitizeParam(i=""){return String(i).replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},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)}`,_=this.restoreSanitizedBrs(this.sanitizeHtml(f.text)),C=`<a id="${p}">${_}</a>`,T=this.escapeKeyForRegexp(l),E=new RegExp(`({${T}})`,"g");return{sanitizedText:c.sanitizedText.replace(E,C),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[is.sanitizeParam(r[0])]=is.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=Se.normalizePath(location.hash),[r,a]=n.split("?");return{path:r,query:a}}else return{path:Se.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 _=l.children.filter(C=>C.pathSegment===f);_?.length&&(p=_[0])}return p};let c=[];if(r.length>1&&a.length===1){let l;r.forEach((f,p)=>{const _=p===0?a[0]:l;l=o(_,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 Dn.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(_=>_.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}},Se={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||!Se.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=fn.isLoggedIn(),f=i.anonymousAccess;if(l&&f==="exclusive"||!l&&f!=="exclusive"&&f!==!0)return!1}const o=a.featureToggles();if(!Se.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=Se.checkMatch(o.link||"",n.nodesInPath??[]),!c&&o.selectionConditions&&o.selectionConditions.route&&(c=Se.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 Se.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(_=>{try{const C=this.processTitleData(_,c);i.titleResolver._cache={key:l,value:C},r(C)}catch(C){a(C)}})}).catch(p=>{a(p)})})},getPropertyChainValue(i,n,r){return!n||!i?r:Ma.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 mn{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 nS{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 ne=new nS;class vn{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(){K.modalContainer.pop(),this._modalStack.pop()}}class Sn{constructor(n){this.luigi=n,this.previousBreadcrumbs={}}getModalService(){return this.modalService||(this.modalService=ne.get(vn)),this.modalService}getNodeDataManagementService(){return this.nodeDataManagementService||(this.nodeDataManagementService=ne.get(mn)),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 T=await this.luigi.getConfigValueAsync("navigation.nodes");typeof T=="object"&&!Array.isArray(T)?(l=T,l.pathSegment&&(l.pathSegment="",console.warn("Root node must have an empty path segment. Provided path segment will be ignored."))):l={children:T},l.children=await this.getChildren(l,c),l.children=this.prepareRootNodes(l.children||[],c),this.getNodeDataManagementService().setRootNode(l)}const f={...c||{},...l.context||{}},p={},_={context:f,selectedNodeChildren:l.children,nodesInPath:[l],rootNodes:l.children,pathParams:p,matchedPath:""};if(l.viewUrl&&a.length===0)_.selectedNode=l;else for(const T of a)if(_.selectedNodeChildren){const E=this.findMatchingNode(T,_.selectedNodeChildren||[]);if(!E){console.warn("No matching node found for segment:",T);break}const y=E.context||{},A=Se.mergeContext(c,y);let x=A;if(E.pathSegment?.startsWith(":")&&(p[E.pathSegment.replace(":","")]=is.sanitizeParam(T),x=O.substituteDynamicParamsInObject(A,p)),c=x,E.context=x,_.selectedNode=E,_.selectedNode&&_.nodesInPath?.push(_.selectedNode),E.virtualTree||E._virtualTree){const $=this.buildVirtualTree(E,T,p);$&&$.length>0&&(E.children=$)}_.selectedNodeChildren=await this.getChildren(E,c)}const C=_.nodesInPath?.filter(T=>T.pathSegment).map(T=>T.pathSegment)||[];return _.matchedPath=a.filter((T,E)=>C[E]&&C[E].startsWith(":")||C[E]===T).join("/")||"",_}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.
|
|
48
48
|
Static and dynamic nodes cannot be used together on the same level. Static node gets cleaned up.
|
|
49
49
|
Remove the static node from the configuration to resolve this warning.
|
|
50
50
|
Affected pathSegment:`,n,"Children:",r),r=r.filter(l=>l.pathSegment&&l.pathSegment.startsWith(":"))),c>1)){console.error(`Invalid node setup detected.
|
|
51
51
|
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(we.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 _=o[f];_||(_={category:{altText:l.category.altText||"",icon:l.category.icon,id:f,label:p,nodes:[],tooltip:this.resolveTooltipText(l.category,p)}},o[f]=_,c.push(_)),_.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||!we.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(_=>!_.node?.hideFromNav&&_.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(y=>{y.children&&(y.tabNav||(l+="/"+(y.pathSegment||"")),c.push(y))});const f=this.getTruncatedChildren(a.nodesInPath??[]);let p=[...f].pop(),_=a.selectedNode;(p?.keepSelectedForChildren||p?.tabNav)&&(_=p,f.pop(),p=[...f].pop());let C,T=_;_?a.rootNodes.includes(_)?(C=_,T=void 0):_.tabNav||_.keepSelectedForChildren?C=p:C=[...c].pop():(C=[...c].pop(),T=void 0);let E=await this.getChildren(C,C?.context||{})||[];return o=this.buildNavItems(E,T,a),o=this.applyNavGroups(o),{selectedNode:_||{},items:o,basePath:l.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:y=>y.node&&this.navItemClick(y.node,a)}}navItemClick(n,r){let a=U.getNodePath(n),o=r?.pathParams;if(a=F.replaceVars(a,o||{},":",!1),!a&&a!==""){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}this.luigi.navigation().navigate(a)}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=we.updateHeaderTitle(l,o);c?.length&&c.map(y=>({...y,label:this.luigi.i18n().getTranslation(y.label||"")}));const p=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||Ua.logout.label,_=y=>{if(y.openNodeInModal&&!y.externalLink?.url)this.luigi.navigation().openAsModal(y.link||"",y.openNodeInModal===!0?{}:y.openNodeInModal);else if(y.link)this.luigi.navigation().navigate(y.link);else if(y.externalLink?.url)if(y.externalLink.sameWindow)window.location.href=y.externalLink.url;else{const A=window.open(y.externalLink.url,"_blank","noopener noreferrer");A&&(A.opener=null,A.focus())}},C={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&Un.isLoggedIn(),items:c,itemClick:_,logout:{altText:this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.altText)||Ua.logout.label,label:p,icon:a.navigation?.profile?.logout?.icon||Ua.logout.icon,testId:a.navigation?.profile?.logout?.testId||we.prepareForTests(p),doLogout:()=>{fr.logout()}},onUserInfoUpdate:y=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(A=>{A?y(A):fr.getUserInfoStore().subscribe(x=>{y(x)})})}},T=o.selectedNode,E=T&&o.rootNodes.includes(T)?T:void 0;return{appTitle:f||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,E,o),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?C:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:y=>y.node&&this.navItemClick(y.node,o)}}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(_=>{_.children&&(l+="/"+(_.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:_=>_.node&&this.navItemClick(_.node,a)}}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,_="";if(!o||n===""&&l?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(l.forEach(x=>{x.children&&(_+="/"+(x.pathSegment||"")),x.showBreadcrumbs===!1?p=!1:x.showBreadcrumbs===!0&&(p=!0)}),!p)return{clearBeforeRender:!0};const C=this.luigi.getConfigValue("routing.useHashRouting"),T=U.getCurrentPath(C),E=o.omitRoot?2:1;for(let x=E;x<l.length;x++){const $=l[x],H=U.mapPathToNode(T.path,$);if(H&&this.previousBreadcrumbs[H])f.push(this.previousBreadcrumbs[H]);else if($.label||$.pathSegment||$.titleResolver)if($.titleResolver)f.push({label:$.titleResolver.prerenderFallback&&$.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation($.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:$,route:H,pending:!0});else{const re=await U.getNodeLabel($,this.luigi);re&&f.push({label:re,node:$,route:H})}}const y=f.some(x=>x.pending),A=x=>({basePath:_.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:x,renderer:o.renderer,selectedNode:c?.selectedNode||{}});if(y&&a)return this.resolveBreadcrumbTitles(l,E,T,C,o,A,a),A(f);if(T.path===U.getCurrentPath(C).path){const x={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map($=>{$.route&&(x[$.route]=$)}),this.previousBreadcrumbs=x}return A(f)}async resolveBreadcrumbTitles(n,r,a,o,c,l,f){const p=[];for(let _=r;_<n.length;_++){const C=n[_],T=U.mapPathToNode(a.path,C);if(C.titleResolver)try{const y=await this.extractDataFromPath(T||""),A=U.substituteDynamicParamsInObject(Object.assign({},y.pathData.context,C.context),y.pathData.pathParams||{}),x=await we.fetchNodeTitleData(C,A);p.push({label:x.label,node:C,route:T});continue}catch{}const E=await U.getNodeLabel(C,this.luigi);E&&p.push({label:E,node:C,route:T})}if(a.path===U.getCurrentPath(o).path){const _={};p.length>1?p[p.length-1].last=!0:c.autoHide&&(p.length=0),p.map(C=>{C.route&&(_[C.route]=C)}),this.previousBreadcrumbs=_}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:U.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 we.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=>we.isNodeAccessPermitted(o,n,a,this.luigi)):[]}async handleNavigationRequest(n,r){const{path:a,preserveView:o,drawerSettings:c,modalSettings:l,newTab:f,withoutSync:p,preventContextUpdate:_,preventHistoryEntry:C,options:T}=n,y=(await this.buildPath(a,T||{})).replace(/\/\/+/g,"/"),A=C?"replaceState":"pushState";if(c||l)c?this.luigi.navigation().openAsDrawer(y,c,r):(l.keepPrevious||this.getModalService().closeModals(),this.luigi.navigation().openAsModal(y,l,r));else{const x={detail:{preventContextUpdate:!!_,preventHistoryEntry:!!C,withoutSync:!!p}};if(await ne.get(mn).closeModals(),f){await this.openViewInNewTab(y);return}const $=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":A;if(this.luigi.getConfig().routing?.useHashRouting)if(!p&&$!=="replaceState")location.hash=y;else{const H=new CustomEvent("hashchange",x);window.history[$]({path:"/#"+y},"","/#"+y),window.dispatchEvent(H)}else{const H=new CustomEvent("popstate",x);window.history[$]({path:y},"",y),window.dispatchEvent(H)}}}async getChildren(n,r={}){const a=ne.get(_n);if(!n)return[];let o=[];if(a.hasChildren(n)){let l=a.getChildren(n);l&&(o=l.children)}else try{o=await $n.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 _=(f??0)+1;if(_>p)return;const C=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],T=F.removeProperties(n,C);Object.assign(T,{pathSegment:":virtualSegment_"+_,label:":virtualSegment_"+_,viewUrl:F.trimTrailingSlash(this.buildVirtualViewUrl(l||"",a,_)),_virtualTree:!0,_virtualPathIndex:_,_virtualViewUrl:l});const E=Array.isArray(n.children)&&n.children.length>0?n.children[0]._virtualTree:!1;return n.children&&!E&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
|
|
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(Se.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 _=o[f];_||(_={category:{altText:l.category.altText||"",icon:l.category.icon,id:f,label:p,nodes:[],tooltip:this.resolveTooltipText(l.category,p)}},o[f]=_,c.push(_)),_.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||!Se.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(_=>!_.node?.hideFromNav&&_.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(y=>{y.children&&(y.tabNav||(l+="/"+(y.pathSegment||"")),c.push(y))});const f=this.getTruncatedChildren(a.nodesInPath??[]);let p=[...f].pop(),_=a.selectedNode;(p?.keepSelectedForChildren||p?.tabNav)&&(_=p,f.pop(),p=[...f].pop());let C,T=_;_?a.rootNodes.includes(_)?(C=_,T=void 0):_.tabNav||_.keepSelectedForChildren?C=p:C=[...c].pop():(C=[...c].pop(),T=void 0);let E=await this.getChildren(C,C?.context||{})||[];return o=this.buildNavItems(E,T,a),o=this.applyNavGroups(o),{selectedNode:_||{},items:o,basePath:l.replace(/\/\/+/g,"/"),sideNavFooterText:this.luigi.getConfig().settings?.sideNavFooterText,navClick:y=>y.node&&this.navItemClick(y.node,a)}}navItemClick(n,r){let a=O.getNodePath(n),o=r?.pathParams;if(a=F.replaceVars(a,o||{},":",!1),!a&&a!==""){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}this.luigi.navigation().navigate(a)}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=Se.updateHeaderTitle(l,o);c?.length&&c.map(y=>({...y,label:this.luigi.i18n().getTranslation(y.label||"")}));const p=this.luigi.i18n().getTranslation(a.navigation?.profile?.logout?.label)||Oa.logout.label,_=y=>{if(y.openNodeInModal&&!y.externalLink?.url)this.luigi.navigation().openAsModal(y.link||"",y.openNodeInModal===!0?{}:y.openNodeInModal);else if(y.link)this.luigi.navigation().navigate(y.link);else if(y.externalLink?.url)if(y.externalLink.sameWindow)window.location.href=y.externalLink.url;else{const A=window.open(y.externalLink.url,"_blank","noopener noreferrer");A&&(A.opener=null,A.focus())}},C={authEnabled:this.luigi.auth().isAuthorizationEnabled(),signedIn:this.luigi.auth().isAuthorizationEnabled()&&fn.isLoggedIn(),items:c,itemClick:_,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||Se.prepareForTests(p),doLogout:()=>{Un.logout()}},onUserInfoUpdate:y=>{this.luigi.getConfigValueAsync("navigation.profile.staticUserInfoFn").then(A=>{A?y(A):Un.getUserInfoStore().subscribe(x=>{y(x)})})}},T=o.selectedNode,E=T&&o.rootNodes.includes(T)?T:void 0;return{appTitle:f||a.settings?.header?.title,logo:a.settings?.header?.logo,topNodes:this.buildNavItems(o.rootNodes,E,o),productSwitcher:a.navigation?.productSwitcher,profile:this.luigi.auth().isAuthorizationEnabled()||a.navigation?.profile?C:void 0,appSwitcher:a.navigation?.appSwitcher&&this.getAppSwitcherData(a.navigation?.appSwitcher,a.settings?.header),navClick:y=>y.node&&this.navItemClick(y.node,o)}}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(_=>{_.children&&(l+="/"+(_.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:_=>_.node&&this.navItemClick(_.node,a)}}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,_="";if(!o||n===""&&l?.[0].viewUrl)return this.previousBreadcrumbs={},{};if(l.forEach(x=>{x.children&&(_+="/"+(x.pathSegment||"")),x.showBreadcrumbs===!1?p=!1:x.showBreadcrumbs===!0&&(p=!0)}),!p)return{clearBeforeRender:!0};const C=this.luigi.getConfigValue("routing.useHashRouting"),T=O.getCurrentPath(C),E=o.omitRoot?2:1;for(let x=E;x<l.length;x++){const $=l[x],H=O.mapPathToNode(T.path,$);if(H&&this.previousBreadcrumbs[H])f.push(this.previousBreadcrumbs[H]);else if($.label||$.pathSegment||$.titleResolver)if($.titleResolver)f.push({label:$.titleResolver.prerenderFallback&&$.titleResolver.fallbackTitle?this.luigi.i18n().getTranslation($.titleResolver.fallbackTitle):o.pendingItemLabel||"",node:$,route:H,pending:!0});else{const re=await O.getNodeLabel($,this.luigi);re&&f.push({label:re,node:$,route:H})}}const y=f.some(x=>x.pending),A=x=>({basePath:_.replace(/\/\/+/g,"/"),clearBeforeRender:o.clearBeforeRender,items:x,renderer:o.renderer,selectedNode:c?.selectedNode||{}});if(y&&a)return this.resolveBreadcrumbTitles(l,E,T,C,o,A,a),A(f);if(T.path===O.getCurrentPath(C).path){const x={};f.length>1?f[f.length-1].last=!0:o.autoHide&&(f.length=0),f.map($=>{$.route&&(x[$.route]=$)}),this.previousBreadcrumbs=x}return A(f)}async resolveBreadcrumbTitles(n,r,a,o,c,l,f){const p=[];for(let _=r;_<n.length;_++){const C=n[_],T=O.mapPathToNode(a.path,C);if(C.titleResolver)try{const y=await this.extractDataFromPath(T||""),A=O.substituteDynamicParamsInObject(Object.assign({},y.pathData.context,C.context),y.pathData.pathParams||{}),x=await Se.fetchNodeTitleData(C,A);p.push({label:x.label,node:C,route:T});continue}catch{}const E=await O.getNodeLabel(C,this.luigi);E&&p.push({label:E,node:C,route:T})}if(a.path===O.getCurrentPath(o).path){const _={};p.length>1?p[p.length-1].last=!0:c.autoHide&&(p.length=0),p.map(C=>{C.route&&(_[C.route]=C)}),this.previousBreadcrumbs=_}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 Se.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=>Se.isNodeAccessPermitted(o,n,a,this.luigi)):[]}async handleNavigationRequest(n,r){const{path:a,preserveView:o,drawerSettings:c,modalSettings:l,newTab:f,withoutSync:p,preventContextUpdate:_,preventHistoryEntry:C,options:T}=n,y=(await this.buildPath(a,T||{})).replace(/\/\/+/g,"/"),A=C?"replaceState":"pushState";if(c||l)c?this.luigi.navigation().openAsDrawer(y,c,r):(l.keepPrevious||this.getModalService().closeModals(),this.luigi.navigation().openAsModal(y,l,r));else{const x={detail:{preventContextUpdate:!!_,preventHistoryEntry:!!C,withoutSync:!!p}};if(await ne.get(vn).closeModals(),f){await this.openViewInNewTab(y);return}const $=this.luigi.getConfigValue("routing.disableBrowserHistory")?"replaceState":A;if(this.luigi.getConfig().routing?.useHashRouting)if(!p&&$!=="replaceState")location.hash=y;else{const H=new CustomEvent("hashchange",x);window.history[$]({path:"/#"+y},"","/#"+y),window.dispatchEvent(H)}else{const H=new CustomEvent("popstate",x);window.history[$]({path:y},"",y),window.dispatchEvent(H)}}}async getChildren(n,r={}){const a=ne.get(mn);if(!n)return[];let o=[];if(a.hasChildren(n)){let l=a.getChildren(n);l&&(o=l.children)}else try{o=await Dn.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 _=(f??0)+1;if(_>p)return;const C=["_*","virtualTree","parent","children","keepSelectedForChildren","navigationContext"],T=F.removeProperties(n,C);Object.assign(T,{pathSegment:":virtualSegment_"+_,label:":virtualSegment_"+_,viewUrl:F.trimTrailingSlash(this.buildVirtualViewUrl(l||"",a,_)),_virtualTree:!0,_virtualPathIndex:_,_virtualViewUrl:l});const E=Array.isArray(n.children)&&n.children.length>0?n.children[0]._virtualTree:!1;return n.children&&!E&&console.warn(`Found both virtualTree and children nodes defined on a navigation node.
|
|
53
53
|
Children nodes are redundant and ignored when virtualTree is enabled.
|
|
54
|
-
Please refer to documentation`),[T]}}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,_=this.luigi.getConfigValue("routing.useHashRouting"),{path:C,query:T}=U.getCurrentPath(_),E=C+(T?"?"+T:""),y=await this.getPathData(E),A=y.nodesInPath;let x=n;if(A===void 0)return console.warn("No nodes in path found for current path:",E),x;if(a){x="";const $=[...A].map((H,re)=>H.virtualTree?re:-1).filter(H=>H!==-1).pop();A.forEach((H,re)=>{H.pathSegment&&($===void 0||re<=$)&&(x+="/"+H.pathSegment)}),x+="/"+n}else if(o){const $=o,H=[...A].reverse().find(re=>$===re.navigationContext);x=U.concatenatePath(U.getSubPath(H,y.pathParams),n)}else if(c){const $=[...A].reverse().find(H=>H.navigationContext&&H.navigationContext.length>0);x=U.concatenatePath(U.getSubPath($,y.pathParams),n)}else l?x=U.concatenatePath(U.getSubPath(y.selectedNode?.parent,y.pathParams),n):f&&(x=U.concatenatePath(U.getSubPath(y.selectedNode,y.pathParams),n));return p&&Object.keys(p).length>0&&(x+=x.includes("?")?"&":"?",Object.entries(p).forEach(($,H)=>{x+=encodeURIComponent(U.getContentViewParamPrefix(this.luigi)+$[0])+"="+encodeURIComponent($[1])+(H<Object.keys(p).length-1?"&":"")})),x}}class Mn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=ne.get(vn)),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(){const n=this.luigi.getConfig();console.log("Init Routing...",n.routing),n.routing?.useHashRouting?(window.addEventListener("hashchange",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(!0),o,a)}),this.handleRouteChange(U.getCurrentPath(!0))):(window.addEventListener("popstate",r=>{const a=!!r?.detail?.preventContextUpdate,o=!!r?.detail?.withoutSync;this.handleRouteChange(U.getCurrentPath(),o,a)}),this.handleRouteChange(U.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);if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(l),await this.shouldShowModalPathInUrl(n),f.forEach((x,$)=>{p[$]=x}),this.checkInvalidateCache(this.previousPathData,o);const _=await this.getNavigationService().getPathData(o);this.previousPathData=_;const C=U.filterNodeParams(p,this.luigi),T=F.getPathWithoutHash(o);this.currentRoute={raw:window.location.href,path:o,nodeParams:C};const E=_?.selectedNode??await this.getNavigationService().getCurrentNode(o),y=E?.viewUrl||"";if(await this.handlePageNotFound(E,y,_,o,T))return;const A=this.luigi.getEngine()._connector;if(A?.renderTopNav(await this.getNavigationService().getTopNavData(o,_)),A?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,_)),A?.renderTabNav(await this.getNavigationService().getTabNavData(o,_)),A?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,_,x=>{A?.renderBreadcrumbs(x)})),E){const x={nodeParams:C||{},pathParams:_?.pathParams||{},searchParams:U.prepareSearchParamsForClient(E,this.luigi)};this.currentRoute.node=E,this.getNavigationService().onNodeChange(this.previousNode,E),this.previousNode=E,X.updateMainContent(E,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=ne.get(vn),a=ne.get(mn),o=new URLSearchParams(n?.query||""),c=U.getModalViewParamName(this.luigi),l=o.get(c);if(l){const f=o.get(`${c}Params`);try{const p=JSON.parse(f||"{}"),{nodeObject:_}=await r.extractDataFromPath(l);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(p):this.luigi.navigation().openAsModal(l,p||_.openNodeInModal)}catch(p){console.error("Error parsing modal settings from URL parameters",p)}}else{a.closeModals();return}}appendModalDataToUrl(n,r){const a=U.getHashQueryParamSeparator(),o=U.getQueryParams(this.luigi),c=U.getModalViewParamName(this.luigi),l=o[c],f=new URL(location.href),p=this.luigi.getConfigValue("routing.useHashRouting");let _=history.state,C,T;if(p){let[E,y]=f.hash.split("?");C=E,T=U.getURLWithoutModalData(y,c),T&&(C+="?"+T)}else C=f.pathname,T=U.getURLWithoutModalData(f.search,c),T&&(C+="?"+U.getURLWithoutModalData(f.search,c));if(_=U.handleHistoryState(_,C),l!==n){if(o[c]=n,r&&Object.keys(r).length&&(o[`${c}Params`]=JSON.stringify(r)),p){const E=location.hash.indexOf(a);E!==-1&&(f.hash=f.hash.slice(0,E)),f.hash=`${f.hash}${a}${U.encodeParams(o)}`}else f.search=`?${U.encodeParams(o)}`;history.pushState(_,"",f.href)}else{const E=new URL(f);if(p){let y=E.hash.split("?")[0];E.hash=y,T&&(E.hash+="?"+T)}else E.search=T;history.replaceState({},"",E.href),history.pushState(_,"",f.href)}}removeModalDataFromUrl(n){const r=U.getQueryParams(this.luigi),a=U.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=U.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"&&U.setFeatureToggles(r,n,a)}updateModalDataInUrl(n,r,a){let o=U.getHashQueryParamSeparator();const c=U.getQueryParams(this.luigi),l=U.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 _=location.hash.indexOf(o);_!==-1&&(f.hash=f.hash.slice(0,_)),f.hash=`${f.hash}${o}${U.encodeParams(c)}`}else f.search=`?${U.encodeParams(c)}`;a?history.pushState(window.state,"",f.href):history.replaceState(window.state,"",f.href)}checkInvalidateCache(n,r){if(!n)return;const a=ne.get(_n);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,_=c[f];if(p!==_.pathSegment||!l)if(U.isDynamicNode(_)){if(!l||p!==U.getDynamicNodeValue(_,n.pathParams)){a.deleteNodesRecursively(_);break}}else l=!1}}else a.deleteCache()}async handlePageNotFound(n,r,a,o,c){const l=F.getTrimmedUrl(o),f=U.isExistingRoute(l,a);if(!r&&!n?.compound||n?.tabNav?.showAsTabHeader){const p=await U.getDefaultChildNode(a,async(_,C)=>await this.getNavigationService().getChildren(_,C));if(f){const _=F.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${_?`/${_}`:""}/${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 _=await U.getDefaultChildNode(a);this.showPageNotFoundError(_,c,!1)}return!0}return f?!1:(this.showPageNotFoundError(a.matchedPath,c,!0),!0)}async showPageNotFoundError(n,r,a=!1){const o=U.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=U.getCurrentPath(l);f.path=c,this.handleRouteChange(f)}else this.getNavigationService().handleNavigationRequest({path:c});return}U.showRouteNotFoundAlert(r,a,this.luigi),this.getNavigationService().handleNavigationRequest({path:F.addLeadingSlash(n)})}}class mr{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 Oa=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&&!U.checkWCUrl(i.viewUrl,n))return console.warn(`View URL '${i.viewUrl}' not allowed to be included`),document.createElement("div");if(i.compound){const _=document.createElement("luigi-compound-container");return _.setAttribute("lui_container","true"),_.viewurl=i.viewUrl?ne.get(mr).applyDecorators(U.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",_.webcomponent=i.webcomponent??!1,_.compoundConfig=i.compound,_.context=i.context,_.clientPermissions=i.clientPermissions??{},_.nodeParams=l,_.pathParams=f,_.userSettingsGroup=i.userSettingsGroup,_.userSettings=c,_.searchParams=p,_.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),_.locale=n.i18n().getCurrentLocale(),_.theme=n.theming().getCurrentTheme(),_.viewGroup=i.viewGroup,_.virtualTree=i.virtualTree||i._virtualTree,_.virtualTreeRootNode=we.findVirtualTreeRootNode(i),n.getEngine()._comm.addListeners(_,n),_}else{const _=document.createElement("luigi-container");return _.setAttribute("lui_container","true"),_.viewurl=i.viewUrl?ne.get(mr).applyDecorators(U.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",_.webcomponent=i.webcomponent??!1,_.context=i.context,_.clientPermissions=i.clientPermissions??{},_.cssVariables=await n.theming().getCSSVariables(),_.nodeParams=l,_.pathParams=f,_.userSettingsGroup=i.userSettingsGroup,_.userSettings=c,_.searchParams=p,_.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),_.locale=n.i18n().getCurrentLocale(),_.theme=n.theming().getCurrentTheme(),_.viewGroup=i.viewGroup,_.virtualTree=i.virtualTree||i._virtualTree,_.virtualTreeRootNode=we.findVirtualTreeRootNode(i),Sc(_,n),Ec(_,n),n.getEngine()._comm.addListeners(_,n),_.luigiMfId=F.getRandomId(),_}},Sc=(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},Ec=(i,n)=>{const r=n.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,o)=>{r[o]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},X={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:i=>{console.log("Init UI..."),X.navService=ne.get(vn),X.routingService=ne.get(Mn),X.luigi=i,i.getEngine()._connector?.renderMainLayout()},update:async i=>{const n=X.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"))&&X.luigi.getEngine()._connector?.renderTopNav(await X.navService.getTopNavData(n.path)),r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer")){ne.get(_n).deleteCache(),X.luigi.getEngine()._connector?.renderLeftNav(await X.navService.getLeftNavData(n.path)),X.luigi.getEngine()._connector?.renderTabNav(await X.navService.getTabNavData(n.path));const a=X.luigi.getEngine()._connector;a?.renderBreadcrumbs(await X.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"))&&(ne.get(_n).deleteCache(),n.node&&X.updateMainContent(n.node,X.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 _=r?.nodeParams||{},C=r?.pathParams||{},T=r?.searchParams||{};if(i&&p){let E,y;if((i.virtualTree||i._virtualTree)&&(y=we.findVirtualTreeRootNode(i)),[...p.childNodes].forEach(A=>{A.tagName?.indexOf("LUIGI-")===0&&(A.viewGroup&&i.viewGroup!==A.viewGroup?A.style.display="none":A.viewGroup||A.virtualTree&&y===A.virtualTreeRootNode?E=A:A.remove())}),E)a||(E.style.display="block",E.viewurl=i.viewUrl?ne.get(mr).applyDecorators(U.substituteViewUrl(i,C,n),i.decodeViewUrl??!1):"",E.nodeParams=_,E.pathParams=C,E.clientPermissions=i.clientPermissions,E.searchParams=T,E.locale=n.i18n().getCurrentLocale(),E.theme=n.theming().getCurrentTheme(),E.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),E.userSettingsGroup=i.userSettingsGroup,E.userSettings=f,Sc(E,n),Ec(E,n)),o||E.updateContext(i.context||{});else{const A=await Oa(i,n,r);p?.appendChild(A);const x=n.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&x?.showLoadingIndicator(p)}}},openModal:async(i,n,r,a)=>{const o=await Oa(n,i);X.modalContainer.push(o);const c=ne.get(Mn),l=ne.get(mn);let f=!1,p,_;const T=new Promise(A=>{p=()=>{f||(f=!0,A(),l.removeLastModalFromStack())},_=()=>{p&&p(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},o.addEventListener(O.CLOSE_CURRENT_MODAL_REQUEST,_)}),E={closePromise:T,resolveFn:p,onCloseRequestHandler:_,onInternalClose:()=>{try{E.resolveFn&&E.resolveFn()}catch(A){console.warn("onInternalClose failed",A)}},modalsettings:r};l.registerModal(E),i.getEngine()._connector?.renderModal(o,r,()=>{a?.(),l.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>T);const y=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&y?.showLoadingIndicator(o.parentElement)},updateModalSettings:(i,n,r)=>{const a=ne.get(mn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const o=ne.get(Mn),c=U.getModalPathFromPath(r);c&&o.updateModalDataInUrl(c,a.getModalSettings(),n),r.getEngine()._connector?.updateModalSettings(a.getModalSettings())},openDrawer:async(i,n,r,a)=>{const o=await Oa(n,i);X.drawerContainer=o,i.getEngine()._connector?.renderDrawer(o,r,a);const c=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&c?.showLoadingIndicator(o.parentElement)}},Ha={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 X.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(!X.drawerContainer)return{};if(X.drawerContainer.iframeHandle?.iframe)return{iframe:X.drawerContainer.iframeHandle.iframe,id:X.drawerContainer.luigiMfId,active:F.isElementVisible(X.drawerContainer)};{const i=X.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(i)return{iframe:i,id:X.drawerContainer.luigiMfId,active:F.isElementVisible(X.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 X.modalContainer)a.iframeHandle?.iframe&&r.push(a);return X.drawerContainer&&X.drawerContainer.iframeHandle?.iframe&&r.push(X.drawerContainer),r.length>0?r:void 0}};class ow{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 Ha.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();let r=[];if(X.modalContainer)for(const a of Array.from(X.modalContainer))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);if(X.drawerContainer&&r.push(X.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=X.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 uw={luigiAfterInit:async i=>{F.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await Je.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class lw{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 cw{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};this.navService.handleNavigationRequest(p,void 0)},this.openAsModal=async(r,a,o)=>{a?.keepPrevious||await this.modalService.closeModals();const c=r.replace(/\/\/+/g,"/");if(!await we.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 we.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),p=a||{};if(!p.header?.title){const C=await U.getNodeLabel(f,this.luigi)||"";p.header?p.header.title=C:p.header={title:C}}p.overlap===void 0&&(p.overlap=!0),this.luigi.getEngine()._ui.openDrawer(this.luigi,f,p,o)},this.runTimeErrorHandler=async r=>{const{path:a}=U.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 U.pathExists(r,this.luigi),this.luigi=n,this.hashRouting=n.getConfig().routing?.useHashRouting,this.navService=ne.get(vn),this.routingService=ne.get(Mn),this.modalService=ne.get(mn)}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 hw{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=U.addParamsOnHashRouting(n,a.hash):U.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=U.getContentViewParamPrefix(this.luigi),o=new URL(location.href);this.luigi.getConfigValue("routing.useHashRouting")?o.hash=U.addParamsOnHashRouting(n,o.hash,a):U.modifySearchParams(n,o.searchParams,a),this.handleBrowserHistory(r,o),this.luigi.getConfigValue("routing.useHashRouting")?window.dispatchEvent(new HashChangeEvent("hashchange")):this.luigi.configChanged()}}class fw{#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=ne.get(mr);(()=>{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")})()}}class ss{constructor(){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}}let Kl;const Pe={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),Pe.luigi=i,Pe.documentTitle=ns(void 0),Kl=ne.get(ss)},processAlert:(i,n,r)=>{if(!Pe.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&&Pe.luigi?.navigation().navigate(c.url),c.dismissKey&&i.id))return r.notifyAlertClosed(i.id,c.dismissKey),!0}return!1}};Pe.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,n)=>{if(!Pe.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:Pe.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:Pe.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:Pe.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Pe.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),Pe.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,n)=>{if(!Pe.luigi)throw new Error("Luigi is not initialized.");Kl.updateDirtyStatus(i,n)}};class dw{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 gw=new dw;class pw{constructor(n){this.dirtyStatusService=ne.get(ss),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 gw.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=()=>ac(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 Yl=new _w;class mw{constructor(n){this.luigi=n}sendToAll(n){const r=Ha.getAllLuigiContainerIframe(this.luigi);if(!r){console.warn("No Luigi containers found to send the message to.");return}const{id:a,messageWithoutId:o}=Yl.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=Ha.getAllLuigiContainerIframe(this.luigi);if(!a){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:c}=Yl.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 vw{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()),fr.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,uw.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.customMessages=()=>(this._customMessages||(this._customMessages=new mw(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new Qv(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new ow(this)),this._elements),this.navigation=()=>new cw(this),this.ux=()=>new pw(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new lw),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new hw(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new fw(this)),this._theming),this.auth=()=>or,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return F.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return $n.getConfigValueFromObjectAsync(this.getConfig(),n,r)}clearNavigationCache(){ne.get(_n).deleteCache()}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=ns({}),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 ww=!1;var Sw=Array.isArray,Ew=Array.prototype.indexOf,vr=Array.prototype.includes,Cw=Array.from,Tw=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,yw=Object.prototype,bw=Array.prototype,Rw=Object.getPrototypeOf,Jl=Object.isExtensible;const Aw=()=>{};function Pw(i){for(var n=0;n<i.length;n++)i[n]()}function Iw(){var i,n,r=new Promise((a,o)=>{i=a,n=o});return{promise:r,resolve:i,reject:n}}const Fe=2,Xr=4,Cc=8,Tc=1<<24,Jt=16,wn=32,kn=64,Wa=128,mt=512,Ue=1024,Ge=2048,Mt=4096,Yt=8192,gn=16384,ei=32768,Xl=1<<25,as=65536,Va=1<<17,xw=1<<18,us=1<<19,Lw=1<<20,Hn=65536,Ba=1<<21,Ka=1<<22,Zr=1<<23,$a=Symbol("$state"),Ya=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Nw(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Uw(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ow(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $w(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Dw(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Be=Symbol();function Mw(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Fw(i){return i===this.v}let Ja=!1,kw=!1;function Hw(){Ja=!0}let xt=null;function os(i){xt=i}function Ww(i,n=!1,r){xt={p:xt,i:!1,c:null,e:null,s:i,x:null,r:pe,l:Ja&&!n?{s:null,u:null,$:[]}:null}}function Vw(i){var n=xt,r=n.e;if(r!==null){n.e=null;for(var a of r)rS(a)}return n.i=!0,xt=n.p,{}}function ls(){return!Ja||xt!==null&&xt.l===null}let ur=[];function Bw(){var i=ur;ur=[],Pw(i)}function gr(i){if(ur.length===0){var n=ur;queueMicrotask(()=>{n===ur&&Bw()})}ur.push(i)}function yc(i){var n=pe;if(n===null)return ue.f|=Zr,i;if((n.f&ei)===0&&(n.f&Xr)===0)throw i;lr(i,n)}function lr(i,n){for(;n!==null;){if((n.f&Wa)!==0){if((n.f&ei)===0)throw i;try{n.b.error(i);return}catch(r){i=r}}n=n.parent}throw i}const Gw=-7169;function Te(i,n){i.f=i.f&Gw|n}function Xa(i){(i.f&mt)!==0||i.deps===null?Te(i,Ue):Te(i,Mt)}function bc(i){if(i!==null)for(const n of i)(n.f&Fe)===0||(n.f&Hn)===0||(n.f^=Hn,bc(n.deps))}function Rc(i,n,r){(i.f&Ge)!==0?n.add(i):(i.f&Mt)!==0&&r.add(i),bc(i.deps),Te(i,Ue)}const ln=new Set;let Ce=null,Pt=null,Ga=null,Da=!1,cr=null,ji=null;var Zl=0;let Qw=1;class Wn{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)Te(a,Ge),this.schedule(a);for(a of r.m)Te(a,Mt),this.schedule(a)}}#l(){if(Zl++>1e3&&(ln.delete(this),qw()),!this.#d()){for(const f of this.#i)this.#a.delete(f),Te(f,Ge),this.schedule(f);for(const f of this.#a)Te(f,Mt),this.schedule(f)}const n=this.#t;this.#t=[],this.apply();var r=cr=[],a=[],o=ji=[];for(const f of n)try{this.#p(f,r,a)}catch(p){throw Ic(f),p}if(Ce=null,o.length>0){var c=Wn.ensure();for(const f of o)c.schedule(f)}if(cr=null,ji=null,this.#d()||this.#g()){this.#_(a),this.#_(r);for(const[f,p]of this.#u)Pc(f,p)}else{this.#n.size===0&&ln.delete(this),this.#i.clear(),this.#a.clear();for(const f of this.#e)f(this);this.#e.clear(),jl(a),jl(r),this.#r?.resolve()}var l=Ce;if(this.#t.length>0){const f=l??=this;f.#t.push(...this.#t.filter(p=>!f.#t.includes(p)))}l!==null&&(ln.add(l),l.#l()),ln.has(this)||this.#w()}#p(n,r,a){n.f^=Ue;for(var o=n.first;o!==null;){var c=o.f,l=(c&(wn|kn))!==0,f=l&&(c&Ue)!==0,p=f||(c&Yt)!==0||this.#u.has(o);if(!p&&o.fn!==null){l?o.f^=Ue:(c&Xr)!==0?r.push(o):ni(o)&&((c&Jt)!==0&&this.#a.add(o),Sr(o));var _=o.first;if(_!==null){o=_;continue}}for(;o!==null;){var C=o.next;if(C!==null){o=C;break}o=o.parent}}}#_(n){for(var r=0;r<n.length;r+=1)Rc(n[r],this.#i,this.#a)}capture(n,r,a=!1){r!==Be&&!this.previous.has(n)&&this.previous.set(n,r),(n.f&Zr)===0&&(this.current.set(n,[n.v,a]),Pt?.set(n,n.v))}activate(){Ce=this}deactivate(){Ce=null,Pt=null}flush(){try{Da=!0,Ce=this,this.#l()}finally{Zl=0,Ga=null,cr=null,ji=null,Da=!1,Ce=null,Pt=null,pn.clear()}}discard(){for(const n of this.#h)n(this);this.#h.clear(),ln.delete(this)}register_created_effect(n){this.#s.push(n)}#w(){for(const C of ln){var n=C.id<this.id,r=[];for(const[T,[E,y]]of this.current){if(C.current.has(T)){var a=C.current.get(T)[0];if(n&&E!==a)C.current.set(T,[E,y]);else continue}r.push(T)}var o=[...C.current.keys()].filter(T=>!this.current.has(T));if(o.length===0)n&&C.discard();else if(r.length>0){C.activate();var c=new Set,l=new Map;for(var f of r)Ac(f,o,c,l);l=new Map;var p=[...C.current.keys()].filter(T=>this.current.has(T)?this.current.get(T)[0]!==T:!0);for(const T of this.#s)(T.f&(gn|Yt|Va))===0&&Za(T,p,l)&&((T.f&(Ka|Jt))!==0?(Te(T,Ge),C.schedule(T)):C.#i.add(T));if(C.#t.length>0){C.apply();for(var _ of C.#t)C.#p(_,[],[]);C.#t=[]}C.deactivate()}}for(const C of ln)C.#f.has(this)&&(C.#f.delete(this),C.#f.size===0&&!C.#d()&&(C.activate(),C.#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,gr(()=>{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??=Iw()).promise}static ensure(){if(Ce===null){const n=Ce=new Wn;Da||(ln.add(Ce),gr(()=>{Ce===n&&n.flush()}))}return Ce}apply(){{Pt=null;return}}schedule(n){if(Ga=n,n.b?.is_pending&&(n.f&(Xr|Cc|Tc))!==0&&(n.f&ei)===0){n.b.defer_effect(n);return}for(var r=n;r.parent!==null;){r=r.parent;var a=r.f;if(cr!==null&&r===pe&&(ue===null||(ue.f&Fe)===0))return;if((a&(kn|wn))!==0){if((a&Ue)===0)return;r.f^=Ue}}this.#t.push(r)}}function qw(){try{Nw()}catch(i){lr(i,Ga)}}let Kt=null;function jl(i){var n=i.length;if(n!==0){for(var r=0;r<n;){var a=i[r++];if((a.f&(gn|Yt))===0&&ni(a)&&(Kt=new Set,Sr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Hc(a),Kt?.size>0)){pn.clear();for(const o of Kt){if((o.f&(gn|Yt))!==0)continue;const c=[o];let l=o.parent;for(;l!==null;)Kt.has(l)&&(Kt.delete(l),c.push(l)),l=l.parent;for(let f=c.length-1;f>=0;f--){const p=c[f];(p.f&(gn|Yt))===0&&Sr(p)}}Kt.clear()}}Kt=null}}function Ac(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?Ac(o,n,r,a):(c&(Ka|Jt))!==0&&(c&Ge)===0&&Za(o,n,a)&&(Te(o,Ge),ja(o))}}function Za(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(vr.call(n,o))return!0;if((o.f&Fe)!==0&&Za(o,n,r))return r.set(o,!0),!0}return r.set(i,!1),!1}function ja(i){Ce.schedule(i)}function Pc(i,n){if(!((i.f&wn)!==0&&(i.f&Ue)!==0)){(i.f&Ge)!==0?n.d.push(i):(i.f&Mt)!==0&&n.m.push(i),Te(i,Ue);for(var r=i.first;r!==null;)Pc(r,n),r=r.next}}function Ic(i){Te(i,Ue);for(var n=i.first;n!==null;)Ic(n),n=n.next}function zw(i){let n=0,r=to(0),a;return()=>{no()&&(hr(r),sS(()=>(n===0&&(a=dS(()=>i(()=>Kr(r)))),n+=1,()=>{gr(()=>{n-=1,n===0&&(a?.(),a=void 0,Kr(r))})})))}}var Kw=as|us;function Yw(i,n,r,a){new Jw(i,n,r,a)}class Jw{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=zw(()=>(this.#l=to(this.#u),()=>{this.#l=null}));constructor(n,r,a,o){this.#e=n,this.#n=r,this.#o=c=>{var l=pe;l.b=this,l.f|=Wa,a(c)},this.parent=pe.b,this.transform_error=o??this.parent?.transform_error??(c=>c),this.#r=aS(()=>{this.#S()},Kw)}#_(){try{this.#t=Ln(()=>this.#o(this.#e))}catch(n){this.error(n)}}#w(n){const r=this.#n.failed;r&&(this.#i=Ln(()=>{r(this.#e,()=>n,()=>()=>{})}))}#C(){const n=this.#n.pending;n&&(this.is_pending=!0,this.#s=Ln(()=>n(this.#e)),gr(()=>{var r=this.#a=document.createDocumentFragment(),a=Dc();r.append(a),this.#t=this.#v(()=>Ln(()=>this.#o(a))),this.#c===0&&(this.#e.before(r),this.#a=null,es(this.#s,()=>{this.#s=null}),this.#m(Ce))}))}#S(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#t=Ln(()=>{this.#o(this.#e)}),this.#c>0){var n=this.#a=document.createDocumentFragment();lS(this.#t,n);const r=this.#n.pending;this.#s=Ln(()=>r(this.#e))}else this.#m(Ce)}catch(r){this.error(r)}}#m(n){this.is_pending=!1,n.transfer_effects(this.#d,this.#g)}defer_effect(n){Rc(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=pe,a=ue,o=xt;Sn(this.#r),Ft(this.#r),os(this.#r.ctx);try{return Wn.ensure(),n()}catch(c){return yc(c),null}finally{Sn(r),Ft(a),os(o)}}#E(n,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#E(n,r);return}this.#c+=n,this.#c===0&&(this.#m(r),this.#s&&es(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,gr(()=>{this.#f=!1,this.#l&&Uc(this.#l,this.#u)}))}get_effect_pending(){return this.#p(),hr(this.#l)}error(n){var r=this.#n.onerror;let a=this.#n.failed;if(!r&&!a)throw n;this.#t&&(Dt(this.#t),this.#t=null),this.#s&&(Dt(this.#s),this.#s=null),this.#i&&(Dt(this.#i),this.#i=null);var o=!1,c=!1;const l=()=>{if(o){Mw();return}o=!0,c&&Dw(),this.#i!==null&&es(this.#i,()=>{this.#i=null}),this.#v(()=>{this.#S()})},f=p=>{try{c=!0,r?.(p,l),c=!1}catch(_){lr(_,this.#r&&this.#r.parent)}a&&(this.#i=this.#v(()=>{try{return Ln(()=>{var _=pe;_.b=this,_.f|=Wa,a(this.#e,()=>p,()=>l)})}catch(_){return lr(_,this.#r.parent),null}}))};gr(()=>{var p;try{p=this.transform_error(n)}catch(_){lr(_,this.#r&&this.#r.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(f,_=>lr(_,this.#r&&this.#r.parent)):f(p)})}}function Xw(i){var n=i.effects;if(n!==null){i.effects=null;for(var r=0;r<n.length;r+=1)Dt(n[r])}}function Zw(i){for(var n=i.parent;n!==null;){if((n.f&Fe)===0)return(n.f&gn)===0?n:null;n=n.parent}return null}function eo(i){var n,r=pe;Sn(Zw(i));try{i.f&=~Hn,Xw(i),n=Qc(i)}finally{Sn(r)}return n}function xc(i){var n=i.v,r=eo(i);if(!i.equals(r)&&(i.wv=Bc(),(!Ce?.is_fork||i.deps===null)&&(i.v=r,Ce?.capture(i,n,!0),i.deps===null))){Te(i,Ue);return}wr||(Pt!==null?(no()||Ce?.is_fork)&&Pt.set(i,r):Xa(i))}function jw(i){if(i.effects!==null)for(const n of i.effects)(n.teardown||n.ac)&&(n.teardown?.(),n.ac?.abort(Ya),n.teardown=Aw,n.ac=null,jr(n,0),ro(n))}function Lc(i){if(i.effects!==null)for(const n of i.effects)n.teardown&&Sr(n)}let Qa=new Set;const pn=new Map;let Nc=!1;function to(i,n){var r={f:0,v:i,reactions:null,equals:Fw,rv:0,wv:0};return r}function cn(i,n){const r=to(i);return cS(r),r}function Nn(i,n,r=!1){ue!==null&&(!It||(ue.f&Va)!==0)&&ls()&&(ue.f&(Fe|Jt|Ka|Va))!==0&&(vt===null||!vr.call(vt,i))&&$w();let a=r?Gr(n):n;return Uc(i,a,ji)}function Uc(i,n,r=null){if(!i.equals(n)){var a=i.v;wr?pn.set(i,n):pn.set(i,a),i.v=n;var o=Wn.ensure();if(o.capture(i,a),(i.f&Fe)!==0){const c=i;(i.f&Ge)!==0&&eo(c),Pt===null&&Xa(c)}i.wv=Bc(),Oc(i,Ge,r),ls()&&pe!==null&&(pe.f&Ue)!==0&&(pe.f&(wn|kn))===0&&(pt===null?hS([i]):pt.push(i)),!o.is_fork&&Qa.size>0&&!Nc&&eS()}return n}function eS(){Nc=!1;for(const i of Qa)(i.f&Ue)!==0&&Te(i,Mt),ni(i)&&Sr(i);Qa.clear()}function Kr(i){Nn(i,i.v+1)}function Oc(i,n,r){var a=i.reactions;if(a!==null)for(var o=ls(),c=a.length,l=0;l<c;l++){var f=a[l],p=f.f;if(!(!o&&f===pe)){var _=(p&Ge)===0;if(_&&Te(f,n),(p&Fe)!==0){var C=f;Pt?.delete(C),(p&Hn)===0&&(p&mt&&(f.f|=Hn),Oc(C,Mt,r))}else if(_){var T=f;(p&Jt)!==0&&Kt!==null&&Kt.add(T),r!==null?r.push(T):ja(T)}}}}function Gr(i){if(typeof i!="object"||i===null||$a in i)return i;const n=Rw(i);if(n!==yw&&n!==bw)return i;var r=new Map,a=Sw(i),o=cn(0),c=Fn,l=f=>{if(Fn===c)return f();var p=ue,_=Fn;Ft(null),nc(c);var C=f();return Ft(p),nc(_),C};return a&&r.set("length",cn(i.length)),new Proxy(i,{defineProperty(f,p,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&Uw();var C=r.get(p);return C===void 0?l(()=>{var T=cn(_.value);return r.set(p,T),T}):Nn(C,_.value,!0),!0},deleteProperty(f,p){var _=r.get(p);if(_===void 0){if(p in f){const C=l(()=>cn(Be));r.set(p,C),Kr(o)}}else Nn(_,Be),Kr(o);return!0},get(f,p,_){if(p===$a)return i;var C=r.get(p),T=p in f;if(C===void 0&&(!T||zr(f,p)?.writable)&&(C=l(()=>{var y=Gr(T?f[p]:Be),A=cn(y);return A}),r.set(p,C)),C!==void 0){var E=hr(C);return E===Be?void 0:E}return Reflect.get(f,p,_)},getOwnPropertyDescriptor(f,p){var _=Reflect.getOwnPropertyDescriptor(f,p);if(_&&"value"in _){var C=r.get(p);C&&(_.value=hr(C))}else if(_===void 0){var T=r.get(p),E=T?.v;if(T!==void 0&&E!==Be)return{enumerable:!0,configurable:!0,value:E,writable:!0}}return _},has(f,p){if(p===$a)return!0;var _=r.get(p),C=_!==void 0&&_.v!==Be||Reflect.has(f,p);if(_!==void 0||pe!==null&&(!C||zr(f,p)?.writable)){_===void 0&&(_=l(()=>{var E=C?Gr(f[p]):Be,y=cn(E);return y}),r.set(p,_));var T=hr(_);if(T===Be)return!1}return C},set(f,p,_,C){var T=r.get(p),E=p in f;if(a&&p==="length")for(var y=_;y<T.v;y+=1){var A=r.get(y+"");A!==void 0?Nn(A,Be):y in f&&(A=l(()=>cn(Be)),r.set(y+"",A))}if(T===void 0)(!E||zr(f,p)?.writable)&&(T=l(()=>cn(void 0)),Nn(T,Gr(_)),r.set(p,T));else{E=T.v!==Be;var x=l(()=>Gr(_));Nn(T,x)}var $=Reflect.getOwnPropertyDescriptor(f,p);if($?.set&&$.set.call(C,_),!E){if(a&&typeof p=="string"){var H=r.get("length"),re=Number(p);Number.isInteger(re)&&re>=H.v&&Nn(H,re+1)}Kr(o)}return!0},ownKeys(f){hr(o);var p=Reflect.ownKeys(f).filter(T=>{var E=r.get(T);return E===void 0||E.v!==Be});for(var[_,C]of r)C.v!==Be&&!(_ in f)&&p.push(_);return p},setPrototypeOf(){Ow()}})}var ec,$c;function tS(){if(ec===void 0){ec=window;var i=Element.prototype,n=Node.prototype,r=Text.prototype;zr(n,"firstChild").get,$c=zr(n,"nextSibling").get,Jl(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Jl(r)&&(r.__t=void 0)}}function Dc(i=""){return document.createTextNode(i)}function Mc(i){return $c.call(i)}function Fc(i){var n=ue,r=pe;Ft(null),Sn(null);try{return i()}finally{Ft(n),Sn(r)}}function nS(i,n){var r=n.last;r===null?n.last=n.first=i:(r.next=i,i.prev=r,n.last=i)}function ti(i,n){var r=pe;r!==null&&(r.f&Yt)!==0&&(i|=Yt);var a={ctx:xt,deps:null,nodes:null,f:i|Ge|mt,first:null,fn:n,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Ce?.register_created_effect(a);var o=a;if((i&Xr)!==0)cr!==null?cr.push(a):Wn.ensure().schedule(a);else if(n!==null){try{Sr(a)}catch(l){throw Dt(a),l}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&us)===0&&(o=o.first,(i&Jt)!==0&&(i&as)!==0&&o!==null&&(o.f|=as))}if(o!==null&&(o.parent=r,r!==null&&nS(o,r),ue!==null&&(ue.f&Fe)!==0&&(i&kn)===0)){var c=ue;(c.effects??=[]).push(o)}return a}function no(){return ue!==null&&!It}function rS(i){return ti(Xr|Lw,i)}function iS(i){Wn.ensure();const n=ti(kn|us,i);return(r={})=>new Promise(a=>{r.outro?es(n,()=>{Dt(n),a(void 0)}):(Dt(n),a(void 0))})}function sS(i,n=0){return ti(Cc|n,i)}function aS(i,n=0){var r=ti(Jt|n,i);return r}function Ln(i){return ti(wn|us,i)}function kc(i){var n=i.teardown;if(n!==null){const r=wr,a=ue;tc(!0),Ft(null);try{n.call(null)}finally{tc(r),Ft(a)}}}function ro(i,n=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const o=r.ac;o!==null&&Fc(()=>{o.abort(Ya)});var a=r.next;(r.f&kn)!==0?r.parent=null:Dt(r,n),r=a}}function oS(i){for(var n=i.first;n!==null;){var r=n.next;(n.f&wn)===0&&Dt(n),n=r}}function Dt(i,n=!0){var r=!1;(n||(i.f&xw)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(uS(i.nodes.start,i.nodes.end),r=!0),Te(i,Xl),ro(i,n&&!r),jr(i,0);var a=i.nodes&&i.nodes.t;if(a!==null)for(const c of a)c.stop();kc(i),i.f^=Xl,i.f|=gn;var o=i.parent;o!==null&&o.first!==null&&Hc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=i.b=null}function uS(i,n){for(;i!==null;){var r=i===n?null:Mc(i);i.remove(),i=r}}function Hc(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 es(i,n,r=!0){var a=[];Wc(i,a,!0);var o=()=>{r&&Dt(i),n&&n()},c=a.length;if(c>0){var l=()=>--c||o();for(var f of a)f.out(l)}else o()}function Wc(i,n,r){if((i.f&Yt)===0){i.f^=Yt;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&as)!==0||(o.f&wn)!==0&&(i.f&Jt)!==0;Wc(o,n,l?r:!1),o=c}}}function lS(i,n){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var o=r===a?null:Mc(r);n.append(r),r=o}}let ts=!1,wr=!1;function tc(i){wr=i}let ue=null,It=!1;function Ft(i){ue=i}let pe=null;function Sn(i){pe=i}let vt=null;function cS(i){ue!==null&&(vt===null?vt=[i]:vt.push(i))}let Xe=null,at=0,pt=null;function hS(i){pt=i}let Vc=1,On=0,Fn=On;function nc(i){Fn=i}function Bc(){return++Vc}function ni(i){var n=i.f;if((n&Ge)!==0)return!0;if(n&Fe&&(i.f&=~Hn),(n&Mt)!==0){for(var r=i.deps,a=r.length,o=0;o<a;o++){var c=r[o];if(ni(c)&&xc(c),c.wv>i.wv)return!0}(n&mt)!==0&&Pt===null&&Te(i,Ue)}return!1}function Gc(i,n,r=!0){var a=i.reactions;if(a!==null&&!(vt!==null&&vr.call(vt,i)))for(var o=0;o<a.length;o++){var c=a[o];(c.f&Fe)!==0?Gc(c,n,!1):n===c&&(r?Te(c,Ge):(c.f&Ue)!==0&&Te(c,Mt),ja(c))}}function Qc(i){var n=Xe,r=at,a=pt,o=ue,c=vt,l=xt,f=It,p=Fn,_=i.f;Xe=null,at=0,pt=null,ue=(_&(wn|kn))===0?i:null,vt=null,os(i.ctx),It=!1,Fn=++On,i.ac!==null&&(Fc(()=>{i.ac.abort(Ya)}),i.ac=null);try{i.f|=Ba;var C=i.fn,T=C();i.f|=ei;var E=i.deps,y=Ce?.is_fork;if(Xe!==null){var A;if(y||jr(i,at),E!==null&&at>0)for(E.length=at+Xe.length,A=0;A<Xe.length;A++)E[at+A]=Xe[A];else i.deps=E=Xe;if(no()&&(i.f&mt)!==0)for(A=at;A<E.length;A++)(E[A].reactions??=[]).push(i)}else!y&&E!==null&&at<E.length&&(jr(i,at),E.length=at);if(ls()&&pt!==null&&!It&&E!==null&&(i.f&(Fe|Mt|Ge))===0)for(A=0;A<pt.length;A++)Gc(pt[A],i);if(o!==null&&o!==i){if(On++,o.deps!==null)for(let x=0;x<r;x+=1)o.deps[x].rv=On;if(n!==null)for(const x of n)x.rv=On;pt!==null&&(a===null?a=pt:a.push(...pt))}return(i.f&Zr)!==0&&(i.f^=Zr),T}catch(x){return yc(x)}finally{i.f^=Ba,Xe=n,at=r,pt=a,ue=o,vt=c,os(l),It=f,Fn=p}}function fS(i,n){let r=n.reactions;if(r!==null){var a=Ew.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||!vr.call(Xe,n))){var c=n;(c.f&mt)!==0&&(c.f^=mt,c.f&=~Hn),Xa(c),jw(c),jr(c,0)}}function jr(i,n){var r=i.deps;if(r!==null)for(var a=n;a<r.length;a++)fS(i,r[a])}function Sr(i){var n=i.f;if((n&gn)===0){Te(i,Ue);var r=pe,a=ts;pe=i,ts=!0;try{(n&(Jt|Tc))!==0?oS(i):ro(i),kc(i);var o=Qc(i);i.teardown=typeof o=="function"?o:null,i.wv=Vc;var c;ww&&kw&&(i.f&Ge)!==0&&i.deps}finally{ts=a,pe=r}}}function hr(i){var n=i.f,r=(n&Fe)!==0;if(ue!==null&&!It){var a=pe!==null&&(pe.f&gn)!==0;if(!a&&(vt===null||!vr.call(vt,i))){var o=ue.deps;if((ue.f&Ba)!==0)i.rv<On&&(i.rv=On,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]:vr.call(c,ue)||c.push(ue)}}}if(wr&&pn.has(i))return pn.get(i);if(r){var l=i;if(wr){var f=l.v;return((l.f&Ue)===0&&l.reactions!==null||zc(l))&&(f=eo(l)),pn.set(l,f),f}var p=(l.f&mt)===0&&!It&&ue!==null&&(ts||(ue.f&mt)!==0),_=(l.f&ei)===0;ni(l)&&(p&&(l.f|=mt),xc(l)),p&&!_&&(Lc(l),qc(l))}if(Pt?.has(i))return Pt.get(i);if((i.f&Zr)!==0)throw i.v;return i.v}function qc(i){if(i.f|=mt,i.deps!==null)for(const n of i.deps)(n.reactions??=[]).push(i),(n.f&Fe)!==0&&(n.f&mt)===0&&(Lc(n),qc(n))}function zc(i){if(i.v===Be)return!0;if(i.deps===null)return!1;for(const n of i.deps)if(pn.has(n)||(n.f&Fe)!==0&&zc(n))return!0;return!1}function dS(i){var n=It;try{return It=!0,i()}finally{It=n}}const gS=["touchstart","touchmove"];function pS(i){return gS.includes(i)}const Ji=Symbol("events"),_S=new Set,rc=new Set;let ic=null;function sc(i){var n=this,r=n.ownerDocument,a=i.type,o=i.composedPath?.()||[],c=o[0]||i.target;ic=i;var l=0,f=ic===i&&i[Ji];if(f){var p=o.indexOf(f);if(p!==-1&&(n===document||n===window)){i[Ji]=n;return}var _=o.indexOf(n);if(_===-1)return;p<=_&&(l=p)}if(c=o[l]||i.target,c!==n){Tw(i,"currentTarget",{configurable:!0,get(){return c||r}});var C=ue,T=pe;Ft(null),Sn(null);try{for(var E,y=[];c!==null;){var A=c.assignedSlot||c.parentNode||c.host||null;try{var x=c[Ji]?.[a];x!=null&&(!c.disabled||i.target===c)&&x.call(c,i)}catch($){E?y.push($):E=$}if(i.cancelBubble||A===n||A===null)break;c=A}if(E){for(let $ of y)queueMicrotask(()=>{throw $});throw E}}finally{i[Ji]=n,delete i.currentTarget,Ft(C),Sn(T)}}}function mS(i,n){return vS(i,n)}const Xi=new Map;function vS(i,{target:n,anchor:r,props:a={},events:o,context:c,intro:l=!0,transformError:f}){tS();var p=void 0,_=iS(()=>{var C=r??n.appendChild(Dc());Yw(C,{pending:()=>{}},y=>{Ww({});var A=xt;c&&(A.c=c),o&&(a.$$events=o),p=i(y,a)||{},Vw()},f);var T=new Set,E=y=>{for(var A=0;A<y.length;A++){var x=y[A];if(!T.has(x)){T.add(x);var $=pS(x);for(const Oe of[n,document]){var H=Xi.get(Oe);H===void 0&&(H=new Map,Xi.set(Oe,H));var re=H.get(x);re===void 0?(Oe.addEventListener(x,sc,{passive:$}),H.set(x,1)):H.set(x,re+1)}}}};return E(Cw(_S)),rc.add(E),()=>{for(var y of T)for(const $ of[n,document]){var A=Xi.get($),x=A.get(y);--x==0?($.removeEventListener(y,sc),A.delete(y),A.size===0&&Xi.delete($)):A.set(y,x)}rc.delete(E),C!==r&&C.parentNode?.removeChild(C)}});return wS.set(p,_),p}let wS=new WeakMap;const SS="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(SS);Hw();function ES(i){}const qa={init:i=>{ne.get(Mn).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=ne.get(vn),o=U.getCurrentPath(r.getConfig().routing?.useHashRouting),l=(await a.getCurrentNode(o.path))?.clientPermissions?.urlParameters,f={...i};if(l){const p={};Object.keys(l).forEach(_=>{_ in f&&l[_]?.write===!0&&(p[_]=f[_],delete f[_])});for(const _ in f)console.warn(`No permission to add the search param "${_}" to the url`);Object.keys(p).length>0&&r.routing().addSearchParams(p,n)}}},$t={luigi:{},init:i=>{console.log("Init communication..."),$t.luigi=i},addListeners:(i,n)=>{i.addEventListener(O.INITIALIZED,r=>{Pe.luigi?.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(O.NAVIGATION_REQUEST,r=>{const{drawer:a,link:o,preserveView:c,modal:l,newTab:f,withoutSync:p,preventContextUpdate:_,preventHistoryEntry:C,fromVirtualTreeRoot:T,fromContext:E,fromClosestContext:y,fromParent:A,relative:x,nodeParams:$}=r.detail,H={drawerSettings:a,modalSettings:l,newTab:f,path:o,preserveView:c,preventContextUpdate:_,options:{fromVirtualTreeRoot:T,fromContext:E,fromClosestContext:y,fromParent:A,relative:x,nodeParams:$},preventHistoryEntry:C,withoutSync:p};ne.get(vn).handleNavigationRequest(H,r.callbackFn)}),i.addEventListener(O.RUNTIME_ERROR_HANDLING_REQUEST,r=>{n.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener(O.ALERT_REQUEST,r=>{Pe.processAlert(r.payload,!0,i)}),i.addEventListener(O.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Pe.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener(O.SET_DOCUMENT_TITLE_REQUEST,r=>{$t.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener(O.SHOW_LOADING_INDICATOR_REQUEST,r=>{$t.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener(O.HIDE_LOADING_INDICATOR_REQUEST,r=>{$t.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener(O.ADD_BACKDROP_REQUEST,r=>{$t.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener(O.REMOVE_BACKDROP_REQUEST,r=>{$t.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener(O.SET_DIRTY_STATUS_REQUEST,r=>{Pe.handleDirtyStatusRequest(r.detail?.data?.dirty,r.detail?.source)}),i.addEventListener(O.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener(O.OPEN_USER_SETTINGS_REQUEST,r=>{$t.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener(O.CLOSE_USER_SETTINGS_REQUEST,r=>{$t.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener(O.ADD_SEARCH_PARAMS_REQUEST,r=>{qa.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),i.addEventListener(O.UPDATE_MODAL_SETTINGS_REQUEST,r=>{X.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),i.addEventListener(O.SET_CURRENT_LOCALE_REQUEST,r=>{n.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale,i)})}};class CS{constructor(){this._ui=X,this._comm=$t,this._ux=Pe,this._routing=qa}bootstrap(n){this._app=mS(ES,{target:document.body}),this._connector=n}init(){const n=window.Luigi;ne.register(ss,()=>new ss),ne.register(vn,()=>new vn(n)),ne.register(_n,()=>new _n),ne.register(Mn,()=>new Mn(n)),ne.register(mr,()=>new mr),ne.register(mn,()=>new mn(n)),n.theming()._init(),X.init(n),qa.init(n),$t.init(n),Pe.init(n)}}window.Luigi=new vw(new CS);
|
|
54
|
+
Please refer to documentation`),[T]}}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,_=this.luigi.getConfigValue("routing.useHashRouting"),{path:C,query:T}=O.getCurrentPath(_),E=C+(T?"?"+T:""),y=await this.getPathData(E),A=y.nodesInPath;let x=n;if(A===void 0)return console.warn("No nodes in path found for current path:",E),x;if(a){x="";const $=[...A].map((H,re)=>H.virtualTree?re:-1).filter(H=>H!==-1).pop();A.forEach((H,re)=>{H.pathSegment&&($===void 0||re<=$)&&(x+="/"+H.pathSegment)}),x+="/"+n}else if(o){const $=o,H=[...A].reverse().find(re=>$===re.navigationContext);x=O.concatenatePath(O.getSubPath(H,y.pathParams),n)}else if(c){const $=[...A].reverse().find(H=>H.navigationContext&&H.navigationContext.length>0);x=O.concatenatePath(O.getSubPath($,y.pathParams),n)}else l?x=O.concatenatePath(O.getSubPath(y.selectedNode?.parent,y.pathParams),n):f&&(x=O.concatenatePath(O.getSubPath(y.selectedNode,y.pathParams),n));return p&&Object.keys(p).length>0&&(x+=x.includes("?")?"&":"?",Object.entries(p).forEach(($,H)=>{x+=encodeURIComponent(O.getContentViewParamPrefix(this.luigi)+$[0])+"="+encodeURIComponent($[1])+(H<Object.keys(p).length-1?"&":"")})),x}}class Fn{constructor(n){this.luigi=n}getNavigationService(){return this.navigationService||(this.navigationService=ne.get(Sn)),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(){const n=this.luigi.getConfig();console.log("Init Routing...",n.routing),n.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);if(this.shouldSkipRoutingForUrlPatterns())return;this.setFeatureToggle(l),await this.shouldShowModalPathInUrl(n),f.forEach((x,$)=>{p[$]=x}),this.checkInvalidateCache(this.previousPathData,o);const _=await this.getNavigationService().getPathData(o);this.previousPathData=_;const C=O.filterNodeParams(p,this.luigi),T=F.getPathWithoutHash(o);this.currentRoute={raw:window.location.href,path:o,nodeParams:C};const E=_?.selectedNode??await this.getNavigationService().getCurrentNode(o),y=E?.viewUrl||"";if(await this.handlePageNotFound(E,y,_,o,T))return;const A=this.luigi.getEngine()._connector;if(A?.renderTopNav(await this.getNavigationService().getTopNavData(o,_)),A?.renderLeftNav(await this.getNavigationService().getLeftNavData(o,_)),A?.renderTabNav(await this.getNavigationService().getTabNavData(o,_)),A?.renderBreadcrumbs(await this.getNavigationService().getBreadcrumbData(o,_,x=>{A?.renderBreadcrumbs(x)})),E){const x={nodeParams:C||{},pathParams:_?.pathParams||{},searchParams:O.prepareSearchParamsForClient(E,this.luigi)};this.currentRoute.node=E,this.getNavigationService().onNodeChange(this.previousNode,E),this.previousNode=E,K.updateMainContent(E,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=ne.get(Sn),a=ne.get(vn),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:_}=await r.extractDataFromPath(l);document.querySelector(".lui-modal luigi-container")?this.luigi.getEngine()._connector?.updateModalSettings(p):this.luigi.navigation().openAsModal(l,p||_.openNodeInModal)}catch(p){console.error("Error parsing modal settings from URL parameters",p)}}else{a.closeModals();return}}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 _=history.state,C,T;if(p){let[E,y]=f.hash.split("?");C=E,T=O.getURLWithoutModalData(y,c),T&&(C+="?"+T)}else C=f.pathname,T=O.getURLWithoutModalData(f.search,c),T&&(C+="?"+O.getURLWithoutModalData(f.search,c));if(_=O.handleHistoryState(_,C),l!==n){if(o[c]=n,r&&Object.keys(r).length&&(o[`${c}Params`]=JSON.stringify(r)),p){const E=location.hash.indexOf(a);E!==-1&&(f.hash=f.hash.slice(0,E)),f.hash=`${f.hash}${a}${O.encodeParams(o)}`}else f.search=`?${O.encodeParams(o)}`;history.pushState(_,"",f.href)}else{const E=new URL(f);if(p){let y=E.hash.split("?")[0];E.hash=y,T&&(E.hash+="?"+T)}else E.search=T;history.replaceState({},"",E.href),history.pushState(_,"",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 _=location.hash.indexOf(o);_!==-1&&(f.hash=f.hash.slice(0,_)),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=ne.get(mn);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,_=c[f];if(p!==_.pathSegment||!l)if(O.isDynamicNode(_)){if(!l||p!==O.getDynamicNodeValue(_,n.pathParams)){a.deleteNodesRecursively(_);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(_,C)=>await this.getNavigationService().getChildren(_,C));if(f){const _=F.getTrimmedUrl(o);return this.getNavigationService().handleNavigationRequest({path:`${_?`/${_}`:""}/${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 _=await O.getDefaultChildNode(a);this.showPageNotFoundError(_,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 mr{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 Ua=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 _=document.createElement("luigi-compound-container");return _.setAttribute("lui_container","true"),_.viewurl=i.viewUrl?ne.get(mr).applyDecorators(O.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",_.webcomponent=i.webcomponent??!1,_.compoundConfig=i.compound,_.context=i.context,_.clientPermissions=i.clientPermissions??{},_.nodeParams=l,_.pathParams=f,_.userSettingsGroup=i.userSettingsGroup,_.userSettings=c,_.searchParams=p,_.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),_.locale=n.i18n().getCurrentLocale(),_.theme=n.theming().getCurrentTheme(),_.viewGroup=i.viewGroup,_.virtualTree=i.virtualTree||i._virtualTree,_.virtualTreeRootNode=Se.findVirtualTreeRootNode(i),n.getEngine()._comm.addListeners(_,n),_}else{const _=document.createElement("luigi-container");return _.setAttribute("lui_container","true"),_.viewurl=i.viewUrl?ne.get(mr).applyDecorators(O.substituteViewUrl(i,f,n),i.decodeViewUrl??!1):"",_.webcomponent=i.webcomponent??!1,_.context=i.context,_.authData=fn.getStoredAuthData(),_.clientPermissions=i.clientPermissions??{},_.cssVariables=await n.theming().getCSSVariables(),_.nodeParams=l,_.pathParams=f,_.userSettingsGroup=i.userSettingsGroup,_.userSettings=c,_.searchParams=p,_.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),_.locale=n.i18n().getCurrentLocale(),_.theme=n.theming().getCurrentTheme(),_.viewGroup=i.viewGroup,_.virtualTree=i.virtualTree||i._virtualTree,_.virtualTreeRootNode=Se.findVirtualTreeRootNode(i),wc(_,n),Ec(_,n),n.getEngine()._comm.addListeners(_,n),_.luigiMfId=F.getRandomId(),_}},wc=(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},Ec=(i,n)=>{const r=n.getConfigValue("settings.allowRules");r?.length&&(r.forEach((a,o)=>{r[o]=a+(a.indexOf(";")!=-1?"":";")}),i.allowRules=r)},K={navService:void 0,routingService:void 0,luigi:void 0,modalContainer:[],drawerContainer:void 0,init:i=>{console.log("Init UI..."),K.navService=ne.get(Sn),K.routingService=ne.get(Fn),K.luigi=i,i.getEngine()._connector?.renderMainLayout()},update:async i=>{const n=K.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"))&&K.luigi.getEngine()._connector?.renderTopNav(await K.navService.getTopNavData(n.path)),r||i.includes("navigation")||i.includes("navigation.nodes")||i.includes("navigation.viewgroupdata")||i.includes("settings")||i.includes("settings.footer")){ne.get(mn).deleteCache(),K.luigi.getEngine()._connector?.renderLeftNav(await K.navService.getLeftNavData(n.path)),K.luigi.getEngine()._connector?.renderTabNav(await K.navService.getTabNavData(n.path));const a=K.luigi.getEngine()._connector;a?.renderBreadcrumbs(await K.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"))&&(ne.get(mn).deleteCache(),n.node&&K.updateMainContent(n.node,K.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 _=r?.nodeParams||{},C=r?.pathParams||{},T=r?.searchParams||{};if(i&&p){let E,y;if((i.virtualTree||i._virtualTree)&&(y=Se.findVirtualTreeRootNode(i)),[...p.childNodes].forEach(A=>{A.tagName?.indexOf("LUIGI-")===0&&(A.viewGroup&&i.viewGroup!==A.viewGroup?A.style.display="none":A.viewGroup||A.virtualTree&&y===A.virtualTreeRootNode?E=A:A.remove())}),E)a||(E.style.display="block",E.viewurl=i.viewUrl?ne.get(mr).applyDecorators(O.substituteViewUrl(i,C,n),i.decodeViewUrl??!1):"",E.nodeParams=_,E.pathParams=C,E.clientPermissions=i.clientPermissions,E.searchParams=T,E.locale=n.i18n().getCurrentLocale(),E.theme=n.theming().getCurrentTheme(),E.activeFeatureToggleList=n.featureToggles().getActiveFeatureToggleList(),E.userSettingsGroup=i.userSettingsGroup,E.userSettings=f,wc(E,n),Ec(E,n)),o||E.updateContext(i.context||{});else{const A=await Ua(i,n,r);p?.appendChild(A);const x=n.getEngine()._connector;i.loadingIndicator?.enabled!==!1&&x?.showLoadingIndicator(p)}}},openModal:async(i,n,r,a)=>{const o=await Ua(n,i);K.modalContainer.push(o);const c=ne.get(Fn),l=ne.get(vn);let f=!1,p,_;const T=new Promise(A=>{p=()=>{f||(f=!0,A(),l.removeLastModalFromStack())},_=()=>{p&&p(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},o.addEventListener(U.CLOSE_CURRENT_MODAL_REQUEST,_)}),E={closePromise:T,resolveFn:p,onCloseRequestHandler:_,onInternalClose:()=>{try{E.resolveFn&&E.resolveFn()}catch(A){console.warn("onInternalClose failed",A)}},modalsettings:r};l.registerModal(E),i.getEngine()._connector?.renderModal(o,r,()=>{a?.(),l.removeLastModalFromStack(),i.getConfigValue("routing.showModalPathInUrl")&&l.getModalStackLength()===0&&c.removeModalDataFromUrl(!0)},()=>T);const y=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&y?.showLoadingIndicator(o.parentElement)},updateModalSettings:(i,n,r)=>{const a=ne.get(vn);if(a.getModalStackLength()===0)return;a.updateFirstModalSettings(i);const o=ne.get(Fn),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=await Ua(n,i);K.drawerContainer=o,i.getEngine()._connector?.renderDrawer(o,r,a);const c=i.getEngine()._connector;n.loadingIndicator?.enabled!==!1&&c?.showLoadingIndicator(o.parentElement)}};class rS{constructor(){this._userInfoStore=ns({}),this._loggedInStore=ns(!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=fn.parseUrlAuthErrors()||{};if(await fn.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=fn.getStoredAuthData();if(!r||!fn.isLoggedIn()){if(Ge.getConfigValue("auth.disableAutoLogin"))return;let o=!0;return r&&(o=await ur.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(ac(this._userInfoStore))),F.isFunction(Ge.getConfigValue("auth.events.onAuthSuccessful"))&&At.isNewlyAuthorized()&&await ur.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=fn.getStoredAuthData(),r=async c=>{await ur.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 ur.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));K.modalContainer?.forEach(o=>o.setAttribute("auth-data",JSON.stringify(n))),K.drawerContainer&&K.drawerContainer.setAttribute("auth-data",JSON.stringify(n))}}}const Un=new rS,iS={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"}}},sS=iS;class aS{constructor(n){this.luigi=n,this.currentLocaleStorageKey="luigi.currentLocale",this.defaultLocale="en",this.listeners={},this.translationTable=sS}_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("{"+is.escapeKeyForRegexp(a)+"}","gi"),r[a])}),n}}const Ha={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 K.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(!K.drawerContainer)return{};if(K.drawerContainer.iframeHandle?.iframe)return{iframe:K.drawerContainer.iframeHandle.iframe,id:K.drawerContainer.luigiMfId,active:F.isElementVisible(K.drawerContainer)};{const i=K.drawerContainer.shadowRoot?.firstElementChild?.firstElementChild??null;if(i)return{iframe:i,id:K.drawerContainer.luigiMfId,active:F.isElementVisible(K.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 K.modalContainer)a.iframeHandle?.iframe&&r.push(a);return K.drawerContainer&&K.drawerContainer.iframeHandle?.iframe&&r.push(K.drawerContainer),r.length>0?r:void 0}};class oS{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 Ha.getMicrofrontendsInDom(this.luigi)}getMicrofrontendIframes(){const n=this.luigi.getEngine()._connector?.getContainerWrapper();let r=[];if(K.modalContainer)for(const a of Array.from(K.modalContainer))a.tagName?.startsWith("LUIGI-")&&a.iframeHandle?.iframe&&r.push(a.iframeHandle.iframe);if(K.drawerContainer&&r.push(K.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=K.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 uS={luigiAfterInit:async i=>{F.getConfigBooleanValue(i.getConfig(),"settings.appLoadingIndicator.hideAutomatically")&&setTimeout(()=>{i.ux().hideAppLoadingIndicator()},0),await Ge.executeConfigFnAsync("lifecycleHooks.luigiAfterInit")}};class lS{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 cS{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};this.navService.handleNavigationRequest(p,void 0)},this.openAsModal=async(r,a,o)=>{a?.keepPrevious||await this.modalService.closeModals();const c=r.replace(/\/\/+/g,"/");if(!await Se.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 Se.validatePathAndGetRedirect(c,this.luigi))return;const f=await this.navService.getCurrentNode(c),p=a||{};if(!p.header?.title){const C=await O.getNodeLabel(f,this.luigi)||"";p.header?p.header.title=C:p.header={title:C}}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=ne.get(Sn),this.routingService=ne.get(Fn),this.modalService=ne.get(vn)}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 hS{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 fS{#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=ne.get(mr);(()=>{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")})()}}class ss{constructor(){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}}let Kl;const Pe={luigi:void 0,documentTitle:void 0,init:i=>{console.log("ux init..."),Pe.luigi=i,Pe.documentTitle=ns(void 0),Kl=ne.get(ss)},processAlert:(i,n,r)=>{if(!Pe.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&&Pe.luigi?.navigation().navigate(c.url),c.dismissKey&&i.id))return r.notifyAlertClosed(i.id,c.dismissKey),!0}return!1}};Pe.luigi.getEngine()._connector?.renderAlert(i,a)},handleConfirmationModalRequest:(i,n)=>{if(!Pe.luigi)throw new Error("Luigi is not initialized.");i&&(i={...i,header:Pe.luigi.i18n().getTranslation(i.header||"luigi.confirmationModal.header"),body:Pe.luigi.i18n().getTranslation(i.body||"luigi.confirmationModal.body"),buttonDismiss:Pe.luigi.i18n().getTranslation(i.buttonDismiss||"luigi.button.dismiss"),buttonConfirm:Pe.luigi.i18n().getTranslation(i.buttonConfirm||"luigi.button.confirm")}),Pe.luigi.getEngine()._connector?.renderConfirmationModal(i,{confirm(){n.notifyConfirmationModalClosed(!0)},dismiss(){n.notifyConfirmationModalClosed(!1)}})},handleDirtyStatusRequest:(i,n)=>{if(!Pe.luigi)throw new Error("Luigi is not initialized.");Kl.updateDirtyStatus(i,n)}};class dS{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 gS=new dS;class pS{constructor(n){this.dirtyStatusService=ne.get(ss),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 gS.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=()=>ac(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 _S{filterIdFromMessageObject(n){const{id:r,...a}=n;return{id:r,messageWithoutId:a}}}const Yl=new _S;class mS{constructor(n){this.luigi=n}sendToAll(n){const r=Ha.getAllLuigiContainerIframe(this.luigi);if(!r){console.warn("No Luigi containers found to send the message to.");return}const{id:a,messageWithoutId:o}=Yl.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=Ha.getAllLuigiContainerIframe(this.luigi);if(!a){console.warn("No Luigi containers found to send the message to.");return}const{id:o,messageWithoutId:c}=Yl.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 vS{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()),Un.init().then(()=>{this.engine.init(),this.initialized||(this.initialized=!0,uS.luigiAfterInit(this))})},this.getConfig=()=>this.config,this.configChanged=(...r)=>{this.getEngine()._ui.update(r)},this.customMessages=()=>(this._customMessages||(this._customMessages=new mS(this)),this._customMessages),this.i18n=()=>(this._i18n||(this._i18n=new aS(this)),this._i18n),this.elements=()=>(this._elements||(this._elements=new oS(this)),this._elements),this.navigation=()=>new cS(this),this.ux=()=>new pS(this),this.featureToggles=()=>(this._featureToggles||(this._featureToggles=new lS),this._featureToggles),this.routing=()=>(this._routing||(this._routing=new hS(this)),this._routing),this.theming=()=>(this._theming||(this._theming=new fS(this)),this._theming),this.auth=()=>ur,this._store=this.createConfigStore()}getEngine(){return this.engine}getConfigValue(n){return F.getConfigValueFromObject(this.getConfig(),n)}getConfigValueAsync(n,...r){return Dn.getConfigValueFromObjectAsync(this.getConfig(),n,r)}clearNavigationCache(){ne.get(mn).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=ns({}),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 SS=!1;var wS=Array.isArray,ES=Array.prototype.indexOf,vr=Array.prototype.includes,CS=Array.from,TS=Object.defineProperty,zr=Object.getOwnPropertyDescriptor,yS=Object.prototype,bS=Array.prototype,RS=Object.getPrototypeOf,Jl=Object.isExtensible;const AS=()=>{};function PS(i){for(var n=0;n<i.length;n++)i[n]()}function IS(){var i,n,r=new Promise((a,o)=>{i=a,n=o});return{promise:r,resolve:i,reject:n}}const Fe=2,Xr=4,Cc=8,Tc=1<<24,Jt=16,wn=32,Hn=64,Wa=128,mt=512,Oe=1024,Qe=2048,Mt=4096,Yt=8192,pn=16384,ei=32768,Xl=1<<25,as=65536,Va=1<<17,xS=1<<18,us=1<<19,LS=1<<20,Wn=65536,Ba=1<<21,Ka=1<<22,Zr=1<<23,$a=Symbol("$state"),Ya=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function NS(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function OS(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function US(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $S(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function DS(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Be=Symbol();function MS(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function FS(i){return i===this.v}let Ja=!1,kS=!1;function HS(){Ja=!0}let xt=null;function os(i){xt=i}function WS(i,n=!1,r){xt={p:xt,i:!1,c:null,e:null,s:i,x:null,r:pe,l:Ja&&!n?{s:null,u:null,$:[]}:null}}function VS(i){var n=xt,r=n.e;if(r!==null){n.e=null;for(var a of r)rw(a)}return n.i=!0,xt=n.p,{}}function ls(){return!Ja||xt!==null&&xt.l===null}let lr=[];function BS(){var i=lr;lr=[],PS(i)}function gr(i){if(lr.length===0){var n=lr;queueMicrotask(()=>{n===lr&&BS()})}lr.push(i)}function yc(i){var n=pe;if(n===null)return ue.f|=Zr,i;if((n.f&ei)===0&&(n.f&Xr)===0)throw i;cr(i,n)}function cr(i,n){for(;n!==null;){if((n.f&Wa)!==0){if((n.f&ei)===0)throw i;try{n.b.error(i);return}catch(r){i=r}}n=n.parent}throw i}const GS=-7169;function Te(i,n){i.f=i.f&GS|n}function Xa(i){(i.f&mt)!==0||i.deps===null?Te(i,Oe):Te(i,Mt)}function bc(i){if(i!==null)for(const n of i)(n.f&Fe)===0||(n.f&Wn)===0||(n.f^=Wn,bc(n.deps))}function Rc(i,n,r){(i.f&Qe)!==0?n.add(i):(i.f&Mt)!==0&&r.add(i),bc(i.deps),Te(i,Oe)}const ln=new Set;let Ce=null,Pt=null,Ga=null,Da=!1,hr=null,ji=null;var Zl=0;let QS=1;class Vn{id=QS++;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)Te(a,Qe),this.schedule(a);for(a of r.m)Te(a,Mt),this.schedule(a)}}#l(){if(Zl++>1e3&&(ln.delete(this),qS()),!this.#d()){for(const f of this.#i)this.#a.delete(f),Te(f,Qe),this.schedule(f);for(const f of this.#a)Te(f,Mt),this.schedule(f)}const n=this.#t;this.#t=[],this.apply();var r=hr=[],a=[],o=ji=[];for(const f of n)try{this.#p(f,r,a)}catch(p){throw Ic(f),p}if(Ce=null,o.length>0){var c=Vn.ensure();for(const f of o)c.schedule(f)}if(hr=null,ji=null,this.#d()||this.#g()){this.#_(a),this.#_(r);for(const[f,p]of this.#u)Pc(f,p)}else{this.#n.size===0&&ln.delete(this),this.#i.clear(),this.#a.clear();for(const f of this.#e)f(this);this.#e.clear(),jl(a),jl(r),this.#r?.resolve()}var l=Ce;if(this.#t.length>0){const f=l??=this;f.#t.push(...this.#t.filter(p=>!f.#t.includes(p)))}l!==null&&(ln.add(l),l.#l()),ln.has(this)||this.#S()}#p(n,r,a){n.f^=Oe;for(var o=n.first;o!==null;){var c=o.f,l=(c&(wn|Hn))!==0,f=l&&(c&Oe)!==0,p=f||(c&Yt)!==0||this.#u.has(o);if(!p&&o.fn!==null){l?o.f^=Oe:(c&Xr)!==0?r.push(o):ni(o)&&((c&Jt)!==0&&this.#a.add(o),wr(o));var _=o.first;if(_!==null){o=_;continue}}for(;o!==null;){var C=o.next;if(C!==null){o=C;break}o=o.parent}}}#_(n){for(var r=0;r<n.length;r+=1)Rc(n[r],this.#i,this.#a)}capture(n,r,a=!1){r!==Be&&!this.previous.has(n)&&this.previous.set(n,r),(n.f&Zr)===0&&(this.current.set(n,[n.v,a]),Pt?.set(n,n.v))}activate(){Ce=this}deactivate(){Ce=null,Pt=null}flush(){try{Da=!0,Ce=this,this.#l()}finally{Zl=0,Ga=null,hr=null,ji=null,Da=!1,Ce=null,Pt=null,_n.clear()}}discard(){for(const n of this.#h)n(this);this.#h.clear(),ln.delete(this)}register_created_effect(n){this.#s.push(n)}#S(){for(const C of ln){var n=C.id<this.id,r=[];for(const[T,[E,y]]of this.current){if(C.current.has(T)){var a=C.current.get(T)[0];if(n&&E!==a)C.current.set(T,[E,y]);else continue}r.push(T)}var o=[...C.current.keys()].filter(T=>!this.current.has(T));if(o.length===0)n&&C.discard();else if(r.length>0){C.activate();var c=new Set,l=new Map;for(var f of r)Ac(f,o,c,l);l=new Map;var p=[...C.current.keys()].filter(T=>this.current.has(T)?this.current.get(T)[0]!==T:!0);for(const T of this.#s)(T.f&(pn|Yt|Va))===0&&Za(T,p,l)&&((T.f&(Ka|Jt))!==0?(Te(T,Qe),C.schedule(T)):C.#i.add(T));if(C.#t.length>0){C.apply();for(var _ of C.#t)C.#p(_,[],[]);C.#t=[]}C.deactivate()}}for(const C of ln)C.#f.has(this)&&(C.#f.delete(this),C.#f.size===0&&!C.#d()&&(C.activate(),C.#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,gr(()=>{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??=IS()).promise}static ensure(){if(Ce===null){const n=Ce=new Vn;Da||(ln.add(Ce),gr(()=>{Ce===n&&n.flush()}))}return Ce}apply(){{Pt=null;return}}schedule(n){if(Ga=n,n.b?.is_pending&&(n.f&(Xr|Cc|Tc))!==0&&(n.f&ei)===0){n.b.defer_effect(n);return}for(var r=n;r.parent!==null;){r=r.parent;var a=r.f;if(hr!==null&&r===pe&&(ue===null||(ue.f&Fe)===0))return;if((a&(Hn|wn))!==0){if((a&Oe)===0)return;r.f^=Oe}}this.#t.push(r)}}function qS(){try{NS()}catch(i){cr(i,Ga)}}let Kt=null;function jl(i){var n=i.length;if(n!==0){for(var r=0;r<n;){var a=i[r++];if((a.f&(pn|Yt))===0&&ni(a)&&(Kt=new Set,wr(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Hc(a),Kt?.size>0)){_n.clear();for(const o of Kt){if((o.f&(pn|Yt))!==0)continue;const c=[o];let l=o.parent;for(;l!==null;)Kt.has(l)&&(Kt.delete(l),c.push(l)),l=l.parent;for(let f=c.length-1;f>=0;f--){const p=c[f];(p.f&(pn|Yt))===0&&wr(p)}}Kt.clear()}}Kt=null}}function Ac(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?Ac(o,n,r,a):(c&(Ka|Jt))!==0&&(c&Qe)===0&&Za(o,n,a)&&(Te(o,Qe),ja(o))}}function Za(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(vr.call(n,o))return!0;if((o.f&Fe)!==0&&Za(o,n,r))return r.set(o,!0),!0}return r.set(i,!1),!1}function ja(i){Ce.schedule(i)}function Pc(i,n){if(!((i.f&wn)!==0&&(i.f&Oe)!==0)){(i.f&Qe)!==0?n.d.push(i):(i.f&Mt)!==0&&n.m.push(i),Te(i,Oe);for(var r=i.first;r!==null;)Pc(r,n),r=r.next}}function Ic(i){Te(i,Oe);for(var n=i.first;n!==null;)Ic(n),n=n.next}function zS(i){let n=0,r=to(0),a;return()=>{no()&&(fr(r),sw(()=>(n===0&&(a=dw(()=>i(()=>Kr(r)))),n+=1,()=>{gr(()=>{n-=1,n===0&&(a?.(),a=void 0,Kr(r))})})))}}var KS=as|us;function YS(i,n,r,a){new JS(i,n,r,a)}class JS{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=zS(()=>(this.#l=to(this.#u),()=>{this.#l=null}));constructor(n,r,a,o){this.#e=n,this.#n=r,this.#o=c=>{var l=pe;l.b=this,l.f|=Wa,a(c)},this.parent=pe.b,this.transform_error=o??this.parent?.transform_error??(c=>c),this.#r=aw(()=>{this.#w()},KS)}#_(){try{this.#t=Nn(()=>this.#o(this.#e))}catch(n){this.error(n)}}#S(n){const r=this.#n.failed;r&&(this.#i=Nn(()=>{r(this.#e,()=>n,()=>()=>{})}))}#C(){const n=this.#n.pending;n&&(this.is_pending=!0,this.#s=Nn(()=>n(this.#e)),gr(()=>{var r=this.#a=document.createDocumentFragment(),a=Dc();r.append(a),this.#t=this.#v(()=>Nn(()=>this.#o(a))),this.#c===0&&(this.#e.before(r),this.#a=null,es(this.#s,()=>{this.#s=null}),this.#m(Ce))}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#u=0,this.#t=Nn(()=>{this.#o(this.#e)}),this.#c>0){var n=this.#a=document.createDocumentFragment();lw(this.#t,n);const r=this.#n.pending;this.#s=Nn(()=>r(this.#e))}else this.#m(Ce)}catch(r){this.error(r)}}#m(n){this.is_pending=!1,n.transfer_effects(this.#d,this.#g)}defer_effect(n){Rc(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=pe,a=ue,o=xt;En(this.#r),Ft(this.#r),os(this.#r.ctx);try{return Vn.ensure(),n()}catch(c){return yc(c),null}finally{En(r),Ft(a),os(o)}}#E(n,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#E(n,r);return}this.#c+=n,this.#c===0&&(this.#m(r),this.#s&&es(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,gr(()=>{this.#f=!1,this.#l&&Oc(this.#l,this.#u)}))}get_effect_pending(){return this.#p(),fr(this.#l)}error(n){var r=this.#n.onerror;let a=this.#n.failed;if(!r&&!a)throw n;this.#t&&(Dt(this.#t),this.#t=null),this.#s&&(Dt(this.#s),this.#s=null),this.#i&&(Dt(this.#i),this.#i=null);var o=!1,c=!1;const l=()=>{if(o){MS();return}o=!0,c&&DS(),this.#i!==null&&es(this.#i,()=>{this.#i=null}),this.#v(()=>{this.#w()})},f=p=>{try{c=!0,r?.(p,l),c=!1}catch(_){cr(_,this.#r&&this.#r.parent)}a&&(this.#i=this.#v(()=>{try{return Nn(()=>{var _=pe;_.b=this,_.f|=Wa,a(this.#e,()=>p,()=>l)})}catch(_){return cr(_,this.#r.parent),null}}))};gr(()=>{var p;try{p=this.transform_error(n)}catch(_){cr(_,this.#r&&this.#r.parent);return}p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(f,_=>cr(_,this.#r&&this.#r.parent)):f(p)})}}function XS(i){var n=i.effects;if(n!==null){i.effects=null;for(var r=0;r<n.length;r+=1)Dt(n[r])}}function ZS(i){for(var n=i.parent;n!==null;){if((n.f&Fe)===0)return(n.f&pn)===0?n:null;n=n.parent}return null}function eo(i){var n,r=pe;En(ZS(i));try{i.f&=~Wn,XS(i),n=Qc(i)}finally{En(r)}return n}function xc(i){var n=i.v,r=eo(i);if(!i.equals(r)&&(i.wv=Bc(),(!Ce?.is_fork||i.deps===null)&&(i.v=r,Ce?.capture(i,n,!0),i.deps===null))){Te(i,Oe);return}Sr||(Pt!==null?(no()||Ce?.is_fork)&&Pt.set(i,r):Xa(i))}function jS(i){if(i.effects!==null)for(const n of i.effects)(n.teardown||n.ac)&&(n.teardown?.(),n.ac?.abort(Ya),n.teardown=AS,n.ac=null,jr(n,0),ro(n))}function Lc(i){if(i.effects!==null)for(const n of i.effects)n.teardown&&wr(n)}let Qa=new Set;const _n=new Map;let Nc=!1;function to(i,n){var r={f:0,v:i,reactions:null,equals:FS,rv:0,wv:0};return r}function cn(i,n){const r=to(i);return cw(r),r}function On(i,n,r=!1){ue!==null&&(!It||(ue.f&Va)!==0)&&ls()&&(ue.f&(Fe|Jt|Ka|Va))!==0&&(vt===null||!vr.call(vt,i))&&$S();let a=r?Gr(n):n;return Oc(i,a,ji)}function Oc(i,n,r=null){if(!i.equals(n)){var a=i.v;Sr?_n.set(i,n):_n.set(i,a),i.v=n;var o=Vn.ensure();if(o.capture(i,a),(i.f&Fe)!==0){const c=i;(i.f&Qe)!==0&&eo(c),Pt===null&&Xa(c)}i.wv=Bc(),Uc(i,Qe,r),ls()&&pe!==null&&(pe.f&Oe)!==0&&(pe.f&(wn|Hn))===0&&(pt===null?hw([i]):pt.push(i)),!o.is_fork&&Qa.size>0&&!Nc&&ew()}return n}function ew(){Nc=!1;for(const i of Qa)(i.f&Oe)!==0&&Te(i,Mt),ni(i)&&wr(i);Qa.clear()}function Kr(i){On(i,i.v+1)}function Uc(i,n,r){var a=i.reactions;if(a!==null)for(var o=ls(),c=a.length,l=0;l<c;l++){var f=a[l],p=f.f;if(!(!o&&f===pe)){var _=(p&Qe)===0;if(_&&Te(f,n),(p&Fe)!==0){var C=f;Pt?.delete(C),(p&Wn)===0&&(p&mt&&(f.f|=Wn),Uc(C,Mt,r))}else if(_){var T=f;(p&Jt)!==0&&Kt!==null&&Kt.add(T),r!==null?r.push(T):ja(T)}}}}function Gr(i){if(typeof i!="object"||i===null||$a in i)return i;const n=RS(i);if(n!==yS&&n!==bS)return i;var r=new Map,a=wS(i),o=cn(0),c=kn,l=f=>{if(kn===c)return f();var p=ue,_=kn;Ft(null),nc(c);var C=f();return Ft(p),nc(_),C};return a&&r.set("length",cn(i.length)),new Proxy(i,{defineProperty(f,p,_){(!("value"in _)||_.configurable===!1||_.enumerable===!1||_.writable===!1)&&OS();var C=r.get(p);return C===void 0?l(()=>{var T=cn(_.value);return r.set(p,T),T}):On(C,_.value,!0),!0},deleteProperty(f,p){var _=r.get(p);if(_===void 0){if(p in f){const C=l(()=>cn(Be));r.set(p,C),Kr(o)}}else On(_,Be),Kr(o);return!0},get(f,p,_){if(p===$a)return i;var C=r.get(p),T=p in f;if(C===void 0&&(!T||zr(f,p)?.writable)&&(C=l(()=>{var y=Gr(T?f[p]:Be),A=cn(y);return A}),r.set(p,C)),C!==void 0){var E=fr(C);return E===Be?void 0:E}return Reflect.get(f,p,_)},getOwnPropertyDescriptor(f,p){var _=Reflect.getOwnPropertyDescriptor(f,p);if(_&&"value"in _){var C=r.get(p);C&&(_.value=fr(C))}else if(_===void 0){var T=r.get(p),E=T?.v;if(T!==void 0&&E!==Be)return{enumerable:!0,configurable:!0,value:E,writable:!0}}return _},has(f,p){if(p===$a)return!0;var _=r.get(p),C=_!==void 0&&_.v!==Be||Reflect.has(f,p);if(_!==void 0||pe!==null&&(!C||zr(f,p)?.writable)){_===void 0&&(_=l(()=>{var E=C?Gr(f[p]):Be,y=cn(E);return y}),r.set(p,_));var T=fr(_);if(T===Be)return!1}return C},set(f,p,_,C){var T=r.get(p),E=p in f;if(a&&p==="length")for(var y=_;y<T.v;y+=1){var A=r.get(y+"");A!==void 0?On(A,Be):y in f&&(A=l(()=>cn(Be)),r.set(y+"",A))}if(T===void 0)(!E||zr(f,p)?.writable)&&(T=l(()=>cn(void 0)),On(T,Gr(_)),r.set(p,T));else{E=T.v!==Be;var x=l(()=>Gr(_));On(T,x)}var $=Reflect.getOwnPropertyDescriptor(f,p);if($?.set&&$.set.call(C,_),!E){if(a&&typeof p=="string"){var H=r.get("length"),re=Number(p);Number.isInteger(re)&&re>=H.v&&On(H,re+1)}Kr(o)}return!0},ownKeys(f){fr(o);var p=Reflect.ownKeys(f).filter(T=>{var E=r.get(T);return E===void 0||E.v!==Be});for(var[_,C]of r)C.v!==Be&&!(_ in f)&&p.push(_);return p},setPrototypeOf(){US()}})}var ec,$c;function tw(){if(ec===void 0){ec=window;var i=Element.prototype,n=Node.prototype,r=Text.prototype;zr(n,"firstChild").get,$c=zr(n,"nextSibling").get,Jl(i)&&(i.__click=void 0,i.__className=void 0,i.__attributes=null,i.__style=void 0,i.__e=void 0),Jl(r)&&(r.__t=void 0)}}function Dc(i=""){return document.createTextNode(i)}function Mc(i){return $c.call(i)}function Fc(i){var n=ue,r=pe;Ft(null),En(null);try{return i()}finally{Ft(n),En(r)}}function nw(i,n){var r=n.last;r===null?n.last=n.first=i:(r.next=i,i.prev=r,n.last=i)}function ti(i,n){var r=pe;r!==null&&(r.f&Yt)!==0&&(i|=Yt);var a={ctx:xt,deps:null,nodes:null,f:i|Qe|mt,first:null,fn:n,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};Ce?.register_created_effect(a);var o=a;if((i&Xr)!==0)hr!==null?hr.push(a):Vn.ensure().schedule(a);else if(n!==null){try{wr(a)}catch(l){throw Dt(a),l}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&us)===0&&(o=o.first,(i&Jt)!==0&&(i&as)!==0&&o!==null&&(o.f|=as))}if(o!==null&&(o.parent=r,r!==null&&nw(o,r),ue!==null&&(ue.f&Fe)!==0&&(i&Hn)===0)){var c=ue;(c.effects??=[]).push(o)}return a}function no(){return ue!==null&&!It}function rw(i){return ti(Xr|LS,i)}function iw(i){Vn.ensure();const n=ti(Hn|us,i);return(r={})=>new Promise(a=>{r.outro?es(n,()=>{Dt(n),a(void 0)}):(Dt(n),a(void 0))})}function sw(i,n=0){return ti(Cc|n,i)}function aw(i,n=0){var r=ti(Jt|n,i);return r}function Nn(i){return ti(wn|us,i)}function kc(i){var n=i.teardown;if(n!==null){const r=Sr,a=ue;tc(!0),Ft(null);try{n.call(null)}finally{tc(r),Ft(a)}}}function ro(i,n=!1){var r=i.first;for(i.first=i.last=null;r!==null;){const o=r.ac;o!==null&&Fc(()=>{o.abort(Ya)});var a=r.next;(r.f&Hn)!==0?r.parent=null:Dt(r,n),r=a}}function ow(i){for(var n=i.first;n!==null;){var r=n.next;(n.f&wn)===0&&Dt(n),n=r}}function Dt(i,n=!0){var r=!1;(n||(i.f&xS)!==0)&&i.nodes!==null&&i.nodes.end!==null&&(uw(i.nodes.start,i.nodes.end),r=!0),Te(i,Xl),ro(i,n&&!r),jr(i,0);var a=i.nodes&&i.nodes.t;if(a!==null)for(const c of a)c.stop();kc(i),i.f^=Xl,i.f|=pn;var o=i.parent;o!==null&&o.first!==null&&Hc(i),i.next=i.prev=i.teardown=i.ctx=i.deps=i.fn=i.nodes=i.ac=i.b=null}function uw(i,n){for(;i!==null;){var r=i===n?null:Mc(i);i.remove(),i=r}}function Hc(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 es(i,n,r=!0){var a=[];Wc(i,a,!0);var o=()=>{r&&Dt(i),n&&n()},c=a.length;if(c>0){var l=()=>--c||o();for(var f of a)f.out(l)}else o()}function Wc(i,n,r){if((i.f&Yt)===0){i.f^=Yt;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&as)!==0||(o.f&wn)!==0&&(i.f&Jt)!==0;Wc(o,n,l?r:!1),o=c}}}function lw(i,n){if(i.nodes)for(var r=i.nodes.start,a=i.nodes.end;r!==null;){var o=r===a?null:Mc(r);n.append(r),r=o}}let ts=!1,Sr=!1;function tc(i){Sr=i}let ue=null,It=!1;function Ft(i){ue=i}let pe=null;function En(i){pe=i}let vt=null;function cw(i){ue!==null&&(vt===null?vt=[i]:vt.push(i))}let Xe=null,at=0,pt=null;function hw(i){pt=i}let Vc=1,$n=0,kn=$n;function nc(i){kn=i}function Bc(){return++Vc}function ni(i){var n=i.f;if((n&Qe)!==0)return!0;if(n&Fe&&(i.f&=~Wn),(n&Mt)!==0){for(var r=i.deps,a=r.length,o=0;o<a;o++){var c=r[o];if(ni(c)&&xc(c),c.wv>i.wv)return!0}(n&mt)!==0&&Pt===null&&Te(i,Oe)}return!1}function Gc(i,n,r=!0){var a=i.reactions;if(a!==null&&!(vt!==null&&vr.call(vt,i)))for(var o=0;o<a.length;o++){var c=a[o];(c.f&Fe)!==0?Gc(c,n,!1):n===c&&(r?Te(c,Qe):(c.f&Oe)!==0&&Te(c,Mt),ja(c))}}function Qc(i){var n=Xe,r=at,a=pt,o=ue,c=vt,l=xt,f=It,p=kn,_=i.f;Xe=null,at=0,pt=null,ue=(_&(wn|Hn))===0?i:null,vt=null,os(i.ctx),It=!1,kn=++$n,i.ac!==null&&(Fc(()=>{i.ac.abort(Ya)}),i.ac=null);try{i.f|=Ba;var C=i.fn,T=C();i.f|=ei;var E=i.deps,y=Ce?.is_fork;if(Xe!==null){var A;if(y||jr(i,at),E!==null&&at>0)for(E.length=at+Xe.length,A=0;A<Xe.length;A++)E[at+A]=Xe[A];else i.deps=E=Xe;if(no()&&(i.f&mt)!==0)for(A=at;A<E.length;A++)(E[A].reactions??=[]).push(i)}else!y&&E!==null&&at<E.length&&(jr(i,at),E.length=at);if(ls()&&pt!==null&&!It&&E!==null&&(i.f&(Fe|Mt|Qe))===0)for(A=0;A<pt.length;A++)Gc(pt[A],i);if(o!==null&&o!==i){if($n++,o.deps!==null)for(let x=0;x<r;x+=1)o.deps[x].rv=$n;if(n!==null)for(const x of n)x.rv=$n;pt!==null&&(a===null?a=pt:a.push(...pt))}return(i.f&Zr)!==0&&(i.f^=Zr),T}catch(x){return yc(x)}finally{i.f^=Ba,Xe=n,at=r,pt=a,ue=o,vt=c,os(l),It=f,kn=p}}function fw(i,n){let r=n.reactions;if(r!==null){var a=ES.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||!vr.call(Xe,n))){var c=n;(c.f&mt)!==0&&(c.f^=mt,c.f&=~Wn),Xa(c),jS(c),jr(c,0)}}function jr(i,n){var r=i.deps;if(r!==null)for(var a=n;a<r.length;a++)fw(i,r[a])}function wr(i){var n=i.f;if((n&pn)===0){Te(i,Oe);var r=pe,a=ts;pe=i,ts=!0;try{(n&(Jt|Tc))!==0?ow(i):ro(i),kc(i);var o=Qc(i);i.teardown=typeof o=="function"?o:null,i.wv=Vc;var c;SS&&kS&&(i.f&Qe)!==0&&i.deps}finally{ts=a,pe=r}}}function fr(i){var n=i.f,r=(n&Fe)!==0;if(ue!==null&&!It){var a=pe!==null&&(pe.f&pn)!==0;if(!a&&(vt===null||!vr.call(vt,i))){var o=ue.deps;if((ue.f&Ba)!==0)i.rv<$n&&(i.rv=$n,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]:vr.call(c,ue)||c.push(ue)}}}if(Sr&&_n.has(i))return _n.get(i);if(r){var l=i;if(Sr){var f=l.v;return((l.f&Oe)===0&&l.reactions!==null||zc(l))&&(f=eo(l)),_n.set(l,f),f}var p=(l.f&mt)===0&&!It&&ue!==null&&(ts||(ue.f&mt)!==0),_=(l.f&ei)===0;ni(l)&&(p&&(l.f|=mt),xc(l)),p&&!_&&(Lc(l),qc(l))}if(Pt?.has(i))return Pt.get(i);if((i.f&Zr)!==0)throw i.v;return i.v}function qc(i){if(i.f|=mt,i.deps!==null)for(const n of i.deps)(n.reactions??=[]).push(i),(n.f&Fe)!==0&&(n.f&mt)===0&&(Lc(n),qc(n))}function zc(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&&zc(n))return!0;return!1}function dw(i){var n=It;try{return It=!0,i()}finally{It=n}}const gw=["touchstart","touchmove"];function pw(i){return gw.includes(i)}const Ji=Symbol("events"),_w=new Set,rc=new Set;let ic=null;function sc(i){var n=this,r=n.ownerDocument,a=i.type,o=i.composedPath?.()||[],c=o[0]||i.target;ic=i;var l=0,f=ic===i&&i[Ji];if(f){var p=o.indexOf(f);if(p!==-1&&(n===document||n===window)){i[Ji]=n;return}var _=o.indexOf(n);if(_===-1)return;p<=_&&(l=p)}if(c=o[l]||i.target,c!==n){TS(i,"currentTarget",{configurable:!0,get(){return c||r}});var C=ue,T=pe;Ft(null),En(null);try{for(var E,y=[];c!==null;){var A=c.assignedSlot||c.parentNode||c.host||null;try{var x=c[Ji]?.[a];x!=null&&(!c.disabled||i.target===c)&&x.call(c,i)}catch($){E?y.push($):E=$}if(i.cancelBubble||A===n||A===null)break;c=A}if(E){for(let $ of y)queueMicrotask(()=>{throw $});throw E}}finally{i[Ji]=n,delete i.currentTarget,Ft(C),En(T)}}}function mw(i,n){return vw(i,n)}const Xi=new Map;function vw(i,{target:n,anchor:r,props:a={},events:o,context:c,intro:l=!0,transformError:f}){tw();var p=void 0,_=iw(()=>{var C=r??n.appendChild(Dc());YS(C,{pending:()=>{}},y=>{WS({});var A=xt;c&&(A.c=c),o&&(a.$$events=o),p=i(y,a)||{},VS()},f);var T=new Set,E=y=>{for(var A=0;A<y.length;A++){var x=y[A];if(!T.has(x)){T.add(x);var $=pw(x);for(const Ue of[n,document]){var H=Xi.get(Ue);H===void 0&&(H=new Map,Xi.set(Ue,H));var re=H.get(x);re===void 0?(Ue.addEventListener(x,sc,{passive:$}),H.set(x,1)):H.set(x,re+1)}}}};return E(CS(_w)),rc.add(E),()=>{for(var y of T)for(const $ of[n,document]){var A=Xi.get($),x=A.get(y);--x==0?($.removeEventListener(y,sc),A.delete(y),A.size===0&&Xi.delete($)):A.set(y,x)}rc.delete(E),C!==r&&C.parentNode?.removeChild(C)}});return Sw.set(p,_),p}let Sw=new WeakMap;const ww="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ww);HS();function Ew(i){}const qa={init:i=>{ne.get(Fn).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=ne.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(_=>{_ in f&&l[_]?.write===!0&&(p[_]=f[_],delete f[_])});for(const _ in f)console.warn(`No permission to add the search param "${_}" to the url`);Object.keys(p).length>0&&r.routing().addSearchParams(p,n)}}},$t={luigi:{},init:i=>{console.log("Init communication..."),$t.luigi=i},addListeners:(i,n)=>{i.addEventListener(U.INITIALIZED,r=>{Pe.luigi?.ux().hideLoadingIndicator(i.parentNode)}),i.addEventListener(U.NAVIGATION_REQUEST,r=>{const{drawer:a,link:o,preserveView:c,modal:l,newTab:f,withoutSync:p,preventContextUpdate:_,preventHistoryEntry:C,fromVirtualTreeRoot:T,fromContext:E,fromClosestContext:y,fromParent:A,relative:x,nodeParams:$}=r.detail,H={drawerSettings:a,modalSettings:l,newTab:f,path:o,preserveView:c,preventContextUpdate:_,options:{fromVirtualTreeRoot:T,fromContext:E,fromClosestContext:y,fromParent:A,relative:x,nodeParams:$},preventHistoryEntry:C,withoutSync:p};ne.get(Sn).handleNavigationRequest(H,r.callbackFn)}),i.addEventListener(U.RUNTIME_ERROR_HANDLING_REQUEST,r=>{n.navigation().runTimeErrorHandler(r.payload?.data?.errorObj||{})}),i.addEventListener(U.ALERT_REQUEST,r=>{Pe.processAlert(r.payload,!0,i)}),i.addEventListener(U.SHOW_CONFIRMATION_MODAL_REQUEST,r=>{Pe.handleConfirmationModalRequest(r.payload,i)}),i.addEventListener(U.SET_DOCUMENT_TITLE_REQUEST,r=>{$t.luigi.getEngine()._connector?.setDocumentTitle(r.detail.title)}),i.addEventListener(U.SHOW_LOADING_INDICATOR_REQUEST,r=>{$t.luigi.getEngine()._connector?.showLoadingIndicator(i.parentNode)}),i.addEventListener(U.HIDE_LOADING_INDICATOR_REQUEST,r=>{$t.luigi.getEngine()._connector?.hideLoadingIndicator(i.parentNode)}),i.addEventListener(U.ADD_BACKDROP_REQUEST,r=>{$t.luigi.getEngine()._connector?.addBackdrop()}),i.addEventListener(U.REMOVE_BACKDROP_REQUEST,r=>{$t.luigi.getEngine()._connector?.removeBackdrop()}),i.addEventListener(U.SET_DIRTY_STATUS_REQUEST,r=>{Pe.handleDirtyStatusRequest(r.detail?.data?.dirty,r.detail?.source)}),i.addEventListener(U.ADD_NODE_PARAMS_REQUEST,r=>{n.routing().addNodeParams(r.payload.data,r.payload.keepBrowserHistory)}),i.addEventListener(U.OPEN_USER_SETTINGS_REQUEST,r=>{$t.luigi.getEngine()._connector?.openUserSettings(r.detail)}),i.addEventListener(U.CLOSE_USER_SETTINGS_REQUEST,r=>{$t.luigi.getEngine()._connector?.closeUserSettings()}),i.addEventListener(U.ADD_SEARCH_PARAMS_REQUEST,r=>{qa.addSearchParamsFromClient(r.detail.data,r.detail.keepBrowserHistory,n)}),i.addEventListener(U.UPDATE_MODAL_SETTINGS_REQUEST,r=>{K.updateModalSettings(r.payload.updatedModalSettings,r.payload.addHistoryEntry,n)}),i.addEventListener(U.SET_CURRENT_LOCALE_REQUEST,r=>{n.i18n().setCurrentLocale(r.detail?.data?.data?.currentLocale,i)})}};class Cw{constructor(){this._ui=K,this._comm=$t,this._ux=Pe,this._routing=qa}bootstrap(n){this._app=mw(Ew,{target:document.body}),this._connector=n}init(){const n=window.Luigi;ne.register(ss,()=>new ss),ne.register(Sn,()=>new Sn(n)),ne.register(mn,()=>new mn),ne.register(Fn,()=>new Fn(n)),ne.register(mr,()=>new mr),ne.register(vn,()=>new vn(n)),n.theming()._init(),K.init(n),qa.init(n),$t.init(n),Pe.init(n)}}window.Luigi=new vS(new Cw);
|
|
55
55
|
//# sourceMappingURL=luigi.js.map
|